diff --git a/source/blender/asset_system/intern/asset_library.cc b/source/blender/asset_system/intern/asset_library.cc index 405464f18f9..d0c64e3ba76 100644 --- a/source/blender/asset_system/intern/asset_library.cc +++ b/source/blender/asset_system/intern/asset_library.cc @@ -45,7 +45,7 @@ asset_system::AssetLibrary *AS_asset_library_load(const Main *bmain, return service->get_asset_library(bmain, library_reference); } -struct ::AssetLibrary *AS_asset_library_load(const char *name, const char *library_path) +::AssetLibrary *AS_asset_library_load(const char *name, const char *library_path) { /* NOTE: Loading an asset library at this point only means loading the catalogs. * Later on this should invoke reading of asset representations too. */ @@ -58,7 +58,7 @@ struct ::AssetLibrary *AS_asset_library_load(const char *name, const char *libra else { lib = service->get_asset_library_on_disk_custom(name, library_path); } - return reinterpret_cast(lib); + return reinterpret_cast<::AssetLibrary *>(lib); } bool AS_asset_library_has_any_unsaved_catalogs() @@ -113,8 +113,8 @@ AssetCatalogTree *AS_asset_library_get_catalog_tree(const ::AssetLibrary *librar return catalog_service->get_catalog_tree(); } -void AS_asset_library_refresh_catalog_simplename(struct ::AssetLibrary *asset_library, - struct AssetMetaData *asset_data) +void AS_asset_library_refresh_catalog_simplename(::AssetLibrary *asset_library, + AssetMetaData *asset_data) { asset_system::AssetLibrary *lib = reinterpret_cast(asset_library); lib->refresh_catalog_simplename(asset_data); @@ -254,8 +254,8 @@ void AssetLibrary::remap_ids_and_remove_invalid(const IDRemapper &mappings) } namespace { -void asset_library_on_save_post(struct Main *main, - struct PointerRNA **pointers, +void asset_library_on_save_post(Main *main, + PointerRNA **pointers, const int num_pointers, void *arg) { @@ -283,8 +283,8 @@ void AssetLibrary::on_blend_save_handler_unregister() on_save_callback_store_.arg = nullptr; } -void AssetLibrary::on_blend_save_post(struct Main *main, - struct PointerRNA ** /*pointers*/, +void AssetLibrary::on_blend_save_post(Main *main, + PointerRNA ** /*pointers*/, const int /*num_pointers*/) { if (this->catalog_service == nullptr) { @@ -301,7 +301,7 @@ AssetIdentifier AssetLibrary::asset_identifier_from_library(StringRef relative_a return AssetIdentifier(root_path_, relative_asset_path); } -void AssetLibrary::refresh_catalog_simplename(struct AssetMetaData *asset_data) +void AssetLibrary::refresh_catalog_simplename(AssetMetaData *asset_data) { if (BLI_uuid_is_nil(asset_data->catalog_id)) { asset_data->catalog_simple_name[0] = '\0'; diff --git a/source/blender/asset_system/intern/asset_library_service.cc b/source/blender/asset_system/intern/asset_library_service.cc index 9f280735d64..5c255a6a5f9 100644 --- a/source/blender/asset_system/intern/asset_library_service.cc +++ b/source/blender/asset_system/intern/asset_library_service.cc @@ -463,8 +463,8 @@ void AssetLibraryService::allocate_service_instance() } } -static void on_blendfile_load(struct Main * /*bMain*/, - struct PointerRNA ** /*pointers*/, +static void on_blendfile_load(Main * /*bMain*/, + PointerRNA ** /*pointers*/, const int /*num_pointers*/, void * /*arg*/) { diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index ad4a0f45c3b..f9d5c186916 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -849,13 +849,8 @@ void BLF_shadow_offset(int fontid, int x, int y) } } -void BLF_buffer(int fontid, - float *fbuf, - uchar *cbuf, - int w, - int h, - int nch, - struct ColorManagedDisplay *display) +void BLF_buffer( + int fontid, float *fbuf, uchar *cbuf, int w, int h, int nch, ColorManagedDisplay *display) { FontBLF *font = blf_get(fontid); diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 6b359d5058b..4944d2e38ee 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -67,8 +67,8 @@ static ThreadMutex ft_lib_mutex; /* May be set to #UI_widgetbase_draw_cache_flush. */ static void (*blf_draw_cache_flush)(void) = NULL; -static ft_pix blf_font_height_max_ft_pix(struct FontBLF *font); -static ft_pix blf_font_width_max_ft_pix(struct FontBLF *font); +static ft_pix blf_font_height_max_ft_pix(FontBLF *font); +static ft_pix blf_font_width_max_ft_pix(FontBLF *font); /* -------------------------------------------------------------------- */ @@ -981,7 +981,7 @@ static bool blf_cursor_position_foreach_glyph(const char *UNUSED(str), return true; } -size_t blf_str_offset_from_cursor_position(struct FontBLF *font, +size_t blf_str_offset_from_cursor_position(FontBLF *font, const char *str, size_t str_len, int location_x) @@ -1022,7 +1022,7 @@ static bool blf_str_offset_foreach_glyph(const char *UNUSED(str), return true; } -void blf_str_offset_to_glyph_bounds(struct FontBLF *font, +void blf_str_offset_to_glyph_bounds(FontBLF *font, const char *str, size_t str_offset, rcti *glyph_bounds) diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc index e173558f9e6..cb11ff1d540 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.cc +++ b/source/blender/blenkernel/intern/DerivedMesh.cc @@ -591,7 +591,7 @@ static void set_rest_position(Mesh &mesh) } } -static void mesh_calc_modifiers(struct Depsgraph *depsgraph, +static void mesh_calc_modifiers(Depsgraph *depsgraph, const Scene *scene, Object *ob, const bool use_deform, @@ -1130,7 +1130,7 @@ static void editbmesh_calc_modifier_final_normals_or_defer( editbmesh_calc_modifier_final_normals(mesh_final, final_datamask); } -static void editbmesh_calc_modifiers(struct Depsgraph *depsgraph, +static void editbmesh_calc_modifiers(Depsgraph *depsgraph, const Scene *scene, Object *ob, BMEditMesh *em_input, @@ -1430,7 +1430,7 @@ static void editbmesh_calc_modifiers(struct Depsgraph *depsgraph, } } -static void mesh_build_extra_data(struct Depsgraph *depsgraph, Object *ob, Mesh *mesh_eval) +static void mesh_build_extra_data(Depsgraph *depsgraph, Object *ob, Mesh *mesh_eval) { uint32_t eval_flags = DEG_get_eval_flags_for_id(depsgraph, &ob->id); @@ -1439,7 +1439,7 @@ static void mesh_build_extra_data(struct Depsgraph *depsgraph, Object *ob, Mesh } } -static void mesh_build_data(struct Depsgraph *depsgraph, +static void mesh_build_data(Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask, @@ -1504,7 +1504,7 @@ static void mesh_build_data(struct Depsgraph *depsgraph, mesh_build_extra_data(depsgraph, ob, mesh_eval); } -static void editbmesh_build_data(struct Depsgraph *depsgraph, +static void editbmesh_build_data(Depsgraph *depsgraph, const Scene *scene, Object *obedit, BMEditMesh *em, @@ -1607,7 +1607,7 @@ static void object_get_datamask(const Depsgraph *depsgraph, } } -void makeDerivedMesh(struct Depsgraph *depsgraph, +void makeDerivedMesh(Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask) @@ -1643,7 +1643,7 @@ void makeDerivedMesh(struct Depsgraph *depsgraph, /***/ -Mesh *mesh_get_eval_deform(struct Depsgraph *depsgraph, +Mesh *mesh_get_eval_deform(Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask) @@ -1719,7 +1719,7 @@ Mesh *mesh_create_eval_no_deform_render(Depsgraph *depsgraph, /***/ -Mesh *editbmesh_get_eval_cage(struct Depsgraph *depsgraph, +Mesh *editbmesh_get_eval_cage(Depsgraph *depsgraph, const Scene *scene, Object *obedit, BMEditMesh *em, @@ -1741,7 +1741,7 @@ Mesh *editbmesh_get_eval_cage(struct Depsgraph *depsgraph, return obedit->runtime.editmesh_eval_cage; } -Mesh *editbmesh_get_eval_cage_from_orig(struct Depsgraph *depsgraph, +Mesh *editbmesh_get_eval_cage_from_orig(Depsgraph *depsgraph, const Scene *scene, Object *obedit, const CustomData_MeshMasks *dataMask) diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 81ea465e072..9e5bf66fe2b 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -142,7 +142,7 @@ static void action_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, } /** Free (or release) any data used by this action (does not free the action itself). */ -static void action_free_data(struct ID *id) +static void action_free_data(ID *id) { bAction *action = (bAction *)id; /* No animdata here. */ @@ -286,7 +286,7 @@ static IDProperty *action_asset_type_property(const bAction *action) return property; } -static void action_asset_pre_save(void *asset_ptr, struct AssetMetaData *asset_data) +static void action_asset_pre_save(void *asset_ptr, AssetMetaData *asset_data) { bAction *action = (bAction *)asset_ptr; BLI_assert(GS(action->id.name) == ID_AC); @@ -719,12 +719,12 @@ bPoseChannel *BKE_pose_channel_active(Object *ob, const bool check_arm_layer) return NULL; } -bPoseChannel *BKE_pose_channel_active_if_layer_visible(struct Object *ob) +bPoseChannel *BKE_pose_channel_active_if_layer_visible(Object *ob) { return BKE_pose_channel_active(ob, true); } -bPoseChannel *BKE_pose_channel_active_or_first_selected(struct Object *ob) +bPoseChannel *BKE_pose_channel_active_or_first_selected(Object *ob) { bArmature *arm = (ob) ? ob->data : NULL; @@ -1351,7 +1351,7 @@ bool action_has_motion(const bAction *act) return false; } -bool BKE_action_has_single_frame(const struct bAction *act) +bool BKE_action_has_single_frame(const bAction *act) { if (act == NULL || BLI_listbase_is_empty(&act->curves)) { return false; @@ -1479,7 +1479,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_ } } -void BKE_action_get_frame_range(const struct bAction *act, float *r_start, float *r_end) +void BKE_action_get_frame_range(const bAction *act, float *r_start, float *r_end) { if (act && (act->flag & ACT_FRAME_RANGE)) { *r_start = act->frame_start; @@ -1495,7 +1495,7 @@ void BKE_action_get_frame_range(const struct bAction *act, float *r_start, float } } -bool BKE_action_is_cyclic(const struct bAction *act) +bool BKE_action_is_cyclic(const bAction *act) { return act && (act->flag & ACT_FRAME_RANGE) && (act->flag & ACT_CYCLIC); } @@ -1810,7 +1810,7 @@ void BKE_pose_check_uuids_unique_and_report(const bPose *pose) return; } - struct GSet *used_uuids = BLI_gset_new( + GSet *used_uuids = BLI_gset_new( BLI_session_uuid_ghash_hash, BLI_session_uuid_ghash_compare, "sequencer used uuids"); LISTBASE_FOREACH (bPoseChannel *, pchan, &pose->chanbase) { diff --git a/source/blender/blenkernel/intern/action_mirror.c b/source/blender/blenkernel/intern/action_mirror.c index efcb09c54e3..26b67135001 100644 --- a/source/blender/blenkernel/intern/action_mirror.c +++ b/source/blender/blenkernel/intern/action_mirror.c @@ -384,7 +384,7 @@ static void action_flip_pchan(Object *ob_arm, /** * Swap all RNA paths left/right. */ -static void action_flip_pchan_rna_paths(struct bAction *act) +static void action_flip_pchan_rna_paths(bAction *act) { const char *path_pose_prefix = "pose.bones[\""; const int path_pose_prefix_len = strlen(path_pose_prefix); @@ -447,7 +447,7 @@ static void action_flip_pchan_rna_paths(struct bAction *act) } } -void BKE_action_flip_with_pose(struct bAction *act, struct Object *ob_arm) +void BKE_action_flip_with_pose(bAction *act, Object *ob_arm) { struct FCurvePathCache *fcache = BKE_fcurve_pathcache_create(&act->curves); int i; diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c index 03625d1912d..e7d58ed72c1 100644 --- a/source/blender/blenkernel/intern/anim_data.c +++ b/source/blender/blenkernel/intern/anim_data.c @@ -235,7 +235,7 @@ void BKE_animdata_free(ID *id, const bool do_id_user) } } -bool BKE_animdata_id_is_animated(const struct ID *id) +bool BKE_animdata_id_is_animated(const ID *id) { if (id == NULL) { return false; @@ -375,8 +375,8 @@ void BKE_animdata_copy_id_action(Main *bmain, ID *id) animdata_copy_id_action(bmain, id, false, !is_id_liboverride); } -void BKE_animdata_duplicate_id_action(struct Main *bmain, - struct ID *id, +void BKE_animdata_duplicate_id_action(Main *bmain, + ID *id, const /*eDupli_ID_Flags*/ uint duplicate_flags) { if (duplicate_flags & USER_DUP_ACT) { @@ -1421,7 +1421,7 @@ void BKE_animdata_fix_paths_rename_all_ex(Main *bmain, /* .blend file API -------------------------------------------- */ -void BKE_animdata_blend_write(BlendWriter *writer, struct AnimData *adt) +void BKE_animdata_blend_write(BlendWriter *writer, AnimData *adt) { /* firstly, just write the AnimData block */ BLO_write_struct(writer, AnimData, adt); @@ -1491,7 +1491,7 @@ void BKE_animdata_blend_read_lib(BlendLibReader *reader, ID *id, AnimData *adt) BKE_nla_blend_read_lib(reader, id, &adt->nla_tracks); } -void BKE_animdata_blend_read_expand(struct BlendExpander *expander, AnimData *adt) +void BKE_animdata_blend_read_expand(BlendExpander *expander, AnimData *adt) { /* own action */ BLO_expand(expander, adt->action); diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 68c37c2b10a..298dce9dec7 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -755,8 +755,7 @@ static void animsys_blend_in_fcurves(PointerRNA *ptr, /* ***************************************** */ /* Driver Evaluation */ -AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, - float eval_time) +AnimationEvalContext BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float eval_time) { AnimationEvalContext ctx = { .depsgraph = depsgraph, @@ -3004,7 +3003,7 @@ void nlasnapshot_blend_strip(PointerRNA *ptr, ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot, - const struct AnimationEvalContext *anim_eval_context, + const AnimationEvalContext *anim_eval_context, const bool flush_to_original) { nlastrip_evaluate(STRIP_EVAL_BLEND, @@ -3023,7 +3022,7 @@ void nlasnapshot_blend_strip_get_inverted_lower_snapshot( ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot, - const struct AnimationEvalContext *anim_eval_context) + const AnimationEvalContext *anim_eval_context) { nlastrip_evaluate(STRIP_EVAL_BLEND_GET_INVERTED_LOWER_SNAPSHOT, ptr, @@ -3040,7 +3039,7 @@ void nlasnapshot_blend_strip_no_blend(PointerRNA *ptr, ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot, - const struct AnimationEvalContext *anim_eval_context) + const AnimationEvalContext *anim_eval_context) { nlastrip_evaluate( STRIP_EVAL_NOBLEND, ptr, channels, modifiers, nes, snapshot, anim_eval_context, false); @@ -3694,10 +3693,7 @@ void nlasnapshot_blend_get_inverted_lower_snapshot(NlaEvalData *eval_data, /* ---------------------- */ NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context( - struct ListBase *cache, - struct PointerRNA *ptr, - struct AnimData *adt, - const AnimationEvalContext *anim_eval_context) + ListBase *cache, PointerRNA *ptr, AnimData *adt, const AnimationEvalContext *anim_eval_context) { /* No remapping needed if NLA is off or no action. */ if ((adt == NULL) || (adt->action == NULL) || (adt->nla_tracks.first == NULL) || @@ -3733,13 +3729,13 @@ NlaKeyframingContext *BKE_animsys_get_nla_keyframing_context( return ctx; } -void BKE_animsys_nla_remap_keyframe_values(struct NlaKeyframingContext *context, - struct PointerRNA *prop_ptr, - struct PropertyRNA *prop, +void BKE_animsys_nla_remap_keyframe_values(NlaKeyframingContext *context, + PointerRNA *prop_ptr, + PropertyRNA *prop, float *values, int count, int index, - const struct AnimationEvalContext *anim_eval_context, + const AnimationEvalContext *anim_eval_context, bool *r_force_all, BLI_bitmap *r_successful_remaps) { @@ -3861,7 +3857,7 @@ void BKE_animsys_nla_remap_keyframe_values(struct NlaKeyframingContext *context, MEM_freeN(remap_domain); } -void BKE_animsys_free_nla_keyframing_context_cache(struct ListBase *cache) +void BKE_animsys_free_nla_keyframing_context_cache(ListBase *cache) { LISTBASE_FOREACH (NlaKeyframingContext *, ctx, cache) { MEM_SAFE_FREE(ctx->eval_strip); diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index d4fd4968183..75f95c20998 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -127,7 +127,7 @@ static void armature_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src } /** Free (or release) any data used by this armature (does not free the armature itself). */ -static void armature_free_data(struct ID *id) +static void armature_free_data(ID *id) { bArmature *armature = (bArmature *)id; @@ -675,7 +675,7 @@ static void armature_refresh_layer_used_recursive(bArmature *arm, ListBase *bone } } -void BKE_armature_refresh_layer_used(struct Depsgraph *depsgraph, struct bArmature *arm) +void BKE_armature_refresh_layer_used(Depsgraph *depsgraph, bArmature *arm) { if (arm->edbo != NULL) { /* Don't perform this update when the armature is in edit mode. In that case it should be @@ -933,9 +933,9 @@ void BKE_pchan_bbone_handles_get(bPoseChannel *pchan, bPoseChannel **r_prev, bPo } } -void BKE_pchan_bbone_spline_params_get(struct bPoseChannel *pchan, +void BKE_pchan_bbone_spline_params_get(bPoseChannel *pchan, const bool rest, - struct BBoneSplineParameters *param) + BBoneSplineParameters *param) { bPoseChannel *next, *prev; Bone *bone = pchan->bone; @@ -1813,30 +1813,30 @@ void BKE_bone_parent_transform_calc_from_matrices(int bone_flag, } } -void BKE_bone_parent_transform_clear(struct BoneParentTransform *bpt) +void BKE_bone_parent_transform_clear(BoneParentTransform *bpt) { unit_m4(bpt->rotscale_mat); unit_m4(bpt->loc_mat); copy_v3_fl(bpt->post_scale, 1.0f); } -void BKE_bone_parent_transform_invert(struct BoneParentTransform *bpt) +void BKE_bone_parent_transform_invert(BoneParentTransform *bpt) { invert_m4(bpt->rotscale_mat); invert_m4(bpt->loc_mat); invert_v3_safe(bpt->post_scale); } -void BKE_bone_parent_transform_combine(const struct BoneParentTransform *in1, - const struct BoneParentTransform *in2, - struct BoneParentTransform *result) +void BKE_bone_parent_transform_combine(const BoneParentTransform *in1, + const BoneParentTransform *in2, + BoneParentTransform *result) { mul_m4_m4m4(result->rotscale_mat, in1->rotscale_mat, in2->rotscale_mat); mul_m4_m4m4(result->loc_mat, in1->loc_mat, in2->loc_mat); mul_v3_v3v3(result->post_scale, in1->post_scale, in2->post_scale); } -void BKE_bone_parent_transform_apply(const struct BoneParentTransform *bpt, +void BKE_bone_parent_transform_apply(const BoneParentTransform *bpt, const float inmat[4][4], float outmat[4][4]) { @@ -1892,7 +1892,7 @@ void BKE_armature_loc_pose_to_bone(bPoseChannel *pchan, const float inloc[3], fl * High level functions for transforming bones and reading the transform values. * \{ */ -void BKE_armature_mat_pose_to_bone_ex(struct Depsgraph *depsgraph, +void BKE_armature_mat_pose_to_bone_ex(Depsgraph *depsgraph, Object *ob, bPoseChannel *pchan, const float inmat[4][4], @@ -2475,7 +2475,7 @@ void BKE_pose_where_is_bone_tail(bPoseChannel *pchan) add_v3_v3v3(pchan->pose_tail, pchan->pose_head, vec); } -void BKE_pose_where_is_bone(struct Depsgraph *depsgraph, +void BKE_pose_where_is_bone(Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan, @@ -2539,7 +2539,7 @@ void BKE_pose_where_is_bone(struct Depsgraph *depsgraph, BKE_pose_where_is_bone_tail(pchan); } -void BKE_pose_where_is(struct Depsgraph *depsgraph, Scene *scene, Object *ob) +void BKE_pose_where_is(Depsgraph *depsgraph, Scene *scene, Object *ob) { bArmature *arm; Bone *bone; diff --git a/source/blender/blenkernel/intern/armature_pose.cc b/source/blender/blenkernel/intern/armature_pose.cc index 8651da42f0f..5f3fb2073dc 100644 --- a/source/blender/blenkernel/intern/armature_pose.cc +++ b/source/blender/blenkernel/intern/armature_pose.cc @@ -32,16 +32,16 @@ void pose_apply_disable_fcurves_for_unselected_bones(bAction *action, const BoneNameSet &selected_bone_names); void pose_apply_restore_fcurves(bAction *action); -void pose_apply(struct Object *ob, - struct bAction *action, - struct AnimationEvalContext *anim_eval_context, +void pose_apply(Object *ob, + bAction *action, + AnimationEvalContext *anim_eval_context, ActionApplier applier); } // namespace -void BKE_pose_apply_action_selected_bones(struct Object *ob, - struct bAction *action, - struct AnimationEvalContext *anim_eval_context) +void BKE_pose_apply_action_selected_bones(Object *ob, + bAction *action, + AnimationEvalContext *anim_eval_context) { auto evaluate_and_apply = [](PointerRNA *ptr, bAction *act, const AnimationEvalContext *anim_eval_context) { @@ -51,18 +51,18 @@ void BKE_pose_apply_action_selected_bones(struct Object *ob, pose_apply(ob, action, anim_eval_context, evaluate_and_apply); } -void BKE_pose_apply_action_all_bones(struct Object *ob, - struct bAction *action, - struct AnimationEvalContext *anim_eval_context) +void BKE_pose_apply_action_all_bones(Object *ob, + bAction *action, + AnimationEvalContext *anim_eval_context) { PointerRNA pose_owner_ptr; RNA_id_pointer_create(&ob->id, &pose_owner_ptr); animsys_evaluate_action(&pose_owner_ptr, action, anim_eval_context, false); } -void BKE_pose_apply_action_blend(struct Object *ob, - struct bAction *action, - struct AnimationEvalContext *anim_eval_context, +void BKE_pose_apply_action_blend(Object *ob, + bAction *action, + AnimationEvalContext *anim_eval_context, const float blend_factor) { auto evaluate_and_blend = [blend_factor](PointerRNA *ptr, @@ -75,9 +75,9 @@ void BKE_pose_apply_action_blend(struct Object *ob, } namespace { -void pose_apply(struct Object *ob, - struct bAction *action, - struct AnimationEvalContext *anim_eval_context, +void pose_apply(Object *ob, + bAction *action, + AnimationEvalContext *anim_eval_context, ActionApplier applier) { bPose *pose = ob->pose; diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index 12daa063408..f8f519f9ca5 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -737,7 +737,7 @@ static void splineik_evaluate_bone( /* Evaluate the chain starting from the nominated bone */ static void splineik_execute_tree( - struct Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime) + Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime) { tSplineIK_Tree *tree; @@ -779,7 +779,7 @@ void BKE_pose_splineik_init_tree(Scene *scene, Object *ob, float ctime) } void BKE_splineik_execute_tree( - struct Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime) + Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime) { splineik_execute_tree(depsgraph, scene, ob, pchan_root, ctime); } @@ -807,7 +807,7 @@ BLI_INLINE bPoseChannel *pose_pchan_get_indexed(Object *ob, int pchan_index) return pose->chan_array[pchan_index]; } -void BKE_pose_eval_init(struct Depsgraph *depsgraph, Scene *UNUSED(scene), Object *object) +void BKE_pose_eval_init(Depsgraph *depsgraph, Scene *UNUSED(scene), Object *object) { bPose *pose = object->pose; BLI_assert(pose != NULL); @@ -836,7 +836,7 @@ void BKE_pose_eval_init(struct Depsgraph *depsgraph, Scene *UNUSED(scene), Objec BLI_assert(pose->chan_array != NULL || BLI_listbase_is_empty(&pose->chanbase)); } -void BKE_pose_eval_init_ik(struct Depsgraph *depsgraph, Scene *scene, Object *object) +void BKE_pose_eval_init_ik(Depsgraph *depsgraph, Scene *scene, Object *object) { DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); BLI_assert(object->type == OB_ARMATURE); @@ -853,7 +853,7 @@ void BKE_pose_eval_init_ik(struct Depsgraph *depsgraph, Scene *scene, Object *ob BKE_pose_splineik_init_tree(scene, object, ctime); } -void BKE_pose_eval_bone(struct Depsgraph *depsgraph, Scene *scene, Object *object, int pchan_index) +void BKE_pose_eval_bone(Depsgraph *depsgraph, Scene *scene, Object *object, int pchan_index) { const bArmature *armature = (bArmature *)object->data; if (armature->edbo != NULL) { @@ -889,7 +889,7 @@ void BKE_pose_eval_bone(struct Depsgraph *depsgraph, Scene *scene, Object *objec } } -void BKE_pose_constraints_evaluate(struct Depsgraph *depsgraph, +void BKE_pose_constraints_evaluate(Depsgraph *depsgraph, Scene *scene, Object *object, int pchan_index) @@ -915,8 +915,8 @@ void BKE_pose_constraints_evaluate(struct Depsgraph *depsgraph, } } -static void pose_channel_flush_to_orig_if_needed(struct Depsgraph *depsgraph, - struct Object *object, +static void pose_channel_flush_to_orig_if_needed(Depsgraph *depsgraph, + Object *object, bPoseChannel *pchan) { if (!DEG_is_active(depsgraph)) { @@ -935,7 +935,7 @@ static void pose_channel_flush_to_orig_if_needed(struct Depsgraph *depsgraph, copy_v3_v3(pchan_orig->pose_tail, pchan->pose_tail); } -void BKE_pose_bone_done(struct Depsgraph *depsgraph, struct Object *object, int pchan_index) +void BKE_pose_bone_done(Depsgraph *depsgraph, Object *object, int pchan_index) { const bArmature *armature = (bArmature *)object->data; if (armature->edbo != NULL) { @@ -961,9 +961,7 @@ void BKE_pose_bone_done(struct Depsgraph *depsgraph, struct Object *object, int } } -void BKE_pose_eval_bbone_segments(struct Depsgraph *depsgraph, - struct Object *object, - int pchan_index) +void BKE_pose_eval_bbone_segments(Depsgraph *depsgraph, Object *object, int pchan_index) { const bArmature *armature = (bArmature *)object->data; if (armature->edbo != NULL) { @@ -980,7 +978,7 @@ void BKE_pose_eval_bbone_segments(struct Depsgraph *depsgraph, } } -void BKE_pose_iktree_evaluate(struct Depsgraph *depsgraph, +void BKE_pose_iktree_evaluate(Depsgraph *depsgraph, Scene *scene, Object *object, int rootchan_index) @@ -1000,7 +998,7 @@ void BKE_pose_iktree_evaluate(struct Depsgraph *depsgraph, BIK_execute_tree(depsgraph, scene, object, rootchan, ctime); } -void BKE_pose_splineik_evaluate(struct Depsgraph *depsgraph, +void BKE_pose_splineik_evaluate(Depsgraph *depsgraph, Scene *scene, Object *object, int rootchan_index) @@ -1029,7 +1027,7 @@ static void pose_eval_cleanup_common(Object *object) UNUSED_VARS_NDEBUG(pose); } -void BKE_pose_eval_done(struct Depsgraph *depsgraph, Object *object) +void BKE_pose_eval_done(Depsgraph *depsgraph, Object *object) { bPose *pose = object->pose; BLI_assert(pose != NULL); @@ -1038,7 +1036,7 @@ void BKE_pose_eval_done(struct Depsgraph *depsgraph, Object *object) BLI_assert(object->type == OB_ARMATURE); } -void BKE_pose_eval_cleanup(struct Depsgraph *depsgraph, Scene *scene, Object *object) +void BKE_pose_eval_cleanup(Depsgraph *depsgraph, Scene *scene, Object *object) { bPose *pose = object->pose; BLI_assert(pose != NULL); diff --git a/source/blender/blenkernel/intern/asset.cc b/source/blender/blenkernel/intern/asset.cc index 416ae405708..eb2cb94ef6a 100644 --- a/source/blender/blenkernel/intern/asset.cc +++ b/source/blender/blenkernel/intern/asset.cc @@ -71,10 +71,9 @@ AssetTag *BKE_asset_metadata_tag_add(AssetMetaData *asset_data, const char *name return tag; } -struct AssetTagEnsureResult BKE_asset_metadata_tag_ensure(AssetMetaData *asset_data, - const char *name) +AssetTagEnsureResult BKE_asset_metadata_tag_ensure(AssetMetaData *asset_data, const char *name) { - struct AssetTagEnsureResult result = {nullptr}; + AssetTagEnsureResult result = {nullptr}; if (!name[0]) { return result; } @@ -108,13 +107,13 @@ void BKE_asset_library_reference_init_default(AssetLibraryReference *library_ref memcpy(library_ref, DNA_struct_default_get(AssetLibraryReference), sizeof(*library_ref)); } -void BKE_asset_metadata_catalog_id_clear(struct AssetMetaData *asset_data) +void BKE_asset_metadata_catalog_id_clear(AssetMetaData *asset_data) { asset_data->catalog_id = BLI_uuid_nil(); asset_data->catalog_simple_name[0] = '\0'; } -void BKE_asset_metadata_catalog_id_set(struct AssetMetaData *asset_data, +void BKE_asset_metadata_catalog_id_set(AssetMetaData *asset_data, const ::bUUID catalog_id, const char *catalog_simple_name) { diff --git a/source/blender/blenkernel/intern/blender_copybuffer.c b/source/blender/blenkernel/intern/blender_copybuffer.c index 216ef689c43..1626dc84a7c 100644 --- a/source/blender/blenkernel/intern/blender_copybuffer.c +++ b/source/blender/blenkernel/intern/blender_copybuffer.c @@ -102,7 +102,7 @@ bool BKE_copybuffer_read(Main *bmain_dst, * should remain linked. */ const int flag = 0; const int id_tag_extra = 0; - struct LibraryLink_Params liblink_params; + LibraryLink_Params liblink_params; BLO_library_link_params_init(&liblink_params, bmain_dst, flag, id_tag_extra); BlendfileLinkAppendContext *lapp_context = BKE_blendfile_link_append_context_new( @@ -137,7 +137,7 @@ int BKE_copybuffer_paste(bContext *C, /* NOTE: No recursive append here, external linked data should remain linked. */ BLI_assert((flag & BLO_LIBLINK_APPEND_RECURSIVE) == 0); - struct LibraryLink_Params liblink_params; + LibraryLink_Params liblink_params; BLO_library_link_params_init_with_context( &liblink_params, bmain, flag, id_tag_extra, scene, view_layer, v3d); diff --git a/source/blender/blenkernel/intern/blender_undo.cc b/source/blender/blenkernel/intern/blender_undo.cc index 1a467c09c98..af353b6d5de 100644 --- a/source/blender/blenkernel/intern/blender_undo.cc +++ b/source/blender/blenkernel/intern/blender_undo.cc @@ -67,21 +67,20 @@ bool BKE_memfile_undo_decode(MemFileUndoData *mfu, if (UNDO_DISK) { const BlendFileReadParams params{}; BlendFileReadReport bf_reports{}; - struct BlendFileData *bfd = BKE_blendfile_read(mfu->filepath, ¶ms, &bf_reports); + BlendFileData *bfd = BKE_blendfile_read(mfu->filepath, ¶ms, &bf_reports); if (bfd != nullptr) { BKE_blendfile_read_setup(C, bfd, ¶ms, &bf_reports); success = true; } } else { - struct BlendFileReadParams params = {0}; + BlendFileReadParams params = {0}; params.undo_direction = undo_direction; if (!use_old_bmain_data) { params.skip_flags |= BLO_READ_SKIP_UNDO_OLD_MAIN; } BlendFileReadReport blend_file_read_report{}; - struct BlendFileData *bfd = BKE_blendfile_read_from_memfile( - bmain, &mfu->memfile, ¶ms, nullptr); + BlendFileData *bfd = BKE_blendfile_read_from_memfile(bmain, &mfu->memfile, ¶ms, nullptr); if (bfd != nullptr) { BKE_blendfile_read_setup(C, bfd, ¶ms, &blend_file_read_report); success = true; diff --git a/source/blender/blenkernel/intern/blendfile.cc b/source/blender/blenkernel/intern/blendfile.cc index f3282747a62..a11a9b72ba3 100644 --- a/source/blender/blenkernel/intern/blendfile.cc +++ b/source/blender/blenkernel/intern/blendfile.cc @@ -226,7 +226,7 @@ static void setup_app_userdef(BlendFileData *bfd) */ static void setup_app_data(bContext *C, BlendFileData *bfd, - const struct BlendFileReadParams *params, + const BlendFileReadParams *params, BlendFileReadReport *reports) { Main *bmain = G_MAIN; @@ -525,7 +525,7 @@ static void setup_app_data(bContext *C, static void setup_app_blend_file_data(bContext *C, BlendFileData *bfd, - const struct BlendFileReadParams *params, + const BlendFileReadParams *params, BlendFileReadReport *reports) { if ((params->skip_flags & BLO_READ_SKIP_USERDEF) == 0) { @@ -552,7 +552,7 @@ static void handle_subversion_warning(Main *main, BlendFileReadReport *reports) void BKE_blendfile_read_setup_ex(bContext *C, BlendFileData *bfd, - const struct BlendFileReadParams *params, + const BlendFileReadParams *params, BlendFileReadReport *reports, /* Extra args. */ const bool startup_update_defaults, @@ -576,15 +576,15 @@ void BKE_blendfile_read_setup_ex(bContext *C, void BKE_blendfile_read_setup(bContext *C, BlendFileData *bfd, - const struct BlendFileReadParams *params, + const BlendFileReadParams *params, BlendFileReadReport *reports) { BKE_blendfile_read_setup_ex(C, bfd, params, reports, false, nullptr); } -struct BlendFileData *BKE_blendfile_read(const char *filepath, - const struct BlendFileReadParams *params, - BlendFileReadReport *reports) +BlendFileData *BKE_blendfile_read(const char *filepath, + const BlendFileReadParams *params, + BlendFileReadReport *reports) { /* Don't print startup file loading. */ if (params->is_startup == false) { @@ -605,10 +605,10 @@ struct BlendFileData *BKE_blendfile_read(const char *filepath, return bfd; } -struct BlendFileData *BKE_blendfile_read_from_memory(const void *filebuf, - int filelength, - const struct BlendFileReadParams *params, - ReportList *reports) +BlendFileData *BKE_blendfile_read_from_memory(const void *filebuf, + int filelength, + const BlendFileReadParams *params, + ReportList *reports) { BlendFileData *bfd = BLO_read_from_memory( filebuf, filelength, eBLOReadSkip(params->skip_flags), reports); @@ -625,10 +625,10 @@ struct BlendFileData *BKE_blendfile_read_from_memory(const void *filebuf, return bfd; } -struct BlendFileData *BKE_blendfile_read_from_memfile(Main *bmain, - struct MemFile *memfile, - const struct BlendFileReadParams *params, - ReportList *reports) +BlendFileData *BKE_blendfile_read_from_memfile(Main *bmain, + MemFile *memfile, + const BlendFileReadParams *params, + ReportList *reports) { BlendFileData *bfd = BLO_read_from_memfile( bmain, BKE_main_blendfile_path(bmain), memfile, params, reports); diff --git a/source/blender/blenkernel/intern/blendfile_link_append.c b/source/blender/blenkernel/intern/blendfile_link_append.c index f53dd0e42a2..60b8313139c 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.c +++ b/source/blender/blenkernel/intern/blendfile_link_append.c @@ -341,7 +341,7 @@ void BKE_blendfile_link_append_context_item_library_index_enable( BLI_BITMAP_ENABLE(item->libraries, library_index); } -bool BKE_blendfile_link_append_context_is_empty(struct BlendfileLinkAppendContext *lapp_context) +bool BKE_blendfile_link_append_context_is_empty(BlendfileLinkAppendContext *lapp_context) { return lapp_context->num_items == 0; } @@ -365,14 +365,13 @@ ID *BKE_blendfile_link_append_context_item_liboverrideid_get( } short BKE_blendfile_link_append_context_item_idcode_get( - struct BlendfileLinkAppendContext *UNUSED(lapp_context), - struct BlendfileLinkAppendContextItem *item) + BlendfileLinkAppendContext *UNUSED(lapp_context), BlendfileLinkAppendContextItem *item) { return item->idcode; } void BKE_blendfile_link_append_context_item_foreach( - struct BlendfileLinkAppendContext *lapp_context, + BlendfileLinkAppendContext *lapp_context, BKE_BlendfileLinkAppendContexteItemFunction callback_function, const eBlendfileLinkAppendForeachItemFlag flag, void *userdata) @@ -1768,7 +1767,7 @@ void BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context, BKE_lib_override_library_main_resync(bmain, lapp_context->params->context.scene, lapp_context->params->context.view_layer, - &(struct BlendFileReadReport){ + &(BlendFileReadReport){ .reports = reports, }); /* We need to rebuild some of the deleted override rules (for UI feedback purpose). */ diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index c3120b535af..c388c8622a4 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -388,7 +388,7 @@ void BKE_bpath_missing_files_find(Main *bmain, ReportList *reports, const bool find_all) { - struct BPathFind_Data data = {NULL}; + BPathFind_Data data = {NULL}; const int flag = BKE_BPATH_FOREACH_PATH_ABSOLUTE | BKE_BPATH_FOREACH_PATH_RELOAD_EDITED | BKE_BPATH_FOREACH_PATH_RESOLVE_TOKEN | BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES; diff --git a/source/blender/blenkernel/intern/brush.cc b/source/blender/blenkernel/intern/brush.cc index 48e9b720ad0..c0fd24e7ff7 100644 --- a/source/blender/blenkernel/intern/brush.cc +++ b/source/blender/blenkernel/intern/brush.cc @@ -1668,7 +1668,7 @@ void BKE_brush_init_curves_sculpt_settings(Brush *brush) settings->curve_parameter_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); } -struct Brush *BKE_brush_first_search(struct Main *bmain, const eObjectMode ob_mode) +Brush *BKE_brush_first_search(Main *bmain, const eObjectMode ob_mode) { LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { if (brush->ob_mode & ob_mode) { @@ -2060,8 +2060,7 @@ void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset) BKE_curvemapping_changed(cumap, false); } -const struct MTex *BKE_brush_mask_texture_get(const struct Brush *brush, - const eObjectMode object_mode) +const MTex *BKE_brush_mask_texture_get(const Brush *brush, const eObjectMode object_mode) { if (object_mode == OB_MODE_SCULPT) { return &brush->mtex; @@ -2069,8 +2068,7 @@ const struct MTex *BKE_brush_mask_texture_get(const struct Brush *brush, return &brush->mask_mtex; } -const struct MTex *BKE_brush_color_texture_get(const struct Brush *brush, - const eObjectMode object_mode) +const MTex *BKE_brush_color_texture_get(const Brush *brush, const eObjectMode object_mode) { if (object_mode == OB_MODE_SCULPT) { return &brush->mask_mtex; @@ -2084,7 +2082,7 @@ float BKE_brush_sample_tex_3d(const Scene *scene, const float point[3], float rgba[4], const int thread, - struct ImagePool *pool) + ImagePool *pool) { UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; float intensity = 1.0; @@ -2202,7 +2200,7 @@ float BKE_brush_sample_tex_3d(const Scene *scene, } float BKE_brush_sample_masktex( - const Scene *scene, Brush *br, const float point[2], const int thread, struct ImagePool *pool) + const Scene *scene, Brush *br, const float point[2], const int thread, ImagePool *pool) { UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; MTex *mtex = &br->mask_mtex; @@ -2329,19 +2327,19 @@ float BKE_brush_sample_masktex( * In any case, a better solution is needed to prevent * inconsistency. */ -const float *BKE_brush_color_get(const struct Scene *scene, const struct Brush *brush) +const float *BKE_brush_color_get(const Scene *scene, const Brush *brush) { UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; return (ups->flag & UNIFIED_PAINT_COLOR) ? ups->rgb : brush->rgb; } -const float *BKE_brush_secondary_color_get(const struct Scene *scene, const struct Brush *brush) +const float *BKE_brush_secondary_color_get(const Scene *scene, const Brush *brush) { UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; return (ups->flag & UNIFIED_PAINT_COLOR) ? ups->secondary_rgb : brush->secondary_rgb; } -void BKE_brush_color_set(struct Scene *scene, struct Brush *brush, const float color[3]) +void BKE_brush_color_set(Scene *scene, Brush *brush, const float color[3]) { UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; @@ -2619,7 +2617,7 @@ static bool brush_gen_texture(const Brush *br, return true; } -struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary, bool display_gradient) +ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary, bool display_gradient) { ImBuf *im = MEM_cnew("radial control texture"); int side = 512; diff --git a/source/blender/blenkernel/intern/bvhutils.cc b/source/blender/blenkernel/intern/bvhutils.cc index f62140e4d6c..8c4244cf6f1 100644 --- a/source/blender/blenkernel/intern/bvhutils.cc +++ b/source/blender/blenkernel/intern/bvhutils.cc @@ -629,7 +629,7 @@ static void bvhtree_from_mesh_setup_data(BVHTree *tree, static void bvhtree_from_editmesh_setup_data(BVHTree *tree, const BVHCacheType bvh_cache_type, - struct BMEditMesh *em, + BMEditMesh *em, BVHTreeFromEditMesh *r_data) { memset(r_data, 0, sizeof(*r_data)); @@ -1108,7 +1108,7 @@ BVHTree *bvhtree_from_editmesh_looptri( BVHTree *bvhtree_from_mesh_looptri_ex(BVHTreeFromMesh *data, const float (*vert_positions)[3], const int *corner_verts, - const struct MLoopTri *looptri, + const MLoopTri *looptri, const int looptri_num, const BitSpan looptri_mask, int looptri_num_active, @@ -1174,8 +1174,8 @@ static BitVector<> looptri_no_hidden_map_get(const blender::OffsetIndices p return looptri_mask; } -BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, - const struct Mesh *mesh, +BVHTree *BKE_bvhtree_from_mesh_get(BVHTreeFromMesh *data, + const Mesh *mesh, const BVHCacheType bvh_cache_type, const int tree_type) { @@ -1301,7 +1301,7 @@ BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, } BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data, - struct BMEditMesh *em, + BMEditMesh *em, const int tree_type, const BVHCacheType bvh_cache_type, BVHCache **bvh_cache_p, @@ -1373,7 +1373,7 @@ BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data, /** \name Free Functions * \{ */ -void free_bvhtree_from_editmesh(struct BVHTreeFromEditMesh *data) +void free_bvhtree_from_editmesh(BVHTreeFromEditMesh *data) { if (data->tree) { if (!data->cached) { @@ -1383,7 +1383,7 @@ void free_bvhtree_from_editmesh(struct BVHTreeFromEditMesh *data) } } -void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data) +void free_bvhtree_from_mesh(BVHTreeFromMesh *data) { if (data->tree && !data->cached) { BLI_bvhtree_free(data->tree); diff --git a/source/blender/blenkernel/intern/callbacks.c b/source/blender/blenkernel/intern/callbacks.c index 4ab65ac6e77..41d16ecdda4 100644 --- a/source/blender/blenkernel/intern/callbacks.c +++ b/source/blender/blenkernel/intern/callbacks.c @@ -27,7 +27,7 @@ static bool callbacks_initialized = false; "the callback system.") void BKE_callback_exec(struct Main *bmain, - struct PointerRNA **pointers, + PointerRNA **pointers, const int num_pointers, eCbEvent evt) { diff --git a/source/blender/blenkernel/intern/cdderivedmesh.cc b/source/blender/blenkernel/intern/cdderivedmesh.cc index 398151eea1e..3762b833a30 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.cc +++ b/source/blender/blenkernel/intern/cdderivedmesh.cc @@ -46,7 +46,7 @@ struct CDDerivedMesh { int *corner_edges; /* Cached */ - struct PBVH *pbvh; + PBVH *pbvh; bool pbvh_draw; /* Mesh connectivity */ diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 77e4a6c8f82..b50521efd90 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -379,8 +379,7 @@ static void collection_blend_read_lib(BlendLibReader *reader, ID *id) } #ifdef USE_COLLECTION_COMPAT_28 -void BKE_collection_compat_blend_read_expand(struct BlendExpander *expander, - struct SceneCollection *sc) +void BKE_collection_compat_blend_read_expand(BlendExpander *expander, SceneCollection *sc) { LISTBASE_FOREACH (LinkData *, link, &sc->objects) { BLO_expand(expander, link->data); @@ -803,7 +802,7 @@ void BKE_collection_new_name_get(Collection *collection_parent, char *rname) MEM_freeN(name); } -const char *BKE_collection_ui_name_get(struct Collection *collection) +const char *BKE_collection_ui_name_get(Collection *collection) { if (collection->flag & COLLECTION_IS_MASTER) { return IFACE_("Scene Collection"); @@ -1944,7 +1943,7 @@ void BKE_main_collections_parent_relations_rebuild(Main *bmain) } } -bool BKE_collection_validate(struct Collection *collection) +bool BKE_collection_validate(Collection *collection) { if (!BLI_listbase_validate(&collection->children)) { return false; @@ -2204,7 +2203,7 @@ void BKE_scene_collections_iterator_begin(BLI_Iterator *iter, void *data_in) iter->current = data->array[data->cur]; } -void BKE_scene_collections_iterator_next(struct BLI_Iterator *iter) +void BKE_scene_collections_iterator_next(BLI_Iterator *iter) { CollectionsIteratorData *data = iter->data; @@ -2216,7 +2215,7 @@ void BKE_scene_collections_iterator_next(struct BLI_Iterator *iter) } } -void BKE_scene_collections_iterator_end(struct BLI_Iterator *iter) +void BKE_scene_collections_iterator_end(BLI_Iterator *iter) { CollectionsIteratorData *data = iter->data; @@ -2301,7 +2300,7 @@ void BKE_scene_objects_iterator_begin_ex(BLI_Iterator *iter, void *data_in) scene_objects_iterator_skip_invalid_flag(iter); } -void BKE_scene_objects_iterator_next_ex(struct BLI_Iterator *iter) +void BKE_scene_objects_iterator_next_ex(BLI_Iterator *iter) { /* Unpack the data. */ SceneObjectsIteratorExData *data = iter->data; @@ -2316,7 +2315,7 @@ void BKE_scene_objects_iterator_next_ex(struct BLI_Iterator *iter) scene_objects_iterator_skip_invalid_flag(iter); } -void BKE_scene_objects_iterator_end_ex(struct BLI_Iterator *iter) +void BKE_scene_objects_iterator_end_ex(BLI_Iterator *iter) { /* Unpack the data. */ SceneObjectsIteratorExData *data = iter->data; diff --git a/source/blender/blenkernel/intern/colorband.c b/source/blender/blenkernel/intern/colorband.c index cc2e34f70e5..020e4182ca3 100644 --- a/source/blender/blenkernel/intern/colorband.c +++ b/source/blender/blenkernel/intern/colorband.c @@ -603,7 +603,7 @@ void BKE_colorband_update_sort(ColorBand *coba) } } -CBData *BKE_colorband_element_add(struct ColorBand *coba, float position) +CBData *BKE_colorband_element_add(ColorBand *coba, float position) { if (coba->tot == MAXCOLORBAND) { return NULL; @@ -629,7 +629,7 @@ CBData *BKE_colorband_element_add(struct ColorBand *coba, float position) return coba->data + coba->cur; } -bool BKE_colorband_element_remove(struct ColorBand *coba, int index) +bool BKE_colorband_element_remove(ColorBand *coba, int index) { if (coba->tot < 2) { return false; diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 180f1025a11..dd45e23f33f 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -840,7 +840,7 @@ void BKE_curvemapping_premultiply(CurveMapping *cumap, bool restore) static int sort_curvepoints(const void *a1, const void *a2) { - const struct CurveMapPoint *x1 = a1, *x2 = a2; + const CurveMapPoint *x1 = a1, *x2 = a2; if (x1->x > x2->x) { return 1; @@ -1805,7 +1805,7 @@ void BKE_color_managed_view_settings_init_render( const ColorManagedDisplaySettings *display_settings, const char *view_transform) { - struct ColorManagedDisplay *display = IMB_colormanagement_display_get_named( + ColorManagedDisplay *display = IMB_colormanagement_display_get_named( display_settings->display_device); if (!view_transform) { @@ -1826,8 +1826,7 @@ void BKE_color_managed_view_settings_init_render( } void BKE_color_managed_view_settings_init_default( - struct ColorManagedViewSettings *view_settings, - const struct ColorManagedDisplaySettings *display_settings) + ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings) { IMB_colormanagement_init_default_view_settings(view_settings, display_settings); } diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 8d66c1afecd..33b602bb578 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -805,7 +805,7 @@ static bConstraintTypeInfo CTI_CONSTRNAME = { /* This function should be used for the get_target_matrix member of all * constraints that are not picky about what happens to their target matrix. */ -static void default_get_tarmat(struct Depsgraph *UNUSED(depsgraph), +static void default_get_tarmat(Depsgraph *UNUSED(depsgraph), bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, @@ -828,7 +828,7 @@ static void default_get_tarmat(struct Depsgraph *UNUSED(depsgraph), /* This is a variant that extracts full transformation from B-Bone segments. */ -static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph), +static void default_get_tarmat_full_bbone(Depsgraph *UNUSED(depsgraph), bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, @@ -1359,7 +1359,7 @@ static void kinematic_flush_tars(bConstraint *con, ListBase *list, bool no_copy) } } -static void kinematic_get_tarmat(struct Depsgraph *UNUSED(depsgraph), +static void kinematic_get_tarmat(Depsgraph *UNUSED(depsgraph), bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, @@ -1459,7 +1459,7 @@ static void followpath_flush_tars(bConstraint *con, ListBase *list, bool no_copy } } -static void followpath_get_tarmat(struct Depsgraph *UNUSED(depsgraph), +static void followpath_get_tarmat(Depsgraph *UNUSED(depsgraph), bConstraint *con, bConstraintOb *UNUSED(cob), bConstraintTarget *ct, @@ -2432,7 +2432,7 @@ static void pycon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userd } /* Whether this approach is maintained remains to be seen (aligorith) */ -static void pycon_get_tarmat(struct Depsgraph *UNUSED(depsgraph), +static void pycon_get_tarmat(Depsgraph *UNUSED(depsgraph), bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, @@ -2547,7 +2547,7 @@ static void armdef_id_looper(bConstraint *con, ConstraintIDFunc func, void *user } /* Compute the world space pose matrix of the target bone. */ -static void armdef_get_tarmat(struct Depsgraph *UNUSED(depsgraph), +static void armdef_get_tarmat(Depsgraph *UNUSED(depsgraph), bConstraint *UNUSED(con), bConstraintOb *UNUSED(cob), bConstraintTarget *ct, @@ -2807,7 +2807,7 @@ static void actcon_flush_tars(bConstraint *con, ListBase *list, bool no_copy) } } -static void actcon_get_tarmat(struct Depsgraph *depsgraph, +static void actcon_get_tarmat(Depsgraph *depsgraph, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, @@ -3807,7 +3807,7 @@ static void clampto_flush_tars(bConstraint *con, ListBase *list, bool no_copy) } } -static void clampto_get_tarmat(struct Depsgraph *UNUSED(depsgraph), +static void clampto_get_tarmat(Depsgraph *UNUSED(depsgraph), bConstraint *UNUSED(con), bConstraintOb *UNUSED(cob), bConstraintTarget *ct, @@ -4208,7 +4208,7 @@ static void shrinkwrap_flush_tars(bConstraint *con, ListBase *list, bool no_copy } } -static void shrinkwrap_get_tarmat(struct Depsgraph *UNUSED(depsgraph), +static void shrinkwrap_get_tarmat(Depsgraph *UNUSED(depsgraph), bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, @@ -4629,7 +4629,7 @@ static void splineik_flush_tars(bConstraint *con, ListBase *list, bool no_copy) } } -static void splineik_get_tarmat(struct Depsgraph *UNUSED(depsgraph), +static void splineik_get_tarmat(Depsgraph *UNUSED(depsgraph), bConstraint *UNUSED(con), bConstraintOb *UNUSED(cob), bConstraintTarget *ct, @@ -5848,7 +5848,7 @@ static bConstraint *add_new_constraint(Object *ob, return con; } -bool BKE_constraint_target_uses_bbone(struct bConstraint *con, struct bConstraintTarget *ct) +bool BKE_constraint_target_uses_bbone(bConstraint *con, bConstraintTarget *ct) { if (ct->flag & CONSTRAINT_TAR_CUSTOM_SPACE) { return false; @@ -6158,7 +6158,7 @@ bool BKE_constraint_is_nonlocal_in_liboverride(const Object *ob, const bConstrai /* -------- Target-Matrix Stuff ------- */ -int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets) +int BKE_constraint_targets_get(bConstraint *con, ListBase *r_targets) { BLI_listbase_clear(r_targets); @@ -6187,7 +6187,7 @@ int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targe return count; } -void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy) +void BKE_constraint_targets_flush(bConstraint *con, ListBase *targets, bool no_copy) { const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); @@ -6215,7 +6215,7 @@ void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targ } } -void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph, +void BKE_constraint_target_matrix_get(Depsgraph *depsgraph, Scene *scene, bConstraint *con, int index, @@ -6294,11 +6294,8 @@ void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph, } } -void BKE_constraint_targets_for_solving_get(struct Depsgraph *depsgraph, - bConstraint *con, - bConstraintOb *cob, - ListBase *targets, - float ctime) +void BKE_constraint_targets_for_solving_get( + Depsgraph *depsgraph, bConstraint *con, bConstraintOb *cob, ListBase *targets, float ctime) { const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con); @@ -6353,7 +6350,7 @@ void BKE_constraint_custom_object_space_init(bConstraintOb *cob, bConstraint *co /* ---------- Evaluation ----------- */ -void BKE_constraints_solve(struct Depsgraph *depsgraph, +void BKE_constraints_solve(Depsgraph *depsgraph, ListBase *conlist, bConstraintOb *cob, float ctime) diff --git a/source/blender/blenkernel/intern/context.cc b/source/blender/blenkernel/intern/context.cc index d3240d9a919..1d85f0559aa 100644 --- a/source/blender/blenkernel/intern/context.cc +++ b/source/blender/blenkernel/intern/context.cc @@ -79,7 +79,7 @@ struct bContext { /** * Store values to dynamically to create the string (called when a tool-tip is shown). */ - struct bContextPollMsgDyn_Params operator_poll_msg_dyn_params; + bContextPollMsgDyn_Params operator_poll_msg_dyn_params; } wm; /* data context */ diff --git a/source/blender/blenkernel/intern/crazyspace.cc b/source/blender/blenkernel/intern/crazyspace.cc index 3e267f1d18b..26286fdc074 100644 --- a/source/blender/blenkernel/intern/crazyspace.cc +++ b/source/blender/blenkernel/intern/crazyspace.cc @@ -86,7 +86,7 @@ static bool modifiers_disable_subsurf_temporary(Object *ob, const int cageIndex) return changed; } -float (*BKE_crazyspace_get_mapped_editverts(struct Depsgraph *depsgraph, Object *obedit))[3] +float (*BKE_crazyspace_get_mapped_editverts(Depsgraph *depsgraph, Object *obedit))[3] { Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); Object *obedit_eval = DEG_get_evaluated_object(depsgraph, obedit); @@ -236,7 +236,7 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me, MEM_freeN(vert_tag); } -int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgraph, +int BKE_crazyspace_get_first_deform_matrices_editbmesh(Depsgraph *depsgraph, Scene *scene, Object *ob, BMEditMesh *em, @@ -316,7 +316,7 @@ int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgra * * Similar to #BKE_object_eval_reset(), but does not modify the actual evaluated object. */ -static void crazyspace_init_object_for_eval(struct Depsgraph *depsgraph, +static void crazyspace_init_object_for_eval(Depsgraph *depsgraph, Object *object, Object *object_crazy) { @@ -356,7 +356,7 @@ static bool crazyspace_modifier_supports_deform(ModifierData *md) return (mti->type == eModifierTypeType_OnlyDeform); } -int BKE_sculpt_get_first_deform_matrices(struct Depsgraph *depsgraph, +int BKE_sculpt_get_first_deform_matrices(Depsgraph *depsgraph, Scene *scene, Object *object, float (**deformmats)[3][3], @@ -428,7 +428,7 @@ int BKE_sculpt_get_first_deform_matrices(struct Depsgraph *depsgraph, return modifiers_left_num; } -void BKE_crazyspace_build_sculpt(struct Depsgraph *depsgraph, +void BKE_crazyspace_build_sculpt(Depsgraph *depsgraph, Scene *scene, Object *object, float (**deformmats)[3][3], @@ -522,7 +522,7 @@ void BKE_crazyspace_build_sculpt(struct Depsgraph *depsgraph, void BKE_crazyspace_api_eval(Depsgraph *depsgraph, Scene *scene, Object *object, - struct ReportList *reports) + ReportList *reports) { if (object->runtime.crazyspace_deform_imats != nullptr || object->runtime.crazyspace_deform_cos != nullptr) @@ -546,8 +546,8 @@ void BKE_crazyspace_api_eval(Depsgraph *depsgraph, &object->runtime.crazyspace_deform_cos); } -void BKE_crazyspace_api_displacement_to_deformed(struct Object *object, - struct ReportList *reports, +void BKE_crazyspace_api_displacement_to_deformed(Object *object, + ReportList *reports, int vertex_index, float displacement[3], float r_displacement_deformed[3]) @@ -566,8 +566,8 @@ void BKE_crazyspace_api_displacement_to_deformed(struct Object *object, displacement); } -void BKE_crazyspace_api_displacement_to_original(struct Object *object, - struct ReportList *reports, +void BKE_crazyspace_api_displacement_to_original(Object *object, + ReportList *reports, int vertex_index, float displacement_deformed[3], float r_displacement[3]) diff --git a/source/blender/blenkernel/intern/cryptomatte.cc b/source/blender/blenkernel/intern/cryptomatte.cc index ab8e2c2b453..0dfeaf58f1e 100644 --- a/source/blender/blenkernel/intern/cryptomatte.cc +++ b/source/blender/blenkernel/intern/cryptomatte.cc @@ -144,26 +144,25 @@ CryptomatteSession *BKE_cryptomatte_init() return session; } -struct CryptomatteSession *BKE_cryptomatte_init_from_render_result( - const struct RenderResult *render_result) +CryptomatteSession *BKE_cryptomatte_init_from_render_result(const RenderResult *render_result) { CryptomatteSession *session = new CryptomatteSession(render_result->stamp_data); return session; } -struct CryptomatteSession *BKE_cryptomatte_init_from_scene(const struct Scene *scene) +CryptomatteSession *BKE_cryptomatte_init_from_scene(const Scene *scene) { CryptomatteSession *session = new CryptomatteSession(scene); return session; } -struct CryptomatteSession *BKE_cryptomatte_init_from_view_layer(const struct ViewLayer *view_layer) +CryptomatteSession *BKE_cryptomatte_init_from_view_layer(const ViewLayer *view_layer) { CryptomatteSession *session = new CryptomatteSession(view_layer); return session; } -void BKE_cryptomatte_add_layer(struct CryptomatteSession *session, const char *layer_name) +void BKE_cryptomatte_add_layer(CryptomatteSession *session, const char *layer_name) { session->add_layer(layer_name); } @@ -327,7 +326,7 @@ static void add_render_result_meta_data(RenderResult *render_result, value.data()); } -void BKE_cryptomatte_store_metadata(const struct CryptomatteSession *session, +void BKE_cryptomatte_store_metadata(const CryptomatteSession *session, RenderResult *render_result, const ViewLayer *view_layer) { diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index af6ceabf26a..0bf482812cb 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -1062,7 +1062,7 @@ BPoint *BKE_nurb_bpoint_get_prev(Nurb *nu, BPoint *bp) return bp_prev; } -void BKE_nurb_bezt_calc_normal(struct Nurb * /*nu*/, BezTriple *bezt, float r_normal[3]) +void BKE_nurb_bezt_calc_normal(Nurb * /*nu*/, BezTriple *bezt, float r_normal[3]) { /* calculate the axis matrix from the spline */ float dir_prev[3], dir_next[3]; @@ -1077,7 +1077,7 @@ void BKE_nurb_bezt_calc_normal(struct Nurb * /*nu*/, BezTriple *bezt, float r_no normalize_v3(r_normal); } -void BKE_nurb_bezt_calc_plane(struct Nurb *nu, BezTriple *bezt, float r_plane[3]) +void BKE_nurb_bezt_calc_plane(Nurb *nu, BezTriple *bezt, float r_plane[3]) { float dir_prev[3], dir_next[3]; @@ -1114,7 +1114,7 @@ void BKE_nurb_bezt_calc_plane(struct Nurb *nu, BezTriple *bezt, float r_plane[3] normalize_v3(r_plane); } -void BKE_nurb_bpoint_calc_normal(struct Nurb *nu, BPoint *bp, float r_normal[3]) +void BKE_nurb_bpoint_calc_normal(Nurb *nu, BPoint *bp, float r_normal[3]) { BPoint *bp_prev = BKE_nurb_bpoint_get_prev(nu, bp); BPoint *bp_next = BKE_nurb_bpoint_get_next(nu, bp); @@ -1137,7 +1137,7 @@ void BKE_nurb_bpoint_calc_normal(struct Nurb *nu, BPoint *bp, float r_normal[3]) normalize_v3(r_normal); } -void BKE_nurb_bpoint_calc_plane(struct Nurb *nu, BPoint *bp, float r_plane[3]) +void BKE_nurb_bpoint_calc_plane(Nurb *nu, BPoint *bp, float r_plane[3]) { BPoint *bp_prev = BKE_nurb_bpoint_get_prev(nu, bp); BPoint *bp_next = BKE_nurb_bpoint_get_next(nu, bp); @@ -1904,7 +1904,7 @@ struct BevelSort { static int vergxcobev(const void *a1, const void *a2) { - const struct BevelSort *x1 = (BevelSort *)a1, *x2 = (BevelSort *)a2; + const BevelSort *x1 = (BevelSort *)a1, *x2 = (BevelSort *)a2; if (x1->left > x2->left) { return 1; @@ -2598,7 +2598,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_ const float threshold = 0.00001f; float min, inp; float *seglen = nullptr; - struct BevelSort *sortdata, *sd, *sd1; + BevelSort *sortdata, *sd, *sd1; int a, b, nr, poly, resolu = 0, len = 0, segcount; int *segbevcount; bool do_tilt, do_radius, do_weight; @@ -2991,7 +2991,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_ /* find extreme left points, also test (turning) direction */ if (poly > 0) { - sd = sortdata = (BevelSort *)MEM_malloc_arrayN(poly, sizeof(struct BevelSort), __func__); + sd = sortdata = (BevelSort *)MEM_malloc_arrayN(poly, sizeof(BevelSort), __func__); LISTBASE_FOREACH (BevList *, bl, bev) { if (bl->poly > 0) { BevPoint *bevp; @@ -3038,7 +3038,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_ sd++; } } - qsort(sortdata, poly, sizeof(struct BevelSort), vergxcobev); + qsort(sortdata, poly, sizeof(BevelSort), vergxcobev); sd = sortdata + 1; for (a = 1; a < poly; a++, sd++) { @@ -4826,7 +4826,7 @@ bool BKE_nurb_check_valid_uv(const Nurb *nu) return true; } -bool BKE_nurb_order_clamp_u(struct Nurb *nu) +bool BKE_nurb_order_clamp_u(Nurb *nu) { bool changed = false; if (nu->pntsu < nu->orderu) { @@ -4836,7 +4836,7 @@ bool BKE_nurb_order_clamp_u(struct Nurb *nu) return changed; } -bool BKE_nurb_order_clamp_v(struct Nurb *nu) +bool BKE_nurb_order_clamp_v(Nurb *nu) { bool changed = false; if (nu->pntsv < nu->orderv) { @@ -5317,7 +5317,7 @@ void BKE_curve_material_index_remove(Curve *cu, int index) const int curvetype = BKE_curve_type_get(cu); if (curvetype == OB_FONT) { - struct CharInfo *info = cu->strinfo; + CharInfo *info = cu->strinfo; for (int i = cu->len_char32 - 1; i >= 0; i--, info++) { if (info->mat_nr && info->mat_nr >= index) { info->mat_nr--; @@ -5338,7 +5338,7 @@ bool BKE_curve_material_index_used(const Curve *cu, int index) const int curvetype = BKE_curve_type_get(cu); if (curvetype == OB_FONT) { - const struct CharInfo *info = cu->strinfo; + const CharInfo *info = cu->strinfo; for (int i = cu->len_char32 - 1; i >= 0; i--, info++) { if (info->mat_nr == index) { return true; @@ -5361,7 +5361,7 @@ void BKE_curve_material_index_clear(Curve *cu) const int curvetype = BKE_curve_type_get(cu); if (curvetype == OB_FONT) { - struct CharInfo *info = cu->strinfo; + CharInfo *info = cu->strinfo; for (int i = cu->len_char32 - 1; i >= 0; i--, info++) { info->mat_nr = 0; } @@ -5419,7 +5419,7 @@ void BKE_curve_material_remap(Curve *cu, const uint *remap, uint remap_len) ((void)0) if (curvetype == OB_FONT) { - struct CharInfo *strinfo; + CharInfo *strinfo; int charinfo_len, i; if (cu->editfont) { @@ -5467,9 +5467,7 @@ void BKE_curve_smooth_flag_set(Curve *cu, const bool use_smooth) } } -void BKE_curve_rect_from_textbox(const struct Curve *cu, - const struct TextBox *tb, - struct rctf *r_rect) +void BKE_curve_rect_from_textbox(const Curve *cu, const TextBox *tb, rctf *r_rect) { r_rect->xmin = cu->xof + tb->x; r_rect->ymax = cu->yof + tb->y + cu->fsize; diff --git a/source/blender/blenkernel/intern/curveprofile.cc b/source/blender/blenkernel/intern/curveprofile.cc index 477a98a60de..a0b99f44cae 100644 --- a/source/blender/blenkernel/intern/curveprofile.cc +++ b/source/blender/blenkernel/intern/curveprofile.cc @@ -29,7 +29,7 @@ /** \name Data Handling * \{ */ -struct CurveProfile *BKE_curveprofile_add(eCurveProfilePresets preset) +CurveProfile *BKE_curveprofile_add(eCurveProfilePresets preset) { CurveProfile *profile = MEM_cnew(__func__); @@ -80,13 +80,13 @@ CurveProfile *BKE_curveprofile_copy(const CurveProfile *profile) return nullptr; } -void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile) +void BKE_curveprofile_blend_write(BlendWriter *writer, const CurveProfile *profile) { BLO_write_struct(writer, CurveProfile, profile); BLO_write_struct_array(writer, CurveProfilePoint, profile->path_len, profile->path); } -void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurveProfile *profile) +void BKE_curveprofile_blend_read(BlendDataReader *reader, CurveProfile *profile) { BLO_read_data_address(reader, &profile->path); profile->table = nullptr; @@ -106,7 +106,7 @@ void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurvePro /** \name Editing * \{ */ -bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point, +bool BKE_curveprofile_move_handle(CurveProfilePoint *point, const bool handle_1, const bool snap, const float delta[2]) @@ -146,8 +146,8 @@ bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point, return false; } -bool BKE_curveprofile_move_point(struct CurveProfile *profile, - struct CurveProfilePoint *point, +bool BKE_curveprofile_move_point(CurveProfile *profile, + CurveProfilePoint *point, const bool snap, const float delta[2]) { diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc index 5f679d4295c..dc9706dfe6b 100644 --- a/source/blender/blenkernel/intern/curves.cc +++ b/source/blender/blenkernel/intern/curves.cc @@ -228,8 +228,8 @@ Curves *BKE_curves_copy_for_eval(Curves *curves_src) BKE_id_copy_ex(nullptr, &curves_src->id, nullptr, LIB_ID_COPY_LOCALIZE)); } -static void curves_evaluate_modifiers(struct Depsgraph *depsgraph, - struct Scene *scene, +static void curves_evaluate_modifiers(Depsgraph *depsgraph, + Scene *scene, Object *object, GeometrySet &geometry_set) { @@ -265,7 +265,7 @@ static void curves_evaluate_modifiers(struct Depsgraph *depsgraph, } } -void BKE_curves_data_update(struct Depsgraph *depsgraph, struct Scene *scene, Object *object) +void BKE_curves_data_update(Depsgraph *depsgraph, Scene *scene, Object *object) { /* Free any evaluated data and restore original data. */ BKE_object_free_derived_caches(object); diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 64fe817b04f..dc2397b9b02 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -244,7 +244,7 @@ static void layerInterp_mdeformvert(const void **sources, /* A single linked list of #MDeformWeight's. * use this to avoid double allocations (which #LinkNode would do). */ struct MDeformWeight_Link { - struct MDeformWeight_Link *next; + MDeformWeight_Link *next; MDeformWeight dw; }; @@ -2451,8 +2451,8 @@ void CustomData_copy(const CustomData *source, CustomData *dest, eCustomDataMask CustomData_merge(source, dest, mask, totelem); } -void CustomData_copy_layout(const struct CustomData *source, - struct CustomData *dest, +void CustomData_copy_layout(const CustomData *source, + CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem) @@ -2825,7 +2825,7 @@ void CustomData_clear_layer_flag(CustomData *data, const eCustomDataType type, c } } -bool CustomData_layer_is_anonymous(const struct CustomData *data, eCustomDataType type, int n) +bool CustomData_layer_is_anonymous(const CustomData *data, eCustomDataType type, int n) { const int layer_index = CustomData_get_layer_index_n(data, type, n); diff --git a/source/blender/blenkernel/intern/data_transfer.cc b/source/blender/blenkernel/intern/data_transfer.cc index a256b4da38f..d224f73af9f 100644 --- a/source/blender/blenkernel/intern/data_transfer.cc +++ b/source/blender/blenkernel/intern/data_transfer.cc @@ -1170,7 +1170,7 @@ static bool data_transfer_layersmapping_generate(ListBase *r_map, return false; } -void BKE_object_data_transfer_layout(struct Depsgraph *depsgraph, +void BKE_object_data_transfer_layout(Depsgraph *depsgraph, Object *ob_src, Object *ob_dst, const int data_types, @@ -1314,7 +1314,7 @@ void BKE_object_data_transfer_layout(struct Depsgraph *depsgraph, } } -bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph, +bool BKE_object_data_transfer_ex(Depsgraph *depsgraph, Object *ob_src, Object *ob_dst, Mesh *me_dst, @@ -1809,7 +1809,7 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph, #undef DATAMAX } -bool BKE_object_data_transfer_mesh(struct Depsgraph *depsgraph, +bool BKE_object_data_transfer_mesh(Depsgraph *depsgraph, Object *ob_src, Object *ob_dst, const int data_types, diff --git a/source/blender/blenkernel/intern/dynamicpaint.cc b/source/blender/blenkernel/intern/dynamicpaint.cc index d6848c1891c..3005022fa35 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.cc +++ b/source/blender/blenkernel/intern/dynamicpaint.cc @@ -1653,7 +1653,7 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface /* For vertex surface loop through `looptris` and find UV color * that provides highest alpha. */ if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) { - struct ImagePool *pool = BKE_image_pool_new(); + ImagePool *pool = BKE_image_pool_new(); DynamicPaintSetInitColorData data{}; data.surface = surface; diff --git a/source/blender/blenkernel/intern/editmesh_bvh.c b/source/blender/blenkernel/intern/editmesh_bvh.c index 5508ac8c879..91367e63fc0 100644 --- a/source/blender/blenkernel/intern/editmesh_bvh.c +++ b/source/blender/blenkernel/intern/editmesh_bvh.c @@ -482,9 +482,7 @@ static void bmbvh_find_face_closest_cb(void *userdata, } } -struct BMFace *BKE_bmbvh_find_face_closest(BMBVHTree *bmtree, - const float co[3], - const float dist_max) +BMFace *BKE_bmbvh_find_face_closest(BMBVHTree *bmtree, const float co[3], const float dist_max) { BVHTreeNearest hit; struct FaceSearchUserData bmcb_data; diff --git a/source/blender/blenkernel/intern/editmesh_cache.cc b/source/blender/blenkernel/intern/editmesh_cache.cc index d255eacf4ca..86a7b354c65 100644 --- a/source/blender/blenkernel/intern/editmesh_cache.cc +++ b/source/blender/blenkernel/intern/editmesh_cache.cc @@ -113,10 +113,7 @@ void BKE_editmesh_cache_ensure_poly_centers(BMEditMesh *em, EditMeshData *emd) /** \name Calculate Min/Max * \{ */ -bool BKE_editmesh_cache_calc_minmax(struct BMEditMesh *em, - struct EditMeshData *emd, - float min[3], - float max[3]) +bool BKE_editmesh_cache_calc_minmax(BMEditMesh *em, EditMeshData *emd, float min[3], float max[3]) { using namespace blender; BMesh *bm = em->bm; diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 3582a97a42c..02452593012 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -108,7 +108,7 @@ PartDeflect *BKE_partdeflect_new(int type) /************************ PARTICLES ***************************/ -PartDeflect *BKE_partdeflect_copy(const struct PartDeflect *pd_src) +PartDeflect *BKE_partdeflect_copy(const PartDeflect *pd_src) { if (pd_src == NULL) { return NULL; @@ -133,7 +133,7 @@ void BKE_partdeflect_free(PartDeflect *pd) /******************** EFFECTOR RELATIONS ***********************/ -static void precalculate_effector(struct Depsgraph *depsgraph, EffectorCache *eff) +static void precalculate_effector(Depsgraph *depsgraph, EffectorCache *eff) { float ctime = DEG_get_ctime(depsgraph); uint cfra = (uint)(ctime >= 0 ? ctime : -ctime); @@ -535,7 +535,7 @@ static float eff_calc_visibility(ListBase *colliders, } /* Noise function for wind e.g. */ -static float wind_func(struct RNG *rng, float strength) +static float wind_func(RNG *rng, float strength) { int random = (BLI_rng_get_int(rng) + 1) % 128; /* max 2357 */ float force = BLI_rng_get_float(rng) + 1.0f; diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index bb5fa8cef0a..4668c35a631 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -906,7 +906,7 @@ void BKE_fcurve_keyframe_move_time_with_handles(BezTriple *keyframe, const float keyframe->vec[2][0] += time_delta; } -void BKE_fcurve_keyframe_move_value_with_handles(struct BezTriple *keyframe, const float new_value) +void BKE_fcurve_keyframe_move_value_with_handles(BezTriple *keyframe, const float new_value) { const float value_delta = new_value - keyframe->vec[1][1]; keyframe->vec[0][1] += value_delta; @@ -1624,9 +1624,9 @@ static void fcurve_bezt_free(FCurve *fcu) fcu->totvert = 0; } -bool BKE_fcurve_bezt_subdivide_handles(struct BezTriple *bezt, - struct BezTriple *prev, - struct BezTriple *next, +bool BKE_fcurve_bezt_subdivide_handles(BezTriple *bezt, + BezTriple *prev, + BezTriple *next, float *r_pdelta) { /* The four points that make up this section of the Bezier curve. */ @@ -1686,7 +1686,7 @@ bool BKE_fcurve_bezt_subdivide_handles(struct BezTriple *bezt, return true; } -void BKE_fcurve_bezt_shrink(struct FCurve *fcu, const int new_totvert) +void BKE_fcurve_bezt_shrink(FCurve *fcu, const int new_totvert) { BLI_assert(new_totvert >= 0); BLI_assert(new_totvert <= fcu->totvert); diff --git a/source/blender/blenkernel/intern/gpencil_geom_legacy.cc b/source/blender/blenkernel/intern/gpencil_geom_legacy.cc index ad10fb51633..c4a0bb7f21f 100644 --- a/source/blender/blenkernel/intern/gpencil_geom_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_geom_legacy.cc @@ -1250,11 +1250,8 @@ bool BKE_gpencil_stroke_smooth_thickness( /** \name Stroke Smooth UV * \{ */ -bool BKE_gpencil_stroke_smooth_uv(struct bGPDstroke *gps, - int point_index, - float influence, - int iterations, - struct bGPDstroke *r_gps) +bool BKE_gpencil_stroke_smooth_uv( + bGPDstroke *gps, int point_index, float influence, int iterations, bGPDstroke *r_gps) { /* If nothing to do, return early */ if (gps->totpoints <= 2 || iterations <= 0) { @@ -1708,7 +1705,7 @@ float BKE_gpencil_stroke_length(const bGPDstroke *gps, bool use_3d) return total_length; } -float BKE_gpencil_stroke_segment_length(const struct bGPDstroke *gps, +float BKE_gpencil_stroke_segment_length(const bGPDstroke *gps, const int start_index, const int end_index, bool use_3d) @@ -3657,11 +3654,11 @@ void BKE_gpencil_stroke_copy_to_keyframes( * \{ */ struct tSamplePoint { - struct tSamplePoint *next, *prev; + tSamplePoint *next, *prev; float x, y, z; float pressure, strength, time; float vertex_color[4]; - struct MDeformWeight *dw; + MDeformWeight *dw; int totweight; }; @@ -3873,7 +3870,7 @@ void BKE_gpencil_stroke_from_view_space(bGPDstroke *gps, * \{ */ struct tPerimeterPoint { - struct tPerimeterPoint *next, *prev; + tPerimeterPoint *next, *prev; float x, y, z; }; diff --git a/source/blender/blenkernel/intern/gpencil_legacy.c b/source/blender/blenkernel/intern/gpencil_legacy.c index 76847a10cf7..44527a7487a 100644 --- a/source/blender/blenkernel/intern/gpencil_legacy.c +++ b/source/blender/blenkernel/intern/gpencil_legacy.c @@ -918,7 +918,7 @@ bGPDframe *BKE_gpencil_frame_duplicate(const bGPDframe *gpf_src, const bool dup_ return gpf_dst; } -void BKE_gpencil_frame_copy_strokes(bGPDframe *gpf_src, struct bGPDframe *gpf_dst) +void BKE_gpencil_frame_copy_strokes(bGPDframe *gpf_src, bGPDframe *gpf_dst) { bGPDstroke *gps_dst = NULL; /* error checking */ @@ -1467,8 +1467,8 @@ void BKE_gpencil_layer_mask_remove_ref(bGPdata *gpd, const char *name) static int gpencil_cb_sort_masks(const void *arg1, const void *arg2) { /* sort is inverted as layer list. */ - const struct bGPDlayer_Mask *mask1 = arg1; - const struct bGPDlayer_Mask *mask2 = arg2; + const bGPDlayer_Mask *mask1 = arg1; + const bGPDlayer_Mask *mask2 = arg2; int val = 0; if (mask1->sort_index < mask2->sort_index) { @@ -1550,7 +1550,7 @@ static int gpencil_cb_cmp_frame(void *thunk, const void *a, const void *b) return 0; } -void BKE_gpencil_layer_frames_sort(struct bGPDlayer *gpl, bool *r_has_duplicate_frames) +void BKE_gpencil_layer_frames_sort(bGPDlayer *gpl, bool *r_has_duplicate_frames) { BLI_listbase_sort_r(&gpl->frames, gpencil_cb_cmp_frame, r_has_duplicate_frames); } @@ -1977,7 +1977,7 @@ bool BKE_gpencil_material_index_used(bGPdata *gpd, int index) return false; } -void BKE_gpencil_material_remap(struct bGPdata *gpd, const uint *remap, uint remap_len) +void BKE_gpencil_material_remap(bGPdata *gpd, const uint *remap, uint remap_len) { const short remap_len_short = (short)remap_len; @@ -2268,7 +2268,7 @@ void BKE_gpencil_palette_ensure(Main *bmain, Scene *scene) /* Try to find the default palette. */ const char *palette_id = "Palette"; - struct Palette *palette = BLI_findstring(&bmain->palettes, palette_id, offsetof(ID, name) + 2); + Palette *palette = BLI_findstring(&bmain->palettes, palette_id, offsetof(ID, name) + 2); if (palette == NULL) { /* Fall back to the first palette. */ @@ -2633,8 +2633,8 @@ void BKE_gpencil_visible_stroke_advanced_iter(ViewLayer *view_layer, } } -void BKE_gpencil_frame_original_pointers_update(const struct bGPDframe *gpf_orig, - const struct bGPDframe *gpf_eval) +void BKE_gpencil_frame_original_pointers_update(const bGPDframe *gpf_orig, + const bGPDframe *gpf_eval) { bGPDstroke *gps_eval = gpf_eval->strokes.first; LISTBASE_FOREACH (bGPDstroke *, gps_orig, &gpf_orig->strokes) { @@ -2661,8 +2661,8 @@ void BKE_gpencil_frame_original_pointers_update(const struct bGPDframe *gpf_orig } } -void BKE_gpencil_layer_original_pointers_update(const struct bGPDlayer *gpl_orig, - const struct bGPDlayer *gpl_eval) +void BKE_gpencil_layer_original_pointers_update(const bGPDlayer *gpl_orig, + const bGPDlayer *gpl_eval) { bGPDframe *gpf_eval = gpl_eval->frames.first; LISTBASE_FOREACH (bGPDframe *, gpf_orig, &gpl_orig->frames) { @@ -2863,7 +2863,7 @@ int BKE_gpencil_material_find_index_by_name_prefix(Object *ob, const char *name_ return -1; } -void BKE_gpencil_frame_selected_hash(bGPdata *gpd, struct GHash *r_list) +void BKE_gpencil_frame_selected_hash(bGPdata *gpd, GHash *r_list) { const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd); bGPDlayer *gpl = BKE_gpencil_layer_active_get(gpd); diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc index 15daf20d2a6..31c975a8f52 100644 --- a/source/blender/blenkernel/intern/icons.cc +++ b/source/blender/blenkernel/intern/icons.cc @@ -79,7 +79,7 @@ static GHash *gCachedPreviews = nullptr; /* Queue of icons for deferred deletion. */ struct DeferredIconDeleteNode { - struct DeferredIconDeleteNode *next; + DeferredIconDeleteNode *next; int icon_id; }; /* Protected by gIconMutex. */ @@ -93,7 +93,7 @@ static void icon_free(void *val) } if (icon->obj_type == ICON_DATA_GEOM) { - struct Icon_Geom *obj = (struct Icon_Geom *)icon->obj; + Icon_Geom *obj = (Icon_Geom *)icon->obj; if (obj->mem) { /* coords & colors are part of this memory. */ MEM_freeN((void *)obj->mem); @@ -134,7 +134,7 @@ static void icon_free_data(int icon_id, Icon *icon) ((bGPDlayer *)(icon->obj))->runtime.icon_id = 0; break; case ICON_DATA_GEOM: - ((struct Icon_Geom *)(icon->obj))->icon_id = 0; + ((Icon_Geom *)(icon->obj))->icon_id = 0; break; case ICON_DATA_STUDIOLIGHT: { StudioLight *sl = (StudioLight *)icon->obj; @@ -293,7 +293,7 @@ void BKE_previewimg_free(PreviewImage **prv) } } -void BKE_previewimg_clear_single(struct PreviewImage *prv, enum eIconSizes size) +void BKE_previewimg_clear_single(PreviewImage *prv, enum eIconSizes size) { MEM_SAFE_FREE(prv->rect[size]); if (prv->gputexture[size]) { @@ -305,7 +305,7 @@ void BKE_previewimg_clear_single(struct PreviewImage *prv, enum eIconSizes size) prv->changed_timestamp[size] = 0; } -void BKE_previewimg_clear(struct PreviewImage *prv) +void BKE_previewimg_clear(PreviewImage *prv) { for (int i = 0; i < NUM_ICON_SIZES; i++) { BKE_previewimg_clear_single(prv, (eIconSizes)i); @@ -700,7 +700,7 @@ static Icon *icon_create(int icon_id, int obj_type, void *obj) return new_icon; } -static int icon_id_ensure_create_icon(struct ID *id) +static int icon_id_ensure_create_icon(ID *id) { BLI_assert(BLI_thread_is_main()); @@ -711,7 +711,7 @@ static int icon_id_ensure_create_icon(struct ID *id) return id->icon_id; } -int BKE_icon_id_ensure(struct ID *id) +int BKE_icon_id_ensure(ID *id) { /* Never handle icons in non-main thread! */ BLI_assert(BLI_thread_is_main()); @@ -860,7 +860,7 @@ Icon *BKE_icon_get(const int icon_id) return icon; } -void BKE_icon_set(const int icon_id, struct Icon *icon) +void BKE_icon_set(const int icon_id, Icon *icon) { void **val_p; @@ -882,7 +882,7 @@ static void icon_add_to_deferred_delete_queue(int icon_id) BLI_linklist_lockfree_insert(&g_icon_delete_queue, (LockfreeLinkNode *)node); } -void BKE_icon_id_delete(struct ID *id) +void BKE_icon_id_delete(ID *id) { const int icon_id = id->icon_id; if (!icon_id) { @@ -945,7 +945,7 @@ bool BKE_icon_delete_unmanaged(const int icon_id) /** \name Geometry Icon * \{ */ -int BKE_icon_geom_ensure(struct Icon_Geom *geom) +int BKE_icon_geom_ensure(Icon_Geom *geom) { BLI_assert(BLI_thread_is_main()); @@ -961,7 +961,7 @@ int BKE_icon_geom_ensure(struct Icon_Geom *geom) return geom->icon_id; } -struct Icon_Geom *BKE_icon_geom_from_memory(uchar *data, size_t data_len) +Icon_Geom *BKE_icon_geom_from_memory(uchar *data, size_t data_len) { BLI_assert(BLI_thread_is_main()); if (data_len <= 8) { @@ -985,7 +985,7 @@ struct Icon_Geom *BKE_icon_geom_from_memory(uchar *data, size_t data_len) } p += 4; - struct Icon_Geom *geom = (struct Icon_Geom *)MEM_mallocN(sizeof(*geom), __func__); + Icon_Geom *geom = (Icon_Geom *)MEM_mallocN(sizeof(*geom), __func__); geom->coords_range[0] = int(*p++); geom->coords_range[1] = int(*p++); /* x, y ignored for now */ @@ -1000,7 +1000,7 @@ struct Icon_Geom *BKE_icon_geom_from_memory(uchar *data, size_t data_len) return geom; } -struct Icon_Geom *BKE_icon_geom_from_file(const char *filename) +Icon_Geom *BKE_icon_geom_from_file(const char *filename) { BLI_assert(BLI_thread_is_main()); size_t data_len; @@ -1017,7 +1017,7 @@ struct Icon_Geom *BKE_icon_geom_from_file(const char *filename) /** \name Studio Light Icon * \{ */ -int BKE_icon_ensure_studio_light(struct StudioLight *sl, int id_type) +int BKE_icon_ensure_studio_light(StudioLight *sl, int id_type) { int icon_id = get_next_free_id(); Icon *icon = icon_create(icon_id, ICON_DATA_STUDIOLIGHT, sl); diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 2ceb0ec709b..575d016b547 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -1511,7 +1511,7 @@ void IDP_BlendReadLib(BlendLibReader *reader, ID *self_id, IDProperty *prop) } } -void IDP_BlendReadExpand(struct BlendExpander *expander, IDProperty *prop) +void IDP_BlendReadExpand(BlendExpander *expander, IDProperty *prop) { if (!prop) { return; diff --git a/source/blender/blenkernel/intern/idprop_serialize.cc b/source/blender/blenkernel/intern/idprop_serialize.cc index 82d3a606308..70763c5f774 100644 --- a/source/blender/blenkernel/intern/idprop_serialize.cc +++ b/source/blender/blenkernel/intern/idprop_serialize.cc @@ -62,7 +62,7 @@ class IDPropertySerializer { * \brief create dictionary containing the given id_property. */ virtual std::shared_ptr idprop_to_dictionary( - const struct IDProperty *id_property) const = 0; + const IDProperty *id_property) const = 0; /** * \brief convert the entry to an id property. @@ -86,7 +86,7 @@ class IDPropertySerializer { * * Only fill the dictionary with common attributes (name, type). */ - std::shared_ptr create_dictionary(const struct IDProperty *id_property) const + std::shared_ptr create_dictionary(const IDProperty *id_property) const { std::shared_ptr result = std::make_shared(); DictionaryValue::Items &attributes = result->elements(); @@ -277,7 +277,7 @@ class IDPStringSerializer : public IDPropertySerializer { } std::shared_ptr idprop_to_dictionary( - const struct IDProperty *id_property) const override + const IDProperty *id_property) const override { std::shared_ptr result = create_dictionary(id_property); DictionaryValue::Items &attributes = result->elements(); @@ -317,7 +317,7 @@ class IDPIntSerializer : public IDPropertySerializer { } std::shared_ptr idprop_to_dictionary( - const struct IDProperty *id_property) const override + const IDProperty *id_property) const override { std::shared_ptr result = create_dictionary(id_property); DictionaryValue::Items &attributes = result->elements(); @@ -357,7 +357,7 @@ class IDPFloatSerializer : public IDPropertySerializer { } std::shared_ptr idprop_to_dictionary( - const struct IDProperty *id_property) const override + const IDProperty *id_property) const override { std::shared_ptr result = create_dictionary(id_property); DictionaryValue::Items &attributes = result->elements(); @@ -397,7 +397,7 @@ class IDPDoubleSerializer : public IDPropertySerializer { } std::shared_ptr idprop_to_dictionary( - const struct IDProperty *id_property) const override + const IDProperty *id_property) const override { std::shared_ptr result = create_dictionary(id_property); DictionaryValue::Items &attributes = result->elements(); @@ -437,7 +437,7 @@ class IDPArraySerializer : public IDPropertySerializer { } std::shared_ptr idprop_to_dictionary( - const struct IDProperty *id_property) const override + const IDProperty *id_property) const override { std::shared_ptr result = create_dictionary(id_property); DictionaryValue::Items &attributes = result->elements(); @@ -602,7 +602,7 @@ class IDPGroupSerializer : public IDPropertySerializer { } std::shared_ptr idprop_to_dictionary( - const struct IDProperty *id_property) const override + const IDProperty *id_property) const override { std::shared_ptr result = create_dictionary(id_property); DictionaryValue::Items &attributes = result->elements(); @@ -664,7 +664,7 @@ class IDPUnknownSerializer : public IDPropertySerializer { } std::shared_ptr idprop_to_dictionary( - const struct IDProperty * /*id_property*/) const override + const IDProperty * /*id_property*/) const override { BLI_assert_unreachable(); return nullptr; @@ -748,12 +748,12 @@ static const IDPropertySerializer &serializer_for(StringRef idprop_typename) /* -------------------------------------------------------------------- */ /** \name IDProperty to Value * \{ */ -std::unique_ptr convert_to_serialize_values(const struct IDProperty *properties) +std::unique_ptr convert_to_serialize_values(const IDProperty *properties) { BLI_assert(properties != nullptr); std::unique_ptr result = std::make_unique(); ArrayValue::Items &elements = result->elements(); - const struct IDProperty *current_property = properties; + const IDProperty *current_property = properties; while (current_property != nullptr) { const IDPropertySerializer &serializer = serializer_for( static_cast(current_property->type)); diff --git a/source/blender/blenkernel/intern/idtype.c b/source/blender/blenkernel/intern/idtype.c index ca52cc3f4a4..0cdeaf939ca 100644 --- a/source/blender/blenkernel/intern/idtype.c +++ b/source/blender/blenkernel/intern/idtype.c @@ -451,7 +451,7 @@ short BKE_idtype_idcode_iter_step(int *index) return (*index < ARRAY_SIZE(id_types)) ? BKE_idtype_idcode_from_index((*index)++) : 0; } -void BKE_idtype_id_foreach_cache(struct ID *id, +void BKE_idtype_id_foreach_cache(ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data) { diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index 4f60ed894ca..06973d9b599 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -116,7 +116,7 @@ static void copy_image_packedfiles(ListBase *lb_dst, const ListBase *lb_src); * \{ */ /** Reset runtime image fields when data-block is being initialized. */ -static void image_runtime_reset(struct Image *image) +static void image_runtime_reset(Image *image) { memset(&image->runtime, 0, sizeof(image->runtime)); image->runtime.cache_mutex = MEM_mallocN(sizeof(ThreadMutex), "image runtime cache_mutex"); @@ -124,7 +124,7 @@ static void image_runtime_reset(struct Image *image) } /** Reset runtime image fields when data-block is being copied. */ -static void image_runtime_reset_on_copy(struct Image *image) +static void image_runtime_reset_on_copy(Image *image) { image->runtime.cache_mutex = MEM_mallocN(sizeof(ThreadMutex), "image runtime cache_mutex"); BLI_mutex_init(static_cast(image->runtime.cache_mutex)); @@ -133,7 +133,7 @@ static void image_runtime_reset_on_copy(struct Image *image) image->runtime.partial_update_user = nullptr; } -static void image_runtime_free_data(struct Image *image) +static void image_runtime_free_data(Image *image) { BLI_mutex_end(static_cast(image->runtime.cache_mutex)); MEM_freeN(image->runtime.cache_mutex); @@ -243,7 +243,7 @@ static void image_foreach_cache(ID *id, auto gputexture_offset = [image](int target, int eye) { constexpr size_t base_offset = offsetof(Image, gputexture); - struct GPUTexture **first = &image->gputexture[0][0]; + GPUTexture **first = &image->gputexture[0][0]; const size_t array_offset = sizeof(*first) * (&image->gputexture[target][eye] - first); return base_offset + array_offset; }; @@ -545,7 +545,7 @@ static void imagecache_remove(Image *image, int index) IMB_moviecache_remove(image->cache, &key); } -static struct ImBuf *imagecache_get(Image *image, int index, bool *r_is_cached_empty) +static ImBuf *imagecache_get(Image *image, int index, bool *r_is_cached_empty) { if (image->cache) { ImageCacheKey key; @@ -754,7 +754,7 @@ void BKE_image_merge(Main *bmain, Image *dest, Image *source) BLI_mutex_lock(static_cast(dest->runtime.cache_mutex)); if (source->cache != nullptr) { - struct MovieCacheIter *iter; + MovieCacheIter *iter; iter = IMB_moviecacheIter_new(source->cache); while (!IMB_moviecacheIter_done(iter)) { ImBuf *ibuf = IMB_moviecacheIter_getImBuf(iter); @@ -968,7 +968,7 @@ int BKE_image_find_nearest_tile_with_offset(const Image *image, return tile_number_best; } -int BKE_image_find_nearest_tile(const struct Image *image, const float co[2]) +int BKE_image_find_nearest_tile(const Image *image, const float co[2]) { float uv_offset_dummy[2]; return BKE_image_find_nearest_tile_with_offset(image, co, uv_offset_dummy); @@ -1496,7 +1496,7 @@ static uintptr_t image_mem_size(Image *image) BLI_mutex_lock(static_cast(image->runtime.cache_mutex)); if (image->cache != nullptr) { - struct MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); + MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); while (!IMB_moviecacheIter_done(iter)) { ImBuf *ibuf = IMB_moviecacheIter_getImBuf(iter); @@ -1637,7 +1637,7 @@ void BKE_image_all_free_anim_ibufs(Main *bmain, int cfra) /* could allow access externally - 512 is for long names, * STAMP_NAME_SIZE is for id names, allowing them some room for description */ struct StampDataCustomField { - struct StampDataCustomField *next, *prev; + StampDataCustomField *next, *prev; /* TODO(sergey): Think of better size here, maybe dynamically allocated even. */ char key[512]; char *value; @@ -1677,7 +1677,7 @@ static void stampdata( const Scene *scene, Object *camera, StampData *stamp_data, int do_prefix, bool use_dynamic) { char text[256]; - struct tm *tl; + tm *tl; time_t t; if (scene->r.stamp & R_STAMP_FILENAME) { @@ -1950,17 +1950,17 @@ void BKE_image_stamp_buf(Scene *scene, int height, int channels) { - struct StampData stamp_data; + StampData stamp_data; int w, h, pad; int x, y, y_ofs; int h_fixed; const int mono = blf_mono_font_render; /* XXX */ - struct ColorManagedDisplay *display; + ColorManagedDisplay *display; const char *display_device; /* vars for calculating wordwrap */ struct { - struct ResultBLF info; + ResultBLF info; rcti rect; } wrap; @@ -2316,10 +2316,10 @@ void BKE_image_stamp_buf(Scene *scene, void BKE_render_result_stamp_info(Scene *scene, Object *camera, - struct RenderResult *rr, + RenderResult *rr, bool allocate_only) { - struct StampData *stamp_data; + StampData *stamp_data; if (!(scene && (scene->r.stamp & R_STAMP_ALL)) && !allocate_only) { return; @@ -2341,9 +2341,9 @@ void BKE_render_result_stamp_info(Scene *scene, } } -struct StampData *BKE_stamp_info_from_scene_static(const Scene *scene) +StampData *BKE_stamp_info_from_scene_static(const Scene *scene) { - struct StampData *stamp_data; + StampData *stamp_data; if (!(scene && (scene->r.stamp & R_STAMP_ALL))) { return nullptr; @@ -2388,7 +2388,7 @@ bool BKE_stamp_is_known_field(const char *field_name) } void BKE_stamp_info_callback(void *data, - struct StampData *stamp_data, + StampData *stamp_data, StampCallback callback, bool noskip) { @@ -2580,10 +2580,10 @@ int BKE_imbuf_write_as(ImBuf *ibuf, } int BKE_imbuf_write_stamp(const Scene *scene, - const struct RenderResult *rr, + const RenderResult *rr, ImBuf *ibuf, const char *filepath, - const struct ImageFormatData *imf) + const ImageFormatData *imf) { if (scene && scene->r.stamp & R_STAMP_ALL) { BKE_imbuf_stamp_info(rr, ibuf); @@ -2592,24 +2592,21 @@ int BKE_imbuf_write_stamp(const Scene *scene, return BKE_imbuf_write(ibuf, filepath, imf); } -struct anim *openanim_noload(const char *filepath, - int flags, - int streamindex, - char colorspace[IMA_MAX_SPACE]) +anim *openanim_noload(const char *filepath, + int flags, + int streamindex, + char colorspace[IMA_MAX_SPACE]) { - struct anim *anim; + anim *anim; anim = IMB_open_anim(filepath, flags, streamindex, colorspace); return anim; } -struct anim *openanim(const char *filepath, - int flags, - int streamindex, - char colorspace[IMA_MAX_SPACE]) +anim *openanim(const char *filepath, int flags, int streamindex, char colorspace[IMA_MAX_SPACE]) { - struct anim *anim; - struct ImBuf *ibuf; + anim *anim; + ImBuf *ibuf; anim = IMB_open_anim(filepath, flags, streamindex, colorspace); if (anim == nullptr) { @@ -3329,7 +3326,7 @@ bool BKE_image_get_tile_info(char *filepath, ListBase *tiles, int *r_tile_start, int max_udim = 0; int id; - struct direntry *dirs; + direntry *dirs; const uint dirs_num = BLI_filelist_dir_contents(dirname, &dirs); for (int i = 0; i < dirs_num; i++) { if (!(dirs[i].type & S_IFREG)) { @@ -3363,7 +3360,7 @@ bool BKE_image_get_tile_info(char *filepath, ListBase *tiles, int *r_tile_start, return false; } -ImageTile *BKE_image_add_tile(struct Image *ima, int tile_number, const char *label) +ImageTile *BKE_image_add_tile(Image *ima, int tile_number, const char *label) { if (ima->source != IMA_SRC_TILED) { return nullptr; @@ -3417,7 +3414,7 @@ ImageTile *BKE_image_add_tile(struct Image *ima, int tile_number, const char *la return tile; } -bool BKE_image_remove_tile(struct Image *ima, ImageTile *tile) +bool BKE_image_remove_tile(Image *ima, ImageTile *tile) { if (ima == nullptr || tile == nullptr || ima->source != IMA_SRC_TILED) { return false; @@ -3426,7 +3423,7 @@ bool BKE_image_remove_tile(struct Image *ima, ImageTile *tile) return image_remove_tile(ima, tile); } -void BKE_image_reassign_tile(struct Image *ima, ImageTile *tile, int new_tile_number) +void BKE_image_reassign_tile(Image *ima, ImageTile *tile, int new_tile_number) { if (ima == nullptr || tile == nullptr || ima->source != IMA_SRC_TILED) { return; @@ -3476,7 +3473,7 @@ static int tile_sort_cb(const void *a, const void *b) return (tile_a->tile_number > tile_b->tile_number) ? 1 : 0; } -void BKE_image_sort_tiles(struct Image *ima) +void BKE_image_sort_tiles(Image *ima) { if (ima == nullptr || ima->source != IMA_SRC_TILED) { return; @@ -3485,7 +3482,7 @@ void BKE_image_sort_tiles(struct Image *ima) BLI_listbase_sort(&ima->tiles, tile_sort_cb); } -bool BKE_image_fill_tile(struct Image *ima, ImageTile *tile) +bool BKE_image_fill_tile(Image *ima, ImageTile *tile) { if (ima == nullptr || tile == nullptr || ima->source != IMA_SRC_TILED) { return false; @@ -3555,7 +3552,7 @@ bool BKE_image_tile_filepath_exists(const char *filepath) char *udim_pattern = BKE_image_get_tile_strformat(filepath, &tile_format); bool found = false; - struct direntry *dirs; + direntry *dirs; const uint dirs_num = BLI_filelist_dir_contents(dirname, &dirs); for (int i = 0; i < dirs_num; i++) { if (!(dirs[i].type & S_IFREG)) { @@ -3795,7 +3792,7 @@ void BKE_image_release_renderresult(Scene *scene, Image *ima) } } -bool BKE_image_is_openexr(struct Image *ima) +bool BKE_image_is_openexr(Image *ima) { #ifdef WITH_OPENEXR if (ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_SEQUENCE, IMA_SRC_TILED)) { @@ -3962,7 +3959,7 @@ static int image_num_viewfiles(Image *ima) static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int entry, int frame) { - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; /* either we load from RenderResult, or we have to load a new one */ @@ -4008,7 +4005,7 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int e static ImBuf *load_movie_single(Image *ima, ImageUser *iuser, int frame, const int view_id) { - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; ImageAnim *ia; ia = static_cast(BLI_findlink(&ima->anims, view_id)); @@ -4061,7 +4058,7 @@ static ImBuf *load_movie_single(Image *ima, ImageUser *iuser, int frame, const i static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame) { - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; const bool is_multiview = BKE_image_is_multiview(ima); const int tot_viewfiles = image_num_viewfiles(ima); @@ -4118,7 +4115,7 @@ static ImBuf *load_image_single(Image *ima, bool *r_cache_ibuf) { char filepath[FILE_MAX]; - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; int flag = IB_rect | IB_multilayer; *r_cache_ibuf = true; @@ -4214,7 +4211,7 @@ static ImBuf *load_image_single(Image *ima, static ImBuf *image_load_image_file( Image *ima, ImageUser *iuser, int entry, int cfra, bool is_sequence) { - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; const bool is_multiview = BKE_image_is_multiview(ima); const bool is_tiled = (ima->source == IMA_SRC_TILED); const int tot_viewfiles = image_num_viewfiles(ima); @@ -4820,7 +4817,7 @@ bool BKE_image_has_ibuf(Image *ima, ImageUser *iuser) * \{ */ struct ImagePoolItem { - struct ImagePoolItem *next, *prev; + ImagePoolItem *next, *prev; Image *image; ImBuf *ibuf; int index; @@ -5230,7 +5227,7 @@ void BKE_image_get_aspect(Image *image, float *r_aspx, float *r_aspy) } } -uchar *BKE_image_get_pixels_for_frame(struct Image *image, int frame, int tile) +uchar *BKE_image_get_pixels_for_frame(Image *image, int frame, int tile) { ImageUser iuser; BKE_imageuser_default(&iuser); @@ -5260,7 +5257,7 @@ uchar *BKE_image_get_pixels_for_frame(struct Image *image, int frame, int tile) return pixels; } -float *BKE_image_get_float_pixels_for_frame(struct Image *image, int frame, int tile) +float *BKE_image_get_float_pixels_for_frame(Image *image, int frame, int tile) { ImageUser iuser; BKE_imageuser_default(&iuser); @@ -5329,7 +5326,7 @@ bool BKE_image_is_dirty_writable(Image *image, bool *r_is_writable) BLI_mutex_lock(static_cast(image->runtime.cache_mutex)); if (image->cache != nullptr) { - struct MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); + MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); while (!IMB_moviecacheIter_done(iter)) { ImBuf *ibuf = IMB_moviecacheIter_getImBuf(iter); @@ -5373,7 +5370,7 @@ void BKE_image_file_format_set(Image *image, int ftype, const ImbFormatOptions * { BLI_mutex_lock(static_cast(image->runtime.cache_mutex)); if (image->cache != nullptr) { - struct MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); + MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); while (!IMB_moviecacheIter_done(iter)) { ImBuf *ibuf = IMB_moviecacheIter_getImBuf(iter); @@ -5394,7 +5391,7 @@ bool BKE_image_has_loaded_ibuf(Image *image) BLI_mutex_lock(static_cast(image->runtime.cache_mutex)); if (image->cache != nullptr) { - struct MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); + MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); while (!IMB_moviecacheIter_done(iter)) { ImBuf *ibuf = IMB_moviecacheIter_getImBuf(iter); @@ -5418,7 +5415,7 @@ ImBuf *BKE_image_get_ibuf_with_name(Image *image, const char *filepath) BLI_mutex_lock(static_cast(image->runtime.cache_mutex)); if (image->cache != nullptr) { - struct MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); + MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); while (!IMB_moviecacheIter_done(iter)) { ImBuf *current_ibuf = IMB_moviecacheIter_getImBuf(iter); @@ -5442,7 +5439,7 @@ ImBuf *BKE_image_get_first_ibuf(Image *image) BLI_mutex_lock(static_cast(image->runtime.cache_mutex)); if (image->cache != nullptr) { - struct MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); + MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); while (!IMB_moviecacheIter_done(iter)) { ibuf = IMB_moviecacheIter_getImBuf(iter); diff --git a/source/blender/blenkernel/intern/image_gpu.cc b/source/blender/blenkernel/intern/image_gpu.cc index f2b99fd80e9..34445b65651 100644 --- a/source/blender/blenkernel/intern/image_gpu.cc +++ b/source/blender/blenkernel/intern/image_gpu.cc @@ -876,13 +876,8 @@ void BKE_image_update_gputexture(Image *ima, ImageUser *iuser, int x, int y, int BKE_image_release_ibuf(ima, ibuf, nullptr); } -void BKE_image_update_gputexture_delayed(struct Image *ima, - struct ImageTile *image_tile, - struct ImBuf *ibuf, - int x, - int y, - int w, - int h) +void BKE_image_update_gputexture_delayed( + Image *ima, ImageTile *image_tile, ImBuf *ibuf, int x, int y, int w, int h) { /* Check for full refresh. */ if (ibuf != nullptr && ima->source != IMA_SRC_TILED && x == 0 && y == 0 && w == ibuf->x && diff --git a/source/blender/blenkernel/intern/image_partial_update.cc b/source/blender/blenkernel/intern/image_partial_update.cc index e6c5ae2d7cc..6fde0e7e6b0 100644 --- a/source/blender/blenkernel/intern/image_partial_update.cc +++ b/source/blender/blenkernel/intern/image_partial_update.cc @@ -97,15 +97,15 @@ struct PartialUpdateUserImpl; /** * Wrap PartialUpdateUserImpl to its C-struct (PartialUpdateUser). */ -static struct PartialUpdateUser *wrap(PartialUpdateUserImpl *user) +static PartialUpdateUser *wrap(PartialUpdateUserImpl *user) { - return static_cast(static_cast(user)); + return static_cast(static_cast(user)); } /** * Unwrap the PartialUpdateUser C-struct to its CPP counterpart (PartialUpdateUserImpl). */ -static PartialUpdateUserImpl *unwrap(struct PartialUpdateUser *user) +static PartialUpdateUserImpl *unwrap(PartialUpdateUser *user) { return static_cast(static_cast(user)); } @@ -113,15 +113,15 @@ static PartialUpdateUserImpl *unwrap(struct PartialUpdateUser *user) /** * Wrap PartialUpdateRegisterImpl to its C-struct (PartialUpdateRegister). */ -static struct PartialUpdateRegister *wrap(PartialUpdateRegisterImpl *partial_update_register) +static PartialUpdateRegister *wrap(PartialUpdateRegisterImpl *partial_update_register) { - return static_cast(static_cast(partial_update_register)); + return static_cast(static_cast(partial_update_register)); } /** * Unwrap the PartialUpdateRegister C-struct to its CPP counterpart (PartialUpdateRegisterImpl). */ -static PartialUpdateRegisterImpl *unwrap(struct PartialUpdateRegister *partial_update_register) +static PartialUpdateRegisterImpl *unwrap(PartialUpdateRegister *partial_update_register) { return static_cast(static_cast(partial_update_register)); } @@ -543,7 +543,7 @@ extern "C" { using namespace blender::bke::image::partial_update; // TODO(jbakker): cleanup parameter. -struct PartialUpdateUser *BKE_image_partial_update_create(const struct Image *image) +PartialUpdateUser *BKE_image_partial_update_create(const Image *image) { PartialUpdateUserImpl *user_impl = MEM_new(__func__); diff --git a/source/blender/blenkernel/intern/keyconfig.c b/source/blender/blenkernel/intern/keyconfig.c index b7750d3a67e..39490846aea 100644 --- a/source/blender/blenkernel/intern/keyconfig.c +++ b/source/blender/blenkernel/intern/keyconfig.c @@ -188,7 +188,7 @@ void BKE_keyconfig_keymap_filter_item(wmKeyMap *keymap, } } -void BKE_keyconfig_pref_filter_items(struct UserDef *userdef, +void BKE_keyconfig_pref_filter_items(UserDef *userdef, const struct wmKeyConfigFilterItemParams *params, bool (*filter_fn)(wmKeyMapItem *kmi, void *user_data), void *user_data) diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 92bb9964d85..ead12ba7f8c 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -498,7 +498,7 @@ float (*BKE_lattice_vert_coords_alloc(const Lattice *lt, int *r_vert_len))[3] return vert_coords; } -void BKE_lattice_vert_coords_apply_with_mat4(struct Lattice *lt, +void BKE_lattice_vert_coords_apply_with_mat4(Lattice *lt, const float (*vert_coords)[3], const float mat[4][4]) { @@ -516,7 +516,7 @@ void BKE_lattice_vert_coords_apply(Lattice *lt, const float (*vert_coords)[3]) } } -void BKE_lattice_modifiers_calc(struct Depsgraph *depsgraph, Scene *scene, Object *ob) +void BKE_lattice_modifiers_calc(Depsgraph *depsgraph, Scene *scene, Object *ob) { BKE_object_free_derived_caches(ob); if (ob->runtime.curve_cache == NULL) { @@ -573,14 +573,14 @@ void BKE_lattice_modifiers_calc(struct Depsgraph *depsgraph, Scene *scene, Objec MEM_freeN(vert_coords); } -struct MDeformVert *BKE_lattice_deform_verts_get(const struct Object *oblatt) +MDeformVert *BKE_lattice_deform_verts_get(const Object *oblatt) { BLI_assert(oblatt->type == OB_LATTICE); Lattice *lt = BKE_object_get_lattice(oblatt); return lt->dvert; } -struct BPoint *BKE_lattice_active_point_get(Lattice *lt) +BPoint *BKE_lattice_active_point_get(Lattice *lt) { BLI_assert(GS(lt->id.name) == ID_LT); @@ -759,7 +759,7 @@ bool BKE_lattice_is_any_selected(const Lattice *lt) /* **** Depsgraph evaluation **** */ -void BKE_lattice_eval_geometry(struct Depsgraph *UNUSED(depsgraph), Lattice *UNUSED(latt)) {} +void BKE_lattice_eval_geometry(Depsgraph *UNUSED(depsgraph), Lattice *UNUSED(latt)) {} /* Draw Engine */ diff --git a/source/blender/blenkernel/intern/lattice_deform.c b/source/blender/blenkernel/intern/lattice_deform.c index fc9a2c7337c..88aac8e07e1 100644 --- a/source/blender/blenkernel/intern/lattice_deform.c +++ b/source/blender/blenkernel/intern/lattice_deform.c @@ -442,14 +442,14 @@ void BKE_lattice_deform_coords_with_mesh(const Object *ob_lattice, NULL); } -void BKE_lattice_deform_coords_with_editmesh(const struct Object *ob_lattice, - const struct Object *ob_target, +void BKE_lattice_deform_coords_with_editmesh(const Object *ob_lattice, + const Object *ob_target, float (*vert_coords)[3], const int vert_coords_len, const short flag, const char *defgrp_name, const float fac, - struct BMEditMesh *em_target) + BMEditMesh *em_target) { lattice_deform_coords_impl(ob_lattice, ob_target, diff --git a/source/blender/blenkernel/intern/layer_utils.c b/source/blender/blenkernel/intern/layer_utils.c index 6d793702669..93cfc032c47 100644 --- a/source/blender/blenkernel/intern/layer_utils.c +++ b/source/blender/blenkernel/intern/layer_utils.c @@ -28,8 +28,8 @@ * \{ */ Object **BKE_view_layer_array_selected_objects_params( - struct ViewLayer *view_layer, - const struct View3D *v3d, + ViewLayer *view_layer, + const View3D *v3d, uint *r_len, const struct ObjectsInViewLayerParams *params) { @@ -153,30 +153,30 @@ Object **BKE_view_layer_array_from_objects_in_mode_params(const Scene *scene, return (Object **)base_array; } -struct Object **BKE_view_layer_array_from_objects_in_edit_mode(const Scene *scene, - ViewLayer *view_layer, - const View3D *v3d, - uint *r_len) +Object **BKE_view_layer_array_from_objects_in_edit_mode(const Scene *scene, + ViewLayer *view_layer, + const View3D *v3d, + uint *r_len) { struct ObjectsInModeParams params = {0}; params.object_mode = OB_MODE_EDIT; return BKE_view_layer_array_from_objects_in_mode_params(scene, view_layer, v3d, r_len, ¶ms); } -struct Base **BKE_view_layer_array_from_bases_in_edit_mode(const Scene *scene, - ViewLayer *view_layer, - const View3D *v3d, - uint *r_len) +Base **BKE_view_layer_array_from_bases_in_edit_mode(const Scene *scene, + ViewLayer *view_layer, + const View3D *v3d, + uint *r_len) { struct ObjectsInModeParams params = {0}; params.object_mode = OB_MODE_EDIT; return BKE_view_layer_array_from_bases_in_mode_params(scene, view_layer, v3d, r_len, ¶ms); } -struct Object **BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Scene *scene, - ViewLayer *view_layer, - const View3D *v3d, - uint *r_len) +Object **BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Scene *scene, + ViewLayer *view_layer, + const View3D *v3d, + uint *r_len) { struct ObjectsInModeParams params = {0}; params.object_mode = OB_MODE_EDIT; @@ -184,10 +184,10 @@ struct Object **BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const return BKE_view_layer_array_from_objects_in_mode_params(scene, view_layer, v3d, r_len, ¶ms); } -struct Base **BKE_view_layer_array_from_bases_in_edit_mode_unique_data(const Scene *scene, - ViewLayer *view_layer, - const View3D *v3d, - uint *r_len) +Base **BKE_view_layer_array_from_bases_in_edit_mode_unique_data(const Scene *scene, + ViewLayer *view_layer, + const View3D *v3d, + uint *r_len) { struct ObjectsInModeParams params = {0}; params.object_mode = OB_MODE_EDIT; @@ -195,8 +195,10 @@ struct Base **BKE_view_layer_array_from_bases_in_edit_mode_unique_data(const Sce return BKE_view_layer_array_from_bases_in_mode_params(scene, view_layer, v3d, r_len, ¶ms); } -struct Object **BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs( - const Scene *scene, ViewLayer *view_layer, const View3D *v3d, uint *r_len) +Object **BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(const Scene *scene, + ViewLayer *view_layer, + const View3D *v3d, + uint *r_len) { struct ObjectsInModeParams params = {0}; params.object_mode = OB_MODE_EDIT; @@ -205,11 +207,11 @@ struct Object **BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_ return BKE_view_layer_array_from_objects_in_mode_params(scene, view_layer, v3d, r_len, ¶ms); } -struct Object **BKE_view_layer_array_from_objects_in_mode_unique_data(const Scene *scene, - ViewLayer *view_layer, - const View3D *v3d, - uint *r_len, - const eObjectMode mode) +Object **BKE_view_layer_array_from_objects_in_mode_unique_data(const Scene *scene, + ViewLayer *view_layer, + const View3D *v3d, + uint *r_len, + const eObjectMode mode) { struct ObjectsInModeParams params = {0}; params.object_mode = mode; @@ -272,9 +274,9 @@ bool BKE_view_layer_filter_edit_mesh_has_edges(const Object *ob, void *UNUSED(us return false; } -Object *BKE_view_layer_non_active_selected_object(const struct Scene *scene, - struct ViewLayer *view_layer, - const struct View3D *v3d) +Object *BKE_view_layer_non_active_selected_object(const Scene *scene, + ViewLayer *view_layer, + const View3D *v3d) { BKE_view_layer_synced_ensure(scene, view_layer); Object *ob_active = BKE_view_layer_active_object_get(view_layer); diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c index fa26763290b..2c8120dc5d9 100644 --- a/source/blender/blenkernel/intern/lib_id.c +++ b/source/blender/blenkernel/intern/lib_id.c @@ -453,7 +453,7 @@ void lib_id_copy_ensure_local(Main *bmain, const ID *old_id, ID *new_id, const i } void BKE_lib_id_make_local_generic_action_define( - struct Main *bmain, struct ID *id, int flags, bool *r_force_local, bool *r_force_copy) + Main *bmain, ID *id, int flags, bool *r_force_local, bool *r_force_copy) { bool force_local = (flags & LIB_ID_MAKELOCAL_FORCE_LOCAL) != 0; bool force_copy = (flags & LIB_ID_MAKELOCAL_FORCE_COPY) != 0; @@ -1075,17 +1075,14 @@ void BKE_main_id_tag_listbase(ListBase *lb, const int tag, const bool value) } } -void BKE_main_id_tag_idcode(struct Main *mainvar, - const short type, - const int tag, - const bool value) +void BKE_main_id_tag_idcode(Main *mainvar, const short type, const int tag, const bool value) { ListBase *lb = which_libbase(mainvar, type); BKE_main_id_tag_listbase(lb, tag, value); } -void BKE_main_id_tag_all(struct Main *mainvar, const int tag, const bool value) +void BKE_main_id_tag_all(Main *mainvar, const int tag, const bool value) { ListBase *lbarray[INDEX_ID_MAX]; int a; @@ -1461,16 +1458,14 @@ void *BKE_libblock_copy(Main *bmain, const ID *id) /* ***************** ID ************************ */ -ID *BKE_libblock_find_name(struct Main *bmain, const short type, const char *name) +ID *BKE_libblock_find_name(Main *bmain, const short type, const char *name) { ListBase *lb = which_libbase(bmain, type); BLI_assert(lb != NULL); return BLI_findstring(lb, name, offsetof(ID, name) + 2); } -struct ID *BKE_libblock_find_session_uuid(Main *bmain, - const short type, - const uint32_t session_uuid) +ID *BKE_libblock_find_session_uuid(Main *bmain, const short type, const uint32_t session_uuid) { ListBase *lb = which_libbase(bmain, type); BLI_assert(lb != NULL); @@ -1594,7 +1589,7 @@ void id_sort_by_name(ListBase *lb, ID *id, ID *id_sorting_hint) } bool BKE_id_new_name_validate( - struct Main *bmain, ListBase *lb, ID *id, const char *tname, const bool do_linked_data) + Main *bmain, ListBase *lb, ID *id, const char *tname, const bool do_linked_data) { bool result = false; char name[MAX_ID_NAME - 2]; @@ -1664,7 +1659,7 @@ static int id_refcount_recompute_callback(LibraryIDLinkCallbackData *cb_data) return IDWALK_RET_NOP; } -void BKE_main_id_refcount_recompute(struct Main *bmain, const bool do_linked_only) +void BKE_main_id_refcount_recompute(Main *bmain, const bool do_linked_only) { ID *id; @@ -2052,7 +2047,7 @@ void BKE_id_full_name_ui_prefix_get(char name[MAX_ID_FULL_NAME_UI], } } -char *BKE_id_to_unique_string_key(const struct ID *id) +char *BKE_id_to_unique_string_key(const ID *id) { if (!ID_IS_LINKED(id)) { return BLI_strdup(id->name); diff --git a/source/blender/blenkernel/intern/lib_id_remapper.cc b/source/blender/blenkernel/intern/lib_id_remapper.cc index 587399a93ab..b8c3bf6a1bc 100644 --- a/source/blender/blenkernel/intern/lib_id_remapper.cc +++ b/source/blender/blenkernel/intern/lib_id_remapper.cc @@ -151,13 +151,13 @@ void BKE_id_remapper_free(IDRemapper *id_remapper) MEM_delete(remapper); } -void BKE_id_remapper_clear(struct IDRemapper *id_remapper) +void BKE_id_remapper_clear(IDRemapper *id_remapper) { blender::bke::id::remapper::IDRemapper *remapper = unwrap(id_remapper); remapper->clear(); } -bool BKE_id_remapper_is_empty(const struct IDRemapper *id_remapper) +bool BKE_id_remapper_is_empty(const IDRemapper *id_remapper) { const blender::bke::id::remapper::IDRemapper *remapper = unwrap(id_remapper); return remapper->is_empty(); @@ -175,16 +175,16 @@ void BKE_id_remapper_add_overwrite(IDRemapper *id_remapper, ID *old_id, ID *new_ remapper->add_overwrite(old_id, new_id); } -bool BKE_id_remapper_has_mapping_for(const struct IDRemapper *id_remapper, uint64_t type_filter) +bool BKE_id_remapper_has_mapping_for(const IDRemapper *id_remapper, uint64_t type_filter) { const blender::bke::id::remapper::IDRemapper *remapper = unwrap(id_remapper); return remapper->contains_mappings_for_any(type_filter); } -IDRemapperApplyResult BKE_id_remapper_get_mapping_result(const struct IDRemapper *id_remapper, - struct ID *id, +IDRemapperApplyResult BKE_id_remapper_get_mapping_result(const IDRemapper *id_remapper, + ID *id, IDRemapperApplyOptions options, - const struct ID *id_self) + const ID *id_self) { const blender::bke::id::remapper::IDRemapper *remapper = unwrap(id_remapper); return remapper->get_mapping_result(id, options, id_self); @@ -212,7 +212,7 @@ IDRemapperApplyResult BKE_id_remapper_apply(const IDRemapper *id_remapper, return BKE_id_remapper_apply_ex(id_remapper, r_id_ptr, options, nullptr); } -void BKE_id_remapper_iter(const struct IDRemapper *id_remapper, +void BKE_id_remapper_iter(const IDRemapper *id_remapper, IDRemapperIterFunction func, void *user_data) { @@ -247,7 +247,7 @@ static void id_remapper_print_item_cb(ID *old_id, ID *new_id, void * /*user_data } } -void BKE_id_remapper_print(const struct IDRemapper *id_remapper) +void BKE_id_remapper_print(const IDRemapper *id_remapper) { BKE_id_remapper_iter(id_remapper, id_remapper_print_item_cb, nullptr); } diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index a0c1dccf2a6..f72d735b09d 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -352,7 +352,7 @@ bool BKE_lib_override_library_property_is_animated(const ID *id, { AnimData *anim_data = BKE_animdata_from_id(id); if (anim_data != nullptr) { - struct FCurve *fcurve; + FCurve *fcurve; char *index_token_start = const_cast( RNA_path_array_index_token_find(override_prop->rna_path, override_rna_prop)); if (index_token_start != nullptr) { diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c index 53d420c0bfc..afafdb08f42 100644 --- a/source/blender/blenkernel/intern/lib_query.c +++ b/source/blender/blenkernel/intern/lib_query.c @@ -86,12 +86,12 @@ void BKE_lib_query_foreachid_process(LibraryForeachIDData *data, ID **id_pp, int } const int callback_return = data->callback( - &(struct LibraryIDLinkCallbackData){.user_data = data->user_data, - .bmain = data->bmain, - .owner_id = data->owner_id, - .self_id = data->self_id, - .id_pointer = id_pp, - .cb_flag = cb_flag}); + &(LibraryIDLinkCallbackData){.user_data = data->user_data, + .bmain = data->bmain, + .owner_id = data->owner_id, + .self_id = data->self_id, + .id_pointer = id_pp, + .cb_flag = cb_flag}); if (flag & IDWALK_READONLY) { BLI_assert(*(id_pp) == old_id); } diff --git a/source/blender/blenkernel/intern/lib_remap_test.cc b/source/blender/blenkernel/intern/lib_remap_test.cc index b9333d42353..db3ffcf0ebd 100644 --- a/source/blender/blenkernel/intern/lib_remap_test.cc +++ b/source/blender/blenkernel/intern/lib_remap_test.cc @@ -37,7 +37,7 @@ namespace blender::bke::tests { class TestData { public: Main *bmain = nullptr; - struct bContext *C = nullptr; + bContext *C = nullptr; virtual void setup() { diff --git a/source/blender/blenkernel/intern/light.c b/source/blender/blenkernel/intern/light.c index e9dcb1edca9..9d77dadcb44 100644 --- a/source/blender/blenkernel/intern/light.c +++ b/source/blender/blenkernel/intern/light.c @@ -216,7 +216,7 @@ Light *BKE_light_add(Main *bmain, const char *name) return la; } -void BKE_light_eval(struct Depsgraph *depsgraph, Light *la) +void BKE_light_eval(Depsgraph *depsgraph, Light *la) { DEG_debug_print_eval(depsgraph, __func__, la->id.name, la); } diff --git a/source/blender/blenkernel/intern/light_linking.cc b/source/blender/blenkernel/intern/light_linking.cc index 6262a39d791..4603f9d7de7 100644 --- a/source/blender/blenkernel/intern/light_linking.cc +++ b/source/blender/blenkernel/intern/light_linking.cc @@ -72,7 +72,7 @@ static std::string get_default_collection_name(const Object *object, return name; } -Collection *BKE_light_linking_collection_new(struct Main *bmain, +Collection *BKE_light_linking_collection_new(Main *bmain, Object *object, const LightLinkingType link_type) { @@ -85,8 +85,8 @@ Collection *BKE_light_linking_collection_new(struct Main *bmain, return new_collection; } -void BKE_light_linking_collection_assign_only(struct Object *object, - struct Collection *new_collection, +void BKE_light_linking_collection_assign_only(Object *object, + Collection *new_collection, const LightLinkingType link_type) { /* Remove user from old collection. */ @@ -122,9 +122,9 @@ void BKE_light_linking_collection_assign_only(struct Object *object, } } -void BKE_light_linking_collection_assign(struct Main *bmain, - struct Object *object, - struct Collection *new_collection, +void BKE_light_linking_collection_assign(Main *bmain, + Object *object, + Collection *new_collection, const LightLinkingType link_type) { BKE_light_linking_collection_assign_only(object, new_collection, link_type); diff --git a/source/blender/blenkernel/intern/linestyle.cc b/source/blender/blenkernel/intern/linestyle.cc index 941b3132877..5f31fa4c710 100644 --- a/source/blender/blenkernel/intern/linestyle.cc +++ b/source/blender/blenkernel/intern/linestyle.cc @@ -789,7 +789,7 @@ void BKE_linestyle_init(FreestyleLineStyle *linestyle) linestyle_init_data(&linestyle->id); } -FreestyleLineStyle *BKE_linestyle_new(struct Main *bmain, const char *name) +FreestyleLineStyle *BKE_linestyle_new(Main *bmain, const char *name) { FreestyleLineStyle *linestyle; diff --git a/source/blender/blenkernel/intern/main.c b/source/blender/blenkernel/intern/main.c index 0be620732bf..d5a578c3555 100644 --- a/source/blender/blenkernel/intern/main.c +++ b/source/blender/blenkernel/intern/main.c @@ -153,7 +153,7 @@ void BKE_main_free(Main *mainvar) MEM_freeN(mainvar); } -bool BKE_main_is_empty(struct Main *bmain) +bool BKE_main_is_empty(Main *bmain) { ID *id_iter; FOREACH_MAIN_ID_BEGIN (bmain, id_iter) { @@ -163,12 +163,12 @@ bool BKE_main_is_empty(struct Main *bmain) return true; } -void BKE_main_lock(struct Main *bmain) +void BKE_main_lock(Main *bmain) { BLI_spin_lock((SpinLock *)bmain->lock); } -void BKE_main_unlock(struct Main *bmain) +void BKE_main_unlock(Main *bmain) { BLI_spin_unlock((SpinLock *)bmain->lock); } @@ -272,9 +272,7 @@ void BKE_main_relations_free(Main *bmain) } } -void BKE_main_relations_tag_set(struct Main *bmain, - const eMainIDRelationsEntryTags tag, - const bool value) +void BKE_main_relations_tag_set(Main *bmain, const eMainIDRelationsEntryTags tag, const bool value) { if (bmain->relations == NULL) { return; @@ -494,7 +492,7 @@ ImBuf *BKE_main_thumbnail_to_imbuf(Main *bmain, BlendThumbnail *data) return img; } -void BKE_main_thumbnail_create(struct Main *bmain) +void BKE_main_thumbnail_create(Main *bmain) { MEM_SAFE_FREE(bmain->blen_thumb); diff --git a/source/blender/blenkernel/intern/main_idmap.c b/source/blender/blenkernel/intern/main_idmap.c index 435901305a6..0bb4721daf2 100644 --- a/source/blender/blenkernel/intern/main_idmap.c +++ b/source/blender/blenkernel/intern/main_idmap.c @@ -54,9 +54,9 @@ struct IDNameLib_TypeMap { */ struct IDNameLib_Map { struct IDNameLib_TypeMap type_maps[INDEX_ID_MAX]; - struct GHash *uuid_map; - struct Main *bmain; - struct GSet *valid_id_pointers; + GHash *uuid_map; + Main *bmain; + GSet *valid_id_pointers; int idmap_types; /* For storage of keys for the #TypeMap #GHash, avoids many single allocations. */ @@ -76,9 +76,9 @@ static struct IDNameLib_TypeMap *main_idmap_from_idcode(struct IDNameLib_Map *id return NULL; } -struct IDNameLib_Map *BKE_main_idmap_create(struct Main *bmain, +struct IDNameLib_Map *BKE_main_idmap_create(Main *bmain, const bool create_valid_ids_set, - struct Main *old_bmain, + Main *old_bmain, const int idmap_types) { struct IDNameLib_Map *id_map = MEM_mallocN(sizeof(*id_map), __func__); @@ -181,7 +181,7 @@ void BKE_main_idmap_remove_id(struct IDNameLib_Map *id_map, ID *id) } } -struct Main *BKE_main_idmap_main_get(struct IDNameLib_Map *id_map) +Main *BKE_main_idmap_main_get(struct IDNameLib_Map *id_map) { return id_map->bmain; } diff --git a/source/blender/blenkernel/intern/main_namemap.cc b/source/blender/blenkernel/intern/main_namemap.cc index 831f43db8d4..d7339fccbed 100644 --- a/source/blender/blenkernel/intern/main_namemap.cc +++ b/source/blender/blenkernel/intern/main_namemap.cc @@ -175,13 +175,13 @@ struct UniqueName_Map { } }; -struct UniqueName_Map *BKE_main_namemap_create() +UniqueName_Map *BKE_main_namemap_create() { - struct UniqueName_Map *map = MEM_new(__func__); + UniqueName_Map *map = MEM_new(__func__); return map; } -void BKE_main_namemap_destroy(struct UniqueName_Map **r_name_map) +void BKE_main_namemap_destroy(UniqueName_Map **r_name_map) { #ifdef DEBUG_PRINT_MEMORY_USAGE int64_t size_sets = 0; @@ -214,7 +214,7 @@ void BKE_main_namemap_clear(Main *bmain) } } -static void main_namemap_populate(UniqueName_Map *name_map, struct Main *bmain, ID *ignore_id) +static void main_namemap_populate(UniqueName_Map *name_map, Main *bmain, ID *ignore_id) { BLI_assert_msg(name_map != nullptr, "name_map should not be null"); for (UniqueName_TypeMap &type_map : name_map->type_maps) { @@ -264,7 +264,7 @@ static UniqueName_Map *get_namemap_for(Main *bmain, ID *id, bool ensure_created) return bmain->name_map; } -bool BKE_main_namemap_get_name(struct Main *bmain, struct ID *id, char *name) +bool BKE_main_namemap_get_name(Main *bmain, ID *id, char *name) { #ifndef __GNUC__ /* GCC warns with `nonull-compare`. */ BLI_assert(bmain != nullptr); @@ -349,7 +349,7 @@ bool BKE_main_namemap_get_name(struct Main *bmain, struct ID *id, char *name) return is_name_changed; } -void BKE_main_namemap_remove_name(struct Main *bmain, struct ID *id, const char *name) +void BKE_main_namemap_remove_name(Main *bmain, ID *id, const char *name) { #ifndef __GNUC__ /* GCC warns with `nonull-compare`. */ BLI_assert(bmain != nullptr); @@ -361,7 +361,7 @@ void BKE_main_namemap_remove_name(struct Main *bmain, struct ID *id, const char return; } - struct UniqueName_Map *name_map = get_namemap_for(bmain, id, false); + UniqueName_Map *name_map = get_namemap_for(bmain, id, false); if (name_map == nullptr) { return; } diff --git a/source/blender/blenkernel/intern/mask.cc b/source/blender/blenkernel/intern/mask.cc index 8357aa3d8e1..628cee94d1e 100644 --- a/source/blender/blenkernel/intern/mask.cc +++ b/source/blender/blenkernel/intern/mask.cc @@ -260,7 +260,7 @@ IDTypeInfo IDType_ID_MSK = { static struct { ListBase splines; - struct GHash *id_hash; + GHash *id_hash; } mask_clipboard = {{nullptr}}; static MaskSplinePoint *mask_spline_point_next(MaskSpline *spline, diff --git a/source/blender/blenkernel/intern/mask_evaluate.cc b/source/blender/blenkernel/intern/mask_evaluate.cc index f4a9cb65584..03b52535536 100644 --- a/source/blender/blenkernel/intern/mask_evaluate.cc +++ b/source/blender/blenkernel/intern/mask_evaluate.cc @@ -910,7 +910,7 @@ void BKE_mask_layer_evaluate_deform(MaskLayer *masklay, const float ctime) } } -void BKE_mask_eval_animation(struct Depsgraph *depsgraph, Mask *mask) +void BKE_mask_eval_animation(Depsgraph *depsgraph, Mask *mask) { float ctime = DEG_get_ctime(depsgraph); DEG_debug_print_eval(depsgraph, __func__, mask->id.name, mask); @@ -919,7 +919,7 @@ void BKE_mask_eval_animation(struct Depsgraph *depsgraph, Mask *mask) } } -void BKE_mask_eval_update(struct Depsgraph *depsgraph, Mask *mask) +void BKE_mask_eval_update(Depsgraph *depsgraph, Mask *mask) { const bool is_depsgraph_active = DEG_is_active(depsgraph); float ctime = DEG_get_ctime(depsgraph); diff --git a/source/blender/blenkernel/intern/mask_rasterize.cc b/source/blender/blenkernel/intern/mask_rasterize.cc index 5151f6b9e75..25bb3ecfe73 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.cc +++ b/source/blender/blenkernel/intern/mask_rasterize.cc @@ -559,7 +559,7 @@ static void layer_bucket_init(MaskRasterLayer *layer, const float pixel_size) } void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, - struct Mask *mask, + Mask *mask, const int width, const int height, const bool do_aspect_correct, diff --git a/source/blender/blenkernel/intern/material.cc b/source/blender/blenkernel/intern/material.cc index d8f661088be..a5e8fdaece2 100644 --- a/source/blender/blenkernel/intern/material.cc +++ b/source/blender/blenkernel/intern/material.cc @@ -1089,10 +1089,7 @@ void BKE_object_material_assign(Main *bmain, Object *ob, Material *ma, short act object_material_assign(bmain, ob, ma, act, assign_type, true); } -void BKE_object_material_assign_single_obdata(struct Main *bmain, - struct Object *ob, - struct Material *ma, - short act) +void BKE_object_material_assign_single_obdata(Main *bmain, Object *ob, Material *ma, short act) { object_material_assign(bmain, ob, ma, act, BKE_MAT_ASSIGN_OBDATA, false); } @@ -1210,11 +1207,8 @@ void BKE_object_material_from_eval_data(Main *bmain, Object *ob_orig, const ID * BKE_object_materials_test(bmain, ob_orig, data_orig); } -void BKE_object_material_array_assign(Main *bmain, - struct Object *ob, - struct Material ***matar, - int totcol, - const bool to_object_only) +void BKE_object_material_array_assign( + Main *bmain, Object *ob, Material ***matar, int totcol, const bool to_object_only) { int actcol_orig = ob->actcol; @@ -1463,7 +1457,7 @@ struct FillTexPaintSlotsData { static bool fill_texpaint_slots_cb(bNode *node, void *userdata) { - struct FillTexPaintSlotsData *fill_data = static_cast(userdata); + FillTexPaintSlotsData *fill_data = static_cast(userdata); Material *ma = fill_data->ma; int index = fill_data->index; @@ -1526,12 +1520,12 @@ static void fill_texpaint_slots_recursive(bNodeTree *nodetree, int slot_len, ePaintSlotFilter slot_filter) { - struct FillTexPaintSlotsData fill_data = {active_node, ob, ma, 0, slot_len}; + FillTexPaintSlotsData fill_data = {active_node, ob, ma, 0, slot_len}; ntree_foreach_texnode_recursive(nodetree, fill_texpaint_slots_cb, &fill_data, slot_filter); } /** Check which type of paint slots should be filled for the given object. */ -static ePaintSlotFilter material_paint_slot_filter(const struct Object *ob) +static ePaintSlotFilter material_paint_slot_filter(const Object *ob) { ePaintSlotFilter slot_filter = PAINT_SLOT_IMAGE; if (ob->mode == OB_MODE_SCULPT && U.experimental.use_sculpt_texture_paint) { @@ -1540,7 +1534,7 @@ static ePaintSlotFilter material_paint_slot_filter(const struct Object *ob) return slot_filter; } -void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma, const struct Object *ob) +void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma, const Object *ob) { if (!ma) { return; @@ -1605,7 +1599,7 @@ void BKE_texpaint_slot_refresh_cache(Scene *scene, Material *ma, const struct Ob MEM_SAFE_FREE(prev_texpaintslot); } -void BKE_texpaint_slots_refresh_object(Scene *scene, struct Object *ob) +void BKE_texpaint_slots_refresh_object(Scene *scene, Object *ob) { for (int i = 1; i < ob->totcol + 1; i++) { Material *ma = BKE_object_material_get(ob, i); @@ -1620,7 +1614,7 @@ struct FindTexPaintNodeData { static bool texpaint_slot_node_find_cb(bNode *node, void *userdata) { - struct FindTexPaintNodeData *find_data = static_cast(userdata); + FindTexPaintNodeData *find_data = static_cast(userdata); if (find_data->slot->ima && node->type == SH_NODE_TEX_IMAGE) { Image *node_ima = (Image *)node->id; if (find_data->slot->ima == node_ima) { @@ -1643,7 +1637,7 @@ static bool texpaint_slot_node_find_cb(bNode *node, void *userdata) bNode *BKE_texpaint_slot_material_find_node(Material *ma, short texpaint_slot) { TexPaintSlot *slot = &ma->texpaintslot[texpaint_slot]; - struct FindTexPaintNodeData find_data = {slot, nullptr}; + FindTexPaintNodeData find_data = {slot, nullptr}; ntree_foreach_texnode_recursive(ma->nodetree, texpaint_slot_node_find_cb, &find_data, @@ -1912,7 +1906,7 @@ void ramp_blend(int type, float r_col[3], const float fac, const float col[3]) } } -void BKE_material_eval(struct Depsgraph *depsgraph, Material *material) +void BKE_material_eval(Depsgraph *depsgraph, Material *material) { DEG_debug_print_eval(depsgraph, __func__, material->id.name, material); GPU_material_free(&material->gpumaterial); diff --git a/source/blender/blenkernel/intern/mball_tessellate.cc b/source/blender/blenkernel/intern/mball_tessellate.cc index 3c83d2f798b..56a274df0c9 100644 --- a/source/blender/blenkernel/intern/mball_tessellate.cc +++ b/source/blender/blenkernel/intern/mball_tessellate.cc @@ -51,7 +51,7 @@ typedef struct corner { int i, j, k; /* (i, j, k) is index within lattice */ float co[3], value; /* location and function value */ - struct corner *next; + corner *next; } CORNER; /** Partitioning cell (cube). */ @@ -62,33 +62,33 @@ typedef struct cube { /** Linked list of cubes acting as stack. */ typedef struct cubes { - CUBE cube; /* a single cube */ - struct cubes *next; /* remaining elements */ + CUBE cube; /* a single cube */ + cubes *next; /* remaining elements */ } CUBES; /** List of cube locations. */ typedef struct centerlist { - int i, j, k; /* cube location */ - struct centerlist *next; /* remaining elements */ + int i, j, k; /* cube location */ + centerlist *next; /* remaining elements */ } CENTERLIST; /** List of edges. */ typedef struct edgelist { int i1, j1, k1, i2, j2, k2; /* edge corner ids */ int vid; /* vertex id */ - struct edgelist *next; /* remaining elements */ + edgelist *next; /* remaining elements */ } EDGELIST; /** List of integers. */ typedef struct intlist { - int i; /* an integer */ - struct intlist *next; /* remaining elements */ + int i; /* an integer */ + intlist *next; /* remaining elements */ } INTLIST; /** List of list of integers. */ typedef struct intlists { - INTLIST *list; /* a list of integers */ - struct intlists *next; /* remaining elements */ + INTLIST *list; /* a list of integers */ + intlists *next; /* remaining elements */ } INTLISTS; /** An AABB with pointer to metal-elem. */ @@ -99,7 +99,7 @@ typedef struct Box { typedef struct MetaballBVHNode { /* BVH node */ Box bb[2]; /* AABB of children */ - struct MetaballBVHNode *child[2]; + MetaballBVHNode *child[2]; } MetaballBVHNode; /** Parameters, storage. */ @@ -1234,7 +1234,7 @@ static void init_meta(Depsgraph *depsgraph, PROCESS *process, Scene *scene, Obje zero_size = 1; } else if (bob->parent) { - struct Object *pob = bob->parent; + Object *pob = bob->parent; while (pob) { if (has_zero_axis_m4(pob->object_to_world)) { zero_size = 1; diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index 5e2b647532b..7a1fca44846 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -182,7 +182,7 @@ static void mesh_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int } } -void BKE_mesh_free_editmesh(struct Mesh *mesh) +void BKE_mesh_free_editmesh(Mesh *mesh) { if (mesh->edit_mesh == nullptr) { return; @@ -808,7 +808,7 @@ void BKE_mesh_ensure_skin_customdata(Mesh *me) } } -bool BKE_mesh_ensure_facemap_customdata(struct Mesh *me) +bool BKE_mesh_ensure_facemap_customdata(Mesh *me) { BMesh *bm = me->edit_mesh ? me->edit_mesh->bm : nullptr; bool changed = false; @@ -827,7 +827,7 @@ bool BKE_mesh_ensure_facemap_customdata(struct Mesh *me) return changed; } -bool BKE_mesh_clear_facemap_customdata(struct Mesh *me) +bool BKE_mesh_clear_facemap_customdata(Mesh *me) { BMesh *bm = me->edit_mesh ? me->edit_mesh->bm : nullptr; bool changed = false; @@ -1107,7 +1107,7 @@ Mesh *BKE_mesh_new_nomain_from_template(const Mesh *me_src, me_src, verts_num, edges_num, 0, polys_num, loops_num, CD_MASK_EVERYTHING); } -void BKE_mesh_eval_delete(struct Mesh *mesh_eval) +void BKE_mesh_eval_delete(Mesh *mesh_eval) { /* Evaluated mesh may point to edit mesh, but never owns it. */ mesh_eval->edit_mesh = nullptr; @@ -1123,8 +1123,8 @@ Mesh *BKE_mesh_copy_for_eval(const Mesh *source) } BMesh *BKE_mesh_to_bmesh_ex(const Mesh *me, - const struct BMeshCreateParams *create_params, - const struct BMeshFromMeshParams *convert_params) + const BMeshCreateParams *create_params, + const BMeshFromMeshParams *convert_params) { const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(me); @@ -1137,7 +1137,7 @@ BMesh *BKE_mesh_to_bmesh_ex(const Mesh *me, BMesh *BKE_mesh_to_bmesh(Mesh *me, Object *ob, const bool add_key_index, - const struct BMeshCreateParams *params) + const BMeshCreateParams *params) { BMeshFromMeshParams bmesh_from_mesh_params{}; bmesh_from_mesh_params.calc_face_normal = false; @@ -1149,7 +1149,7 @@ BMesh *BKE_mesh_to_bmesh(Mesh *me, } Mesh *BKE_mesh_from_bmesh_nomain(BMesh *bm, - const struct BMeshToMeshParams *params, + const BMeshToMeshParams *params, const Mesh *me_settings) { BLI_assert(params->calc_object_remap == false); diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc index 0c69c1bd7c1..752f5ff1a36 100644 --- a/source/blender/blenkernel/intern/mesh_convert.cc +++ b/source/blender/blenkernel/intern/mesh_convert.cc @@ -354,7 +354,7 @@ Mesh *BKE_mesh_new_nomain_from_curve(const Object *ob) } struct EdgeLink { - struct EdgeLink *next, *prev; + EdgeLink *next, *prev; const void *edge; }; diff --git a/source/blender/blenkernel/intern/mesh_fair.cc b/source/blender/blenkernel/intern/mesh_fair.cc index 2b11d09d0ba..65ca6bf7cbc 100644 --- a/source/blender/blenkernel/intern/mesh_fair.cc +++ b/source/blender/blenkernel/intern/mesh_fair.cc @@ -452,7 +452,7 @@ static void prefair_and_fair_verts(FairingContext *fairing_context, delete voronoi_vertex_weights; } -void BKE_mesh_prefair_and_fair_verts(struct Mesh *mesh, +void BKE_mesh_prefair_and_fair_verts(Mesh *mesh, float (*deform_vert_positions)[3], bool *affect_verts, const eMeshFairingDepth depth) @@ -466,9 +466,7 @@ void BKE_mesh_prefair_and_fair_verts(struct Mesh *mesh, delete fairing_context; } -void BKE_bmesh_prefair_and_fair_verts(struct BMesh *bm, - bool *affect_verts, - const eMeshFairingDepth depth) +void BKE_bmesh_prefair_and_fair_verts(BMesh *bm, bool *affect_verts, const eMeshFairingDepth depth) { BMeshFairingContext *fairing_context = new BMeshFairingContext(bm); prefair_and_fair_verts(fairing_context, affect_verts, depth); diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc index 97b67f9a47c..9bb6f6cd0af 100644 --- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc +++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc @@ -45,7 +45,7 @@ struct EdgeSort { }; /* edges have to be added with lowest index first for sorting */ -static void to_edgesort(struct EdgeSort *ed, uint v1, uint v2, char is_loose, short is_draw) +static void to_edgesort(EdgeSort *ed, uint v1, uint v2, char is_loose, short is_draw) { if (v1 < v2) { ed->v1 = v1; @@ -61,8 +61,8 @@ static void to_edgesort(struct EdgeSort *ed, uint v1, uint v2, char is_loose, sh static int vergedgesort(const void *v1, const void *v2) { - const struct EdgeSort *x1 = static_cast(v1); - const struct EdgeSort *x2 = static_cast(v2); + const EdgeSort *x1 = static_cast(v1); + const EdgeSort *x2 = static_cast(v2); if (x1->v1 > x2->v1) { return 1; @@ -97,7 +97,7 @@ static void mesh_calc_edges_mdata(const MVert * /*allvert*/, const MFace *mface; MEdge *edges, *edge; EdgeHash *hash; - struct EdgeSort *edsort, *ed; + EdgeSort *edsort, *ed; int a, totedge = 0; uint totedge_final = 0; uint edge_index; @@ -123,7 +123,7 @@ static void mesh_calc_edges_mdata(const MVert * /*allvert*/, return; } - ed = edsort = (EdgeSort *)MEM_mallocN(totedge * sizeof(struct EdgeSort), "EdgeSort"); + ed = edsort = (EdgeSort *)MEM_mallocN(totedge * sizeof(EdgeSort), "EdgeSort"); for (a = totface, mface = allface; a > 0; a--, mface++) { to_edgesort(ed++, mface->v1, mface->v2, !mface->v3, mface->edcode & ME_V1V2); @@ -138,7 +138,7 @@ static void mesh_calc_edges_mdata(const MVert * /*allvert*/, } } - qsort(edsort, totedge, sizeof(struct EdgeSort), vergedgesort); + qsort(edsort, totedge, sizeof(EdgeSort), vergedgesort); /* count final amount */ for (a = totedge, ed = edsort; a > 1; a--, ed++) { @@ -1224,7 +1224,7 @@ void BKE_mesh_tessface_calc(Mesh *mesh) mesh_ensure_tessellation_customdata(mesh); } -void BKE_mesh_tessface_ensure(struct Mesh *mesh) +void BKE_mesh_tessface_ensure(Mesh *mesh) { if (mesh->totpoly && mesh->totface == 0) { BKE_mesh_tessface_calc(mesh); diff --git a/source/blender/blenkernel/intern/mesh_mirror.cc b/source/blender/blenkernel/intern/mesh_mirror.cc index 2b2c076a6fe..621ee05d847 100644 --- a/source/blender/blenkernel/intern/mesh_mirror.cc +++ b/source/blender/blenkernel/intern/mesh_mirror.cc @@ -85,7 +85,7 @@ Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(MirrorModifierData *mm return result; } -void BKE_mesh_mirror_apply_mirror_on_axis(struct Main *bmain, +void BKE_mesh_mirror_apply_mirror_on_axis(Main *bmain, Mesh *mesh, const int axis, const float dist) diff --git a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc index 2dccc90f5eb..f732e2d2300 100644 --- a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc +++ b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc @@ -486,7 +486,7 @@ void BKE_remesh_reproject_vertex_paint(Mesh *target, const Mesh *source) free_bvhtree_from_mesh(&bvhtree); } -struct Mesh *BKE_mesh_remesh_voxel_fix_poles(const Mesh *mesh) +Mesh *BKE_mesh_remesh_voxel_fix_poles(const Mesh *mesh) { const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(mesh); diff --git a/source/blender/blenkernel/intern/mesh_runtime.cc b/source/blender/blenkernel/intern/mesh_runtime.cc index b569c03661a..28a372f1329 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.cc +++ b/source/blender/blenkernel/intern/mesh_runtime.cc @@ -261,7 +261,7 @@ void BKE_mesh_runtime_verttri_from_looptri(MVertTri *r_verttri, } } -bool BKE_mesh_runtime_ensure_edit_data(struct Mesh *mesh) +bool BKE_mesh_runtime_ensure_edit_data(Mesh *mesh) { if (mesh->runtime->edit_data != nullptr) { return false; @@ -307,7 +307,7 @@ void BKE_mesh_runtime_clear_geometry(Mesh *mesh) } } -void BKE_mesh_tag_edges_split(struct Mesh *mesh) +void BKE_mesh_tag_edges_split(Mesh *mesh) { /* Triangulation didn't change because vertex positions and loop vertex indices didn't change. * Face normals didn't change either, but tag those anyway, since there is no API function to @@ -360,7 +360,7 @@ void BKE_mesh_tag_positions_changed_uniformly(Mesh *mesh) mesh->runtime->bounds_cache.tag_dirty(); } -void BKE_mesh_tag_topology_changed(struct Mesh *mesh) +void BKE_mesh_tag_topology_changed(Mesh *mesh) { BKE_mesh_runtime_clear_geometry(mesh); } @@ -370,7 +370,7 @@ bool BKE_mesh_is_deformed_only(const Mesh *mesh) return mesh->runtime->deformed_only; } -eMeshWrapperType BKE_mesh_wrapper_type(const struct Mesh *mesh) +eMeshWrapperType BKE_mesh_wrapper_type(const Mesh *mesh) { return mesh->runtime->wrapper_type; } diff --git a/source/blender/blenkernel/intern/mesh_tessellate.cc b/source/blender/blenkernel/intern/mesh_tessellate.cc index 492615761ea..4ee155b5672 100644 --- a/source/blender/blenkernel/intern/mesh_tessellate.cc +++ b/source/blender/blenkernel/intern/mesh_tessellate.cc @@ -265,10 +265,9 @@ static void looptris_calc_all(const Span positions, reinterpret_cast(poly_normals.data())); return; } - struct TessellationUserTLS tls_data_dummy = {nullptr}; + TessellationUserTLS tls_data_dummy = {nullptr}; - struct TessellationUserData data { - }; + TessellationUserData data{}; data.corner_verts = corner_verts; data.polys = polys; data.positions = positions; diff --git a/source/blender/blenkernel/intern/modifier.cc b/source/blender/blenkernel/intern/modifier.cc index a22fd021cab..83e96386112 100644 --- a/source/blender/blenkernel/intern/modifier.cc +++ b/source/blender/blenkernel/intern/modifier.cc @@ -405,7 +405,7 @@ void BKE_modifier_copydata(const ModifierData *md, ModifierData *target) BKE_modifier_copydata_ex(md, target, 0); } -bool BKE_modifier_supports_cage(struct Scene *scene, ModifierData *md) +bool BKE_modifier_supports_cage(Scene *scene, ModifierData *md) { const ModifierTypeInfo *mti = BKE_modifier_get_info(ModifierType(md->type)); @@ -413,7 +413,7 @@ bool BKE_modifier_supports_cage(struct Scene *scene, ModifierData *md) (mti->flags & eModifierTypeFlag_SupportsEditmode) && BKE_modifier_supports_mapping(md)); } -bool BKE_modifier_couldbe_cage(struct Scene *scene, ModifierData *md) +bool BKE_modifier_couldbe_cage(Scene *scene, ModifierData *md) { const ModifierTypeInfo *mti = BKE_modifier_get_info(ModifierType(md->type)); @@ -461,10 +461,7 @@ void BKE_modifier_set_error(const Object *ob, ModifierData *md, const char *_for CLOG_ERROR(&LOG, "Object: \"%s\", Modifier: \"%s\", %s", ob->id.name + 2, md->name, md->error); } -void BKE_modifier_set_warning(const struct Object *ob, - struct ModifierData *md, - const char *_format, - ...) +void BKE_modifier_set_warning(const Object *ob, ModifierData *md, const char *_format, ...) { char buffer[512]; va_list ap; @@ -578,7 +575,7 @@ bool BKE_modifiers_is_particle_enabled(Object *ob) return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)); } -bool BKE_modifier_is_enabled(const struct Scene *scene, ModifierData *md, int required_mode) +bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_mode) { const ModifierTypeInfo *mti = BKE_modifier_get_info(ModifierType(md->type)); @@ -607,7 +604,7 @@ bool BKE_modifier_is_nonlocal_in_liboverride(const Object *ob, const ModifierDat (md == nullptr || (md->flag & eModifierFlag_OverrideLibrary_Local) == 0)); } -CDMaskLink *BKE_modifier_calc_data_masks(const struct Scene *scene, +CDMaskLink *BKE_modifier_calc_data_masks(const Scene *scene, ModifierData *md, CustomData_MeshMasks *final_datamask, int required_mode, @@ -674,7 +671,7 @@ CDMaskLink *BKE_modifier_calc_data_masks(const struct Scene *scene, return dataMasks; } -ModifierData *BKE_modifier_get_last_preview(const struct Scene *scene, +ModifierData *BKE_modifier_get_last_preview(const Scene *scene, ModifierData *md, int required_mode) { @@ -890,7 +887,7 @@ bool BKE_modifier_is_correctable_deformed(ModifierData *md) return mti->deformMatricesEM != nullptr; } -bool BKE_modifiers_is_correctable_deformed(const struct Scene *scene, Object *ob) +bool BKE_modifiers_is_correctable_deformed(const Scene *scene, Object *ob) { VirtualModifierData virtualModifierData; ModifierData *md = BKE_modifiers_get_virtual_modifierlist(ob, &virtualModifierData); @@ -991,9 +988,7 @@ static void modwrap_dependsOnNormals(Mesh *me) /* wrapper around ModifierTypeInfo.modifyMesh that ensures valid normals */ -struct Mesh *BKE_modifier_modify_mesh(ModifierData *md, - const ModifierEvalContext *ctx, - struct Mesh *me) +Mesh *BKE_modifier_modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *me) { const ModifierTypeInfo *mti = BKE_modifier_get_info(ModifierType(md->type)); @@ -1027,7 +1022,7 @@ void BKE_modifier_deform_verts(ModifierData *md, void BKE_modifier_deform_vertsEM(ModifierData *md, const ModifierEvalContext *ctx, - struct BMEditMesh *em, + BMEditMesh *em, Mesh *me, float (*vertexCos)[3], int numVerts) @@ -1066,9 +1061,7 @@ ModifierData *BKE_modifier_get_original(const Object *object, ModifierData *md) return BKE_modifiers_findby_session_uuid(object_orig, &md->session_uuid); } -struct ModifierData *BKE_modifier_get_evaluated(Depsgraph *depsgraph, - Object *object, - ModifierData *md) +ModifierData *BKE_modifier_get_evaluated(Depsgraph *depsgraph, Object *object, ModifierData *md) { Object *object_eval = DEG_get_evaluated_object(depsgraph, object); if (object_eval == object) { @@ -1079,7 +1072,7 @@ struct ModifierData *BKE_modifier_get_evaluated(Depsgraph *depsgraph, void BKE_modifier_check_uuids_unique_and_report(const Object *object) { - struct GSet *used_uuids = BLI_gset_new( + GSet *used_uuids = BLI_gset_new( BLI_session_uuid_ghash_hash, BLI_session_uuid_ghash_compare, "modifier used uuids"); LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 32537d36f02..0a5d7ffdc75 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -531,7 +531,7 @@ static void movieclip_convert_multilayer_add_pass(void *UNUSED(layer), #endif /* WITH_OPENEXR */ -void BKE_movieclip_convert_multilayer_ibuf(struct ImBuf *ibuf) +void BKE_movieclip_convert_multilayer_ibuf(ImBuf *ibuf) { if (ibuf == NULL) { return; @@ -563,7 +563,7 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, int framenr, int flag) { - struct ImBuf *ibuf; + ImBuf *ibuf; char filepath[FILE_MAX]; int loadflag; bool use_proxy = false; @@ -1966,7 +1966,7 @@ bool BKE_movieclip_put_frame_if_possible(MovieClip *clip, const MovieClipUser *u return result; } -static void movieclip_eval_update_reload(struct Depsgraph *depsgraph, Main *bmain, MovieClip *clip) +static void movieclip_eval_update_reload(Depsgraph *depsgraph, Main *bmain, MovieClip *clip) { BKE_movieclip_reload(bmain, clip); if (DEG_is_active(depsgraph)) { @@ -1975,7 +1975,7 @@ static void movieclip_eval_update_reload(struct Depsgraph *depsgraph, Main *bmai } } -static void movieclip_eval_update_generic(struct Depsgraph *depsgraph, MovieClip *clip) +static void movieclip_eval_update_generic(Depsgraph *depsgraph, MovieClip *clip) { BKE_tracking_dopesheet_tag_update(&clip->tracking); if (DEG_is_active(depsgraph)) { @@ -1984,7 +1984,7 @@ static void movieclip_eval_update_generic(struct Depsgraph *depsgraph, MovieClip } } -void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, Main *bmain, MovieClip *clip) +void BKE_movieclip_eval_update(Depsgraph *depsgraph, Main *bmain, MovieClip *clip) { DEG_debug_print_eval(depsgraph, __func__, clip->id.name, clip); if (clip->id.recalc & ID_RECALC_SOURCE) { @@ -2059,7 +2059,7 @@ GPUTexture *BKE_movieclip_get_gpu_texture(MovieClip *clip, MovieClipUser *cuser) return *tex; } -void BKE_movieclip_free_gputexture(struct MovieClip *clip) +void BKE_movieclip_free_gputexture(MovieClip *clip) { /* Number of gpu textures to keep around as cache. * We don't want to keep too many GPU textures for diff --git a/source/blender/blenkernel/intern/multires.cc b/source/blender/blenkernel/intern/multires.cc index ed482fbdbb9..dba13979b65 100644 --- a/source/blender/blenkernel/intern/multires.cc +++ b/source/blender/blenkernel/intern/multires.cc @@ -225,9 +225,7 @@ static void multires_mdisps_subdivide_hidden(MDisps *md, int new_level) md->hidden = subd; } -Mesh *BKE_multires_create_mesh(struct Depsgraph *depsgraph, - Object *object, - MultiresModifierData *mmd) +Mesh *BKE_multires_create_mesh(Depsgraph *depsgraph, Object *object, MultiresModifierData *mmd) { Object *object_eval = DEG_get_evaluated_object(depsgraph, object); Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); @@ -247,10 +245,8 @@ Mesh *BKE_multires_create_mesh(struct Depsgraph *depsgraph, return result; } -float (*BKE_multires_create_deformed_base_mesh_vert_coords(struct Depsgraph *depsgraph, - struct Object *object, - struct MultiresModifierData *mmd, - int *r_num_deformed_verts))[3] +float (*BKE_multires_create_deformed_base_mesh_vert_coords( + Depsgraph *depsgraph, Object *object, MultiresModifierData *mmd, int *r_num_deformed_verts))[3] { Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); Object *object_eval = DEG_get_evaluated_object(depsgraph, object); @@ -1047,7 +1043,7 @@ static void multiresModifier_disp_run( } } -void multires_modifier_update_mdisps(struct DerivedMesh *dm, Scene *scene) +void multires_modifier_update_mdisps(DerivedMesh *dm, Scene *scene) { CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm; Object *ob; @@ -1411,7 +1407,7 @@ static void multires_apply_uniform_scale(Object *object, const float scale) } } -static void multires_apply_smat(struct Depsgraph * /*depsgraph*/, +static void multires_apply_smat(Depsgraph * /*depsgraph*/, Scene *scene, Object *object, const float smat[3][3]) @@ -1453,7 +1449,7 @@ int multires_mdisp_corners(const MDisps *s) return 0; } -void multiresModifier_scale_disp(struct Depsgraph *depsgraph, Scene *scene, Object *ob) +void multiresModifier_scale_disp(Depsgraph *depsgraph, Scene *scene, Object *ob) { float smat[3][3]; @@ -1463,10 +1459,7 @@ void multiresModifier_scale_disp(struct Depsgraph *depsgraph, Scene *scene, Obje multires_apply_smat(depsgraph, scene, ob, smat); } -void multiresModifier_prepare_join(struct Depsgraph *depsgraph, - Scene *scene, - Object *ob, - Object *to_ob) +void multiresModifier_prepare_join(Depsgraph *depsgraph, Scene *scene, Object *ob, Object *to_ob) { float smat[3][3], tmat[3][3], mat[3][3]; multires_sync_levels(scene, to_ob, ob); @@ -1516,7 +1509,7 @@ void multires_topology_changed(Mesh *me) } } -void multires_ensure_external_read(struct Mesh *mesh, int top_level) +void multires_ensure_external_read(Mesh *mesh, int top_level) { if (!CustomData_external_test(&mesh->ldata, CD_MDISPS)) { return; @@ -1548,7 +1541,7 @@ void multires_ensure_external_read(struct Mesh *mesh, int top_level) CustomData_external_read(&mesh->ldata, &mesh->id, CD_MASK_MDISPS, mesh->totloop); } -void multiresModifier_ensure_external_read(struct Mesh *mesh, const MultiresModifierData *mmd) +void multiresModifier_ensure_external_read(Mesh *mesh, const MultiresModifierData *mmd) { multires_ensure_external_read(mesh, mmd->totlvl); } diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 92d2619f8db..cb6226ab373 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -349,8 +349,8 @@ NlaTrack *BKE_nlatrack_new(void) } void BKE_nlatrack_insert_before(ListBase *nla_tracks, - struct NlaTrack *next, - struct NlaTrack *new_track, + NlaTrack *next, + NlaTrack *new_track, bool is_liboverride) { @@ -378,8 +378,8 @@ void BKE_nlatrack_insert_before(ListBase *nla_tracks, } void BKE_nlatrack_insert_after(ListBase *nla_tracks, - struct NlaTrack *prev, - struct NlaTrack *new_track, + NlaTrack *prev, + NlaTrack *new_track, const bool is_liboverride) { BLI_assert(nla_tracks); @@ -418,7 +418,7 @@ void BKE_nlatrack_insert_after(ListBase *nla_tracks, sizeof(new_track->name)); } -NlaTrack *BKE_nlatrack_new_before(ListBase *nla_tracks, struct NlaTrack *next, bool is_liboverride) +NlaTrack *BKE_nlatrack_new_before(ListBase *nla_tracks, NlaTrack *next, bool is_liboverride) { NlaTrack *new_track = BKE_nlatrack_new(); @@ -427,7 +427,7 @@ NlaTrack *BKE_nlatrack_new_before(ListBase *nla_tracks, struct NlaTrack *next, b return new_track; } -NlaTrack *BKE_nlatrack_new_after(ListBase *nla_tracks, struct NlaTrack *prev, bool is_liboverride) +NlaTrack *BKE_nlatrack_new_after(ListBase *nla_tracks, NlaTrack *prev, bool is_liboverride) { NlaTrack *new_track = BKE_nlatrack_new(); @@ -579,13 +579,13 @@ void BKE_nla_strip_foreach_id(NlaStrip *strip, LibraryForeachIDData *data) /* Removing ------------------------------------------ */ -void BKE_nlatrack_remove(ListBase *tracks, struct NlaTrack *nlt) +void BKE_nlatrack_remove(ListBase *tracks, NlaTrack *nlt) { BLI_assert(tracks); BLI_remlink(tracks, nlt); } -void BKE_nlatrack_remove_and_free(ListBase *tracks, struct NlaTrack *nlt, bool do_id_user) +void BKE_nlatrack_remove_and_free(ListBase *tracks, NlaTrack *nlt, bool do_id_user) { BKE_nlatrack_remove(tracks, nlt); BKE_nlatrack_free(nlt, do_id_user); @@ -1358,7 +1358,7 @@ float BKE_nlastrip_compute_frame_to_next_strip(NlaStrip *strip) return limit_next; } -NlaStrip *BKE_nlastrip_next_in_track(struct NlaStrip *strip, bool skip_transitions) +NlaStrip *BKE_nlastrip_next_in_track(NlaStrip *strip, bool skip_transitions) { NlaStrip *next = strip->next; while (next != NULL) { @@ -1372,7 +1372,7 @@ NlaStrip *BKE_nlastrip_next_in_track(struct NlaStrip *strip, bool skip_transitio return NULL; } -NlaStrip *BKE_nlastrip_prev_in_track(struct NlaStrip *strip, bool skip_transitions) +NlaStrip *BKE_nlastrip_prev_in_track(NlaStrip *strip, bool skip_transitions) { NlaStrip *prev = strip->prev; while (prev != NULL) { @@ -2445,7 +2445,7 @@ void BKE_nla_blend_read_lib(BlendLibReader *reader, ID *id, ListBase *tracks) } } -void BKE_nla_blend_read_expand(struct BlendExpander *expander, struct ListBase *tracks) +void BKE_nla_blend_read_expand(BlendExpander *expander, ListBase *tracks) { /* nla-data - referenced actions */ LISTBASE_FOREACH (NlaTrack *, nlt, tracks) { diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index 0b1580df1f4..c23c29eef4f 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -1265,7 +1265,7 @@ static IDProperty *object_asset_dimensions_property(Object *ob) return property; } -static void object_asset_pre_save(void *asset_ptr, struct AssetMetaData *asset_data) +static void object_asset_pre_save(void *asset_ptr, AssetMetaData *asset_data) { Object *ob = (Object *)asset_ptr; BLI_assert(GS(ob->id.name) == ID_OB); @@ -1644,7 +1644,7 @@ bool BKE_object_copy_modifier( return true; } -bool BKE_object_copy_gpencil_modifier(struct Object *ob_dst, GpencilModifierData *gmd_src) +bool BKE_object_copy_gpencil_modifier(Object *ob_dst, GpencilModifierData *gmd_src) { BLI_assert(ob_dst->type == OB_GPENCIL_LEGACY); @@ -2014,7 +2014,7 @@ bool BKE_object_data_is_in_editmode(const Object *ob, const ID *id) } } -char *BKE_object_data_editmode_flush_ptr_get(struct ID *id) +char *BKE_object_data_editmode_flush_ptr_get(ID *id) { const short type = GS(id->name); switch (type) { @@ -2081,7 +2081,7 @@ bool BKE_object_is_in_wpaint_select_vert(const Object *ob) return false; } -bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode) +bool BKE_object_has_mode_data(const Object *ob, eObjectMode object_mode) { if (object_mode & OB_MODE_EDIT) { if (BKE_object_is_in_editmode(ob)) { @@ -2111,7 +2111,7 @@ bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode) return false; } -bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode) +bool BKE_object_is_mode_compat(const Object *ob, eObjectMode object_mode) { return ((ob->mode == object_mode) || (ob->mode & object_mode) != 0); } @@ -2450,7 +2450,7 @@ void BKE_object_copy_softbody(Object *ob_dst, const Object *ob_src, const int fl } if (sb->bspring) { - sbn->bspring = (struct BodySpring *)MEM_dupallocN(sb->bspring); + sbn->bspring = (BodySpring *)MEM_dupallocN(sb->bspring); } } @@ -2952,7 +2952,7 @@ bool BKE_object_obdata_is_libdata(const Object *ob) return (ob && ob->data && ID_IS_LINKED(ob->data)); } -void BKE_object_obdata_size_init(struct Object *ob, const float size) +void BKE_object_obdata_size_init(Object *ob, const float size) { /* apply radius as a scale to types that support it */ switch (ob->type) { @@ -3204,7 +3204,7 @@ void BKE_object_to_mat4(Object *ob, float r_mat[4][4]) add_v3_v3v3(r_mat[3], ob->loc, ob->dloc); } -void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4]) +void BKE_object_matrix_local_get(Object *ob, float r_mat[4][4]) { if (ob->parent) { float par_imat[4][4]; @@ -3695,7 +3695,7 @@ void BKE_object_apply_mat4(Object *ob, BKE_object_apply_mat4_ex(ob, mat, use_parent ? ob->parent : nullptr, ob->parentinv, use_compat); } -void BKE_object_apply_parent_inverse(struct Object *ob) +void BKE_object_apply_parent_inverse(Object *ob) { /* * Use parent's world transform as the child's origin. @@ -4131,7 +4131,7 @@ bool BKE_object_empty_image_data_is_visible_in_view3d(const Object *ob, const Re return true; } -bool BKE_object_minmax_empty_drawtype(const struct Object *ob, float r_min[3], float r_max[3]) +bool BKE_object_minmax_empty_drawtype(const Object *ob, float r_min[3], float r_max[3]) { BLI_assert(ob->type == OB_EMPTY); float3 min(0), max(0); @@ -5198,7 +5198,7 @@ MovieClip *BKE_object_movieclip_get(Scene *scene, Object *ob, bool use_default) return clip; } -bool BKE_object_supports_material_slots(struct Object *ob) +bool BKE_object_supports_material_slots(Object *ob) { return ELEM(ob->type, OB_MESH, @@ -5288,7 +5288,7 @@ static void obrel_list_add(LinkNode **links, Object *ob) } LinkNode *BKE_object_relational_superset(const Scene *scene, - struct ViewLayer *view_layer, + ViewLayer *view_layer, eObjectSet objectSet, eObRelationTypes includeFilter) { @@ -5368,7 +5368,7 @@ LinkNode *BKE_object_relational_superset(const Scene *scene, return links; } -struct LinkNode *BKE_object_groups(Main *bmain, Scene *scene, Object *ob) +LinkNode *BKE_object_groups(Main *bmain, Scene *scene, Object *ob) { LinkNode *collection_linknode = nullptr; Collection *collection = nullptr; @@ -5635,7 +5635,7 @@ bool BKE_object_modifier_update_subframe(Depsgraph *depsgraph, return false; } -void BKE_object_update_select_id(struct Main *bmain) +void BKE_object_update_select_id(Main *bmain) { Object *ob = (Object *)bmain->objects.first; int select_id = 1; @@ -5693,10 +5693,7 @@ void BKE_object_check_uuids_unique_and_report(const Object *object) BKE_modifier_check_uuids_unique_and_report(object); } -void BKE_object_modifiers_lib_link_common(void *userData, - struct Object *ob, - struct ID **idpoin, - int cb_flag) +void BKE_object_modifiers_lib_link_common(void *userData, Object *ob, ID **idpoin, int cb_flag) { BlendLibReader *reader = (BlendLibReader *)userData; diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c index 640ffeebcbc..771e3856adb 100644 --- a/source/blender/blenkernel/intern/object_deform.c +++ b/source/blender/blenkernel/intern/object_deform.c @@ -383,7 +383,7 @@ void BKE_object_defgroup_remove(Object *ob, bDeformGroup *defgroup) } } -void BKE_object_defgroup_remove_all_ex(struct Object *ob, bool only_unlocked) +void BKE_object_defgroup_remove_all_ex(Object *ob, bool only_unlocked) { ListBase *defbase = BKE_object_defgroup_list_mutable(ob); @@ -421,7 +421,7 @@ void BKE_object_defgroup_remove_all_ex(struct Object *ob, bool only_unlocked) } } -void BKE_object_defgroup_remove_all(struct Object *ob) +void BKE_object_defgroup_remove_all(Object *ob) { BKE_object_defgroup_remove_all_ex(ob, false); } @@ -694,7 +694,7 @@ void BKE_object_defgroup_split_locked_validmap( } } -void BKE_object_defgroup_mirror_selection(struct Object *ob, +void BKE_object_defgroup_mirror_selection(Object *ob, int defbase_tot, const bool *dg_selection, bool *dg_flags_sel, diff --git a/source/blender/blenkernel/intern/object_dupli.cc b/source/blender/blenkernel/intern/object_dupli.cc index d38738ca6f8..b09f0829809 100644 --- a/source/blender/blenkernel/intern/object_dupli.cc +++ b/source/blender/blenkernel/intern/object_dupli.cc @@ -790,7 +790,7 @@ static void make_duplis_font(const DupliContext *ctx) GHash *family_gh; Object *ob; Curve *cu; - struct CharTrans *ct, *chartransdata = nullptr; + CharTrans *ct, *chartransdata = nullptr; float vec[3], obmat[4][4], pmat[4][4], fsize, xof, yof; int text_len, a; size_t family_len; @@ -1968,8 +1968,8 @@ bool BKE_object_dupli_find_rgba_attribute( return false; } -bool BKE_view_layer_find_rgba_attribute(struct Scene *scene, - struct ViewLayer *layer, +bool BKE_view_layer_find_rgba_attribute(Scene *scene, + ViewLayer *layer, const char *name, float r_value[4]) { diff --git a/source/blender/blenkernel/intern/object_update.cc b/source/blender/blenkernel/intern/object_update.cc index 436190d1ac6..fcfce13f831 100644 --- a/source/blender/blenkernel/intern/object_update.cc +++ b/source/blender/blenkernel/intern/object_update.cc @@ -293,15 +293,15 @@ void BKE_object_batch_cache_dirty_tag(Object *ob) { switch (ob->type) { case OB_MESH: - BKE_mesh_batch_cache_dirty_tag((struct Mesh *)ob->data, BKE_MESH_BATCH_DIRTY_ALL); + BKE_mesh_batch_cache_dirty_tag((Mesh *)ob->data, BKE_MESH_BATCH_DIRTY_ALL); break; case OB_LATTICE: - BKE_lattice_batch_cache_dirty_tag((struct Lattice *)ob->data, BKE_LATTICE_BATCH_DIRTY_ALL); + BKE_lattice_batch_cache_dirty_tag((Lattice *)ob->data, BKE_LATTICE_BATCH_DIRTY_ALL); break; case OB_CURVES_LEGACY: case OB_SURF: case OB_FONT: - BKE_curve_batch_cache_dirty_tag((struct Curve *)ob->data, BKE_CURVE_BATCH_DIRTY_ALL); + BKE_curve_batch_cache_dirty_tag((Curve *)ob->data, BKE_CURVE_BATCH_DIRTY_ALL); break; case OB_MBALL: { /* This function is currently called on original objects, so to properly @@ -313,20 +313,19 @@ void BKE_object_batch_cache_dirty_tag(Object *ob) break; } case OB_GPENCIL_LEGACY: - BKE_gpencil_batch_cache_dirty_tag((struct bGPdata *)ob->data); + BKE_gpencil_batch_cache_dirty_tag((bGPdata *)ob->data); break; case OB_CURVES: - BKE_curves_batch_cache_dirty_tag((struct Curves *)ob->data, BKE_CURVES_BATCH_DIRTY_ALL); + BKE_curves_batch_cache_dirty_tag((Curves *)ob->data, BKE_CURVES_BATCH_DIRTY_ALL); break; case OB_POINTCLOUD: - BKE_pointcloud_batch_cache_dirty_tag((struct PointCloud *)ob->data, - BKE_POINTCLOUD_BATCH_DIRTY_ALL); + BKE_pointcloud_batch_cache_dirty_tag((PointCloud *)ob->data, BKE_POINTCLOUD_BATCH_DIRTY_ALL); break; case OB_VOLUME: - BKE_volume_batch_cache_dirty_tag((struct Volume *)ob->data, BKE_VOLUME_BATCH_DIRTY_ALL); + BKE_volume_batch_cache_dirty_tag((Volume *)ob->data, BKE_VOLUME_BATCH_DIRTY_ALL); break; case OB_GREASE_PENCIL: - BKE_grease_pencil_batch_cache_dirty_tag((struct GreasePencil *)ob->data, + BKE_grease_pencil_batch_cache_dirty_tag((GreasePencil *)ob->data, BKE_GREASEPENCIL_BATCH_DIRTY_ALL); break; default: @@ -373,8 +372,7 @@ void BKE_object_data_select_update(Depsgraph *depsgraph, ID *object_data) BKE_curve_batch_cache_dirty_tag((Curve *)object_data, BKE_CURVE_BATCH_DIRTY_SELECT); break; case ID_LT: - BKE_lattice_batch_cache_dirty_tag((struct Lattice *)object_data, - BKE_LATTICE_BATCH_DIRTY_SELECT); + BKE_lattice_batch_cache_dirty_tag((Lattice *)object_data, BKE_LATTICE_BATCH_DIRTY_SELECT); break; default: break; diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index ce5fdb46c88..a1543906445 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -79,7 +79,7 @@ MINLINE float omega(float k, float depth) } /* modified Phillips spectrum */ -static float Ph(struct Ocean *o, float kx, float kz) +static float Ph(Ocean *o, float kx, float kz) { float tmp; float k2 = kx * kx + kz * kz; @@ -98,7 +98,7 @@ static float Ph(struct Ocean *o, float kx, float kz) powf(fabsf(tmp), o->_wind_alignment) / (k2 * k2); } -static void compute_eigenstuff(struct OceanResult *ocr, float jxx, float jzz, float jxz) +static void compute_eigenstuff(OceanResult *ocr, float jxx, float jzz, float jxz) { float a, b, qplus, qminus; a = jxx + jzz; @@ -185,7 +185,7 @@ float BKE_ocean_jminus_to_foam(float jminus, float coverage) return foam; } -void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u, float v) +void BKE_ocean_eval_uv(Ocean *oc, OceanResult *ocr, float u, float v) { int i0, i1, j0, j1; float frac_x, frac_z; @@ -256,7 +256,7 @@ void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u, float BLI_rw_mutex_unlock(&oc->oceanmutex); } -void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u, float v) +void BKE_ocean_eval_uv_catrom(Ocean *oc, OceanResult *ocr, float u, float v) { int i0, i1, i2, i3, j0, j1, j2, j3; float frac_x, frac_z; @@ -353,17 +353,17 @@ void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u BLI_rw_mutex_unlock(&oc->oceanmutex); } -void BKE_ocean_eval_xz(struct Ocean *oc, struct OceanResult *ocr, float x, float z) +void BKE_ocean_eval_xz(Ocean *oc, OceanResult *ocr, float x, float z) { BKE_ocean_eval_uv(oc, ocr, x / oc->_Lx, z / oc->_Lz); } -void BKE_ocean_eval_xz_catrom(struct Ocean *oc, struct OceanResult *ocr, float x, float z) +void BKE_ocean_eval_xz_catrom(Ocean *oc, OceanResult *ocr, float x, float z) { BKE_ocean_eval_uv_catrom(oc, ocr, x / oc->_Lx, z / oc->_Lz); } -void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i, int j) +void BKE_ocean_eval_ij(Ocean *oc, OceanResult *ocr, int i, int j) { BLI_rw_mutex_lock(&oc->oceanmutex, THREAD_LOCK_READ); @@ -633,12 +633,12 @@ static void ocean_compute_normal_z(TaskPool *__restrict pool, void *UNUSED(taskd fftw_execute(o->_N_z_plan); } -bool BKE_ocean_is_valid(const struct Ocean *o) +bool BKE_ocean_is_valid(const Ocean *o) { return o->_k != NULL; } -void BKE_ocean_simulate(struct Ocean *o, float t, float scale, float chop_amount) +void BKE_ocean_simulate(Ocean *o, float t, float scale, float chop_amount) { TaskPool *pool; @@ -696,7 +696,7 @@ void BKE_ocean_simulate(struct Ocean *o, float t, float scale, float chop_amount BLI_task_pool_free(pool); } -static void set_height_normalize_factor(struct Ocean *oc) +static void set_height_normalize_factor(Ocean *oc) { float res = 1.0; float max_h = 0.0; @@ -732,7 +732,7 @@ static void set_height_normalize_factor(struct Ocean *oc) oc->normalize_factor = res; } -struct Ocean *BKE_ocean_add(void) +Ocean *BKE_ocean_add(void) { Ocean *oc = MEM_callocN(sizeof(Ocean), "ocean sim data"); @@ -741,7 +741,7 @@ struct Ocean *BKE_ocean_add(void) return oc; } -bool BKE_ocean_ensure(struct OceanModifierData *omd, const int resolution) +bool BKE_ocean_ensure(OceanModifierData *omd, const int resolution) { if (omd->ocean) { /* Check that the ocean has the same resolution than we want now. */ @@ -757,9 +757,7 @@ bool BKE_ocean_ensure(struct OceanModifierData *omd, const int resolution) return true; } -bool BKE_ocean_init_from_modifier(struct Ocean *ocean, - struct OceanModifierData const *omd, - const int resolution) +bool BKE_ocean_init_from_modifier(Ocean *ocean, OceanModifierData const *omd, const int resolution) { short do_heightfield, do_chop, do_normals, do_jacobian, do_spray; @@ -795,7 +793,7 @@ bool BKE_ocean_init_from_modifier(struct Ocean *ocean, omd->seed); } -bool BKE_ocean_init(struct Ocean *o, +bool BKE_ocean_init(Ocean *o, int M, int N, float Lx, @@ -1034,7 +1032,7 @@ bool BKE_ocean_init(struct Ocean *o, return true; } -void BKE_ocean_free_data(struct Ocean *oc) +void BKE_ocean_free_data(Ocean *oc) { if (!oc) { return; @@ -1099,7 +1097,7 @@ void BKE_ocean_free_data(struct Ocean *oc) BLI_rw_mutex_unlock(&oc->oceanmutex); } -void BKE_ocean_free(struct Ocean *oc) +void BKE_ocean_free(Ocean *oc) { if (!oc) { return; @@ -1168,7 +1166,7 @@ MINLINE void value_to_rgba_unit_alpha(float r_rgba[4], const float value) r_rgba[3] = 1.0f; } -void BKE_ocean_free_cache(struct OceanCache *och) +void BKE_ocean_free_cache(OceanCache *och) { int i, f = 0; @@ -1227,8 +1225,7 @@ void BKE_ocean_free_cache(struct OceanCache *och) MEM_freeN(och); } -void BKE_ocean_cache_eval_uv( - struct OceanCache *och, struct OceanResult *ocr, int f, float u, float v) +void BKE_ocean_cache_eval_uv(OceanCache *och, OceanResult *ocr, int f, float u, float v) { int res_x = och->resolution_x; int res_y = och->resolution_y; @@ -1271,7 +1268,7 @@ void BKE_ocean_cache_eval_uv( } } -void BKE_ocean_cache_eval_ij(struct OceanCache *och, struct OceanResult *ocr, int f, int i, int j) +void BKE_ocean_cache_eval_ij(OceanCache *och, OceanResult *ocr, int f, int i, int j) { const int res_x = och->resolution_x; const int res_y = och->resolution_y; @@ -1307,15 +1304,15 @@ void BKE_ocean_cache_eval_ij(struct OceanCache *och, struct OceanResult *ocr, in } } -struct OceanCache *BKE_ocean_init_cache(const char *bakepath, - const char *relbase, - int start, - int end, - float wave_scale, - float chop_amount, - float foam_coverage, - float foam_fade, - int resolution) +OceanCache *BKE_ocean_init_cache(const char *bakepath, + const char *relbase, + int start, + int end, + float wave_scale, + float chop_amount, + float foam_coverage, + float foam_fade, + int resolution) { OceanCache *och = MEM_callocN(sizeof(OceanCache), "ocean cache data"); @@ -1345,7 +1342,7 @@ struct OceanCache *BKE_ocean_init_cache(const char *bakepath, return och; } -void BKE_ocean_simulate_cache(struct OceanCache *och, int frame) +void BKE_ocean_simulate_cache(OceanCache *och, int frame) { char filepath[FILE_MAX]; int f = frame; @@ -1379,8 +1376,8 @@ void BKE_ocean_simulate_cache(struct OceanCache *och, int frame) och->ibufs_norm[f] = IMB_loadiffname(filepath, 0, NULL); } -void BKE_ocean_bake(struct Ocean *o, - struct OceanCache *och, +void BKE_ocean_bake(Ocean *o, + OceanCache *och, void (*update_cb)(void *, float progress, int *cancel), void *update_cb_data) { @@ -1709,7 +1706,7 @@ bool BKE_ocean_init_from_modifier(struct Ocean *UNUSED(ocean), #endif /* WITH_OCEANSIM */ -void BKE_ocean_free_modifier_cache(struct OceanModifierData *omd) +void BKE_ocean_free_modifier_cache(OceanModifierData *omd) { BKE_ocean_free_cache(omd->oceancache); omd->oceancache = NULL; diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 26e382e7832..a2acc962fbf 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -2647,7 +2647,7 @@ static SculptAttribute *sculpt_alloc_attr(SculptSession *ss) return nullptr; } -SculptAttribute *BKE_sculpt_attribute_get(struct Object *ob, +SculptAttribute *BKE_sculpt_attribute_get(Object *ob, eAttrDomain domain, eCustomDataType proptype, const char *name) diff --git a/source/blender/blenkernel/intern/paint_canvas.cc b/source/blender/blenkernel/intern/paint_canvas.cc index a3c3851e435..2b5899beacb 100644 --- a/source/blender/blenkernel/intern/paint_canvas.cc +++ b/source/blender/blenkernel/intern/paint_canvas.cc @@ -69,8 +69,7 @@ bool BKE_paint_canvas_image_get(PaintModeSettings *settings, return *r_image != nullptr; } -int BKE_paint_canvas_uvmap_layer_index_get(const struct PaintModeSettings *settings, - struct Object *ob) +int BKE_paint_canvas_uvmap_layer_index_get(const PaintModeSettings *settings, Object *ob) { switch (settings->canvas_source) { case PAINT_CANVAS_SOURCE_COLOR_ATTRIBUTE: @@ -106,7 +105,7 @@ int BKE_paint_canvas_uvmap_layer_index_get(const struct PaintModeSettings *setti return -1; } -char *BKE_paint_canvas_key_get(struct PaintModeSettings *settings, struct Object *ob) +char *BKE_paint_canvas_key_get(PaintModeSettings *settings, Object *ob) { std::stringstream ss; int active_uv_map_layer_index = BKE_paint_canvas_uvmap_layer_index_get(settings, ob); diff --git a/source/blender/blenkernel/intern/paint_toolslots.c b/source/blender/blenkernel/intern/paint_toolslots.c index b63c006b4e4..048ffd59234 100644 --- a/source/blender/blenkernel/intern/paint_toolslots.c +++ b/source/blender/blenkernel/intern/paint_toolslots.c @@ -71,7 +71,7 @@ static void paint_toolslots_init_with_runtime(Main *bmain, ToolSettings *ts, Pai paint_toolslots_init(bmain, paint); } -void BKE_paint_toolslots_init_from_main(struct Main *bmain) +void BKE_paint_toolslots_init_from_main(Main *bmain) { for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { ToolSettings *ts = scene->toolsettings; diff --git a/source/blender/blenkernel/intern/particle.cc b/source/blender/blenkernel/intern/particle.cc index dda4bbe8aa8..569a050a806 100644 --- a/source/blender/blenkernel/intern/particle.cc +++ b/source/blender/blenkernel/intern/particle.cc @@ -769,7 +769,7 @@ ParticleSystem *psys_orig_get(ParticleSystem *psys) return psys->orig_psys; } -struct ParticleSystem *psys_eval_get(Depsgraph *depsgraph, Object *object, ParticleSystem *psys) +ParticleSystem *psys_eval_get(Depsgraph *depsgraph, Object *object, ParticleSystem *psys) { Object *object_eval = DEG_get_evaluated_object(depsgraph, object); if (object_eval == object) { @@ -1942,7 +1942,7 @@ int psys_particle_dm_face_lookup(Mesh *mesh_final, Mesh *mesh_original, int findex_orig, const float fw[4], - struct LinkNode **poly_nodes) + LinkNode **poly_nodes) { MFace *mtessface_final; const OrigSpaceFace *osface_final; @@ -2884,7 +2884,7 @@ static void psys_task_init_path(ParticleTask *task, ParticleSimulationData *sim) /* NOTE: this function must be thread safe, except for branching! */ static void psys_thread_create_path(ParticleTask *task, - struct ChildParticle *cpa, + ChildParticle *cpa, ParticleCacheKey *child_keys, int i) { diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c index 8740a0131c1..c244f1fbd12 100644 --- a/source/blender/blenkernel/intern/particle_child.c +++ b/source/blender/blenkernel/intern/particle_child.c @@ -132,7 +132,7 @@ static void do_kink_spiral(ParticleThreadContext *ctx, int *r_totkeys, float *r_max_length) { - struct ParticleSettings *part = ctx->sim.psys->part; + ParticleSettings *part = ctx->sim.psys->part; const int seed = ctx->sim.psys->child_seed + (int)(cpa - ctx->sim.psys->child); const int totkeys = ctx->segments + 1; const int extrakeys = ctx->extra_segments; @@ -289,7 +289,7 @@ static bool check_path_length(int k, } void psys_apply_child_modifiers(ParticleThreadContext *ctx, - struct ListBase *UNUSED(modifiers), + ListBase *UNUSED(modifiers), ChildParticle *cpa, ParticleTexture *ptex, const float orco[3], @@ -298,8 +298,8 @@ void psys_apply_child_modifiers(ParticleThreadContext *ctx, ParticleCacheKey *parent_keys, const float parent_orco[3]) { - struct ParticleSettings *part = ctx->sim.psys->part; - struct Material *ma = ctx->ma; + ParticleSettings *part = ctx->sim.psys->part; + Material *ma = ctx->ma; const bool draw_col_ma = (part->draw_col == PART_DRAW_COL_MAT); const bool use_length_check = !ELEM(part->kink, PART_KINK_SPIRAL); diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 7bcd9615440..872ae8601d0 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1035,10 +1035,7 @@ void psys_get_birth_coords( } /* recursively evaluate emitter parent anim at cfra */ -static void evaluate_emitter_anim(struct Depsgraph *depsgraph, - Scene *scene, - Object *ob, - float cfra) +static void evaluate_emitter_anim(Depsgraph *depsgraph, Scene *scene, Object *ob, float cfra) { if (ob->parent) { evaluate_emitter_anim(depsgraph, scene, ob->parent, cfra); @@ -4766,7 +4763,7 @@ static void particle_settings_free_local(ParticleSettings *particle_settings) MEM_freeN(particle_settings); } -void particle_system_update(struct Depsgraph *depsgraph, +void particle_system_update(Depsgraph *depsgraph, Scene *scene, Object *ob, ParticleSystem *psys, @@ -5037,7 +5034,7 @@ void BKE_particlesystem_id_loop(ParticleSystem *psys, ParticleSystemIDFunc func, } } -void BKE_particlesystem_reset_all(struct Object *object) +void BKE_particlesystem_reset_all(Object *object) { for (ModifierData *md = object->modifiers.first; md != NULL; md = md->next) { if (md->type != eModifierType_ParticleSystem) { @@ -5051,14 +5048,13 @@ void BKE_particlesystem_reset_all(struct Object *object) /* **** Depsgraph evaluation **** */ -void BKE_particle_settings_eval_reset(struct Depsgraph *depsgraph, - ParticleSettings *particle_settings) +void BKE_particle_settings_eval_reset(Depsgraph *depsgraph, ParticleSettings *particle_settings) { DEG_debug_print_eval(depsgraph, __func__, particle_settings->id.name, particle_settings); particle_settings->id.recalc |= ID_RECALC_PSYS_RESET; } -void BKE_particle_system_eval_init(struct Depsgraph *depsgraph, Object *object) +void BKE_particle_system_eval_init(Depsgraph *depsgraph, Object *object) { DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); for (ParticleSystem *psys = object->particlesystem.first; psys != NULL; psys = psys->next) { diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 720cf3ad2a3..5ce69f1acf0 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -849,7 +849,7 @@ static int ptcache_rigidbody_totpoint(void *rb_v, int UNUSED(cfra)) return rbw->numbodies; } -static void ptcache_rigidbody_error(const struct ID *UNUSED(owner_id), +static void ptcache_rigidbody_error(const ID *UNUSED(owner_id), void *UNUSED(rb_v), const char *UNUSED(message)) { @@ -995,7 +995,7 @@ void BKE_ptcache_id_from_cloth(PTCacheID *pid, Object *ob, ClothModifierData *cl pid->file_type = PTCACHE_FILE_PTCACHE; } -void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct FluidModifierData *fmd) +void BKE_ptcache_id_from_smoke(PTCacheID *pid, Object *ob, FluidModifierData *fmd) { FluidDomainSettings *fds = fmd->domain; @@ -1260,7 +1260,7 @@ static bool ptcache_object_has_cb(PTCacheID *UNUSED(pid), void *UNUSED(userdata) return false; } -bool BKE_ptcache_object_has(struct Scene *scene, struct Object *ob, int duplis) +bool BKE_ptcache_object_has(Scene *scene, Object *ob, int duplis) { return !foreach_object_ptcache(scene, ob, duplis, ptcache_object_has_cb, NULL); } diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc index 83c4d852b7f..83d5be1b29c 100644 --- a/source/blender/blenkernel/intern/pointcloud.cc +++ b/source/blender/blenkernel/intern/pointcloud.cc @@ -320,14 +320,14 @@ bool BKE_pointcloud_attribute_required(const PointCloud * /*pointcloud*/, const /* Dependency Graph */ -PointCloud *BKE_pointcloud_copy_for_eval(struct PointCloud *pointcloud_src) +PointCloud *BKE_pointcloud_copy_for_eval(PointCloud *pointcloud_src) { return reinterpret_cast( BKE_id_copy_ex(nullptr, &pointcloud_src->id, nullptr, LIB_ID_COPY_LOCALIZE)); } -static void pointcloud_evaluate_modifiers(struct Depsgraph *depsgraph, - struct Scene *scene, +static void pointcloud_evaluate_modifiers(Depsgraph *depsgraph, + Scene *scene, Object *object, GeometrySet &geometry_set) { @@ -379,7 +379,7 @@ static PointCloud *take_pointcloud_ownership_from_geometry_set(GeometrySet &geom return pointcloud; } -void BKE_pointcloud_data_update(struct Depsgraph *depsgraph, struct Scene *scene, Object *object) +void BKE_pointcloud_data_update(Depsgraph *depsgraph, Scene *scene, Object *object) { /* Free any evaluated data and restore original data. */ BKE_object_free_derived_caches(object); diff --git a/source/blender/blenkernel/intern/pose_backup.cc b/source/blender/blenkernel/intern/pose_backup.cc index e5d9a2a5991..4476c45d521 100644 --- a/source/blender/blenkernel/intern/pose_backup.cc +++ b/source/blender/blenkernel/intern/pose_backup.cc @@ -27,12 +27,12 @@ using namespace blender::bke; /* simple struct for storing backup info for one pose channel */ struct PoseChannelBackup { - struct PoseChannelBackup *next, *prev; + PoseChannelBackup *next, *prev; - struct bPoseChannel *pchan; /* Pose channel this backup is for. */ + bPoseChannel *pchan; /* Pose channel this backup is for. */ - struct bPoseChannel olddata; /* Backup of pose channel. */ - struct IDProperty *oldprops; /* Backup copy (needs freeing) of pose channel's ID properties. */ + bPoseChannel olddata; /* Backup of pose channel. */ + IDProperty *oldprops; /* Backup copy (needs freeing) of pose channel's ID properties. */ }; struct PoseBackup { @@ -108,7 +108,7 @@ PoseBackup *BKE_pose_backup_create_selected_bones(const Object *ob, const bActio return pose_backup_create(ob, action, selected_bone_names); } -bool BKE_pose_backup_is_selection_relevant(const struct PoseBackup *pose_backup) +bool BKE_pose_backup_is_selection_relevant(const PoseBackup *pose_backup) { return pose_backup->is_bone_selection_relevant; } @@ -145,7 +145,7 @@ void BKE_pose_backup_create_on_object(Object *ob, const bAction *action) ob->runtime.pose_backup = pose_backup; } -bool BKE_pose_backup_restore_on_object(struct Object *ob) +bool BKE_pose_backup_restore_on_object(Object *ob) { if (ob->runtime.pose_backup == nullptr) { return false; diff --git a/source/blender/blenkernel/intern/scene.cc b/source/blender/blenkernel/intern/scene.cc index 52216682205..f55478e36ba 100644 --- a/source/blender/blenkernel/intern/scene.cc +++ b/source/blender/blenkernel/intern/scene.cc @@ -464,7 +464,7 @@ static void scene_free_data(ID *id) BLI_assert(scene->layer_properties == nullptr); } -static void scene_foreach_rigidbodyworldSceneLooper(struct RigidBodyWorld * /*rbw*/, +static void scene_foreach_rigidbodyworldSceneLooper(RigidBodyWorld * /*rbw*/, ID **id_pointer, void *user_data, int cb_flag) @@ -1220,7 +1220,7 @@ static void scene_blend_read_data(BlendDataReader *reader, ID *id) /* Reset last_location and last_hit, so they are not remembered across sessions. In some files * these are also NaN, which could lead to crashes in painting. */ - struct UnifiedPaintSettings *ups = &sce->toolsettings->unified_paint_settings; + UnifiedPaintSettings *ups = &sce->toolsettings->unified_paint_settings; zero_v3(ups->last_location); ups->last_hit = 0; @@ -2494,10 +2494,7 @@ int BKE_scene_frame_snap_by_seconds(Scene *scene, double interval_in_seconds, in return (delta_prev < delta_next) ? second_prev : second_next; } -void BKE_scene_remove_rigidbody_object(struct Main *bmain, - Scene *scene, - Object *ob, - const bool free_us) +void BKE_scene_remove_rigidbody_object(Main *bmain, Scene *scene, Object *ob, const bool free_us) { /* remove rigid body constraint from world before removing object */ if (ob->rigidbody_constraint) { @@ -3092,10 +3089,7 @@ int BKE_scene_num_threads(const Scene *scene) return BKE_render_num_threads(&scene->r); } -void BKE_render_resolution(const struct RenderData *r, - const bool use_crop, - int *r_width, - int *r_height) +void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height) { *r_width = (r->xsch * r->size) / 100; *r_height = (r->ysch * r->size) / 100; diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 03cc9cb1087..2c7e4ac60a2 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -656,17 +656,14 @@ ARegion *BKE_spacedata_find_region_type(const SpaceLink *slink, return region; } -static void (*spacedata_id_remap_cb)(struct ScrArea *area, - struct SpaceLink *sl, - ID *old_id, - ID *new_id) = NULL; +static void (*spacedata_id_remap_cb)(ScrArea *area, SpaceLink *sl, ID *old_id, ID *new_id) = NULL; void BKE_spacedata_callback_id_remap_set(void (*func)(ScrArea *area, SpaceLink *sl, ID *, ID *)) { spacedata_id_remap_cb = func; } -void BKE_spacedata_id_unref(struct ScrArea *area, struct SpaceLink *sl, struct ID *id) +void BKE_spacedata_id_unref(ScrArea *area, SpaceLink *sl, ID *id) { if (spacedata_id_remap_cb) { spacedata_id_remap_cb(area, sl, id, NULL); @@ -683,7 +680,7 @@ void BKE_region_callback_refresh_tag_gizmomap_set(void (*callback)(struct wmGizm region_refresh_tag_gizmomap_callback = callback; } -void BKE_screen_gizmo_tag_refresh(struct bScreen *screen) +void BKE_screen_gizmo_tag_refresh(bScreen *screen) { if (region_refresh_tag_gizmomap_callback == NULL) { return; @@ -1029,7 +1026,7 @@ ARegion *BKE_screen_find_region_xy(bScreen *screen, const int regiontype, const return NULL; } -ScrArea *BKE_screen_find_area_from_space(struct bScreen *screen, SpaceLink *sl) +ScrArea *BKE_screen_find_area_from_space(bScreen *screen, SpaceLink *sl) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { if (BLI_findindex(&area->spacedata, sl) != -1) { @@ -1082,7 +1079,7 @@ ScrArea *BKE_screen_find_area_xy(bScreen *screen, const int spacetype, const int return BKE_screen_area_map_find_area_xy(AREAMAP_FROM_SCREEN(screen), spacetype, xy); } -void BKE_screen_view3d_sync(View3D *v3d, struct Scene *scene) +void BKE_screen_view3d_sync(View3D *v3d, Scene *scene) { if (v3d->scenelock && v3d->localvd == NULL) { v3d->camera = scene->camera; diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 622e95f20fe..36d098286b9 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -973,7 +973,7 @@ static int query_external_colliders(Depsgraph *depsgraph, Collection *collection /* +++ the aabb "force" section. */ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), - struct Object *vertexowner, + Object *vertexowner, float UNUSED(time)) { Object *ob; @@ -1036,7 +1036,7 @@ static int sb_detect_face_pointCached(const float face_v1[3], const float face_v3[3], float *damp, float force[3], - struct Object *vertexowner, + Object *vertexowner, float time) { Object *ob; @@ -1135,7 +1135,7 @@ static int sb_detect_face_collisionCached(const float face_v1[3], const float face_v3[3], float *damp, float force[3], - struct Object *vertexowner, + Object *vertexowner, float time) { Object *ob; @@ -1318,7 +1318,7 @@ static int sb_detect_edge_collisionCached(const float edge_v1[3], const float edge_v2[3], float *damp, float force[3], - struct Object *vertexowner, + Object *vertexowner, float time) { Object *ob; @@ -1430,7 +1430,7 @@ static int sb_detect_edge_collisionCached(const float edge_v1[3], } static void _scan_for_ext_spring_forces( - Scene *scene, Object *ob, float timenow, int ifirst, int ilast, struct ListBase *effectors) + Scene *scene, Object *ob, float timenow, int ifirst, int ilast, ListBase *effectors) { SoftBody *sb = ob->soft; int a; @@ -1512,9 +1512,9 @@ static void *exec_scan_for_ext_spring_forces(void *data) return NULL; } -static void sb_sfesf_threads_run(struct Depsgraph *depsgraph, +static void sb_sfesf_threads_run(Depsgraph *depsgraph, Scene *scene, - struct Object *ob, + Object *ob, float timenow, int totsprings, int *UNUSED(ptr_to_break_func(void))) @@ -1615,7 +1615,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], float *damp, float force[3], - struct Object *vertexowner, + Object *vertexowner, float time, float vel[3], float *intrusion) @@ -2195,7 +2195,7 @@ static void sb_cf_threads_run(Scene *scene, float timenow, int totpoint, int *UNUSED(ptr_to_break_func(void)), - struct ListBase *effectors, + ListBase *effectors, int do_deflector, float fieldfactor, float windfactor) @@ -2258,7 +2258,7 @@ static void sb_cf_threads_run(Scene *scene, } static void softbody_calc_forces( - struct Depsgraph *depsgraph, Scene *scene, Object *ob, float forcetime, float timenow) + Depsgraph *depsgraph, Scene *scene, Object *ob, float forcetime, float timenow) { /* rule we never alter free variables :bp->vec bp->pos in here ! * this will ruin adaptive stepsize AKA heun! (BM) @@ -3347,7 +3347,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int } static void softbody_step( - struct Depsgraph *depsgraph, Scene *scene, Object *ob, SoftBody *sb, float dtime) + Depsgraph *depsgraph, Scene *scene, Object *ob, SoftBody *sb, float dtime) { /* the simulator */ float forcetime; @@ -3497,7 +3497,7 @@ static void softbody_step( } } -static void sbStoreLastFrame(struct Depsgraph *depsgraph, Object *object, float framenr) +static void sbStoreLastFrame(Depsgraph *depsgraph, Object *object, float framenr) { if (!DEG_is_active(depsgraph)) { return; @@ -3507,7 +3507,7 @@ static void sbStoreLastFrame(struct Depsgraph *depsgraph, Object *object, float object_orig->soft->last_frame = framenr; } -void sbObjectStep(struct Depsgraph *depsgraph, +void sbObjectStep(Depsgraph *depsgraph, Scene *scene, Object *ob, float cfra, diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 7e6f7f333c3..10c7f0bcca0 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -1239,7 +1239,7 @@ static bool sound_info_from_playback_handle(void *playback_handle, SoundInfo *so return true; } -bool BKE_sound_info_get(struct Main *main, struct bSound *sound, SoundInfo *sound_info) +bool BKE_sound_info_get(Main *main, bSound *sound, SoundInfo *sound_info) { if (sound->playback_handle != NULL) { return sound_info_from_playback_handle(sound->playback_handle, sound_info); @@ -1253,7 +1253,7 @@ bool BKE_sound_info_get(struct Main *main, struct bSound *sound, SoundInfo *soun return result; } -bool BKE_sound_stream_info_get(struct Main *main, +bool BKE_sound_stream_info_get(Main *main, const char *filepath, int stream, SoundStreamInfo *sound_info) @@ -1434,7 +1434,7 @@ void BKE_sound_reset_scene_runtime(Scene *scene) scene->speaker_handles = NULL; } -void BKE_sound_ensure_scene(struct Scene *scene) +void BKE_sound_ensure_scene(Scene *scene) { if (scene->sound_scene != NULL) { return; diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c index a0ab3c5817e..11534556d1d 100644 --- a/source/blender/blenkernel/intern/studiolight.c +++ b/source/blender/blenkernel/intern/studiolight.c @@ -104,7 +104,7 @@ static const char *STUDIOLIGHT_MATCAP_DEFAULT = "basic_1.exr"; } \ } while (0) -static void studiolight_free(struct StudioLight *sl) +static void studiolight_free(StudioLight *sl) { #define STUDIOLIGHT_DELETE_ICON(s) \ do { \ @@ -139,9 +139,9 @@ static void studiolight_free(struct StudioLight *sl) MEM_SAFE_FREE(sl); } -static struct StudioLight *studiolight_create(int flag) +static StudioLight *studiolight_create(int flag) { - struct StudioLight *sl = MEM_callocN(sizeof(*sl), __func__); + StudioLight *sl = MEM_callocN(sizeof(*sl), __func__); sl->filepath[0] = 0x00; sl->name[0] = 0x00; sl->path_irr_cache = NULL; @@ -1445,13 +1445,13 @@ void BKE_studiolight_init(void) void BKE_studiolight_free(void) { - struct StudioLight *sl; + StudioLight *sl; while ((sl = BLI_pophead(&studiolights))) { studiolight_free(sl); } } -struct StudioLight *BKE_studiolight_find_default(int flag) +StudioLight *BKE_studiolight_find_default(int flag) { const char *default_name = ""; @@ -1476,7 +1476,7 @@ struct StudioLight *BKE_studiolight_find_default(int flag) return NULL; } -struct StudioLight *BKE_studiolight_find(const char *name, int flag) +StudioLight *BKE_studiolight_find(const char *name, int flag) { LISTBASE_FOREACH (StudioLight *, sl, &studiolights) { if (STREQLEN(sl->name, name, FILE_MAXFILE)) { @@ -1492,7 +1492,7 @@ struct StudioLight *BKE_studiolight_find(const char *name, int flag) return BKE_studiolight_find_default(flag); } -struct StudioLight *BKE_studiolight_findindex(int index, int flag) +StudioLight *BKE_studiolight_findindex(int index, int flag) { LISTBASE_FOREACH (StudioLight *, sl, &studiolights) { if (sl->index == index) { @@ -1503,7 +1503,7 @@ struct StudioLight *BKE_studiolight_findindex(int index, int flag) return BKE_studiolight_find_default(flag); } -struct ListBase *BKE_studiolight_listbase(void) +ListBase *BKE_studiolight_listbase(void) { return &studiolights; } diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 46e10d147c3..66f460ac87f 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2170,7 +2170,7 @@ bool txt_unindent(Text *text) return txt_select_unprefix(text, prefix, false); } -void txt_move_lines(struct Text *text, const int direction) +void txt_move_lines(Text *text, const int direction) { TextLine *line_other; diff --git a/source/blender/blenkernel/intern/texture.cc b/source/blender/blenkernel/intern/texture.cc index 3380acbaa8f..bbac3216f4f 100644 --- a/source/blender/blenkernel/intern/texture.cc +++ b/source/blender/blenkernel/intern/texture.cc @@ -676,7 +676,7 @@ void BKE_texture_pointdensity_free(PointDensity *pd) } /* ------------------------------------------------------------------------- */ -bool BKE_texture_is_image_user(const struct Tex *tex) +bool BKE_texture_is_image_user(const Tex *tex) { switch (tex->type) { case TEX_IMAGE: { @@ -687,7 +687,7 @@ bool BKE_texture_is_image_user(const struct Tex *tex) return false; } -bool BKE_texture_dependsOnTime(const struct Tex *texture) +bool BKE_texture_dependsOnTime(const Tex *texture) { if (texture->ima && BKE_image_is_animated(texture->ima)) { return true; @@ -709,7 +709,7 @@ void BKE_texture_get_value_ex(const Scene *scene, Tex *texture, const float *tex_co, TexResult *texres, - struct ImagePool *pool, + ImagePool *pool, bool use_color_management) { int result_type; @@ -743,9 +743,7 @@ void BKE_texture_get_value(const Scene *scene, BKE_texture_get_value_ex(scene, texture, tex_co, texres, nullptr, use_color_management); } -static void texture_nodes_fetch_images_for_pool(Tex *texture, - bNodeTree *ntree, - struct ImagePool *pool) +static void texture_nodes_fetch_images_for_pool(Tex *texture, bNodeTree *ntree, ImagePool *pool) { for (bNode *node : ntree->all_nodes()) { if (node->type == SH_NODE_TEX_IMAGE && node->id != nullptr) { @@ -760,7 +758,7 @@ static void texture_nodes_fetch_images_for_pool(Tex *texture, } } -void BKE_texture_fetch_images_for_pool(Tex *texture, struct ImagePool *pool) +void BKE_texture_fetch_images_for_pool(Tex *texture, ImagePool *pool) { if (texture->nodetree != nullptr) { texture_nodes_fetch_images_for_pool(texture, texture->nodetree, pool); diff --git a/source/blender/blenkernel/intern/tracking.cc b/source/blender/blenkernel/intern/tracking.cc index 3c423fb8578..ef96184bb9d 100644 --- a/source/blender/blenkernel/intern/tracking.cc +++ b/source/blender/blenkernel/intern/tracking.cc @@ -51,7 +51,7 @@ #include "tracking_private.h" typedef struct MovieDistortion { - struct libmv_CameraIntrinsics *intrinsics; + libmv_CameraIntrinsics *intrinsics; /* Parameters needed for coordinates normalization. */ float principal_px[2]; float pixel_aspect; @@ -610,7 +610,7 @@ void BKE_tracking_tracks_first_last_frame_minmax(/*const*/ MovieTrackingTrack ** *r_first_frame = INT_MAX; *r_last_frame = INT_MIN; for (int i = 0; i < num_tracks; ++i) { - const struct MovieTrackingTrack *track = tracks[i]; + const MovieTrackingTrack *track = tracks[i]; int track_first_frame, track_last_frame; BKE_tracking_track_first_last_frame_get(track, &track_first_frame, &track_last_frame); *r_first_frame = min_ii(*r_first_frame, track_first_frame); @@ -1418,9 +1418,7 @@ MovieTrackingMarker *BKE_tracking_marker_ensure(MovieTrackingTrack *track, int f } static const MovieTrackingMarker *get_usable_marker_for_interpolation( - struct MovieTrackingTrack *track, - const MovieTrackingMarker *anchor_marker, - const int direction) + MovieTrackingTrack *track, const MovieTrackingMarker *anchor_marker, const int direction) { BLI_assert(ELEM(direction, -1, 1)); @@ -1437,9 +1435,9 @@ static const MovieTrackingMarker *get_usable_marker_for_interpolation( return nullptr; } -bool BKE_tracking_marker_get_interpolated(struct MovieTrackingTrack *track, +bool BKE_tracking_marker_get_interpolated(MovieTrackingTrack *track, const int framenr, - struct MovieTrackingMarker *r_marker) + MovieTrackingMarker *r_marker) { const MovieTrackingMarker *closest_marker = BKE_tracking_marker_get(track, framenr); if (closest_marker == nullptr) { @@ -2173,7 +2171,7 @@ void BKE_tracking_camera_get_reconstructed_interpolate(MovieTracking * /*trackin reconstructed_camera_scale_set(tracking_object, mat); } -void BKE_tracking_camera_principal_point_pixel_get(struct MovieClip *clip, +void BKE_tracking_camera_principal_point_pixel_get(MovieClip *clip, float r_principal_point_pixel[2]) { const MovieTrackingCamera *camera = &clip->tracking.camera; @@ -2186,7 +2184,7 @@ void BKE_tracking_camera_principal_point_pixel_get(struct MovieClip *clip, camera->principal_point, frame_width, frame_height, r_principal_point_pixel); } -void BKE_tracking_camera_principal_point_pixel_set(struct MovieClip *clip, +void BKE_tracking_camera_principal_point_pixel_set(MovieClip *clip, const float principal_point_pixel[2]) { MovieTrackingCamera *camera = &clip->tracking.camera; @@ -3403,8 +3401,8 @@ MovieTrackingObject *BKE_tracking_find_object_for_plane_track( return nullptr; } -void BKE_tracking_get_rna_path_for_track(const struct MovieTracking *tracking, - const struct MovieTrackingTrack *track, +void BKE_tracking_get_rna_path_for_track(const MovieTracking *tracking, + const MovieTrackingTrack *track, char *rna_path, size_t rna_path_maxncpy) { @@ -3425,8 +3423,8 @@ void BKE_tracking_get_rna_path_for_track(const struct MovieTracking *tracking, } } -void BKE_tracking_get_rna_path_prefix_for_track(const struct MovieTracking *tracking, - const struct MovieTrackingTrack *track, +void BKE_tracking_get_rna_path_prefix_for_track(const MovieTracking *tracking, + const MovieTrackingTrack *track, char *rna_path, size_t rna_path_maxncpy) { @@ -3441,8 +3439,8 @@ void BKE_tracking_get_rna_path_prefix_for_track(const struct MovieTracking *trac } } -void BKE_tracking_get_rna_path_for_plane_track(const struct MovieTracking *tracking, - const struct MovieTrackingPlaneTrack *plane_track, +void BKE_tracking_get_rna_path_for_plane_track(const MovieTracking *tracking, + const MovieTrackingPlaneTrack *plane_track, char *rna_path, size_t rna_path_maxncpy) { @@ -3464,11 +3462,10 @@ void BKE_tracking_get_rna_path_for_plane_track(const struct MovieTracking *track } } -void BKE_tracking_get_rna_path_prefix_for_plane_track( - const struct MovieTracking *tracking, - const struct MovieTrackingPlaneTrack *plane_track, - char *rna_path, - size_t rna_path_maxncpy) +void BKE_tracking_get_rna_path_prefix_for_plane_track(const MovieTracking *tracking, + const MovieTrackingPlaneTrack *plane_track, + char *rna_path, + size_t rna_path_maxncpy) { MovieTrackingObject *tracking_object = BKE_tracking_find_object_for_plane_track(tracking, plane_track); diff --git a/source/blender/blenkernel/intern/tracking_auto.cc b/source/blender/blenkernel/intern/tracking_auto.cc index ff317321ace..f6ee7f3f863 100644 --- a/source/blender/blenkernel/intern/tracking_auto.cc +++ b/source/blender/blenkernel/intern/tracking_auto.cc @@ -66,7 +66,7 @@ typedef struct AutoTrackMarker { * On failure marker's frame number is initialized to frame number where it was attempted to be * tracked to. The position and other fields of tracked marker are the same as the input. */ typedef struct AutoTrackTrackingResult { - struct AutoTrackTrackingResult *next, *prev; + AutoTrackTrackingResult *next, *prev; bool success; libmv_Marker libmv_marker; @@ -117,7 +117,7 @@ typedef struct AutoTrackContext { /* Auto-track context. * * NOTE: Is accessed from multiple threads at once. */ - struct libmv_AutoTrack *autotrack; + libmv_AutoTrack *autotrack; /* Markers from the current frame which will be tracked to the next frame upon the tracking * context step. diff --git a/source/blender/blenkernel/intern/tracking_detect.cc b/source/blender/blenkernel/intern/tracking_detect.cc index 7e53ff473b7..48b04271a48 100644 --- a/source/blender/blenkernel/intern/tracking_detect.cc +++ b/source/blender/blenkernel/intern/tracking_detect.cc @@ -71,7 +71,7 @@ static bool check_point_in_layer(bGPDlayer *layer, float x, float y) /* Get features detected by libmv and create tracks on the clip for them. */ static void detect_retrieve_libmv_features(MovieTracking *tracking, ListBase *tracksbase, - struct libmv_Features *features, + libmv_Features *features, int framenr, int width, int height, @@ -116,7 +116,7 @@ static void run_configured_detector(MovieTracking *tracking, bool place_outside_layer, libmv_DetectOptions *options) { - struct libmv_Features *features = nullptr; + libmv_Features *features = nullptr; if (ibuf->float_buffer.data) { features = libmv_detectFeaturesFloat(ibuf->float_buffer.data, ibuf->x, ibuf->y, 4, options); diff --git a/source/blender/blenkernel/intern/tracking_solver.cc b/source/blender/blenkernel/intern/tracking_solver.cc index 2b8d72ee0d7..21bf022565e 100644 --- a/source/blender/blenkernel/intern/tracking_solver.cc +++ b/source/blender/blenkernel/intern/tracking_solver.cc @@ -33,12 +33,12 @@ #include "tracking_private.h" typedef struct MovieReconstructContext { - struct libmv_Tracks *tracks; + libmv_Tracks *tracks; bool select_keyframes; int keyframe1, keyframe2; int refine_flags; - struct libmv_Reconstruction *reconstruction; + libmv_Reconstruction *reconstruction; char object_name[MAX_NAME]; short motion_flag; @@ -64,14 +64,11 @@ typedef struct ReconstructProgressData { } ReconstructProgressData; /* Create new libmv Tracks structure from blender's tracks list. */ -static struct libmv_Tracks *libmv_tracks_new(MovieClip *clip, - ListBase *tracksbase, - int width, - int height) +static libmv_Tracks *libmv_tracks_new(MovieClip *clip, ListBase *tracksbase, int width, int height) { int tracknr = 0; MovieTrackingTrack *track; - struct libmv_Tracks *tracks = libmv_tracksNew(); + libmv_Tracks *tracks = libmv_tracksNew(); track = static_cast(tracksbase->first); while (track) { @@ -109,8 +106,8 @@ static struct libmv_Tracks *libmv_tracks_new(MovieClip *clip, static void reconstruct_retrieve_libmv_intrinsics(MovieReconstructContext *context, MovieTracking *tracking) { - struct libmv_Reconstruction *libmv_reconstruction = context->reconstruction; - struct libmv_CameraIntrinsics *libmv_intrinsics = libmv_reconstructionExtractIntrinsics( + libmv_Reconstruction *libmv_reconstruction = context->reconstruction; + libmv_CameraIntrinsics *libmv_intrinsics = libmv_reconstructionExtractIntrinsics( libmv_reconstruction); libmv_CameraIntrinsicsOptions camera_intrinsics_options; @@ -126,7 +123,7 @@ static void reconstruct_retrieve_libmv_intrinsics(MovieReconstructContext *conte static bool reconstruct_retrieve_libmv_tracks(MovieReconstructContext *context, MovieTracking *tracking) { - struct libmv_Reconstruction *libmv_reconstruction = context->reconstruction; + libmv_Reconstruction *libmv_reconstruction = context->reconstruction; bool ok = true; bool origin_set = false; int sfra = context->sfra, efra = context->efra; diff --git a/source/blender/blenkernel/intern/tracking_stabilize.cc b/source/blender/blenkernel/intern/tracking_stabilize.cc index c9544c7561a..14cd5003c45 100644 --- a/source/blender/blenkernel/intern/tracking_stabilize.cc +++ b/source/blender/blenkernel/intern/tracking_stabilize.cc @@ -1285,7 +1285,7 @@ void BKE_tracking_stabilization_data_get(MovieClip *clip, discard_stabilization_working_context(ctx); } -typedef void (*interpolation_func)(const struct ImBuf *, struct ImBuf *, float, float, int, int); +typedef void (*interpolation_func)(const ImBuf *, ImBuf *, float, float, int, int); typedef struct TrackingStabilizeFrameInterpolationData { ImBuf *ibuf; diff --git a/source/blender/blenkernel/intern/tracking_util.cc b/source/blender/blenkernel/intern/tracking_util.cc index dbb7360d865..697708a6da2 100644 --- a/source/blender/blenkernel/intern/tracking_util.cc +++ b/source/blender/blenkernel/intern/tracking_util.cc @@ -781,7 +781,7 @@ static ImBuf *accessor_get_ibuf(TrackingImageAccessor *accessor, return final_ibuf; } -static libmv_CacheKey accessor_get_image_callback(struct libmv_FrameAccessorUserData *user_data, +static libmv_CacheKey accessor_get_image_callback(libmv_FrameAccessorUserData *user_data, int clip_index, int frame, libmv_InputMode input_mode, diff --git a/source/blender/blenkernel/intern/undo_system.cc b/source/blender/blenkernel/intern/undo_system.cc index a42cda120a9..d676f79d534 100644 --- a/source/blender/blenkernel/intern/undo_system.cc +++ b/source/blender/blenkernel/intern/undo_system.cc @@ -326,7 +326,7 @@ static void undosys_stack_clear_all_first(UndoStack *ustack, UndoStep *us, UndoS } } -static bool undosys_stack_push_main(UndoStack *ustack, const char *name, struct Main *bmain) +static bool undosys_stack_push_main(UndoStack *ustack, const char *name, Main *bmain) { UNDO_NESTED_ASSERT(false); BLI_assert(ustack->step_init == nullptr); @@ -339,7 +339,7 @@ static bool undosys_stack_push_main(UndoStack *ustack, const char *name, struct return (ret & UNDO_PUSH_RET_SUCCESS); } -void BKE_undosys_stack_init_from_main(UndoStack *ustack, struct Main *bmain) +void BKE_undosys_stack_init_from_main(UndoStack *ustack, Main *bmain) { UNDO_NESTED_ASSERT(false); undosys_stack_push_main(ustack, IFACE_("Original"), bmain); diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index d085ab48d4c..df1fd9ad2c0 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -109,7 +109,7 @@ enum { /* Define a single unit system. */ typedef struct bUnitCollection { - const struct bUnitDef *units; + const bUnitDef *units; /** Basic unit index (when user doesn't specify unit explicitly). */ int base_unit; /** Options for this system. */ @@ -125,11 +125,11 @@ typedef struct bUnitCollection { #define NULL_UNIT {NULL, NULL, NULL, NULL, NULL, NULL, 0.0, 0.0} /* Dummy */ -static struct bUnitDef buDummyDef[] = { {"", NULL, "", NULL, NULL, NULL, 1.0, 0.0}, NULL_UNIT}; -static struct bUnitCollection buDummyCollection = {buDummyDef, 0, 0, sizeof(buDummyDef)}; +static bUnitDef buDummyDef[] = { {"", NULL, "", NULL, NULL, NULL, 1.0, 0.0}, NULL_UNIT}; +static bUnitCollection buDummyCollection = {buDummyDef, 0, 0, sizeof(buDummyDef)}; /* Lengths. */ -static struct bUnitDef buMetricLenDef[] = { +static bUnitDef buMetricLenDef[] = { {"kilometer", "kilometers", "km", NULL, "Kilometers", "KILOMETERS", UN_SC_KM, 0.0, B_UNIT_DEF_NONE}, {"hectometer", "hectometers", "hm", NULL, "100 Meters", "HECTOMETERS", UN_SC_HM, 0.0, B_UNIT_DEF_SUPPRESS}, {"dekameter", "dekameters", "dam", NULL, "10 Meters", "DEKAMETERS", UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS}, @@ -147,9 +147,9 @@ static struct bUnitDef buMetricLenDef[] = { #endif NULL_UNIT, }; -static const struct bUnitCollection buMetricLenCollection = {buMetricLenDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricLenDef)}; +static const bUnitCollection buMetricLenCollection = {buMetricLenDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricLenDef)}; -static struct bUnitDef buImperialLenDef[] = { +static bUnitDef buImperialLenDef[] = { {"mile", "miles", "mi", NULL, "Miles", "MILES", UN_SC_MI, 0.0, B_UNIT_DEF_NONE}, {"furlong", "furlongs", "fur", NULL, "Furlongs", "FURLONGS", UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS}, {"chain", "chains", "ch", NULL, "Chains", "CHAINS", UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS}, @@ -159,10 +159,10 @@ static struct bUnitDef buImperialLenDef[] = { {"thou", "thou", "thou", "mil", "Thou", "THOU", UN_SC_MIL, 0.0, B_UNIT_DEF_NONE}, /* Plural for "thou" has no 's'. */ NULL_UNIT, }; -static struct bUnitCollection buImperialLenCollection = {buImperialLenDef, 4, 0, UNIT_COLLECTION_LENGTH(buImperialLenDef)}; +static bUnitCollection buImperialLenCollection = {buImperialLenDef, 4, 0, UNIT_COLLECTION_LENGTH(buImperialLenDef)}; /* Areas. */ -static struct bUnitDef buMetricAreaDef[] = { +static bUnitDef buMetricAreaDef[] = { {"square kilometer", "square kilometers", "km²", "km2", "Square Kilometers", NULL, UN_SC_KM * UN_SC_KM, 0.0, B_UNIT_DEF_NONE}, {"square hectometer", "square hectometers", "hm²", "hm2", "Square Hectometers", NULL, UN_SC_HM * UN_SC_HM, 0.0, B_UNIT_DEF_SUPPRESS}, /* Hectare. */ {"square dekameter", "square dekameters", "dam²", "dam2", "Square Dekameters", NULL, UN_SC_DAM * UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS}, /* are */ @@ -173,9 +173,9 @@ static struct bUnitDef buMetricAreaDef[] = { {"square micrometer", "square micrometers", "µm²", "um2", "Square Micrometers", NULL, UN_SC_UM * UN_SC_UM, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buMetricAreaCollection = {buMetricAreaDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricAreaDef)}; +static bUnitCollection buMetricAreaCollection = {buMetricAreaDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricAreaDef)}; -static struct bUnitDef buImperialAreaDef[] = { +static bUnitDef buImperialAreaDef[] = { {"square mile", "square miles", "sq mi", "sq m", "Square Miles", NULL, UN_SC_MI * UN_SC_MI, 0.0, B_UNIT_DEF_NONE}, {"square furlong", "square furlongs", "sq fur", NULL, "Square Furlongs", NULL, UN_SC_FUR * UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS}, {"square chain", "square chains", "sq ch", NULL, "Square Chains", NULL, UN_SC_CH * UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS}, @@ -185,10 +185,10 @@ static struct bUnitDef buImperialAreaDef[] = { {"square thou", "square thou", "sq mil", NULL, "Square Thou", NULL, UN_SC_MIL * UN_SC_MIL, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buImperialAreaCollection = {buImperialAreaDef, 4, 0, UNIT_COLLECTION_LENGTH(buImperialAreaDef)}; +static bUnitCollection buImperialAreaCollection = {buImperialAreaDef, 4, 0, UNIT_COLLECTION_LENGTH(buImperialAreaDef)}; /* Volumes. */ -static struct bUnitDef buMetricVolDef[] = { +static bUnitDef buMetricVolDef[] = { {"cubic kilometer", "cubic kilometers", "km³", "km3", "Cubic Kilometers", NULL, UN_SC_KM * UN_SC_KM * UN_SC_KM, 0.0, B_UNIT_DEF_NONE}, {"cubic hectometer", "cubic hectometers", "hm³", "hm3", "Cubic Hectometers", NULL, UN_SC_HM * UN_SC_HM * UN_SC_HM, 0.0, B_UNIT_DEF_SUPPRESS}, {"cubic dekameter", "cubic dekameters", "dam³", "dam3", "Cubic Dekameters", NULL, UN_SC_DAM * UN_SC_DAM * UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS}, @@ -199,9 +199,9 @@ static struct bUnitDef buMetricVolDef[] = { {"cubic micrometer", "cubic micrometers", "µm³", "um3", "Cubic Micrometers", NULL, UN_SC_UM * UN_SC_UM * UN_SC_UM, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buMetricVolCollection = {buMetricVolDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricVolDef)}; +static bUnitCollection buMetricVolCollection = {buMetricVolDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricVolDef)}; -static struct bUnitDef buImperialVolDef[] = { +static bUnitDef buImperialVolDef[] = { {"cubic mile", "cubic miles", "cu mi", "cu m", "Cubic Miles", NULL, UN_SC_MI * UN_SC_MI * UN_SC_MI, 0.0, B_UNIT_DEF_NONE}, {"cubic furlong", "cubic furlongs", "cu fur", NULL, "Cubic Furlongs", NULL, UN_SC_FUR * UN_SC_FUR * UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS}, {"cubic chain", "cubic chains", "cu ch", NULL, "Cubic Chains", NULL, UN_SC_CH * UN_SC_CH * UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS}, @@ -211,10 +211,10 @@ static struct bUnitDef buImperialVolDef[] = { {"cubic thou", "cubic thou", "cu mil", NULL, "Cubic Thou", NULL, UN_SC_MIL * UN_SC_MIL * UN_SC_MIL, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buImperialVolCollection = {buImperialVolDef, 4, 0, UNIT_COLLECTION_LENGTH(buImperialVolDef)}; +static bUnitCollection buImperialVolCollection = {buImperialVolDef, 4, 0, UNIT_COLLECTION_LENGTH(buImperialVolDef)}; /* Mass. */ -static struct bUnitDef buMetricMassDef[] = { +static bUnitDef buMetricMassDef[] = { {"ton", "tonnes", "ton", "t", "Tonnes", "TONNES", UN_SC_MTON, 0.0, B_UNIT_DEF_NONE}, {"quintal", "quintals", "ql", "q", "100 Kilograms", "QUINTALS", UN_SC_QL, 0.0, B_UNIT_DEF_SUPPRESS}, {"kilogram", "kilograms", "kg", NULL, "Kilograms", "KILOGRAMS", UN_SC_KG, 0.0, B_UNIT_DEF_NONE}, /* Base unit. */ @@ -224,9 +224,9 @@ static struct bUnitDef buMetricMassDef[] = { {"milligram", "milligrams", "mg", NULL, "Milligrams", "MILLIGRAMS", UN_SC_MG, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buMetricMassCollection = {buMetricMassDef, 2, 0, UNIT_COLLECTION_LENGTH(buMetricMassDef)}; +static bUnitCollection buMetricMassCollection = {buMetricMassDef, 2, 0, UNIT_COLLECTION_LENGTH(buMetricMassDef)}; -static struct bUnitDef buImperialMassDef[] = { +static bUnitDef buImperialMassDef[] = { {"ton", "tonnes", "ton", "t", "Tonnes", "TONNES", UN_SC_ITON, 0.0, B_UNIT_DEF_NONE}, {"centum weight", "centum weights", "cwt", NULL, "Centum weights", "CENTUM_WEIGHTS", UN_SC_CWT, 0.0, B_UNIT_DEF_NONE}, {"stone", "stones", "st", NULL, "Stones", "STONES", UN_SC_ST, 0.0, B_UNIT_DEF_NONE}, @@ -234,41 +234,41 @@ static struct bUnitDef buImperialMassDef[] = { {"ounce", "ounces", "oz", NULL, "Ounces", "OUNCES", UN_SC_OZ, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buImperialMassCollection = {buImperialMassDef, 3, 0, UNIT_COLLECTION_LENGTH(buImperialMassDef)}; +static bUnitCollection buImperialMassCollection = {buImperialMassDef, 3, 0, UNIT_COLLECTION_LENGTH(buImperialMassDef)}; /* Even if user scales the system to a point where km^3 is used, velocity and * acceleration aren't scaled: that's why we have so few units for them. */ /* Velocity. */ -static struct bUnitDef buMetricVelDef[] = { +static bUnitDef buMetricVelDef[] = { {"meter per second", "meters per second", "m/s", NULL, "Meters per second", NULL, UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* Base unit. */ {"kilometer per hour", "kilometers per hour", "km/h", NULL, "Kilometers per hour", NULL, UN_SC_KM / 3600.0f, 0.0, B_UNIT_DEF_SUPPRESS}, NULL_UNIT, }; -static struct bUnitCollection buMetricVelCollection = {buMetricVelDef, 0, 0, UNIT_COLLECTION_LENGTH(buMetricVelDef)}; +static bUnitCollection buMetricVelCollection = {buMetricVelDef, 0, 0, UNIT_COLLECTION_LENGTH(buMetricVelDef)}; -static struct bUnitDef buImperialVelDef[] = { +static bUnitDef buImperialVelDef[] = { {"foot per second", "feet per second", "ft/s", "fps", "Feet per second", NULL, UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* Base unit. */ {"mile per hour", "miles per hour", "mph", NULL, "Miles per hour", NULL, UN_SC_MI / 3600.0f, 0.0, B_UNIT_DEF_SUPPRESS}, NULL_UNIT, }; -static struct bUnitCollection buImperialVelCollection = {buImperialVelDef, 0, 0, UNIT_COLLECTION_LENGTH(buImperialVelDef)}; +static bUnitCollection buImperialVelCollection = {buImperialVelDef, 0, 0, UNIT_COLLECTION_LENGTH(buImperialVelDef)}; /* Acceleration. */ -static struct bUnitDef buMetricAclDef[] = { +static bUnitDef buMetricAclDef[] = { {"meter per second squared", "meters per second squared", "m/s²", "m/s2", "Meters per second squared", NULL, UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* Base unit. */ NULL_UNIT, }; -static struct bUnitCollection buMetricAclCollection = {buMetricAclDef, 0, 0, UNIT_COLLECTION_LENGTH(buMetricAclDef)}; +static bUnitCollection buMetricAclCollection = {buMetricAclDef, 0, 0, UNIT_COLLECTION_LENGTH(buMetricAclDef)}; -static struct bUnitDef buImperialAclDef[] = { +static bUnitDef buImperialAclDef[] = { {"foot per second squared", "feet per second squared", "ft/s²", "ft/s2", "Feet per second squared", NULL, UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* Base unit. */ NULL_UNIT, }; -static struct bUnitCollection buImperialAclCollection = {buImperialAclDef, 0, 0, UNIT_COLLECTION_LENGTH(buImperialAclDef)}; +static bUnitCollection buImperialAclCollection = {buImperialAclDef, 0, 0, UNIT_COLLECTION_LENGTH(buImperialAclDef)}; /* Time. */ -static struct bUnitDef buNaturalTimeDef[] = { +static bUnitDef buNaturalTimeDef[] = { /* Weeks? - probably not needed for Blender. */ {"day", "days", "d", NULL, "Days", "DAYS", 86400.0, 0.0, B_UNIT_DEF_NONE}, {"hour", "hours", "hr", "h", "Hours", "HOURS", 3600.0, 0.0, B_UNIT_DEF_NONE}, @@ -278,10 +278,10 @@ static struct bUnitDef buNaturalTimeDef[] = { {"microsecond", "microseconds", "µs", "us", "Microseconds", "MICROSECONDS", 0.000001, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buNaturalTimeCollection = {buNaturalTimeDef, 3, 0, UNIT_COLLECTION_LENGTH(buNaturalTimeDef)}; +static bUnitCollection buNaturalTimeCollection = {buNaturalTimeDef, 3, 0, UNIT_COLLECTION_LENGTH(buNaturalTimeDef)}; -static struct bUnitDef buNaturalRotDef[] = { +static bUnitDef buNaturalRotDef[] = { {"degree", "degrees", "°", "d", "Degrees", "DEGREES", M_PI / 180.0, 0.0, B_UNIT_DEF_NONE | B_UNIT_DEF_NO_SPACE}, /* arcminutes/arcseconds are used in Astronomy/Navigation areas... */ {"arcminute", "arcminutes", "'", NULL, "Arcminutes", "ARCMINUTES", (M_PI / 180.0) / 60.0, 0.0, B_UNIT_DEF_SUPPRESS | B_UNIT_DEF_NO_SPACE}, @@ -292,10 +292,10 @@ static struct bUnitDef buNaturalRotDef[] = { #endif NULL_UNIT, }; -static struct bUnitCollection buNaturalRotCollection = {buNaturalRotDef, 0, 0, UNIT_COLLECTION_LENGTH(buNaturalRotDef)}; +static bUnitCollection buNaturalRotCollection = {buNaturalRotDef, 0, 0, UNIT_COLLECTION_LENGTH(buNaturalRotDef)}; /* Camera Lengths. */ -static struct bUnitDef buCameraLenDef[] = { +static bUnitDef buCameraLenDef[] = { {"meter", "meters", "m", NULL, "Meters", NULL, UN_SC_KM, 0.0, B_UNIT_DEF_NONE}, /* Base unit. */ {"decimeter", "decimeters", "dm", NULL, "10 Centimeters", NULL, UN_SC_HM, 0.0, B_UNIT_DEF_SUPPRESS}, {"centimeter", "centimeters", "cm", NULL, "Centimeters", NULL, UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS}, @@ -303,10 +303,10 @@ static struct bUnitDef buCameraLenDef[] = { {"micrometer", "micrometers", "µm", "um", "Micrometers", NULL, UN_SC_MM, 0.0, B_UNIT_DEF_SUPPRESS}, NULL_UNIT, }; -static struct bUnitCollection buCameraLenCollection = {buCameraLenDef, 3, 0, UNIT_COLLECTION_LENGTH(buCameraLenDef)}; +static bUnitCollection buCameraLenCollection = {buCameraLenDef, 3, 0, UNIT_COLLECTION_LENGTH(buCameraLenDef)}; /* (Light) Power. */ -static struct bUnitDef buPowerDef[] = { +static bUnitDef buPowerDef[] = { {"gigawatt", "gigawatts", "GW", NULL, "Gigawatts", NULL, 1e9f, 0.0, B_UNIT_DEF_NONE}, {"megawatt", "megawatts", "MW", NULL, "Megawatts", NULL, 1e6f, 0.0, B_UNIT_DEF_CASE_SENSITIVE}, {"kilowatt", "kilowatts", "kW", NULL, "Kilowatts", NULL, 1e3f, 0.0, B_UNIT_DEF_SUPPRESS}, @@ -316,28 +316,28 @@ static struct bUnitDef buPowerDef[] = { {"nanowatt", "nanowatts", "nW", NULL, "Nanowatts", NULL, 1e-9f, 0.0, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buPowerCollection = {buPowerDef, 3, 0, UNIT_COLLECTION_LENGTH(buPowerDef)}; +static bUnitCollection buPowerCollection = {buPowerDef, 3, 0, UNIT_COLLECTION_LENGTH(buPowerDef)}; /* Temperature */ -static struct bUnitDef buMetricTempDef[] = { +static bUnitDef buMetricTempDef[] = { {"kelvin", "kelvin", "K", NULL, "Kelvin", "KELVIN", 1.0f, 0.0, B_UNIT_DEF_NONE}, /* Base unit. */ {"celsius", "celsius", "°C", "C", "Celsius", "CELSIUS", 1.0f, 273.15, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buMetricTempCollection = {buMetricTempDef, 0, 0, UNIT_COLLECTION_LENGTH(buMetricTempDef)}; +static bUnitCollection buMetricTempCollection = {buMetricTempDef, 0, 0, UNIT_COLLECTION_LENGTH(buMetricTempDef)}; -static struct bUnitDef buImperialTempDef[] = { +static bUnitDef buImperialTempDef[] = { {"kelvin", "kelvin", "K", NULL, "Kelvin", "KELVIN", 1.0f, 0.0, B_UNIT_DEF_NONE}, /* Base unit. */ {"fahrenheit", "fahrenheit", "°F", "F", "Fahrenheit", "FAHRENHEIT", UN_SC_FAH, 459.67, B_UNIT_DEF_NONE}, NULL_UNIT, }; -static struct bUnitCollection buImperialTempCollection = { +static bUnitCollection buImperialTempCollection = { buImperialTempDef, 1, 0, UNIT_COLLECTION_LENGTH(buImperialTempDef)}; /* clang-format on */ #define UNIT_SYSTEM_TOT (((sizeof(bUnitSystems) / B_UNIT_TYPE_TOT) / sizeof(void *)) - 1) -static const struct bUnitCollection *bUnitSystems[][B_UNIT_TYPE_TOT] = { +static const bUnitCollection *bUnitSystems[][B_UNIT_TYPE_TOT] = { /* Natural. */ {NULL, NULL, @@ -1079,7 +1079,7 @@ bool BKE_unit_string_contains_unit(const char *str, int type) return false; } -double BKE_unit_apply_preferred_unit(const struct UnitSettings *settings, int type, double value) +double BKE_unit_apply_preferred_unit(const UnitSettings *settings, int type, double value) { PreferredUnits units = preferred_units_from_UnitSettings(settings); const bUnitDef *unit = get_preferred_display_unit_if_used(type, units); diff --git a/source/blender/blenkernel/intern/vfont.c b/source/blender/blenkernel/intern/vfont.c index 89ae27a52fa..396d7965855 100644 --- a/source/blender/blenkernel/intern/vfont.c +++ b/source/blender/blenkernel/intern/vfont.c @@ -186,7 +186,7 @@ IDTypeInfo IDType_ID_VF = { /***************************** VFont *******************************/ -void BKE_vfont_free_data(struct VFont *vfont) +void BKE_vfont_free_data(VFont *vfont) { if (vfont->data) { if (vfont->data->characters) { @@ -221,7 +221,7 @@ void BKE_vfont_free_data(struct VFont *vfont) static const void *builtin_font_data = NULL; static int builtin_font_size = 0; -bool BKE_vfont_is_builtin(const struct VFont *vfont) +bool BKE_vfont_is_builtin(const VFont *vfont) { return STREQ(vfont->filepath, FO_BUILTIN_NAME); } @@ -364,7 +364,7 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath) return vfont; } -VFont *BKE_vfont_load_exists_ex(struct Main *bmain, const char *filepath, bool *r_exists) +VFont *BKE_vfont_load_exists_ex(Main *bmain, const char *filepath, bool *r_exists) { VFont *vfont; char filepath_abs[FILE_MAX], filepath_test[FILE_MAX]; @@ -392,7 +392,7 @@ VFont *BKE_vfont_load_exists_ex(struct Main *bmain, const char *filepath, bool * return BKE_vfont_load(bmain, filepath); } -VFont *BKE_vfont_load_exists(struct Main *bmain, const char *filepath) +VFont *BKE_vfont_load_exists(Main *bmain, const char *filepath) { return BKE_vfont_load_exists_ex(bmain, filepath, NULL); } @@ -534,7 +534,7 @@ void BKE_vfont_build_char(Curve *cu, if (nu2 == NULL) { break; } - memcpy(nu2, nu1, sizeof(struct Nurb)); + memcpy(nu2, nu1, sizeof(Nurb)); nu2->resolu = cu->resolu; nu2->bp = NULL; nu2->knotsu = nu2->knotsv = NULL; @@ -555,7 +555,7 @@ void BKE_vfont_build_char(Curve *cu, MEM_freeN(nu2); break; } - memcpy(bezt2, bezt1, u * sizeof(struct BezTriple)); + memcpy(bezt2, bezt1, u * sizeof(BezTriple)); nu2->bezt = bezt2; if (shear != 0.0f) { @@ -794,7 +794,7 @@ static bool vfont_to_curve(Object *ob, Curve *cu, int mode, VFontToCurveIter *iter_data, - struct VFontCursor_Params *cursor_params, + VFontCursor_Params *cursor_params, ListBase *r_nubase, const char32_t **r_text, int *r_text_len, diff --git a/source/blender/blenkernel/intern/vfontdata_freetype.c b/source/blender/blenkernel/intern/vfontdata_freetype.c index 4536bc604f1..e084233c075 100644 --- a/source/blender/blenkernel/intern/vfontdata_freetype.c +++ b/source/blender/blenkernel/intern/vfontdata_freetype.c @@ -42,9 +42,9 @@ static VChar *freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData * const float eps = 0.0001f; const float eps_sq = eps * eps; /* Blender */ - struct Nurb *nu; - struct VChar *che; - struct BezTriple *bezt; + Nurb *nu; + VChar *che; + BezTriple *bezt; /* Freetype2 */ FT_GlyphSlot glyph; @@ -67,7 +67,7 @@ static VChar *freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData * int *onpoints; /* First we create entry for the new character to the character list */ - che = (VChar *)MEM_callocN(sizeof(struct VChar), "objfnt_char"); + che = (VChar *)MEM_callocN(sizeof(VChar), "objfnt_char"); /* Take some data for modifying purposes */ glyph = face->glyph; @@ -113,7 +113,7 @@ static VChar *freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData * contour_prev = ftoutline.contours[j]; /* add new curve */ - nu = (Nurb *)MEM_callocN(sizeof(struct Nurb), "objfnt_nurb"); + nu = (Nurb *)MEM_callocN(sizeof(Nurb), "objfnt_nurb"); bezt = (BezTriple *)MEM_callocN((onpoints[j]) * sizeof(BezTriple), "objfnt_bezt"); BLI_addtail(&che->nurbsbase, nu); diff --git a/source/blender/blenkernel/intern/viewer_path.cc b/source/blender/blenkernel/intern/viewer_path.cc index 3d1044fdd86..e7b3b5d6e57 100644 --- a/source/blender/blenkernel/intern/viewer_path.cc +++ b/source/blender/blenkernel/intern/viewer_path.cc @@ -58,7 +58,7 @@ bool BKE_viewer_path_equal(const ViewerPath *a, const ViewerPath *b) return false; } -void BKE_viewer_path_blend_write(struct BlendWriter *writer, const ViewerPath *viewer_path) +void BKE_viewer_path_blend_write(BlendWriter *writer, const ViewerPath *viewer_path) { LISTBASE_FOREACH (ViewerPathElem *, elem, &viewer_path->path) { switch (ViewerPathElemType(elem->type)) { @@ -83,7 +83,7 @@ void BKE_viewer_path_blend_write(struct BlendWriter *writer, const ViewerPath *v } } -void BKE_viewer_path_blend_read_data(struct BlendDataReader *reader, ViewerPath *viewer_path) +void BKE_viewer_path_blend_read_data(BlendDataReader *reader, ViewerPath *viewer_path) { BLO_read_list(reader, &viewer_path->path); LISTBASE_FOREACH (ViewerPathElem *, elem, &viewer_path->path) { diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index f7c4ac79698..b8de549893d 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -1086,8 +1086,8 @@ static void volume_update_simplify_level(Volume *volume, const Depsgraph *depsgr #endif } -static void volume_evaluate_modifiers(struct Depsgraph *depsgraph, - struct Scene *scene, +static void volume_evaluate_modifiers(Depsgraph *depsgraph, + Scene *scene, Object *object, GeometrySet &geometry_set) { @@ -1121,7 +1121,7 @@ static void volume_evaluate_modifiers(struct Depsgraph *depsgraph, } } -void BKE_volume_eval_geometry(struct Depsgraph *depsgraph, Volume *volume) +void BKE_volume_eval_geometry(Depsgraph *depsgraph, Volume *volume) { volume_update_simplify_level(volume, depsgraph); @@ -1160,7 +1160,7 @@ static Volume *take_volume_ownership_from_geometry_set(GeometrySet &geometry_set return volume; } -void BKE_volume_data_update(struct Depsgraph *depsgraph, struct Scene *scene, Object *object) +void BKE_volume_data_update(Depsgraph *depsgraph, Scene *scene, Object *object) { /* Free any evaluated data and restore original data. */ BKE_object_free_derived_caches(object); diff --git a/source/blender/blenkernel/intern/workspace.cc b/source/blender/blenkernel/intern/workspace.cc index 1aaa6169270..dbee4bb902a 100644 --- a/source/blender/blenkernel/intern/workspace.cc +++ b/source/blender/blenkernel/intern/workspace.cc @@ -508,7 +508,7 @@ WorkSpaceLayout *BKE_workspace_layout_iter_circular(const WorkSpace *workspace, return nullptr; } -void BKE_workspace_tool_remove(struct WorkSpace *workspace, struct bToolRef *tref) +void BKE_workspace_tool_remove(WorkSpace *workspace, bToolRef *tref) { if (tref->runtime) { MEM_freeN(tref->runtime); @@ -520,7 +520,7 @@ void BKE_workspace_tool_remove(struct WorkSpace *workspace, struct bToolRef *tre MEM_freeN(tref); } -void BKE_workspace_tool_id_replace_table(struct WorkSpace *workspace, +void BKE_workspace_tool_id_replace_table(WorkSpace *workspace, const int space_type, const int mode, const char *idname_prefix_skip, diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 8d23dad75d1..ef78fdc1a0e 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -58,7 +58,7 @@ static void world_free_data(ID *id) GPU_material_free(&wrld->gpumaterial); - BKE_icon_id_delete((struct ID *)wrld); + BKE_icon_id_delete((ID *)wrld); BKE_previewimg_free(&wrld->preview); MEM_SAFE_FREE(wrld->lightgroup); @@ -227,7 +227,7 @@ World *BKE_world_add(Main *bmain, const char *name) return wrld; } -void BKE_world_eval(struct Depsgraph *depsgraph, World *world) +void BKE_world_eval(Depsgraph *depsgraph, World *world) { DEG_debug_print_eval(depsgraph, __func__, world->id.name, world); GPU_material_free(&world->gpumaterial); diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 4f9be11f7b6..0e2b80a1638 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -106,7 +106,7 @@ typedef struct FFMpegContext { static void ffmpeg_dict_set_int(AVDictionary **dict, const char *key, int value); static void ffmpeg_filepath_get(FFMpegContext *context, char filepath[FILE_MAX], - const struct RenderData *rd, + const RenderData *rd, bool preview, const char *suffix); @@ -1090,7 +1090,7 @@ static void ffmpeg_add_metadata_callback(void *data, } static int start_ffmpeg_impl(FFMpegContext *context, - struct RenderData *rd, + RenderData *rd, int rectx, int recty, const char *suffix, @@ -1437,7 +1437,7 @@ void BKE_ffmpeg_filepath_get(char *filepath, } int BKE_ffmpeg_start(void *context_v, - const struct Scene *scene, + const Scene *scene, RenderData *rd, int rectx, int recty, diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index 711e36539bb..50eb0945ec6 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -89,7 +89,7 @@ static bool keycmp(const void *a, const void *b) return BLI_ghashutil_intcmp((const void *)ka->pass, (const void *)kb->pass); } -static bArgument *lookUp(struct bArgs *ba, const char *arg, int pass, int case_str) +static bArgument *lookUp(bArgs *ba, const char *arg, int pass, int case_str) { bAKey key; @@ -124,7 +124,7 @@ bArgs *BLI_args_create(int argc, const char **argv) return ba; } -void BLI_args_destroy(struct bArgs *ba) +void BLI_args_destroy(bArgs *ba) { BLI_ghash_free(ba->items, MEM_freeN, MEM_freeN); MEM_freeN(ba->passes); @@ -132,7 +132,7 @@ void BLI_args_destroy(struct bArgs *ba) MEM_freeN(ba); } -void BLI_args_printf(struct bArgs *ba, const char *format, ...) +void BLI_args_printf(bArgs *ba, const char *format, ...) { va_list args; va_start(args, format); @@ -140,19 +140,19 @@ void BLI_args_printf(struct bArgs *ba, const char *format, ...) va_end(args); } -void BLI_args_print_fn_set(struct bArgs *ba, bArgPrintFn print_fn, void *user_data) +void BLI_args_print_fn_set(bArgs *ba, bArgPrintFn print_fn, void *user_data) { ba->print_fn = print_fn; ba->print_user_data = user_data; } -void BLI_args_pass_set(struct bArgs *ba, int current_pass) +void BLI_args_pass_set(bArgs *ba, int current_pass) { BLI_assert((current_pass != 0) && (current_pass >= -1)); ba->current_pass = current_pass; } -void BLI_args_print(struct bArgs *ba) +void BLI_args_print(bArgs *ba) { int i; for (i = 0; i < ba->argc; i++) { @@ -160,7 +160,7 @@ void BLI_args_print(struct bArgs *ba) } } -static bArgDoc *internalDocs(struct bArgs *ba, +static bArgDoc *internalDocs(bArgs *ba, const char *short_arg, const char *long_arg, const char *doc) @@ -183,7 +183,7 @@ static bArgDoc *internalDocs(struct bArgs *ba, } static void internalAdd( - struct bArgs *ba, const char *arg, int case_str, BA_ArgCallback cb, void *data, bArgDoc *d) + bArgs *ba, const char *arg, int case_str, BA_ArgCallback cb, void *data, bArgDoc *d) { const int pass = ba->current_pass; bArgument *a; @@ -218,7 +218,7 @@ static void internalAdd( BLI_ghash_insert(ba->items, key, a); } -void BLI_args_add_case(struct bArgs *ba, +void BLI_args_add_case(bArgs *ba, const char *short_arg, int short_case, const char *long_arg, @@ -238,7 +238,7 @@ void BLI_args_add_case(struct bArgs *ba, } } -void BLI_args_add(struct bArgs *ba, +void BLI_args_add(bArgs *ba, const char *short_arg, const char *long_arg, const char *doc, @@ -248,7 +248,7 @@ void BLI_args_add(struct bArgs *ba, BLI_args_add_case(ba, short_arg, 0, long_arg, 0, doc, cb, data); } -static void internalDocPrint(struct bArgs *ba, bArgDoc *d) +static void internalDocPrint(bArgs *ba, bArgDoc *d) { if (d->short_arg && d->long_arg) { BLI_args_printf(ba, "%s or %s", d->short_arg, d->long_arg); @@ -263,7 +263,7 @@ static void internalDocPrint(struct bArgs *ba, bArgDoc *d) BLI_args_printf(ba, " %s\n\n", d->documentation); } -void BLI_args_print_arg_doc(struct bArgs *ba, const char *arg) +void BLI_args_print_arg_doc(bArgs *ba, const char *arg) { bArgument *a = lookUp(ba, arg, -1, -1); @@ -276,7 +276,7 @@ void BLI_args_print_arg_doc(struct bArgs *ba, const char *arg) } } -void BLI_args_print_other_doc(struct bArgs *ba) +void BLI_args_print_other_doc(bArgs *ba) { bArgDoc *d; @@ -287,7 +287,7 @@ void BLI_args_print_other_doc(struct bArgs *ba) } } -bool BLI_args_has_other_doc(const struct bArgs *ba) +bool BLI_args_has_other_doc(const bArgs *ba) { for (const bArgDoc *d = ba->docs.first; d; d = d->next) { if (d->done == 0) { @@ -297,7 +297,7 @@ bool BLI_args_has_other_doc(const struct bArgs *ba) return false; } -void BLI_args_parse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *default_data) +void BLI_args_parse(bArgs *ba, int pass, BA_ArgCallback default_cb, void *default_data) { BLI_assert((pass != 0) && (pass >= -1)); int i = 0; diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c index 0adb13e6c22..af1d0548acc 100644 --- a/source/blender/blenlib/intern/BLI_filelist.c +++ b/source/blender/blenlib/intern/BLI_filelist.c @@ -119,7 +119,7 @@ static void bli_builddir(struct BuildDirCtx *dir_ctx, const char *dirname) return; } - struct ListBase dirbase = {NULL, NULL}; + ListBase dirbase = {NULL, NULL}; int newnum = 0; const struct dirent *fname; bool has_current = false, has_parent = false; diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index fd0e1edefa5..f8928860ed7 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -86,7 +86,7 @@ struct GHash { GHashCmpFP cmpfp; Entry **buckets; - struct BLI_mempool *entrypool; + BLI_mempool *entrypool; uint nbuckets; uint limit_grow, limit_shrink; #ifdef GHASH_USE_MODULO_BUCKETS diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c index 2bef9267e19..bbcb3655ac9 100644 --- a/source/blender/blenlib/intern/BLI_heap.c +++ b/source/blender/blenlib/intern/BLI_heap.c @@ -29,7 +29,7 @@ struct HeapNode_Chunk { struct HeapNode_Chunk *prev; uint size; uint bufsize; - struct HeapNode buf[0]; + HeapNode buf[0]; }; /** @@ -150,7 +150,7 @@ static struct HeapNode_Chunk *heap_node_alloc_chunk(uint nodes_num, return chunk; } -static struct HeapNode *heap_node_alloc(Heap *heap) +static HeapNode *heap_node_alloc(Heap *heap) { HeapNode *node; diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index bbf3b1cc910..6fa0af426fa 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -105,7 +105,7 @@ typedef struct BVHOverlapData_Shared { typedef struct BVHOverlapData_Thread { BVHOverlapData_Shared *shared; - struct BLI_Stack *overlap; /* store BVHTreeOverlap */ + BLI_Stack *overlap; /* store BVHTreeOverlap */ uint max_interactions; /* use for callbacks */ int thread; @@ -156,7 +156,7 @@ typedef struct BVHNearestProjectedData { typedef struct BVHIntersectPlaneData { const BVHTree *tree; float plane[4]; - struct BLI_Stack *intersect; /* Store indexes. */ + BLI_Stack *intersect; /* Store indexes. */ } BVHIntersectPlaneData; /** \} */ diff --git a/source/blender/blenlib/intern/BLI_linklist.c b/source/blender/blenlib/intern/BLI_linklist.c index c245b156b49..db400d51234 100644 --- a/source/blender/blenlib/intern/BLI_linklist.c +++ b/source/blender/blenlib/intern/BLI_linklist.c @@ -211,7 +211,7 @@ void BLI_linklist_append_pool(LinkNodePair *list_pair, void *ptr, BLI_mempool *m BLI_linklist_append_nlink(list_pair, ptr, nlink); } -void *BLI_linklist_pop(struct LinkNode **listp) +void *BLI_linklist_pop(LinkNode **listp) { /* intentionally no NULL check */ void *link = (*listp)->link; @@ -223,7 +223,7 @@ void *BLI_linklist_pop(struct LinkNode **listp) return link; } -void *BLI_linklist_pop_pool(struct LinkNode **listp, struct BLI_mempool *mempool) +void *BLI_linklist_pop_pool(LinkNode **listp, BLI_mempool *mempool) { /* intentionally no NULL check */ void *link = (*listp)->link; @@ -266,7 +266,7 @@ void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc) } } -void BLI_linklist_free_pool(LinkNode *list, LinkNodeFreeFP freefunc, struct BLI_mempool *mempool) +void BLI_linklist_free_pool(LinkNode *list, LinkNodeFreeFP freefunc, BLI_mempool *mempool) { while (list) { LinkNode *next = list->next; diff --git a/source/blender/blenlib/intern/BLI_memarena.c b/source/blender/blenlib/intern/BLI_memarena.c index ad16ca858bf..5b0a8bd41fb 100644 --- a/source/blender/blenlib/intern/BLI_memarena.c +++ b/source/blender/blenlib/intern/BLI_memarena.c @@ -84,7 +84,7 @@ void BLI_memarena_use_malloc(MemArena *ma) ma->use_calloc = 0; } -void BLI_memarena_use_align(struct MemArena *ma, const size_t align) +void BLI_memarena_use_align(MemArena *ma, const size_t align) { /* Align must be a power of two. */ BLI_assert((align & (align - 1)) == 0); diff --git a/source/blender/blenlib/intern/BLI_memiter.c b/source/blender/blenlib/intern/BLI_memiter.c index 1473c27fddd..987c1895b99 100644 --- a/source/blender/blenlib/intern/BLI_memiter.c +++ b/source/blender/blenlib/intern/BLI_memiter.c @@ -70,7 +70,7 @@ typedef struct BLI_memiter_chunk { typedef struct BLI_memiter { /* A pointer to 'head' is needed so we can iterate in the order allocated. */ - struct BLI_memiter_chunk *head, *tail; + BLI_memiter_chunk *head, *tail; data_t *data_curr; data_t *data_last; /* Used unless a large element is requested. diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c index 3e5f24eeb76..8d05e751d5e 100644 --- a/source/blender/blenlib/intern/array_store.c +++ b/source/blender/blenlib/intern/array_store.c @@ -292,7 +292,7 @@ struct BArrayStore { */ struct BArrayState { /** linked list in #BArrayStore.states. */ - struct BArrayState *next, *prev; + BArrayState *next, *prev; /** Shared chunk list, this reference must hold a #BChunkList::users. */ struct BChunkList *chunk_list; }; @@ -1783,7 +1783,7 @@ bool BLI_array_store_is_valid(BArrayStore *bs) GHASH_PTR_ADD_USER(chunk_list_map, state->chunk_list); } GHASH_ITER (gh_iter, chunk_list_map) { - const struct BChunkList *chunk_list = BLI_ghashIterator_getKey(&gh_iter); + const BChunkList *chunk_list = BLI_ghashIterator_getKey(&gh_iter); const int users = POINTER_AS_INT(BLI_ghashIterator_getValue(&gh_iter)); if (!(chunk_list->users == users)) { ok = false; @@ -1797,7 +1797,7 @@ bool BLI_array_store_is_valid(BArrayStore *bs) /* Count chunk's. */ GHASH_ITER (gh_iter, chunk_list_map) { - const struct BChunkList *chunk_list = BLI_ghashIterator_getKey(&gh_iter); + const BChunkList *chunk_list = BLI_ghashIterator_getKey(&gh_iter); LISTBASE_FOREACH (const BChunkRef *, cref, &chunk_list->chunk_refs) { GHASH_PTR_ADD_USER(chunk_map, cref->link); totrefs += 1; @@ -1813,7 +1813,7 @@ bool BLI_array_store_is_valid(BArrayStore *bs) } GHASH_ITER (gh_iter, chunk_map) { - const struct BChunk *chunk = BLI_ghashIterator_getKey(&gh_iter); + const BChunk *chunk = BLI_ghashIterator_getKey(&gh_iter); const int users = POINTER_AS_INT(BLI_ghashIterator_getValue(&gh_iter)); if (!(chunk->users == users)) { ok = false; diff --git a/source/blender/blenlib/intern/boxpack_2d.c b/source/blender/blenlib/intern/boxpack_2d.c index 0c84901ef60..4c6331b1d93 100644 --- a/source/blender/blenlib/intern/boxpack_2d.c +++ b/source/blender/blenlib/intern/boxpack_2d.c @@ -43,14 +43,14 @@ typedef struct BoxVert { uint _pad : 23; uint index; - struct BoxPack *trb; /* top right box */ - struct BoxPack *blb; /* bottom left box */ - struct BoxPack *brb; /* bottom right box */ - struct BoxPack *tlb; /* top left box */ + BoxPack *trb; /* top right box */ + BoxPack *blb; /* bottom left box */ + BoxPack *brb; /* bottom right box */ + BoxPack *tlb; /* top left box */ /* Store last intersecting boxes here * speedup intersection testing */ - struct BoxPack *isect_cache[4]; + BoxPack *isect_cache[4]; #ifdef USE_PACK_BIAS float bias; diff --git a/source/blender/blenlib/intern/listbase.cc b/source/blender/blenlib/intern/listbase.cc index ecdba67d4c2..41ea569fd75 100644 --- a/source/blender/blenlib/intern/listbase.cc +++ b/source/blender/blenlib/intern/listbase.cc @@ -813,7 +813,7 @@ ListBase BLI_listbase_from_link(Link *some_link) void BLI_duplicatelist(ListBase *dst, const ListBase *src) { - struct Link *dst_link, *src_link; + Link *dst_link, *src_link; /* in this order, to ensure it works if dst == src */ src_link = static_cast(src->first); @@ -829,9 +829,9 @@ void BLI_duplicatelist(ListBase *dst, const ListBase *src) void BLI_listbase_reverse(ListBase *lb) { - struct Link *curr = static_cast(lb->first); - struct Link *prev = nullptr; - struct Link *next = nullptr; + Link *curr = static_cast(lb->first); + Link *prev = nullptr; + Link *next = nullptr; while (curr) { next = curr->next; curr->next = prev; diff --git a/source/blender/blenlib/intern/polyfill_2d.c b/source/blender/blenlib/intern/polyfill_2d.c index b8012fcc419..8c0a43a03ea 100644 --- a/source/blender/blenlib/intern/polyfill_2d.c +++ b/source/blender/blenlib/intern/polyfill_2d.c @@ -866,7 +866,7 @@ void BLI_polyfill_calc_arena(const float (*coords)[2], const int coords_sign, uint32_t (*r_tris)[3], - struct MemArena *arena) + MemArena *arena) { PolyFill pf; PolyIndex *indices = BLI_memarena_alloc(arena, sizeof(*indices) * coords_num); diff --git a/source/blender/blenlib/intern/rand.cc b/source/blender/blenlib/intern/rand.cc index 886aa9bcd10..19949fa428b 100644 --- a/source/blender/blenlib/intern/rand.cc +++ b/source/blender/blenlib/intern/rand.cc @@ -142,7 +142,7 @@ void BLI_rng_shuffle_array(RNG *rng, void *data, uint elem_size_i, uint elem_num free(temp); } -void BLI_rng_shuffle_bitmap(struct RNG *rng, BLI_bitmap *bitmap, uint bits_num) +void BLI_rng_shuffle_bitmap(RNG *rng, BLI_bitmap *bitmap, uint bits_num) { if (bits_num <= 1) { return; @@ -246,7 +246,7 @@ RNG_THREAD_ARRAY *BLI_rng_threaded_new() return rngarr; } -void BLI_rng_threaded_free(struct RNG_THREAD_ARRAY *rngarr) +void BLI_rng_threaded_free(RNG_THREAD_ARRAY *rngarr) { MEM_freeN(rngarr); } diff --git a/source/blender/blenlib/intern/task_graph.cc b/source/blender/blenlib/intern/task_graph.cc index 89ee9cdea0f..b0e19174609 100644 --- a/source/blender/blenlib/intern/task_graph.cc +++ b/source/blender/blenlib/intern/task_graph.cc @@ -116,17 +116,17 @@ void BLI_task_graph_work_and_wait(TaskGraph *task_graph) #endif } -struct TaskNode *BLI_task_graph_node_create(struct TaskGraph *task_graph, - TaskGraphNodeRunFunction run, - void *user_data, - TaskGraphNodeFreeFunction free_func) +TaskNode *BLI_task_graph_node_create(TaskGraph *task_graph, + TaskGraphNodeRunFunction run, + void *user_data, + TaskGraphNodeFreeFunction free_func) { TaskNode *task_node = new TaskNode(task_graph, run, user_data, free_func); task_graph->nodes.push_back(std::unique_ptr(task_node)); return task_node; } -bool BLI_task_graph_node_push_work(struct TaskNode *task_node) +bool BLI_task_graph_node_push_work(TaskNode *task_node) { #ifdef WITH_TBB if (BLI_task_scheduler_num_threads() > 1) { @@ -138,7 +138,7 @@ bool BLI_task_graph_node_push_work(struct TaskNode *task_node) return true; } -void BLI_task_graph_edge_create(struct TaskNode *from_node, struct TaskNode *to_node) +void BLI_task_graph_edge_create(TaskNode *from_node, TaskNode *to_node) { #ifdef WITH_TBB if (BLI_task_scheduler_num_threads() > 1) { diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc index 7dd738327cf..6df4d369ed0 100644 --- a/source/blender/blenlib/intern/threads.cc +++ b/source/blender/blenlib/intern/threads.cc @@ -105,7 +105,7 @@ static int threads_override_num = 0; #define RE_MAX_THREAD BLENDER_MAX_THREADS struct ThreadSlot { - struct ThreadSlot *next, *prev; + ThreadSlot *next, *prev; void *(*do_thread)(void *); void *callerdata; pthread_t pthread; @@ -646,7 +646,7 @@ void *BLI_thread_queue_pop(ThreadQueue *queue) return work; } -static void wait_timeout(struct timespec *timeout, int ms) +static void wait_timeout(timespec *timeout, int ms) { ldiv_t div_result; long sec, usec, x; @@ -660,7 +660,7 @@ static void wait_timeout(struct timespec *timeout, int ms) } #else { - struct timeval now; + timeval now; gettimeofday(&now, nullptr); sec = now.tv_sec; usec = now.tv_usec; @@ -685,7 +685,7 @@ void *BLI_thread_queue_pop_timeout(ThreadQueue *queue, int ms) { double t; void *work = nullptr; - struct timespec timeout; + timespec timeout; t = PIL_check_seconds_timer(); wait_timeout(&timeout, ms); diff --git a/source/blender/blenlib/intern/uuid.cc b/source/blender/blenlib/intern/uuid.cc index 673a5764442..4a65d094b2c 100644 --- a/source/blender/blenlib/intern/uuid.cc +++ b/source/blender/blenlib/intern/uuid.cc @@ -30,7 +30,7 @@ bUUID BLI_uuid_generate_random() static_assert(std::mt19937_64::min() == 0LL); static_assert(std::mt19937_64::max() == 0xffffffffffffffffLL); - struct timespec ts; + timespec ts; #ifdef __APPLE__ /* `timespec_get()` is only available on macOS 10.15+, so until that's the minimum version * supported by Blender, use another function to get the timespec. diff --git a/source/blender/blenlib/tests/BLI_array_store_test.cc b/source/blender/blenlib/tests/BLI_array_store_test.cc index 4c579ebdb84..b4cd9bc6e4b 100644 --- a/source/blender/blenlib/tests/BLI_array_store_test.cc +++ b/source/blender/blenlib/tests/BLI_array_store_test.cc @@ -35,7 +35,7 @@ static void print_mem_saved(const char *id, const BArrayStore *bs) /* Test Chunks (building data from list of chunks) */ struct TestChunk { - struct TestChunk *next, *prev; + TestChunk *next, *prev; const void *data; size_t data_len; }; @@ -114,7 +114,7 @@ static char *testchunk_as_data_array(TestChunk **tc_array, int tc_array_len, siz /* API to handle local allocation of data so we can compare it with the data in the array_store */ struct TestBuffer { - struct TestBuffer *next, *prev; + TestBuffer *next, *prev; const void *data; size_t data_len; diff --git a/source/blender/blenlib/tests/BLI_kdopbvh_test.cc b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc index 9d13c660de7..dcb68e1578b 100644 --- a/source/blender/blenlib/tests/BLI_kdopbvh_test.cc +++ b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc @@ -16,7 +16,7 @@ /* -------------------------------------------------------------------- */ /* Helper Functions */ -static void rng_v3_round(float *coords, int coords_len, struct RNG *rng, int round, float scale) +static void rng_v3_round(float *coords, int coords_len, RNG *rng, int round, float scale) { for (int i = 0; i < coords_len; i++) { float f = BLI_rng_get_float(rng) * 2.0f - 1.0f; @@ -71,7 +71,7 @@ static void optimal_check_callback(void *userdata, static void find_nearest_points_test( int points_len, float scale, int round, int random_seed, bool optimal = false) { - struct RNG *rng = BLI_rng_new(random_seed); + RNG *rng = BLI_rng_new(random_seed); BVHTree *tree = BLI_bvhtree_new(points_len, 0.0, 8, 8); void *mem = MEM_mallocN(sizeof(float[3]) * points_len, __func__); diff --git a/source/blender/blenlib/tests/BLI_listbase_test.cc b/source/blender/blenlib/tests/BLI_listbase_test.cc index cb9500f4361..c47d0d67154 100644 --- a/source/blender/blenlib/tests/BLI_listbase_test.cc +++ b/source/blender/blenlib/tests/BLI_listbase_test.cc @@ -109,7 +109,7 @@ TEST(listbase, FindLinkOrIndex) TEST(listbase, FindLinkFromStringOrPointer) { struct TestLink { - struct TestLink *next, *prev; + TestLink *next, *prev; char name[64]; const void *ptr; }; @@ -119,14 +119,14 @@ TEST(listbase, FindLinkFromStringOrPointer) const void *const link1_ptr = nullptr; const void *const link2_ptr = link2_name; - const size_t name_offset = offsetof(struct TestLink, name); - const size_t ptr_offset = offsetof(struct TestLink, ptr); + const size_t name_offset = offsetof(TestLink, name); + const size_t ptr_offset = offsetof(TestLink, ptr); ListBase lb; - struct TestLink *link1 = (struct TestLink *)MEM_callocN(sizeof(TestLink), "link1"); + TestLink *link1 = (TestLink *)MEM_callocN(sizeof(TestLink), "link1"); STRNCPY(link1->name, link1_name); link1->ptr = link1_ptr; - struct TestLink *link2 = (struct TestLink *)MEM_callocN(sizeof(TestLink), "link2"); + TestLink *link2 = (TestLink *)MEM_callocN(sizeof(TestLink), "link2"); STRNCPY(link2->name, link2_name); link2->ptr = link2_ptr; diff --git a/source/blender/blenloader/intern/readblenentry.cc b/source/blender/blenloader/intern/readblenentry.cc index 51b0b35f3ac..92a23e494a5 100644 --- a/source/blender/blenloader/intern/readblenentry.cc +++ b/source/blender/blenloader/intern/readblenentry.cc @@ -175,7 +175,7 @@ LinkNode *BLO_blendhandle_get_datablock_info(BlendHandle *bh, if (skip_datablock) { continue; } - struct BLODataBlockInfo *info = static_cast( + BLODataBlockInfo *info = static_cast( MEM_mallocN(sizeof(*info), __func__)); /* Lastly, read asset data from the following blocks. */ @@ -441,7 +441,7 @@ BlendFileData *BLO_read_from_memory(const void *mem, BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filepath, MemFile *memfile, - const struct BlendFileReadParams *params, + const BlendFileReadParams *params, ReportList *reports) { BlendFileData *bfd = nullptr; diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 565b5974745..06836f1de3f 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -184,7 +184,7 @@ static BHead *find_bhead_from_code_name(FileData *fd, const short idcode, const static BHead *find_bhead_from_idname(FileData *fd, const char *idname); struct BHeadN { - struct BHeadN *next, *prev; + BHeadN *next, *prev; #ifdef USE_BHEAD_READ_ON_DEMAND /** Use to read the data from the file directly into memory as needed. */ off64_t file_offset; @@ -192,7 +192,7 @@ struct BHeadN { bool has_data; #endif bool is_memchunk_identical; - struct BHead bhead; + BHead bhead; }; #define BHEADN_FROM_BHEAD(bh) ((BHeadN *)POINTER_OFFSET(bh, -int(offsetof(BHeadN, bhead)))) @@ -3495,7 +3495,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if (G.debug & G_DEBUG) { char build_commit_datetime[32]; time_t temp_time = main->build_commit_timestamp; - struct tm *tm = (temp_time) ? gmtime(&temp_time) : nullptr; + tm *tm = (temp_time) ? gmtime(&temp_time) : nullptr; if (LIKELY(tm)) { strftime(build_commit_datetime, sizeof(build_commit_datetime), "%Y-%m-%d %H:%M", tm); } diff --git a/source/blender/blenloader/intern/readfile_tempload.cc b/source/blender/blenloader/intern/readfile_tempload.cc index f9e576b7f88..3fa46eefa26 100644 --- a/source/blender/blenloader/intern/readfile_tempload.cc +++ b/source/blender/blenloader/intern/readfile_tempload.cc @@ -16,11 +16,11 @@ #include "DNA_ID.h" -TempLibraryContext *BLO_library_temp_load_id(struct Main *real_main, +TempLibraryContext *BLO_library_temp_load_id(Main *real_main, const char *blend_file_path, const short idcode, const char *idname, - struct ReportList *reports) + ReportList *reports) { TempLibraryContext *temp_lib_ctx = static_cast( MEM_callocN(sizeof(*temp_lib_ctx), __func__)); diff --git a/source/blender/blenloader/intern/undofile.cc b/source/blender/blenloader/intern/undofile.cc index ad982f2e79a..c40c8a0cb4c 100644 --- a/source/blender/blenloader/intern/undofile.cc +++ b/source/blender/blenloader/intern/undofile.cc @@ -182,11 +182,9 @@ void BLO_memfile_chunk_add(MemFileWriteData *mem_data, const char *buf, size_t s } } -struct Main *BLO_memfile_main_get(struct MemFile *memfile, - struct Main *bmain, - struct Scene **r_scene) +Main *BLO_memfile_main_get(MemFile *memfile, Main *bmain, Scene **r_scene) { - struct Main *bmain_undo = nullptr; + Main *bmain_undo = nullptr; BlendFileReadParams read_params{}; BlendFileData *bfd = BLO_read_from_memfile( bmain, BKE_main_blendfile_path(bmain), memfile, &read_params, nullptr); @@ -203,7 +201,7 @@ struct Main *BLO_memfile_main_get(struct MemFile *memfile, return bmain_undo; } -bool BLO_memfile_write_file(struct MemFile *memfile, const char *filepath) +bool BLO_memfile_write_file(MemFile *memfile, const char *filepath) { MemFileChunk *chunk; int file, oflags; diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 760c2732306..64a4486437b 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -1370,7 +1370,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) while (sce) { if (sce->toolsettings == NULL) { - sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings), "Tool Settings Struct"); + sce->toolsettings = MEM_callocN(sizeof(ToolSettings), "Tool Settings Struct"); sce->toolsettings->doublimit = 0.001f; } sce = sce->id.next; diff --git a/source/blender/blenloader/intern/writefile.cc b/source/blender/blenloader/intern/writefile.cc index fe615c765dc..e41e463e6f5 100644 --- a/source/blender/blenloader/intern/writefile.cc +++ b/source/blender/blenloader/intern/writefile.cc @@ -150,7 +150,7 @@ enum eWriteWrapType { }; struct ZstdFrame { - struct ZstdFrame *next, *prev; + ZstdFrame *next, *prev; uint32_t compressed_size; uint32_t uncompressed_size; @@ -1093,7 +1093,7 @@ static void write_thumb(WriteData *wd, const BlendThumbnail *thumb) #define ID_BUFFER_STATIC_SIZE 8192 typedef struct BLO_Write_IDBuffer { - const struct IDTypeInfo *id_type; + const IDTypeInfo *id_type; ID *temp_id; char id_buffer_static[ID_BUFFER_STATIC_SIZE]; } BLO_Write_IDBuffer; @@ -1414,7 +1414,7 @@ static bool do_history(const char *name, ReportList *reports) bool BLO_write_file(Main *mainvar, const char *filepath, const int write_flags, - const struct BlendFileWriteParams *params, + const BlendFileWriteParams *params, ReportList *reports) { BLI_assert(!BLI_path_is_rel(filepath)); diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.c b/source/blender/bmesh/intern/bmesh_edgeloop.c index b99f88793b0..b153c4048fb 100644 --- a/source/blender/bmesh/intern/bmesh_edgeloop.c +++ b/source/blender/bmesh/intern/bmesh_edgeloop.c @@ -534,12 +534,12 @@ int BM_edgeloop_length_get(BMEdgeLoopStore *el_store) return el_store->len; } -const float *BM_edgeloop_normal_get(struct BMEdgeLoopStore *el_store) +const float *BM_edgeloop_normal_get(BMEdgeLoopStore *el_store) { return el_store->no; } -const float *BM_edgeloop_center_get(struct BMEdgeLoopStore *el_store) +const float *BM_edgeloop_center_get(BMEdgeLoopStore *el_store) { return el_store->co; } @@ -547,7 +547,7 @@ const float *BM_edgeloop_center_get(struct BMEdgeLoopStore *el_store) #define NODE_AS_V(n) ((BMVert *)((LinkData *)n)->data) #define NODE_AS_CO(n) ((BMVert *)((LinkData *)n)->data)->co -void BM_edgeloop_edges_get(struct BMEdgeLoopStore *el_store, BMEdge **e_arr) +void BM_edgeloop_edges_get(BMEdgeLoopStore *el_store, BMEdge **e_arr) { LinkData *node; int i = 0; @@ -759,8 +759,7 @@ void BM_edgeloop_expand( BLI_assert(el_store->len == el_store_len); } -bool BM_edgeloop_overlap_check(struct BMEdgeLoopStore *el_store_a, - struct BMEdgeLoopStore *el_store_b) +bool BM_edgeloop_overlap_check(BMEdgeLoopStore *el_store_a, BMEdgeLoopStore *el_store_b) { LinkData *node; diff --git a/source/blender/bmesh/intern/bmesh_iterators.cc b/source/blender/bmesh/intern/bmesh_iterators.cc index 2fb7033f801..db09d9e451e 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.cc +++ b/source/blender/bmesh/intern/bmesh_iterators.cc @@ -364,7 +364,7 @@ int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const # define USE_IMMUTABLE_ASSERT #endif -void bmiter__elem_of_mesh_begin(struct BMIter__elem_of_mesh *iter) +void bmiter__elem_of_mesh_begin(BMIter__elem_of_mesh *iter) { #ifdef USE_IMMUTABLE_ASSERT ((BMIter *)iter)->count = BLI_mempool_len(iter->pooliter.pool); @@ -372,7 +372,7 @@ void bmiter__elem_of_mesh_begin(struct BMIter__elem_of_mesh *iter) BLI_mempool_iternew(iter->pooliter.pool, &iter->pooliter); } -void *bmiter__elem_of_mesh_step(struct BMIter__elem_of_mesh *iter) +void *bmiter__elem_of_mesh_step(BMIter__elem_of_mesh *iter) { #ifdef USE_IMMUTABLE_ASSERT BLI_assert(((BMIter *)iter)->count <= BLI_mempool_len(iter->pooliter.pool)); @@ -388,7 +388,7 @@ void *bmiter__elem_of_mesh_step(struct BMIter__elem_of_mesh *iter) * EDGE OF VERT CALLBACKS */ -void bmiter__edge_of_vert_begin(struct BMIter__edge_of_vert *iter) +void bmiter__edge_of_vert_begin(BMIter__edge_of_vert *iter) { if (iter->vdata->e) { iter->e_first = iter->vdata->e; @@ -400,7 +400,7 @@ void bmiter__edge_of_vert_begin(struct BMIter__edge_of_vert *iter) } } -void *bmiter__edge_of_vert_step(struct BMIter__edge_of_vert *iter) +void *bmiter__edge_of_vert_step(BMIter__edge_of_vert *iter) { BMEdge *e_curr = iter->e_next; @@ -418,7 +418,7 @@ void *bmiter__edge_of_vert_step(struct BMIter__edge_of_vert *iter) * FACE OF VERT CALLBACKS */ -void bmiter__face_of_vert_begin(struct BMIter__face_of_vert *iter) +void bmiter__face_of_vert_begin(BMIter__face_of_vert *iter) { ((BMIter *)iter)->count = bmesh_disk_facevert_count(iter->vdata); if (((BMIter *)iter)->count) { @@ -432,7 +432,7 @@ void bmiter__face_of_vert_begin(struct BMIter__face_of_vert *iter) iter->e_first = iter->e_next = nullptr; } } -void *bmiter__face_of_vert_step(struct BMIter__face_of_vert *iter) +void *bmiter__face_of_vert_step(BMIter__face_of_vert *iter) { BMLoop *l_curr = iter->l_next; @@ -457,7 +457,7 @@ void *bmiter__face_of_vert_step(struct BMIter__face_of_vert *iter) * LOOP OF VERT CALLBACKS */ -void bmiter__loop_of_vert_begin(struct BMIter__loop_of_vert *iter) +void bmiter__loop_of_vert_begin(BMIter__loop_of_vert *iter) { ((BMIter *)iter)->count = bmesh_disk_facevert_count(iter->vdata); if (((BMIter *)iter)->count) { @@ -471,7 +471,7 @@ void bmiter__loop_of_vert_begin(struct BMIter__loop_of_vert *iter) iter->e_first = iter->e_next = nullptr; } } -void *bmiter__loop_of_vert_step(struct BMIter__loop_of_vert *iter) +void *bmiter__loop_of_vert_step(BMIter__loop_of_vert *iter) { BMLoop *l_curr = iter->l_next; @@ -497,12 +497,12 @@ void *bmiter__loop_of_vert_step(struct BMIter__loop_of_vert *iter) * LOOP OF EDGE CALLBACKS */ -void bmiter__loop_of_edge_begin(struct BMIter__loop_of_edge *iter) +void bmiter__loop_of_edge_begin(BMIter__loop_of_edge *iter) { iter->l_first = iter->l_next = iter->edata->l; } -void *bmiter__loop_of_edge_step(struct BMIter__loop_of_edge *iter) +void *bmiter__loop_of_edge_step(BMIter__loop_of_edge *iter) { BMLoop *l_curr = iter->l_next; @@ -521,7 +521,7 @@ void *bmiter__loop_of_edge_step(struct BMIter__loop_of_edge *iter) * LOOP OF LOOP CALLBACKS */ -void bmiter__loop_of_loop_begin(struct BMIter__loop_of_loop *iter) +void bmiter__loop_of_loop_begin(BMIter__loop_of_loop *iter) { iter->l_first = iter->ldata; iter->l_next = iter->l_first->radial_next; @@ -531,7 +531,7 @@ void bmiter__loop_of_loop_begin(struct BMIter__loop_of_loop *iter) } } -void *bmiter__loop_of_loop_step(struct BMIter__loop_of_loop *iter) +void *bmiter__loop_of_loop_step(BMIter__loop_of_loop *iter) { BMLoop *l_curr = iter->l_next; @@ -550,12 +550,12 @@ void *bmiter__loop_of_loop_step(struct BMIter__loop_of_loop *iter) * FACE OF EDGE CALLBACKS */ -void bmiter__face_of_edge_begin(struct BMIter__face_of_edge *iter) +void bmiter__face_of_edge_begin(BMIter__face_of_edge *iter) { iter->l_first = iter->l_next = iter->edata->l; } -void *bmiter__face_of_edge_step(struct BMIter__face_of_edge *iter) +void *bmiter__face_of_edge_step(BMIter__face_of_edge *iter) { BMLoop *current = iter->l_next; @@ -573,12 +573,12 @@ void *bmiter__face_of_edge_step(struct BMIter__face_of_edge *iter) * VERTS OF EDGE CALLBACKS */ -void bmiter__vert_of_edge_begin(struct BMIter__vert_of_edge *iter) +void bmiter__vert_of_edge_begin(BMIter__vert_of_edge *iter) { ((BMIter *)iter)->count = 0; } -void *bmiter__vert_of_edge_step(struct BMIter__vert_of_edge *iter) +void *bmiter__vert_of_edge_step(BMIter__vert_of_edge *iter) { switch (((BMIter *)iter)->count++) { case 0: @@ -594,12 +594,12 @@ void *bmiter__vert_of_edge_step(struct BMIter__vert_of_edge *iter) * VERT OF FACE CALLBACKS */ -void bmiter__vert_of_face_begin(struct BMIter__vert_of_face *iter) +void bmiter__vert_of_face_begin(BMIter__vert_of_face *iter) { iter->l_first = iter->l_next = BM_FACE_FIRST_LOOP(iter->pdata); } -void *bmiter__vert_of_face_step(struct BMIter__vert_of_face *iter) +void *bmiter__vert_of_face_step(BMIter__vert_of_face *iter) { BMLoop *l_curr = iter->l_next; @@ -617,12 +617,12 @@ void *bmiter__vert_of_face_step(struct BMIter__vert_of_face *iter) * EDGE OF FACE CALLBACKS */ -void bmiter__edge_of_face_begin(struct BMIter__edge_of_face *iter) +void bmiter__edge_of_face_begin(BMIter__edge_of_face *iter) { iter->l_first = iter->l_next = BM_FACE_FIRST_LOOP(iter->pdata); } -void *bmiter__edge_of_face_step(struct BMIter__edge_of_face *iter) +void *bmiter__edge_of_face_step(BMIter__edge_of_face *iter) { BMLoop *l_curr = iter->l_next; @@ -640,12 +640,12 @@ void *bmiter__edge_of_face_step(struct BMIter__edge_of_face *iter) * LOOP OF FACE CALLBACKS */ -void bmiter__loop_of_face_begin(struct BMIter__loop_of_face *iter) +void bmiter__loop_of_face_begin(BMIter__loop_of_face *iter) { iter->l_first = iter->l_next = BM_FACE_FIRST_LOOP(iter->pdata); } -void *bmiter__loop_of_face_step(struct BMIter__loop_of_face *iter) +void *bmiter__loop_of_face_step(BMIter__loop_of_face *iter) { BMLoop *l_curr = iter->l_next; diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c index ddf11ce2e0b..aa44dc1e142 100644 --- a/source/blender/bmesh/intern/bmesh_log.c +++ b/source/blender/bmesh/intern/bmesh_log.c @@ -34,7 +34,7 @@ #include "BLI_strict_flags.h" struct BMLogEntry { - struct BMLogEntry *next, *prev; + BMLogEntry *next, *prev; /* The following #GHash members map from an element ID to one of the log types above. */ @@ -65,7 +65,7 @@ struct BMLogEntry { struct BMLog { /** Tree of free IDs */ - struct RangeTreeUInt *unused_ids; + RangeTreeUInt *unused_ids; /** * Mapping from unique IDs to vertices and faces diff --git a/source/blender/bmesh/intern/bmesh_mesh.cc b/source/blender/bmesh/intern/bmesh_mesh.cc index 77bb6483bd0..d1b016bec31 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.cc +++ b/source/blender/bmesh/intern/bmesh_mesh.cc @@ -124,7 +124,7 @@ void BM_mesh_elem_toolflags_clear(BMesh *bm) } } -BMesh *BM_mesh_create(const BMAllocTemplate *allocsize, const struct BMeshCreateParams *params) +BMesh *BM_mesh_create(const BMAllocTemplate *allocsize, const BMeshCreateParams *params) { /* allocate the structure */ BMesh *bm = static_cast(MEM_callocN(sizeof(BMesh), __func__)); @@ -1034,7 +1034,7 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const } void BM_mesh_rebuild(BMesh *bm, - const struct BMeshCreateParams *params, + const BMeshCreateParams *params, BLI_mempool *vpool_dst, BLI_mempool *epool_dst, BLI_mempool *lpool_dst, @@ -1314,7 +1314,7 @@ void BM_mesh_toolflags_set(BMesh *bm, bool use_toolflags) bm->etoolflagpool = nullptr; bm->ftoolflagpool = nullptr; } - struct BMeshCreateParams params = {}; + BMeshCreateParams params = {}; params.use_toolflags = use_toolflags; BM_mesh_rebuild(bm, ¶ms, vpool_dst, epool_dst, nullptr, fpool_dst); diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.cc b/source/blender/bmesh/intern/bmesh_mesh_convert.cc index c7627a9e38b..5bf94183bbd 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.cc @@ -210,7 +210,7 @@ static void mesh_attributes_copy_to_bmesh_block(CustomData &data, } } -void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const struct BMeshFromMeshParams *params) +void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const BMeshFromMeshParams *params) { if (!me) { /* Sanity check. */ @@ -1409,7 +1409,7 @@ static void bm_to_mesh_loops(const BMesh &bm, const Span bm_loop } // namespace blender -void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMeshParams *params) +void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const BMeshToMeshParams *params) { using namespace blender; const int old_verts_num = me->totvert; diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.cc b/source/blender/bmesh/intern/bmesh_mesh_normals.cc index f8a0e51c9a8..70ca23ce842 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_normals.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_normals.cc @@ -235,7 +235,7 @@ static void bm_face_calc_normals_cb(void * /*userdata*/, BM_face_calc_normal(f, f->no); } -void BM_mesh_normals_update_ex(BMesh *bm, const struct BMeshNormalsUpdate_Params *params) +void BM_mesh_normals_update_ex(BMesh *bm, const BMeshNormalsUpdate_Params *params) { if (params->face_normals) { /* Calculate all face normals. */ @@ -279,7 +279,7 @@ static void bm_partial_verts_parallel_range_calc_normal_cb( void BM_mesh_normals_update_with_partial_ex(BMesh * /*bm*/, const BMPartialUpdate *bmpinfo, - const struct BMeshNormalsUpdate_Params *params) + const BMeshNormalsUpdate_Params *params) { BLI_assert(bmpinfo->params.do_normals); /* While harmless, exit early if there is nothing to do. */ diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 88a4b49959d..be93b8a90c8 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -217,7 +217,7 @@ void _bmo_slot_copy(BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS], const char *slot_name_src, BMOpSlot slot_args_dst[BMO_OP_MAX_SLOTS], const char *slot_name_dst, - struct MemArena *arena_dst) + MemArena *arena_dst) { BMOpSlot *slot_src = BMO_slot_get(slot_args_src, slot_name_src); BMOpSlot *slot_dst = BMO_slot_get(slot_args_dst, slot_name_dst); @@ -925,7 +925,7 @@ void _bmo_slot_buffer_append(BMOpSlot slot_args_dst[BMO_OP_MAX_SLOTS], const char *slot_name_dst, BMOpSlot slot_args_src[BMO_OP_MAX_SLOTS], const char *slot_name_src, - struct MemArena *arena_dst) + MemArena *arena_dst) { BMOpSlot *slot_dst = BMO_slot_get(slot_args_dst, slot_name_dst); BMOpSlot *slot_src = BMO_slot_get(slot_args_src, slot_name_src); diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 843e68d3c85..0c0e4d25f6b 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -957,7 +957,7 @@ void BM_face_triangulate(BMesh *bm, MemArena *pf_arena, /* use for MOD_TRIANGULATE_NGON_BEAUTY only! */ - struct Heap *pf_heap) + Heap *pf_heap) { const int cd_loop_mdisp_offset = CustomData_get_offset(&bm->ldata, CD_MDISPS); const bool use_beauty = (ngon_method == MOD_TRIANGULATE_NGON_BEAUTY); diff --git a/source/blender/bmesh/operators/bmo_connect_concave.c b/source/blender/bmesh/operators/bmo_connect_concave.c index 28b9ac3767c..acab970371b 100644 --- a/source/blender/bmesh/operators/bmo_connect_concave.c +++ b/source/blender/bmesh/operators/bmo_connect_concave.c @@ -70,7 +70,7 @@ static bool bm_face_split_by_concave(BMesh *bm, const float eps, MemArena *pf_arena, - struct Heap *pf_heap) + Heap *pf_heap) { const int f_base_len = f_base->len; int faces_array_tot = f_base_len - 3; diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c b/source/blender/bmesh/operators/bmo_connect_pair.c index f1d83ce65bd..792e29b4264 100644 --- a/source/blender/bmesh/operators/bmo_connect_pair.c +++ b/source/blender/bmesh/operators/bmo_connect_pair.c @@ -101,7 +101,7 @@ typedef struct PathLink { typedef struct PathLinkState { /* chain of links */ - struct PathLink *link_last; + PathLink *link_last; /* length along links */ float dist; diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c index 98696e4d2e9..61add708990 100644 --- a/source/blender/bmesh/operators/bmo_triangulate.c +++ b/source/blender/bmesh/operators/bmo_triangulate.c @@ -191,7 +191,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op) if (winding_votes < 0) { for (sf_tri = sf_ctx.fillfacebase.first; sf_tri; sf_tri = sf_tri->next) { - SWAP(struct ScanFillVert *, sf_tri->v2, sf_tri->v3); + SWAP(ScanFillVert *, sf_tri->v2, sf_tri->v3); } } } diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 05490f1b445..4103155d84a 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -354,9 +354,9 @@ typedef struct BevelParams { bool harden_normals; char _pad[1]; /** The struct used to store the custom profile input. */ - const struct CurveProfile *custom_profile; + const CurveProfile *custom_profile; /** Vertex group array, maybe set if vertex only. */ - const struct MDeformVert *dvert; + const MDeformVert *dvert; /** Vertex group index, maybe set if vertex only. */ int vertex_group; /** If >= 0, material number for bevel; else material comes from adjacent faces. */ @@ -7736,7 +7736,7 @@ void BM_mesh_bevel(BMesh *bm, const bool affect_type, const bool use_weights, const bool limit_offset, - const struct MDeformVert *dvert, + const MDeformVert *dvert, const int vertex_group, const int mat, const bool loop_slide, @@ -7748,7 +7748,7 @@ void BM_mesh_bevel(BMesh *bm, const int miter_inner, const float spread, const float smoothresh, - const struct CurveProfile *custom_profile, + const CurveProfile *custom_profile, const int vmesh_method) { BMIter iter, liter; diff --git a/source/blender/bmesh/tools/bmesh_boolean.cc b/source/blender/bmesh/tools/bmesh_boolean.cc index 9286adf4b50..4c599e48574 100644 --- a/source/blender/bmesh/tools/bmesh_boolean.cc +++ b/source/blender/bmesh/tools/bmesh_boolean.cc @@ -36,7 +36,7 @@ namespace blender::meshintersect { * the faces in the returned (polygonal) mesh. */ static IMesh mesh_from_bm(BMesh *bm, - struct BMLoop *(*looptris)[3], + BMLoop *(*looptris)[3], const int looptris_tot, IMesh *r_triangulated, IMeshArena *arena) @@ -337,7 +337,7 @@ static bool apply_mesh_output_to_bmesh(BMesh *bm, IMesh &m_out, bool keep_hidden } static bool bmesh_boolean(BMesh *bm, - struct BMLoop *(*looptris)[3], + BMLoop *(*looptris)[3], const int looptris_tot, int (*test_fn)(BMFace *f, void *user_data), void *user_data, @@ -422,7 +422,7 @@ extern "C" { */ #ifdef WITH_GMP bool BM_mesh_boolean(BMesh *bm, - struct BMLoop *(*looptris)[3], + BMLoop *(*looptris)[3], const int looptris_tot, int (*test_fn)(BMFace *f, void *user_data), void *user_data, @@ -447,7 +447,7 @@ bool BM_mesh_boolean(BMesh *bm, } bool BM_mesh_boolean_knife(BMesh *bm, - struct BMLoop *(*looptris)[3], + BMLoop *(*looptris)[3], const int looptris_tot, int (*test_fn)(BMFace *f, void *user_data), void *user_data, diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index 136bb3799b1..8078c3cf522 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -476,7 +476,7 @@ static bool bm_face_triangulate(BMesh *bm, MemArena *pf_arena, /* use for MOD_TRIANGULATE_NGON_BEAUTY only! */ - struct Heap *pf_heap) + Heap *pf_heap) { const int f_base_len = f_base->len; int faces_array_tot = f_base_len - 3; diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c index e58bd60032f..51900e777dc 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.c +++ b/source/blender/bmesh/tools/bmesh_intersect.c @@ -944,7 +944,7 @@ static int isect_bvhtree_point_v3(BVHTree *tree, const float **looptris, const f #endif /* USE_BVH */ bool BM_mesh_intersect(BMesh *bm, - struct BMLoop *(*looptris)[3], + BMLoop *(*looptris)[3], const int looptris_tot, int (*test_fn)(BMFace *f, void *user_data), void *user_data, diff --git a/source/blender/bmesh/tools/bmesh_path_uv.c b/source/blender/bmesh/tools/bmesh_path_uv.c index eef9cf7f08e..f9cc9f44012 100644 --- a/source/blender/bmesh/tools/bmesh_path_uv.c +++ b/source/blender/bmesh/tools/bmesh_path_uv.c @@ -109,12 +109,12 @@ static void verttag_add_adjacent_uv(HeapSimple *heap, } } -struct LinkNode *BM_mesh_calc_path_uv_vert(BMesh *bm, - BMLoop *l_src, - BMLoop *l_dst, - const struct BMCalcPathUVParams *params, - bool (*filter_fn)(BMLoop *, void *), - void *user_data) +LinkNode *BM_mesh_calc_path_uv_vert(BMesh *bm, + BMLoop *l_src, + BMLoop *l_dst, + const struct BMCalcPathUVParams *params, + bool (*filter_fn)(BMLoop *, void *), + void *user_data) { LinkNode *path = NULL; /* BM_ELEM_TAG flag is used to store visited edges */ @@ -314,12 +314,12 @@ static void edgetag_add_adjacent_uv(HeapSimple *heap, } } -struct LinkNode *BM_mesh_calc_path_uv_edge(BMesh *bm, - BMLoop *l_src, - BMLoop *l_dst, - const struct BMCalcPathUVParams *params, - bool (*filter_fn)(BMLoop *, void *), - void *user_data) +LinkNode *BM_mesh_calc_path_uv_edge(BMesh *bm, + BMLoop *l_src, + BMLoop *l_dst, + const struct BMCalcPathUVParams *params, + bool (*filter_fn)(BMLoop *, void *), + void *user_data) { LinkNode *path = NULL; @@ -536,12 +536,12 @@ static void facetag_add_adjacent_uv(HeapSimple *heap, } } -struct LinkNode *BM_mesh_calc_path_uv_face(BMesh *bm, - BMFace *f_src, - BMFace *f_dst, - const struct BMCalcPathUVParams *params, - bool (*filter_fn)(BMFace *, void *), - void *user_data) +LinkNode *BM_mesh_calc_path_uv_face(BMesh *bm, + BMFace *f_src, + BMFace *f_dst, + const struct BMCalcPathUVParams *params, + bool (*filter_fn)(BMFace *, void *), + void *user_data) { const float aspect_v2[2] = {1.0f, 1.0f / params->aspect_y}; LinkNode *path = NULL; diff --git a/source/blender/bmesh/tools/bmesh_triangulate.c b/source/blender/bmesh/tools/bmesh_triangulate.c index cb9cfdd690d..25a6c3d8530 100644 --- a/source/blender/bmesh/tools/bmesh_triangulate.c +++ b/source/blender/bmesh/tools/bmesh_triangulate.c @@ -40,7 +40,7 @@ static void bm_face_triangulate_mapping(BMesh *bm, MemArena *pf_arena, /* use for MOD_TRIANGULATE_NGON_BEAUTY only! */ - struct Heap *pf_heap) + Heap *pf_heap) { int faces_array_tot = face->len - 3; BMFace **faces_array = BLI_array_alloca(faces_array, faces_array_tot); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index a87687aeffd..cffa7e087a2 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -2259,8 +2259,8 @@ void DepsgraphNodeBuilder::build_scene_speakers(Scene *scene, ViewLayer *view_la /* **** ID traversal callbacks functions **** */ void DepsgraphNodeBuilder::modifier_walk(void *user_data, - struct Object * /*object*/, - struct ID **idpoin, + Object * /*object*/, + ID **idpoin, int /*cb_flag*/) { BuilderWalkUserData *data = (BuilderWalkUserData *)user_data; diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 0ca0be678ce..2a3fae86085 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -3459,8 +3459,8 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node) /* **** ID traversal callbacks functions **** */ void DepsgraphRelationBuilder::modifier_walk(void *user_data, - struct Object * /*object*/, - struct ID **idpoin, + Object * /*object*/, + ID **idpoin, int /*cb_flag*/) { BuilderWalkUserData *data = (BuilderWalkUserData *)user_data; diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index fa75037c4fa..f004509c6b4 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -275,7 +275,7 @@ Depsgraph *DEG_graph_new(Main *bmain, Scene *scene, ViewLayer *view_layer, eEval return reinterpret_cast(deg_depsgraph); } -void DEG_graph_replace_owners(struct Depsgraph *depsgraph, +void DEG_graph_replace_owners(Depsgraph *depsgraph, Main *bmain, Scene *scene, ViewLayer *view_layer) @@ -307,13 +307,13 @@ void DEG_graph_free(Depsgraph *graph) delete deg_depsgraph; } -bool DEG_is_evaluating(const struct Depsgraph *depsgraph) +bool DEG_is_evaluating(const Depsgraph *depsgraph) { const deg::Depsgraph *deg_graph = reinterpret_cast(depsgraph); return deg_graph->is_evaluating; } -bool DEG_is_active(const struct Depsgraph *depsgraph) +bool DEG_is_active(const Depsgraph *depsgraph) { if (depsgraph == nullptr) { /* Happens for such cases as work object in what_does_obaction(), @@ -326,20 +326,20 @@ bool DEG_is_active(const struct Depsgraph *depsgraph) return deg_graph->is_active; } -void DEG_make_active(struct Depsgraph *depsgraph) +void DEG_make_active(Depsgraph *depsgraph) { deg::Depsgraph *deg_graph = reinterpret_cast(depsgraph); deg_graph->is_active = true; /* TODO(sergey): Copy data from evaluated state to original. */ } -void DEG_make_inactive(struct Depsgraph *depsgraph) +void DEG_make_inactive(Depsgraph *depsgraph) { deg::Depsgraph *deg_graph = reinterpret_cast(depsgraph); deg_graph->is_active = false; } -void DEG_disable_visibility_optimization(struct Depsgraph *depsgraph) +void DEG_disable_visibility_optimization(Depsgraph *depsgraph) { deg::Depsgraph *deg_graph = reinterpret_cast(depsgraph); deg_graph->use_visibility_optimization = false; diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc index dcfba130d2e..76481c870d8 100644 --- a/source/blender/depsgraph/intern/depsgraph_build.cc +++ b/source/blender/depsgraph/intern/depsgraph_build.cc @@ -172,8 +172,8 @@ void DEG_add_bone_relation(DepsNodeHandle *node_handle, deg_node_handle->builder->add_node_handle_relation(comp_key, deg_node_handle, description); } -void DEG_add_object_pointcache_relation(struct DepsNodeHandle *node_handle, - struct Object *object, +void DEG_add_object_pointcache_relation(DepsNodeHandle *node_handle, + Object *object, eDepsObjectComponentType component, const char *description) { @@ -195,9 +195,7 @@ void DEG_add_object_pointcache_relation(struct DepsNodeHandle *node_handle, } } -void DEG_add_generic_id_relation(struct DepsNodeHandle *node_handle, - struct ID *id, - const char *description) +void DEG_add_generic_id_relation(DepsNodeHandle *node_handle, ID *id, const char *description) { deg::OperationKey operation_key( id, deg::NodeType::GENERIC_DATABLOCK, deg::OperationCode::GENERIC_DATABLOCK_UPDATE); @@ -205,34 +203,33 @@ void DEG_add_generic_id_relation(struct DepsNodeHandle *node_handle, deg_node_handle->builder->add_node_handle_relation(operation_key, deg_node_handle, description); } -void DEG_add_depends_on_transform_relation(struct DepsNodeHandle *node_handle, - const char *description) +void DEG_add_depends_on_transform_relation(DepsNodeHandle *node_handle, const char *description) { deg::DepsNodeHandle *deg_node_handle = get_node_handle(node_handle); deg_node_handle->builder->add_depends_on_transform_relation(deg_node_handle, description); } -void DEG_add_special_eval_flag(struct DepsNodeHandle *node_handle, ID *id, uint32_t flag) +void DEG_add_special_eval_flag(DepsNodeHandle *node_handle, ID *id, uint32_t flag) { deg::DepsNodeHandle *deg_node_handle = get_node_handle(node_handle); deg_node_handle->builder->add_special_eval_flag(id, flag); } -void DEG_add_customdata_mask(struct DepsNodeHandle *node_handle, - struct Object *object, +void DEG_add_customdata_mask(DepsNodeHandle *node_handle, + Object *object, const CustomData_MeshMasks *masks) { deg::DepsNodeHandle *deg_node_handle = get_node_handle(node_handle); deg_node_handle->builder->add_customdata_mask(object, deg::DEGCustomDataMeshMasks(masks)); } -struct ID *DEG_get_id_from_handle(struct DepsNodeHandle *node_handle) +ID *DEG_get_id_from_handle(DepsNodeHandle *node_handle) { deg::DepsNodeHandle *deg_handle = get_node_handle(node_handle); return deg_handle->node->owner->owner->id_orig; } -struct Depsgraph *DEG_get_graph_from_handle(struct DepsNodeHandle *node_handle) +Depsgraph *DEG_get_graph_from_handle(DepsNodeHandle *node_handle) { deg::DepsNodeHandle *deg_node_handle = get_node_handle(node_handle); deg::DepsgraphRelationBuilder *relation_builder = deg_node_handle->builder; @@ -248,7 +245,7 @@ void DEG_graph_build_from_view_layer(Depsgraph *graph) builder.build(); } -void DEG_graph_build_for_all_objects(struct Depsgraph *graph) +void DEG_graph_build_for_all_objects(Depsgraph *graph) { deg::AllObjectsBuilderPipeline builder(graph); builder.build(); diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc index 6aea27c310a..31a168c0d0c 100644 --- a/source/blender/depsgraph/intern/depsgraph_debug.cc +++ b/source/blender/depsgraph/intern/depsgraph_debug.cc @@ -41,19 +41,19 @@ int DEG_debug_flags_get(const Depsgraph *depsgraph) return deg_graph->debug.flags; } -void DEG_debug_name_set(struct Depsgraph *depsgraph, const char *name) +void DEG_debug_name_set(Depsgraph *depsgraph, const char *name) { deg::Depsgraph *deg_graph = reinterpret_cast(depsgraph); deg_graph->debug.name = name; } -const char *DEG_debug_name_get(struct Depsgraph *depsgraph) +const char *DEG_debug_name_get(Depsgraph *depsgraph) { const deg::Depsgraph *deg_graph = reinterpret_cast(depsgraph); return deg_graph->debug.name.c_str(); } -bool DEG_debug_compare(const struct Depsgraph *graph1, const struct Depsgraph *graph2) +bool DEG_debug_compare(const Depsgraph *graph1, const Depsgraph *graph2) { BLI_assert(graph1 != nullptr); BLI_assert(graph2 != nullptr); @@ -224,7 +224,7 @@ void DEG_stats_simple(const Depsgraph *graph, } } -static deg::string depsgraph_name_for_logging(struct Depsgraph *depsgraph) +static deg::string depsgraph_name_for_logging(Depsgraph *depsgraph) { const char *name = DEG_debug_name_get(depsgraph); if (name[0] == '\0') { @@ -233,12 +233,12 @@ static deg::string depsgraph_name_for_logging(struct Depsgraph *depsgraph) return "[" + deg::string(name) + "]: "; } -void DEG_debug_print_begin(struct Depsgraph *depsgraph) +void DEG_debug_print_begin(Depsgraph *depsgraph) { fprintf(stdout, "%s", depsgraph_name_for_logging(depsgraph).c_str()); } -void DEG_debug_print_eval(struct Depsgraph *depsgraph, +void DEG_debug_print_eval(Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address) @@ -257,7 +257,7 @@ void DEG_debug_print_eval(struct Depsgraph *depsgraph, fflush(stdout); } -void DEG_debug_print_eval_subdata(struct Depsgraph *depsgraph, +void DEG_debug_print_eval_subdata(Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, @@ -284,7 +284,7 @@ void DEG_debug_print_eval_subdata(struct Depsgraph *depsgraph, fflush(stdout); } -void DEG_debug_print_eval_subdata_index(struct Depsgraph *depsgraph, +void DEG_debug_print_eval_subdata_index(Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, @@ -313,7 +313,7 @@ void DEG_debug_print_eval_subdata_index(struct Depsgraph *depsgraph, fflush(stdout); } -void DEG_debug_print_eval_parent_typed(struct Depsgraph *depsgraph, +void DEG_debug_print_eval_parent_typed(Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, @@ -340,7 +340,7 @@ void DEG_debug_print_eval_parent_typed(struct Depsgraph *depsgraph, fflush(stdout); } -void DEG_debug_print_eval_time(struct Depsgraph *depsgraph, +void DEG_debug_print_eval_time(Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index c5ee381bd22..0fb2fffe3dd 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -79,19 +79,19 @@ static ID *get_evaluated_id(const Depsgraph *deg_graph, ID *id) namespace deg = blender::deg; -struct Scene *DEG_get_input_scene(const Depsgraph *graph) +Scene *DEG_get_input_scene(const Depsgraph *graph) { const deg::Depsgraph *deg_graph = reinterpret_cast(graph); return deg_graph->scene; } -struct ViewLayer *DEG_get_input_view_layer(const Depsgraph *graph) +ViewLayer *DEG_get_input_view_layer(const Depsgraph *graph) { const deg::Depsgraph *deg_graph = reinterpret_cast(graph); return deg_graph->view_layer; } -struct Main *DEG_get_bmain(const Depsgraph *graph) +Main *DEG_get_bmain(const Depsgraph *graph) { const deg::Depsgraph *deg_graph = reinterpret_cast(graph); return deg_graph->bmain; @@ -326,7 +326,7 @@ bool DEG_is_evaluated_object(const Object *object) return !DEG_is_original_object(object); } -bool DEG_is_fully_evaluated(const struct Depsgraph *depsgraph) +bool DEG_is_fully_evaluated(const Depsgraph *depsgraph) { const deg::Depsgraph *deg_graph = (const deg::Depsgraph *)depsgraph; /* Check whether relations are up to date. */ diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 6f55a7a4de2..943766132ae 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -790,23 +790,20 @@ void DEG_id_tag_update_ex(Main *bmain, ID *id, uint flags) deg::id_tag_update(bmain, id, flags, deg::DEG_UPDATE_SOURCE_USER_EDIT); } -void DEG_graph_id_tag_update(struct Main *bmain, - struct Depsgraph *depsgraph, - struct ID *id, - uint flags) +void DEG_graph_id_tag_update(Main *bmain, Depsgraph *depsgraph, ID *id, uint flags) { deg::Depsgraph *graph = (deg::Depsgraph *)depsgraph; deg::graph_id_tag_update(bmain, graph, id, flags, deg::DEG_UPDATE_SOURCE_USER_EDIT); } -void DEG_time_tag_update(struct Main *bmain) +void DEG_time_tag_update(Main *bmain) { for (deg::Depsgraph *depsgraph : deg::get_all_registered_graphs(bmain)) { DEG_graph_time_tag_update(reinterpret_cast<::Depsgraph *>(depsgraph)); } } -void DEG_graph_time_tag_update(struct Depsgraph *depsgraph) +void DEG_graph_time_tag_update(Depsgraph *depsgraph) { deg::Depsgraph *deg_graph = reinterpret_cast(depsgraph); deg_graph->tag_time_source(); diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index ce03b16f340..73ecf3f7bc6 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -1025,7 +1025,7 @@ void deg_free_copy_on_write_datablock(ID *id_cow) id_cow->name[0] = '\0'; } -void deg_evaluate_copy_on_write(struct ::Depsgraph *graph, const IDNode *id_node) +void deg_evaluate_copy_on_write(::Depsgraph *graph, const IDNode *id_node) { const Depsgraph *depsgraph = reinterpret_cast(graph); DEG_debug_print_eval(graph, __func__, id_node->id_orig->name, id_node->id_cow); diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c index 914ae1b7885..1c3d8b42406 100644 --- a/source/blender/draw/engines/basic/basic_engine.c +++ b/source/blender/draw/engines/basic/basic_engine.c @@ -37,9 +37,9 @@ typedef struct BASIC_StorageList { } BASIC_StorageList; typedef struct BASIC_PassList { - struct DRWPass *depth_pass[2]; - struct DRWPass *depth_pass_pointcloud[2]; - struct DRWPass *depth_pass_cull[2]; + DRWPass *depth_pass[2]; + DRWPass *depth_pass_pointcloud[2]; + DRWPass *depth_pass_cull[2]; } BASIC_PassList; typedef struct BASIC_Data { @@ -120,7 +120,7 @@ static void basic_cache_init(void *vedata) static struct GPUBatch **basic_object_surface_material_get(Object *ob) { const int materials_len = DRW_cache_object_material_count_get(ob); - struct GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); + GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); memset(gpumat_array, 0, sizeof(*gpumat_array) * materials_len); return DRW_cache_object_surface_material_get(ob, gpumat_array, materials_len); diff --git a/source/blender/draw/engines/basic/basic_shader.c b/source/blender/draw/engines/basic/basic_shader.c index 3435d988ee1..722415f8401 100644 --- a/source/blender/draw/engines/basic/basic_shader.c +++ b/source/blender/draw/engines/basic/basic_shader.c @@ -23,11 +23,11 @@ extern char datatoc_common_pointcloud_lib_glsl[]; typedef struct BASIC_Shaders { /* Depth Pre Pass */ - struct GPUShader *depth; - struct GPUShader *pointcloud_depth; - struct GPUShader *curves_depth; - struct GPUShader *depth_conservative; - struct GPUShader *pointcloud_depth_conservative; + GPUShader *depth; + GPUShader *pointcloud_depth; + GPUShader *curves_depth; + GPUShader *depth_conservative; + GPUShader *pointcloud_depth_conservative; } BASIC_Shaders; static struct { diff --git a/source/blender/draw/engines/eevee/eevee_bloom.c b/source/blender/draw/engines/eevee/eevee_bloom.c index 3428d234f4f..7b0e5a8a87f 100644 --- a/source/blender/draw/engines/eevee/eevee_bloom.c +++ b/source/blender/draw/engines/eevee/eevee_bloom.c @@ -131,7 +131,7 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata) static DRWShadingGroup *eevee_create_bloom_pass(const char *name, EEVEE_EffectsInfo *effects, - struct GPUShader *sh, + GPUShader *sh, DRWPass **pass, bool upsample, bool resolve, @@ -250,7 +250,7 @@ void EEVEE_bloom_draw(EEVEE_Data *vedata) /* Bloom */ if ((effects->enabled_effects & EFFECT_BLOOM) != 0) { - struct GPUTexture *last; + GPUTexture *last; /* Extract bright pixels */ copy_v2_v2(effects->unf_source_texel_size, effects->source_texel_size); diff --git a/source/blender/draw/engines/eevee/eevee_cryptomatte.c b/source/blender/draw/engines/eevee/eevee_cryptomatte.c index bb2df432bbc..4bb115c9aca 100644 --- a/source/blender/draw/engines/eevee/eevee_cryptomatte.c +++ b/source/blender/draw/engines/eevee/eevee_cryptomatte.c @@ -291,13 +291,12 @@ void EEVEE_cryptomatte_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *s if ((cryptomatte_layers & VIEW_LAYER_CRYPTOMATTE_MATERIAL) != 0) { const int materials_len = DRW_cache_object_material_count_get(ob); - struct GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); + GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); memset(gpumat_array, 0, sizeof(*gpumat_array) * materials_len); - struct GPUBatch **geoms = DRW_cache_object_surface_material_get( - ob, gpumat_array, materials_len); + GPUBatch **geoms = DRW_cache_object_surface_material_get(ob, gpumat_array, materials_len); if (geoms) { for (int i = 0; i < materials_len; i++) { - struct GPUBatch *geom = geoms[i]; + GPUBatch *geom = geoms[i]; if (geom == NULL) { continue; } diff --git a/source/blender/draw/engines/eevee/eevee_data.c b/source/blender/draw/engines/eevee/eevee_data.c index ff31340d875..58b1d342d90 100644 --- a/source/blender/draw/engines/eevee/eevee_data.c +++ b/source/blender/draw/engines/eevee/eevee_data.c @@ -244,7 +244,7 @@ static void eevee_view_layer_init(EEVEE_ViewLayerData *sldata) sldata->common_ubo = GPU_uniformbuf_create(sizeof(sldata->common_data)); } -EEVEE_ViewLayerData *EEVEE_view_layer_data_ensure_ex(struct ViewLayer *view_layer) +EEVEE_ViewLayerData *EEVEE_view_layer_data_ensure_ex(ViewLayer *view_layer) { EEVEE_ViewLayerData **sldata = (EEVEE_ViewLayerData **)DRW_view_layer_engine_data_ensure_ex( view_layer, &draw_engine_eevee_type, &EEVEE_view_layer_data_free); diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c index 7f9e3e788c9..a3f1f8d67ba 100644 --- a/source/blender/draw/engines/eevee/eevee_effects.c +++ b/source/blender/draw/engines/eevee/eevee_effects.c @@ -20,8 +20,8 @@ static struct { /* These are just references, not actually allocated */ - struct GPUTexture *depth_src; - struct GPUTexture *color_src; + GPUTexture *depth_src; + GPUTexture *color_src; int depth_src_layer; /* Size can be vec3. But we only use 2 components in the shader. */ diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index f35876319d0..00764983fd4 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -461,7 +461,7 @@ static void eevee_render_reset_passes(EEVEE_Data *vedata) static void eevee_render_to_image(void *vedata, RenderEngine *engine, - struct RenderLayer *render_layer, + RenderLayer *render_layer, const rcti *rect) { EEVEE_Data *ved = (EEVEE_Data *)vedata; @@ -620,7 +620,7 @@ static void eevee_render_to_image(void *vedata, } } -static void eevee_store_metadata(void *vedata, struct RenderResult *render_result) +static void eevee_store_metadata(void *vedata, RenderResult *render_result) { EEVEE_Data *ved = (EEVEE_Data *)vedata; EEVEE_PrivateData *g_data = ved->stl->g_data; diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index 3dbbdc7e914..28f2c6773fe 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -139,8 +139,8 @@ typedef struct EEVEE_LightBake { LightProbe **cube_prb; /* Dummy Textures */ - struct GPUTexture *dummy_color, *dummy_depth; - struct GPUTexture *dummy_layer_color; + GPUTexture *dummy_color, *dummy_depth; + GPUTexture *dummy_layer_color; int total, done; /* to compute progress */ bool *stop, *do_update; @@ -748,11 +748,11 @@ static void eevee_lightbake_create_resources(EEVEE_LightBake *lbake) lbake->lcache->cube_len = 1; } -wmJob *EEVEE_lightbake_job_create(struct wmWindowManager *wm, - struct wmWindow *win, +wmJob *EEVEE_lightbake_job_create(wmWindowManager *wm, + wmWindow *win, struct Main *bmain, - struct ViewLayer *view_layer, - struct Scene *scene, + ViewLayer *view_layer, + Scene *scene, int delay, int frame) { @@ -818,11 +818,8 @@ wmJob *EEVEE_lightbake_job_create(struct wmWindowManager *wm, return wm_job; } -void *EEVEE_lightbake_job_data_alloc(struct Main *bmain, - struct ViewLayer *view_layer, - struct Scene *scene, - bool run_as_job, - int frame) +void *EEVEE_lightbake_job_data_alloc( + struct Main *bmain, ViewLayer *view_layer, Scene *scene, bool run_as_job, int frame) { BLI_assert(BLI_thread_is_main()); diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c index e63254701d0..6894a93a9e8 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.c +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c @@ -36,11 +36,11 @@ #include "WM_types.h" static struct { - struct GPUTexture *planar_pool_placeholder; - struct GPUTexture *depth_placeholder; - struct GPUTexture *depth_array_placeholder; + GPUTexture *planar_pool_placeholder; + GPUTexture *depth_placeholder; + GPUTexture *depth_array_placeholder; - struct GPUVertFormat *format_probe_display_planar; + GPUVertFormat *format_probe_display_planar; } e_data = {NULL}; /* Engine data */ /* *********** FUNCTIONS *********** */ @@ -308,7 +308,7 @@ void EEVEE_lightprobes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedat World *world = (scene->world) ? scene->world : EEVEE_world_default_get(); const int options = VAR_WORLD_BACKGROUND | VAR_WORLD_PROBE; - struct GPUMaterial *gpumat = EEVEE_material_get(vedata, scene, NULL, world, options); + GPUMaterial *gpumat = EEVEE_material_get(vedata, scene, NULL, world, options); grp = DRW_shgroup_material_create(gpumat, psl->probe_background); DRW_shgroup_uniform_float_copy(grp, "backgroundAlpha", 1.0f); @@ -753,7 +753,7 @@ void EEVEE_lightprobes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *ved typedef struct EEVEE_BakeRenderData { EEVEE_Data *vedata; EEVEE_ViewLayerData *sldata; - struct GPUFrameBuffer **face_fb; /* should contain 6 framebuffer */ + GPUFrameBuffer **face_fb; /* should contain 6 framebuffer */ } EEVEE_BakeRenderData; static void render_cubemap(void (*callback)(int face, EEVEE_BakeRenderData *user_data), @@ -825,7 +825,7 @@ static void render_reflections(void (*callback)(int face, EEVEE_BakeRenderData * static void lightbake_render_world_face(int face, EEVEE_BakeRenderData *user_data) { EEVEE_PassList *psl = user_data->vedata->psl; - struct GPUFrameBuffer **face_fb = user_data->face_fb; + GPUFrameBuffer **face_fb = user_data->face_fb; /* For world probe, we don't need to clear the color buffer * since we render the background directly. */ @@ -836,7 +836,7 @@ static void lightbake_render_world_face(int face, EEVEE_BakeRenderData *user_dat void EEVEE_lightbake_render_world(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata, - struct GPUFrameBuffer *face_fb[6]) + GPUFrameBuffer *face_fb[6]) { EEVEE_BakeRenderData brdata = { .vedata = vedata, @@ -853,7 +853,7 @@ static void lightbake_render_scene_face(int face, EEVEE_BakeRenderData *user_dat EEVEE_PrivateData *g_data = user_data->vedata->stl->g_data; DRWView **views = g_data->bake_views; - struct GPUFrameBuffer **face_fb = user_data->face_fb; + GPUFrameBuffer **face_fb = user_data->face_fb; /* Be sure that cascaded shadow maps are updated. */ EEVEE_shadows_draw(sldata, user_data->vedata, views[face]); @@ -870,7 +870,7 @@ static void lightbake_render_scene_face(int face, EEVEE_BakeRenderData *user_dat void EEVEE_lightbake_render_scene(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, - struct GPUFrameBuffer *face_fb[6], + GPUFrameBuffer *face_fb[6], const float pos[3], float near_clip, float far_clip) @@ -974,8 +974,8 @@ static void eevee_lightbake_render_scene_to_planars(EEVEE_ViewLayerData *sldata, void EEVEE_lightbake_filter_glossy(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, - struct GPUTexture *rt_color, - struct GPUFrameBuffer *fb, + GPUTexture *rt_color, + GPUFrameBuffer *fb, int probe_idx, float intensity, int maxlevel, @@ -1062,8 +1062,8 @@ void EEVEE_lightbake_filter_glossy(EEVEE_ViewLayerData *sldata, void EEVEE_lightbake_filter_diffuse(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, - struct GPUTexture *rt_color, - struct GPUFrameBuffer *fb, + GPUTexture *rt_color, + GPUFrameBuffer *fb, int grid_offset, float intensity) { @@ -1114,8 +1114,8 @@ void EEVEE_lightbake_filter_diffuse(EEVEE_ViewLayerData *sldata, void EEVEE_lightbake_filter_visibility(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, - struct GPUTexture *UNUSED(rt_depth), - struct GPUFrameBuffer *fb, + GPUTexture *UNUSED(rt_depth), + GPUFrameBuffer *fb, int grid_offset, float clipsta, float clipend, diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c index b4041a3ecb8..f457251eb31 100644 --- a/source/blender/draw/engines/eevee/eevee_lookdev.c +++ b/source/blender/draw/engines/eevee/eevee_lookdev.c @@ -61,7 +61,7 @@ static void eevee_lookdev_hdri_preview_init(EEVEE_Data *vedata, EEVEE_ViewLayerD { Material *ma = EEVEE_material_default_diffuse_get(); GPUMaterial *gpumat = EEVEE_material_get(vedata, scene, ma, NULL, mat_options); - struct GPUShader *sh = GPU_material_get_shader(gpumat); + GPUShader *sh = GPU_material_get_shader(gpumat); DRW_PASS_CREATE(psl->lookdev_diffuse_pass, state); grp = DRW_shgroup_create(sh, psl->lookdev_diffuse_pass); @@ -72,7 +72,7 @@ static void eevee_lookdev_hdri_preview_init(EEVEE_Data *vedata, EEVEE_ViewLayerD { Material *ma = EEVEE_material_default_glossy_get(); GPUMaterial *gpumat = EEVEE_material_get(vedata, scene, ma, NULL, mat_options); - struct GPUShader *sh = GPU_material_get_shader(gpumat); + GPUShader *sh = GPU_material_get_shader(gpumat); DRW_PASS_CREATE(psl->lookdev_glossy_pass, state); grp = DRW_shgroup_create(sh, psl->lookdev_glossy_pass); diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 2b671b78d5f..11d04a090db 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -37,28 +37,28 @@ static struct { /* 64*64 array texture containing all LUTs and other utilitarian arrays. * Packing enables us to same precious textures slots. */ - struct GPUTexture *util_tex; - struct GPUTexture *noise_tex; + GPUTexture *util_tex; + GPUTexture *noise_tex; float noise_offsets[3]; } e_data = {NULL}; /* Engine data */ typedef struct EeveeMaterialCache { - struct DRWShadingGroup *depth_grp; - struct DRWShadingGroup *shading_grp; - struct DRWShadingGroup *shadow_grp; - struct GPUMaterial *shading_gpumat; + DRWShadingGroup *depth_grp; + DRWShadingGroup *shading_grp; + DRWShadingGroup *shadow_grp; + GPUMaterial *shading_gpumat; /* Meh, Used by hair to ensure draw order when calling DRW_shgroup_create_sub. * Pointers to ghash values. */ - struct DRWShadingGroup **depth_grp_p; - struct DRWShadingGroup **shading_grp_p; - struct DRWShadingGroup **shadow_grp_p; + DRWShadingGroup **depth_grp_p; + DRWShadingGroup **shading_grp_p; + DRWShadingGroup **shadow_grp_p; } EeveeMaterialCache; /* *********** FUNCTIONS *********** */ /* XXX TODO: define all shared resources in a shared place without duplication. */ -struct GPUTexture *EEVEE_materials_get_util_tex(void) +GPUTexture *EEVEE_materials_get_util_tex(void) { return e_data.util_tex; } @@ -346,8 +346,8 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, * `EEVEE_renderpasses_init` as the `e_data.vertcode` can be uninitialized. */ if (g_data->render_passes & EEVEE_RENDER_PASS_ENVIRONMENT) { - struct Scene *scene = draw_ctx->scene; - struct World *wo = scene->world; + Scene *scene = draw_ctx->scene; + World *wo = scene->world; if (wo && wo->use_nodes) { EEVEE_material_get(vedata, scene, NULL, wo, VAR_WORLD_BACKGROUND); } @@ -384,7 +384,7 @@ void EEVEE_materials_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) World *world = (scene->world) ? scene->world : EEVEE_world_default_get(); const int options = VAR_WORLD_BACKGROUND; - struct GPUMaterial *gpumat = EEVEE_material_get(vedata, scene, NULL, world, options); + GPUMaterial *gpumat = EEVEE_material_get(vedata, scene, NULL, world, options); grp = DRW_shgroup_material_create(gpumat, psl->background_ps); DRW_shgroup_uniform_float(grp, "backgroundAlpha", &stl->g_data->background_alpha, 1); @@ -507,7 +507,7 @@ BLI_INLINE void material_shadow(EEVEE_Data *vedata, SET_FLAG_FROM_TEST(option, is_hair, KEY_HAIR); /* Search for the same shaders usage in the pass. */ - struct GPUShader *sh = GPU_material_get_shader(gpumat); + GPUShader *sh = GPU_material_get_shader(gpumat); void *cache_key = (char *)sh + option; DRWShadingGroup *grp, **grp_p; @@ -587,7 +587,7 @@ static EeveeMaterialCache material_opaque(EEVEE_Data *vedata, SET_FLAG_FROM_TEST(option, is_hair, KEY_HAIR); /* Search for the same shaders usage in the pass. */ - struct GPUShader *sh = GPU_material_get_shader(gpumat); + GPUShader *sh = GPU_material_get_shader(gpumat); void *cache_key = (char *)sh + option; DRWShadingGroup *grp, **grp_p; @@ -632,7 +632,7 @@ static EeveeMaterialCache material_opaque(EEVEE_Data *vedata, /* HACK: Assume the struct will never be smaller than our variations. * This allow us to only keep one ghash and avoid bigger keys comparisons/hashing. */ BLI_assert(option <= 16); - struct GPUShader *sh = GPU_material_get_shader(gpumat); + GPUShader *sh = GPU_material_get_shader(gpumat); void *cache_key = (char *)sh + option; DRWShadingGroup *grp, **grp_p; @@ -698,7 +698,7 @@ static EeveeMaterialCache material_transparent(EEVEE_Data *vedata, /* Depth prepass */ int mat_options = VAR_MAT_MESH | VAR_MAT_DEPTH; GPUMaterial *gpumat = EEVEE_material_get(vedata, scene, ma, NULL, mat_options); - struct GPUShader *sh = GPU_material_get_shader(gpumat); + GPUShader *sh = GPU_material_get_shader(gpumat); DRWShadingGroup *grp = DRW_shgroup_create(sh, psl->transparent_pass); @@ -837,9 +837,9 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, GPU_material_has_volume_output(matcache[0].shading_gpumat)); if ((ob->dt >= OB_SOLID) || DRW_state_is_scene_render()) { if (use_sculpt_pbvh) { - struct DRWShadingGroup **shgrps_array = BLI_array_alloca(shgrps_array, materials_len); + DRWShadingGroup **shgrps_array = BLI_array_alloca(shgrps_array, materials_len); - struct GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); + GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); MATCACHE_AS_ARRAY(matcache, shading_gpumat, materials_len, gpumat_array); MATCACHE_AS_ARRAY(matcache, shading_grp, materials_len, shgrps_array); @@ -854,7 +854,7 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, *cast_shadow = true; } else { - struct GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); + GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); MATCACHE_AS_ARRAY(matcache, shading_gpumat, materials_len, gpumat_array); /* Get per-material split surface */ struct GPUBatch **mat_geom = DRW_cache_object_surface_material_get( @@ -1068,7 +1068,7 @@ static void material_renderpass_accumulate(EEVEE_EffectsInfo *effects, DRWPass *renderpass2, EEVEE_PrivateData *pd, GPUTexture *output_tx, - struct GPUUniformBuf *renderpass_option_ubo) + GPUUniformBuf *renderpass_option_ubo) { GPU_framebuffer_texture_attach(fbl->material_accum_fb, output_tx, 0, 0); GPU_framebuffer_bind(fbl->material_accum_fb); diff --git a/source/blender/draw/engines/eevee/eevee_occlusion.c b/source/blender/draw/engines/eevee/eevee_occlusion.c index 58579132702..d29f373ab2f 100644 --- a/source/blender/draw/engines/eevee/eevee_occlusion.c +++ b/source/blender/draw/engines/eevee/eevee_occlusion.c @@ -23,7 +23,7 @@ #include "GPU_state.h" static struct { - struct GPUTexture *dummy_horizon_tx; + GPUTexture *dummy_horizon_tx; } e_data = {NULL}; /* Engine data */ int EEVEE_occlusion_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c index c7cfa0c040a..12ff2769038 100644 --- a/source/blender/draw/engines/eevee/eevee_render.c +++ b/source/blender/draw/engines/eevee/eevee_render.c @@ -33,7 +33,7 @@ #include "eevee_private.h" -bool EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph *depsgraph) +bool EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, Depsgraph *depsgraph) { EEVEE_Data *vedata = (EEVEE_Data *)ved; EEVEE_StorageList *stl = vedata->stl; @@ -117,16 +117,14 @@ bool EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph * return true; } -void EEVEE_render_modules_init(EEVEE_Data *vedata, - RenderEngine *engine, - struct Depsgraph *depsgraph) +void EEVEE_render_modules_init(EEVEE_Data *vedata, RenderEngine *engine, Depsgraph *depsgraph) { EEVEE_ViewLayerData *sldata = EEVEE_view_layer_data_ensure(); EEVEE_StorageList *stl = vedata->stl; EEVEE_PrivateData *g_data = vedata->stl->g_data; EEVEE_FramebufferList *fbl = vedata->fbl; /* TODO(sergey): Shall render hold pointer to an evaluated camera instead? */ - struct Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, g_data->cam_original_ob); + Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, g_data->cam_original_ob); EEVEE_render_view_sync(vedata, engine, depsgraph); /* `EEVEE_renderpasses_init` will set the active render passes used by `EEVEE_effects_init`. @@ -138,14 +136,14 @@ void EEVEE_render_modules_init(EEVEE_Data *vedata, EEVEE_lightprobes_init(sldata, vedata); } -void EEVEE_render_view_sync(EEVEE_Data *vedata, RenderEngine *engine, struct Depsgraph *depsgraph) +void EEVEE_render_view_sync(EEVEE_Data *vedata, RenderEngine *engine, Depsgraph *depsgraph) { EEVEE_PrivateData *g_data = vedata->stl->g_data; /* Set the perspective & view matrix. */ float winmat[4][4], viewmat[4][4], viewinv[4][4]; /* TODO(sergey): Shall render hold pointer to an evaluated camera instead? */ - struct Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, g_data->cam_original_ob); + Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, g_data->cam_original_ob); RE_GetCameraWindow(engine->re, ob_camera_eval, winmat); RE_GetCameraWindowWithOverscan(engine->re, g_data->overscan, winmat); @@ -177,10 +175,7 @@ void EEVEE_render_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) EEVEE_cryptomatte_cache_init(sldata, vedata); } -void EEVEE_render_cache(void *vedata, - struct Object *ob, - struct RenderEngine *engine, - struct Depsgraph *depsgraph) +void EEVEE_render_cache(void *vedata, Object *ob, RenderEngine *engine, Depsgraph *depsgraph) { EEVEE_ViewLayerData *sldata = EEVEE_view_layer_data_ensure(); EEVEE_Data *data = vedata; diff --git a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c index 92f79d877b5..612765ab983 100644 --- a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c +++ b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c @@ -119,8 +119,8 @@ void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *v LightCache *lcache = stl->g_data->light_cache; if ((effects->enabled_effects & EFFECT_SSR) != 0) { - struct GPUShader *trace_shader = EEVEE_shaders_effect_reflection_trace_sh_get(); - struct GPUShader *resolve_shader = EEVEE_shaders_effect_reflection_resolve_sh_get(); + GPUShader *trace_shader = EEVEE_shaders_effect_reflection_trace_sh_get(); + GPUShader *resolve_shader = EEVEE_shaders_effect_reflection_resolve_sh_get(); int hitbuf_size[3]; GPU_texture_get_mipmap_size(effects->ssr_hit_output, 0, hitbuf_size); @@ -163,15 +163,13 @@ void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *v for (int i = 0; i < 2; i++) { if (i == 0) { /* Prepare Reflection Probes resolve pass. */ - struct GPUShader *resolve_shader_probe = - EEVEE_shaders_effect_reflection_resolve_probe_sh_get(); + GPUShader *resolve_shader_probe = EEVEE_shaders_effect_reflection_resolve_probe_sh_get(); DRW_PASS_CREATE(psl->ssr_resolve_probe, DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD); grp = DRW_shgroup_create(resolve_shader_probe, psl->ssr_resolve_probe); } else if (i == 1) { /* Prepare SSR resolve pass. */ - struct GPUShader *resolve_shader_refl = - EEVEE_shaders_effect_reflection_resolve_refl_sh_get(); + GPUShader *resolve_shader_refl = EEVEE_shaders_effect_reflection_resolve_refl_sh_get(); DRW_PASS_CREATE(psl->ssr_resolve_refl, DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD); grp = DRW_shgroup_create(resolve_shader_refl, psl->ssr_resolve_refl); } diff --git a/source/blender/draw/engines/eevee/eevee_shaders.cc b/source/blender/draw/engines/eevee/eevee_shaders.cc index f8f344e936b..8bdcc956ca5 100644 --- a/source/blender/draw/engines/eevee/eevee_shaders.cc +++ b/source/blender/draw/engines/eevee/eevee_shaders.cc @@ -30,108 +30,108 @@ static struct { /* Lookdev */ - struct GPUShader *studiolight_probe_sh; - struct GPUShader *studiolight_background_sh; + GPUShader *studiolight_probe_sh; + GPUShader *studiolight_background_sh; /* Probes */ - struct GPUShader *probe_grid_display_sh; - struct GPUShader *probe_cube_display_sh; - struct GPUShader *probe_planar_display_sh; - struct GPUShader *probe_filter_glossy_sh; - struct GPUShader *probe_filter_diffuse_sh; - struct GPUShader *probe_filter_visibility_sh; - struct GPUShader *probe_grid_fill_sh; - struct GPUShader *probe_planar_downsample_sh; + GPUShader *probe_grid_display_sh; + GPUShader *probe_cube_display_sh; + GPUShader *probe_planar_display_sh; + GPUShader *probe_filter_glossy_sh; + GPUShader *probe_filter_diffuse_sh; + GPUShader *probe_filter_visibility_sh; + GPUShader *probe_grid_fill_sh; + GPUShader *probe_planar_downsample_sh; /* Velocity Resolve */ - struct GPUShader *velocity_resolve_sh; + GPUShader *velocity_resolve_sh; /* Temporal Anti Aliasing */ - struct GPUShader *taa_resolve_sh; - struct GPUShader *taa_resolve_reproject_sh; + GPUShader *taa_resolve_sh; + GPUShader *taa_resolve_reproject_sh; /* Bloom */ - struct GPUShader *bloom_blit_sh[2]; - struct GPUShader *bloom_downsample_sh[2]; - struct GPUShader *bloom_upsample_sh[2]; - struct GPUShader *bloom_resolve_sh[2]; + GPUShader *bloom_blit_sh[2]; + GPUShader *bloom_downsample_sh[2]; + GPUShader *bloom_upsample_sh[2]; + GPUShader *bloom_resolve_sh[2]; /* Depth Of Field */ - struct GPUShader *dof_bokeh_sh; - struct GPUShader *dof_setup_sh; - struct GPUShader *dof_flatten_tiles_sh; - struct GPUShader *dof_dilate_tiles_sh[2]; - struct GPUShader *dof_downsample_sh; - struct GPUShader *dof_reduce_sh[2]; - struct GPUShader *dof_gather_sh[DOF_GATHER_MAX_PASS][2]; - struct GPUShader *dof_filter_sh; - struct GPUShader *dof_scatter_sh[2][2]; - struct GPUShader *dof_resolve_sh[2][2]; + GPUShader *dof_bokeh_sh; + GPUShader *dof_setup_sh; + GPUShader *dof_flatten_tiles_sh; + GPUShader *dof_dilate_tiles_sh[2]; + GPUShader *dof_downsample_sh; + GPUShader *dof_reduce_sh[2]; + GPUShader *dof_gather_sh[DOF_GATHER_MAX_PASS][2]; + GPUShader *dof_filter_sh; + GPUShader *dof_scatter_sh[2][2]; + GPUShader *dof_resolve_sh[2][2]; /* General purpose Shaders. */ - struct GPUShader *lookdev_background; - struct GPUShader *update_noise_sh; + GPUShader *lookdev_background; + GPUShader *update_noise_sh; /* Down-sample Depth */ - struct GPUShader *minz_downlevel_sh; - struct GPUShader *maxz_downlevel_sh; - struct GPUShader *minz_downdepth_sh; - struct GPUShader *maxz_downdepth_sh; - struct GPUShader *minz_downdepth_layer_sh; - struct GPUShader *maxz_downdepth_layer_sh; - struct GPUShader *maxz_copydepth_layer_sh; - struct GPUShader *minz_copydepth_sh; - struct GPUShader *maxz_copydepth_sh; + GPUShader *minz_downlevel_sh; + GPUShader *maxz_downlevel_sh; + GPUShader *minz_downdepth_sh; + GPUShader *maxz_downdepth_sh; + GPUShader *minz_downdepth_layer_sh; + GPUShader *maxz_downdepth_layer_sh; + GPUShader *maxz_copydepth_layer_sh; + GPUShader *minz_copydepth_sh; + GPUShader *maxz_copydepth_sh; /* Simple Down-sample. */ - struct GPUShader *color_copy_sh; - struct GPUShader *downsample_sh; - struct GPUShader *downsample_cube_sh; + GPUShader *color_copy_sh; + GPUShader *downsample_sh; + GPUShader *downsample_cube_sh; /* Mist */ - struct GPUShader *mist_sh; + GPUShader *mist_sh; /* Motion Blur */ - struct GPUShader *motion_blur_sh; - struct GPUShader *motion_blur_object_sh; - struct GPUShader *motion_blur_hair_sh; - struct GPUShader *velocity_tiles_sh; - struct GPUShader *velocity_tiles_expand_sh; + GPUShader *motion_blur_sh; + GPUShader *motion_blur_object_sh; + GPUShader *motion_blur_hair_sh; + GPUShader *velocity_tiles_sh; + GPUShader *velocity_tiles_expand_sh; /* Ground Truth Ambient Occlusion */ - struct GPUShader *gtao_sh; - struct GPUShader *gtao_layer_sh; - struct GPUShader *gtao_debug_sh; + GPUShader *gtao_sh; + GPUShader *gtao_layer_sh; + GPUShader *gtao_debug_sh; /* GGX LUT */ - struct GPUShader *ggx_lut_sh; - struct GPUShader *ggx_refraction_lut_sh; + GPUShader *ggx_lut_sh; + GPUShader *ggx_refraction_lut_sh; /* Render Passes */ - struct GPUShader *rpass_accumulate_sh; - struct GPUShader *postprocess_sh; - struct GPUShader *cryptomatte_sh[2]; + GPUShader *rpass_accumulate_sh; + GPUShader *postprocess_sh; + GPUShader *cryptomatte_sh[2]; /* Screen Space Reflection */ - struct GPUShader *reflection_trace; - struct GPUShader *reflection_resolve; - struct GPUShader *reflection_resolve_probe; - struct GPUShader *reflection_resolve_raytrace; + GPUShader *reflection_trace; + GPUShader *reflection_resolve; + GPUShader *reflection_resolve_probe; + GPUShader *reflection_resolve_raytrace; /* Shadows */ - struct GPUShader *shadow_sh; - struct GPUShader *shadow_accum_sh; + GPUShader *shadow_sh; + GPUShader *shadow_accum_sh; /* Subsurface */ - struct GPUShader *sss_sh[3]; + GPUShader *sss_sh[3]; /* Volume */ - struct GPUShader *volumetric_clear_sh; - struct GPUShader *scatter_sh; - struct GPUShader *scatter_with_lights_sh; - struct GPUShader *volumetric_integration_sh; - struct GPUShader *volumetric_resolve_sh[2]; - struct GPUShader *volumetric_accum_sh; + GPUShader *volumetric_clear_sh; + GPUShader *scatter_sh; + GPUShader *scatter_with_lights_sh; + GPUShader *volumetric_integration_sh; + GPUShader *volumetric_resolve_sh[2]; + GPUShader *volumetric_accum_sh; /* Shader strings */ char *surface_lit_frag; @@ -653,7 +653,7 @@ GPUShader *EEVEE_shaders_cryptomatte_sh_get(bool is_hair) /** \name Raytraced Reflections * \{ */ -struct GPUShader *EEVEE_shaders_effect_reflection_trace_sh_get(void) +GPUShader *EEVEE_shaders_effect_reflection_trace_sh_get(void) { if (e_data.reflection_trace == nullptr) { e_data.reflection_trace = DRW_shader_create_from_info_name( @@ -662,7 +662,7 @@ struct GPUShader *EEVEE_shaders_effect_reflection_trace_sh_get(void) return e_data.reflection_trace; } -struct GPUShader *EEVEE_shaders_effect_reflection_resolve_sh_get(void) +GPUShader *EEVEE_shaders_effect_reflection_resolve_sh_get(void) { if (e_data.reflection_resolve == nullptr) { e_data.reflection_resolve = DRW_shader_create_from_info_name( @@ -671,7 +671,7 @@ struct GPUShader *EEVEE_shaders_effect_reflection_resolve_sh_get(void) return e_data.reflection_resolve; } -struct GPUShader *EEVEE_shaders_effect_reflection_resolve_probe_sh_get(void) +GPUShader *EEVEE_shaders_effect_reflection_resolve_probe_sh_get(void) { if (e_data.reflection_resolve_probe == nullptr) { e_data.reflection_resolve_probe = DRW_shader_create_from_info_name( @@ -680,7 +680,7 @@ struct GPUShader *EEVEE_shaders_effect_reflection_resolve_probe_sh_get(void) return e_data.reflection_resolve_probe; } -struct GPUShader *EEVEE_shaders_effect_reflection_resolve_refl_sh_get(void) +GPUShader *EEVEE_shaders_effect_reflection_resolve_refl_sh_get(void) { if (e_data.reflection_resolve_raytrace == nullptr) { e_data.reflection_resolve_raytrace = DRW_shader_create_from_info_name( @@ -695,7 +695,7 @@ struct GPUShader *EEVEE_shaders_effect_reflection_resolve_refl_sh_get(void) /** \name Shadows * \{ */ -struct GPUShader *EEVEE_shaders_shadow_sh_get() +GPUShader *EEVEE_shaders_shadow_sh_get() { if (e_data.shadow_sh == nullptr) { e_data.shadow_sh = DRW_shader_create_from_info_name("eevee_legacy_shader_shadow"); @@ -703,7 +703,7 @@ struct GPUShader *EEVEE_shaders_shadow_sh_get() return e_data.shadow_sh; } -struct GPUShader *EEVEE_shaders_shadow_accum_sh_get() +GPUShader *EEVEE_shaders_shadow_accum_sh_get() { if (e_data.shadow_accum_sh == nullptr) { e_data.shadow_accum_sh = DRW_shader_create_from_info_name("eevee_legacy_shader_shadow_accum"); @@ -717,7 +717,7 @@ struct GPUShader *EEVEE_shaders_shadow_accum_sh_get() /** \name Subsurface * \{ */ -struct GPUShader *EEVEE_shaders_subsurface_first_pass_sh_get() +GPUShader *EEVEE_shaders_subsurface_first_pass_sh_get() { if (e_data.sss_sh[0] == nullptr) { e_data.sss_sh[0] = DRW_shader_create_from_info_name( @@ -726,7 +726,7 @@ struct GPUShader *EEVEE_shaders_subsurface_first_pass_sh_get() return e_data.sss_sh[0]; } -struct GPUShader *EEVEE_shaders_subsurface_second_pass_sh_get() +GPUShader *EEVEE_shaders_subsurface_second_pass_sh_get() { if (e_data.sss_sh[1] == nullptr) { @@ -736,7 +736,7 @@ struct GPUShader *EEVEE_shaders_subsurface_second_pass_sh_get() return e_data.sss_sh[1]; } -struct GPUShader *EEVEE_shaders_subsurface_translucency_sh_get() +GPUShader *EEVEE_shaders_subsurface_translucency_sh_get() { if (e_data.sss_sh[2] == nullptr) { e_data.sss_sh[2] = DRW_shader_create_from_info_name( @@ -751,7 +751,7 @@ struct GPUShader *EEVEE_shaders_subsurface_translucency_sh_get() /** \name Volumes * \{ */ -struct GPUShader *EEVEE_shaders_volumes_clear_sh_get() +GPUShader *EEVEE_shaders_volumes_clear_sh_get() { if (e_data.volumetric_clear_sh == nullptr) { e_data.volumetric_clear_sh = DRW_shader_create_from_info_name("eevee_legacy_volumes_clear"); @@ -759,7 +759,7 @@ struct GPUShader *EEVEE_shaders_volumes_clear_sh_get() return e_data.volumetric_clear_sh; } -struct GPUShader *EEVEE_shaders_volumes_scatter_sh_get() +GPUShader *EEVEE_shaders_volumes_scatter_sh_get() { if (e_data.scatter_sh == nullptr) { e_data.scatter_sh = DRW_shader_create_from_info_name("eevee_legacy_volumes_scatter"); @@ -767,7 +767,7 @@ struct GPUShader *EEVEE_shaders_volumes_scatter_sh_get() return e_data.scatter_sh; } -struct GPUShader *EEVEE_shaders_volumes_scatter_with_lights_sh_get() +GPUShader *EEVEE_shaders_volumes_scatter_with_lights_sh_get() { if (e_data.scatter_with_lights_sh == nullptr) { e_data.scatter_with_lights_sh = DRW_shader_create_from_info_name( @@ -776,7 +776,7 @@ struct GPUShader *EEVEE_shaders_volumes_scatter_with_lights_sh_get() return e_data.scatter_with_lights_sh; } -struct GPUShader *EEVEE_shaders_volumes_integration_sh_get() +GPUShader *EEVEE_shaders_volumes_integration_sh_get() { if (e_data.volumetric_integration_sh == nullptr) { e_data.volumetric_integration_sh = DRW_shader_create_from_info_name( @@ -786,7 +786,7 @@ struct GPUShader *EEVEE_shaders_volumes_integration_sh_get() return e_data.volumetric_integration_sh; } -struct GPUShader *EEVEE_shaders_volumes_resolve_sh_get(bool accum) +GPUShader *EEVEE_shaders_volumes_resolve_sh_get(bool accum) { const int index = accum ? 1 : 0; if (e_data.volumetric_resolve_sh[index] == nullptr) { @@ -796,7 +796,7 @@ struct GPUShader *EEVEE_shaders_volumes_resolve_sh_get(bool accum) return e_data.volumetric_resolve_sh[index]; } -struct GPUShader *EEVEE_shaders_volumes_accum_sh_get() +GPUShader *EEVEE_shaders_volumes_accum_sh_get() { if (e_data.volumetric_accum_sh == nullptr) { e_data.volumetric_accum_sh = DRW_shader_create_from_info_name("eevee_legacy_volumes_accum"); @@ -1119,7 +1119,7 @@ Material *EEVEE_material_default_error_get(void) return e_data.error_mat; } -struct bNodeTree *EEVEE_shader_default_surface_nodetree(Material *ma) +bNodeTree *EEVEE_shader_default_surface_nodetree(Material *ma) { /* WARNING: This function is not threadsafe. Which is not a problem for the moment. */ if (!e_data.surface.ntree) { @@ -1150,7 +1150,7 @@ struct bNodeTree *EEVEE_shader_default_surface_nodetree(Material *ma) return e_data.surface.ntree; } -struct bNodeTree *EEVEE_shader_default_world_nodetree(World *wo) +bNodeTree *EEVEE_shader_default_world_nodetree(World *wo) { /* WARNING: This function is not threadsafe. Which is not a problem for the moment. */ if (!e_data.world.ntree) { @@ -1372,8 +1372,8 @@ static void eevee_material_post_eval(void * /*thunk*/, GPUMaterial *mat, GPUCode MEM_SAFE_FREE(frag); } -static struct GPUMaterial *eevee_material_get_ex( - struct Scene * /*scene*/, Material *ma, World *wo, int options, bool deferred) +static GPUMaterial *eevee_material_get_ex( + Scene * /*scene*/, Material *ma, World *wo, int options, bool deferred) { BLI_assert(ma || wo); const bool is_volume = (options & VAR_MAT_VOLUME) != 0; @@ -1393,7 +1393,7 @@ static struct GPUMaterial *eevee_material_get_ex( return mat; } -struct GPUMaterial *EEVEE_material_default_get(struct Scene *scene, Material *ma, int options) +GPUMaterial *EEVEE_material_default_get(Scene *scene, Material *ma, int options) { Material *def_ma = (ma && (options & VAR_MAT_VOLUME)) ? BKE_material_default_volume() : BKE_material_default_surface(); @@ -1402,8 +1402,8 @@ struct GPUMaterial *EEVEE_material_default_get(struct Scene *scene, Material *ma return eevee_material_get_ex(scene, def_ma, nullptr, options, false); } -struct GPUMaterial *EEVEE_material_get( - EEVEE_Data *vedata, struct Scene *scene, Material *ma, World *wo, int options) +GPUMaterial *EEVEE_material_get( + EEVEE_Data *vedata, Scene *scene, Material *ma, World *wo, int options) { if ((ma && (!ma->use_nodes || !ma->nodetree)) || (wo && (!wo->use_nodes || !wo->nodetree))) { options |= VAR_DEFAULT; diff --git a/source/blender/draw/engines/eevee/eevee_subsurface.c b/source/blender/draw/engines/eevee/eevee_subsurface.c index 3f14d0334af..d5ee14f8a4b 100644 --- a/source/blender/draw/engines/eevee/eevee_subsurface.c +++ b/source/blender/draw/engines/eevee/eevee_subsurface.c @@ -164,7 +164,7 @@ void EEVEE_subsurface_add_pass(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Material *ma, DRWShadingGroup *shgrp, - struct GPUMaterial *gpumat) + GPUMaterial *gpumat) { EEVEE_PassList *psl = vedata->psl; EEVEE_StorageList *stl = vedata->stl; @@ -172,8 +172,8 @@ void EEVEE_subsurface_add_pass(EEVEE_ViewLayerData *sldata, DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); GPUTexture **depth_src = GPU_depth_blitting_workaround() ? &effects->sss_stencil : &dtxl->depth; - struct GPUTexture *sss_tex_profile = NULL; - struct GPUUniformBuf *sss_profile = GPU_material_sss_profile_get( + GPUTexture *sss_tex_profile = NULL; + GPUUniformBuf *sss_profile = GPU_material_sss_profile_get( gpumat, stl->effects->sss_sample_count, &sss_tex_profile); if (!sss_profile) { diff --git a/source/blender/draw/engines/eevee/eevee_temporal_sampling.c b/source/blender/draw/engines/eevee/eevee_temporal_sampling.c index 88c34057922..69ffd37a3f8 100644 --- a/source/blender/draw/engines/eevee/eevee_temporal_sampling.c +++ b/source/blender/draw/engines/eevee/eevee_temporal_sampling.c @@ -337,7 +337,7 @@ void EEVEE_temporal_sampling_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data EEVEE_EffectsInfo *effects = stl->effects; if (effects->enabled_effects & EFFECT_TAA) { - struct GPUShader *sh = EEVEE_shaders_taa_resolve_sh_get(effects->enabled_effects); + GPUShader *sh = EEVEE_shaders_taa_resolve_sh_get(effects->enabled_effects); DRW_PASS_CREATE(psl->taa_resolve, DRW_STATE_WRITE_COLOR); DRWShadingGroup *grp = DRW_shgroup_create(sh, psl->taa_resolve); @@ -401,9 +401,9 @@ void EEVEE_temporal_sampling_draw(EEVEE_Data *vedata) SWAP_BUFFERS_TAA(); } else { - struct GPUFrameBuffer *source_fb = (effects->target_buffer == fbl->main_color_fb) ? - fbl->effect_color_fb : - fbl->main_color_fb; + GPUFrameBuffer *source_fb = (effects->target_buffer == fbl->main_color_fb) ? + fbl->effect_color_fb : + fbl->main_color_fb; GPU_framebuffer_blit(source_fb, 0, fbl->taa_history_color_fb, 0, GPU_COLOR_BIT); } } diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index f9999e71067..08906dd5c64 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -244,10 +244,10 @@ void EEVEE_volumes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) DRW_PASS_CREATE(psl->volumetric_objects_ps, DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD); /* World Volumetric */ - struct World *wo = scene->world; + World *wo = scene->world; if (wo != NULL && wo->use_nodes && wo->nodetree && !LOOK_DEV_STUDIO_LIGHT_ENABLED(draw_ctx->v3d)) { - struct GPUMaterial *mat = EEVEE_material_get(vedata, scene, NULL, wo, VAR_MAT_VOLUME); + GPUMaterial *mat = EEVEE_material_get(vedata, scene, NULL, wo, VAR_MAT_VOLUME); if (mat && GPU_material_has_volume_output(mat)) { grp = DRW_shgroup_material_create(mat, psl->volumetric_world_ps); @@ -312,7 +312,7 @@ void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata, } int mat_options = VAR_MAT_VOLUME | VAR_MAT_MESH; - struct GPUMaterial *mat = EEVEE_material_get(vedata, scene, ma, NULL, mat_options); + GPUMaterial *mat = EEVEE_material_get(vedata, scene, ma, NULL, mat_options); /* If shader failed to compile or is currently compiling. */ if (mat == NULL) { @@ -361,7 +361,7 @@ void EEVEE_volumes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) if ((effects->enabled_effects & EFFECT_VOLUMETRIC) != 0) { DRWShadingGroup *grp; - struct GPUShader *sh; + GPUShader *sh; DRW_PASS_CREATE(psl->volumetric_scatter_ps, DRW_STATE_WRITE_COLOR); sh = (common_data->vol_use_lights) ? EEVEE_shaders_volumes_scatter_with_lights_sh_get() : @@ -544,7 +544,7 @@ void EEVEE_volumes_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) DRW_draw_pass(psl->volumetric_integration_ps); - SWAP(struct GPUFrameBuffer *, fbl->volumetric_scat_fb, fbl->volumetric_integ_fb); + SWAP(GPUFrameBuffer *, fbl->volumetric_scat_fb, fbl->volumetric_integ_fb); SWAP(GPUTexture *, txl->volume_scatter, txl->volume_scatter_history); SWAP(GPUTexture *, txl->volume_transmit, txl->volume_transmit_history); diff --git a/source/blender/draw/engines/eevee_next/eevee_engine.cc b/source/blender/draw/engines/eevee_next/eevee_engine.cc index 89323d41c03..78b676b7e06 100644 --- a/source/blender/draw/engines/eevee_next/eevee_engine.cc +++ b/source/blender/draw/engines/eevee_next/eevee_engine.cc @@ -142,9 +142,9 @@ static void eevee_instance_free(void *instance) } static void eevee_render_to_image(void *vedata, - struct RenderEngine *engine, - struct RenderLayer *layer, - const struct rcti * /*rect*/) + RenderEngine *engine, + RenderLayer *layer, + const rcti * /*rect*/) { if (!GPU_shader_storage_buffer_objects_support()) { return; @@ -170,7 +170,7 @@ static void eevee_render_to_image(void *vedata, ved->instance = instance; } -static void eevee_store_metadata(void *vedata, struct RenderResult *render_result) +static void eevee_store_metadata(void *vedata, RenderResult *render_result) { if (!GPU_shader_storage_buffer_objects_support()) { return; diff --git a/source/blender/draw/engines/eevee_next/eevee_motion_blur.cc b/source/blender/draw/engines/eevee_next/eevee_motion_blur.cc index 9f33eca5ae5..eb3bf61e1cf 100644 --- a/source/blender/draw/engines/eevee_next/eevee_motion_blur.cc +++ b/source/blender/draw/engines/eevee_next/eevee_motion_blur.cc @@ -55,7 +55,7 @@ void MotionBlurModule::init() } /* Without this there is the possibility of the curve table not being allocated. */ - BKE_curvemapping_changed((struct CurveMapping *)&scene->r.mblur_shutter_curve, false); + BKE_curvemapping_changed((CurveMapping *)&scene->r.mblur_shutter_curve, false); Vector cdf(CM_TABLE); Sampling::cdf_from_curvemapping(scene->r.mblur_shutter_curve, cdf); diff --git a/source/blender/draw/engines/eevee_next/eevee_shader.cc b/source/blender/draw/engines/eevee_next/eevee_shader.cc index bb34674dbf5..a5ba895b25e 100644 --- a/source/blender/draw/engines/eevee_next/eevee_shader.cc +++ b/source/blender/draw/engines/eevee_next/eevee_shader.cc @@ -462,7 +462,7 @@ static void codegen_callback(void *thunk, GPUMaterial *mat, GPUCodegenOutput *co } GPUMaterial *ShaderModule::material_shader_get(::Material *blender_mat, - struct bNodeTree *nodetree, + bNodeTree *nodetree, eMaterialPipeline pipeline_type, eMaterialGeometry geometry_type, bool deferred_compilation) @@ -475,7 +475,7 @@ GPUMaterial *ShaderModule::material_shader_get(::Material *blender_mat, blender_mat, nodetree, shader_uuid, is_volume, deferred_compilation, codegen_callback, this); } -GPUMaterial *ShaderModule::world_shader_get(::World *blender_world, struct bNodeTree *nodetree) +GPUMaterial *ShaderModule::world_shader_get(::World *blender_world, bNodeTree *nodetree) { eMaterialPipeline pipeline_type = MAT_PIPE_DEFERRED; /* Unused. */ eMaterialGeometry geometry_type = MAT_GEOM_WORLD; @@ -498,7 +498,7 @@ GPUMaterial *ShaderModule::world_shader_get(::World *blender_world, struct bNode * materials and call GPU_material_free on it to update the material. */ GPUMaterial *ShaderModule::material_shader_get(const char *name, ListBase &materials, - struct bNodeTree *nodetree, + bNodeTree *nodetree, eMaterialPipeline pipeline_type, eMaterialGeometry geometry_type, bool is_lookdev) diff --git a/source/blender/draw/engines/eevee_next/eevee_sync.cc b/source/blender/draw/engines/eevee_next/eevee_sync.cc index b6262a79d48..658a6998160 100644 --- a/source/blender/draw/engines/eevee_next/eevee_sync.cc +++ b/source/blender/draw/engines/eevee_next/eevee_sync.cc @@ -28,7 +28,7 @@ namespace blender::eevee { * * \{ */ -static void draw_data_init_cb(struct DrawData *dd) +static void draw_data_init_cb(DrawData *dd) { /* Object has just been created or was never evaluated by the engine. */ dd->recalc = ID_RECALC_ALL; @@ -37,7 +37,7 @@ static void draw_data_init_cb(struct DrawData *dd) ObjectHandle &SyncModule::sync_object(Object *ob) { DrawEngineType *owner = (DrawEngineType *)&DRW_engine_viewport_eevee_next_type; - struct DrawData *dd = DRW_drawdata_ensure( + DrawData *dd = DRW_drawdata_ensure( (ID *)ob, owner, sizeof(eevee::ObjectHandle), draw_data_init_cb, nullptr); ObjectHandle &eevee_dd = *reinterpret_cast(dd); @@ -58,7 +58,7 @@ ObjectHandle &SyncModule::sync_object(Object *ob) WorldHandle &SyncModule::sync_world(::World *world) { DrawEngineType *owner = (DrawEngineType *)&DRW_engine_viewport_eevee_next_type; - struct DrawData *dd = DRW_drawdata_ensure( + DrawData *dd = DRW_drawdata_ensure( (ID *)world, owner, sizeof(eevee::WorldHandle), draw_data_init_cb, nullptr); WorldHandle &eevee_dd = *reinterpret_cast(dd); @@ -72,7 +72,7 @@ WorldHandle &SyncModule::sync_world(::World *world) SceneHandle &SyncModule::sync_scene(::Scene *scene) { DrawEngineType *owner = (DrawEngineType *)&DRW_engine_viewport_eevee_next_type; - struct DrawData *dd = DRW_drawdata_ensure( + DrawData *dd = DRW_drawdata_ensure( (ID *)scene, owner, sizeof(eevee::SceneHandle), draw_data_init_cb, nullptr); SceneHandle &eevee_dd = *reinterpret_cast(dd); diff --git a/source/blender/draw/engines/external/external_engine.c b/source/blender/draw/engines/external/external_engine.c index f2ccfa36a21..0ee2ec2816b 100644 --- a/source/blender/draw/engines/external/external_engine.c +++ b/source/blender/draw/engines/external/external_engine.c @@ -51,21 +51,21 @@ typedef struct EXTERNAL_Storage { } EXTERNAL_Storage; typedef struct EXTERNAL_StorageList { - struct EXTERNAL_Storage *storage; + EXTERNAL_Storage *storage; struct EXTERNAL_PrivateData *g_data; } EXTERNAL_StorageList; typedef struct EXTERNAL_FramebufferList { - struct GPUFrameBuffer *depth_buffer_fb; + GPUFrameBuffer *depth_buffer_fb; } EXTERNAL_FramebufferList; typedef struct EXTERNAL_TextureList { /* default */ - struct GPUTexture *depth_buffer_tx; + GPUTexture *depth_buffer_tx; } EXTERNAL_TextureList; typedef struct EXTERNAL_PassList { - struct DRWPass *depth_pass; + DRWPass *depth_pass; } EXTERNAL_PassList; typedef struct EXTERNAL_Data { @@ -83,7 +83,7 @@ typedef struct EXTERNAL_Data { static struct { /* Depth Pre Pass */ - struct GPUShader *depth_sh; + GPUShader *depth_sh; } e_data = {NULL}; /* Engine data */ typedef struct EXTERNAL_PrivateData { @@ -216,12 +216,12 @@ static void external_cache_populate(void *vedata, Object *ob) const int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as; if (draw_as == PART_DRAW_PATH) { - struct GPUBatch *hairs = DRW_cache_particles_get_hair(ob, psys, NULL); + GPUBatch *hairs = DRW_cache_particles_get_hair(ob, psys, NULL); DRW_shgroup_call(stl->g_data->depth_shgrp, hairs, NULL); } } } - struct GPUBatch *geom = DRW_cache_object_surface_get(ob); + GPUBatch *geom = DRW_cache_object_surface_get(ob); if (geom) { /* Depth Pre-pass. */ DRW_shgroup_call(stl->g_data->depth_shgrp, geom, ob); @@ -290,7 +290,7 @@ static void external_image_space_matrix_set(const RenderEngine *engine) const DRWContextState *draw_ctx = DRW_context_state_get(); const DRWView *view = DRW_view_get_active(); - struct SpaceImage *space_image = (struct SpaceImage *)draw_ctx->space_data; + SpaceImage *space_image = (SpaceImage *)draw_ctx->space_data; /* Apply current view as transformation matrix. * This will configure drawing for normalized space with current zoom and pan applied. */ @@ -488,7 +488,7 @@ bool DRW_engine_external_acquire_for_image_editor(void) return false; } - struct SpaceImage *space_image = (struct SpaceImage *)space_data; + SpaceImage *space_image = (SpaceImage *)space_data; const Image *image = ED_space_image(space_image); if (image == NULL || image->type != IMA_TYPE_R_RESULT) { return false; diff --git a/source/blender/draw/engines/gpencil/gpencil_antialiasing.c b/source/blender/draw/engines/gpencil/gpencil_antialiasing.c index 0e5322bccc9..13eaef1404d 100644 --- a/source/blender/draw/engines/gpencil/gpencil_antialiasing.c +++ b/source/blender/draw/engines/gpencil/gpencil_antialiasing.c @@ -12,7 +12,7 @@ #include "BLI_smaa_textures.h" -void GPENCIL_antialiasing_init(struct GPENCIL_Data *vedata) +void GPENCIL_antialiasing_init(GPENCIL_Data *vedata) { GPENCIL_PrivateData *pd = vedata->stl->pd; GPENCIL_FramebufferList *fbl = vedata->fbl; @@ -122,7 +122,7 @@ void GPENCIL_antialiasing_init(struct GPENCIL_Data *vedata) } } -void GPENCIL_antialiasing_draw(struct GPENCIL_Data *vedata) +void GPENCIL_antialiasing_draw(GPENCIL_Data *vedata) { GPENCIL_FramebufferList *fbl = vedata->fbl; GPENCIL_PrivateData *pd = vedata->stl->pd; diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index 0077528087b..f45a72bae3e 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -385,7 +385,7 @@ GPENCIL_tLayer *gpencil_layer_cache_add(GPENCIL_PrivateData *pd, tgp_layer->geom_ps = DRW_pass_create("GPencil Layer", state); - struct GPUShader *sh = GPENCIL_shader_geometry_get(); + GPUShader *sh = GPENCIL_shader_geometry_get(); DRWShadingGroup *grp = tgp_layer->base_shgrp = DRW_shgroup_create(sh, tgp_layer->geom_ps); DRW_shgroup_uniform_texture(grp, "gpSceneDepthTexture", depth_tex); diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_data.c b/source/blender/draw/engines/gpencil/gpencil_draw_data.c index dc04da3c39a..039dc222175 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_data.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_data.c @@ -38,11 +38,11 @@ static GPENCIL_MaterialPool *gpencil_material_pool_add(GPENCIL_PrivateData *pd) return matpool; } -static struct GPUTexture *gpencil_image_texture_get(Image *image, bool *r_alpha_premult) +static GPUTexture *gpencil_image_texture_get(Image *image, bool *r_alpha_premult) { ImBuf *ibuf; ImageUser iuser = {NULL}; - struct GPUTexture *gpu_tex = NULL; + GPUTexture *gpu_tex = NULL; void *lock; ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock); diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 1258e00da08..78db8da5191 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -343,7 +343,7 @@ typedef struct gpIterPopulateData { int stroke_index_last; int stroke_index_offset; /* Infos for call batching. */ - struct GPUBatch *geom; + GPUBatch *geom; int vfirst, vcount; } gpIterPopulateData; @@ -364,7 +364,7 @@ static void gpencil_drawcall_flush(gpIterPopulateData *iter) /* Group draw-calls that are consecutive and with the same type. Reduces GPU driver overhead. */ static void gpencil_drawcall_add(gpIterPopulateData *iter, - struct GPUBatch *geom, + GPUBatch *geom, int v_first, int v_count) { diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.cc b/source/blender/draw/engines/gpencil/gpencil_engine.cc index 0684894f80a..837a74a8664 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.cc +++ b/source/blender/draw/engines/gpencil/gpencil_engine.cc @@ -293,9 +293,9 @@ static void gpencil_engine_free() } static void gpencil_render_to_image(void * /*vedata*/, - struct RenderEngine * /*engine*/, - struct RenderLayer * /*layer*/, - const struct rcti * /*rect*/) + RenderEngine * /*engine*/, + RenderLayer * /*layer*/, + const rcti * /*rect*/) { } diff --git a/source/blender/draw/engines/gpencil/gpencil_render.c b/source/blender/draw/engines/gpencil/gpencil_render.c index f0ca9751b77..6e18757fcb6 100644 --- a/source/blender/draw/engines/gpencil/gpencil_render.c +++ b/source/blender/draw/engines/gpencil/gpencil_render.c @@ -21,7 +21,7 @@ void GPENCIL_render_init(GPENCIL_Data *vedata, RenderEngine *engine, - struct RenderLayer *render_layer, + RenderLayer *render_layer, const Depsgraph *depsgraph, const rcti *rect) { @@ -35,7 +35,7 @@ void GPENCIL_render_init(GPENCIL_Data *vedata, /* Set the perspective & view matrix. */ float winmat[4][4], viewmat[4][4], viewinv[4][4]; - struct Object *camera = DEG_get_evaluated_object(depsgraph, RE_GetCamera(engine->re)); + Object *camera = DEG_get_evaluated_object(depsgraph, RE_GetCamera(engine->re)); RE_GetCameraWindow(engine->re, camera, winmat); RE_GetCameraModelMatrix(engine->re, camera, viewinv); @@ -140,8 +140,8 @@ void GPENCIL_render_init(GPENCIL_Data *vedata, /* render all objects and select only grease pencil */ static void GPENCIL_render_cache(void *vedata, - struct Object *ob, - struct RenderEngine *UNUSED(engine), + Object *ob, + RenderEngine *UNUSED(engine), Depsgraph *UNUSED(depsgraph)) { if (ob && ELEM(ob->type, OB_GPENCIL_LEGACY, OB_LAMP)) { @@ -151,7 +151,7 @@ static void GPENCIL_render_cache(void *vedata, } } -static void GPENCIL_render_result_z(struct RenderLayer *rl, +static void GPENCIL_render_result_z(RenderLayer *rl, const char *viewname, GPENCIL_Data *vedata, const rcti *rect) @@ -206,7 +206,7 @@ static void GPENCIL_render_result_z(struct RenderLayer *rl, } } -static void GPENCIL_render_result_combined(struct RenderLayer *rl, +static void GPENCIL_render_result_combined(RenderLayer *rl, const char *viewname, GPENCIL_Data *vedata, const rcti *rect) @@ -228,7 +228,7 @@ static void GPENCIL_render_result_combined(struct RenderLayer *rl, void GPENCIL_render_to_image(void *ved, RenderEngine *engine, - struct RenderLayer *render_layer, + RenderLayer *render_layer, const rcti *rect) { GPENCIL_Data *vedata = (GPENCIL_Data *)ved; diff --git a/source/blender/draw/engines/overlay/overlay_background.cc b/source/blender/draw/engines/overlay/overlay_background.cc index 9f44fd229f7..13e45e6272f 100644 --- a/source/blender/draw/engines/overlay/overlay_background.cc +++ b/source/blender/draw/engines/overlay/overlay_background.cc @@ -94,7 +94,7 @@ void OVERLAY_background_cache_init(OVERLAY_Data *vedata) DRW_shgroup_uniform_vec4_copy(grp, "ucolor", G_draw.block.color_clipping_border); DRW_shgroup_uniform_vec3(grp, "boundbox", &bb->vec[0][0], 8); - struct GPUBatch *cube = DRW_cache_cube_get(); + GPUBatch *cube = DRW_cache_cube_get(); DRW_shgroup_call(grp, cube, nullptr); } else { diff --git a/source/blender/draw/engines/overlay/overlay_edit_curve.cc b/source/blender/draw/engines/overlay/overlay_edit_curve.cc index b0b28c86164..ea5e36ebbb3 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_curve.cc +++ b/source/blender/draw/engines/overlay/overlay_edit_curve.cc @@ -67,7 +67,7 @@ void OVERLAY_edit_curve_cache_populate(OVERLAY_Data *vedata, Object *ob) bool do_xray = (ob->dtx & OB_DRAW_IN_FRONT) != 0; Curve *cu = static_cast(ob->data); - struct GPUBatch *geom; + GPUBatch *geom; geom = DRW_cache_curve_edge_wire_get(ob); if (geom) { @@ -93,7 +93,7 @@ void OVERLAY_edit_curve_cache_populate(OVERLAY_Data *vedata, Object *ob) void OVERLAY_edit_surf_cache_populate(OVERLAY_Data *vedata, Object *ob) { OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUBatch *geom; + GPUBatch *geom; geom = DRW_cache_curve_edge_overlay_get(ob); if (geom) { diff --git a/source/blender/draw/engines/overlay/overlay_edit_curves.cc b/source/blender/draw/engines/overlay/overlay_edit_curves.cc index 2ea2bd48c56..5fe9bccd664 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_curves.cc +++ b/source/blender/draw/engines/overlay/overlay_edit_curves.cc @@ -68,12 +68,12 @@ static void overlay_edit_curves_add_ob_to_pass(OVERLAY_PrivateData *pd, Object * if (pd->edit_curves.do_points) { DRWShadingGroup *point_shgrp = pd->edit_curves_points_grp[in_front]; - struct GPUBatch *geom_points = DRW_curves_batch_cache_get_edit_points(curves); + GPUBatch *geom_points = DRW_curves_batch_cache_get_edit_points(curves); DRW_shgroup_call_no_cull(point_shgrp, geom_points, ob); } DRWShadingGroup *lines_shgrp = pd->edit_curves_lines_grp[in_front]; - struct GPUBatch *geom_lines = DRW_curves_batch_cache_get_edit_lines(curves); + GPUBatch *geom_lines = DRW_curves_batch_cache_get_edit_lines(curves); DRW_shgroup_call_no_cull(lines_shgrp, geom_lines, ob); } diff --git a/source/blender/draw/engines/overlay/overlay_edit_mesh.cc b/source/blender/draw/engines/overlay/overlay_edit_mesh.cc index 2d34c227d47..82b2111fe90 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_mesh.cc +++ b/source/blender/draw/engines/overlay/overlay_edit_mesh.cc @@ -233,7 +233,7 @@ void OVERLAY_edit_mesh_cache_init(OVERLAY_Data *vedata) static void overlay_edit_mesh_add_ob_to_pass(OVERLAY_PrivateData *pd, Object *ob, bool in_front) { - struct GPUBatch *geom_tris, *geom_verts, *geom_edges, *geom_fcenter, *skin_roots, *circle; + GPUBatch *geom_tris, *geom_verts, *geom_edges, *geom_fcenter, *skin_roots, *circle; DRWShadingGroup *vert_shgrp, *edge_shgrp, *fdot_shgrp, *face_shgrp, *skin_roots_shgrp; bool has_edit_mesh_cage = false; @@ -281,7 +281,7 @@ static void overlay_edit_mesh_add_ob_to_pass(OVERLAY_PrivateData *pd, Object *ob void OVERLAY_edit_mesh_cache_populate(OVERLAY_Data *vedata, Object *ob) { OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUBatch *geom = nullptr; + GPUBatch *geom = nullptr; bool draw_as_solid = (ob->dt > OB_WIRE); bool do_in_front = (ob->dtx & OB_DRAW_IN_FRONT) != 0; @@ -309,7 +309,7 @@ void OVERLAY_edit_mesh_cache_populate(OVERLAY_Data *vedata, Object *ob) } if (vnormals_do || lnormals_do || fnormals_do) { - struct GPUBatch *normal_geom = DRW_cache_normal_arrow_get(); + GPUBatch *normal_geom = DRW_cache_normal_arrow_get(); Mesh *me = static_cast(ob->data); if (vnormals_do) { geom = DRW_mesh_batch_cache_get_edit_vert_normals(me); diff --git a/source/blender/draw/engines/overlay/overlay_edit_text.cc b/source/blender/draw/engines/overlay/overlay_edit_text.cc index fc14186316e..d3546ac5435 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_text.cc +++ b/source/blender/draw/engines/overlay/overlay_edit_text.cc @@ -87,7 +87,7 @@ static void edit_text_cache_populate_select(OVERLAY_Data *vedata, Object *ob) const Curve *cu = static_cast(ob->data); EditFont *ef = cu->editfont; float final_mat[4][4], box[4][2]; - struct GPUBatch *geom = DRW_cache_quad_get(); + GPUBatch *geom = DRW_cache_quad_get(); for (int i = 0; i < ef->selboxes_len; i++) { EditFontSelBox *sb = &ef->selboxes[i]; @@ -137,7 +137,7 @@ static void edit_text_cache_populate_cursor(OVERLAY_Data *vedata, Object *ob) v2_quad_corners_to_mat4(cursor, mat); mul_m4_m4m4(mat, ob->object_to_world, mat); - struct GPUBatch *geom = DRW_cache_quad_get(); + GPUBatch *geom = DRW_cache_quad_get(); DRW_shgroup_call_obmat(pd->edit_text_cursor_grp, geom, mat); } @@ -175,7 +175,7 @@ static void edit_text_cache_populate_boxes(OVERLAY_Data *vedata, Object *ob) void OVERLAY_edit_text_cache_populate(OVERLAY_Data *vedata, Object *ob) { OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUBatch *geom; + GPUBatch *geom; bool do_in_front = (ob->dtx & OB_DRAW_IN_FRONT) != 0; geom = DRW_cache_text_edge_wire_get(ob); diff --git a/source/blender/draw/engines/overlay/overlay_facing.cc b/source/blender/draw/engines/overlay/overlay_facing.cc index d1530a685bd..f7927446b05 100644 --- a/source/blender/draw/engines/overlay/overlay_facing.cc +++ b/source/blender/draw/engines/overlay/overlay_facing.cc @@ -50,7 +50,7 @@ void OVERLAY_facing_cache_populate(OVERLAY_Data *vedata, Object *ob) DRW_shgroup_call_sculpt(pd->facing_grp[is_xray], ob, false, false, false, false, false); } else { - struct GPUBatch *geom = DRW_cache_object_surface_get(ob); + GPUBatch *geom = DRW_cache_object_surface_get(ob); if (geom) { DRW_shgroup_call(pd->facing_grp[is_xray], geom, ob); } diff --git a/source/blender/draw/engines/overlay/overlay_fade.cc b/source/blender/draw/engines/overlay/overlay_fade.cc index aa60353ba83..856879a2cb3 100644 --- a/source/blender/draw/engines/overlay/overlay_fade.cc +++ b/source/blender/draw/engines/overlay/overlay_fade.cc @@ -60,7 +60,7 @@ void OVERLAY_fade_cache_populate(OVERLAY_Data *vedata, Object *ob) DRW_shgroup_call_sculpt(pd->fade_grp[is_xray], ob, false, false, false, false, false); } else { - struct GPUBatch *geom = DRW_cache_object_surface_get(ob); + GPUBatch *geom = DRW_cache_object_surface_get(ob); if (geom) { DRW_shgroup_call(pd->fade_grp[is_xray], geom, ob); } diff --git a/source/blender/draw/engines/overlay/overlay_gpencil_legacy.cc b/source/blender/draw/engines/overlay/overlay_gpencil_legacy.cc index de2bb5c0099..65c31e0a1eb 100644 --- a/source/blender/draw/engines/overlay/overlay_gpencil_legacy.cc +++ b/source/blender/draw/engines/overlay/overlay_gpencil_legacy.cc @@ -27,7 +27,7 @@ void OVERLAY_edit_gpencil_legacy_cache_init(OVERLAY_Data *vedata) { OVERLAY_PassList *psl = vedata->psl; OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; /* Default: Display nothing. */ @@ -209,7 +209,7 @@ void OVERLAY_gpencil_legacy_cache_init(OVERLAY_Data *vedata) { OVERLAY_PassList *psl = vedata->psl; OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; /* Default: Display nothing. */ @@ -338,7 +338,7 @@ static void OVERLAY_edit_gpencil_cache_populate(OVERLAY_Data *vedata, Object *ob DRWShadingGroup *grp = DRW_shgroup_create_sub(pd->edit_gpencil_wires_grp); DRW_shgroup_uniform_vec4_copy(grp, "gpEditColor", gpd->line_color); - struct GPUBatch *geom = DRW_cache_gpencil_edit_lines_get(ob, pd->cfra); + GPUBatch *geom = DRW_cache_gpencil_edit_lines_get(ob, pd->cfra); DRW_shgroup_call_no_cull(pd->edit_gpencil_wires_grp, geom, ob); } @@ -348,19 +348,19 @@ static void OVERLAY_edit_gpencil_cache_populate(OVERLAY_Data *vedata, Object *ob DRWShadingGroup *grp = DRW_shgroup_create_sub(pd->edit_gpencil_points_grp); DRW_shgroup_uniform_float_copy(grp, "doStrokeEndpoints", show_direction); - struct GPUBatch *geom = DRW_cache_gpencil_edit_points_get(ob, pd->cfra); + GPUBatch *geom = DRW_cache_gpencil_edit_points_get(ob, pd->cfra); DRW_shgroup_call_no_cull(grp, geom, ob); } if (pd->edit_gpencil_curve_handle_grp) { - struct GPUBatch *geom = DRW_cache_gpencil_edit_curve_handles_get(ob, pd->cfra); + GPUBatch *geom = DRW_cache_gpencil_edit_curve_handles_get(ob, pd->cfra); if (geom) { DRW_shgroup_call_no_cull(pd->edit_gpencil_curve_handle_grp, geom, ob); } } if (pd->edit_gpencil_curve_points_grp) { - struct GPUBatch *geom = DRW_cache_gpencil_edit_curve_points_get(ob, pd->cfra); + GPUBatch *geom = DRW_cache_gpencil_edit_curve_points_get(ob, pd->cfra); if (geom) { DRW_shgroup_call_no_cull(pd->edit_gpencil_curve_points_grp, geom, ob); } @@ -402,7 +402,7 @@ static void overlay_gpencil_draw_stroke_color_name(bGPDlayer * /*gpl*/, float fpt[3]; mul_v3_m4v3(fpt, ob->object_to_world, &pt->x); - struct DRWTextStore *dt = DRW_text_cache_ensure(); + DRWTextStore *dt = DRW_text_cache_ensure(); DRW_text_cache_add(dt, fpt, ma->id.name + 2, diff --git a/source/blender/draw/engines/overlay/overlay_grease_pencil.cc b/source/blender/draw/engines/overlay/overlay_grease_pencil.cc index d4140c70e89..fd3cb261c28 100644 --- a/source/blender/draw/engines/overlay/overlay_grease_pencil.cc +++ b/source/blender/draw/engines/overlay/overlay_grease_pencil.cc @@ -34,7 +34,7 @@ void OVERLAY_edit_grease_pencil_cache_populate(OVERLAY_Data *vedata, Object *ob) DRWShadingGroup *points_grp = pd->edit_grease_pencil_points_grp; if (points_grp) { - struct GPUBatch *geom = DRW_cache_grease_pencil_edit_points_get(ob, pd->cfra); + GPUBatch *geom = DRW_cache_grease_pencil_edit_points_get(ob, pd->cfra); DRW_shgroup_call_no_cull(points_grp, geom, ob); } } diff --git a/source/blender/draw/engines/overlay/overlay_grid.cc b/source/blender/draw/engines/overlay/overlay_grid.cc index ad5c46bd9e3..e178f42928b 100644 --- a/source/blender/draw/engines/overlay/overlay_grid.cc +++ b/source/blender/draw/engines/overlay/overlay_grid.cc @@ -260,7 +260,7 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *ved) { DRWShadingGroup *grp; - struct GPUBatch *geom = DRW_cache_grid_get(); + GPUBatch *geom = DRW_cache_grid_get(); GPUShader *sh = OVERLAY_shader_grid(); diff --git a/source/blender/draw/engines/overlay/overlay_image.cc b/source/blender/draw/engines/overlay/overlay_image.cc index eaedb147e32..3fa9a5b7318 100644 --- a/source/blender/draw/engines/overlay/overlay_image.cc +++ b/source/blender/draw/engines/overlay/overlay_image.cc @@ -121,12 +121,12 @@ static void camera_background_images_stereo_setup(const Scene *scene, } } -static struct GPUTexture *image_camera_background_texture_get(CameraBGImage *bgpic, - const DRWContextState *draw_ctx, - OVERLAY_PrivateData *pd, - float *r_aspect, - bool *r_use_alpha_premult, - bool *r_use_view_transform) +static GPUTexture *image_camera_background_texture_get(CameraBGImage *bgpic, + const DRWContextState *draw_ctx, + OVERLAY_PrivateData *pd, + float *r_aspect, + bool *r_use_alpha_premult, + bool *r_use_view_transform) { void *lock; Image *image = bgpic->ima; diff --git a/source/blender/draw/engines/overlay/overlay_lattice.cc b/source/blender/draw/engines/overlay/overlay_lattice.cc index fbabab41aa5..80344585815 100644 --- a/source/blender/draw/engines/overlay/overlay_lattice.cc +++ b/source/blender/draw/engines/overlay/overlay_lattice.cc @@ -14,7 +14,7 @@ void OVERLAY_edit_lattice_cache_init(OVERLAY_Data *vedata) { OVERLAY_PassList *psl = vedata->psl; OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; { @@ -35,7 +35,7 @@ void OVERLAY_edit_lattice_cache_init(OVERLAY_Data *vedata) void OVERLAY_edit_lattice_cache_populate(OVERLAY_Data *vedata, Object *ob) { OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUBatch *geom; + GPUBatch *geom; geom = DRW_cache_lattice_wire_get(ob, true); DRW_shgroup_call(pd->edit_lattice_wires_grp, geom, ob); @@ -52,7 +52,7 @@ void OVERLAY_lattice_cache_populate(OVERLAY_Data *vedata, Object *ob) float *color; DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color); - struct GPUBatch *geom = DRW_cache_lattice_wire_get(ob, false); + GPUBatch *geom = DRW_cache_lattice_wire_get(ob, false); OVERLAY_extra_wire(cb, geom, ob->object_to_world, color); } diff --git a/source/blender/draw/engines/overlay/overlay_metaball.cc b/source/blender/draw/engines/overlay/overlay_metaball.cc index f33a364f741..390e86953b7 100644 --- a/source/blender/draw/engines/overlay/overlay_metaball.cc +++ b/source/blender/draw/engines/overlay/overlay_metaball.cc @@ -34,8 +34,8 @@ void OVERLAY_metaball_cache_init(OVERLAY_Data *vedata) DRW_PASS_CREATE(psl->metaball_ps[i], state | pd->clipping_state | infront_state); /* Reuse armature shader as it's perfect to outline ellipsoids. */ - struct GPUVertFormat *format = formats->instance_bone; - struct GPUShader *sh = OVERLAY_shader_armature_sphere(true); + GPUVertFormat *format = formats->instance_bone; + GPUShader *sh = OVERLAY_shader_armature_sphere(true); DRWShadingGroup *grp = DRW_shgroup_create(sh, psl->metaball_ps[i]); DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); pd->mball.handle[i] = BUF_INSTANCE(grp, format, DRW_cache_bone_point_wire_outline_get()); diff --git a/source/blender/draw/engines/overlay/overlay_mode_transfer.cc b/source/blender/draw/engines/overlay/overlay_mode_transfer.cc index a8bd53b631e..92a61287c92 100644 --- a/source/blender/draw/engines/overlay/overlay_mode_transfer.cc +++ b/source/blender/draw/engines/overlay/overlay_mode_transfer.cc @@ -114,7 +114,7 @@ void OVERLAY_mode_transfer_cache_populate(OVERLAY_Data *vedata, Object *ob) DRW_shgroup_call_sculpt(mode_transfer_grp[is_xray], ob, false, false, false, false, false); } else { - struct GPUBatch *geom = DRW_cache_object_surface_get(ob); + GPUBatch *geom = DRW_cache_object_surface_get(ob); if (geom) { DRW_shgroup_call(mode_transfer_grp[is_xray], geom, ob); } diff --git a/source/blender/draw/engines/overlay/overlay_motion_path.cc b/source/blender/draw/engines/overlay/overlay_motion_path.cc index f72b4eb606d..81adfb82bc7 100644 --- a/source/blender/draw/engines/overlay/overlay_motion_path.cc +++ b/source/blender/draw/engines/overlay/overlay_motion_path.cc @@ -115,7 +115,7 @@ static void motion_path_cache(OVERLAY_Data *vedata, { OVERLAY_PrivateData *pd = vedata->stl->pd; const DRWContextState *draw_ctx = DRW_context_state_get(); - struct DRWTextStore *dt = DRW_text_cache_ensure(); + DRWTextStore *dt = DRW_text_cache_ensure(); int txt_flag = DRW_TEXT_CACHE_GLOBALSPACE; int cfra = int(DEG_get_ctime(draw_ctx->depsgraph)); bool selected = (pchan) ? (pchan->bone->flag & BONE_SELECTED) : (ob->base_flag & BASE_SELECTED); diff --git a/source/blender/draw/engines/overlay/overlay_outline.cc b/source/blender/draw/engines/overlay/overlay_outline.cc index e3fa430c023..17df93c3699 100644 --- a/source/blender/draw/engines/overlay/overlay_outline.cc +++ b/source/blender/draw/engines/overlay/overlay_outline.cc @@ -225,7 +225,7 @@ static void gpencil_stroke_cache_populate(bGPDlayer * /*gpl*/, return; } - struct GPUBatch *geom = DRW_cache_gpencil_get(iter->ob, iter->cfra); + GPUBatch *geom = DRW_cache_gpencil_get(iter->ob, iter->cfra); if (show_fill) { int vfirst = gps->runtime.fill_start * 3; @@ -269,7 +269,7 @@ static void OVERLAY_outline_gpencil(OVERLAY_PrivateData *pd, Object *ob) static void OVERLAY_outline_volume(OVERLAY_PrivateData *pd, Object *ob) { - struct GPUBatch *geom = DRW_cache_volume_selection_surface_get(ob); + GPUBatch *geom = DRW_cache_volume_selection_surface_get(ob); if (geom == nullptr) { return; } @@ -303,7 +303,7 @@ void OVERLAY_outline_cache_populate(OVERLAY_Data *vedata, { OVERLAY_PrivateData *pd = vedata->stl->pd; const DRWContextState *draw_ctx = DRW_context_state_get(); - struct GPUBatch *geom; + GPUBatch *geom; DRWShadingGroup *shgroup = nullptr; const bool draw_outline = ob->dt > OB_BOUNDBOX; diff --git a/source/blender/draw/engines/overlay/overlay_paint.cc b/source/blender/draw/engines/overlay/overlay_paint.cc index fcabf230374..f26c1446deb 100644 --- a/source/blender/draw/engines/overlay/overlay_paint.cc +++ b/source/blender/draw/engines/overlay/overlay_paint.cc @@ -67,7 +67,7 @@ void OVERLAY_paint_cache_init(OVERLAY_Data *vedata) const DRWContextState *draw_ctx = DRW_context_state_get(); OVERLAY_PassList *psl = vedata->psl; OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; DRWState state; @@ -192,7 +192,7 @@ void OVERLAY_paint_cache_init(OVERLAY_Data *vedata) void OVERLAY_paint_texture_cache_populate(OVERLAY_Data *vedata, Object *ob) { OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUBatch *geom = nullptr; + GPUBatch *geom = nullptr; const Mesh *me_orig = static_cast(DEG_get_original_object(ob)->data); const bool use_face_sel = (me_orig->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; @@ -211,7 +211,7 @@ void OVERLAY_paint_texture_cache_populate(OVERLAY_Data *vedata, Object *ob) void OVERLAY_paint_vertex_cache_populate(OVERLAY_Data *vedata, Object *ob) { OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUBatch *geom = nullptr; + GPUBatch *geom = nullptr; const Mesh *me_orig = static_cast(DEG_get_original_object(ob)->data); const bool is_edit_mode = (pd->ctx_mode == CTX_MODE_EDIT_MESH); diff --git a/source/blender/draw/engines/overlay/overlay_particle.cc b/source/blender/draw/engines/overlay/overlay_particle.cc index e5389753e27..f12bfdc62c5 100644 --- a/source/blender/draw/engines/overlay/overlay_particle.cc +++ b/source/blender/draw/engines/overlay/overlay_particle.cc @@ -86,7 +86,7 @@ void OVERLAY_edit_particle_cache_populate(OVERLAY_Data *vedata, Object *ob) return; } - struct GPUBatch *geom; + GPUBatch *geom; { geom = DRW_cache_particles_get_edit_strands(ob, psys, edit, pd->edit_particle.use_weight); DRW_shgroup_call(pd->edit_particle_strand_grp, geom, nullptr); @@ -165,8 +165,8 @@ void OVERLAY_particle_cache_populate(OVERLAY_Data *vedata, Object *ob) } if (!ELEM(draw_as, PART_DRAW_NOT, PART_DRAW_OB, PART_DRAW_GR)) { - struct GPUBatch *geom = DRW_cache_particles_get_dots(ob, psys); - struct GPUBatch *shape = nullptr; + GPUBatch *geom = DRW_cache_particles_get_dots(ob, psys); + GPUBatch *shape = nullptr; DRWShadingGroup *grp; /* TODO(fclem): Here would be a good place for preemptive culling. */ diff --git a/source/blender/draw/engines/overlay/overlay_sculpt.cc b/source/blender/draw/engines/overlay/overlay_sculpt.cc index b2336fa0ed5..61a7b89bfe1 100644 --- a/source/blender/draw/engines/overlay/overlay_sculpt.cc +++ b/source/blender/draw/engines/overlay/overlay_sculpt.cc @@ -35,7 +35,7 @@ void OVERLAY_sculpt_cache_populate(OVERLAY_Data *vedata, Object *ob) { OVERLAY_PrivateData *pd = vedata->stl->pd; const DRWContextState *draw_ctx = DRW_context_state_get(); - struct GPUBatch *sculpt_overlays; + GPUBatch *sculpt_overlays; PBVH *pbvh = ob->sculpt->pbvh; const bool use_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->rv3d); diff --git a/source/blender/draw/engines/overlay/overlay_shader.cc b/source/blender/draw/engines/overlay/overlay_shader.cc index 7e7a920b270..cad273d8c74 100644 --- a/source/blender/draw/engines/overlay/overlay_shader.cc +++ b/source/blender/draw/engines/overlay/overlay_shader.cc @@ -934,7 +934,7 @@ GPUShader *OVERLAY_shader_viewer_attribute_curves(void) return sh_data->viewer_attribute_curves; } -struct GPUShader *OVERLAY_shader_uniform_color(void) +GPUShader *OVERLAY_shader_uniform_color(void) { const DRWContextState *draw_ctx = DRW_context_state_get(); OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; @@ -946,7 +946,7 @@ struct GPUShader *OVERLAY_shader_uniform_color(void) return sh_data->uniform_color; } -struct GPUShader *OVERLAY_shader_uniform_color_pointcloud() +GPUShader *OVERLAY_shader_uniform_color_pointcloud() { const DRWContextState *draw_ctx = DRW_context_state_get(); OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; @@ -958,7 +958,7 @@ struct GPUShader *OVERLAY_shader_uniform_color_pointcloud() return sh_data->uniform_color_pointcloud; } -struct GPUShader *OVERLAY_shader_volume_velocity(bool use_needle, bool use_mac) +GPUShader *OVERLAY_shader_volume_velocity(bool use_needle, bool use_mac) { OVERLAY_Shaders *sh_data = &e_data.sh_data[0]; if (use_needle && !sh_data->volume_velocity_needle_sh) { @@ -982,7 +982,7 @@ struct GPUShader *OVERLAY_shader_volume_velocity(bool use_needle, bool use_mac) return sh_data->volume_velocity_sh; } -struct GPUShader *OVERLAY_shader_volume_gridlines(bool color_with_flags, bool color_range) +GPUShader *OVERLAY_shader_volume_gridlines(bool color_with_flags, bool color_range) { OVERLAY_Shaders *sh_data = &e_data.sh_data[0]; if (!sh_data->volume_gridlines_flags_sh && color_with_flags) { @@ -1207,7 +1207,7 @@ void OVERLAY_shader_free(void) DRW_SHADER_FREE_SAFE(sh_data_as_array[i]); } } - struct GPUVertFormat **format = (struct GPUVertFormat **)&g_formats; + GPUVertFormat **format = (GPUVertFormat **)&g_formats; for (int i = 0; i < sizeof(g_formats) / sizeof(void *); i++, format++) { MEM_SAFE_FREE(*format); } diff --git a/source/blender/draw/engines/overlay/overlay_volume.cc b/source/blender/draw/engines/overlay/overlay_volume.cc index 6882187305e..08ca6908de9 100644 --- a/source/blender/draw/engines/overlay/overlay_volume.cc +++ b/source/blender/draw/engines/overlay/overlay_volume.cc @@ -38,7 +38,7 @@ void OVERLAY_volume_cache_populate(OVERLAY_Data *vedata, Object *ob) const bool is_select = DRW_state_is_select(); if (is_select) { - struct GPUBatch *geom = DRW_cache_volume_selection_surface_get(ob); + GPUBatch *geom = DRW_cache_volume_selection_surface_get(ob); if (geom != nullptr) { DRW_shgroup_call(pd->volume_selection_surface_grp, geom, ob); } diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.cc b/source/blender/draw/engines/overlay/overlay_wireframe.cc index b906c038e2b..30d241581b3 100644 --- a/source/blender/draw/engines/overlay/overlay_wireframe.cc +++ b/source/blender/draw/engines/overlay/overlay_wireframe.cc @@ -154,7 +154,7 @@ static void wireframe_hair_cache_populate(OVERLAY_Data *vedata, Object *ob, Part unit_m4(dupli_mat); } - struct GPUBatch *hairs = DRW_cache_particles_get_hair(ob, psys, nullptr); + GPUBatch *hairs = DRW_cache_particles_get_hair(ob, psys, nullptr); const bool use_coloring = true; DRWShadingGroup *shgrp = DRW_shgroup_create_sub(pd->wires_hair_grp[is_xray][use_coloring]); @@ -214,7 +214,7 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, float *color; DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color); - struct GPUBatch *geom = nullptr; + GPUBatch *geom = nullptr; switch (ob->type) { case OB_CURVES_LEGACY: geom = DRW_cache_curve_edge_wire_get(ob); @@ -273,7 +273,7 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, OVERLAY_ExtraCallBuffers *cb = OVERLAY_extra_call_buffer_get(vedata, ob); DRW_object_wire_theme_get(ob, draw_ctx->view_layer, &color); - struct GPUBatch *geom = DRW_cache_object_face_wireframe_get(ob); + GPUBatch *geom = DRW_cache_object_face_wireframe_get(ob); if (geom) { OVERLAY_extra_loose_points(cb, geom, ob->object_to_world, color); } @@ -282,7 +282,7 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, } DRWShadingGroup *shgrp = nullptr; - struct GPUBatch *geom = nullptr; + GPUBatch *geom = nullptr; /* Don't do that in edit Mesh mode, unless there is a modifier preview. */ if (use_wire && (!is_mesh || (!is_edit_mode || has_edit_mesh_cage))) { diff --git a/source/blender/draw/engines/select/select_engine.c b/source/blender/draw/engines/select/select_engine.c index e55ab5a469d..d97d7099256 100644 --- a/source/blender/draw/engines/select/select_engine.c +++ b/source/blender/draw/engines/select/select_engine.c @@ -28,11 +28,11 @@ /* *********** STATIC *********** */ static struct { - struct GPUFrameBuffer *framebuffer_select_id; - struct GPUTexture *texture_u32; + GPUFrameBuffer *framebuffer_select_id; + GPUTexture *texture_u32; SELECTID_Shaders sh_data[GPU_SHADER_CFG_LEN]; - struct SELECTID_Context context; + SELECTID_Context context; uint runtime_new_objects; } e_data = {NULL}; /* Engine data */ @@ -220,7 +220,7 @@ static void select_cache_populate(void *vedata, Object *ob) !XRAY_ENABLED(draw_ctx->v3d); if (retopology_occlusion && !DRW_object_is_in_edit_mode(ob)) { if (ob->dt >= OB_SOLID) { - struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_surface(ob->data); + GPUBatch *geom_faces = DRW_mesh_batch_cache_get_surface(ob->data); DRW_shgroup_call_obmat(stl->g_data->shgrp_occlude, geom_faces, ob->object_to_world); } return; @@ -234,12 +234,12 @@ static void select_cache_populate(void *vedata, Object *ob) * Optimization: Most of the time this depth pass is not used. */ struct Mesh *me = ob->data; if (e_data.context.select_mode & SCE_SELECT_FACE) { - struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me); + GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me); DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_faces, ob->object_to_world); } else if (ob->dt >= OB_SOLID) { #ifdef USE_CAGE_OCCLUSION - struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me); + GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me); #else struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_surface(me); #endif @@ -247,12 +247,12 @@ static void select_cache_populate(void *vedata, Object *ob) } if (e_data.context.select_mode & SCE_SELECT_EDGE) { - struct GPUBatch *geom_edges = DRW_mesh_batch_cache_get_edges_with_select_id(me); + GPUBatch *geom_edges = DRW_mesh_batch_cache_get_edges_with_select_id(me); DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_edges, ob->object_to_world); } if (e_data.context.select_mode & SCE_SELECT_VERTEX) { - struct GPUBatch *geom_verts = DRW_mesh_batch_cache_get_verts_with_select_id(me); + GPUBatch *geom_verts = DRW_mesh_batch_cache_get_verts_with_select_id(me); DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_verts, ob->object_to_world); } return; @@ -397,7 +397,7 @@ RenderEngineType DRW_engine_viewport_select_type = { /** \name Exposed `select_private.h` functions * \{ */ -struct SELECTID_Context *DRW_select_engine_context_get(void) +SELECTID_Context *DRW_select_engine_context_get(void) { return &e_data.context; } diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c index 6b29edf602f..048f207b914 100644 --- a/source/blender/draw/engines/workbench/workbench_data.c +++ b/source/blender/draw/engines/workbench/workbench_data.c @@ -26,7 +26,7 @@ GPUUniformBuf *workbench_material_ubo_alloc(WORKBENCH_PrivateData *wpd) { - struct GPUUniformBuf **ubo = BLI_memblock_alloc(wpd->material_ubo); + GPUUniformBuf **ubo = BLI_memblock_alloc(wpd->material_ubo); if (*ubo == NULL) { *ubo = GPU_uniformbuf_create(sizeof(WORKBENCH_UBO_Material) * MAX_MATERIAL); } @@ -52,7 +52,7 @@ static void workbench_view_layer_data_free(void *storage) BLI_memblock_destroy(vldata->material_ubo, workbench_ubo_free); } -static WORKBENCH_ViewLayerData *workbench_view_layer_data_ensure_ex(struct ViewLayer *view_layer) +static WORKBENCH_ViewLayerData *workbench_view_layer_data_ensure_ex(ViewLayer *view_layer) { WORKBENCH_ViewLayerData **vldata = (WORKBENCH_ViewLayerData **) DRW_view_layer_engine_data_ensure_ex(view_layer, diff --git a/source/blender/draw/engines/workbench/workbench_effect_cavity.c b/source/blender/draw/engines/workbench/workbench_effect_cavity.c index cd44fb05069..6f80bb17b03 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_cavity.c +++ b/source/blender/draw/engines/workbench/workbench_effect_cavity.c @@ -50,7 +50,7 @@ static float *create_disk_samples(int num_samples, int num_iterations) return (float *)texels; } -static struct GPUTexture *create_jitter_texture(int num_samples) +static GPUTexture *create_jitter_texture(int num_samples) { float jitter[64 * 64][4]; const float num_samples_inv = 1.0f / num_samples; @@ -137,7 +137,7 @@ void workbench_cavity_cache_init(WORKBENCH_Data *data) WORKBENCH_PassList *psl = data->psl; WORKBENCH_PrivateData *wpd = data->stl->wpd; DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; if (CAVITY_ENABLED(wpd)) { diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.c b/source/blender/draw/engines/workbench/workbench_effect_dof.c index febbd2c3e75..2f583abaa3d 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_dof.c +++ b/source/blender/draw/engines/workbench/workbench_effect_dof.c @@ -60,11 +60,8 @@ static void square_to_circle(float x, float y, float *r, float *T) #define KERNEL_RAD (3) #define SAMP_LEN SQUARE_UNSAFE(KERNEL_RAD * 2 + 1) -static void workbench_dof_setup_samples(struct GPUUniformBuf **ubo, - float **data, - float bokeh_sides, - float bokeh_rotation, - float bokeh_ratio) +static void workbench_dof_setup_samples( + GPUUniformBuf **ubo, float **data, float bokeh_sides, float bokeh_rotation, float bokeh_ratio) { if (*data == NULL) { *data = MEM_callocN(sizeof(float[4]) * SAMP_LEN, "workbench dof samples"); diff --git a/source/blender/draw/engines/workbench/workbench_effect_outline.c b/source/blender/draw/engines/workbench/workbench_effect_outline.c index c516e914eb9..d4af4a70b21 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_outline.c +++ b/source/blender/draw/engines/workbench/workbench_effect_outline.c @@ -20,7 +20,7 @@ void workbench_outline_cache_init(WORKBENCH_Data *data) WORKBENCH_PassList *psl = data->psl; WORKBENCH_PrivateData *wpd = data->stl->wpd; DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; if (OBJECT_OUTLINE_ENABLED(wpd)) { diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c index b5687170bfe..31eed519362 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.c +++ b/source/blender/draw/engines/workbench/workbench_engine.c @@ -91,10 +91,10 @@ void workbench_cache_init(void *ved) /* TODO(fclem): DRW_cache_object_surface_material_get needs a refactor to allow passing NULL * instead of gpumat_array. Avoiding all this boilerplate code. */ -static struct GPUBatch **workbench_object_surface_material_get(Object *ob) +static GPUBatch **workbench_object_surface_material_get(Object *ob) { const int materials_len = DRW_cache_object_material_count_get(ob); - struct GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); + GPUMaterial **gpumat_array = BLI_array_alloca(gpumat_array, materials_len); memset(gpumat_array, 0, sizeof(*gpumat_array) * materials_len); return DRW_cache_object_surface_material_get(ob, gpumat_array, materials_len); @@ -115,7 +115,7 @@ static void workbench_cache_sculpt_populate(WORKBENCH_PrivateData *wpd, } else { const int materials_len = DRW_cache_object_material_count_get(ob); - struct DRWShadingGroup **shgrps = BLI_array_alloca(shgrps, materials_len); + DRWShadingGroup **shgrps = BLI_array_alloca(shgrps, materials_len); for (int i = 0; i < materials_len; i++) { shgrps[i] = workbench_material_setup(wpd, ob, i + 1, color_type, NULL); } @@ -123,7 +123,7 @@ static void workbench_cache_sculpt_populate(WORKBENCH_PrivateData *wpd, } } -BLI_INLINE void workbench_object_drawcall(DRWShadingGroup *grp, struct GPUBatch *geom, Object *ob) +BLI_INLINE void workbench_object_drawcall(DRWShadingGroup *grp, GPUBatch *geom, Object *ob) { if (ob->type == OB_POINTCLOUD) { /* Draw range to avoid drawcall batching messing up the instance attribute. */ @@ -142,7 +142,7 @@ static void workbench_cache_texpaint_populate(WORKBENCH_PrivateData *wpd, Object const bool use_single_drawcall = imapaint->mode == IMAGEPAINT_MODE_IMAGE; if (use_single_drawcall) { - struct GPUBatch *geom = DRW_cache_mesh_surface_texpaint_single_get(ob); + GPUBatch *geom = DRW_cache_mesh_surface_texpaint_single_get(ob); if (geom) { Image *ima = imapaint->canvas; @@ -157,7 +157,7 @@ static void workbench_cache_texpaint_populate(WORKBENCH_PrivateData *wpd, Object } } else { - struct GPUBatch **geoms = DRW_cache_mesh_surface_texpaint_get(ob); + GPUBatch **geoms = DRW_cache_mesh_surface_texpaint_get(ob); if (geoms) { const int materials_len = DRW_cache_object_material_count_get(ob); for (int i = 0; i < materials_len; i++) { @@ -183,7 +183,7 @@ static void workbench_cache_common_populate(WORKBENCH_PrivateData *wpd, color_type, V3D_SHADING_MATERIAL_COLOR, V3D_SHADING_TEXTURE_COLOR); if (use_single_drawcall) { - struct GPUBatch *geom; + GPUBatch *geom; if (use_vcol) { if (ob->mode & OB_MODE_VERTEX_PAINT) { geom = DRW_cache_mesh_surface_vertpaint_get(ob); @@ -202,8 +202,8 @@ static void workbench_cache_common_populate(WORKBENCH_PrivateData *wpd, } } else { - struct GPUBatch **geoms = (use_tex) ? DRW_cache_mesh_surface_texpaint_get(ob) : - workbench_object_surface_material_get(ob); + GPUBatch **geoms = (use_tex) ? DRW_cache_mesh_surface_texpaint_get(ob) : + workbench_object_surface_material_get(ob); if (geoms) { const int materials_len = DRW_cache_object_material_count_get(ob); for (int i = 0; i < materials_len; i++) { @@ -661,7 +661,7 @@ static void workbench_view_update(void *vedata) workbench_antialiasing_view_updated(data); } -static void workbench_id_update(void *UNUSED(vedata), struct ID *id) +static void workbench_id_update(void *UNUSED(vedata), ID *id) { if (GS(id->name) == ID_OB) { WORKBENCH_ObjectData *oed = (WORKBENCH_ObjectData *)DRW_drawdata_get(id, diff --git a/source/blender/draw/engines/workbench/workbench_engine.cc b/source/blender/draw/engines/workbench/workbench_engine.cc index cde69813e81..04fd5a94cb5 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.cc +++ b/source/blender/draw/engines/workbench/workbench_engine.cc @@ -215,7 +215,7 @@ class Instance { if (object_state.use_per_material_batches) { const int material_count = DRW_cache_object_material_count_get(ob_ref.object); - struct GPUBatch **batches; + GPUBatch **batches; if (object_state.color_type == V3D_SHADING_TEXTURE_COLOR) { batches = DRW_cache_mesh_surface_texpaint_get(ob_ref.object); } @@ -245,7 +245,7 @@ class Instance { } } else { - struct GPUBatch *batch; + GPUBatch *batch; if (object_state.color_type == V3D_SHADING_TEXTURE_COLOR) { batch = DRW_cache_mesh_surface_texpaint_single_get(ob_ref.object); } @@ -484,7 +484,7 @@ static void workbench_view_update(void *vedata) } } -static void workbench_id_update(void *vedata, struct ID *id) +static void workbench_id_update(void *vedata, ID *id) { UNUSED_VARS(vedata, id); } @@ -538,10 +538,10 @@ static bool workbench_render_framebuffers_init(void) # define GPU_FINISH_DELIMITER() #endif -static void write_render_color_output(struct RenderLayer *layer, +static void write_render_color_output(RenderLayer *layer, const char *viewname, GPUFrameBuffer *fb, - const struct rcti *rect) + const rcti *rect) { RenderPass *rp = RE_pass_find_by_name(layer, RE_PASSNAME_COMBINED, viewname); if (rp) { @@ -558,10 +558,10 @@ static void write_render_color_output(struct RenderLayer *layer, } } -static void write_render_z_output(struct RenderLayer *layer, +static void write_render_z_output(RenderLayer *layer, const char *viewname, GPUFrameBuffer *fb, - const struct rcti *rect, + const rcti *rect, float4x4 winmat) { RenderPass *rp = RE_pass_find_by_name(layer, RE_PASSNAME_Z, viewname); @@ -608,9 +608,9 @@ static void write_render_z_output(struct RenderLayer *layer, } static void workbench_render_to_image(void *vedata, - struct RenderEngine *engine, - struct RenderLayer *layer, - const struct rcti *rect) + RenderEngine *engine, + RenderLayer *layer, + const rcti *rect) { /* TODO(fclem): Remove once it is minimum required. */ if (!GPU_shader_storage_buffer_objects_support()) { @@ -659,12 +659,10 @@ static void workbench_render_to_image(void *vedata, DRW_manager_get()->begin_sync(); workbench_cache_init(vedata); - auto workbench_render_cache = [](void *vedata, - struct Object *ob, - struct RenderEngine * /*engine*/, - struct Depsgraph * /*depsgraph*/) { - workbench_cache_populate(vedata, ob); - }; + auto workbench_render_cache = + [](void *vedata, Object *ob, RenderEngine * /*engine*/, Depsgraph * /*depsgraph*/) { + workbench_cache_populate(vedata, ob); + }; DRW_render_object_iter(vedata, engine, depsgraph, workbench_render_cache); workbench_cache_finish(vedata); diff --git a/source/blender/draw/engines/workbench/workbench_opaque.c b/source/blender/draw/engines/workbench/workbench_opaque.c index 81598b17405..73c5b85a9cd 100644 --- a/source/blender/draw/engines/workbench/workbench_opaque.c +++ b/source/blender/draw/engines/workbench/workbench_opaque.c @@ -49,7 +49,7 @@ void workbench_opaque_cache_init(WORKBENCH_Data *vedata) WORKBENCH_PassList *psl = vedata->psl; WORKBENCH_PrivateData *wpd = vedata->stl->wpd; DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; const bool use_matcap = (wpd->shading.light == V3D_LIGHTING_MATCAP); @@ -122,8 +122,8 @@ void workbench_opaque_cache_init(WORKBENCH_Data *vedata) BKE_studiolight_ensure_flag(wpd->studio_light, STUDIOLIGHT_MATCAP_DIFFUSE_GPUTEXTURE | STUDIOLIGHT_MATCAP_SPECULAR_GPUTEXTURE); - struct GPUTexture *diff_tx = wpd->studio_light->matcap_diffuse.gputexture; - struct GPUTexture *spec_tx = wpd->studio_light->matcap_specular.gputexture; + GPUTexture *diff_tx = wpd->studio_light->matcap_diffuse.gputexture; + GPUTexture *spec_tx = wpd->studio_light->matcap_specular.gputexture; const bool use_spec = workbench_is_specular_highlight_enabled(wpd); spec_tx = (use_spec && spec_tx) ? spec_tx : diff_tx; DRW_shgroup_uniform_texture(grp, "matcap_diffuse_tx", diff_tx); diff --git a/source/blender/draw/engines/workbench/workbench_render.c b/source/blender/draw/engines/workbench/workbench_render.c index 5718dbcf591..3cb9bd7cb2d 100644 --- a/source/blender/draw/engines/workbench/workbench_render.c +++ b/source/blender/draw/engines/workbench/workbench_render.c @@ -29,9 +29,9 @@ #include "workbench_private.h" static void workbench_render_cache(void *vedata, - struct Object *ob, - struct RenderEngine *UNUSED(engine), - struct Depsgraph *UNUSED(depsgraph)) + Object *ob, + RenderEngine *UNUSED(engine), + Depsgraph *UNUSED(depsgraph)) { workbench_cache_populate(vedata, ob); } @@ -39,7 +39,7 @@ static void workbench_render_cache(void *vedata, static void workbench_render_matrices_init(RenderEngine *engine, Depsgraph *depsgraph) { /* TODO(sergey): Shall render hold pointer to an evaluated camera instead? */ - struct Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, RE_GetCamera(engine->re)); + Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, RE_GetCamera(engine->re)); /* Set the perspective, view and window matrix. */ float winmat[4][4], viewmat[4][4], viewinv[4][4]; @@ -96,9 +96,7 @@ static bool workbench_render_framebuffers_init(void) return ok; } -static void workbench_render_result_z(struct RenderLayer *rl, - const char *viewname, - const rcti *rect) +static void workbench_render_result_z(RenderLayer *rl, const char *viewname, const rcti *rect) { DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get(); const DRWContextState *draw_ctx = DRW_context_state_get(); diff --git a/source/blender/draw/engines/workbench/workbench_shader.cc b/source/blender/draw/engines/workbench/workbench_shader.cc index b9abbc53da2..acb4883776a 100644 --- a/source/blender/draw/engines/workbench/workbench_shader.cc +++ b/source/blender/draw/engines/workbench/workbench_shader.cc @@ -24,31 +24,30 @@ enum eWORKBENCH_TextureType { }; static struct { - struct GPUShader - *opaque_prepass_sh_cache[GPU_SHADER_CFG_LEN][WORKBENCH_DATATYPE_MAX][TEXTURE_SH_MAX]; - struct GPUShader *transp_prepass_sh_cache[GPU_SHADER_CFG_LEN][WORKBENCH_DATATYPE_MAX] - [MAX_LIGHTING][TEXTURE_SH_MAX]; + GPUShader *opaque_prepass_sh_cache[GPU_SHADER_CFG_LEN][WORKBENCH_DATATYPE_MAX][TEXTURE_SH_MAX]; + GPUShader *transp_prepass_sh_cache[GPU_SHADER_CFG_LEN][WORKBENCH_DATATYPE_MAX][MAX_LIGHTING] + [TEXTURE_SH_MAX]; - struct GPUShader *opaque_composite_sh[MAX_LIGHTING]; - struct GPUShader *oit_resolve_sh; - struct GPUShader *outline_sh; - struct GPUShader *merge_infront_sh; + GPUShader *opaque_composite_sh[MAX_LIGHTING]; + GPUShader *oit_resolve_sh; + GPUShader *outline_sh; + GPUShader *merge_infront_sh; - struct GPUShader *shadow_depth_pass_sh[2]; - struct GPUShader *shadow_depth_fail_sh[2][2]; + GPUShader *shadow_depth_pass_sh[2]; + GPUShader *shadow_depth_fail_sh[2][2]; - struct GPUShader *cavity_sh[2][2]; + GPUShader *cavity_sh[2][2]; - struct GPUShader *dof_prepare_sh; - struct GPUShader *dof_downsample_sh; - struct GPUShader *dof_blur1_sh; - struct GPUShader *dof_blur2_sh; - struct GPUShader *dof_resolve_sh; + GPUShader *dof_prepare_sh; + GPUShader *dof_downsample_sh; + GPUShader *dof_blur1_sh; + GPUShader *dof_blur2_sh; + GPUShader *dof_resolve_sh; - struct GPUShader *aa_accum_sh; - struct GPUShader *smaa_sh[3]; + GPUShader *aa_accum_sh; + GPUShader *smaa_sh[3]; - struct GPUShader *volume_sh[2][2][3][2]; + GPUShader *volume_sh[2][2][3][2]; } e_data = {{{{nullptr}}}}; @@ -136,7 +135,7 @@ static GPUShader *workbench_shader_get_ex(WORKBENCH_PrivateData *wpd, eWORKBENCH_TextureType tex_type = workbench_texture_type_get(textured, tiled); int light = wpd->shading.light; BLI_assert(light < MAX_LIGHTING); - struct GPUShader **shader = + GPUShader **shader = (transp) ? &e_data.transp_prepass_sh_cache[wpd->sh_cfg][datatype][light][tex_type] : &e_data.opaque_prepass_sh_cache[wpd->sh_cfg][datatype][tex_type]; @@ -183,7 +182,7 @@ GPUShader *workbench_shader_transparent_image_get(WORKBENCH_PrivateData *wpd, GPUShader *workbench_shader_composite_get(WORKBENCH_PrivateData *wpd) { int light = wpd->shading.light; - struct GPUShader **shader = &e_data.opaque_composite_sh[light]; + GPUShader **shader = &e_data.opaque_composite_sh[light]; BLI_assert(light < MAX_LIGHTING); if (*shader == nullptr) { @@ -212,8 +211,8 @@ GPUShader *workbench_shader_transparent_resolve_get(WORKBENCH_PrivateData * /*wp static GPUShader *workbench_shader_shadow_pass_get_ex(bool depth_pass, bool manifold, bool cap) { - struct GPUShader **shader = (depth_pass) ? &e_data.shadow_depth_pass_sh[manifold] : - &e_data.shadow_depth_fail_sh[manifold][cap]; + GPUShader **shader = (depth_pass) ? &e_data.shadow_depth_pass_sh[manifold] : + &e_data.shadow_depth_fail_sh[manifold][cap]; if (*shader == nullptr) { std::string create_info_name = "workbench_shadow"; @@ -241,7 +240,7 @@ GPUShader *workbench_shader_shadow_fail_get(bool manifold, bool cap) GPUShader *workbench_shader_cavity_get(bool cavity, bool curvature) { BLI_assert(cavity || curvature); - struct GPUShader **shader = &e_data.cavity_sh[cavity][curvature]; + GPUShader **shader = &e_data.cavity_sh[cavity][curvature]; if (*shader == nullptr) { std::string create_info_name = "workbench_effect"; @@ -335,35 +334,35 @@ GPUShader *workbench_shader_volume_get(bool slice, void workbench_shader_free(void) { for (int j = 0; j < sizeof(e_data.opaque_prepass_sh_cache) / sizeof(void *); j++) { - struct GPUShader **sh_array = &e_data.opaque_prepass_sh_cache[0][0][0]; + GPUShader **sh_array = &e_data.opaque_prepass_sh_cache[0][0][0]; DRW_SHADER_FREE_SAFE(sh_array[j]); } for (int j = 0; j < sizeof(e_data.transp_prepass_sh_cache) / sizeof(void *); j++) { - struct GPUShader **sh_array = &e_data.transp_prepass_sh_cache[0][0][0][0]; + GPUShader **sh_array = &e_data.transp_prepass_sh_cache[0][0][0][0]; DRW_SHADER_FREE_SAFE(sh_array[j]); } for (int j = 0; j < ARRAY_SIZE(e_data.opaque_composite_sh); j++) { - struct GPUShader **sh_array = &e_data.opaque_composite_sh[0]; + GPUShader **sh_array = &e_data.opaque_composite_sh[0]; DRW_SHADER_FREE_SAFE(sh_array[j]); } for (int j = 0; j < ARRAY_SIZE(e_data.shadow_depth_pass_sh); j++) { - struct GPUShader **sh_array = &e_data.shadow_depth_pass_sh[0]; + GPUShader **sh_array = &e_data.shadow_depth_pass_sh[0]; DRW_SHADER_FREE_SAFE(sh_array[j]); } for (int j = 0; j < sizeof(e_data.shadow_depth_fail_sh) / sizeof(void *); j++) { - struct GPUShader **sh_array = &e_data.shadow_depth_fail_sh[0][0]; + GPUShader **sh_array = &e_data.shadow_depth_fail_sh[0][0]; DRW_SHADER_FREE_SAFE(sh_array[j]); } for (int j = 0; j < sizeof(e_data.cavity_sh) / sizeof(void *); j++) { - struct GPUShader **sh_array = &e_data.cavity_sh[0][0]; + GPUShader **sh_array = &e_data.cavity_sh[0][0]; DRW_SHADER_FREE_SAFE(sh_array[j]); } for (int j = 0; j < ARRAY_SIZE(e_data.smaa_sh); j++) { - struct GPUShader **sh_array = &e_data.smaa_sh[0]; + GPUShader **sh_array = &e_data.smaa_sh[0]; DRW_SHADER_FREE_SAFE(sh_array[j]); } for (int j = 0; j < sizeof(e_data.volume_sh) / sizeof(void *); j++) { - struct GPUShader **sh_array = &e_data.volume_sh[0][0][0][0]; + GPUShader **sh_array = &e_data.volume_sh[0][0][0][0]; DRW_SHADER_FREE_SAFE(sh_array[j]); } diff --git a/source/blender/draw/engines/workbench/workbench_shadow.c b/source/blender/draw/engines/workbench/workbench_shadow.c index 28e380aca5f..3e4894a3cf5 100644 --- a/source/blender/draw/engines/workbench/workbench_shadow.c +++ b/source/blender/draw/engines/workbench/workbench_shadow.c @@ -127,7 +127,7 @@ void workbench_shadow_cache_init(WORKBENCH_Data *data) { WORKBENCH_PassList *psl = data->psl; WORKBENCH_PrivateData *wpd = data->stl->wpd; - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; if (SHADOW_ENABLED(wpd)) { diff --git a/source/blender/draw/engines/workbench/workbench_transparent.c b/source/blender/draw/engines/workbench/workbench_transparent.c index 2b2fe319081..1700503622f 100644 --- a/source/blender/draw/engines/workbench/workbench_transparent.c +++ b/source/blender/draw/engines/workbench/workbench_transparent.c @@ -59,8 +59,8 @@ static void workbench_transparent_lighting_uniforms(WORKBENCH_PrivateData *wpd, BKE_studiolight_ensure_flag(wpd->studio_light, STUDIOLIGHT_MATCAP_DIFFUSE_GPUTEXTURE | STUDIOLIGHT_MATCAP_SPECULAR_GPUTEXTURE); - struct GPUTexture *diff_tx = wpd->studio_light->matcap_diffuse.gputexture; - struct GPUTexture *spec_tx = wpd->studio_light->matcap_specular.gputexture; + GPUTexture *diff_tx = wpd->studio_light->matcap_diffuse.gputexture; + GPUTexture *spec_tx = wpd->studio_light->matcap_specular.gputexture; const bool use_spec = workbench_is_specular_highlight_enabled(wpd); spec_tx = (use_spec && spec_tx) ? spec_tx : diff_tx; DRW_shgroup_uniform_texture(grp, "matcap_diffuse_tx", diff_tx); @@ -72,7 +72,7 @@ void workbench_transparent_cache_init(WORKBENCH_Data *vedata) { WORKBENCH_PassList *psl = vedata->psl; WORKBENCH_PrivateData *wpd = vedata->stl->wpd; - struct GPUShader *sh; + GPUShader *sh; DRWShadingGroup *grp; { diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 4f00e292862..98707cc98e4 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -890,7 +890,7 @@ GPUBatch *DRW_cache_object_face_wireframe_get(Object *ob) } } -GPUBatch *DRW_cache_object_loose_edges_get(struct Object *ob) +GPUBatch *DRW_cache_object_loose_edges_get(Object *ob) { switch (ob->type) { case OB_MESH: @@ -923,7 +923,7 @@ GPUVertBuf *DRW_cache_object_pos_vertbuf_get(Object *ob) } } -int DRW_cache_object_material_count_get(struct Object *ob) +int DRW_cache_object_material_count_get(Object *ob) { short type = ob->type; @@ -956,8 +956,8 @@ int DRW_cache_object_material_count_get(struct Object *ob) } } -GPUBatch **DRW_cache_object_surface_material_get(struct Object *ob, - struct GPUMaterial **gpumat_array, +GPUBatch **DRW_cache_object_surface_material_get(Object *ob, + GPUMaterial **gpumat_array, uint gpumat_array_len) { switch (ob->type) { @@ -2883,7 +2883,7 @@ GPUBatch *DRW_cache_mesh_surface_edges_get(Object *ob) } GPUBatch **DRW_cache_mesh_surface_shaded_get(Object *ob, - struct GPUMaterial **gpumat_array, + GPUMaterial **gpumat_array, uint gpumat_array_len) { BLI_assert(ob->type == OB_MESH); @@ -2947,21 +2947,21 @@ GPUBatch *DRW_cache_mesh_surface_viewer_attribute_get(Object *ob) GPUBatch *DRW_cache_curve_edge_wire_get(Object *ob) { BLI_assert(ob->type == OB_CURVES_LEGACY); - struct Curve *cu = ob->data; + Curve *cu = ob->data; return DRW_curve_batch_cache_get_wire_edge(cu); } GPUBatch *DRW_cache_curve_edge_wire_viewer_attribute_get(Object *ob) { BLI_assert(ob->type == OB_CURVES_LEGACY); - struct Curve *cu = ob->data; + Curve *cu = ob->data; return DRW_curve_batch_cache_get_wire_edge_viewer_attribute(cu); } GPUBatch *DRW_cache_curve_edge_normal_get(Object *ob) { BLI_assert(ob->type == OB_CURVES_LEGACY); - struct Curve *cu = ob->data; + Curve *cu = ob->data; return DRW_curve_batch_cache_get_normal_edge(cu); } @@ -2969,7 +2969,7 @@ GPUBatch *DRW_cache_curve_edge_overlay_get(Object *ob) { BLI_assert(ELEM(ob->type, OB_CURVES_LEGACY, OB_SURF)); - struct Curve *cu = ob->data; + Curve *cu = ob->data; return DRW_curve_batch_cache_get_edit_edges(cu); } @@ -2977,7 +2977,7 @@ GPUBatch *DRW_cache_curve_vert_overlay_get(Object *ob) { BLI_assert(ELEM(ob->type, OB_CURVES_LEGACY, OB_SURF)); - struct Curve *cu = ob->data; + Curve *cu = ob->data; return DRW_curve_batch_cache_get_edit_verts(cu); } @@ -2990,7 +2990,7 @@ GPUBatch *DRW_cache_curve_vert_overlay_get(Object *ob) GPUBatch *DRW_cache_text_edge_wire_get(Object *ob) { BLI_assert(ob->type == OB_FONT); - struct Curve *cu = ob->data; + Curve *cu = ob->data; return DRW_curve_batch_cache_get_wire_edge(cu); } @@ -3003,7 +3003,7 @@ GPUBatch *DRW_cache_text_edge_wire_get(Object *ob) GPUBatch *DRW_cache_surf_edge_wire_get(Object *ob) { BLI_assert(ob->type == OB_SURF); - struct Curve *cu = ob->data; + Curve *cu = ob->data; return DRW_curve_batch_cache_get_wire_edge(cu); } @@ -3017,7 +3017,7 @@ GPUBatch *DRW_cache_lattice_verts_get(Object *ob) { BLI_assert(ob->type == OB_LATTICE); - struct Lattice *lt = ob->data; + Lattice *lt = ob->data; return DRW_lattice_batch_cache_get_all_verts(lt); } @@ -3039,7 +3039,7 @@ GPUBatch *DRW_cache_lattice_vert_overlay_get(Object *ob) { BLI_assert(ob->type == OB_LATTICE); - struct Lattice *lt = ob->data; + Lattice *lt = ob->data; return DRW_lattice_batch_cache_get_edit_verts(lt); } diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.cc b/source/blender/draw/intern/draw_cache_extract_mesh.cc index 491cbdbd2db..7757ba0570f 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh.cc +++ b/source/blender/draw/intern/draw_cache_extract_mesh.cc @@ -459,15 +459,15 @@ static void extract_task_range_run(void *__restrict taskdata) /** \name Extract In Parallel Ranges * \{ */ -static struct TaskNode *extract_task_node_create(struct TaskGraph *task_graph, - const MeshRenderData *mr, - MeshBatchCache *cache, - ExtractorRunDatas *extractors, - MeshBufferList *mbuflist, - const bool use_threading) +static TaskNode *extract_task_node_create(TaskGraph *task_graph, + const MeshRenderData *mr, + MeshBatchCache *cache, + ExtractorRunDatas *extractors, + MeshBufferList *mbuflist, + const bool use_threading) { ExtractTaskData *taskdata = new ExtractTaskData(mr, cache, extractors, mbuflist, use_threading); - struct TaskNode *task_node = BLI_task_graph_node_create( + TaskNode *task_node = BLI_task_graph_node_create( task_graph, extract_task_range_run, taskdata, @@ -526,16 +526,16 @@ static void mesh_extract_render_data_node_exec(void *__restrict task_data) mesh_render_data_update_polys_sorted(mr, update_task_data->cache, data_flag); } -static struct TaskNode *mesh_extract_render_data_node_create(struct TaskGraph *task_graph, - MeshRenderData *mr, - MeshBufferCache *cache, - const eMRIterType iter_type, - const eMRDataType data_flag) +static TaskNode *mesh_extract_render_data_node_create(TaskGraph *task_graph, + MeshRenderData *mr, + MeshBufferCache *cache, + const eMRIterType iter_type, + const eMRDataType data_flag) { MeshRenderDataUpdateTaskData *task_data = new MeshRenderDataUpdateTaskData( mr, cache, iter_type, data_flag); - struct TaskNode *task_node = BLI_task_graph_node_create( + TaskNode *task_node = BLI_task_graph_node_create( task_graph, mesh_extract_render_data_node_exec, task_data, @@ -549,7 +549,7 @@ static struct TaskNode *mesh_extract_render_data_node_create(struct TaskGraph *t /** \name Extract Loop * \{ */ -void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, +void mesh_buffer_cache_create_requested(TaskGraph *task_graph, MeshBatchCache *cache, MeshBufferCache *mbc, Object *object, @@ -694,7 +694,7 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, eMRIterType iter_type = extractors.iter_types(); eMRDataType data_flag = extractors.data_types(); - struct TaskNode *task_node_mesh_render_data = mesh_extract_render_data_node_create( + TaskNode *task_node_mesh_render_data = mesh_extract_render_data_node_create( task_graph, mr, mbc, iter_type, data_flag); /* Simple heuristic. */ @@ -707,7 +707,7 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, if (!extractor->use_threading) { ExtractorRunDatas *single_threaded_extractors = new ExtractorRunDatas(); single_threaded_extractors->append(extractor); - struct TaskNode *task_node = extract_task_node_create( + TaskNode *task_node = extract_task_node_create( task_graph, mr, cache, single_threaded_extractors, mbuflist, false); BLI_task_graph_edge_create(task_node_mesh_render_data, task_node); @@ -718,7 +718,7 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, ExtractorRunDatas *multi_threaded_extractors = new ExtractorRunDatas(); extractors.filter_threaded_extractors_into(*multi_threaded_extractors); if (!multi_threaded_extractors->is_empty()) { - struct TaskNode *task_node = extract_task_node_create( + TaskNode *task_node = extract_task_node_create( task_graph, mr, cache, multi_threaded_extractors, mbuflist, true); BLI_task_graph_edge_create(task_node_mesh_render_data, task_node); @@ -731,7 +731,7 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph, else { /* Run all requests on the same thread. */ ExtractorRunDatas *extractors_copy = new ExtractorRunDatas(extractors); - struct TaskNode *task_node = extract_task_node_create( + TaskNode *task_node = extract_task_node_create( task_graph, mr, cache, extractors_copy, mbuflist, false); BLI_task_graph_edge_create(task_node_mesh_render_data, task_node); diff --git a/source/blender/draw/intern/draw_cache_impl_curve.cc b/source/blender/draw/intern/draw_cache_impl_curve.cc index a8433be362e..d3e7b452a10 100644 --- a/source/blender/draw/intern/draw_cache_impl_curve.cc +++ b/source/blender/draw/intern/draw_cache_impl_curve.cc @@ -836,7 +836,7 @@ int DRW_curve_material_count_get(Curve *cu) /** \name Grouped batch generation * \{ */ -void DRW_curve_batch_cache_create_requested(Object *ob, const struct Scene *scene) +void DRW_curve_batch_cache_create_requested(Object *ob, const Scene *scene) { BLI_assert(ELEM(ob->type, OB_CURVES_LEGACY, OB_SURF, OB_FONT)); diff --git a/source/blender/draw/intern/draw_cache_impl_lattice.c b/source/blender/draw/intern/draw_cache_impl_lattice.c index d4889817ee4..b462b7589cf 100644 --- a/source/blender/draw/intern/draw_cache_impl_lattice.c +++ b/source/blender/draw/intern/draw_cache_impl_lattice.c @@ -99,12 +99,12 @@ typedef struct LatticeRenderData { } dims; bool show_only_outside; - struct EditLatt *edit_latt; + EditLatt *edit_latt; BPoint *bp; int actbp; - const struct MDeformVert *dvert; + const MDeformVert *dvert; } LatticeRenderData; enum { diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.cc b/source/blender/draw/intern/draw_cache_impl_mesh.cc index 3fea3cde543..9bce77454c7 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.cc +++ b/source/blender/draw/intern/draw_cache_impl_mesh.cc @@ -273,7 +273,7 @@ static void mesh_cd_calc_active_mask_uv_layer(const Object *object, static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object, const Mesh *me, - struct GPUMaterial **gpumat_array, + GPUMaterial **gpumat_array, int gpumat_array_len, DRW_Attributes *attributes) { @@ -419,7 +419,7 @@ static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object, * \{ */ /** Reset the selection structure, deallocating heap memory as appropriate. */ -static void drw_mesh_weight_state_clear(struct DRW_MeshWeightState *wstate) +static void drw_mesh_weight_state_clear(DRW_MeshWeightState *wstate) { MEM_SAFE_FREE(wstate->defgroup_sel); MEM_SAFE_FREE(wstate->defgroup_locked); @@ -431,8 +431,8 @@ static void drw_mesh_weight_state_clear(struct DRW_MeshWeightState *wstate) } /** Copy selection data from one structure to another, including heap memory. */ -static void drw_mesh_weight_state_copy(struct DRW_MeshWeightState *wstate_dst, - const struct DRW_MeshWeightState *wstate_src) +static void drw_mesh_weight_state_copy(DRW_MeshWeightState *wstate_dst, + const DRW_MeshWeightState *wstate_src) { MEM_SAFE_FREE(wstate_dst->defgroup_sel); MEM_SAFE_FREE(wstate_dst->defgroup_locked); @@ -459,8 +459,8 @@ static bool drw_mesh_flags_equal(const bool *array1, const bool *array2, int siz } /** Compare two selection structures. */ -static bool drw_mesh_weight_state_compare(const struct DRW_MeshWeightState *a, - const struct DRW_MeshWeightState *b) +static bool drw_mesh_weight_state_compare(const DRW_MeshWeightState *a, + const DRW_MeshWeightState *b) { return a->defgroup_active == b->defgroup_active && a->defgroup_len == b->defgroup_len && a->flags == b->flags && a->alert_mode == b->alert_mode && @@ -470,11 +470,8 @@ static bool drw_mesh_weight_state_compare(const struct DRW_MeshWeightState *a, drw_mesh_flags_equal(a->defgroup_unlocked, b->defgroup_unlocked, a->defgroup_len); } -static void drw_mesh_weight_state_extract(Object *ob, - Mesh *me, - const ToolSettings *ts, - bool paint_mode, - struct DRW_MeshWeightState *wstate) +static void drw_mesh_weight_state_extract( + Object *ob, Mesh *me, const ToolSettings *ts, bool paint_mode, DRW_MeshWeightState *wstate) { /* Extract complete vertex weight group selection state and mode flags. */ memset(wstate, 0, sizeof(*wstate)); @@ -628,7 +625,7 @@ static MeshBatchCache *mesh_batch_cache_get(Mesh *me) } static void mesh_batch_cache_check_vertex_group(MeshBatchCache *cache, - const struct DRW_MeshWeightState *wstate) + const DRW_MeshWeightState *wstate) { if (!drw_mesh_weight_state_compare(&cache->weight_state, wstate)) { FOREACH_MESH_BUFFER_CACHE (cache, mbc) { @@ -958,7 +955,7 @@ GPUBatch *DRW_mesh_batch_cache_get_edit_mesh_analysis(Mesh *me) void DRW_mesh_get_attributes(Object *object, Mesh *me, - struct GPUMaterial **gpumat_array, + GPUMaterial **gpumat_array, int gpumat_array_len, DRW_Attributes *r_attrs, DRW_MeshCDMask *r_cd_needed) @@ -979,7 +976,7 @@ void DRW_mesh_get_attributes(Object *object, GPUBatch **DRW_mesh_batch_cache_get_surface_shaded(Object *object, Mesh *me, - struct GPUMaterial **gpumat_array, + GPUMaterial **gpumat_array, uint gpumat_array_len) { MeshBatchCache *cache = mesh_batch_cache_get(me); @@ -1336,7 +1333,7 @@ static void drw_mesh_batch_cache_check_available(struct TaskGraph *task_graph, M } #endif -void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph, +void DRW_mesh_batch_cache_create_requested(TaskGraph *task_graph, Object *ob, Mesh *me, const Scene *scene, @@ -1395,7 +1392,7 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph, if (batch_requested & MBC_SURFACE_WEIGHTS) { /* Check vertex weights. */ if ((cache->batch.surface_weights != nullptr) && (ts != nullptr)) { - struct DRW_MeshWeightState wstate; + DRW_MeshWeightState wstate; BLI_assert(ob->type == OB_MESH); drw_mesh_weight_state_extract(ob, me, ts, is_paint_mode, &wstate); mesh_batch_cache_check_vertex_group(cache, &wstate); diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index a6171f46e97..9d5871a6b1f 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -35,7 +35,7 @@ struct DRW_Global G_draw = {{{0}}}; static bool weight_ramp_custom = false; static ColorBand weight_ramp_copy; -static struct GPUTexture *DRW_create_weight_colorramp_texture(void); +static GPUTexture *DRW_create_weight_colorramp_texture(void); void DRW_globals_update(void) { diff --git a/source/blender/draw/intern/draw_curves.cc b/source/blender/draw/intern/draw_curves.cc index ab2e042df5e..671ba7ad183 100644 --- a/source/blender/draw/intern/draw_curves.cc +++ b/source/blender/draw/intern/draw_curves.cc @@ -50,7 +50,7 @@ BLI_INLINE eParticleRefineShaderType drw_curves_shader_type_get() } struct CurvesEvalCall { - struct CurvesEvalCall *next; + CurvesEvalCall *next; GPUVertBuf *vbo; DRWShadingGroup *shgrp; uint vert_len; diff --git a/source/blender/draw/intern/draw_fluid.c b/source/blender/draw/intern/draw_fluid.c index 717894d9d24..7ff9e99bc8a 100644 --- a/source/blender/draw/intern/draw_fluid.c +++ b/source/blender/draw/intern/draw_fluid.c @@ -86,7 +86,7 @@ static void create_flame_spectrum_texture(float *data) # undef FULL_ON_FIRE } -static void create_color_ramp(const struct ColorBand *coba, float *data) +static void create_color_ramp(const ColorBand *coba, float *data) { for (int i = 0; i < TFUNC_WIDTH; i++) { BKE_colorband_evaluate(coba, (float)i / TFUNC_WIDTH, &data[i * 4]); @@ -94,7 +94,7 @@ static void create_color_ramp(const struct ColorBand *coba, float *data) } } -static GPUTexture *create_transfer_function(int type, const struct ColorBand *coba) +static GPUTexture *create_transfer_function(int type, const ColorBand *coba) { float *data = (float *)MEM_mallocN(sizeof(float[4]) * TFUNC_WIDTH, __func__); diff --git a/source/blender/draw/intern/draw_hair.cc b/source/blender/draw/intern/draw_hair.cc index 4c618be7b58..63a78817d2d 100644 --- a/source/blender/draw/intern/draw_hair.cc +++ b/source/blender/draw/intern/draw_hair.cc @@ -53,7 +53,7 @@ BLI_INLINE eParticleRefineShaderType drw_hair_shader_type_get() } struct ParticleRefineCall { - struct ParticleRefineCall *next; + ParticleRefineCall *next; GPUVertBuf *vbo; DRWShadingGroup *shgrp; uint vert_len; diff --git a/source/blender/draw/intern/draw_instance_data.c b/source/blender/draw/intern/draw_instance_data.c index adb62f363dc..21eb4189116 100644 --- a/source/blender/draw/intern/draw_instance_data.c +++ b/source/blender/draw/intern/draw_instance_data.c @@ -37,14 +37,14 @@ #include "MEM_guardedalloc.h" struct DRWInstanceData { - struct DRWInstanceData *next; + DRWInstanceData *next; bool used; /* If this data is used or not. */ size_t data_size; /* Size of one instance data. */ BLI_mempool *mempool; }; struct DRWInstanceDataList { - struct DRWInstanceDataList *next, *prev; + DRWInstanceDataList *next, *prev; /* Linked lists for all possible data pool size */ DRWInstanceData *idata_head[MAX_INSTANCE_DATA_SIZE]; DRWInstanceData *idata_tail[MAX_INSTANCE_DATA_SIZE]; @@ -406,7 +406,7 @@ typedef struct DRWSparseUniformBuf { /* Memory buffers used to stage chunk data before transfer to UBOs. */ char **chunk_buffers; /* Uniform buffer objects with flushed data. */ - struct GPUUniformBuf **chunk_ubos; + GPUUniformBuf **chunk_ubos; /* True if the relevant chunk contains data (distinct from simply being allocated). */ BLI_bitmap *chunk_used; @@ -680,8 +680,7 @@ GPUUniformBuf *drw_ensure_layer_attribute_buffer(void) return data->vlattrs_ubo; } -DRWSparseUniformBuf *DRW_uniform_attrs_pool_find_ubo(GHash *table, - const struct GPUUniformAttrList *key) +DRWSparseUniformBuf *DRW_uniform_attrs_pool_find_ubo(GHash *table, const GPUUniformAttrList *key) { DRWUniformAttrBuf *buffer = BLI_ghash_lookup(table, key); return buffer ? &buffer->ubos : NULL; diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index eef5d841e78..1e989b1baf0 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -218,7 +218,7 @@ int DRW_object_visibility_in_active_context(const Object *ob) return BKE_object_visibility(ob, mode); } -bool DRW_object_use_hide_faces(const struct Object *ob) +bool DRW_object_use_hide_faces(const Object *ob) { if (ob->type == OB_MESH) { switch (ob->mode) { @@ -264,12 +264,12 @@ bool DRW_object_is_visible_psys_in_active_context(const Object *object, const Pa return true; } -struct Object *DRW_object_get_dupli_parent(const Object *UNUSED(ob)) +Object *DRW_object_get_dupli_parent(const Object *UNUSED(ob)) { return DST.dupli_parent; } -struct DupliObject *DRW_object_get_dupli(const Object *UNUSED(ob)) +DupliObject *DRW_object_get_dupli(const Object *UNUSED(ob)) { return DST.dupli_source; } @@ -1396,7 +1396,7 @@ void DRW_notify_view_update(const DRWUpdateContext *update_ctx) } /* update a viewport which belongs to a GPUOffscreen */ -static void drw_notify_view_update_offscreen(struct Depsgraph *depsgraph, +static void drw_notify_view_update_offscreen(Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, @@ -1657,7 +1657,7 @@ void DRW_draw_view(const bContext *C) } } -void DRW_draw_render_loop_ex(struct Depsgraph *depsgraph, +void DRW_draw_render_loop_ex(Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, @@ -1802,7 +1802,7 @@ void DRW_draw_render_loop_ex(struct Depsgraph *depsgraph, drw_manager_exit(&DST); } -void DRW_draw_render_loop(struct Depsgraph *depsgraph, +void DRW_draw_render_loop(Depsgraph *depsgraph, ARegion *region, View3D *v3d, GPUViewport *viewport) @@ -1816,7 +1816,7 @@ void DRW_draw_render_loop(struct Depsgraph *depsgraph, DRW_draw_render_loop_ex(depsgraph, engine_type, region, v3d, viewport, NULL); } -void DRW_draw_render_loop_offscreen(struct Depsgraph *depsgraph, +void DRW_draw_render_loop_offscreen(Depsgraph *depsgraph, RenderEngineType *engine_type, ARegion *region, View3D *v3d, @@ -1903,7 +1903,7 @@ bool DRW_render_check_grease_pencil(Depsgraph *depsgraph) } static void DRW_render_gpencil_to_image(RenderEngine *engine, - struct RenderLayer *render_layer, + RenderLayer *render_layer, const rcti *rect) { DrawEngineType *draw_engine = U.experimental.use_grease_pencil_version3 ? @@ -1916,7 +1916,7 @@ static void DRW_render_gpencil_to_image(RenderEngine *engine, } } -void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph) +void DRW_render_gpencil(RenderEngine *engine, Depsgraph *depsgraph) { /* This function should only be called if there are grease pencil objects, * especially important to avoid failing in background renders without OpenGL context. */ @@ -1982,7 +1982,7 @@ void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph DST.buffer_finish_called = false; } -void DRW_render_to_image(RenderEngine *engine, struct Depsgraph *depsgraph) +void DRW_render_to_image(RenderEngine *engine, Depsgraph *depsgraph) { Scene *scene = DEG_get_evaluated_scene(depsgraph); ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph); @@ -2074,8 +2074,8 @@ void DRW_render_to_image(RenderEngine *engine, struct Depsgraph *depsgraph) void DRW_render_object_iter( void *vedata, RenderEngine *engine, - struct Depsgraph *depsgraph, - void (*callback)(void *vedata, Object *ob, RenderEngine *engine, struct Depsgraph *depsgraph)) + Depsgraph *depsgraph, + void (*callback)(void *vedata, Object *ob, RenderEngine *engine, Depsgraph *depsgraph)) { const DRWContextState *draw_ctx = DRW_context_state_get(); DRW_pointcloud_init(); @@ -2115,7 +2115,7 @@ void DRW_render_object_iter( } void DRW_custom_pipeline(DrawEngineType *draw_engine_type, - struct Depsgraph *depsgraph, + Depsgraph *depsgraph, void (*callback)(void *vedata, void *user_data), void *user_data) { @@ -2181,7 +2181,7 @@ void DRW_cache_restart(void) DRW_smoke_init(DST.vmempool); } -void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph, +void DRW_draw_render_loop_2d_ex(Depsgraph *depsgraph, ARegion *region, GPUViewport *viewport, const bContext *evil_C) @@ -2340,8 +2340,8 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph, } static struct DRWSelectBuffer { - struct GPUFrameBuffer *framebuffer_depth_only; - struct GPUTexture *texture_depth; + GPUFrameBuffer *framebuffer_depth_only; + GPUTexture *texture_depth; } g_select_buffer = {NULL}; static void draw_select_framebuffer_depth_only_setup(const int size[2]) @@ -2385,7 +2385,7 @@ void DRW_render_set_time(RenderEngine *engine, Depsgraph *depsgraph, int frame, DST.draw_ctx.view_layer = DEG_get_evaluated_view_layer(depsgraph); } -void DRW_draw_select_loop(struct Depsgraph *depsgraph, +void DRW_draw_select_loop(Depsgraph *depsgraph, ARegion *region, View3D *v3d, bool use_obedit_skip, @@ -2636,7 +2636,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph, #endif /* USE_GPU_SELECT */ } -void DRW_draw_depth_loop(struct Depsgraph *depsgraph, +void DRW_draw_depth_loop(Depsgraph *depsgraph, ARegion *region, View3D *v3d, GPUViewport *viewport, @@ -2986,7 +2986,7 @@ bool DRW_state_is_opengl_render(void) bool DRW_state_is_playback(void) { if (DST.draw_ctx.evil_C != NULL) { - struct wmWindowManager *wm = CTX_wm_manager(DST.draw_ctx.evil_C); + wmWindowManager *wm = CTX_wm_manager(DST.draw_ctx.evil_C); return ED_screen_animation_playing(wm) != NULL; } return false; diff --git a/source/blender/draw/intern/draw_manager_shader.c b/source/blender/draw/intern/draw_manager_shader.c index d927bbb4dc1..5790cf185b6 100644 --- a/source/blender/draw/intern/draw_manager_shader.c +++ b/source/blender/draw/intern/draw_manager_shader.c @@ -486,7 +486,7 @@ GPUShader *DRW_shader_create_fullscreen_with_shaderlib_ex(const char *frag, } GPUMaterial *DRW_shader_from_world(World *wo, - struct bNodeTree *ntree, + bNodeTree *ntree, const uint64_t shader_id, const bool is_volume_shader, bool deferred, @@ -518,7 +518,7 @@ GPUMaterial *DRW_shader_from_world(World *wo, } GPUMaterial *DRW_shader_from_material(Material *ma, - struct bNodeTree *ntree, + bNodeTree *ntree, const uint64_t shader_id, const bool is_volume_shader, bool deferred, diff --git a/source/blender/draw/intern/draw_pbvh.cc b/source/blender/draw/intern/draw_pbvh.cc index 22caf5f176d..7de005b9c2c 100644 --- a/source/blender/draw/intern/draw_pbvh.cc +++ b/source/blender/draw/intern/draw_pbvh.cc @@ -1372,12 +1372,12 @@ GPUBatch *DRW_pbvh_lines_get(PBVHBatches *batches, return batch.lines; } -void DRW_pbvh_update_pre(struct PBVHBatches *batches, struct PBVH_GPU_Args *args) +void DRW_pbvh_update_pre(PBVHBatches *batches, PBVH_GPU_Args *args) { batches->update_pre(args); } -int drw_pbvh_material_index_get(struct PBVHBatches *batches) +int drw_pbvh_material_index_get(PBVHBatches *batches) { return batches->material_index; } diff --git a/source/blender/draw/intern/draw_select_buffer.c b/source/blender/draw/intern/draw_select_buffer.c index 43107b7a61c..40d96698860 100644 --- a/source/blender/draw/intern/draw_select_buffer.c +++ b/source/blender/draw/intern/draw_select_buffer.c @@ -33,11 +33,8 @@ /** \name Buffer of select ID's * \{ */ -uint *DRW_select_buffer_read(struct Depsgraph *depsgraph, - struct ARegion *region, - struct View3D *v3d, - const rcti *rect, - uint *r_buf_len) +uint *DRW_select_buffer_read( + Depsgraph *depsgraph, ARegion *region, View3D *v3d, const rcti *rect, uint *r_buf_len) { uint *r_buf = NULL; uint buf_len = 0; @@ -54,7 +51,7 @@ uint *DRW_select_buffer_read(struct Depsgraph *depsgraph, * Some GPUs have problems reading pixels off limits. */ rcti rect_clamp = *rect; if (BLI_rcti_isect(&r, &rect_clamp, &rect_clamp)) { - struct SELECTID_Context *select_ctx = DRW_select_engine_context_get(); + SELECTID_Context *select_ctx = DRW_select_engine_context_get(); DRW_opengl_context_enable(); /* Update the drawing. */ @@ -107,13 +104,10 @@ uint *DRW_select_buffer_read(struct Depsgraph *depsgraph, * * \{ */ -uint *DRW_select_buffer_bitmap_from_rect(struct Depsgraph *depsgraph, - struct ARegion *region, - struct View3D *v3d, - const rcti *rect, - uint *r_bitmap_len) +uint *DRW_select_buffer_bitmap_from_rect( + Depsgraph *depsgraph, ARegion *region, View3D *v3d, const rcti *rect, uint *r_bitmap_len) { - struct SELECTID_Context *select_ctx = DRW_select_engine_context_get(); + SELECTID_Context *select_ctx = DRW_select_engine_context_get(); rcti rect_px = *rect; rect_px.xmax += 1; @@ -146,14 +140,14 @@ uint *DRW_select_buffer_bitmap_from_rect(struct Depsgraph *depsgraph, return bitmap_buf; } -uint *DRW_select_buffer_bitmap_from_circle(struct Depsgraph *depsgraph, - struct ARegion *region, - struct View3D *v3d, +uint *DRW_select_buffer_bitmap_from_circle(Depsgraph *depsgraph, + ARegion *region, + View3D *v3d, const int center[2], const int radius, uint *r_bitmap_len) { - struct SELECTID_Context *select_ctx = DRW_select_engine_context_get(); + SELECTID_Context *select_ctx = DRW_select_engine_context_get(); const rcti rect = { .xmin = center[0] - radius, @@ -210,15 +204,15 @@ static void drw_select_mask_px_cb(int x, int x_end, int y, void *user_data) } while (++x != x_end); } -uint *DRW_select_buffer_bitmap_from_poly(struct Depsgraph *depsgraph, - struct ARegion *region, - struct View3D *v3d, +uint *DRW_select_buffer_bitmap_from_poly(Depsgraph *depsgraph, + ARegion *region, + View3D *v3d, const int poly[][2], const int poly_len, const rcti *rect, uint *r_bitmap_len) { - struct SELECTID_Context *select_ctx = DRW_select_engine_context_get(); + SELECTID_Context *select_ctx = DRW_select_engine_context_get(); rcti rect_px = *rect; rect_px.xmax += 1; @@ -278,9 +272,9 @@ uint *DRW_select_buffer_bitmap_from_poly(struct Depsgraph *depsgraph, * * \{ */ -uint DRW_select_buffer_sample_point(struct Depsgraph *depsgraph, - struct ARegion *region, - struct View3D *v3d, +uint DRW_select_buffer_sample_point(Depsgraph *depsgraph, + ARegion *region, + View3D *v3d, const int center[2]) { uint ret = 0; @@ -323,9 +317,9 @@ static bool select_buffer_test_fn(const void *__restrict value, void *__restrict return false; } -uint DRW_select_buffer_find_nearest_to_point(struct Depsgraph *depsgraph, - struct ARegion *region, - struct View3D *v3d, +uint DRW_select_buffer_find_nearest_to_point(Depsgraph *depsgraph, + ARegion *region, + View3D *v3d, const int center[2], const uint id_min, const uint id_max, @@ -378,7 +372,7 @@ bool DRW_select_buffer_elem_get(const uint sel_id, uint *r_base_index, char *r_elem_type) { - struct SELECTID_Context *select_ctx = DRW_select_engine_context_get(); + SELECTID_Context *select_ctx = DRW_select_engine_context_get(); char elem_type = 0; uint elem_id = 0; @@ -426,7 +420,7 @@ uint DRW_select_buffer_context_offset_for_object_elem(Depsgraph *depsgraph, Object *object, char elem_type) { - struct SELECTID_Context *select_ctx = DRW_select_engine_context_get(); + SELECTID_Context *select_ctx = DRW_select_engine_context_get(); Object *ob_eval = DEG_get_evaluated_object(depsgraph, object); @@ -460,7 +454,7 @@ uint DRW_select_buffer_context_offset_for_object_elem(Depsgraph *depsgraph, void DRW_select_buffer_context_create(Base **bases, const uint bases_len, short select_mode) { - struct SELECTID_Context *select_ctx = DRW_select_engine_context_get(); + SELECTID_Context *select_ctx = DRW_select_engine_context_get(); select_ctx->objects = MEM_reallocN(select_ctx->objects, sizeof(*select_ctx->objects) * bases_len); diff --git a/source/blender/draw/intern/draw_shader.cc b/source/blender/draw/intern/draw_shader.cc index 1d81fd5eb59..a9ffb0476fa 100644 --- a/source/blender/draw/intern/draw_shader.cc +++ b/source/blender/draw/intern/draw_shader.cc @@ -21,13 +21,13 @@ extern "C" char datatoc_common_hair_lib_glsl[]; extern "C" char datatoc_common_hair_refine_vert_glsl[]; static struct { - struct GPUShader *hair_refine_sh[PART_REFINE_MAX_SHADER]; - struct GPUShader *debug_print_display_sh; - struct GPUShader *debug_draw_display_sh; - struct GPUShader *draw_visibility_compute_sh; - struct GPUShader *draw_view_finalize_sh; - struct GPUShader *draw_resource_finalize_sh; - struct GPUShader *draw_command_generate_sh; + GPUShader *hair_refine_sh[PART_REFINE_MAX_SHADER]; + GPUShader *debug_print_display_sh; + GPUShader *debug_draw_display_sh; + GPUShader *draw_visibility_compute_sh; + GPUShader *draw_view_finalize_sh; + GPUShader *draw_resource_finalize_sh; + GPUShader *draw_command_generate_sh; } e_data = {{nullptr}}; /* -------------------------------------------------------------------- */ diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc index e5d40387984..6b529d64cd7 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc @@ -133,7 +133,7 @@ static void extract_edituv_tris_iter_subdiv_mesh(const DRWSubdivCache * /*subdiv edituv_tri_add(data, mp_hidden, mp_select, loop_idx, loop_idx + 2, loop_idx + 3); } -static void extract_edituv_tris_finish_subdiv(const struct DRWSubdivCache * /*subdiv_cache*/, +static void extract_edituv_tris_finish_subdiv(const DRWSubdivCache * /*subdiv_cache*/, const MeshRenderData * /*mr*/, MeshBatchCache * /*cache*/, void *buf, @@ -316,7 +316,7 @@ static void extract_edituv_lines_iter_subdiv_mesh(const DRWSubdivCache *subdiv_c } } -static void extract_edituv_lines_finish_subdiv(const struct DRWSubdivCache * /*subdiv_cache*/, +static void extract_edituv_lines_finish_subdiv(const DRWSubdivCache * /*subdiv_cache*/, const MeshRenderData * /*mr*/, MeshBatchCache * /*cache*/, void *buf, @@ -470,7 +470,7 @@ static void extract_edituv_points_iter_subdiv_mesh(const DRWSubdivCache *subdiv_ } } -static void extract_edituv_points_finish_subdiv(const struct DRWSubdivCache * /*subdiv_cache*/, +static void extract_edituv_points_finish_subdiv(const DRWSubdivCache * /*subdiv_cache*/, const MeshRenderData * /*mr*/, MeshBatchCache * /*cache*/, void *buf, diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc index 60d7bbf4c48..e62d4d0f07e 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines.cc @@ -323,7 +323,7 @@ static void extract_lines_with_lines_loose_finish(const MeshRenderData *mr, extract_lines_loose_subbuffer(mr, cache); } -static void extract_lines_with_lines_loose_finish_subdiv(const struct DRWSubdivCache *subdiv_cache, +static void extract_lines_with_lines_loose_finish_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData * /*mr*/, MeshBatchCache *cache, void * /*buf*/, diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc index e587de286b6..ff2f758f272 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_paint_mask.cc @@ -150,7 +150,7 @@ static void extract_lines_paint_mask_iter_subdiv_mesh(const DRWSubdivCache *subd } } -static void extract_lines_paint_mask_finish_subdiv(const struct DRWSubdivCache * /*subdiv_cache*/, +static void extract_lines_paint_mask_finish_subdiv(const DRWSubdivCache * /*subdiv_cache*/, const MeshRenderData *mr, MeshBatchCache *cache, void *buf, diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc index 69f079b4971..50f419a7451 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc @@ -47,7 +47,7 @@ static void extract_tris_iter_poly_bm(const MeshRenderData *mr, GPUIndexBufBuilder *elb = static_cast(_data); int tri_first_index_real = poly_to_tri_count(f_index, BM_elem_index_get(f->l_first)); - struct BMLoop *(*looptris)[3] = mr->edit_bmesh->looptris; + BMLoop *(*looptris)[3] = mr->edit_bmesh->looptris; int tri_len = f->len - 2; for (int offs = 0; offs < tri_len; offs++) { BMLoop **elt = looptris[tri_first_index_real + offs]; diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_mesh_analysis.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_mesh_analysis.cc index 8beb26d78f6..72dd2b85a9e 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_mesh_analysis.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_mesh_analysis.cc @@ -163,8 +163,8 @@ static void statvis_calc_thickness(const MeshRenderData *mr, float *r_thickness) BMesh *bm = em->bm; BM_mesh_elem_index_ensure(bm, BM_FACE); - struct BMBVHTree *bmtree = BKE_bmbvh_new_from_editmesh(em, 0, nullptr, false); - struct BMLoop *(*looptris)[3] = em->looptris; + BMBVHTree *bmtree = BKE_bmbvh_new_from_editmesh(em, 0, nullptr, false); + BMLoop *(*looptris)[3] = em->looptris; for (int i = 0; i < mr->tri_len; i++) { BMLoop **ltri = looptris[i]; const int index = BM_elem_index_get(ltri[0]->f); @@ -269,7 +269,7 @@ struct BVHTree_OverlapData { static bool bvh_overlap_cb(void *userdata, int index_a, int index_b, int /*thread*/) { - struct BVHTree_OverlapData *data = static_cast(userdata); + BVHTree_OverlapData *data = static_cast(userdata); if (UNLIKELY(data->looptri_polys[index_a] == data->looptri_polys[index_b])) { return false; @@ -314,7 +314,7 @@ static void statvis_calc_intersect(const MeshRenderData *mr, float *r_intersect) BM_mesh_elem_index_ensure(bm, BM_FACE); - struct BMBVHTree *bmtree = BKE_bmbvh_new_from_editmesh(em, 0, nullptr, false); + BMBVHTree *bmtree = BKE_bmbvh_new_from_editmesh(em, 0, nullptr, false); BVHTreeOverlap *overlap = BKE_bmbvh_overlap_self(bmtree, &overlap_len); if (overlap) { @@ -343,7 +343,7 @@ static void statvis_calc_intersect(const MeshRenderData *mr, float *r_intersect) BVHTree *tree = BKE_bvhtree_from_mesh_get(&treeData, mr->me, BVHTREE_FROM_LOOPTRI, 4); - struct BVHTree_OverlapData data = {}; + BVHTree_OverlapData data = {}; data.positions = mr->vert_positions; data.corner_verts = mr->corner_verts; data.looptris = mr->looptris; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 2ca2b58cdfa..d2ea35900de 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -900,7 +900,7 @@ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *f BKE_fcurve_free(fcu); } -bool ANIM_remove_empty_action_from_animdata(struct AnimData *adt) +bool ANIM_remove_empty_action_from_animdata(AnimData *adt) { if (adt->action != NULL) { bAction *act = adt->action; @@ -2782,9 +2782,9 @@ static bool animchannels_select_filter_poll(bContext *C) return ELEM(area->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA); } -static int animchannels_select_filter_invoke(struct bContext *C, - struct wmOperator *op, - const struct wmEvent *UNUSED(event)) +static int animchannels_select_filter_invoke(bContext *C, + wmOperator *op, + const wmEvent *UNUSED(event)) { ScrArea *area = CTX_wm_area(C); ARegion *region_ctx = CTX_wm_region(C); diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 85675072bd8..78a2c476b43 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -560,7 +560,7 @@ float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag return 1.0f; } -static bool find_prev_next_keyframes(struct bContext *C, int *r_nextfra, int *r_prevfra) +static bool find_prev_next_keyframes(bContext *C, int *r_nextfra, int *r_prevfra) { Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); @@ -657,7 +657,7 @@ static bool find_prev_next_keyframes(struct bContext *C, int *r_nextfra, int *r_ return false; } -void ANIM_center_frame(struct bContext *C, int smooth_viewtx) +void ANIM_center_frame(bContext *C, int smooth_viewtx) { ARegion *region = CTX_wm_region(C); Scene *scene = CTX_data_scene(C); diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index c5dc0f5c738..7570fca4d78 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -423,7 +423,7 @@ static void draw_marker_name(const uchar *text_color, const int icon_half_width = UI_ICON_SIZE * 0.6; const struct uiFontStyleDraw_Params fs_params = {.align = UI_STYLE_TEXT_LEFT, .word_wrap = 0}; - const struct rcti rect = { + const rcti rect = { .xmin = marker_x + icon_half_width, .xmax = xmax - icon_half_width, .ymin = text_y, diff --git a/source/blender/editors/animation/anim_motion_paths.c b/source/blender/editors/animation/anim_motion_paths.c index 9be3c984f40..9960bd2ff75 100644 --- a/source/blender/editors/animation/anim_motion_paths.c +++ b/source/blender/editors/animation/anim_motion_paths.c @@ -57,7 +57,7 @@ typedef struct MPathTarget { /* ........ */ /* update scene for current frame */ -static void motionpaths_calc_update_scene(struct Depsgraph *depsgraph) +static void motionpaths_calc_update_scene(Depsgraph *depsgraph) { BKE_scene_graph_update_for_newframe(depsgraph); } diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 156a9f521ef..67e0220a5dd 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -89,9 +89,9 @@ FCurve *verify_driver_fcurve(ID *id, return fcu; } -struct FCurve *alloc_driver_fcurve(const char rna_path[], - const int array_index, - eDriverFCurveCreationMode creation_mode) +FCurve *alloc_driver_fcurve(const char rna_path[], + const int array_index, + eDriverFCurveCreationMode creation_mode) { FCurve *fcu = BKE_fcurve_create(); @@ -796,7 +796,7 @@ bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace) /* -------------------------------------------------- */ -void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const char *var_name) +void ANIM_copy_as_driver(ID *target_id, const char *target_path, const char *var_name) { /* Clear copy/paste buffer first (for consistency with other copy/paste buffers). */ ANIM_drivers_copybuf_free(); diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 0498fda517b..17cd9f85c4e 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -44,7 +44,7 @@ #include "DEG_depsgraph.h" -typedef void (*PanelDrawFn)(const bContext *, struct Panel *); +typedef void (*PanelDrawFn)(const bContext *, Panel *); static void fmodifier_panel_header(const bContext *C, Panel *panel); /* -------------------------------------------------------------------- */ diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index f819571f5e7..695329af915 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -612,7 +612,7 @@ static AnimKeylistDrawListElem *ed_keylist_draw_list_add_elem( /* *************************** Channel Drawing Functions *************************** */ -void draw_summary_channel(struct AnimKeylistDrawList *draw_list, +void draw_summary_channel(AnimKeylistDrawList *draw_list, bAnimContext *ac, float ypos, float yscale_fac, diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 22a061b70fc..92570925f02 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -90,7 +90,7 @@ bool duplicate_fcurve_keys(FCurve *fcu) /** \name Various Tools * \{ */ -void clean_fcurve(struct bAnimContext *ac, bAnimListElem *ale, float thresh, bool cleardefault) +void clean_fcurve(bAnimContext *ac, bAnimListElem *ale, float thresh, bool cleardefault) { FCurve *fcu = (FCurve *)ale->key_data; BezTriple *old_bezts, *bezt, *beztn; diff --git a/source/blender/editors/animation/keyframes_keylist.cc b/source/blender/editors/animation/keyframes_keylist.cc index c8d73609e8d..b7d098171c7 100644 --- a/source/blender/editors/animation/keyframes_keylist.cc +++ b/source/blender/editors/animation/keyframes_keylist.cc @@ -279,7 +279,7 @@ const ActKeyColumn *ED_keylist_find_any_between(const AnimKeylist *keylist, return column; } -const ActKeyColumn *ED_keylist_array(const struct AnimKeylist *keylist) +const ActKeyColumn *ED_keylist_array(const AnimKeylist *keylist) { BLI_assert_msg( keylist->is_runtime_initialized, @@ -287,17 +287,17 @@ const ActKeyColumn *ED_keylist_array(const struct AnimKeylist *keylist) return keylist->runtime.key_columns.data(); } -int64_t ED_keylist_array_len(const struct AnimKeylist *keylist) +int64_t ED_keylist_array_len(const AnimKeylist *keylist) { return keylist->column_len; } -bool ED_keylist_is_empty(const struct AnimKeylist *keylist) +bool ED_keylist_is_empty(const AnimKeylist *keylist) { return keylist->column_len == 0; } -const struct ListBase *ED_keylist_listbase(const AnimKeylist *keylist) +const ListBase *ED_keylist_listbase(const AnimKeylist *keylist) { if (keylist->is_runtime_initialized) { return &keylist->runtime.list_wrapper; @@ -305,9 +305,9 @@ const struct ListBase *ED_keylist_listbase(const AnimKeylist *keylist) return &keylist->key_columns; } -static void keylist_first_last(const struct AnimKeylist *keylist, - const struct ActKeyColumn **first_column, - const struct ActKeyColumn **last_column) +static void keylist_first_last(const AnimKeylist *keylist, + const ActKeyColumn **first_column, + const ActKeyColumn **last_column) { if (keylist->is_runtime_initialized) { *first_column = keylist->runtime.key_columns.data(); @@ -319,7 +319,7 @@ static void keylist_first_last(const struct AnimKeylist *keylist, } } -bool ED_keylist_all_keys_frame_range(const struct AnimKeylist *keylist, Range2f *r_frame_range) +bool ED_keylist_all_keys_frame_range(const AnimKeylist *keylist, Range2f *r_frame_range) { BLI_assert(r_frame_range); @@ -336,8 +336,7 @@ bool ED_keylist_all_keys_frame_range(const struct AnimKeylist *keylist, Range2f return true; } -bool ED_keylist_selected_keys_frame_range(const struct AnimKeylist *keylist, - Range2f *r_frame_range) +bool ED_keylist_selected_keys_frame_range(const AnimKeylist *keylist, Range2f *r_frame_range) { BLI_assert(r_frame_range); diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 6aed5ec28c0..f2a16f6a33e 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -161,7 +161,7 @@ bAction *ED_id_action_ensure(Main *bmain, ID *id) return adt->action; } -FCurve *ED_action_fcurve_find(struct bAction *act, const char rna_path[], const int array_index) +FCurve *ED_action_fcurve_find(bAction *act, const char rna_path[], const int array_index) { /* Sanity checks. */ if (ELEM(NULL, act, rna_path)) { @@ -170,10 +170,10 @@ FCurve *ED_action_fcurve_find(struct bAction *act, const char rna_path[], const return BKE_fcurve_find(&act->curves, rna_path, array_index); } -FCurve *ED_action_fcurve_ensure(struct Main *bmain, - struct bAction *act, +FCurve *ED_action_fcurve_ensure(Main *bmain, + bAction *act, const char group[], - struct PointerRNA *ptr, + PointerRNA *ptr, const char rna_path[], const int array_index) { @@ -1170,11 +1170,11 @@ static float *get_keyframe_values(ReportList *reports, PointerRNA ptr, PropertyRNA *prop, int index, - struct NlaKeyframingContext *nla_context, + NlaKeyframingContext *nla_context, eInsertKeyFlags flag, float *buffer, int buffer_size, - const struct AnimationEvalContext *anim_eval_context, + const AnimationEvalContext *anim_eval_context, int *r_count, bool *r_force_all, BLI_bitmap **r_successful_remaps) @@ -1303,7 +1303,7 @@ bool insert_keyframe_direct(ReportList *reports, FCurve *fcu, const AnimationEvalContext *anim_eval_context, eBezTriple_KeyframeType keytype, - struct NlaKeyframingContext *nla_context, + NlaKeyframingContext *nla_context, eInsertKeyFlags flag) { float curval = 0.0f; diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 9997ec51372..fc5d99ed085 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -312,7 +312,7 @@ static bPoseChannel *pchan_duplicate_map(const bPose *pose, return pchan_dst; } -void postEditBoneDuplicate(struct ListBase *editbones, Object *ob) +void postEditBoneDuplicate(ListBase *editbones, Object *ob) { if (ob->pose == NULL) { return; diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index cbf357973fb..996befac76c 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -907,7 +907,7 @@ bool ED_armature_edit_deselect_all_visible(Object *obedit) return changed; } -bool ED_armature_edit_deselect_all_multi_ex(struct Base **bases, uint bases_len) +bool ED_armature_edit_deselect_all_multi_ex(Base **bases, uint bases_len) { bool changed_multi = false; for (uint base_index = 0; base_index < bases_len; base_index++) { @@ -917,7 +917,7 @@ bool ED_armature_edit_deselect_all_multi_ex(struct Base **bases, uint bases_len) return changed_multi; } -bool ED_armature_edit_deselect_all_visible_multi_ex(struct Base **bases, uint bases_len) +bool ED_armature_edit_deselect_all_visible_multi_ex(Base **bases, uint bases_len) { bool changed_multi = false; for (uint base_index = 0; base_index < bases_len; base_index++) { diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 5460e416ef9..3e640311eb9 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -60,7 +60,7 @@ void ED_armature_edit_sync_selection(ListBase *edbo) } } -void ED_armature_edit_validate_active(struct bArmature *arm) +void ED_armature_edit_validate_active(bArmature *arm) { EditBone *ebone = arm->act_edbone; @@ -561,7 +561,7 @@ static EditBone *find_ebone_link(ListBase *edbo, Bone *link) return NULL; } -EditBone *make_boneList(ListBase *edbo, ListBase *bones, struct Bone *actBone) +EditBone *make_boneList(ListBase *edbo, ListBase *bones, Bone *actBone) { BLI_assert(!edbo->first && !edbo->last); @@ -786,7 +786,7 @@ void ED_armature_from_edit(Main *bmain, bArmature *arm) DEG_id_tag_update(&arm->id, 0); } -void ED_armature_edit_free(struct bArmature *arm) +void ED_armature_edit_free(bArmature *arm) { EditBone *eBone; diff --git a/source/blender/editors/armature/editarmature_undo.cc b/source/blender/editors/armature/editarmature_undo.cc index 39cf42d77a8..95fcad9886a 100644 --- a/source/blender/editors/armature/editarmature_undo.cc +++ b/source/blender/editors/armature/editarmature_undo.cc @@ -120,7 +120,7 @@ static Object *editarm_object_from_context(bContext *C) * \{ */ typedef struct ArmatureUndoStep_Elem { - struct ArmatureUndoStep_Elem *next, *prev; + ArmatureUndoStep_Elem *next, *prev; UndoRefID_Object obedit_ref; UndoArmature data; } ArmatureUndoStep_Elem; @@ -136,7 +136,7 @@ static bool armature_undosys_poll(bContext *C) return editarm_object_from_context(C) != nullptr; } -static bool armature_undosys_step_encode(struct bContext *C, struct Main *bmain, UndoStep *us_p) +static bool armature_undosys_step_encode(bContext *C, Main *bmain, UndoStep *us_p) { ArmatureUndoStep *us = (ArmatureUndoStep *)us_p; @@ -168,11 +168,8 @@ static bool armature_undosys_step_encode(struct bContext *C, struct Main *bmain, return true; } -static void armature_undosys_step_decode(struct bContext *C, - struct Main *bmain, - UndoStep *us_p, - const eUndoStepDir /*dir*/, - bool /*is_final*/) +static void armature_undosys_step_decode( + bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir /*dir*/, bool /*is_final*/) { ArmatureUndoStep *us = (ArmatureUndoStep *)us_p; diff --git a/source/blender/editors/armature/meshlaplacian.cc b/source/blender/editors/armature/meshlaplacian.cc index 9e7cbb6d519..366f1feb1f0 100644 --- a/source/blender/editors/armature/meshlaplacian.cc +++ b/source/blender/editors/armature/meshlaplacian.cc @@ -374,7 +374,7 @@ typedef struct BVHCallbackUserData { static void bvh_callback(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) { - BVHCallbackUserData *data = (struct BVHCallbackUserData *)userdata; + BVHCallbackUserData *data = (BVHCallbackUserData *)userdata; const MLoopTri *lt = &data->sys->heat.mlooptri[index]; const blender::Span corner_verts = data->sys->heat.corner_verts; float(*verts)[3] = data->sys->heat.verts; @@ -882,7 +882,7 @@ typedef struct MDefBoundIsect { } MDefBoundIsect; typedef struct MDefBindInfluence { - struct MDefBindInfluence *next; + MDefBindInfluence *next; float weight; int vertex; } MDefBindInfluence; @@ -998,7 +998,7 @@ static MDefBoundIsect *meshdeform_ray_tree_intersect(MeshDeformBind *mdb, { BVHTreeRayHit hit; MeshDeformIsect isect_mdef; - struct MeshRayCallbackData data = { + MeshRayCallbackData data = { mdb, &isect_mdef, }; diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index e1c64ce5708..70eaad8233d 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -80,7 +80,7 @@ Object *ED_pose_object_from_context(bContext *C) return ob; } -bool ED_object_posemode_enter_ex(struct Main *bmain, Object *ob) +bool ED_object_posemode_enter_ex(Main *bmain, Object *ob) { BLI_assert(BKE_id_is_editable(bmain, &ob->id)); bool ok = false; @@ -103,7 +103,7 @@ bool ED_object_posemode_enter_ex(struct Main *bmain, Object *ob) bool ED_object_posemode_enter(bContext *C, Object *ob) { ReportList *reports = CTX_wm_reports(C); - struct Main *bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); if (!BKE_id_is_editable(bmain, &ob->id)) { BKE_report(reports, RPT_WARNING, "Cannot pose libdata"); return false; @@ -115,7 +115,7 @@ bool ED_object_posemode_enter(bContext *C, Object *ob) return ok; } -bool ED_object_posemode_exit_ex(struct Main *bmain, Object *ob) +bool ED_object_posemode_exit_ex(Main *bmain, Object *ob) { bool ok = false; if (ob) { @@ -130,7 +130,7 @@ bool ED_object_posemode_exit_ex(struct Main *bmain, Object *ob) } bool ED_object_posemode_exit(bContext *C, Object *ob) { - struct Main *bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); bool ok = ED_object_posemode_exit_ex(bmain, ob); if (ok) { WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, NULL); @@ -430,9 +430,9 @@ static int pose_clear_paths_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static char *pose_clear_paths_description(struct bContext *UNUSED(C), - struct wmOperatorType *UNUSED(ot), - struct PointerRNA *ptr) +static char *pose_clear_paths_description(bContext *UNUSED(C), + wmOperatorType *UNUSED(ot), + PointerRNA *ptr) { const bool only_selected = RNA_boolean_get(ptr, "only_selected"); if (only_selected) { @@ -861,7 +861,7 @@ static int pose_bone_layers_exec(bContext *C, wmOperator *op) /* Make sure that the pose bone data is up to date. * (May not always be the case after undo/redo e.g.). */ - struct Main *bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); wmWindow *win = CTX_wm_window(C); View3D *v3d = CTX_wm_view3d(C); /* This may be NULL in a lot of cases. */ const Scene *scene = WM_window_get_active_scene(win); diff --git a/source/blender/editors/armature/pose_lib_2.c b/source/blender/editors/armature/pose_lib_2.c index 13c7ea4fbc8..01a10f0f7c2 100644 --- a/source/blender/editors/armature/pose_lib_2.c +++ b/source/blender/editors/armature/pose_lib_2.c @@ -179,7 +179,7 @@ static void poselib_blend_apply(bContext *C, wmOperator *op) } /* Perform the actual blending. */ - struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); + Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); AnimationEvalContext anim_eval_context = BKE_animsys_eval_context_construct(depsgraph, 0.0f); bAction *to_blend = poselib_action_to_blend(pbd); BKE_pose_apply_action_blend(pbd->ob, to_blend, &anim_eval_context, pbd->blend_factor); diff --git a/source/blender/editors/asset/intern/asset_indexer.cc b/source/blender/editors/asset/intern/asset_indexer.cc index 22d8f643278..b67c443080c 100644 --- a/source/blender/editors/asset/intern/asset_indexer.cc +++ b/source/blender/editors/asset/intern/asset_indexer.cc @@ -548,10 +548,10 @@ struct AssetLibraryIndex { if (!BLI_is_dir(index_path)) { return; } - struct direntry *dir_entries = nullptr; + direntry *dir_entries = nullptr; const int dir_entries_num = BLI_filelist_dir_contents(index_path, &dir_entries); for (int i = 0; i < dir_entries_num; i++) { - struct direntry *entry = &dir_entries[i]; + direntry *entry = &dir_entries[i]; if (BLI_str_endswith(entry->relname, ".index.json")) { preexisting_file_indices.add_as(std::string(entry->path)); } diff --git a/source/blender/editors/asset/intern/asset_mark_clear.cc b/source/blender/editors/asset/intern/asset_mark_clear.cc index 8d3e92f25f5..e4fb8aee404 100644 --- a/source/blender/editors/asset/intern/asset_mark_clear.cc +++ b/source/blender/editors/asset/intern/asset_mark_clear.cc @@ -72,7 +72,7 @@ bool ED_asset_clear_id(ID *id) return true; } -void ED_assets_pre_save(struct Main *bmain) +void ED_assets_pre_save(Main *bmain) { ID *id; FOREACH_MAIN_ID_BEGIN (bmain, id) { diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc index 61405aa683c..74530538e3c 100644 --- a/source/blender/editors/asset/intern/asset_ops.cc +++ b/source/blender/editors/asset/intern/asset_ops.cc @@ -351,9 +351,9 @@ static bool asset_clear_poll(bContext *C) return true; } -static char *asset_clear_get_description(struct bContext * /*C*/, - struct wmOperatorType * /*op*/, - struct PointerRNA *values) +static char *asset_clear_get_description(bContext * /*C*/, + wmOperatorType * /*op*/, + PointerRNA *values) { const bool set_fake_user = RNA_boolean_get(values, "set_fake_user"); if (!set_fake_user) { @@ -426,7 +426,7 @@ static int asset_library_refresh_exec(bContext *C, wmOperator * /*unused*/) * used for the asset-view template. Once the asset list design is used by the Asset Browser, this * can be simplified to just that case. */ -static void ASSET_OT_library_refresh(struct wmOperatorType *ot) +static void ASSET_OT_library_refresh(wmOperatorType *ot) { /* identifiers */ ot->name = "Refresh Asset Library"; @@ -460,7 +460,7 @@ static bool asset_catalog_operator_poll(bContext *C) static int asset_catalog_new_exec(bContext *C, wmOperator *op) { SpaceFile *sfile = CTX_wm_space_file(C); - struct AssetLibrary *asset_library = ED_fileselect_active_asset_library_get(sfile); + AssetLibrary *asset_library = ED_fileselect_active_asset_library_get(sfile); char *parent_path = RNA_string_get_alloc(op->ptr, "parent_path", nullptr, 0, nullptr); blender::asset_system::AssetCatalog *new_catalog = ED_asset_catalog_add( @@ -478,7 +478,7 @@ static int asset_catalog_new_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static void ASSET_OT_catalog_new(struct wmOperatorType *ot) +static void ASSET_OT_catalog_new(wmOperatorType *ot) { /* identifiers */ ot->name = "New Asset Catalog"; @@ -500,7 +500,7 @@ static void ASSET_OT_catalog_new(struct wmOperatorType *ot) static int asset_catalog_delete_exec(bContext *C, wmOperator *op) { SpaceFile *sfile = CTX_wm_space_file(C); - struct AssetLibrary *asset_library = ED_fileselect_active_asset_library_get(sfile); + AssetLibrary *asset_library = ED_fileselect_active_asset_library_get(sfile); char *catalog_id_str = RNA_string_get_alloc(op->ptr, "catalog_id", nullptr, 0, nullptr); asset_system::CatalogID catalog_id; if (!BLI_uuid_parse_string(&catalog_id, catalog_id_str)) { @@ -517,7 +517,7 @@ static int asset_catalog_delete_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static void ASSET_OT_catalog_delete(struct wmOperatorType *ot) +static void ASSET_OT_catalog_delete(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Asset Catalog"; @@ -562,7 +562,7 @@ static bool asset_catalog_undo_poll(bContext *C) return catalog_service && catalog_service->is_undo_possbile(); } -static void ASSET_OT_catalog_undo(struct wmOperatorType *ot) +static void ASSET_OT_catalog_undo(wmOperatorType *ot) { /* identifiers */ ot->name = "Undo Catalog Edits"; @@ -592,7 +592,7 @@ static bool asset_catalog_redo_poll(bContext *C) return catalog_service && catalog_service->is_redo_possbile(); } -static void ASSET_OT_catalog_redo(struct wmOperatorType *ot) +static void ASSET_OT_catalog_redo(wmOperatorType *ot) { /* identifiers */ ot->name = "Redo Catalog Edits"; @@ -620,7 +620,7 @@ static bool asset_catalog_undo_push_poll(bContext *C) return get_catalog_service(C) != nullptr; } -static void ASSET_OT_catalog_undo_push(struct wmOperatorType *ot) +static void ASSET_OT_catalog_undo_push(wmOperatorType *ot) { /* identifiers */ ot->name = "Store undo snapshot for asset catalog edits"; @@ -670,7 +670,7 @@ static int asset_catalogs_save_exec(bContext *C, wmOperator * /*op*/) return OPERATOR_FINISHED; } -static void ASSET_OT_catalogs_save(struct wmOperatorType *ot) +static void ASSET_OT_catalogs_save(wmOperatorType *ot) { /* identifiers */ ot->name = "Save Asset Catalogs"; @@ -687,10 +687,10 @@ static void ASSET_OT_catalogs_save(struct wmOperatorType *ot) /* -------------------------------------------------------------------- */ static bool could_be_asset_bundle(const Main *bmain); -static const bUserAssetLibrary *selected_asset_library(struct wmOperator *op); -static bool is_contained_in_selected_asset_library(struct wmOperator *op, const char *filepath); -static bool set_filepath_for_asset_lib(const Main *bmain, struct wmOperator *op); -static bool has_external_files(Main *bmain, struct ReportList *reports); +static const bUserAssetLibrary *selected_asset_library(wmOperator *op); +static bool is_contained_in_selected_asset_library(wmOperator *op, const char *filepath); +static bool set_filepath_for_asset_lib(const Main *bmain, wmOperator *op); +static bool has_external_files(Main *bmain, ReportList *reports); static bool asset_bundle_install_poll(bContext *C) { @@ -709,7 +709,7 @@ static bool asset_bundle_install_poll(bContext *C) } /* Check whether this file is already located inside any asset library. */ - const struct bUserAssetLibrary *asset_lib = BKE_preferences_asset_library_containing_path( + const bUserAssetLibrary *asset_lib = BKE_preferences_asset_library_containing_path( &U, bmain->filepath); if (asset_lib) { return false; @@ -718,9 +718,7 @@ static bool asset_bundle_install_poll(bContext *C) return true; } -static int asset_bundle_install_invoke(struct bContext *C, - struct wmOperator *op, - const struct wmEvent * /*event*/) +static int asset_bundle_install_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/) { Main *bmain = CTX_data_main(C); if (has_external_files(bmain, op->reports)) { @@ -806,7 +804,7 @@ static const EnumPropertyItem *rna_asset_library_reference_itemf(bContext * /*C* return items; } -static void ASSET_OT_bundle_install(struct wmOperatorType *ot) +static void ASSET_OT_bundle_install(wmOperatorType *ot) { /* identifiers */ ot->name = "Copy to Asset Library"; @@ -841,7 +839,7 @@ static bool could_be_asset_bundle(const Main *bmain) return fnmatch("*_bundle.blend", bmain->filepath, FNM_CASEFOLD) == 0; } -static const bUserAssetLibrary *selected_asset_library(struct wmOperator *op) +static const bUserAssetLibrary *selected_asset_library(wmOperator *op) { const int enum_value = RNA_enum_get(op->ptr, "asset_library_ref"); const AssetLibraryReference lib_ref = ED_asset_library_reference_from_enum_value(enum_value); @@ -850,7 +848,7 @@ static const bUserAssetLibrary *selected_asset_library(struct wmOperator *op) return lib; } -static bool is_contained_in_selected_asset_library(struct wmOperator *op, const char *filepath) +static bool is_contained_in_selected_asset_library(wmOperator *op, const char *filepath) { const bUserAssetLibrary *lib = selected_asset_library(op); if (!lib) { @@ -863,7 +861,7 @@ static bool is_contained_in_selected_asset_library(struct wmOperator *op, const * Set the "filepath" RNA property based on selected "asset_library_ref". * \return true if ok, false if error. */ -static bool set_filepath_for_asset_lib(const Main *bmain, struct wmOperator *op) +static bool set_filepath_for_asset_lib(const Main *bmain, wmOperator *op) { /* Find the directory path of the selected asset library. */ const bUserAssetLibrary *lib = selected_asset_library(op); @@ -885,7 +883,7 @@ static bool set_filepath_for_asset_lib(const Main *bmain, struct wmOperator *op) } struct FileCheckCallbackInfo { - struct ReportList *reports; + ReportList *reports; Set external_files; }; @@ -906,9 +904,9 @@ static bool external_file_check_callback(BPathForeachPathData *bpath_data, * * \return true when there are external files, false otherwise. */ -static bool has_external_files(Main *bmain, struct ReportList *reports) +static bool has_external_files(Main *bmain, ReportList *reports) { - struct FileCheckCallbackInfo callback_info = {reports, Set()}; + FileCheckCallbackInfo callback_info = {reports, Set()}; eBPathForeachFlag flag = static_cast( BKE_BPATH_FOREACH_PATH_SKIP_PACKED /* Packed files are fine. */ diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 5ac02d9c82b..3680bdc3147 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -5635,8 +5635,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event) if (use_proj) { const float mval[2] = {UNPACK2(event->mval)}; - struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create(vc.scene, - 0); + SnapObjectContext *snap_context = ED_transform_snap_object_context_create(vc.scene, 0); ED_transform_snap_object_project_view3d( snap_context, diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index d11096c225a..617a38fe4f5 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -338,9 +338,7 @@ static void curve_draw_stroke_from_operator(wmOperator *op) /** \name Operator Callbacks & Helpers * \{ */ -static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), - ARegion *UNUSED(region), - void *arg) +static void curve_draw_stroke_3d(const bContext *UNUSED(C), ARegion *UNUSED(region), void *arg) { wmOperator *op = arg; struct CurveDrawData *cdd = op->customdata; diff --git a/source/blender/editors/curve/editcurve_pen.c b/source/blender/editors/curve/editcurve_pen.c index 82b529e74ee..cad4a26c585 100644 --- a/source/blender/editors/curve/editcurve_pen.c +++ b/source/blender/editors/curve/editcurve_pen.c @@ -1130,7 +1130,7 @@ static void extrude_points_from_selected_vertices(const ViewContext *vc, * Check if a spline segment is nearby. */ static bool is_spline_nearby(ViewContext *vc, - struct wmOperator *op, + wmOperator *op, const wmEvent *event, const float sel_dist) { diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c index 5b74d0ccd48..69fa57d6421 100644 --- a/source/blender/editors/curve/editcurve_select.c +++ b/source/blender/editors/curve/editcurve_select.c @@ -253,7 +253,7 @@ bool ED_curve_deselect_all_multi_ex(Base **bases, int bases_len) return changed_multi; } -bool ED_curve_deselect_all_multi(struct bContext *C) +bool ED_curve_deselect_all_multi(bContext *C) { Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); ViewContext vc; diff --git a/source/blender/editors/curve/editcurve_undo.cc b/source/blender/editors/curve/editcurve_undo.cc index 60849cb197a..6e6ccb57958 100644 --- a/source/blender/editors/curve/editcurve_undo.cc +++ b/source/blender/editors/curve/editcurve_undo.cc @@ -200,7 +200,7 @@ static bool curve_undosys_poll(bContext *C) return (obedit != nullptr); } -static bool curve_undosys_step_encode(struct bContext *C, struct Main *bmain, UndoStep *us_p) +static bool curve_undosys_step_encode(bContext *C, Main *bmain, UndoStep *us_p) { CurveUndoStep *us = (CurveUndoStep *)us_p; @@ -232,11 +232,8 @@ static bool curve_undosys_step_encode(struct bContext *C, struct Main *bmain, Un return true; } -static void curve_undosys_step_decode(struct bContext *C, - struct Main *bmain, - UndoStep *us_p, - const eUndoStepDir /*dir*/, - bool /*is_final*/) +static void curve_undosys_step_decode( + bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir /*dir*/, bool /*is_final*/) { CurveUndoStep *us = (CurveUndoStep *)us_p; diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 4a4118cbf63..d370b422b8a 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -481,7 +481,7 @@ static bool font_paste_wchar(Object *obedit, const char32_t *str, const size_t str_len, /* optional */ - struct CharInfo *str_info) + CharInfo *str_info) { Curve *cu = obedit->data; EditFont *ef = cu->editfont; @@ -663,7 +663,7 @@ static void txt_add_object(bContext *C, Curve *cu; Object *obedit; Object *object; - const struct TextLine *tmp; + const TextLine *tmp; int nchars = 0, nbytes = 0; char *s; int a; @@ -1901,7 +1901,7 @@ static int font_selection_set_modal(bContext *C, wmOperator *UNUSED(op), const w return OPERATOR_RUNNING_MODAL; } -void FONT_OT_selection_set(struct wmOperatorType *ot) +void FONT_OT_selection_set(wmOperatorType *ot) { /* identifiers */ ot->name = "Set Selection"; @@ -2233,7 +2233,7 @@ static void font_open_cancel(bContext *UNUSED(C), wmOperator *op) static int font_open_exec(bContext *C, wmOperator *op) { - struct Main *bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); VFont *font; PropertyPointerRNA *pprop; PointerRNA idptr; diff --git a/source/blender/editors/curve/editfont_undo.c b/source/blender/editors/curve/editfont_undo.c index cbad8e67361..bd6d74b57da 100644 --- a/source/blender/editors/curve/editfont_undo.c +++ b/source/blender/editors/curve/editfont_undo.c @@ -54,7 +54,7 @@ static CLG_LogRef LOG = {"ed.undo.font"}; typedef struct UndoFont { char32_t *textbuf; - struct CharInfo *textbufinfo; + CharInfo *textbufinfo; int len, pos, selstart, selend; @@ -342,7 +342,7 @@ static bool font_undosys_poll(bContext *C) return editfont_object_from_context(C) != NULL; } -static bool font_undosys_step_encode(struct bContext *C, struct Main *bmain, UndoStep *us_p) +static bool font_undosys_step_encode(bContext *C, Main *bmain, UndoStep *us_p) { FontUndoStep *us = (FontUndoStep *)us_p; us->obedit_ref.ptr = editfont_object_from_context(C); @@ -355,8 +355,8 @@ static bool font_undosys_step_encode(struct bContext *C, struct Main *bmain, Und return true; } -static void font_undosys_step_decode(struct bContext *C, - struct Main *bmain, +static void font_undosys_step_decode(bContext *C, + Main *bmain, UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final)) diff --git a/source/blender/editors/gizmo_library/gizmo_library_utils.c b/source/blender/editors/gizmo_library/gizmo_library_utils.c index c08b3d7d6ac..01a5f9856a5 100644 --- a/source/blender/editors/gizmo_library/gizmo_library_utils.c +++ b/source/blender/editors/gizmo_library/gizmo_library_utils.c @@ -163,12 +163,8 @@ void gizmo_color_get(const wmGizmo *gz, const bool highlight, float r_col[4]) /* -------------------------------------------------------------------- */ -bool gizmo_window_project_2d(bContext *C, - const struct wmGizmo *gz, - const float mval[2], - int axis, - bool use_offset, - float r_co[2]) +bool gizmo_window_project_2d( + bContext *C, const wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2]) { float mat[4][4], imat[4][4]; { @@ -213,7 +209,7 @@ bool gizmo_window_project_2d(bContext *C, } bool gizmo_window_project_3d( - bContext *C, const struct wmGizmo *gz, const float mval[2], bool use_offset, float r_co[3]) + bContext *C, const wmGizmo *gz, const float mval[2], bool use_offset, float r_co[3]) { float mat[4][4], imat[4][4]; { @@ -255,7 +251,7 @@ bool gizmo_window_project_3d( * \{ */ /* Based on 'rna_GizmoProperties_find_operator'. */ -wmGizmo *gizmo_find_from_properties(const struct IDProperty *properties, +wmGizmo *gizmo_find_from_properties(const IDProperty *properties, const int spacetype, const int regionid) { diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c index f8a864dbb0d..09d35eb2642 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c @@ -77,7 +77,7 @@ typedef struct MoveInteraction { } prev; /* We could have other snap contexts, for now only support 3D view. */ - struct SnapObjectContext *snap_context_v3d; + SnapObjectContext *snap_context_v3d; } MoveInteraction; diff --git a/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c index 2a41a30439b..6b754c830b7 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/primitive3d_gizmo.c @@ -62,45 +62,43 @@ static PrimitiveGizmo3D *gizmo_primitive_rna_find_operator(PointerRNA *ptr) return (PrimitiveGizmo3D *)gizmo_find_from_properties(ptr->data, SPACE_TYPE_ANY, RGN_TYPE_ANY); } -static int gizmo_primitive_rna__draw_style_get_fn(struct PointerRNA *ptr, - struct PropertyRNA *UNUSED(prop)) +static int gizmo_primitive_rna__draw_style_get_fn(PointerRNA *ptr, PropertyRNA *UNUSED(prop)) { PrimitiveGizmo3D *gz_prim = gizmo_primitive_rna_find_operator(ptr); return gz_prim->draw_style; } -static void gizmo_primitive_rna__draw_style_set_fn(struct PointerRNA *ptr, - struct PropertyRNA *UNUSED(prop), +static void gizmo_primitive_rna__draw_style_set_fn(PointerRNA *ptr, + PropertyRNA *UNUSED(prop), int value) { PrimitiveGizmo3D *gz_prim = gizmo_primitive_rna_find_operator(ptr); gz_prim->draw_style = value; } -static float gizmo_primitive_rna__arc_inner_factor_get_fn(struct PointerRNA *ptr, - struct PropertyRNA *UNUSED(prop)) +static float gizmo_primitive_rna__arc_inner_factor_get_fn(PointerRNA *ptr, + PropertyRNA *UNUSED(prop)) { PrimitiveGizmo3D *gz_prim = gizmo_primitive_rna_find_operator(ptr); return gz_prim->arc_inner_factor; } -static void gizmo_primitive_rna__arc_inner_factor_set_fn(struct PointerRNA *ptr, - struct PropertyRNA *UNUSED(prop), +static void gizmo_primitive_rna__arc_inner_factor_set_fn(PointerRNA *ptr, + PropertyRNA *UNUSED(prop), float value) { PrimitiveGizmo3D *gz_prim = gizmo_primitive_rna_find_operator(ptr); gz_prim->arc_inner_factor = value; } -static bool gizmo_primitive_rna__draw_inner_get_fn(struct PointerRNA *ptr, - struct PropertyRNA *UNUSED(prop)) +static bool gizmo_primitive_rna__draw_inner_get_fn(PointerRNA *ptr, PropertyRNA *UNUSED(prop)) { PrimitiveGizmo3D *gz_prim = gizmo_primitive_rna_find_operator(ptr); return gz_prim->draw_inner; } -static void gizmo_primitive_rna__draw_inner_set_fn(struct PointerRNA *ptr, - struct PropertyRNA *UNUSED(prop), +static void gizmo_primitive_rna__draw_inner_set_fn(PointerRNA *ptr, + PropertyRNA *UNUSED(prop), bool value) { PrimitiveGizmo3D *gz_prim = gizmo_primitive_rna_find_operator(ptr); diff --git a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c index 7205d498fb7..5e1d9a37fd1 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c @@ -51,7 +51,7 @@ SnapObjectContext *ED_gizmotypes_snap_3d_context_ensure(Scene *scene, wmGizmo *U return ED_view3d_cursor_snap_context_ensure(scene); } -void ED_gizmotypes_snap_3d_flag_set(struct wmGizmo *gz, int flag) +void ED_gizmotypes_snap_3d_flag_set(wmGizmo *gz, int flag) { V3DSnapCursorState *snap_state = ((SnapGizmo3D *)gz)->snap_state; snap_state->flag |= flag; @@ -63,7 +63,7 @@ bool ED_gizmotypes_snap_3d_is_enabled(const wmGizmo *UNUSED(gz)) return snap_data->is_enabled; } -void ED_gizmotypes_snap_3d_data_get(const struct bContext *C, +void ED_gizmotypes_snap_3d_data_get(const bContext *C, wmGizmo *gz, float r_loc[3], float r_nor[3], @@ -111,7 +111,7 @@ static SnapGizmo3D *gizmo_snap_rna_find_operator(PointerRNA *ptr) return (SnapGizmo3D *)gizmo_find_from_properties(ptr->data, SPACE_VIEW3D, RGN_TYPE_WINDOW); } -static V3DSnapCursorState *gizmo_snap_state_from_rna_get(struct PointerRNA *ptr) +static V3DSnapCursorState *gizmo_snap_state_from_rna_get(PointerRNA *ptr) { SnapGizmo3D *snap_gizmo = gizmo_snap_rna_find_operator(ptr); if (snap_gizmo) { @@ -121,8 +121,8 @@ static V3DSnapCursorState *gizmo_snap_state_from_rna_get(struct PointerRNA *ptr) return ED_view3d_cursor_snap_state_active_get(); } -static void gizmo_snap_rna_prevpoint_get_fn(struct PointerRNA *ptr, - struct PropertyRNA *UNUSED(prop), +static void gizmo_snap_rna_prevpoint_get_fn(PointerRNA *ptr, + PropertyRNA *UNUSED(prop), float *values) { V3DSnapCursorState *snap_state = gizmo_snap_state_from_rna_get(ptr); @@ -131,40 +131,40 @@ static void gizmo_snap_rna_prevpoint_get_fn(struct PointerRNA *ptr, } } -static void gizmo_snap_rna_prevpoint_set_fn(struct PointerRNA *ptr, - struct PropertyRNA *UNUSED(prop), +static void gizmo_snap_rna_prevpoint_set_fn(PointerRNA *ptr, + PropertyRNA *UNUSED(prop), const float *values) { V3DSnapCursorState *snap_state = gizmo_snap_state_from_rna_get(ptr); ED_view3d_cursor_snap_state_prevpoint_set(snap_state, values); } -static void gizmo_snap_rna_location_get_fn(struct PointerRNA *UNUSED(ptr), - struct PropertyRNA *UNUSED(prop), +static void gizmo_snap_rna_location_get_fn(PointerRNA *UNUSED(ptr), + PropertyRNA *UNUSED(prop), float *values) { V3DSnapCursorData *snap_data = ED_view3d_cursor_snap_data_get(); copy_v3_v3(values, snap_data->loc); } -static void gizmo_snap_rna_location_set_fn(struct PointerRNA *UNUSED(ptr), - struct PropertyRNA *UNUSED(prop), +static void gizmo_snap_rna_location_set_fn(PointerRNA *UNUSED(ptr), + PropertyRNA *UNUSED(prop), const float *values) { V3DSnapCursorData *snap_data = ED_view3d_cursor_snap_data_get(); copy_v3_v3(snap_data->loc, values); } -static void gizmo_snap_rna_normal_get_fn(struct PointerRNA *UNUSED(ptr), - struct PropertyRNA *UNUSED(prop), +static void gizmo_snap_rna_normal_get_fn(PointerRNA *UNUSED(ptr), + PropertyRNA *UNUSED(prop), float *values) { V3DSnapCursorData *snap_data = ED_view3d_cursor_snap_data_get(); copy_v3_v3(values, snap_data->nor); } -static void gizmo_snap_rna_snap_elem_index_get_fn(struct PointerRNA *UNUSED(ptr), - struct PropertyRNA *UNUSED(prop), +static void gizmo_snap_rna_snap_elem_index_get_fn(PointerRNA *UNUSED(ptr), + PropertyRNA *UNUSED(prop), int *values) { V3DSnapCursorData *snap_data = ED_view3d_cursor_snap_data_get(); diff --git a/source/blender/editors/gpencil_legacy/annotate_paint.c b/source/blender/editors/gpencil_legacy/annotate_paint.c index bd496e1c763..7f9b07b54ba 100644 --- a/source/blender/editors/gpencil_legacy/annotate_paint.c +++ b/source/blender/editors/gpencil_legacy/annotate_paint.c @@ -99,7 +99,7 @@ typedef struct tGPsdata { Main *bmain; /** current scene from context. */ Scene *scene; - struct Depsgraph *depsgraph; + Depsgraph *depsgraph; /** window where painting originated. */ wmWindow *win; diff --git a/source/blender/editors/gpencil_legacy/gpencil_bake_animation.cc b/source/blender/editors/gpencil_legacy/gpencil_bake_animation.cc index 5a5b3c5820d..0245ebd209e 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_bake_animation.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_bake_animation.cc @@ -66,9 +66,7 @@ const EnumPropertyItem rna_gpencil_reproject_type_items[] = { }; /* Check frame_end is always > start frame! */ -static void gpencil_bake_set_frame_end(struct Main * /*main*/, - struct Scene * /*scene*/, - struct PointerRNA *ptr) +static void gpencil_bake_set_frame_end(Main * /*main*/, Scene * /*scene*/, PointerRNA *ptr) { int frame_start = RNA_int_get(ptr, "frame_start"); int frame_end = RNA_int_get(ptr, "frame_end"); @@ -97,7 +95,7 @@ static bool gpencil_bake_grease_pencil_animation_poll(bContext *C) } struct GpBakeOb { - struct GpBakeOb *next, *prev; + GpBakeOb *next, *prev; Object *ob; }; diff --git a/source/blender/editors/gpencil_legacy/gpencil_convert.c b/source/blender/editors/gpencil_legacy/gpencil_convert.c index c39edf2d786..14d7b3d8460 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_convert.c +++ b/source/blender/editors/gpencil_legacy/gpencil_convert.c @@ -1267,7 +1267,7 @@ static void gpencil_layer_to_curve(bContext *C, const bool link_strokes, tGpTimingData *gtd) { - struct Main *bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); ViewLayer *view_layer = CTX_data_view_layer(C); Collection *collection = CTX_data_collection(C); Scene *scene = CTX_data_scene(C); @@ -1454,9 +1454,9 @@ static bool gpencil_convert_check_has_valid_timing(bContext *C, bGPDlayer *gpl, } /* Check end_frame is always > start frame! */ -static void gpencil_convert_set_end_frame(struct Main *UNUSED(main), - struct Scene *UNUSED(scene), - struct PointerRNA *ptr) +static void gpencil_convert_set_end_frame(Main *UNUSED(main), + Scene *UNUSED(scene), + PointerRNA *ptr) { int start_frame = RNA_int_get(ptr, "start_frame"); int end_frame = RNA_int_get(ptr, "end_frame"); diff --git a/source/blender/editors/gpencil_legacy/gpencil_edit.c b/source/blender/editors/gpencil_legacy/gpencil_edit.c index a701180eb01..4375924c713 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_edit.c +++ b/source/blender/editors/gpencil_legacy/gpencil_edit.c @@ -5752,7 +5752,7 @@ void GPENCIL_OT_stroke_cutter(wmOperatorType *ot) RNA_def_boolean(ot->srna, "flat_caps", 0, "Flat Caps", ""); } -bool ED_object_gpencil_exit(struct Main *bmain, Object *ob) +bool ED_object_gpencil_exit(Main *bmain, Object *ob) { bool ok = false; if (ob) { diff --git a/source/blender/editors/gpencil_legacy/gpencil_fill.c b/source/blender/editors/gpencil_legacy/gpencil_fill.c index 32ceabef8aa..2b1b8889136 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_fill.c +++ b/source/blender/editors/gpencil_legacy/gpencil_fill.c @@ -99,38 +99,38 @@ typedef struct tStroke { /* Temporary fill operation data `op->customdata`. */ typedef struct tGPDfill { bContext *C; - struct Main *bmain; - struct Depsgraph *depsgraph; + Main *bmain; + Depsgraph *depsgraph; /** window where painting originated */ - struct wmWindow *win; + wmWindow *win; /** current scene from context */ - struct Scene *scene; + Scene *scene; /** current active gp object */ - struct Object *ob; + Object *ob; /** area where painting originated */ - struct ScrArea *area; + ScrArea *area; /** region where painting originated */ - struct RegionView3D *rv3d; + RegionView3D *rv3d; /** view3 where painting originated */ - struct View3D *v3d; + View3D *v3d; /** region where painting originated */ - struct ARegion *region; + ARegion *region; /** Current GP data-block. */ - struct bGPdata *gpd; + bGPdata *gpd; /** current material */ - struct Material *mat; + Material *mat; /** current brush */ - struct Brush *brush; + Brush *brush; /** layer */ - struct bGPDlayer *gpl; + bGPDlayer *gpl; /** frame */ - struct bGPDframe *gpf; + bGPDframe *gpf; /** Temp mouse position stroke. */ - struct bGPDstroke *gps_mouse; + bGPDstroke *gps_mouse; /** Pointer to report messages. */ - struct ReportList *reports; + ReportList *reports; /** For operations that require occlusion testing. */ - struct ViewDepths *depths; + ViewDepths *depths; /** flags */ int flag; /** avoid too fast events */ @@ -212,8 +212,8 @@ typedef struct tGPDfill { } tGPDfill; bool skip_layer_check(short fill_layer_mode, int gpl_active_index, int gpl_index); -static void gpencil_draw_boundary_lines(const struct bContext *UNUSED(C), struct tGPDfill *tgpf); -static void gpencil_fill_status_indicators(struct tGPDfill *tgpf); +static void gpencil_draw_boundary_lines(const bContext *UNUSED(C), tGPDfill *tgpf); +static void gpencil_fill_status_indicators(tGPDfill *tgpf); /* Free temp stroke array. */ static void stroke_array_free(tGPDfill *tgpf) diff --git a/source/blender/editors/gpencil_legacy/gpencil_interpolate.c b/source/blender/editors/gpencil_legacy/gpencil_interpolate.c index 204b83cf83b..1f79267f7c2 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_interpolate.c +++ b/source/blender/editors/gpencil_legacy/gpencil_interpolate.c @@ -60,40 +60,40 @@ typedef struct tGPDinterpolate_layer { struct tGPDinterpolate_layer *next, *prev; /** layer */ - struct bGPDlayer *gpl; + bGPDlayer *gpl; /** frame before current frame (interpolate-from) */ - struct bGPDframe *prevFrame; + bGPDframe *prevFrame; /** frame after current frame (interpolate-to) */ - struct bGPDframe *nextFrame; + bGPDframe *nextFrame; /** interpolated frame */ - struct bGPDframe *interFrame; + bGPDframe *interFrame; /** interpolate factor */ float factor; /* List of strokes and Hash tablets to create temp relationship between strokes. */ - struct ListBase selected_strokes; - struct GHash *used_strokes; - struct GHash *pair_strokes; + ListBase selected_strokes; + GHash *used_strokes; + GHash *pair_strokes; } tGPDinterpolate_layer; typedef struct tGPDinterpolate { /** Current depsgraph from context */ - struct Depsgraph *depsgraph; + Depsgraph *depsgraph; /** current scene from context */ - struct Scene *scene; + Scene *scene; /** area where painting originated */ - struct ScrArea *area; + ScrArea *area; /** region where painting originated */ - struct ARegion *region; + ARegion *region; /** current object */ - struct Object *ob; + Object *ob; /** current GP datablock */ - struct bGPdata *gpd; + bGPdata *gpd; /** current material */ struct Material *mat; /* Space Conversion Data */ - struct GP_SpaceConversion gsc; + GP_SpaceConversion gsc; /** current frame number */ int cframe; diff --git a/source/blender/editors/gpencil_legacy/gpencil_mesh.cc b/source/blender/editors/gpencil_legacy/gpencil_mesh.cc index b16e77d97b0..d3aa5a0a3d1 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_mesh.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_mesh.cc @@ -44,9 +44,7 @@ #include "gpencil_intern.h" /* Check frame_end is always > start frame! */ -static void gpencil_bake_set_frame_end(struct Main * /*main*/, - struct Scene * /*scene*/, - struct PointerRNA *ptr) +static void gpencil_bake_set_frame_end(Main * /*main*/, Scene * /*scene*/, PointerRNA *ptr) { int frame_start = RNA_int_get(ptr, "frame_start"); int frame_end = RNA_int_get(ptr, "frame_end"); @@ -69,7 +67,7 @@ static bool gpencil_bake_mesh_animation_poll(bContext *C) } struct GpBakeOb { - struct GpBakeOb *next, *prev; + GpBakeOb *next, *prev; Object *ob; }; diff --git a/source/blender/editors/gpencil_legacy/gpencil_paint.c b/source/blender/editors/gpencil_legacy/gpencil_paint.c index 520f2f1c1d5..d0fe3cfbb8e 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_paint.c +++ b/source/blender/editors/gpencil_legacy/gpencil_paint.c @@ -135,7 +135,7 @@ typedef struct tGPsdata { Main *bmain; /** current scene from context. */ Scene *scene; - struct Depsgraph *depsgraph; + Depsgraph *depsgraph; /** Current object. */ Object *ob; diff --git a/source/blender/editors/gpencil_legacy/gpencil_sculpt_paint.c b/source/blender/editors/gpencil_legacy/gpencil_sculpt_paint.c index a1470f635c8..094717e24e8 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_sculpt_paint.c +++ b/source/blender/editors/gpencil_legacy/gpencil_sculpt_paint.c @@ -151,7 +151,7 @@ typedef struct tGP_BrushEditData { RNG *rng; /* Auto-masking strokes. */ - struct GHash *automasking_strokes; + GHash *automasking_strokes; bool automasking_ready; } tGP_BrushEditData; diff --git a/source/blender/editors/gpencil_legacy/gpencil_select.c b/source/blender/editors/gpencil_legacy/gpencil_select.c index c3b42e7f905..8752d75b740 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_select.c +++ b/source/blender/editors/gpencil_legacy/gpencil_select.c @@ -2298,7 +2298,7 @@ static bool gpencil_test_lasso(ARegion *region, static int gpencil_lasso_select_exec(bContext *C, wmOperator *op) { - struct GP_SelectUserData data = {0}; + GP_SelectUserData data = {0}; data.lasso_coords = WM_gesture_lasso_path_to_array(C, op, &data.lasso_coords_len); /* Sanity check. */ diff --git a/source/blender/editors/gpencil_legacy/gpencil_trace_ops.c b/source/blender/editors/gpencil_legacy/gpencil_trace_ops.c index 159ca73e447..0a2c8771dca 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_trace_ops.c +++ b/source/blender/editors/gpencil_legacy/gpencil_trace_ops.c @@ -45,7 +45,7 @@ typedef struct TraceJob { /* from wmJob */ - struct Object *owner; + Object *owner; bool *stop, *do_update; float *progress; diff --git a/source/blender/editors/gpencil_legacy/gpencil_undo.cc b/source/blender/editors/gpencil_legacy/gpencil_undo.cc index 3e401e20ddc..76df5e2704c 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_undo.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_undo.cc @@ -33,10 +33,10 @@ #include "gpencil_intern.h" typedef struct bGPundonode { - struct bGPundonode *next, *prev; + bGPundonode *next, *prev; char name[BKE_UNDO_STR_MAX]; - struct bGPdata *gpd; + bGPdata *gpd; } bGPundonode; static ListBase undo_nodes = {nullptr, nullptr}; diff --git a/source/blender/editors/gpencil_legacy/gpencil_utils.c b/source/blender/editors/gpencil_legacy/gpencil_utils.c index 448968aa0cc..c32a7e40fa7 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_utils.c +++ b/source/blender/editors/gpencil_legacy/gpencil_utils.c @@ -596,7 +596,7 @@ void gpencil_point_conversion_init(bContext *C, GP_SpaceConversion *r_gsc) if (area->spacetype == SPACE_VIEW3D) { wmWindow *win = CTX_wm_window(C); Scene *scene = CTX_data_scene(C); - struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); View3D *v3d = (View3D *)CTX_wm_space_data(C); RegionView3D *rv3d = region->regiondata; @@ -1783,8 +1783,8 @@ float ED_gpencil_cursor_radius(bContext *C, int x, int y) return radius; } -float ED_gpencil_radial_control_scale(struct bContext *C, - struct Brush *brush, +float ED_gpencil_radial_control_scale(bContext *C, + Brush *brush, float initial_value, const int mval[2]) { @@ -2724,12 +2724,12 @@ tGPspoint *ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array, * This is done in order to keep cache small and improve speed. */ if (*buffer_used + 1 > *buffer_size) { if ((*buffer_size == 0) || (buffer_array == NULL)) { - p = MEM_callocN(sizeof(struct tGPspoint) * GP_STROKE_BUFFER_CHUNK, "GPencil Sbuffer"); + p = MEM_callocN(sizeof(tGPspoint) * GP_STROKE_BUFFER_CHUNK, "GPencil Sbuffer"); *buffer_size = GP_STROKE_BUFFER_CHUNK; } else { *buffer_size += GP_STROKE_BUFFER_CHUNK; - p = MEM_recallocN(buffer_array, sizeof(struct tGPspoint) * *buffer_size); + p = MEM_recallocN(buffer_array, sizeof(tGPspoint) * *buffer_size); } if (p == NULL) { diff --git a/source/blender/editors/gpencil_legacy/gpencil_vertex_paint.c b/source/blender/editors/gpencil_legacy/gpencil_vertex_paint.c index 9e155d77c01..48c02e9ba18 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_vertex_paint.c +++ b/source/blender/editors/gpencil_legacy/gpencil_vertex_paint.c @@ -159,12 +159,12 @@ static tGP_Selected *gpencil_select_buffer_ensure(tGP_Selected *buffer_array, * This is done in order to keep cache small and improve speed. */ if (*buffer_used + 1 > *buffer_size) { if ((*buffer_size == 0) || (buffer_array == NULL)) { - p = MEM_callocN(sizeof(struct tGP_Selected) * GP_SELECT_BUFFER_CHUNK, __func__); + p = MEM_callocN(sizeof(tGP_Selected) * GP_SELECT_BUFFER_CHUNK, __func__); *buffer_size = GP_SELECT_BUFFER_CHUNK; } else { *buffer_size += GP_SELECT_BUFFER_CHUNK; - p = MEM_recallocN(buffer_array, sizeof(struct tGP_Selected) * *buffer_size); + p = MEM_recallocN(buffer_array, sizeof(tGP_Selected) * *buffer_size); } if (p == NULL) { diff --git a/source/blender/editors/gpencil_legacy/gpencil_weight_paint.c b/source/blender/editors/gpencil_legacy/gpencil_weight_paint.c index dc53ef8ff11..776637e62fb 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_weight_paint.c +++ b/source/blender/editors/gpencil_legacy/gpencil_weight_paint.c @@ -88,7 +88,7 @@ typedef struct tGP_Selected { /* Context for brush operators */ typedef struct tGP_BrushWeightpaintData { - struct Main *bmain; + Main *bmain; Scene *scene; Object *object; @@ -181,12 +181,12 @@ static void gpencil_select_buffer_ensure(tGP_BrushWeightpaintData *gso, const bo * This is done in order to keep cache small and improve speed. */ if ((gso->pbuffer_used + 1) > gso->pbuffer_size) { if ((gso->pbuffer_size == 0) || (gso->pbuffer == NULL)) { - gso->pbuffer = MEM_callocN(sizeof(struct tGP_Selected) * GP_SELECT_BUFFER_CHUNK, __func__); + gso->pbuffer = MEM_callocN(sizeof(tGP_Selected) * GP_SELECT_BUFFER_CHUNK, __func__); gso->pbuffer_size = GP_SELECT_BUFFER_CHUNK; } else { gso->pbuffer_size += GP_SELECT_BUFFER_CHUNK; - gso->pbuffer = MEM_recallocN(gso->pbuffer, sizeof(struct tGP_Selected) * gso->pbuffer_size); + gso->pbuffer = MEM_recallocN(gso->pbuffer, sizeof(tGP_Selected) * gso->pbuffer_size); } } @@ -204,10 +204,10 @@ static void gpencil_select_buffer_ensure(tGP_BrushWeightpaintData *gso, const bo /* Stroke point buffer. */ if (gso->fn_pbuffer == NULL) { - gso->fn_pbuffer = MEM_callocN(sizeof(struct tGP_Selected) * gso->fn_size, __func__); + gso->fn_pbuffer = MEM_callocN(sizeof(tGP_Selected) * gso->fn_size, __func__); } else { - gso->fn_pbuffer = MEM_recallocN(gso->fn_pbuffer, sizeof(struct tGP_Selected) * gso->fn_size); + gso->fn_pbuffer = MEM_recallocN(gso->fn_pbuffer, sizeof(tGP_Selected) * gso->fn_size); } /* Stroke point hash table (for duplicate checking.) */ diff --git a/source/blender/editors/interface/eyedroppers/eyedropper_depth.cc b/source/blender/editors/interface/eyedroppers/eyedropper_depth.cc index 7ade4edcaee..a30b5c06cf8 100644 --- a/source/blender/editors/interface/eyedroppers/eyedropper_depth.cc +++ b/source/blender/editors/interface/eyedroppers/eyedropper_depth.cc @@ -63,7 +63,7 @@ struct DepthDropper { char name[200]; }; -static void depthdropper_draw_cb(const struct bContext * /*C*/, ARegion * /*region*/, void *arg) +static void depthdropper_draw_cb(const bContext * /*C*/, ARegion * /*region*/, void *arg) { DepthDropper *ddr = static_cast(arg); eyedropper_draw_cursor_text_region(ddr->name_pos, ddr->name); @@ -159,7 +159,7 @@ static void depthdropper_depth_sample_pt(bContext *C, if (area->spacetype == SPACE_VIEW3D) { ARegion *region = BKE_area_find_region_xy(area, RGN_TYPE_WINDOW, m_xy); if (region) { - struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); + Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); View3D *v3d = static_cast(area->spacedata.first); RegionView3D *rv3d = static_cast(region->regiondata); /* weak, we could pass in some reference point */ diff --git a/source/blender/editors/interface/eyedroppers/eyedropper_gpencil_color.cc b/source/blender/editors/interface/eyedroppers/eyedropper_gpencil_color.cc index bfa470207b0..c087da1395d 100644 --- a/source/blender/editors/interface/eyedroppers/eyedropper_gpencil_color.cc +++ b/source/blender/editors/interface/eyedroppers/eyedropper_gpencil_color.cc @@ -56,7 +56,7 @@ typedef enum eGP_EyeMode { } eGP_EyeMode; struct EyedropperGPencil { - struct ColorManagedDisplay *display; + ColorManagedDisplay *display; /** color under cursor RGB */ float color[3]; /** Mode */ diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc index 6fa04f6862e..6f7861c5174 100644 --- a/source/blender/editors/interface/interface.cc +++ b/source/blender/editors/interface/interface.cc @@ -79,10 +79,10 @@ using blender::Vector; /* prototypes. */ -static void ui_but_to_pixelrect(struct rcti *rect, - const struct ARegion *region, - struct uiBlock *block, - const struct uiBut *but); +static void ui_but_to_pixelrect(rcti *rect, + const ARegion *region, + uiBlock *block, + const uiBut *but); static void ui_def_but_rna__menu(bContext * /*C*/, uiLayout *layout, void *but_p); static void ui_def_but_rna__panel_type(bContext * /*C*/, uiLayout *layout, void *but_p); static void ui_def_but_rna__menu_type(bContext * /*C*/, uiLayout *layout, void *but_p); @@ -216,7 +216,7 @@ void ui_window_to_block_fl(const ARegion *region, uiBlock *block, float *r_x, fl } } -void ui_window_to_block_rctf(const struct ARegion *region, +void ui_window_to_block_rctf(const ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src) @@ -340,7 +340,7 @@ static void ui_update_window_matrix(const wmWindow *window, const ARegion *regio } } -void ui_region_winrct_get_no_margin(const struct ARegion *region, struct rcti *r_rect) +void ui_region_winrct_get_no_margin(const ARegion *region, rcti *r_rect) { uiBlock *block = static_cast(region->uiblocks.first); if (block && (block->flag & UI_BLOCK_LOOP) && (block->flag & UI_BLOCK_RADIAL) == 0) { @@ -2167,7 +2167,7 @@ void UI_block_draw(const bContext *C, uiBlock *block) GPU_matrix_pop(); } -static void ui_block_message_subscribe(ARegion *region, struct wmMsgBus *mbus, uiBlock *block) +static void ui_block_message_subscribe(ARegion *region, wmMsgBus *mbus, uiBlock *block) { uiBut *but_prev = nullptr; /* possibly we should keep the region this block is contained in? */ @@ -2191,7 +2191,7 @@ static void ui_block_message_subscribe(ARegion *region, struct wmMsgBus *mbus, u } } -void UI_region_message_subscribe(ARegion *region, struct wmMsgBus *mbus) +void UI_region_message_subscribe(ARegion *region, wmMsgBus *mbus) { LISTBASE_FOREACH (uiBlock *, block, ®ion->uiblocks) { ui_block_message_subscribe(region, mbus, block); @@ -3495,7 +3495,7 @@ static void ui_but_free(const bContext *C, uiBut *but) } if ((but->type == UI_BTYPE_IMAGE) && but->poin) { - IMB_freeImBuf((struct ImBuf *)but->poin); + IMB_freeImBuf((ImBuf *)but->poin); } ui_but_drag_free(but); @@ -3991,14 +3991,14 @@ void UI_block_align_end(uiBlock *block) block->flag &= ~UI_BUT_ALIGN; /* all 4 flags */ } -struct ColorManagedDisplay *ui_block_cm_display_get(uiBlock *block) +ColorManagedDisplay *ui_block_cm_display_get(uiBlock *block) { return IMB_colormanagement_display_get_named(block->display_device); } void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3]) { - struct ColorManagedDisplay *display = ui_block_cm_display_get(block); + ColorManagedDisplay *display = ui_block_cm_display_get(block); IMB_colormanagement_scene_linear_to_display_v3(pixel, display); } @@ -4890,7 +4890,7 @@ uiBut *uiDefButImage( uiBut *uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height) { - struct ImBuf *ibuf = UI_icon_alert_imbuf_get((eAlertIcon)icon); + ImBuf *ibuf = UI_icon_alert_imbuf_get((eAlertIcon)icon); bTheme *btheme = UI_GetTheme(); return uiDefButImage(block, ibuf, x, y, width, height, btheme->tui.wcol_menu_back.text); } @@ -6390,11 +6390,8 @@ void UI_but_func_search_set_results_are_suggestions(uiBut *but, const bool value } /* Callbacks for operator search button. */ -static void operator_enum_search_update_fn(const struct bContext *C, - void *but, - const char *str, - uiSearchItems *items, - const bool /*is_first*/) +static void operator_enum_search_update_fn( + const bContext *C, void *but, const char *str, uiSearchItems *items, const bool /*is_first*/) { wmOperatorType *ot = ((uiBut *)but)->optype; PropertyRNA *prop = ot->prop; @@ -6443,7 +6440,7 @@ static void operator_enum_search_update_fn(const struct bContext *C, } } -static void operator_enum_search_exec_fn(struct bContext * /*C*/, void *but, void *arg2) +static void operator_enum_search_exec_fn(bContext * /*C*/, void *but, void *arg2) { wmOperatorType *ot = ((uiBut *)but)->optype; /* Will create it if needed! */ @@ -6799,7 +6796,7 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...) } } -void UI_but_extra_icon_string_info_get(struct bContext *C, uiButExtraOpIcon *extra_icon, ...) +void UI_but_extra_icon_string_info_get(bContext *C, uiButExtraOpIcon *extra_icon, ...) { va_list args; uiStringInfo *si; diff --git a/source/blender/editors/interface/interface_align.cc b/source/blender/editors/interface/interface_align.cc index f8b18cef9fc..fc3493ce06c 100644 --- a/source/blender/editors/interface/interface_align.cc +++ b/source/blender/editors/interface/interface_align.cc @@ -46,7 +46,7 @@ struct ButAlign { uiBut *but; /* Neighbor buttons */ - struct ButAlign *neighbors[4]; + ButAlign *neighbors[4]; /* Pointers to coordinates (rctf values) of the button. */ float *borders[4]; diff --git a/source/blender/editors/interface/interface_drag.cc b/source/blender/editors/interface/interface_drag.cc index 8c599bd25a8..9ed9bbfef00 100644 --- a/source/blender/editors/interface/interface_drag.cc +++ b/source/blender/editors/interface/interface_drag.cc @@ -22,7 +22,7 @@ void UI_but_drag_set_id(uiBut *but, ID *id) but->dragpoin = (void *)id; } -void UI_but_drag_attach_image(uiBut *but, struct ImBuf *imb, const float scale) +void UI_but_drag_attach_image(uiBut *but, ImBuf *imb, const float scale) { but->imb = imb; but->imb_scale = scale; @@ -34,7 +34,7 @@ void UI_but_drag_set_asset(uiBut *but, const char *path, int import_type, int icon, - struct ImBuf *imb, + ImBuf *imb, float scale) { wmDragAsset *asset_drag = WM_drag_create_asset_data(asset_handle, path, import_type); @@ -91,7 +91,7 @@ void UI_but_drag_set_value(uiBut *but) but->dragtype = WM_DRAG_VALUE; } -void UI_but_drag_set_image(uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale) +void UI_but_drag_set_image(uiBut *but, const char *path, int icon, ImBuf *imb, float scale) { ui_def_but_icon(but, icon, 0); /* no flag UI_HAS_ICON, so icon doesn't draw in button */ UI_but_drag_set_path(but, path); diff --git a/source/blender/editors/interface/interface_dropboxes.cc b/source/blender/editors/interface/interface_dropboxes.cc index e26289c0dd7..d6a353a0caf 100644 --- a/source/blender/editors/interface/interface_dropboxes.cc +++ b/source/blender/editors/interface/interface_dropboxes.cc @@ -62,7 +62,7 @@ static char *ui_view_drop_tooltip(bContext *C, wmDrag *drag, const int xy[2], wm /** \name Name Drag/Drop Callbacks * \{ */ -static bool ui_drop_name_poll(struct bContext *C, wmDrag *drag, const wmEvent * /*event*/) +static bool ui_drop_name_poll(bContext *C, wmDrag *drag, const wmEvent * /*event*/) { return UI_but_active_drop_name(C) && (drag->type == WM_DRAG_ID); } @@ -94,7 +94,7 @@ static void ui_drop_material_copy(bContext * /*C*/, wmDrag *drag, wmDropBox *dro static char *ui_drop_material_tooltip(bContext *C, wmDrag *drag, const int /*xy*/[2], - struct wmDropBox * /*drop*/) + wmDropBox * /*drop*/) { PointerRNA rna_ptr = CTX_data_pointer_get_type(C, "object", &RNA_Object); Object *ob = (Object *)rna_ptr.data; diff --git a/source/blender/editors/interface/interface_icons.cc b/source/blender/editors/interface/interface_icons.cc index c4a0c4ed180..47a9ce9d321 100644 --- a/source/blender/editors/interface/interface_icons.cc +++ b/source/blender/editors/interface/interface_icons.cc @@ -121,7 +121,7 @@ struct DrawInfo { short event_value; int icon; /* Allow lookups. */ - struct DrawInfo *next; + DrawInfo *next; } input; } data; }; diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc index a2c4d1192bb..39b97823043 100644 --- a/source/blender/editors/interface/interface_ops.cc +++ b/source/blender/editors/interface/interface_ops.cc @@ -2151,7 +2151,7 @@ static void UI_OT_button_string_clear(wmOperatorType *ot) /** \name Drop Color Operator * \{ */ -bool UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent * /*event*/) +bool UI_drop_color_poll(bContext *C, wmDrag *drag, const wmEvent * /*event*/) { /* should only return true for regions that include buttons, for now * return true always */ diff --git a/source/blender/editors/interface/interface_query.cc b/source/blender/editors/interface/interface_query.cc index 2992c6a1316..dd20fc07cf5 100644 --- a/source/blender/editors/interface/interface_query.cc +++ b/source/blender/editors/interface/interface_query.cc @@ -343,7 +343,7 @@ uiBut *ui_but_find_mouse_over(const ARegion *region, const wmEvent *event) region, event->xy, event->modifier & KM_CTRL, false, nullptr, nullptr); } -uiBut *ui_but_find_rect_over(const struct ARegion *region, const rcti *rect_px) +uiBut *ui_but_find_rect_over(const ARegion *region, const rcti *rect_px) { if (!ui_region_contains_rect_px(region, rect_px)) { return nullptr; diff --git a/source/blender/editors/interface/interface_region_color_picker.cc b/source/blender/editors/interface/interface_region_color_picker.cc index a72c2cb4c4c..6c99aadbf35 100644 --- a/source/blender/editors/interface/interface_region_color_picker.cc +++ b/source/blender/editors/interface/interface_region_color_picker.cc @@ -893,7 +893,7 @@ uiBlock *ui_block_func_COLOR(bContext *C, uiPopupBlockHandle *handle, void *arg_ return block; } -ColorPicker *ui_block_colorpicker_create(struct uiBlock *block) +ColorPicker *ui_block_colorpicker_create(uiBlock *block) { ColorPicker *cpicker = MEM_cnew(__func__); BLI_addhead(&block->color_pickers.list, cpicker); diff --git a/source/blender/editors/interface/interface_region_menu_pie.cc b/source/blender/editors/interface/interface_region_menu_pie.cc index 77b37318384..8bea532c628 100644 --- a/source/blender/editors/interface/interface_region_menu_pie.cc +++ b/source/blender/editors/interface/interface_region_menu_pie.cc @@ -88,7 +88,7 @@ static float ui_pie_menu_title_width(const char *name, int icon) return (UI_fontstyle_string_width(fstyle, name) + (UI_UNIT_X * (1.50f + (icon ? 0.25f : 0.0f)))); } -uiPieMenu *UI_pie_menu_begin(struct bContext *C, const char *title, int icon, const wmEvent *event) +uiPieMenu *UI_pie_menu_begin(bContext *C, const char *title, int icon, const wmEvent *event) { const uiStyle *style = UI_style_get_dpi(); short event_type; @@ -207,7 +207,7 @@ uiLayout *UI_pie_menu_layout(uiPieMenu *pie) return pie->layout; } -int UI_pie_menu_invoke(struct bContext *C, const char *idname, const wmEvent *event) +int UI_pie_menu_invoke(bContext *C, const char *idname, const wmEvent *event) { uiPieMenu *pie; uiLayout *layout; @@ -233,11 +233,8 @@ int UI_pie_menu_invoke(struct bContext *C, const char *idname, const wmEvent *ev return OPERATOR_INTERFACE; } -int UI_pie_menu_invoke_from_operator_enum(struct bContext *C, - const char *title, - const char *opname, - const char *propname, - const wmEvent *event) +int UI_pie_menu_invoke_from_operator_enum( + bContext *C, const char *title, const char *opname, const char *propname, const wmEvent *event) { uiPieMenu *pie; uiLayout *layout; @@ -253,7 +250,7 @@ int UI_pie_menu_invoke_from_operator_enum(struct bContext *C, return OPERATOR_INTERFACE; } -int UI_pie_menu_invoke_from_rna_enum(struct bContext *C, +int UI_pie_menu_invoke_from_rna_enum(bContext *C, const char *title, const char *path, const wmEvent *event) diff --git a/source/blender/editors/interface/interface_region_menu_popup.cc b/source/blender/editors/interface/interface_region_menu_popup.cc index 11a8f76ead0..951419e216a 100644 --- a/source/blender/editors/interface/interface_region_menu_popup.cc +++ b/source/blender/editors/interface/interface_region_menu_popup.cc @@ -511,7 +511,7 @@ uiPopupMenu *UI_popup_menu_begin(bContext *C, const char *title, int icon) return UI_popup_menu_begin_ex(C, title, __func__, icon); } -void UI_popup_menu_but_set(uiPopupMenu *pup, struct ARegion *butregion, uiBut *but) +void UI_popup_menu_but_set(uiPopupMenu *pup, ARegion *butregion, uiBut *but) { pup->but = but; pup->butregion = butregion; diff --git a/source/blender/editors/interface/interface_region_popover.cc b/source/blender/editors/interface/interface_region_popover.cc index 2a8103c87ea..9a2967a5cc2 100644 --- a/source/blender/editors/interface/interface_region_popover.cc +++ b/source/blender/editors/interface/interface_region_popover.cc @@ -62,7 +62,7 @@ struct uiPopover { /* Needed for keymap removal. */ wmWindow *window; wmKeyMap *keymap; - struct wmEventHandler_Keymap *keymap_handler; + wmEventHandler_Keymap *keymap_handler; uiMenuCreateFunc menu_func; void *menu_arg; diff --git a/source/blender/editors/interface/interface_region_search.cc b/source/blender/editors/interface/interface_region_search.cc index 207f4fb864d..1a3cfde7f14 100644 --- a/source/blender/editors/interface/interface_region_search.cc +++ b/source/blender/editors/interface/interface_region_search.cc @@ -309,11 +309,8 @@ bool ui_searchbox_apply(uiBut *but, ARegion *region) return false; } -static struct ARegion *wm_searchbox_tooltip_init(struct bContext *C, - struct ARegion *region, - int * /*r_pass*/, - double * /*pass_delay*/, - bool *r_exit_on_event) +static ARegion *wm_searchbox_tooltip_init( + bContext *C, ARegion *region, int * /*r_pass*/, double * /*pass_delay*/, bool *r_exit_on_event) { *r_exit_on_event = true; @@ -723,7 +720,7 @@ static uiMenuItemSeparatorType ui_searchbox_item_separator(uiSearchboxData *data return separator_type; } -static void ui_searchbox_region_layout_fn(const struct bContext *C, struct ARegion *region) +static void ui_searchbox_region_layout_fn(const bContext *C, ARegion *region) { uiSearchboxData *data = (uiSearchboxData *)region->regiondata; diff --git a/source/blender/editors/interface/interface_region_tooltip.cc b/source/blender/editors/interface/interface_region_tooltip.cc index 629dff5b47b..3881a839c82 100644 --- a/source/blender/editors/interface/interface_region_tooltip.cc +++ b/source/blender/editors/interface/interface_region_tooltip.cc @@ -1151,7 +1151,7 @@ static ARegion *ui_tooltip_create_with_data(bContext *C, uiTooltipField *field = &data->fields[i]; uiTooltipField *field_next = (i + 1) != data->fields_len ? &data->fields[i + 1] : nullptr; - struct ResultBLF info; + ResultBLF info; int w, x_pos = 0; int font_id; diff --git a/source/blender/editors/interface/interface_style.cc b/source/blender/editors/interface/interface_style.cc index 8732e2336c6..6b5a54e8455 100644 --- a/source/blender/editors/interface/interface_style.cc +++ b/source/blender/editors/interface/interface_style.cc @@ -128,10 +128,10 @@ void UI_fontstyle_draw_ex(const uiFontStyle *fs, const char *str, const size_t str_len, const uchar col[4], - const struct uiFontStyleDraw_Params *fs_params, + const uiFontStyleDraw_Params *fs_params, int *r_xofs, int *r_yofs, - struct ResultBLF *r_info) + ResultBLF *r_info) { int xofs = 0, yofs; int font_flag = BLF_CLIPPING; @@ -199,7 +199,7 @@ void UI_fontstyle_draw(const uiFontStyle *fs, const char *str, const size_t str_len, const uchar col[4], - const struct uiFontStyleDraw_Params *fs_params) + const uiFontStyleDraw_Params *fs_params) { UI_fontstyle_draw_ex(fs, rect, str, str_len, col, fs_params, nullptr, nullptr, nullptr); } diff --git a/source/blender/editors/interface/interface_template_list.cc b/source/blender/editors/interface/interface_template_list.cc index 0a285ef2963..896c3cd6773 100644 --- a/source/blender/editors/interface/interface_template_list.cc +++ b/source/blender/editors/interface/interface_template_list.cc @@ -89,13 +89,13 @@ struct TemplateListVisualInfo { int end_idx; /* Index of last item to display + 1. */ }; -static void uilist_draw_item_default(struct uiList *ui_list, - const struct bContext * /*C*/, - struct uiLayout *layout, - struct PointerRNA * /*dataptr*/, - struct PointerRNA *itemptr, +static void uilist_draw_item_default(uiList *ui_list, + const bContext * /*C*/, + uiLayout *layout, + PointerRNA * /*dataptr*/, + PointerRNA *itemptr, int icon, - struct PointerRNA * /*active_dataptr*/, + PointerRNA * /*active_dataptr*/, const char * /*active_propname*/, int /*index*/, int /*flt_flag*/) @@ -120,9 +120,7 @@ static void uilist_draw_item_default(struct uiList *ui_list, } } -static void uilist_draw_filter_default(struct uiList *ui_list, - const struct bContext * /*C*/, - struct uiLayout *layout) +static void uilist_draw_filter_default(uiList *ui_list, const bContext * /*C*/, uiLayout *layout) { PointerRNA listptr; RNA_pointer_create(nullptr, &RNA_UIList, ui_list, &listptr); @@ -310,9 +308,9 @@ void UI_list_filter_and_sort_items(uiList *ui_list, /** * Default UI List filtering: Filter by name. */ -static void uilist_filter_items_default(struct uiList *ui_list, - const struct bContext *C, - struct PointerRNA *dataptr, +static void uilist_filter_items_default(uiList *ui_list, + const bContext *C, + PointerRNA *dataptr, const char *propname) { if (ui_list->filter_byname[0]) { diff --git a/source/blender/editors/interface/interface_template_search_menu.cc b/source/blender/editors/interface/interface_template_search_menu.cc index 6b2ffda2824..941c98a9d8d 100644 --- a/source/blender/editors/interface/interface_template_search_menu.cc +++ b/source/blender/editors/interface/interface_template_search_menu.cc @@ -160,7 +160,7 @@ static const char *strdup_memarena_from_dynstr(MemArena *memarena, DynStr *dyn_s static bool menu_items_from_ui_create_item_from_button(MenuSearch_Data *data, MemArena *memarena, - struct MenuType *mt, + MenuType *mt, const char *drawstr_submenu, uiBut *but, MenuSearch_Context *wm_context) @@ -1035,10 +1035,10 @@ static void menu_search_update_fn(const bContext * /*C*/, * a separate context menu just for the search, however this is fairly involved. * \{ */ -static bool ui_search_menu_create_context_menu(struct bContext *C, +static bool ui_search_menu_create_context_menu(bContext *C, void *arg, void *active, - const struct wmEvent *event) + const wmEvent *event) { MenuSearch_Data *data = (MenuSearch_Data *)arg; MenuSearch_Item *item = (MenuSearch_Item *)active; @@ -1079,11 +1079,8 @@ static bool ui_search_menu_create_context_menu(struct bContext *C, /** \name Tooltip * \{ */ -static struct ARegion *ui_search_menu_create_tooltip(struct bContext *C, - struct ARegion *region, - const rcti * /*item_rect*/, - void *arg, - void *active) +static ARegion *ui_search_menu_create_tooltip( + bContext *C, ARegion *region, const rcti * /*item_rect*/, void *arg, void *active) { MenuSearch_Data *data = (MenuSearch_Data *)arg; MenuSearch_Item *item = (MenuSearch_Item *)active; diff --git a/source/blender/editors/interface/interface_undo.cc b/source/blender/editors/interface/interface_undo.cc index c00016d3aeb..f4dd24263e7 100644 --- a/source/blender/editors/interface/interface_undo.cc +++ b/source/blender/editors/interface/interface_undo.cc @@ -23,7 +23,7 @@ * \{ */ struct uiUndoStack_Text_State { - struct uiUndoStack_Text_State *next, *prev; + uiUndoStack_Text_State *next, *prev; int cursor_index; char text[0]; }; diff --git a/source/blender/editors/interface/interface_utils.cc b/source/blender/editors/interface/interface_utils.cc index 829abfed68f..bf3a77d5f91 100644 --- a/source/blender/editors/interface/interface_utils.cc +++ b/source/blender/editors/interface/interface_utils.cc @@ -464,7 +464,7 @@ void UI_but_func_identity_compare_set(uiBut *but, uiButIdentityCompareFunc cmp_f /* *** RNA collection search menu *** */ struct CollItemSearch { - struct CollItemSearch *next, *prev; + CollItemSearch *next, *prev; void *data; char *name; int index; @@ -614,7 +614,7 @@ void ui_rna_collection_search_update_fn( [](void *user_data, const StringPropertySearchVisitParams *visit_params) { const bool show_extra_info = (G.debug_value == 102); - SearchVisitUserData *search_data = (struct SearchVisitUserData *)user_data; + SearchVisitUserData *search_data = (SearchVisitUserData *)user_data; CollItemSearch *cis = MEM_cnew(search_data->func_id); cis->data = nullptr; if (visit_params->info && show_extra_info) { @@ -953,13 +953,13 @@ void UI_but_ensure_in_view(const bContext *C, ARegion *region, const uiBut *but) * \{ */ struct uiButStore { - struct uiButStore *next, *prev; + uiButStore *next, *prev; uiBlock *block; ListBase items; }; struct uiButStoreElem { - struct uiButStoreElem *next, *prev; + uiButStoreElem *next, *prev; uiBut **but_p; }; diff --git a/source/blender/editors/interface/interface_widgets.cc b/source/blender/editors/interface/interface_widgets.cc index 07871e11e41..68ab366b2fe 100644 --- a/source/blender/editors/interface/interface_widgets.cc +++ b/source/blender/editors/interface/interface_widgets.cc @@ -256,7 +256,7 @@ struct uiWidgetType { /* converted colors for state */ uiWidgetColors wcol; - void (*state)(struct uiWidgetType *, const uiWidgetStateInfo *state, eUIEmbossType emboss) + void (*state)(uiWidgetType *, const uiWidgetStateInfo *state, eUIEmbossType emboss) ATTR_NONNULL(); void (*draw)(uiWidgetColors *, rcti *, diff --git a/source/blender/editors/interface/view2d.cc b/source/blender/editors/interface/view2d.cc index 584192b8519..ae35b59b1f1 100644 --- a/source/blender/editors/interface/view2d.cc +++ b/source/blender/editors/interface/view2d.cc @@ -1634,12 +1634,12 @@ void UI_view2d_listview_view_to_cell(float columnwidth, /** \name Coordinate Conversions * \{ */ -float UI_view2d_region_to_view_x(const struct View2D *v2d, float x) +float UI_view2d_region_to_view_x(const View2D *v2d, float x) { return (v2d->cur.xmin + (BLI_rctf_size_x(&v2d->cur) * (x - v2d->mask.xmin) / BLI_rcti_size_x(&v2d->mask))); } -float UI_view2d_region_to_view_y(const struct View2D *v2d, float y) +float UI_view2d_region_to_view_y(const View2D *v2d, float y) { return (v2d->cur.ymin + (BLI_rctf_size_y(&v2d->cur) * (y - v2d->mask.ymin) / BLI_rcti_size_y(&v2d->mask))); @@ -1916,7 +1916,7 @@ void UI_view2d_scale_get_inverse(const View2D *v2d, float *r_x, float *r_y) } } -void UI_view2d_center_get(const struct View2D *v2d, float *r_x, float *r_y) +void UI_view2d_center_get(const View2D *v2d, float *r_x, float *r_y) { /* get center */ if (r_x) { @@ -1926,7 +1926,7 @@ void UI_view2d_center_get(const struct View2D *v2d, float *r_x, float *r_y) *r_y = BLI_rctf_cent_y(&v2d->cur); } } -void UI_view2d_center_set(struct View2D *v2d, float x, float y) +void UI_view2d_center_set(View2D *v2d, float x, float y) { BLI_rctf_recenter(&v2d->cur, x, y); @@ -1934,7 +1934,7 @@ void UI_view2d_center_set(struct View2D *v2d, float x, float y) UI_view2d_curRect_validate(v2d); } -void UI_view2d_offset(struct View2D *v2d, float xfac, float yfac) +void UI_view2d_offset(View2D *v2d, float xfac, float yfac) { if (xfac != -1.0f) { const float xsize = BLI_rctf_size_x(&v2d->cur); @@ -2032,7 +2032,7 @@ char UI_view2d_rect_in_scrollers(const ARegion *region, const View2D *v2d, const * \{ */ struct View2DString { - struct View2DString *next; + View2DString *next; union { uchar ub[4]; int pack; diff --git a/source/blender/editors/interface/view2d_draw.cc b/source/blender/editors/interface/view2d_draw.cc index 3904c1395a2..a46334dd929 100644 --- a/source/blender/editors/interface/view2d_draw.cc +++ b/source/blender/editors/interface/view2d_draw.cc @@ -447,8 +447,8 @@ static void view_to_string__value( /* Grid Resolution API **************************************************/ -float UI_view2d_grid_resolution_x__frames_or_seconds(const struct View2D *v2d, - const struct Scene *scene, +float UI_view2d_grid_resolution_x__frames_or_seconds(const View2D *v2d, + const Scene *scene, bool display_seconds) { if (display_seconds) { @@ -457,7 +457,7 @@ float UI_view2d_grid_resolution_x__frames_or_seconds(const struct View2D *v2d, return view2d_major_step_x__continuous(v2d); } -float UI_view2d_grid_resolution_y__values(const struct View2D *v2d) +float UI_view2d_grid_resolution_y__values(const View2D *v2d) { return view2d_major_step_y__continuous(v2d); } @@ -568,10 +568,10 @@ void UI_view2d_draw_scale_y__block(const ARegion *region, region, v2d, 1.0f, 0.5f, rect, view_to_string__value, nullptr, colorid); } -void UI_view2d_draw_scale_x__discrete_frames_or_seconds(const struct ARegion *region, - const struct View2D *v2d, - const struct rcti *rect, - const struct Scene *scene, +void UI_view2d_draw_scale_x__discrete_frames_or_seconds(const ARegion *region, + const View2D *v2d, + const rcti *rect, + const Scene *scene, bool display_seconds, int colorid) { @@ -583,10 +583,10 @@ void UI_view2d_draw_scale_x__discrete_frames_or_seconds(const struct ARegion *re } } -void UI_view2d_draw_scale_x__frames_or_seconds(const struct ARegion *region, - const struct View2D *v2d, - const struct rcti *rect, - const struct Scene *scene, +void UI_view2d_draw_scale_x__frames_or_seconds(const ARegion *region, + const View2D *v2d, + const rcti *rect, + const Scene *scene, bool display_seconds, int colorid) { diff --git a/source/blender/editors/interface/view2d_edge_pan.cc b/source/blender/editors/interface/view2d_edge_pan.cc index 9d38718139a..276f3158d11 100644 --- a/source/blender/editors/interface/view2d_edge_pan.cc +++ b/source/blender/editors/interface/view2d_edge_pan.cc @@ -316,7 +316,7 @@ void UI_view2d_edge_pan_operator_properties(wmOperatorType *ot) /*zoom_influence*/ 0.0f); } -void UI_view2d_edge_pan_operator_properties_ex(struct wmOperatorType *ot, +void UI_view2d_edge_pan_operator_properties_ex(wmOperatorType *ot, float inside_pad, float outside_pad, float speed_ramp, diff --git a/source/blender/editors/interface/view2d_gizmo_navigate.cc b/source/blender/editors/interface/view2d_gizmo_navigate.cc index 4a6148eb703..7417611f571 100644 --- a/source/blender/editors/interface/view2d_gizmo_navigate.cc +++ b/source/blender/editors/interface/view2d_gizmo_navigate.cc @@ -54,7 +54,7 @@ struct NavigateGizmoInfo { uint icon; }; -static struct NavigateGizmoInfo g_navigate_params_for_space_image[GZ_INDEX_TOTAL] = { +static NavigateGizmoInfo g_navigate_params_for_space_image[GZ_INDEX_TOTAL] = { { "IMAGE_OT_view_pan", "GIZMO_GT_button_2d", @@ -67,7 +67,7 @@ static struct NavigateGizmoInfo g_navigate_params_for_space_image[GZ_INDEX_TOTAL }, }; -static struct NavigateGizmoInfo g_navigate_params_for_space_clip[GZ_INDEX_TOTAL] = { +static NavigateGizmoInfo g_navigate_params_for_space_clip[GZ_INDEX_TOTAL] = { { "CLIP_OT_view_pan", "GIZMO_GT_button_2d", @@ -80,7 +80,7 @@ static struct NavigateGizmoInfo g_navigate_params_for_space_clip[GZ_INDEX_TOTAL] }, }; -static struct NavigateGizmoInfo g_navigate_params_for_view2d[GZ_INDEX_TOTAL] = { +static NavigateGizmoInfo g_navigate_params_for_view2d[GZ_INDEX_TOTAL] = { { "VIEW2D_OT_pan", "GIZMO_GT_button_2d", @@ -93,7 +93,7 @@ static struct NavigateGizmoInfo g_navigate_params_for_view2d[GZ_INDEX_TOTAL] = { }, }; -static struct NavigateGizmoInfo *navigate_params_from_space_type(short space_type) +static NavigateGizmoInfo *navigate_params_from_space_type(short space_type) { switch (space_type) { case SPACE_IMAGE: @@ -153,11 +153,11 @@ static void WIDGETGROUP_navigate_setup(const bContext * /*C*/, wmGizmoGroup *gzg { NavigateWidgetGroup *navgroup = MEM_cnew(__func__); - const struct NavigateGizmoInfo *navigate_params = navigate_params_from_space_type( + const NavigateGizmoInfo *navigate_params = navigate_params_from_space_type( gzgroup->type->gzmap_params.spaceid); for (int i = 0; i < GZ_INDEX_TOTAL; i++) { - const struct NavigateGizmoInfo *info = &navigate_params[i]; + const NavigateGizmoInfo *info = &navigate_params[i]; navgroup->gz_array[i] = WM_gizmo_new(info->gizmo, gzgroup, nullptr); wmGizmo *gz = navgroup->gz_array[i]; gz->flag |= WM_GIZMO_MOVE_CURSOR | WM_GIZMO_DRAW_MODAL; diff --git a/source/blender/editors/interface/views/grid_view.cc b/source/blender/editors/interface/views/grid_view.cc index 1c8d88a2035..76a4ef612a2 100644 --- a/source/blender/editors/interface/views/grid_view.cc +++ b/source/blender/editors/interface/views/grid_view.cc @@ -98,9 +98,7 @@ bool AbstractGridViewItem::matches(const AbstractViewItem &other) const return identifier_ == other_grid_item.identifier_; } -void AbstractGridViewItem::grid_tile_click_fn(struct bContext * /*C*/, - void *but_arg1, - void * /*arg2*/) +void AbstractGridViewItem::grid_tile_click_fn(bContext * /*C*/, void *but_arg1, void * /*arg2*/) { uiButViewItem *view_item_but = (uiButViewItem *)but_arg1; AbstractGridViewItem &grid_item = reinterpret_cast( diff --git a/source/blender/editors/interface/views/tree_view.cc b/source/blender/editors/interface/views/tree_view.cc index 2d6c06ae7a9..05141a3a50a 100644 --- a/source/blender/editors/interface/views/tree_view.cc +++ b/source/blender/editors/interface/views/tree_view.cc @@ -119,9 +119,7 @@ void AbstractTreeView::change_state_delayed() /* ---------------------------------------------------------------------- */ -void AbstractTreeViewItem::tree_row_click_fn(struct bContext * /*C*/, - void *but_arg1, - void * /*arg2*/) +void AbstractTreeViewItem::tree_row_click_fn(bContext * /*C*/, void *but_arg1, void * /*arg2*/) { uiButViewItem *item_but = (uiButViewItem *)but_arg1; AbstractTreeViewItem &tree_item = reinterpret_cast(*item_but->view_item); @@ -161,7 +159,7 @@ void AbstractTreeViewItem::add_indent(uiLayout &row) const UI_block_layout_set_current(block, &row); } -void AbstractTreeViewItem::collapse_chevron_click_fn(struct bContext *C, +void AbstractTreeViewItem::collapse_chevron_click_fn(bContext *C, void * /*but_arg1*/, void * /*arg2*/) { diff --git a/source/blender/editors/io/io_obj.c b/source/blender/editors/io/io_obj.c index 884243a276a..9b22a83ac8f 100644 --- a/source/blender/editors/io/io_obj.c +++ b/source/blender/editors/io/io_obj.c @@ -223,7 +223,7 @@ static bool wm_obj_export_check(bContext *C, wmOperator *op) return changed; } -void WM_OT_obj_export(struct wmOperatorType *ot) +void WM_OT_obj_export(wmOperatorType *ot) { PropertyRNA *prop; @@ -462,7 +462,7 @@ static void wm_obj_import_draw(bContext *C, wmOperator *op) ui_obj_import_settings(op->layout, &ptr); } -void WM_OT_obj_import(struct wmOperatorType *ot) +void WM_OT_obj_import(wmOperatorType *ot) { PropertyRNA *prop; diff --git a/source/blender/editors/io/io_ply_ops.c b/source/blender/editors/io/io_ply_ops.c index 436bf6160c3..890636815c0 100644 --- a/source/blender/editors/io/io_ply_ops.c +++ b/source/blender/editors/io/io_ply_ops.c @@ -146,7 +146,7 @@ static bool wm_ply_export_check(bContext *UNUSED(C), wmOperator *op) return changed; } -void WM_OT_ply_export(struct wmOperatorType *ot) +void WM_OT_ply_export(wmOperatorType *ot) { PropertyRNA *prop; @@ -274,7 +274,7 @@ static int wm_ply_import_execute(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void WM_OT_ply_import(struct wmOperatorType *ot) +void WM_OT_ply_import(wmOperatorType *ot) { PropertyRNA *prop; diff --git a/source/blender/editors/io/io_stl_ops.c b/source/blender/editors/io/io_stl_ops.c index 13b64e6089b..22a4bdfd3aa 100644 --- a/source/blender/editors/io/io_stl_ops.c +++ b/source/blender/editors/io/io_stl_ops.c @@ -86,7 +86,7 @@ static bool wm_stl_import_check(bContext *UNUSED(C), wmOperator *op) return false; } -void WM_OT_stl_import(struct wmOperatorType *ot) +void WM_OT_stl_import(wmOperatorType *ot) { PropertyRNA *prop; diff --git a/source/blender/editors/lattice/editlattice_select.c b/source/blender/editors/lattice/editlattice_select.c index 6e4c8cca857..d8659d8d458 100644 --- a/source/blender/editors/lattice/editlattice_select.c +++ b/source/blender/editors/lattice/editlattice_select.c @@ -60,7 +60,7 @@ static void bpoint_select_set(BPoint *bp, bool select) } } -bool ED_lattice_deselect_all_multi_ex(struct Base **bases, const uint bases_len) +bool ED_lattice_deselect_all_multi_ex(Base **bases, const uint bases_len) { bool changed_multi = false; for (uint base_index = 0; base_index < bases_len; base_index++) { @@ -72,7 +72,7 @@ bool ED_lattice_deselect_all_multi_ex(struct Base **bases, const uint bases_len) return changed_multi; } -bool ED_lattice_deselect_all_multi(struct bContext *C) +bool ED_lattice_deselect_all_multi(bContext *C) { Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); ViewContext vc; diff --git a/source/blender/editors/lattice/editlattice_undo.c b/source/blender/editors/lattice/editlattice_undo.c index d8900781d2a..379e53dc61c 100644 --- a/source/blender/editors/lattice/editlattice_undo.c +++ b/source/blender/editors/lattice/editlattice_undo.c @@ -192,7 +192,7 @@ static bool lattice_undosys_poll(bContext *C) return editlatt_object_from_context(C) != NULL; } -static bool lattice_undosys_step_encode(struct bContext *C, Main *bmain, UndoStep *us_p) +static bool lattice_undosys_step_encode(bContext *C, Main *bmain, UndoStep *us_p) { LatticeUndoStep *us = (LatticeUndoStep *)us_p; @@ -223,8 +223,8 @@ static bool lattice_undosys_step_encode(struct bContext *C, Main *bmain, UndoSte return true; } -static void lattice_undosys_step_decode(struct bContext *C, - struct Main *bmain, +static void lattice_undosys_step_decode(bContext *C, + Main *bmain, UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final)) diff --git a/source/blender/editors/mask/mask_draw.cc b/source/blender/editors/mask/mask_draw.cc index c42f81e03f7..27834aed9b6 100644 --- a/source/blender/editors/mask/mask_draw.cc +++ b/source/blender/editors/mask/mask_draw.cc @@ -658,7 +658,7 @@ void ED_mask_draw_region( /* optional - only used when do_post_draw is set or called from clip editor */ const bContext *C) { - struct View2D *v2d = ®ion->v2d; + View2D *v2d = ®ion->v2d; Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_->id); /* aspect always scales vertically in movie and image spaces */ diff --git a/source/blender/editors/mask/mask_edit.cc b/source/blender/editors/mask/mask_edit.cc index 8d8434a4b8e..5a94bebed72 100644 --- a/source/blender/editors/mask/mask_edit.cc +++ b/source/blender/editors/mask/mask_edit.cc @@ -229,7 +229,7 @@ void ED_mask_view_lock_state_restore_no_jump(const bContext *C, const MaskViewLo * calculation of new offset for the view for an updated state of mask to cancel the offset out * by modifying locked offset. In order to do such calculation mask needs to be evaluated after * modification by an operator. */ - struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); (void)depsgraph; ED_clip_view_lock_state_restore_no_jump(C, &state->space_clip_state); diff --git a/source/blender/editors/mask/mask_query.cc b/source/blender/editors/mask/mask_query.cc index 6a03096b9fd..a636fcaf56d 100644 --- a/source/blender/editors/mask/mask_query.cc +++ b/source/blender/editors/mask/mask_query.cc @@ -33,7 +33,7 @@ * \{ */ bool ED_mask_find_nearest_diff_point(const bContext *C, - struct Mask *mask_orig, + Mask *mask_orig, const float normal_co[2], int threshold, bool feather, diff --git a/source/blender/editors/mesh/editmesh_add_gizmo.c b/source/blender/editors/mesh/editmesh_add_gizmo.c index 3dc2fe2763f..f1be614a010 100644 --- a/source/blender/editors/mesh/editmesh_add_gizmo.c +++ b/source/blender/editors/mesh/editmesh_add_gizmo.c @@ -105,7 +105,7 @@ static void calc_initial_placement_point_from_view(bContext *C, * \{ */ typedef struct GizmoPlacementGroup { - struct wmGizmo *cage; + wmGizmo *cage; struct { bContext *context; wmOperator *op; @@ -236,7 +236,7 @@ static void gizmo_mesh_placement_setup(const bContext *C, wmGizmoGroup *gzgroup) return; } - struct GizmoPlacementGroup *ggd = MEM_callocN(sizeof(GizmoPlacementGroup), __func__); + GizmoPlacementGroup *ggd = MEM_callocN(sizeof(GizmoPlacementGroup), __func__); gzgroup->customdata = ggd; const wmGizmoType *gzt_cage = WM_gizmotype_find("GIZMO_GT_cage_3d", true); @@ -262,7 +262,7 @@ static void gizmo_mesh_placement_setup(const bContext *C, wmGizmoGroup *gzgroup) { WM_gizmo_target_property_def_func(ggd->cage, "matrix", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_placement_prop_matrix_get, .value_set_fn = gizmo_placement_prop_matrix_set, .range_get_fn = NULL, @@ -282,7 +282,7 @@ static void gizmo_mesh_placement_draw_prepare(const bContext *UNUSED(C), wmGizmo gizmo_mesh_placement_update_from_op(ggd); } -static void MESH_GGT_add_bounds(struct wmGizmoGroupType *gzgt) +static void MESH_GGT_add_bounds(wmGizmoGroupType *gzgt) { gzgt->name = "Mesh Add Bounds"; gzgt->idname = "MESH_GGT_add_bounds"; diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index ddb7a90e400..4e2d04df691 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -393,10 +393,10 @@ static int mesh_bisect_exec(bContext *C, wmOperator *op) } #ifdef USE_GIZMO -static void MESH_GGT_bisect(struct wmGizmoGroupType *gzgt); +static void MESH_GGT_bisect(wmGizmoGroupType *gzgt); #endif -void MESH_OT_bisect(struct wmOperatorType *ot) +void MESH_OT_bisect(wmOperatorType *ot) { PropertyRNA *prop; @@ -471,11 +471,11 @@ void MESH_OT_bisect(struct wmOperatorType *ot) typedef struct GizmoGroup { /* Arrow to change plane depth. */ - struct wmGizmo *translate_z; + wmGizmo *translate_z; /* Translate XYZ */ - struct wmGizmo *translate_c; + wmGizmo *translate_c; /* For grabbing the gizmo and moving freely. */ - struct wmGizmo *rotate_c; + wmGizmo *rotate_c; /* We could store more vars here! */ struct { @@ -681,7 +681,7 @@ static void gizmo_mesh_bisect_setup(const bContext *C, wmGizmoGroup *gzgroup) return; } - struct GizmoGroup *ggd = MEM_callocN(sizeof(GizmoGroup), __func__); + GizmoGroup *ggd = MEM_callocN(sizeof(GizmoGroup), __func__); gzgroup->customdata = ggd; const wmGizmoType *gzt_arrow = WM_gizmotype_find("GIZMO_GT_arrow_3d", true); @@ -715,7 +715,7 @@ static void gizmo_mesh_bisect_setup(const bContext *C, wmGizmoGroup *gzgroup) { WM_gizmo_target_property_def_func(ggd->translate_z, "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_bisect_prop_depth_get, .value_set_fn = gizmo_bisect_prop_depth_set, .range_get_fn = NULL, @@ -724,7 +724,7 @@ static void gizmo_mesh_bisect_setup(const bContext *C, wmGizmoGroup *gzgroup) WM_gizmo_target_property_def_func(ggd->translate_c, "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_bisect_prop_translate_get, .value_set_fn = gizmo_bisect_prop_translate_set, .range_get_fn = NULL, @@ -733,7 +733,7 @@ static void gizmo_mesh_bisect_setup(const bContext *C, wmGizmoGroup *gzgroup) WM_gizmo_target_property_def_func(ggd->rotate_c, "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_bisect_prop_angle_get, .value_set_fn = gizmo_bisect_prop_angle_set, .range_get_fn = NULL, @@ -751,7 +751,7 @@ static void gizmo_mesh_bisect_draw_prepare(const bContext *UNUSED(C), wmGizmoGro gizmo_mesh_bisect_update_from_op(ggd); } -static void MESH_GGT_bisect(struct wmGizmoGroupType *gzgt) +static void MESH_GGT_bisect(wmGizmoGroupType *gzgt) { gzgt->name = "Mesh Bisect"; gzgt->idname = "MESH_GGT_bisect"; diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c index b1922905d93..7ec58b77dbf 100644 --- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c +++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c @@ -444,7 +444,7 @@ static void gizmo_mesh_spin_init_message_subscribe(const bContext *C, __func__); } -void MESH_GGT_spin(struct wmGizmoGroupType *gzgt) +void MESH_GGT_spin(wmGizmoGroupType *gzgt) { gzgt->name = "Mesh Spin Init"; gzgt->idname = "MESH_GGT_spin"; @@ -485,17 +485,17 @@ void MESH_GGT_spin(struct wmGizmoGroupType *gzgt) typedef struct GizmoGroupData_SpinRedo { /* Translate XYZ. */ - struct wmGizmo *translate_c; + wmGizmo *translate_c; /* Spin angle */ - struct wmGizmo *angle_z; + wmGizmo *angle_z; /* Translate XY constrained ('orient_mat'). */ - struct wmGizmo *translate_xy[2]; + wmGizmo *translate_xy[2]; /* Rotate XY constrained ('orient_mat'). */ - struct wmGizmo *rotate_xy[2]; + wmGizmo *rotate_xy[2]; /* Rotate on view axis. */ - struct wmGizmo *rotate_view; + wmGizmo *rotate_view; struct { float plane_co[3]; @@ -953,7 +953,7 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) { WM_gizmo_target_property_def_func(ggd->translate_c, "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_spin_prop_translate_get, .value_set_fn = gizmo_spin_prop_translate_set, .range_get_fn = NULL, @@ -962,7 +962,7 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) WM_gizmo_target_property_def_func(ggd->rotate_view, "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_spin_prop_axis_angle_get, .value_set_fn = gizmo_spin_prop_axis_angle_set, .range_get_fn = NULL, @@ -972,7 +972,7 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) for (int i = 0; i < 2; i++) { WM_gizmo_target_property_def_func(ggd->rotate_xy[i], "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_spin_prop_axis_angle_get, .value_set_fn = gizmo_spin_prop_axis_angle_set, .range_get_fn = NULL, @@ -980,7 +980,7 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) }); WM_gizmo_target_property_def_func(ggd->translate_xy[i], "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_spin_prop_depth_get, .value_set_fn = gizmo_spin_prop_depth_set, .range_get_fn = NULL, @@ -990,7 +990,7 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) WM_gizmo_target_property_def_func(ggd->angle_z, "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_spin_prop_angle_get, .value_set_fn = gizmo_spin_prop_angle_set, .range_get_fn = NULL, @@ -1046,7 +1046,7 @@ static void gizmo_mesh_spin_redo_draw_prepare(const bContext *UNUSED(C), wmGizmo } } -void MESH_GGT_spin_redo(struct wmGizmoGroupType *gzgt) +void MESH_GGT_spin_redo(wmGizmoGroupType *gzgt) { gzgt->name = "Mesh Spin Redo"; gzgt->idname = "MESH_GGT_spin_redo"; diff --git a/source/blender/editors/mesh/editmesh_intersect.c b/source/blender/editors/mesh/editmesh_intersect.c index 482b4fbe1b6..7d3e4232ce0 100644 --- a/source/blender/editors/mesh/editmesh_intersect.c +++ b/source/blender/editors/mesh/editmesh_intersect.c @@ -270,7 +270,7 @@ static void edbm_intersect_ui(bContext *UNUSED(C), wmOperator *op) } } -void MESH_OT_intersect(struct wmOperatorType *ot) +void MESH_OT_intersect(wmOperatorType *ot) { static const EnumPropertyItem isect_mode_items[] = { {ISECT_SEL, "SELECT", 0, "Self Intersect", "Self intersect selected faces"}, @@ -434,7 +434,7 @@ static void edbm_intersect_boolean_ui(bContext *UNUSED(C), wmOperator *op) } } -void MESH_OT_intersect_boolean(struct wmOperatorType *ot) +void MESH_OT_intersect_boolean(wmOperatorType *ot) { static const EnumPropertyItem isect_boolean_operation_items[] = { {BMESH_ISECT_BOOLEAN_ISECT, "INTERSECT", 0, "Intersect", ""}, @@ -1086,7 +1086,7 @@ static int edbm_face_split_by_edges_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void MESH_OT_face_split_by_edges(struct wmOperatorType *ot) +void MESH_OT_face_split_by_edges(wmOperatorType *ot) { /* identifiers */ ot->name = "Weld Edges into Faces"; diff --git a/source/blender/editors/mesh/editmesh_knife_project.cc b/source/blender/editors/mesh/editmesh_knife_project.cc index b3b6db03990..f4ce806d5a2 100644 --- a/source/blender/editors/mesh/editmesh_knife_project.cc +++ b/source/blender/editors/mesh/editmesh_knife_project.cc @@ -44,7 +44,7 @@ static LinkNode *knifeproject_poly_from_object(const bContext *C, Object *ob, Li { Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); ARegion *region = CTX_wm_region(C); - const struct Mesh *me_eval; + const Mesh *me_eval; bool me_eval_needs_free; if (ob->type == OB_MESH || ob->runtime.data_eval) { diff --git a/source/blender/editors/mesh/editmesh_preselect_elem.c b/source/blender/editors/mesh/editmesh_preselect_elem.c index 978677fe5cf..411eb7461f2 100644 --- a/source/blender/editors/mesh/editmesh_preselect_elem.c +++ b/source/blender/editors/mesh/editmesh_preselect_elem.c @@ -376,11 +376,8 @@ void EDBM_preselect_elem_update_from_single(struct EditMesh_PreSelElem *psel, } } -void EDBM_preselect_elem_update_preview(struct EditMesh_PreSelElem *psel, - struct ViewContext *vc, - struct BMesh *bm, - struct BMElem *ele, - const int mval[2]) +void EDBM_preselect_elem_update_preview( + struct EditMesh_PreSelElem *psel, ViewContext *vc, BMesh *bm, BMElem *ele, const int mval[2]) { EDBM_preselect_preview_clear(psel); diff --git a/source/blender/editors/mesh/editmesh_select.cc b/source/blender/editors/mesh/editmesh_select.cc index a351af39e56..483f3ede499 100644 --- a/source/blender/editors/mesh/editmesh_select.cc +++ b/source/blender/editors/mesh/editmesh_select.cc @@ -2811,7 +2811,7 @@ bool EDBM_selectmode_disable_multi(bContext *C, * \{ */ struct BMFaceLink { - struct BMFaceLink *next, *prev; + BMFaceLink *next, *prev; BMFace *face; float area; }; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index ac31121b647..3e1014e942b 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -556,7 +556,7 @@ UvMapVert *BM_uv_vert_map_at_index(UvVertMap *vmap, uint v) return vmap->vert[v]; } -struct UvElement **BM_uv_element_map_ensure_head_table(struct UvElementMap *element_map) +UvElement **BM_uv_element_map_ensure_head_table(UvElementMap *element_map) { if (element_map->head_table) { return element_map->head_table; @@ -582,7 +582,7 @@ struct UvElement **BM_uv_element_map_ensure_head_table(struct UvElementMap *elem return element_map->head_table; } -int *BM_uv_element_map_ensure_unique_index(struct UvElementMap *element_map) +int *BM_uv_element_map_ensure_unique_index(UvElementMap *element_map) { if (!element_map->unique_index_table) { element_map->unique_index_table = MEM_callocN( @@ -611,7 +611,7 @@ int *BM_uv_element_map_ensure_unique_index(struct UvElementMap *element_map) return element_map->unique_index_table; } -int BM_uv_element_get_unique_index(struct UvElementMap *element_map, struct UvElement *child) +int BM_uv_element_get_unique_index(UvElementMap *element_map, UvElement *child) { int *unique_index = BM_uv_element_map_ensure_unique_index(element_map); int index = child - element_map->storage; @@ -1697,7 +1697,7 @@ void EDBM_update(Mesh *mesh, const struct EDBMUpdate_Params *params) #endif } -void EDBM_update_extern(struct Mesh *me, const bool do_tessellation, const bool is_destructive) +void EDBM_update_extern(Mesh *me, const bool do_tessellation, const bool is_destructive) { EDBM_update(me, &(const struct EDBMUpdate_Params){ @@ -1832,7 +1832,7 @@ BMElem *EDBM_elem_from_index_any_multi(const Scene *scene, * \{ */ static BMFace *edge_ray_cast( - struct BMBVHTree *tree, const float co[3], const float dir[3], float *r_hitout, BMEdge *e) + BMBVHTree *tree, const float co[3], const float dir[3], float *r_hitout, BMEdge *e) { BMFace *f = BKE_bmbvh_ray_cast(tree, co, dir, 0.0f, NULL, r_hitout, NULL); @@ -1850,12 +1850,8 @@ static void scale_point(float c1[3], const float p[3], const float s) add_v3_v3(c1, p); } -bool BMBVH_EdgeVisible(struct BMBVHTree *tree, - BMEdge *e, - struct Depsgraph *depsgraph, - ARegion *region, - View3D *v3d, - Object *obedit) +bool BMBVH_EdgeVisible( + BMBVHTree *tree, BMEdge *e, Depsgraph *depsgraph, ARegion *region, View3D *v3d, Object *obedit) { BMFace *f; float co1[3], co2[3], co3[3], dir1[3], dir2[3], dir3[3]; @@ -1929,7 +1925,7 @@ void EDBM_project_snap_verts( ED_view3d_init_mats_rv3d(obedit, region->regiondata); Scene *scene = CTX_data_scene(C); - struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create(scene, 0); + SnapObjectContext *snap_context = ED_transform_snap_object_context_create(scene, 0); eSnapTargetOP target_op = SCE_SNAP_TARGET_NOT_ACTIVE; const int snap_flag = scene->toolsettings->snap_flag; diff --git a/source/blender/editors/metaball/editmball_undo.c b/source/blender/editors/metaball/editmball_undo.c index 4b97105af2f..efba045e56e 100644 --- a/source/blender/editors/metaball/editmball_undo.c +++ b/source/blender/editors/metaball/editmball_undo.c @@ -148,7 +148,7 @@ static bool mball_undosys_poll(bContext *C) return editmball_object_from_context(C) != NULL; } -static bool mball_undosys_step_encode(struct bContext *C, struct Main *bmain, UndoStep *us_p) +static bool mball_undosys_step_encode(bContext *C, Main *bmain, UndoStep *us_p) { MBallUndoStep *us = (MBallUndoStep *)us_p; @@ -179,8 +179,8 @@ static bool mball_undosys_step_encode(struct bContext *C, struct Main *bmain, Un return true; } -static void mball_undosys_step_decode(struct bContext *C, - struct Main *bmain, +static void mball_undosys_step_decode(bContext *C, + Main *bmain, UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final)) diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index 9f6abce81e2..fac06d51115 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -504,7 +504,7 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot) +void MBALL_OT_select_random_metaelems(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Random"; diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc index c275bd71890..3320bdcf39f 100644 --- a/source/blender/editors/object/object_add.cc +++ b/source/blender/editors/object/object_add.cc @@ -379,9 +379,7 @@ float ED_object_new_primitive_matrix(bContext *C, /** \name Add Object Operator * \{ */ -static void view_align_update(struct Main * /*main*/, - struct Scene * /*scene*/, - struct PointerRNA *ptr) +static void view_align_update(Main * /*main*/, Scene * /*scene*/, PointerRNA *ptr) { RNA_struct_idprops_unset(ptr, "rotation"); } diff --git a/source/blender/editors/object/object_data_transform.cc b/source/blender/editors/object/object_data_transform.cc index 7be0d9b86ca..77a8aa028a1 100644 --- a/source/blender/editors/object/object_data_transform.cc +++ b/source/blender/editors/object/object_data_transform.cc @@ -219,9 +219,9 @@ struct ElemData_MetaBall { float rad; }; -static void metaball_coords_and_quats_get(const MetaBall *mb, struct ElemData_MetaBall *elem_array) +static void metaball_coords_and_quats_get(const MetaBall *mb, ElemData_MetaBall *elem_array) { - struct ElemData_MetaBall *elem = elem_array; + ElemData_MetaBall *elem = elem_array; for (const MetaElem *ml = static_cast(mb->elems.first); ml; ml = ml->next, elem++) { @@ -233,10 +233,10 @@ static void metaball_coords_and_quats_get(const MetaBall *mb, struct ElemData_Me } static void metaball_coords_and_quats_apply_with_mat4(MetaBall *mb, - const struct ElemData_MetaBall *elem_array, + const ElemData_MetaBall *elem_array, const float mat[4][4]) { - const struct ElemData_MetaBall *elem = elem_array; + const ElemData_MetaBall *elem = elem_array; for (MetaElem *ml = static_cast(mb->elems.first); ml; ml = ml->next, elem++) { copy_v3_v3(&ml->x, elem->co); copy_qt_qt(ml->quat, elem->quat); @@ -246,8 +246,7 @@ static void metaball_coords_and_quats_apply_with_mat4(MetaBall *mb, BKE_mball_transform(mb, mat, true); } -static void metaball_coords_and_quats_apply(MetaBall *mb, - const struct ElemData_MetaBall *elem_array) +static void metaball_coords_and_quats_apply(MetaBall *mb, const ElemData_MetaBall *elem_array) { /* Avoid code duplication by using a unit matrix. */ float mat[4][4]; @@ -487,17 +486,17 @@ XFormObjectData *ED_object_data_xform_create_ex(ID *id, bool is_edit_mode) return xod_base; } -struct XFormObjectData *ED_object_data_xform_create(ID *id) +XFormObjectData *ED_object_data_xform_create(ID *id) { return ED_object_data_xform_create_ex(id, false); } -struct XFormObjectData *ED_object_data_xform_create_from_edit_mode(ID *id) +XFormObjectData *ED_object_data_xform_create_from_edit_mode(ID *id) { return ED_object_data_xform_create_ex(id, true); } -void ED_object_data_xform_destroy(struct XFormObjectData *xod_base) +void ED_object_data_xform_destroy(XFormObjectData *xod_base) { switch (GS(xod_base->id->name)) { case ID_ME: { @@ -528,7 +527,7 @@ void ED_object_data_xform_destroy(struct XFormObjectData *xod_base) MEM_freeN(xod_base); } -void ED_object_data_xform_by_mat4(struct XFormObjectData *xod_base, const float mat[4][4]) +void ED_object_data_xform_by_mat4(XFormObjectData *xod_base, const float mat[4][4]) { switch (GS(xod_base->id->name)) { case ID_ME: { @@ -635,7 +634,7 @@ void ED_object_data_xform_by_mat4(struct XFormObjectData *xod_base, const float } } -void ED_object_data_xform_restore(struct XFormObjectData *xod_base) +void ED_object_data_xform_restore(XFormObjectData *xod_base) { switch (GS(xod_base->id->name)) { case ID_ME: { @@ -734,7 +733,7 @@ void ED_object_data_xform_restore(struct XFormObjectData *xod_base) } } -void ED_object_data_xform_tag_update(struct XFormObjectData *xod_base) +void ED_object_data_xform_tag_update(XFormObjectData *xod_base) { switch (GS(xod_base->id->name)) { case ID_ME: { diff --git a/source/blender/editors/object/object_facemap_ops.c b/source/blender/editors/object/object_facemap_ops.c index 2c71b7e95d8..9df0ca01eab 100644 --- a/source/blender/editors/object/object_facemap_ops.c +++ b/source/blender/editors/object/object_facemap_ops.c @@ -186,7 +186,7 @@ static int face_map_add_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void OBJECT_OT_face_map_add(struct wmOperatorType *ot) +void OBJECT_OT_face_map_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Face Map"; @@ -215,7 +215,7 @@ static int face_map_remove_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void OBJECT_OT_face_map_remove(struct wmOperatorType *ot) +void OBJECT_OT_face_map_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Face Map"; @@ -264,7 +264,7 @@ static int face_map_assign_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void OBJECT_OT_face_map_assign(struct wmOperatorType *ot) +void OBJECT_OT_face_map_assign(wmOperatorType *ot) { /* identifiers */ ot->name = "Assign Face Map"; @@ -314,7 +314,7 @@ static int face_map_remove_from_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void OBJECT_OT_face_map_remove_from(struct wmOperatorType *ot) +void OBJECT_OT_face_map_remove_from(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove from Face Map"; @@ -369,7 +369,7 @@ static int face_map_select_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void OBJECT_OT_face_map_select(struct wmOperatorType *ot) +void OBJECT_OT_face_map_select(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Face Map Faces"; @@ -399,7 +399,7 @@ static int face_map_deselect_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void OBJECT_OT_face_map_deselect(struct wmOperatorType *ot) +void OBJECT_OT_face_map_deselect(wmOperatorType *ot) { /* identifiers */ ot->name = "Deselect Face Map Faces"; diff --git a/source/blender/editors/object/object_light_linking_ops.cc b/source/blender/editors/object/object_light_linking_ops.cc index d8530e6ecbb..12431cc9774 100644 --- a/source/blender/editors/object/object_light_linking_ops.cc +++ b/source/blender/editors/object/object_light_linking_ops.cc @@ -257,7 +257,7 @@ static int light_linking_unlink_from_collection_exec(bContext *C, wmOperator *op return OPERATOR_FINISHED; } -void OBJECT_OT_light_linking_unlink_from_collection(struct wmOperatorType *ot) +void OBJECT_OT_light_linking_unlink_from_collection(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove From Light Linking Collection"; diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc index e93047b8cbb..75186d85c19 100644 --- a/source/blender/editors/object/object_modifier.cc +++ b/source/blender/editors/object/object_modifier.cc @@ -101,7 +101,7 @@ using blender::Span; static CLG_LogRef LOG = {"ed.object"}; -static void modifier_skin_customdata_delete(struct Object *ob); +static void modifier_skin_customdata_delete(Object *ob); /* ------------------------------------------------------------------- */ /** \name Public Api @@ -1881,9 +1881,9 @@ static int modifier_apply_as_shapekey_invoke(bContext *C, wmOperator *op, const return retval; } -static char *modifier_apply_as_shapekey_get_description(struct bContext * /*C*/, - struct wmOperatorType * /*op*/, - struct PointerRNA *values) +static char *modifier_apply_as_shapekey_get_description(bContext * /*C*/, + wmOperatorType * /*op*/, + PointerRNA *values) { bool keep = RNA_boolean_get(values, "keep_modifier"); @@ -3285,13 +3285,13 @@ static bool ocean_bake_poll(bContext *C) struct OceanBakeJob { /* from wmJob */ - struct Object *owner; + Object *owner; bool *stop, *do_update; float *progress; int current_frame; - struct OceanCache *och; - struct Ocean *ocean; - struct OceanModifierData *omd; + OceanCache *och; + Ocean *ocean; + OceanModifierData *omd; }; static void oceanbake_free(void *customdata) @@ -3409,7 +3409,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) } /* Make a copy of ocean to use for baking - thread-safety. */ - struct Ocean *ocean = BKE_ocean_add(); + Ocean *ocean = BKE_ocean_add(); BKE_ocean_init_from_modifier(ocean, omd, omd->resolution); #if 0 diff --git a/source/blender/editors/object/object_random.c b/source/blender/editors/object/object_random.c index b1f8ef4ac8b..2d7a136982a 100644 --- a/source/blender/editors/object/object_random.c +++ b/source/blender/editors/object/object_random.c @@ -39,7 +39,7 @@ static bool object_rand_transverts(TransVertStore *tvs, const uint seed) { bool use_normal = (normal_factor != 0.0f); - struct RNG *rng; + RNG *rng; TransVert *tv; int a; @@ -130,7 +130,7 @@ static int object_rand_verts_exec(bContext *C, wmOperator *op) return changed_multi ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } -void TRANSFORM_OT_vertex_random(struct wmOperatorType *ot) +void TRANSFORM_OT_vertex_random(wmOperatorType *ot) { /* identifiers */ ot->name = "Randomize"; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 00a1912f587..0a476e1d4a4 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -837,7 +837,7 @@ static bool parent_set_nonvertex_parent(bContext *C, struct ParentingContext *pa static bool parent_set_vertex_parent_with_kdtree(bContext *C, struct ParentingContext *parenting_context, - struct KDTree_3d *tree) + KDTree_3d *tree) { int vert_par[3] = {0, 0, 0}; @@ -868,7 +868,7 @@ static bool parent_set_vertex_parent_with_kdtree(bContext *C, static bool parent_set_vertex_parent(bContext *C, struct ParentingContext *parenting_context) { - struct KDTree_3d *tree = NULL; + KDTree_3d *tree = NULL; int tree_tot; tree = BKE_object_as_kdtree(parenting_context->par, &tree_tot); diff --git a/source/blender/editors/object/object_remesh.cc b/source/blender/editors/object/object_remesh.cc index f8f79dbda0a..964801426fc 100644 --- a/source/blender/editors/object/object_remesh.cc +++ b/source/blender/editors/object/object_remesh.cc @@ -653,11 +653,11 @@ enum eSymmetryAxes { struct QuadriFlowJob { /* from wmJob */ - struct Object *owner; + Object *owner; bool *stop, *do_update; float *progress; - const struct wmOperator *op; + const wmOperator *op; Scene *scene; int target_faces; int seed; diff --git a/source/blender/editors/object/object_transform.cc b/source/blender/editors/object/object_transform.cc index a493d3ae903..5b82ba156a6 100644 --- a/source/blender/editors/object/object_transform.cc +++ b/source/blender/editors/object/object_transform.cc @@ -320,8 +320,8 @@ static int object_clear_transform_generic_exec(bContext *C, SCE_XFORM_SKIP_CHILDREN); const bool use_transform_data_origin = (scene->toolsettings->transform_flag & SCE_XFORM_DATA_ORIGIN); - struct XFormObjectSkipChild_Container *xcs = nullptr; - struct XFormObjectData_Container *xds = nullptr; + XFormObjectSkipChild_Container *xcs = nullptr; + XFormObjectData_Container *xds = nullptr; if (use_transform_skip_children) { BKE_scene_graph_evaluated_ensure(depsgraph, bmain); diff --git a/source/blender/editors/object/object_utils.c b/source/blender/editors/object/object_utils.c index a3d39013de7..d82c0fa396b 100644 --- a/source/blender/editors/object/object_utils.c +++ b/source/blender/editors/object/object_utils.c @@ -261,7 +261,7 @@ void ED_object_xform_skip_child_container_item_ensure(struct XFormObjectSkipChil void ED_object_xform_skip_child_container_update_all(struct XFormObjectSkipChild_Container *xcs, struct Main *bmain, - struct Depsgraph *depsgraph) + Depsgraph *depsgraph) { BKE_scene_graph_evaluated_ensure(depsgraph, bmain); diff --git a/source/blender/editors/object/object_warp.c b/source/blender/editors/object/object_warp.c index d335a0009d4..0bc2005014e 100644 --- a/source/blender/editors/object/object_warp.c +++ b/source/blender/editors/object/object_warp.c @@ -241,7 +241,7 @@ static int object_warp_verts_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void TRANSFORM_OT_vertex_warp(struct wmOperatorType *ot) +void TRANSFORM_OT_vertex_warp(wmOperatorType *ot) { PropertyRNA *prop; diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 47a3473ff06..aa369ab7499 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -291,7 +291,7 @@ typedef struct DynamicPaintBakeJob { bool *stop, *do_update; float *progress; - struct Main *bmain; + Main *bmain; Scene *scene; Depsgraph *depsgraph; Object *ob; @@ -459,7 +459,7 @@ static void dpaint_bake_startjob(void *customdata, bool *stop, bool *do_update, /* * Bake Dynamic Paint image sequence surface */ -static int dynamicpaint_bake_exec(struct bContext *C, struct wmOperator *op) +static int dynamicpaint_bake_exec(bContext *C, wmOperator *op) { Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); Object *ob_ = ED_object_context(C); diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index da82b0272c8..f3d24becd59 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -2349,7 +2349,7 @@ static void pe_select_cache_free_generic_userdata(void *data) static void pe_select_cache_init_with_generic_userdata(bContext *C, wmGenericUserData *wm_userdata) { - struct PEData *data = MEM_callocN(sizeof(*data), __func__); + PEData *data = MEM_callocN(sizeof(*data), __func__); wm_userdata->data = data; wm_userdata->free_fn = pe_select_cache_free_generic_userdata; wm_userdata->use_free = true; @@ -5695,7 +5695,7 @@ static int unify_length_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void PARTICLE_OT_unify_length(struct wmOperatorType *ot) +void PARTICLE_OT_unify_length(wmOperatorType *ot) { /* identifiers */ ot->name = "Unify Length"; diff --git a/source/blender/editors/physics/particle_edit_undo.c b/source/blender/editors/physics/particle_edit_undo.c index 2363a0f5673..b57f1b15b6b 100644 --- a/source/blender/editors/physics/particle_edit_undo.c +++ b/source/blender/editors/physics/particle_edit_undo.c @@ -208,7 +208,7 @@ typedef struct ParticleUndoStep { PTCacheUndo data; } ParticleUndoStep; -static bool particle_undosys_poll(struct bContext *C) +static bool particle_undosys_poll(bContext *C) { Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); Scene *scene = CTX_data_scene(C); @@ -220,9 +220,7 @@ static bool particle_undosys_poll(struct bContext *C) return (edit != NULL); } -static bool particle_undosys_step_encode(struct bContext *C, - struct Main *UNUSED(bmain), - UndoStep *us_p) +static bool particle_undosys_step_encode(bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p) { Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); ParticleUndoStep *us = (ParticleUndoStep *)us_p; @@ -235,7 +233,7 @@ static bool particle_undosys_step_encode(struct bContext *C, return true; } -static void particle_undosys_step_decode(struct bContext *C, +static void particle_undosys_step_decode(bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p, const eUndoStepDir UNUSED(dir), diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index e52658cb1d0..85b51a40224 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -67,7 +67,7 @@ typedef struct FluidJob { const char *type; const char *name; - struct Main *bmain; + Main *bmain; Scene *scene; Depsgraph *depsgraph; Object *ob; @@ -513,7 +513,7 @@ static void fluid_free_startjob(void *customdata, bool *stop, bool *do_update, f /***************************** Operators ******************************/ -static int fluid_bake_exec(struct bContext *C, struct wmOperator *op) +static int fluid_bake_exec(bContext *C, wmOperator *op) { FluidJob *job = MEM_mallocN(sizeof(FluidJob), "FluidJob"); char error_msg[256] = "\0"; @@ -538,9 +538,7 @@ static int fluid_bake_exec(struct bContext *C, struct wmOperator *op) return OPERATOR_FINISHED; } -static int fluid_bake_invoke(struct bContext *C, - struct wmOperator *op, - const wmEvent *UNUSED(_event)) +static int fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(_event)) { Scene *scene = CTX_data_scene(C); FluidJob *job = MEM_mallocN(sizeof(FluidJob), "FluidJob"); @@ -595,7 +593,7 @@ static int fluid_bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent * return OPERATOR_PASS_THROUGH; } -static int fluid_free_exec(struct bContext *C, struct wmOperator *op) +static int fluid_free_exec(bContext *C, wmOperator *op) { FluidModifierData *fmd = NULL; FluidDomainSettings *fds; @@ -660,7 +658,7 @@ static int fluid_free_exec(struct bContext *C, struct wmOperator *op) return OPERATOR_FINISHED; } -static int fluid_pause_exec(struct bContext *C, struct wmOperator *op) +static int fluid_pause_exec(bContext *C, wmOperator *op) { FluidModifierData *fmd = NULL; FluidDomainSettings *fds; diff --git a/source/blender/editors/render/render_internal.cc b/source/blender/editors/render/render_internal.cc index b6a27fb9d56..1fa91b08217 100644 --- a/source/blender/editors/render/render_internal.cc +++ b/source/blender/editors/render/render_internal.cc @@ -82,7 +82,7 @@ struct RenderJob { */ Depsgraph *depsgraph; Render *re; - struct Object *camera_override; + Object *camera_override; bool v3d_override; bool anim, write_still; Image *image; @@ -312,7 +312,7 @@ static int screen_render_exec(bContext *C, wmOperator *op) Main *mainp = CTX_data_main(C); const bool is_animation = RNA_boolean_get(op->ptr, "animation"); const bool is_write_still = RNA_boolean_get(op->ptr, "write_still"); - struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : nullptr; + Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : nullptr; /* Cannot do render if there is not this function. */ if (re_type->render == nullptr) { @@ -939,7 +939,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even const bool is_write_still = RNA_boolean_get(op->ptr, "write_still"); const bool use_viewport = RNA_boolean_get(op->ptr, "use_viewport"); View3D *v3d = use_viewport ? CTX_wm_view3d(C) : nullptr; - struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : nullptr; + Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : nullptr; const char *name; ScrArea *area; diff --git a/source/blender/editors/render/render_opengl.cc b/source/blender/editors/render/render_opengl.cc index 5c3824bbfae..90973dba7ce 100644 --- a/source/blender/editors/render/render_opengl.cc +++ b/source/blender/editors/render/render_opengl.cc @@ -271,7 +271,7 @@ static void screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, R if (oglrender->is_sequencer) { SpaceSeq *sseq = oglrender->sseq; - struct bGPdata *gpd = (sseq && (sseq->flag & SEQ_PREVIEW_SHOW_GPENCIL)) ? sseq->gpd : nullptr; + bGPdata *gpd = (sseq && (sseq->flag & SEQ_PREVIEW_SHOW_GPENCIL)) ? sseq->gpd : nullptr; /* use pre-calculated ImBuf (avoids deadlock), see: */ ImBuf *ibuf = oglrender->seq_data.ibufs_arr[oglrender->view_id]; @@ -1308,9 +1308,9 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static char *screen_opengl_render_description(struct bContext * /*C*/, - struct wmOperatorType * /*ot*/, - struct PointerRNA *ptr) +static char *screen_opengl_render_description(bContext * /*C*/, + wmOperatorType * /*ot*/, + PointerRNA *ptr) { if (!RNA_boolean_get(ptr, "animation")) { return nullptr; diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc index 781d8402c5c..e22f5af4e29 100644 --- a/source/blender/editors/render/render_preview.cc +++ b/source/blender/editors/render/render_preview.cc @@ -131,7 +131,7 @@ struct ShaderPreview { }; struct IconPreviewSize { - struct IconPreviewSize *next, *prev; + IconPreviewSize *next, *prev; int sizex, sizey; uint *rect; }; @@ -148,7 +148,7 @@ struct IconPreview { /* May be nullptr, is used for rendering IDs that require some other object for it to be applied * on before the ID can be represented as an image, for example when rendering an Action. */ - struct Object *active_object; + Object *active_object; }; /** \} */ @@ -805,7 +805,7 @@ static Object *object_preview_camera_create(Main *preview_main, return camera; } -static Scene *object_preview_scene_create(const struct ObjectPreviewData *preview_data, +static Scene *object_preview_scene_create(const ObjectPreviewData *preview_data, Depsgraph **r_depsgraph) { Scene *scene = BKE_scene_add(preview_data->pr_main, "Object preview scene"); @@ -854,7 +854,7 @@ static void object_preview_render(IconPreview *preview, IconPreviewSize *preview BLI_assert(preview->id_copy && (preview->id_copy != preview->id)); - struct ObjectPreviewData preview_data = {}; + ObjectPreviewData preview_data = {}; preview_data.pr_main = preview_main; /* Act on a copy. */ preview_data.object = (Object *)preview->id_copy; @@ -942,7 +942,7 @@ static bool collection_preview_contains_geometry_recursive(const Collection *col /** \name Action Preview * \{ */ -static struct PoseBackup *action_preview_render_prepare(IconPreview *preview) +static PoseBackup *action_preview_render_prepare(IconPreview *preview) { Object *object = preview->active_object; if (object == nullptr) { @@ -957,8 +957,8 @@ static struct PoseBackup *action_preview_render_prepare(IconPreview *preview) } /* Create a backup of the current pose. */ - struct bAction *action = (struct bAction *)preview->id; - struct PoseBackup *pose_backup = BKE_pose_backup_create_all_bones(object, action); + bAction *action = (bAction *)preview->id; + PoseBackup *pose_backup = BKE_pose_backup_create_all_bones(object, action); /* Apply the Action as pose, so that it can be rendered. This assumes the Action represents a * single pose, and that thus the evaluation time doesn't matter. */ @@ -972,7 +972,7 @@ static struct PoseBackup *action_preview_render_prepare(IconPreview *preview) return pose_backup; } -static void action_preview_render_cleanup(IconPreview *preview, struct PoseBackup *pose_backup) +static void action_preview_render_cleanup(IconPreview *preview, PoseBackup *pose_backup) { if (pose_backup == nullptr) { return; @@ -998,7 +998,7 @@ static void action_preview_render(IconPreview *preview, IconPreviewSize *preview BLI_assert(preview->scene == DEG_get_input_scene(depsgraph)); /* Apply the pose before getting the evaluated scene, so that the new pose is evaluated. */ - struct PoseBackup *pose_backup = action_preview_render_prepare(preview); + PoseBackup *pose_backup = action_preview_render_prepare(preview); Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); Object *camera_eval = scene_eval->camera; @@ -1042,7 +1042,7 @@ static void action_preview_render(IconPreview *preview, IconPreviewSize *preview * \{ */ /* inside thread, called by renderer, sets job update value */ -static void shader_preview_update(void *spv, RenderResult * /*rr*/, struct rcti * /*rect*/) +static void shader_preview_update(void *spv, RenderResult * /*rr*/, rcti * /*rect*/) { ShaderPreview *sp = static_cast(spv); @@ -1080,7 +1080,7 @@ static void shader_preview_texture(ShaderPreview *sp, Tex *tex, Scene *sce, Rend RE_ReleaseResult(re); /* Get texture image pool (if any) */ - struct ImagePool *img_pool = BKE_image_pool_new(); + ImagePool *img_pool = BKE_image_pool_new(); BKE_texture_fetch_images_for_pool(tex, img_pool); /* Fill in image buffer. */ @@ -1245,7 +1245,7 @@ static void shader_preview_startjob(void *customdata, bool *stop, bool *do_updat static void preview_id_copy_free(ID *id) { - struct IDProperty *properties; + IDProperty *properties; /* get rid of copied ID */ properties = IDP_GetProperties(id, false); if (properties) { @@ -1348,7 +1348,7 @@ static ImBuf *icon_preview_imbuf_from_brush(Brush *brush) static void icon_copy_rect(ImBuf *ibuf, uint w, uint h, uint *rect) { - struct ImBuf *ima; + ImBuf *ima; uint *drect, *srect; float scaledx, scaledy; short ex, ey, dx, dy; @@ -1737,7 +1737,7 @@ class PreviewLoadJob { ThreadQueue *todo_queue_; /* RequestedPreview * */ /** All unfinished preview requests, #update_fn() calls #finish_preview_request() on loaded * previews and removes them from this list. Only access from the main thread! */ - std::list requested_previews_; + std::list requested_previews_; public: PreviewLoadJob(); @@ -2132,7 +2132,7 @@ void ED_preview_kill_jobs(wmWindowManager *wm, Main * /*bmain*/) } struct PreviewRestartQueueEntry { - struct PreviewRestartQueueEntry *next, *prev; + PreviewRestartQueueEntry *next, *prev; enum eIconSizes size; ID *id; diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc index 04e2b40f215..158b57d2e98 100644 --- a/source/blender/editors/render/render_shading.cc +++ b/source/blender/editors/render/render_shading.cc @@ -2670,7 +2670,7 @@ static int texture_slot_move_exec(bContext *C, wmOperator *op) MTex **mtex_ar, *mtexswap; short act; int type = RNA_enum_get(op->ptr, "type"); - struct AnimData *adt = BKE_animdata_from_id(id); + AnimData *adt = BKE_animdata_from_id(id); give_active_mtex(id, &mtex_ar, &act); diff --git a/source/blender/editors/render/render_view.cc b/source/blender/editors/render/render_view.cc index 518e6573b86..c291a9e3d36 100644 --- a/source/blender/editors/render/render_view.cc +++ b/source/blender/editors/render/render_view.cc @@ -296,7 +296,7 @@ static int render_view_cancel_exec(bContext *C, wmOperator * /*op*/) return OPERATOR_PASS_THROUGH; } -void RENDER_OT_view_cancel(struct wmOperatorType *ot) +void RENDER_OT_view_cancel(wmOperatorType *ot) { /* identifiers */ ot->name = "Cancel Render View"; @@ -362,7 +362,7 @@ static int render_view_show_invoke(bContext *C, wmOperator *op, const wmEvent *e return OPERATOR_FINISHED; } -void RENDER_OT_view_show(struct wmOperatorType *ot) +void RENDER_OT_view_show(wmOperatorType *ot) { /* identifiers */ ot->name = "Show/Hide Render View"; diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 51034d072a1..c37dae606d9 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -560,7 +560,7 @@ int screen_area_join(bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2) return screen_area_join_ex(C, screen, sa1, sa2, false); } -bool screen_area_close(struct bContext *C, bScreen *screen, ScrArea *area) +bool screen_area_close(bContext *C, bScreen *screen, ScrArea *area) { if (area == NULL) { return false; @@ -1887,7 +1887,7 @@ bool ED_screen_stereo3d_required(const bScreen *screen, const Scene *scene) Scene *ED_screen_scene_find_with_window(const bScreen *screen, const wmWindowManager *wm, - struct wmWindow **r_window) + wmWindow **r_window) { LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { if (WM_window_get_active_screen(win) == screen) { diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index eeb345562da..956ff2aba2b 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2100,7 +2100,7 @@ static bool area_split_allowed(const ScrArea *area, const eScreenAxis dir_axis) return true; } -static void area_split_draw_cb(const struct wmWindow *UNUSED(win), void *userdata) +static void area_split_draw_cb(const wmWindow *UNUSED(win), void *userdata) { const wmOperator *op = userdata; @@ -3405,7 +3405,7 @@ typedef struct sAreaJoinData { } sAreaJoinData; -static void area_join_draw_cb(const struct wmWindow *UNUSED(win), void *userdata) +static void area_join_draw_cb(const wmWindow *UNUSED(win), void *userdata) { const wmOperator *op = userdata; @@ -3913,7 +3913,7 @@ static void SCREEN_OT_redo_last(wmOperatorType *ot) /** \name Region Quad-View Operator * \{ */ -static void view3d_localview_update_rv3d(struct RegionView3D *rv3d) +static void view3d_localview_update_rv3d(RegionView3D *rv3d) { if (rv3d->localvd) { rv3d->localvd->view = rv3d->view; @@ -5054,7 +5054,7 @@ static int fullscreen_back_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static void SCREEN_OT_back_to_previous(struct wmOperatorType *ot) +static void SCREEN_OT_back_to_previous(wmOperatorType *ot) { /* identifiers */ ot->name = "Back to Previous Screen"; @@ -5119,7 +5119,7 @@ static int userpref_show_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -static void SCREEN_OT_userpref_show(struct wmOperatorType *ot) +static void SCREEN_OT_userpref_show(wmOperatorType *ot) { PropertyRNA *prop; @@ -5208,7 +5208,7 @@ static int drivers_editor_show_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -static void SCREEN_OT_drivers_editor_show(struct wmOperatorType *ot) +static void SCREEN_OT_drivers_editor_show(wmOperatorType *ot) { /* identifiers */ ot->name = "Show Drivers Editor"; @@ -5254,7 +5254,7 @@ static int info_log_show_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -static void SCREEN_OT_info_log_show(struct wmOperatorType *ot) +static void SCREEN_OT_info_log_show(wmOperatorType *ot) { /* identifiers */ ot->name = "Show Info Log"; diff --git a/source/blender/editors/screen/screen_user_menu.c b/source/blender/editors/screen/screen_user_menu.c index 2282d5ecfca..a0b482346e0 100644 --- a/source/blender/editors/screen/screen_user_menu.c +++ b/source/blender/editors/screen/screen_user_menu.c @@ -118,8 +118,7 @@ bUserMenuItem_Op *ED_screen_user_menu_item_find_operator(ListBase *lb, return NULL; } -struct bUserMenuItem_Menu *ED_screen_user_menu_item_find_menu(struct ListBase *lb, - const struct MenuType *mt) +bUserMenuItem_Menu *ED_screen_user_menu_item_find_menu(ListBase *lb, const MenuType *mt) { LISTBASE_FOREACH (bUserMenuItem *, umi, lb) { if (umi->type == USER_MENU_TYPE_MENU) { @@ -132,10 +131,10 @@ struct bUserMenuItem_Menu *ED_screen_user_menu_item_find_menu(struct ListBase *l return NULL; } -struct bUserMenuItem_Prop *ED_screen_user_menu_item_find_prop(struct ListBase *lb, - const char *context_data_path, - const char *prop_id, - int prop_index) +bUserMenuItem_Prop *ED_screen_user_menu_item_find_prop(ListBase *lb, + const char *context_data_path, + const char *prop_id, + int prop_index) { LISTBASE_FOREACH (bUserMenuItem *, umi, lb) { if (umi->type == USER_MENU_TYPE_PROP) { diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc index f955756dc1d..d06d9a3f76e 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc @@ -164,7 +164,7 @@ static bool stroke_get_location(bContext *C, return true; } -static bool stroke_test_start(bContext *C, struct wmOperator *op, const float mouse[2]) +static bool stroke_test_start(bContext *C, wmOperator *op, const float mouse[2]) { UNUSED_VARS(C, op, mouse); return true; @@ -256,7 +256,7 @@ static void sculpt_curves_stroke_cancel(bContext *C, wmOperator *op) } } -static void SCULPT_CURVES_OT_brush_stroke(struct wmOperatorType *ot) +static void SCULPT_CURVES_OT_brush_stroke(wmOperatorType *ot) { ot->name = "Stroke Curves Sculpt"; ot->idname = "SCULPT_CURVES_OT_brush_stroke"; diff --git a/source/blender/editors/sculpt_paint/grease_pencil_draw_ops.cc b/source/blender/editors/sculpt_paint/grease_pencil_draw_ops.cc index b1e1e8a431f..12bd944be05 100644 --- a/source/blender/editors/sculpt_paint/grease_pencil_draw_ops.cc +++ b/source/blender/editors/sculpt_paint/grease_pencil_draw_ops.cc @@ -67,7 +67,7 @@ static bool stroke_get_location(bContext * /*C*/, return true; } -static bool stroke_test_start(bContext *C, struct wmOperator *op, const float mouse[2]) +static bool stroke_test_start(bContext *C, wmOperator *op, const float mouse[2]) { PaintStroke *paint_stroke = static_cast(op->customdata); @@ -149,7 +149,7 @@ static void grease_pencil_stroke_cancel(bContext *C, wmOperator *op) paint_stroke_cancel(C, op, static_cast(op->customdata)); } -static void GREASE_PENCIL_OT_brush_stroke(struct wmOperatorType *ot) +static void GREASE_PENCIL_OT_brush_stroke(wmOperatorType *ot) { ot->name = "Stroke Curves Sculpt"; ot->idname = "GREASE_PENCIL_OT_brush_stroke"; diff --git a/source/blender/editors/sculpt_paint/paint_canvas.cc b/source/blender/editors/sculpt_paint/paint_canvas.cc index 50f06f26cf0..938bf579d2b 100644 --- a/source/blender/editors/sculpt_paint/paint_canvas.cc +++ b/source/blender/editors/sculpt_paint/paint_canvas.cc @@ -51,7 +51,7 @@ static bool paint_tool_shading_color_follows_last_used(blender::StringRef idname return ELEM(idname, "builtin_brush.Mask"); } -void ED_paint_tool_update_sticky_shading_color(struct bContext *C, struct Object *ob) +void ED_paint_tool_update_sticky_shading_color(bContext *C, Object *ob) { if (ob == nullptr || ob->sculpt == nullptr) { return; @@ -69,7 +69,7 @@ void ED_paint_tool_update_sticky_shading_color(struct bContext *C, struct Object ob->sculpt->sticky_shading_color = paint_tool_uses_canvas(tref->idname); } -static bool paint_tool_shading_color_follows_last_used_tool(struct bContext *C, struct Object *ob) +static bool paint_tool_shading_color_follows_last_used_tool(bContext *C, Object *ob) { if (ob == nullptr || ob->sculpt == nullptr) { return false; @@ -83,7 +83,7 @@ static bool paint_tool_shading_color_follows_last_used_tool(struct bContext *C, return paint_tool_shading_color_follows_last_used(tref->idname); } -bool ED_paint_tool_use_canvas(struct bContext *C, bToolRef *tref) +bool ED_paint_tool_use_canvas(bContext *C, bToolRef *tref) { if (tref == nullptr) { tref = WM_toolsystem_ref_from_context(C); diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc index 01313183f4d..dc3ac1600dc 100644 --- a/source/blender/editors/sculpt_paint/paint_image.cc +++ b/source/blender/editors/sculpt_paint/paint_image.cc @@ -81,7 +81,7 @@ ImagePaintPartialRedraw *get_imapaintpartial(void) return &imapaintpartial; } -void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr) +void set_imapaintpartial(ImagePaintPartialRedraw *ippr) { imapaintpartial = *ippr; } @@ -354,14 +354,14 @@ bool paint_use_opacity_masking(Brush *brush) true); } -void paint_brush_color_get(struct Scene *scene, - struct Brush *br, +void paint_brush_color_get(Scene *scene, + Brush *br, bool color_correction, bool invert, float distance, float pressure, float color[3], - struct ColorManagedDisplay *display) + ColorManagedDisplay *display) { if (invert) { copy_v3_v3(color, BKE_brush_secondary_color_get(scene, br)); @@ -956,7 +956,7 @@ static bool texture_paint_toggle_poll(bContext *C) static int texture_paint_toggle_exec(bContext *C, wmOperator *op) { - struct wmMsgBus *mbus = CTX_wm_message_bus(C); + wmMsgBus *mbus = CTX_wm_message_bus(C); Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); @@ -1068,10 +1068,7 @@ void PAINT_OT_brush_colors_flip(wmOperatorType *ot) /** \name Texture Paint Bucket Fill Operator * \{ */ -void ED_imapaint_bucket_fill(struct bContext *C, - float color[3], - wmOperator *op, - const int mouse[2]) +void ED_imapaint_bucket_fill(bContext *C, float color[3], wmOperator *op, const int mouse[2]) { SpaceImage *sima = CTX_wm_space_image(C); diff --git a/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc b/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc index 842eceb8557..5a2edd391af 100644 --- a/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc +++ b/source/blender/editors/sculpt_paint/paint_image_ops_paint.cc @@ -60,14 +60,14 @@ class AbstractPaintMode { virtual void paint_gradient_fill(const bContext *C, const Scene *scene, Brush *brush, - struct PaintStroke *stroke, + PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) = 0; virtual void paint_bucket_fill(const bContext *C, const Scene *scene, Brush *brush, - struct PaintStroke *stroke, + PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) = 0; @@ -106,7 +106,7 @@ class ImagePaintMode : public AbstractPaintMode { void paint_gradient_fill(const bContext *C, const Scene * /*scene*/, Brush *brush, - struct PaintStroke * /*stroke*/, + PaintStroke * /*stroke*/, void *stroke_handle, float mouse_start[2], float mouse_end[2]) override @@ -117,7 +117,7 @@ class ImagePaintMode : public AbstractPaintMode { void paint_bucket_fill(const bContext *C, const Scene *scene, Brush *brush, - struct PaintStroke *stroke, + PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) override @@ -166,7 +166,7 @@ class ProjectionPaintMode : public AbstractPaintMode { void paint_gradient_fill(const bContext *C, const Scene *scene, Brush *brush, - struct PaintStroke *stroke, + PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) override @@ -177,7 +177,7 @@ class ProjectionPaintMode : public AbstractPaintMode { void paint_bucket_fill(const bContext *C, const Scene *scene, Brush *brush, - struct PaintStroke *stroke, + PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) override @@ -189,7 +189,7 @@ class ProjectionPaintMode : public AbstractPaintMode { void paint_fill(const bContext *C, const Scene *scene, Brush *brush, - struct PaintStroke *stroke, + PaintStroke *stroke, void *stroke_handle, float mouse_start[2], float mouse_end[2]) @@ -324,7 +324,7 @@ static PaintOperation *texture_paint_init(bContext *C, wmOperator *op, const flo static void paint_stroke_update_step(bContext *C, wmOperator * /*op*/, - struct PaintStroke *stroke, + PaintStroke *stroke, PointerRNA *itemptr) { PaintOperation *pop = static_cast(paint_stroke_mode_data(stroke)); @@ -376,13 +376,13 @@ static void paint_stroke_update_step(bContext *C, BKE_brush_alpha_set(scene, brush, startalpha); } -static void paint_stroke_redraw(const bContext *C, struct PaintStroke *stroke, bool final) +static void paint_stroke_redraw(const bContext *C, PaintStroke *stroke, bool final) { PaintOperation *pop = static_cast(paint_stroke_mode_data(stroke)); pop->mode->paint_stroke_redraw(C, pop->stroke_handle, final); } -static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke) +static void paint_stroke_done(const bContext *C, PaintStroke *stroke) { Scene *scene = CTX_data_scene(C); ToolSettings *toolsettings = scene->toolsettings; diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.cc b/source/blender/editors/sculpt_paint/paint_image_proj.cc index 20bf550eade..b39ab9f67dc 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.cc +++ b/source/blender/editors/sculpt_paint/paint_image_proj.cc @@ -490,7 +490,7 @@ struct ProjPixel { }; struct ProjPixelClone { - struct ProjPixel __pp; + ProjPixel __pp; PixelStore clonepx; }; @@ -504,7 +504,7 @@ struct TileInfo { }; struct VertSeam { - struct VertSeam *next, *prev; + VertSeam *next, *prev; int tri; uint loop; float angle; @@ -1838,7 +1838,7 @@ static int project_paint_undo_subtiles(const TileInfo *tinf, int tx, int ty) } if (generate_tile) { - struct PaintTileMap *undo_tiles = ED_image_paint_tile_map_get(); + PaintTileMap *undo_tiles = ED_image_paint_tile_map_get(); volatile void *undorect; if (tinf->masked) { undorect = ED_image_paint_tile_push(undo_tiles, @@ -4288,7 +4288,7 @@ static bool project_paint_winclip(const ProjPaintState *ps, const ProjPaintFaceC #endif /* PROJ_DEBUG_WINCLIP */ struct PrepareImageEntry { - struct PrepareImageEntry *next, *prev; + PrepareImageEntry *next, *prev; Image *ima; ImageUser iuser; }; @@ -4860,7 +4860,7 @@ struct ProjectHandle { /* thread settings */ int thread_index; - struct ImagePool *pool; + ImagePool *pool; }; static void do_projectpaint_clone(ProjPaintState *ps, ProjPixel *projPixel, float mask) diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc index 603c18d343d..ea3eae32b7c 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.cc +++ b/source/blender/editors/sculpt_paint/paint_vertex.cc @@ -1450,7 +1450,7 @@ void ED_object_wpaintmode_exit(bContext *C) static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); - struct wmMsgBus *mbus = CTX_wm_message_bus(C); + wmMsgBus *mbus = CTX_wm_message_bus(C); Object *ob = CTX_data_active_object(C); const int mode_flag = OB_MODE_WEIGHT_PAINT; const bool is_mode_set = (ob->mode & mode_flag) != 0; @@ -2725,7 +2725,7 @@ void PAINT_OT_weight_paint(wmOperatorType *ot) static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); - struct wmMsgBus *mbus = CTX_wm_message_bus(C); + wmMsgBus *mbus = CTX_wm_message_bus(C); Object *ob = CTX_data_active_object(C); const int mode_flag = OB_MODE_VERTEX_PAINT; const bool is_mode_set = (ob->mode & mode_flag) != 0; @@ -2817,7 +2817,7 @@ struct VPaintData : public VPaintDataBase { Color paintcol; - struct VertProjHandle *vp_handle; + VertProjHandle *vp_handle; CoNo *vertexcosnos; bool is_texbrush; diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc index f587e7e036a..5bb75b49925 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc @@ -63,7 +63,7 @@ using blender::Vector; /* Utils. */ -int ED_sculpt_face_sets_find_next_available_id(struct Mesh *mesh) +int ED_sculpt_face_sets_find_next_available_id(Mesh *mesh) { const int *face_sets = static_cast( CustomData_get_layer_named(&mesh->pdata, CD_PROP_INT32, ".sculpt_face_set")); @@ -80,7 +80,7 @@ int ED_sculpt_face_sets_find_next_available_id(struct Mesh *mesh) return next_face_set_id; } -void ED_sculpt_face_sets_initialize_none_to_id(struct Mesh *mesh, const int new_id) +void ED_sculpt_face_sets_initialize_none_to_id(Mesh *mesh, const int new_id) { int *face_sets = static_cast(CustomData_get_layer_named_for_write( &mesh->pdata, CD_PROP_INT32, ".sculpt_face_set", mesh->totpoly)); @@ -1464,7 +1464,7 @@ static int sculpt_face_set_edit_invoke(bContext *C, wmOperator *op, const wmEven return sculpt_face_set_edit_exec(C, op); } -void SCULPT_OT_face_sets_edit(struct wmOperatorType *ot) +void SCULPT_OT_face_sets_edit(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Edit Face Set"; diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.cc b/source/blender/editors/sculpt_paint/sculpt_undo.cc index af02d355d8c..bb14c615ae2 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.cc +++ b/source/blender/editors/sculpt_paint/sculpt_undo.cc @@ -859,7 +859,7 @@ static int sculpt_undo_bmesh_restore(bContext *C, static void sculpt_undo_refine_subdiv(Depsgraph *depsgraph, SculptSession *ss, Object *object, - struct Subdiv *subdiv) + Subdiv *subdiv) { float(*deformed_verts)[3] = BKE_multires_create_deformed_base_mesh_vert_coords( depsgraph, object, ss->multires.modifier, nullptr); @@ -1792,7 +1792,7 @@ void SCULPT_undo_push_end(Object *ob) SCULPT_undo_push_end_ex(ob, false); } -void SCULPT_undo_push_end_ex(struct Object *ob, const bool use_nested_undo) +void SCULPT_undo_push_end_ex(Object *ob, const bool use_nested_undo) { UndoSculpt *usculpt = sculpt_undo_get_nodes(); SculptUndoNode *unode; @@ -1829,7 +1829,7 @@ void SCULPT_undo_push_end_ex(struct Object *ob, const bool use_nested_undo) /** \name Implements ED Undo System * \{ */ -static void sculpt_undo_set_active_layer(struct bContext *C, SculptAttrRef *attr) +static void sculpt_undo_set_active_layer(bContext *C, SculptAttrRef *attr) { if (attr->domain == ATTR_DOMAIN_AUTO) { return; @@ -1886,14 +1886,14 @@ static void sculpt_undo_set_active_layer(struct bContext *C, SculptAttrRef *attr } } -static void sculpt_undosys_step_encode_init(struct bContext * /*C*/, UndoStep *us_p) +static void sculpt_undosys_step_encode_init(bContext * /*C*/, UndoStep *us_p) { SculptUndoStep *us = (SculptUndoStep *)us_p; /* Dummy, memory is cleared anyway. */ BLI_listbase_clear(&us->data.nodes); } -static bool sculpt_undosys_step_encode(struct bContext * /*C*/, struct Main *bmain, UndoStep *us_p) +static bool sculpt_undosys_step_encode(bContext * /*C*/, Main *bmain, UndoStep *us_p) { /* Dummy, encoding is done along the way by adding tiles * to the current 'SculptUndoStep' added by encode_init. */ @@ -1913,7 +1913,7 @@ static bool sculpt_undosys_step_encode(struct bContext * /*C*/, struct Main *bma return true; } -static void sculpt_undosys_step_decode_undo_impl(struct bContext *C, +static void sculpt_undosys_step_decode_undo_impl(bContext *C, Depsgraph *depsgraph, SculptUndoStep *us) { @@ -1925,7 +1925,7 @@ static void sculpt_undosys_step_decode_undo_impl(struct bContext *C, sculpt_undo_print_nodes(CTX_data_active_object(C), NULL); } -static void sculpt_undosys_step_decode_redo_impl(struct bContext *C, +static void sculpt_undosys_step_decode_redo_impl(bContext *C, Depsgraph *depsgraph, SculptUndoStep *us) { @@ -1937,7 +1937,7 @@ static void sculpt_undosys_step_decode_redo_impl(struct bContext *C, sculpt_undo_print_nodes(CTX_data_active_object(C), NULL); } -static void sculpt_undosys_step_decode_undo(struct bContext *C, +static void sculpt_undosys_step_decode_undo(bContext *C, Depsgraph *depsgraph, SculptUndoStep *us, const bool is_final) @@ -1969,9 +1969,7 @@ static void sculpt_undosys_step_decode_undo(struct bContext *C, } } -static void sculpt_undosys_step_decode_redo(struct bContext *C, - Depsgraph *depsgraph, - SculptUndoStep *us) +static void sculpt_undosys_step_decode_redo(bContext *C, Depsgraph *depsgraph, SculptUndoStep *us) { SculptUndoStep *us_iter = us; while (us_iter->step.prev && (us_iter->step.prev->type == us_iter->step.type)) { @@ -1993,7 +1991,7 @@ static void sculpt_undosys_step_decode_redo(struct bContext *C, } static void sculpt_undosys_step_decode( - struct bContext *C, struct Main *bmain, UndoStep *us_p, const eUndoStepDir dir, bool is_final) + bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir dir, bool is_final) { /* NOTE: behavior for undo/redo closely matches image undo. */ BLI_assert(dir != STEP_INVALID); @@ -2051,19 +2049,19 @@ static void sculpt_undosys_step_free(UndoStep *us_p) sculpt_undo_free_list(&us->data.nodes); } -void ED_sculpt_undo_geometry_begin(struct Object *ob, const wmOperator *op) +void ED_sculpt_undo_geometry_begin(Object *ob, const wmOperator *op) { SCULPT_undo_push_begin(ob, op); SCULPT_undo_push_node(ob, nullptr, SCULPT_UNDO_GEOMETRY); } -void ED_sculpt_undo_geometry_begin_ex(struct Object *ob, const char *name) +void ED_sculpt_undo_geometry_begin_ex(Object *ob, const char *name) { SCULPT_undo_push_begin_ex(ob, name); SCULPT_undo_push_node(ob, nullptr, SCULPT_UNDO_GEOMETRY); } -void ED_sculpt_undo_geometry_end(struct Object *ob) +void ED_sculpt_undo_geometry_end(Object *ob) { SCULPT_undo_push_node(ob, nullptr, SCULPT_UNDO_GEOMETRY); SCULPT_undo_push_end(ob); diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index e167f62d3ab..f4648252cec 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -294,7 +294,7 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op)) Scene *scene = CTX_data_scene(C); /* NOTE: We will be forcefully evaluating dependency graph at every frame, so no need to ensure * current scene state is evaluated as it will be lost anyway. */ - struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); + Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); int oldfra = scene->r.cfra; int cfra; diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index dede6f47d93..4867bbc07c5 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -221,7 +221,7 @@ void ED_spacetypes_keymap(wmKeyConfig *keyconf) typedef struct RegionDrawCB { struct RegionDrawCB *next, *prev; - void (*draw)(const struct bContext *, struct ARegion *, void *); + void (*draw)(const bContext *, ARegion *, void *); void *customdata; int type; @@ -229,7 +229,7 @@ typedef struct RegionDrawCB { } RegionDrawCB; void *ED_region_draw_cb_activate(ARegionType *art, - void (*draw)(const struct bContext *, struct ARegion *, void *), + void (*draw)(const bContext *, ARegion *, void *), void *customdata, int type) { diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index ab0c566d7c2..4711bc3ce7c 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -59,7 +59,7 @@ static int buttons_start_filter_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void BUTTONS_OT_start_filter(struct wmOperatorType *ot) +void BUTTONS_OT_start_filter(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Filter"; @@ -84,7 +84,7 @@ static int buttons_clear_filter_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void BUTTONS_OT_clear_filter(struct wmOperatorType *ot) +void BUTTONS_OT_clear_filter(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Clear Filter"; diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index cd477a75c13..026440e4f71 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -109,7 +109,7 @@ static void buttons_free(SpaceLink *sl) } /* spacetype; init callback */ -static void buttons_init(struct wmWindowManager *UNUSED(wm), ScrArea *area) +static void buttons_init(wmWindowManager *UNUSED(wm), ScrArea *area) { SpaceProperties *sbuts = (SpaceProperties *)area->spacedata.first; @@ -317,7 +317,7 @@ const char *ED_buttons_search_string_get(SpaceProperties *sbuts) return sbuts->runtime->search_string; } -int ED_buttons_search_string_length(struct SpaceProperties *sbuts) +int ED_buttons_search_string_length(SpaceProperties *sbuts) { return BLI_strnlen(sbuts->runtime->search_string, sizeof(sbuts->runtime->search_string)); } @@ -532,7 +532,7 @@ static void buttons_operatortypes(void) WM_operatortype_append(BUTTONS_OT_directory_browse); } -static void buttons_keymap(struct wmKeyConfig *keyconf) +static void buttons_keymap(wmKeyConfig *keyconf) { WM_keymap_ensure(keyconf, "Property Editor", SPACE_PROPERTIES, 0); } diff --git a/source/blender/editors/space_clip/clip_ops.cc b/source/blender/editors/space_clip/clip_ops.cc index b56e995cbbe..dea5f5c01b3 100644 --- a/source/blender/editors/space_clip/clip_ops.cc +++ b/source/blender/editors/space_clip/clip_ops.cc @@ -1170,11 +1170,11 @@ void CLIP_OT_change_frame(wmOperatorType *ot) typedef struct ProxyBuildJob { Scene *scene; - struct Main *main; + Main *main; MovieClip *clip; int clip_flag; bool stop; - struct IndexBuildContext *index_context; + IndexBuildContext *index_context; } ProxyJob; static void proxy_freejob(void *pjv) @@ -1226,7 +1226,7 @@ static void do_movie_proxy(void *pjv, { ProxyJob *pj = static_cast(pjv); MovieClip *clip = pj->clip; - struct MovieDistortion *distortion = nullptr; + MovieDistortion *distortion = nullptr; if (pj->index_context) { IMB_anim_index_rebuild(pj->index_context, stop, do_update, progress); @@ -1293,7 +1293,7 @@ typedef struct ProxyQueue { typedef struct ProxyThread { MovieClip *clip; - struct MovieDistortion *distortion; + MovieDistortion *distortion; int *build_sizes, build_count; int *build_undistort_sizes, build_undistort_count; } ProxyThread; diff --git a/source/blender/editors/space_clip/space_clip.cc b/source/blender/editors/space_clip/space_clip.cc index 962730c6187..ea42d6731fe 100644 --- a/source/blender/editors/space_clip/space_clip.cc +++ b/source/blender/editors/space_clip/space_clip.cc @@ -217,7 +217,7 @@ static void clip_free(SpaceLink *sl) } /* spacetype; init callback */ -static void clip_init(struct wmWindowManager * /*wm*/, ScrArea *area) +static void clip_init(wmWindowManager * /*wm*/, ScrArea *area) { ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0); @@ -463,7 +463,7 @@ static void clip_operatortypes(void) WM_operatortype_append(CLIP_OT_dopesheet_view_all); } -static void clip_keymap(struct wmKeyConfig *keyconf) +static void clip_keymap(wmKeyConfig *keyconf) { /* ******** Global hotkeys available for all regions ******** */ WM_keymap_ensure(keyconf, "Clip", SPACE_CLIP, 0); @@ -1110,7 +1110,7 @@ static void clip_properties_region_listener(const wmRegionListenerParams *params /********************* registration ********************/ -static void clip_id_remap(ScrArea * /*area*/, SpaceLink *slink, const struct IDRemapper *mappings) +static void clip_id_remap(ScrArea * /*area*/, SpaceLink *slink, const IDRemapper *mappings) { SpaceClip *sclip = (SpaceClip *)slink; diff --git a/source/blender/editors/space_clip/tracking_ops.cc b/source/blender/editors/space_clip/tracking_ops.cc index 4b5995d7a70..dca30ca7110 100644 --- a/source/blender/editors/space_clip/tracking_ops.cc +++ b/source/blender/editors/space_clip/tracking_ops.cc @@ -525,8 +525,7 @@ static MovieTrackingTrack *tracking_marker_check_slide( return track_pick.track; } -struct MovieTrackingTrack *tracking_find_slidable_track_in_proximity(struct bContext *C, - const float co[2]) +MovieTrackingTrack *tracking_find_slidable_track_in_proximity(bContext *C, const float co[2]) { return tracking_marker_check_slide(C, co, nullptr, nullptr, nullptr); } diff --git a/source/blender/editors/space_clip/tracking_ops_solve.cc b/source/blender/editors/space_clip/tracking_ops_solve.cc index 0eda9c2a720..e628fcaad4a 100644 --- a/source/blender/editors/space_clip/tracking_ops_solve.cc +++ b/source/blender/editors/space_clip/tracking_ops_solve.cc @@ -35,7 +35,7 @@ /********************** solve camera operator *********************/ typedef struct { - struct wmWindowManager *wm; + wmWindowManager *wm; Scene *scene; MovieClip *clip; MovieClipUser user; @@ -44,7 +44,7 @@ typedef struct { char stats_message[256]; - struct MovieReconstructContext *context; + MovieReconstructContext *context; } SolveCameraJob; static bool solve_camera_initjob( diff --git a/source/blender/editors/space_clip/tracking_ops_track.cc b/source/blender/editors/space_clip/tracking_ops_track.cc index 4a0f2581416..b591d470c41 100644 --- a/source/blender/editors/space_clip/tracking_ops_track.cc +++ b/source/blender/editors/space_clip/tracking_ops_track.cc @@ -39,17 +39,17 @@ /********************** Track operator *********************/ typedef struct TrackMarkersJob { - struct AutoTrackContext *context; /* Tracking context */ - int sfra, efra, lastfra; /* Start, end and recently tracked frames */ - int backwards; /* Backwards tracking flag */ - MovieClip *clip; /* Clip which is tracking */ - float delay; /* Delay in milliseconds to allow - * tracking at fixed FPS */ + AutoTrackContext *context; /* Tracking context */ + int sfra, efra, lastfra; /* Start, end and recently tracked frames */ + int backwards; /* Backwards tracking flag */ + MovieClip *clip; /* Clip which is tracking */ + float delay; /* Delay in milliseconds to allow + * tracking at fixed FPS */ - struct wmWindowManager *wm; - struct Main *main; - struct Scene *scene; - struct bScreen *screen; + wmWindowManager *wm; + Main *main; + Scene *scene; + bScreen *screen; } TrackMarkersJob; static bool track_markers_testbreak(void) diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index 40d7c1166ea..01c17f968cc 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -88,7 +88,7 @@ static void console_free(SpaceLink *sl) } /* spacetype; init callback */ -static void console_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} +static void console_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} static SpaceLink *console_duplicate(SpaceLink *sl) { @@ -241,7 +241,7 @@ static void console_operatortypes(void) WM_operatortype_append(CONSOLE_OT_select_word); } -static void console_keymap(struct wmKeyConfig *keyconf) +static void console_keymap(wmKeyConfig *keyconf) { WM_keymap_ensure(keyconf, "Console", SPACE_CONSOLE, 0); } diff --git a/source/blender/editors/space_file/asset_catalog_tree_view.cc b/source/blender/editors/space_file/asset_catalog_tree_view.cc index 8f4119b2b7b..28205756b4f 100644 --- a/source/blender/editors/space_file/asset_catalog_tree_view.cc +++ b/source/blender/editors/space_file/asset_catalog_tree_view.cc @@ -116,7 +116,7 @@ class AssetCatalogDropTarget : public ui::AbstractViewItemDropTarget { bool can_drop(const wmDrag &drag, const char **r_disabled_hint) const override; std::string drop_tooltip(const wmDrag &drag) const override; - bool on_drop(struct bContext *C, const wmDrag &drag) const override; + bool on_drop(bContext *C, const wmDrag &drag) const override; ::AssetLibrary &get_asset_library() const; @@ -124,7 +124,7 @@ class AssetCatalogDropTarget : public ui::AbstractViewItemDropTarget { static bool has_droppable_asset(const wmDrag &drag, const char **r_disabled_hint); static bool can_modify_catalogs(const ::AssetLibrary &asset_library, const char **r_disabled_hint); - static bool drop_assets_into_catalog(struct bContext *C, + static bool drop_assets_into_catalog(bContext *C, const AssetCatalogTreeView &tree_view, const wmDrag &drag, CatalogID catalog_id, @@ -154,7 +154,7 @@ class AssetCatalogTreeViewAllItem : public ui::BasicTreeViewItem { bool can_drop(const wmDrag &drag, const char **r_disabled_hint) const override; std::string drop_tooltip(const wmDrag &drag) const override; - bool on_drop(struct bContext *C, const wmDrag &drag) const override; + bool on_drop(bContext *C, const wmDrag &drag) const override; }; std::unique_ptr create_drop_target() override; @@ -168,7 +168,7 @@ class AssetCatalogTreeViewUnassignedItem : public ui::BasicTreeViewItem { bool can_drop(const wmDrag &drag, const char **r_disabled_hint) const override; std::string drop_tooltip(const wmDrag &drag) const override; - bool on_drop(struct bContext *C, const wmDrag &drag) const override; + bool on_drop(bContext *C, const wmDrag &drag) const override; }; std::unique_ptr create_drop_target() override; @@ -432,7 +432,7 @@ std::string AssetCatalogDropTarget::drop_tooltip_asset_list(const wmDrag &drag) return basic_tip; } -bool AssetCatalogDropTarget::on_drop(struct bContext *C, const wmDrag &drag) const +bool AssetCatalogDropTarget::on_drop(bContext *C, const wmDrag &drag) const { if (drag.type == WM_DRAG_ASSET_CATALOG) { return drop_asset_catalog_into_catalog( @@ -459,7 +459,7 @@ bool AssetCatalogDropTarget::drop_asset_catalog_into_catalog( return true; } -bool AssetCatalogDropTarget::drop_assets_into_catalog(struct bContext *C, +bool AssetCatalogDropTarget::drop_assets_into_catalog(bContext *C, const AssetCatalogTreeView &tree_view, const wmDrag &drag, CatalogID catalog_id, @@ -623,8 +623,7 @@ std::string AssetCatalogTreeViewAllItem::DropTarget::drop_tooltip(const wmDrag & (std::string_view)drag_catalog->path.name()); } -bool AssetCatalogTreeViewAllItem::DropTarget::on_drop(struct bContext * /*C*/, - const wmDrag &drag) const +bool AssetCatalogTreeViewAllItem::DropTarget::on_drop(bContext * /*C*/, const wmDrag &drag) const { BLI_assert(drag.type == WM_DRAG_ASSET_CATALOG); return AssetCatalogDropTarget::drop_asset_catalog_into_catalog( @@ -666,8 +665,7 @@ std::string AssetCatalogTreeViewUnassignedItem::DropTarget::drop_tooltip(const w TIP_("Move asset out of any catalog"); } -bool AssetCatalogTreeViewUnassignedItem::DropTarget::on_drop(struct bContext *C, - const wmDrag &drag) const +bool AssetCatalogTreeViewUnassignedItem::DropTarget::on_drop(bContext *C, const wmDrag &drag) const { /* Assign to nil catalog ID. */ return AssetCatalogDropTarget::drop_assets_into_catalog( diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index f73a3614021..fc90c6357c9 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -707,7 +707,7 @@ void FILE_OT_select(wmOperatorType *ot) /** * \returns true if selection has changed */ -static bool file_walk_select_selection_set(struct bContext *C, +static bool file_walk_select_selection_set(bContext *C, wmWindow *win, ARegion *region, SpaceFile *sfile, @@ -1144,7 +1144,7 @@ static int bookmark_add_exec(bContext *C, wmOperator *op) ScrArea *area = CTX_wm_area(C); SpaceFile *sfile = CTX_wm_space_file(C); struct FSMenu *fsmenu = ED_fsmenu_get(); - struct FileSelectParams *params = ED_fileselect_get_active_params(sfile); + FileSelectParams *params = ED_fileselect_get_active_params(sfile); if (params->dir[0] != '\0') { @@ -1221,7 +1221,7 @@ static int bookmark_cleanup_exec(bContext *C, wmOperator *op) { ScrArea *area = CTX_wm_area(C); struct FSMenu *fsmenu = ED_fsmenu_get(); - struct FSMenuEntry *fsme_next, *fsme = ED_fsmenu_get_category(fsmenu, FS_CATEGORY_BOOKMARKS); + FSMenuEntry *fsme_next, *fsme = ED_fsmenu_get_category(fsmenu, FS_CATEGORY_BOOKMARKS); int index; bool changed = false; @@ -1278,8 +1278,8 @@ static int bookmark_move_exec(bContext *C, wmOperator *op) ScrArea *area = CTX_wm_area(C); SpaceFile *sfile = CTX_wm_space_file(C); struct FSMenu *fsmenu = ED_fsmenu_get(); - struct FSMenuEntry *fsmentry = ED_fsmenu_get_category(fsmenu, FS_CATEGORY_BOOKMARKS); - const struct FSMenuEntry *fsmentry_org = fsmentry; + FSMenuEntry *fsmentry = ED_fsmenu_get_category(fsmenu, FS_CATEGORY_BOOKMARKS); + const FSMenuEntry *fsmentry_org = fsmentry; const int direction = RNA_enum_get(op->ptr, "direction"); const int totitems = ED_fsmenu_get_nentries(fsmenu, FS_CATEGORY_BOOKMARKS); @@ -1463,7 +1463,7 @@ static int file_highlight_invoke(bContext *C, wmOperator *UNUSED(op), const wmEv return OPERATOR_PASS_THROUGH; } -void FILE_OT_highlight(struct wmOperatorType *ot) +void FILE_OT_highlight(wmOperatorType *ot) { /* identifiers */ ot->name = "Highlight File"; @@ -1562,7 +1562,7 @@ static int file_cancel_exec(bContext *C, wmOperator *UNUSED(unused)) return OPERATOR_FINISHED; } -void FILE_OT_cancel(struct wmOperatorType *ot) +void FILE_OT_cancel(wmOperatorType *ot) { /* identifiers */ ot->name = "Cancel File Load"; @@ -2115,7 +2115,7 @@ static int file_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void FILE_OT_execute(struct wmOperatorType *ot) +void FILE_OT_execute(wmOperatorType *ot) { /* identifiers */ ot->name = "Execute File Window"; @@ -2210,7 +2210,7 @@ static int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused)) return OPERATOR_FINISHED; } -void FILE_OT_refresh(struct wmOperatorType *ot) +void FILE_OT_refresh(wmOperatorType *ot) { /* identifiers */ ot->name = "Refresh File List"; @@ -2251,7 +2251,7 @@ static int file_parent_exec(bContext *C, wmOperator *UNUSED(unused)) return OPERATOR_FINISHED; } -void FILE_OT_parent(struct wmOperatorType *ot) +void FILE_OT_parent(wmOperatorType *ot) { /* identifiers */ ot->name = "Parent Directory"; @@ -2287,7 +2287,7 @@ static int file_previous_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void FILE_OT_previous(struct wmOperatorType *ot) +void FILE_OT_previous(wmOperatorType *ot) { /* identifiers */ ot->name = "Previous Folder"; @@ -2324,7 +2324,7 @@ static int file_next_exec(bContext *C, wmOperator *UNUSED(unused)) return OPERATOR_FINISHED; } -void FILE_OT_next(struct wmOperatorType *ot) +void FILE_OT_next(wmOperatorType *ot) { /* identifiers */ ot->name = "Next Folder"; @@ -2697,7 +2697,7 @@ static int file_directory_new_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void FILE_OT_directory_new(struct wmOperatorType *ot) +void FILE_OT_directory_new(wmOperatorType *ot) { PropertyRNA *prop; @@ -2952,7 +2952,7 @@ static int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused)) return OPERATOR_FINISHED; } -void FILE_OT_hidedot(struct wmOperatorType *ot) +void FILE_OT_hidedot(wmOperatorType *ot) { /* identifiers */ ot->name = "Toggle Hide Dot Files"; @@ -3032,7 +3032,7 @@ static int file_filenum_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void FILE_OT_filenum(struct wmOperatorType *ot) +void FILE_OT_filenum(wmOperatorType *ot) { /* identifiers */ ot->name = "Increment Number in Filename"; @@ -3089,7 +3089,7 @@ static int file_rename_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void FILE_OT_rename(struct wmOperatorType *ot) +void FILE_OT_rename(wmOperatorType *ot) { /* identifiers */ ot->name = "Rename File or Directory"; @@ -3185,7 +3185,7 @@ static int file_delete_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void FILE_OT_delete(struct wmOperatorType *ot) +void FILE_OT_delete(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Selected Files"; @@ -3226,7 +3226,7 @@ static int file_start_filter_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void FILE_OT_start_filter(struct wmOperatorType *ot) +void FILE_OT_start_filter(wmOperatorType *ot) { /* identifiers */ ot->name = "Filter"; @@ -3267,7 +3267,7 @@ static int file_edit_directory_path_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void FILE_OT_edit_directory_path(struct wmOperatorType *ot) +void FILE_OT_edit_directory_path(wmOperatorType *ot) { /* identifiers */ ot->name = "Edit Directory Path"; diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc index a70a98f675a..9d5e77d6c36 100644 --- a/source/blender/editors/space_file/filelist.cc +++ b/source/blender/editors/space_file/filelist.cc @@ -1388,7 +1388,7 @@ static bool filelist_checkdir_main(FileList *filelist, return filelist_checkdir_lib(filelist, dirpath, do_change); } -static bool filelist_checkdir_return_always_valid(struct FileList * /*filelist*/, +static bool filelist_checkdir_return_always_valid(FileList * /*filelist*/, char /*dirpath*/[FILE_MAX_LIBEXTRA], const bool /*do_change*/) { @@ -2236,7 +2236,7 @@ ID *filelist_file_get_id(const FileDirEntry *file) return file->id; } -const char *filelist_entry_get_relpath(const struct FileList *filelist, int index) +const char *filelist_entry_get_relpath(const FileList *filelist, int index) { const FileListInternEntry *intern_entry = filelist_entry_intern_get(filelist, index); return intern_entry->relpath; diff --git a/source/blender/editors/space_file/filesel.cc b/source/blender/editors/space_file/filesel.cc index 2c2a2ceb65a..04c7dee381c 100644 --- a/source/blender/editors/space_file/filesel.cc +++ b/source/blender/editors/space_file/filesel.cc @@ -470,7 +470,7 @@ bool ED_fileselect_is_asset_browser(const SpaceFile *sfile) return (sfile->browse_mode == FILE_BROWSE_MODE_ASSETS); } -struct AssetLibrary *ED_fileselect_active_asset_library_get(const SpaceFile *sfile) +AssetLibrary *ED_fileselect_active_asset_library_get(const SpaceFile *sfile) { if (!ED_fileselect_is_asset_browser(sfile) || !sfile->files) { return nullptr; @@ -479,7 +479,7 @@ struct AssetLibrary *ED_fileselect_active_asset_library_get(const SpaceFile *sfi return filelist_asset_library(sfile->files); } -struct ID *ED_fileselect_active_asset_get(const SpaceFile *sfile) +ID *ED_fileselect_active_asset_get(const SpaceFile *sfile) { if (!ED_fileselect_is_asset_browser(sfile)) { return nullptr; @@ -567,7 +567,7 @@ void ED_fileselect_activate_by_id(SpaceFile *sfile, ID *asset_id, const bool def } FileSelectParams *params = ED_fileselect_get_active_params(sfile); - struct FileList *files = sfile->files; + FileList *files = sfile->files; const int file_index = filelist_file_find_id(files, asset_id); const FileDirEntry *file = filelist_file_ex(files, file_index, true); @@ -593,7 +593,7 @@ void ED_fileselect_activate_by_relpath(SpaceFile *sfile, const char *relative_pa /* If there are filelist operations running now ("pending" true) or soon ("force reset" true), * there is a fair chance that the to-be-activated file at relative_path will only be present * after these operations have completed. Defer activation until then. */ - struct FileList *files = sfile->files; + FileList *files = sfile->files; if (files == nullptr || filelist_pending(files) || filelist_needs_force_reset(files)) { /* Casting away the constness of `relative_path` is safe here, because eventually it just ends * up in another call to this function, and then it's a const char* again. */ @@ -719,9 +719,9 @@ void ED_fileselect_params_to_userdef(SpaceFile *sfile, } } -void fileselect_file_set(struct bContext *C, SpaceFile *sfile, const int index) +void fileselect_file_set(bContext *C, SpaceFile *sfile, const int index) { - const struct FileDirEntry *file = filelist_file(sfile->files, index); + const FileDirEntry *file = filelist_file(sfile->files, index); if (file && file->relpath && file->relpath[0] && !(file->typeflag & FILE_TYPE_DIR)) { FileSelectParams *params = ED_fileselect_get_active_params(sfile); STRNCPY(params->file, file->relpath); @@ -1024,7 +1024,7 @@ static void file_attribute_columns_init(const FileSelectParams *params, FileLayo layout->attribute_columns[COLUMN_SIZE].text_align = UI_STYLE_TEXT_RIGHT; } -void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *region) +void ED_fileselect_init_layout(SpaceFile *sfile, ARegion *region) { FileSelectParams *params = ED_fileselect_get_active_params(sfile); /* Request a slightly more compact layout for asset browsing. */ @@ -1035,8 +1035,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *region) int textheight; if (sfile->layout == nullptr) { - sfile->layout = static_cast( - MEM_callocN(sizeof(struct FileLayout), "file_layout")); + sfile->layout = static_cast(MEM_callocN(sizeof(FileLayout), "file_layout")); sfile->layout->dirty = true; } else if (sfile->layout->dirty == false) { @@ -1128,7 +1127,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *region) layout->dirty = false; } -FileLayout *ED_fileselect_get_layout(struct SpaceFile *sfile, ARegion *region) +FileLayout *ED_fileselect_get_layout(SpaceFile *sfile, ARegion *region) { if (!sfile->layout) { ED_fileselect_init_layout(sfile, region); @@ -1184,7 +1183,7 @@ void file_select_deselect_all(SpaceFile *sfile, const eDirEntry_SelectFlag flag) filelist_entries_select_index_range_set(sfile->files, &sel, FILE_SEL_REMOVE, flag, CHECK_ALL); } -int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matched_file) +int file_select_match(SpaceFile *sfile, const char *pattern, char *matched_file) { int match = 0; @@ -1209,7 +1208,7 @@ int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matche return match; } -int autocomplete_directory(struct bContext *C, char *str, void * /*arg_v*/) +int autocomplete_directory(bContext *C, char *str, void * /*arg_v*/) { SpaceFile *sfile = CTX_wm_space_file(C); int match = AUTOCOMPLETE_NO_MATCH; @@ -1219,7 +1218,7 @@ int autocomplete_directory(struct bContext *C, char *str, void * /*arg_v*/) char dirname[FILE_MAX]; DIR *dir; - struct dirent *de; + dirent *de; BLI_path_split_dir_part(str, dirname, sizeof(dirname)); @@ -1257,7 +1256,7 @@ int autocomplete_directory(struct bContext *C, char *str, void * /*arg_v*/) return match; } -int autocomplete_file(struct bContext *C, char *str, void * /*arg_v*/) +int autocomplete_file(bContext *C, char *str, void * /*arg_v*/) { SpaceFile *sfile = CTX_wm_space_file(C); int match = AUTOCOMPLETE_NO_MATCH; @@ -1368,7 +1367,7 @@ void file_params_renamefile_clear(FileSelectParams *params) params->rename_flag = 0; } -static int file_params_find_renamed(const FileSelectParams *params, struct FileList *filelist) +static int file_params_find_renamed(const FileSelectParams *params, FileList *filelist) { /* Find the file either through the local ID/asset it represents or its relative path. */ return (params->rename_id != nullptr) ? filelist_file_find_id(filelist, params->rename_id) : @@ -1454,12 +1453,10 @@ ScrArea *ED_fileselect_handler_area_find_any_with_op(const wmWindow *win) return nullptr; } -void ED_fileselect_ensure_default_filepath(struct bContext *C, - struct wmOperator *op, - const char *extension) +void ED_fileselect_ensure_default_filepath(bContext *C, wmOperator *op, const char *extension) { if (!RNA_struct_property_is_set_ex(op->ptr, "filepath", false)) { - struct Main *bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); char filepath[FILE_MAX]; const char *blendfile_path = BKE_main_blendfile_path(bmain); diff --git a/source/blender/editors/space_file/folder_history.cc b/source/blender/editors/space_file/folder_history.cc index 608fd1fb1a0..ccf68f582cd 100644 --- a/source/blender/editors/space_file/folder_history.cc +++ b/source/blender/editors/space_file/folder_history.cc @@ -33,7 +33,7 @@ struct FolderList { char *foldername; }; -void folderlist_popdir(struct ListBase *folderlist, char *dir) +void folderlist_popdir(ListBase *folderlist, char *dir) { const char *prev_dir; FolderList *folder; @@ -89,7 +89,7 @@ const char *folderlist_peeklastdir(ListBase *folderlist) return folder->foldername; } -bool folderlist_clear_next(struct SpaceFile *sfile) +bool folderlist_clear_next(SpaceFile *sfile) { const FileSelectParams *params = ED_fileselect_get_active_params(sfile); FolderList *folder; diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 41e98f30f0a..7b6745f2a09 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -64,12 +64,12 @@ static FSMenu *g_fsmenu = NULL; FSMenu *ED_fsmenu_get(void) { if (!g_fsmenu) { - g_fsmenu = MEM_callocN(sizeof(struct FSMenu), "fsmenu"); + g_fsmenu = MEM_callocN(sizeof(FSMenu), "fsmenu"); } return g_fsmenu; } -struct FSMenuEntry *ED_fsmenu_get_category(struct FSMenu *fsmenu, FSMenuCategory category) +FSMenuEntry *ED_fsmenu_get_category(FSMenu *fsmenu, FSMenuCategory category) { FSMenuEntry *fsm_head = NULL; @@ -178,7 +178,7 @@ static void fsmenu_xdg_user_dirs_free(GHash *xdg_map) * \param default_path: Directory name to check in $HOME, also used for the menu entry name. */ static void fsmenu_xdg_insert_entry(GHash *xdg_map, - struct FSMenu *fsmenu, + FSMenu *fsmenu, const char *key, const char *default_path, int icon, @@ -196,7 +196,7 @@ static void fsmenu_xdg_insert_entry(GHash *xdg_map, /** \} */ -void ED_fsmenu_set_category(struct FSMenu *fsmenu, FSMenuCategory category, FSMenuEntry *fsm_head) +void ED_fsmenu_set_category(FSMenu *fsmenu, FSMenuCategory category, FSMenuEntry *fsm_head) { switch (category) { case FS_CATEGORY_SYSTEM: @@ -217,7 +217,7 @@ void ED_fsmenu_set_category(struct FSMenu *fsmenu, FSMenuCategory category, FSMe } } -int ED_fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category) +int ED_fsmenu_get_nentries(FSMenu *fsmenu, FSMenuCategory category) { FSMenuEntry *fsm_iter; int count = 0; @@ -229,7 +229,7 @@ int ED_fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category) return count; } -FSMenuEntry *ED_fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx) +FSMenuEntry *ED_fsmenu_get_entry(FSMenu *fsmenu, FSMenuCategory category, int idx) { FSMenuEntry *fsm_iter; @@ -242,12 +242,12 @@ FSMenuEntry *ED_fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, return fsm_iter; } -char *ED_fsmenu_entry_get_path(struct FSMenuEntry *fsentry) +char *ED_fsmenu_entry_get_path(FSMenuEntry *fsentry) { return fsentry->path; } -void ED_fsmenu_entry_set_path(struct FSMenuEntry *fsentry, const char *path) +void ED_fsmenu_entry_set_path(FSMenuEntry *fsentry, const char *path) { if ((!fsentry->path || !path || !STREQ(path, fsentry->path)) && (fsentry->path != path)) { char tmp_name[FILE_MAXFILE]; @@ -264,17 +264,17 @@ void ED_fsmenu_entry_set_path(struct FSMenuEntry *fsentry, const char *path) } } -int ED_fsmenu_entry_get_icon(struct FSMenuEntry *fsentry) +int ED_fsmenu_entry_get_icon(FSMenuEntry *fsentry) { return (fsentry->icon) ? fsentry->icon : ICON_FILE_FOLDER; } -void ED_fsmenu_entry_set_icon(struct FSMenuEntry *fsentry, const int icon) +void ED_fsmenu_entry_set_icon(FSMenuEntry *fsentry, const int icon) { fsentry->icon = icon; } -static void fsmenu_entry_generate_name(struct FSMenuEntry *fsentry, char *name, size_t name_size) +static void fsmenu_entry_generate_name(FSMenuEntry *fsentry, char *name, size_t name_size) { int offset = 0; int len = name_size; @@ -291,7 +291,7 @@ static void fsmenu_entry_generate_name(struct FSMenuEntry *fsentry, char *name, } } -char *ED_fsmenu_entry_get_name(struct FSMenuEntry *fsentry) +char *ED_fsmenu_entry_get_name(FSMenuEntry *fsentry) { if (fsentry->name[0]) { return fsentry->name; @@ -305,7 +305,7 @@ char *ED_fsmenu_entry_get_name(struct FSMenuEntry *fsentry) return name; } -void ED_fsmenu_entry_set_name(struct FSMenuEntry *fsentry, const char *name) +void ED_fsmenu_entry_set_name(FSMenuEntry *fsentry, const char *name) { if (!STREQ(name, fsentry->name)) { char tmp_name[FILE_MAXFILE]; @@ -328,7 +328,7 @@ void ED_fsmenu_entry_set_name(struct FSMenuEntry *fsentry, const char *name) } } -void fsmenu_entry_refresh_valid(struct FSMenuEntry *fsentry) +void fsmenu_entry_refresh_valid(FSMenuEntry *fsentry) { if (fsentry->path && fsentry->path[0]) { #ifdef WIN32 @@ -353,7 +353,7 @@ void fsmenu_entry_refresh_valid(struct FSMenuEntry *fsentry) } } -short fsmenu_can_save(struct FSMenu *fsmenu, FSMenuCategory category, int idx) +short fsmenu_can_save(FSMenu *fsmenu, FSMenuCategory category, int idx) { FSMenuEntry *fsm_iter; @@ -366,7 +366,7 @@ short fsmenu_can_save(struct FSMenu *fsmenu, FSMenuCategory category, int idx) return fsm_iter ? fsm_iter->save : 0; } -void fsmenu_insert_entry(struct FSMenu *fsmenu, +void fsmenu_insert_entry(FSMenu *fsmenu, FSMenuCategory category, const char *path, const char *name, @@ -489,7 +489,7 @@ void fsmenu_insert_entry(struct FSMenu *fsmenu, } } -void fsmenu_remove_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx) +void fsmenu_remove_entry(FSMenu *fsmenu, FSMenuCategory category, int idx) { FSMenuEntry *fsm_prev = NULL; FSMenuEntry *fsm_iter; @@ -522,7 +522,7 @@ void fsmenu_remove_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx } } -bool fsmenu_write_file(struct FSMenu *fsmenu, const char *filepath) +bool fsmenu_write_file(FSMenu *fsmenu, const char *filepath) { FSMenuEntry *fsm_iter = NULL; char fsm_name[FILE_MAX]; @@ -564,7 +564,7 @@ bool fsmenu_write_file(struct FSMenu *fsmenu, const char *filepath) return !has_error; } -void fsmenu_read_bookmarks(struct FSMenu *fsmenu, const char *filepath) +void fsmenu_read_bookmarks(FSMenu *fsmenu, const char *filepath) { char line[FILE_MAXDIR]; char name[FILE_MAXFILE]; @@ -636,7 +636,7 @@ static void fsmenu_add_windows_folder(struct FSMenu *fsmenu, } #endif -void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks) +void fsmenu_read_system(FSMenu *fsmenu, int read_bookmarks) { char line[FILE_MAXDIR]; #ifdef WIN32 @@ -1057,7 +1057,7 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks) #undef FS_UDIR_PATH } -static void fsmenu_free_category(struct FSMenu *fsmenu, FSMenuCategory category) +static void fsmenu_free_category(FSMenu *fsmenu, FSMenuCategory category) { FSMenuEntry *fsm_iter = ED_fsmenu_get_category(fsmenu, category); @@ -1073,7 +1073,7 @@ static void fsmenu_free_category(struct FSMenu *fsmenu, FSMenuCategory category) } } -void fsmenu_refresh_system_category(struct FSMenu *fsmenu) +void fsmenu_refresh_system_category(FSMenu *fsmenu) { fsmenu_free_category(fsmenu, FS_CATEGORY_SYSTEM); ED_fsmenu_set_category(fsmenu, FS_CATEGORY_SYSTEM, NULL); @@ -1104,8 +1104,8 @@ void fsmenu_free(void) fsmenu_free_ex(&g_fsmenu); } -static void fsmenu_copy_category(struct FSMenu *fsmenu_dst, - struct FSMenu *fsmenu_src, +static void fsmenu_copy_category(FSMenu *fsmenu_dst, + FSMenu *fsmenu_src, const FSMenuCategory category) { FSMenuEntry *fsm_dst_prev = NULL, *fsm_dst_head = NULL; @@ -1142,7 +1142,7 @@ static FSMenu *fsmenu_copy(FSMenu *fsmenu) return fsmenu_copy; } -int fsmenu_get_active_indices(struct FSMenu *fsmenu, enum FSMenuCategory category, const char *dir) +int fsmenu_get_active_indices(FSMenu *fsmenu, enum FSMenuCategory category, const char *dir) { FSMenuEntry *fsm_iter = ED_fsmenu_get_category(fsmenu, category); int i; diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 632bdfc2323..a2513f0c644 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -620,7 +620,7 @@ static void file_operatortypes(void) } /* NOTE: do not add .blend file reading on this level */ -static void file_keymap(struct wmKeyConfig *keyconf) +static void file_keymap(wmKeyConfig *keyconf) { /* keys for all regions */ WM_keymap_ensure(keyconf, "File Browser", SPACE_FILE, 0); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 265c9d368b4..90f71c18813 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -2359,7 +2359,7 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static bool graph_has_selected_control_points(struct bContext *C) +static bool graph_has_selected_control_points(bContext *C) { bAnimContext ac; ListBase anim_data = {NULL, NULL}; @@ -2389,9 +2389,9 @@ static bool graph_has_selected_control_points(struct bContext *C) return has_selected_control_points; } -static int graphkeys_selected_control_points_invoke(struct bContext *C, - struct wmOperator *op, - const struct wmEvent *event) +static int graphkeys_selected_control_points_invoke(bContext *C, + wmOperator *op, + const wmEvent *event) { if (!graph_has_selected_control_points(C)) { BKE_report(op->reports, RPT_ERROR, "No control points are selected"); diff --git a/source/blender/editors/space_graph/graph_slider_ops.c b/source/blender/editors/space_graph/graph_slider_ops.c index c36e0db347b..1c722a63a0e 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.c +++ b/source/blender/editors/space_graph/graph_slider_ops.c @@ -68,7 +68,7 @@ typedef struct tGraphSliderOp { struct tSlider *slider; /* Each operator has a specific update function. */ - void (*modal_update)(struct bContext *, struct wmOperator *); + void (*modal_update)(bContext *, wmOperator *); /* If an operator stores custom data, it also needs to provide the function to clean it up. */ void *operator_data; diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 0773e0a69ac..811e5dda26b 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -137,7 +137,7 @@ static void graph_free(SpaceLink *sl) } /* spacetype; init callback */ -static void graph_init(struct wmWindowManager *wm, ScrArea *area) +static void graph_init(wmWindowManager *wm, ScrArea *area) { SpaceGraph *sipo = (SpaceGraph *)area->spacedata.first; diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index fb01b4a27fb..c317ec80ae3 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -49,7 +49,7 @@ #define B_NOP -1 #define MAX_IMAGE_INFO_LEN 128 -struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree) +ImageUser *ntree_get_active_iuser(bNodeTree *ntree) { bNode *node; diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index 505630ede8e..9fc19691de7 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -68,7 +68,7 @@ void ED_space_image_set(Main *bmain, SpaceImage *sima, Image *ima, bool automati WM_main_add_notifier(NC_SPACE | ND_SPACE_IMAGE, NULL); } -void ED_space_image_sync(struct Main *bmain, struct Image *image, bool ignore_render_viewer) +void ED_space_image_sync(Main *bmain, Image *image, bool ignore_render_viewer) { wmWindowManager *wm = (wmWindowManager *)bmain->wm.first; LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { @@ -381,7 +381,7 @@ void ED_image_point_pos__reverse(SpaceImage *sima, r_co[1] = (co[1] * height * zoomy) + (float)sy; } -bool ED_image_slot_cycle(struct Image *image, int direction) +bool ED_image_slot_cycle(Image *image, int direction) { const int cur = image->render_slot; int i, slot; @@ -415,9 +415,9 @@ bool ED_image_slot_cycle(struct Image *image, int direction) return (cur != image->render_slot); } -void ED_space_image_scopes_update(const struct bContext *C, - struct SpaceImage *sima, - struct ImBuf *ibuf, +void ED_space_image_scopes_update(const bContext *C, + SpaceImage *sima, + ImBuf *ibuf, bool use_view_settings) { Scene *scene = CTX_data_scene(C); @@ -471,7 +471,7 @@ bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit) } if (obedit && obedit->type == OB_MESH) { - struct BMEditMesh *em = BKE_editmesh_from_object(obedit); + BMEditMesh *em = BKE_editmesh_from_object(obedit); bool ret; ret = EDBM_uv_check(em); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index fff59f13d97..fedd0cf897f 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -255,7 +255,7 @@ static bool image_not_packed_poll(bContext *C) return (ima && BLI_listbase_is_empty(&ima->packedfiles)); } -static void image_view_all(struct SpaceImage *sima, struct ARegion *region, struct wmOperator *op) +static void image_view_all(SpaceImage *sima, ARegion *region, wmOperator *op) { float aspx, aspy, zoomx, zoomy, w, h; int width, height; @@ -3180,7 +3180,7 @@ static bool image_pack_test(bContext *C, wmOperator *op) static int image_pack_exec(bContext *C, wmOperator *op) { - struct Main *bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); Image *ima = image_from_context(C); if (!image_pack_test(C, op)) { @@ -3323,10 +3323,7 @@ void IMAGE_OT_unpack(wmOperatorType *ot) /** \name Sample Image Operator * \{ */ -bool ED_space_image_get_position(SpaceImage *sima, - struct ARegion *region, - int mval[2], - float fpos[2]) +bool ED_space_image_get_position(SpaceImage *sima, ARegion *region, int mval[2], float fpos[2]) { void *lock; ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock, 0); diff --git a/source/blender/editors/space_image/image_undo.cc b/source/blender/editors/space_image/image_undo.cc index 047d37de1ae..63c314b855f 100644 --- a/source/blender/editors/space_image/image_undo.cc +++ b/source/blender/editors/space_image/image_undo.cc @@ -458,12 +458,12 @@ static void utile_decref(UndoImageTile *utile) * \{ */ struct UndoImageBuf { - struct UndoImageBuf *next, *prev; + UndoImageBuf *next, *prev; /** * The buffer after the undo step has executed. */ - struct UndoImageBuf *post; + UndoImageBuf *post; char ibuf_filepath[IMB_FILEPATH_SIZE]; @@ -577,7 +577,7 @@ static void ubuf_free(UndoImageBuf *ubuf) * \{ */ struct UndoImageHandle { - struct UndoImageHandle *next, *prev; + UndoImageHandle *next, *prev; /** Each undo handle refers to a single image which may have multiple buffers. */ UndoRefID_Image image_ref; @@ -804,7 +804,7 @@ static bool image_undosys_poll(bContext *C) return false; } -static void image_undosys_step_encode_init(struct bContext * /*C*/, UndoStep *us_p) +static void image_undosys_step_encode_init(bContext * /*C*/, UndoStep *us_p) { ImageUndoStep *us = reinterpret_cast(us_p); /* dummy, memory is cleared anyway. */ @@ -813,7 +813,7 @@ static void image_undosys_step_encode_init(struct bContext * /*C*/, UndoStep *us us->paint_tile_map = MEM_new(__func__); } -static bool image_undosys_step_encode(struct bContext *C, struct Main * /*bmain*/, UndoStep *us_p) +static bool image_undosys_step_encode(bContext *C, Main * /*bmain*/, UndoStep *us_p) { /* Encoding is done along the way by adding tiles * to the current 'ImageUndoStep' added by encode_init. @@ -1008,7 +1008,7 @@ static void image_undosys_step_decode_redo(ImageUndoStep *us) } static void image_undosys_step_decode( - struct bContext *C, struct Main *bmain, UndoStep *us_p, const eUndoStepDir dir, bool is_final) + bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir dir, bool is_final) { /* NOTE: behavior for undo/redo closely matches sculpt undo. */ BLI_assert(dir != STEP_INVALID); diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 758052bbee2..1ae450c79ef 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -170,7 +170,7 @@ static void image_free(SpaceLink *sl) } /* spacetype; init callback, add handlers */ -static void image_init(struct wmWindowManager *UNUSED(wm), ScrArea *area) +static void image_init(wmWindowManager *UNUSED(wm), ScrArea *area) { ListBase *lb = WM_dropboxmap_find("Image", SPACE_IMAGE, 0); @@ -244,7 +244,7 @@ static void image_operatortypes(void) WM_operatortype_append(IMAGE_OT_tile_fill); } -static void image_keymap(struct wmKeyConfig *keyconf) +static void image_keymap(wmKeyConfig *keyconf) { WM_keymap_ensure(keyconf, "Image Generic", SPACE_IMAGE, 0); WM_keymap_ensure(keyconf, "Image", SPACE_IMAGE, 0); diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 6b064459d0e..e23c4b5ca58 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -79,7 +79,7 @@ static void info_free(SpaceLink *UNUSED(sl)) } /* spacetype; init callback */ -static void info_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} +static void info_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} static SpaceLink *info_duplicate(SpaceLink *sl) { @@ -167,7 +167,7 @@ static void info_operatortypes(void) WM_operatortype_append(INFO_OT_report_copy); } -static void info_keymap(struct wmKeyConfig *keyconf) +static void info_keymap(wmKeyConfig *keyconf) { WM_keymap_ensure(keyconf, "Window", 0, 0); WM_keymap_ensure(keyconf, "Info", SPACE_INFO, 0); diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 941d7bba55b..51e93fd2afb 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -126,7 +126,7 @@ static void nla_free(SpaceLink *sl) } /* spacetype; init callback */ -static void nla_init(struct wmWindowManager *wm, ScrArea *area) +static void nla_init(wmWindowManager *wm, ScrArea *area) { SpaceNla *snla = (SpaceNla *)area->spacedata.first; diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc index 1dcc86cdbc7..fe6b85efdf5 100644 --- a/source/blender/editors/space_node/node_add.cc +++ b/source/blender/editors/space_node/node_add.cc @@ -457,9 +457,9 @@ static int node_add_group_asset_invoke(bContext *C, wmOperator *op, const wmEven return OPERATOR_FINISHED; } -static char *node_add_group_asset_get_description(struct bContext *C, - struct wmOperatorType * /*op*/, - struct PointerRNA * /*values*/) +static char *node_add_group_asset_get_description(bContext *C, + wmOperatorType * /*op*/, + PointerRNA * /*values*/) { const AssetRepresentation *asset = CTX_wm_asset(C); if (!asset) { diff --git a/source/blender/editors/space_node/node_gizmo.cc b/source/blender/editors/space_node/node_gizmo.cc index 42227d69a11..03babca68a3 100644 --- a/source/blender/editors/space_node/node_gizmo.cc +++ b/source/blender/editors/space_node/node_gizmo.cc @@ -202,7 +202,7 @@ struct NodeCropWidgetGroup { } update_data; }; -static void gizmo_node_crop_update(struct NodeCropWidgetGroup *crop_group) +static void gizmo_node_crop_update(NodeCropWidgetGroup *crop_group) { RNA_property_update( crop_group->update_data.context, &crop_group->update_data.ptr, crop_group->update_data.prop); diff --git a/source/blender/editors/space_outliner/outliner_collections.cc b/source/blender/editors/space_outliner/outliner_collections.cc index 08560e2cd2f..a6eeca8f590 100644 --- a/source/blender/editors/space_outliner/outliner_collections.cc +++ b/source/blender/editors/space_outliner/outliner_collections.cc @@ -91,7 +91,7 @@ Collection *outliner_collection_from_tree_element(const TreeElement *te) TreeTraversalAction outliner_collect_selected_collections(TreeElement *te, void *customdata) { - struct IDsSelectedData *data = static_cast(customdata); + IDsSelectedData *data = static_cast(customdata); TreeStoreElem *tselem = TREESTORE(te); if (outliner_is_collection_tree_element(te)) { @@ -108,7 +108,7 @@ TreeTraversalAction outliner_collect_selected_collections(TreeElement *te, void TreeTraversalAction outliner_collect_selected_objects(TreeElement *te, void *customdata) { - struct IDsSelectedData *data = static_cast(customdata); + IDsSelectedData *data = static_cast(customdata); TreeStoreElem *tselem = TREESTORE(te); if (outliner_is_collection_tree_element(te)) { @@ -132,7 +132,7 @@ void ED_outliner_selected_objects_get(const bContext *C, ListBase *objects) using namespace blender::ed::outliner; SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); - struct IDsSelectedData data = {{nullptr}}; + IDsSelectedData data = {{nullptr}}; outliner_tree_traverse(space_outliner, &space_outliner->tree, 0, @@ -197,7 +197,7 @@ struct CollectionNewData { static TreeTraversalAction collection_find_selected_to_add(TreeElement *te, void *customdata) { - struct CollectionNewData *data = static_cast(customdata); + CollectionNewData *data = static_cast(customdata); Collection *collection = outliner_collection_from_tree_element(te); if (!collection) { @@ -412,7 +412,7 @@ static int collection_hierarchy_delete_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); - struct wmMsgBus *mbus = CTX_wm_message_bus(C); + wmMsgBus *mbus = CTX_wm_message_bus(C); BKE_view_layer_synced_ensure(scene, view_layer); const Base *basact_prev = BKE_view_layer_active_base_get(view_layer); diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.cc b/source/blender/editors/space_outliner/outliner_dragdrop.cc index ba7d284a587..651e28205e6 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.cc +++ b/source/blender/editors/space_outliner/outliner_dragdrop.cc @@ -895,7 +895,7 @@ static bool datastack_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event) static char *datastack_drop_tooltip(bContext * /*C*/, wmDrag *drag, const int /*xy*/[2], - struct wmDropBox * /*drop*/) + wmDropBox * /*drop*/) { StackDropData *drop_data = static_cast(drag->poin); switch (drop_data->drop_action) { diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 3edb46175e2..31d32184a3b 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -675,7 +675,7 @@ static void namebutton_fn(bContext *C, void *tsep, char *oldname) { Main *bmain = CTX_data_main(C); SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); - struct wmMsgBus *mbus = CTX_wm_message_bus(C); + wmMsgBus *mbus = CTX_wm_message_bus(C); BLI_mempool *ts = space_outliner->treestore; TreeStoreElem *tselem = static_cast(tsep); diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc index 7aeb48651b8..4bc503dc3e1 100644 --- a/source/blender/editors/space_outliner/outliner_select.cc +++ b/source/blender/editors/space_outliner/outliner_select.cc @@ -333,7 +333,7 @@ static void tree_element_object_activate(bContext *C, const eObjectMode object_mode = obact ? (eObjectMode)obact->mode : OB_MODE_OBJECT; if (base && !BKE_object_is_mode_compat(base->object, object_mode)) { if (object_mode == OB_MODE_OBJECT) { - struct Main *bmain = CTX_data_main(C); + Main *bmain = CTX_data_main(C); Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); ED_object_mode_generic_exit(bmain, depsgraph, scene, base->object); } diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 9fef5af680b..67907e358a3 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -823,7 +823,7 @@ static void merged_element_search_update_fn(const bContext * /*C*/, } /* Activate an element from the merged element search menu */ -static void merged_element_search_exec_fn(struct bContext *C, void * /*arg1*/, void *element) +static void merged_element_search_exec_fn(bContext *C, void * /*arg1*/, void *element) { SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); TreeElement *te = (TreeElement *)element; @@ -2589,7 +2589,7 @@ static int outliner_delete_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); SpaceOutliner *space_outliner = CTX_wm_space_outliner(C); - struct wmMsgBus *mbus = CTX_wm_message_bus(C); + wmMsgBus *mbus = CTX_wm_message_bus(C); ViewLayer *view_layer = CTX_data_view_layer(C); BKE_view_layer_synced_ensure(scene, view_layer); const Base *basact_prev = BKE_view_layer_active_base_get(view_layer); diff --git a/source/blender/editors/space_outliner/space_outliner.cc b/source/blender/editors/space_outliner/space_outliner.cc index 38ea9f08e5a..d85402c2a6d 100644 --- a/source/blender/editors/space_outliner/space_outliner.cc +++ b/source/blender/editors/space_outliner/space_outliner.cc @@ -272,7 +272,7 @@ static void outliner_main_region_listener(const wmRegionListenerParams *params) static void outliner_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params) { - struct wmMsgBus *mbus = params->message_bus; + wmMsgBus *mbus = params->message_bus; ScrArea *area = params->area; ARegion *region = params->region; SpaceOutliner *space_outliner = static_cast(area->spacedata.first); @@ -396,7 +396,7 @@ static SpaceLink *outliner_duplicate(SpaceLink *sl) return (SpaceLink *)space_outliner_new; } -static void outliner_id_remap(ScrArea *area, SpaceLink *slink, const struct IDRemapper *mappings) +static void outliner_id_remap(ScrArea *area, SpaceLink *slink, const IDRemapper *mappings) { SpaceOutliner *space_outliner = (SpaceOutliner *)slink; @@ -441,7 +441,7 @@ static void outliner_id_remap(ScrArea *area, SpaceLink *slink, const struct IDRe } } -static void outliner_deactivate(struct ScrArea *area) +static void outliner_deactivate(ScrArea *area) { /* Remove hover highlights */ SpaceOutliner *space_outliner = static_cast(area->spacedata.first); diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index adab01fdf24..58d19a8029e 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -77,7 +77,7 @@ static void script_free(SpaceLink *sl) } /* spacetype; init callback */ -static void script_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} +static void script_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} static SpaceLink *script_duplicate(SpaceLink *sl) { diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 7221ae888f6..68f7ed5f2da 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -467,7 +467,7 @@ static int sequencer_add_scene_strip_invoke(bContext *C, wmOperator *op, const w return sequencer_add_scene_strip_exec(C, op); } -void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot) +void SEQUENCER_OT_scene_strip_add(wmOperatorType *ot) { PropertyRNA *prop; @@ -588,7 +588,7 @@ static const EnumPropertyItem *strip_new_sequencer_enum_itemf(bContext *C, return item; } -void SEQUENCER_OT_scene_strip_add_new(struct wmOperatorType *ot) +void SEQUENCER_OT_scene_strip_add_new(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Add Strip with a new Scene"; @@ -649,7 +649,7 @@ static int sequencer_add_movieclip_strip_invoke(bContext *C, wmOperator *op, con return sequencer_add_movieclip_strip_exec(C, op); } -void SEQUENCER_OT_movieclip_strip_add(struct wmOperatorType *ot) +void SEQUENCER_OT_movieclip_strip_add(wmOperatorType *ot) { PropertyRNA *prop; @@ -713,7 +713,7 @@ static int sequencer_add_mask_strip_invoke(bContext *C, wmOperator *op, const wm return sequencer_add_mask_strip_exec(C, op); } -void SEQUENCER_OT_mask_strip_add(struct wmOperatorType *ot) +void SEQUENCER_OT_mask_strip_add(wmOperatorType *ot) { PropertyRNA *prop; @@ -1039,7 +1039,7 @@ static void sequencer_add_draw(bContext *UNUSED(C), wmOperator *op) } } -void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) +void SEQUENCER_OT_movie_strip_add(wmOperatorType *ot) { /* Identifiers. */ @@ -1172,7 +1172,7 @@ static int sequencer_add_sound_strip_invoke(bContext *C, return OPERATOR_RUNNING_MODAL; } -void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) +void SEQUENCER_OT_sound_strip_add(wmOperatorType *ot) { /* Identifiers. */ @@ -1372,7 +1372,7 @@ static int sequencer_add_image_strip_invoke(bContext *C, return OPERATOR_RUNNING_MODAL; } -void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot) +void SEQUENCER_OT_image_strip_add(wmOperatorType *ot) { /* Identifiers. */ @@ -1532,7 +1532,7 @@ static char *sequencer_add_effect_strip_desc(bContext *UNUSED(C), return NULL; } -void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot) +void SEQUENCER_OT_effect_strip_add(wmOperatorType *ot) { PropertyRNA *prop; diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c index 6a5abc113ef..212a32fbf80 100644 --- a/source/blender/editors/space_sequencer/sequencer_buttons.c +++ b/source/blender/editors/space_sequencer/sequencer_buttons.c @@ -58,7 +58,7 @@ static void metadata_panel_context_draw(const bContext *C, Panel *panel) } struct Main *bmain = CTX_data_main(C); struct Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C); - struct Scene *scene = CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); ARegion *region = CTX_wm_region(C); SpaceSeq *space_sequencer = CTX_wm_space_seq(C); /* NOTE: We can only reliably show metadata for the original (current) diff --git a/source/blender/editors/space_sequencer/sequencer_channels_edit.c b/source/blender/editors/space_sequencer/sequencer_channels_edit.c index b23ef4f7ca3..7bb764bec85 100644 --- a/source/blender/editors/space_sequencer/sequencer_channels_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_channels_edit.c @@ -45,7 +45,7 @@ static int sequencer_rename_channel_invoke(bContext *C, return OPERATOR_FINISHED; } -void SEQUENCER_OT_rename_channel(struct wmOperatorType *ot) +void SEQUENCER_OT_rename_channel(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Rename Channel"; diff --git a/source/blender/editors/space_sequencer/sequencer_drag_drop.c b/source/blender/editors/space_sequencer/sequencer_drag_drop.c index a13b0563e0c..69172dee685 100644 --- a/source/blender/editors/space_sequencer/sequencer_drag_drop.c +++ b/source/blender/editors/space_sequencer/sequencer_drag_drop.c @@ -493,7 +493,7 @@ static void draw_seq_in_view(bContext *C, wmWindow *UNUSED(win), wmDrag *drag, c UI_view2d_text_cache_draw(region); } -static bool generic_drop_draw_handling(struct wmDropBox *drop) +static bool generic_drop_draw_handling(wmDropBox *drop) { SeqDropCoords *coords = drop->draw_data; if (coords && coords->in_use) { @@ -610,21 +610,21 @@ static void audio_prefetch(bContext *C, wmDrag *drag) } } -static void movie_drop_draw_activate(struct wmDropBox *drop, wmDrag *UNUSED(drag)) +static void movie_drop_draw_activate(wmDropBox *drop, wmDrag *UNUSED(drag)) { if (generic_drop_draw_handling(drop)) { return; } } -static void sound_drop_draw_activate(struct wmDropBox *drop, wmDrag *UNUSED(drag)) +static void sound_drop_draw_activate(wmDropBox *drop, wmDrag *UNUSED(drag)) { if (generic_drop_draw_handling(drop)) { return; } } -static void image_drop_draw_activate(struct wmDropBox *drop, wmDrag *UNUSED(drag)) +static void image_drop_draw_activate(wmDropBox *drop, wmDrag *UNUSED(drag)) { if (generic_drop_draw_handling(drop)) { return; @@ -635,7 +635,7 @@ static void image_drop_draw_activate(struct wmDropBox *drop, wmDrag *UNUSED(drag coords->channel_len = 1; } -static void sequencer_drop_draw_deactivate(struct wmDropBox *drop, wmDrag *UNUSED(drag)) +static void sequencer_drop_draw_deactivate(wmDropBox *drop, wmDrag *UNUSED(drag)) { SeqDropCoords *coords = drop->draw_data; if (coords) { @@ -658,7 +658,7 @@ static void nop_draw_droptip_fn(bContext *UNUSED(C), /* This region dropbox definition. */ static void sequencer_dropboxes_add_to_lb(ListBase *lb) { - struct wmDropBox *drop; + wmDropBox *drop; drop = WM_dropbox_add( lb, "SEQUENCER_OT_image_strip_add", image_drop_poll, sequencer_drop_copy, NULL, NULL); drop->draw_droptip = nop_draw_droptip_fn; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index aca011ed504..f9c3120f02f 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1834,7 +1834,7 @@ static void sequencer_preview_get_rect(rctf *preview, bool draw_overlay, bool draw_backdrop) { - struct View2D *v2d = ®ion->v2d; + View2D *v2d = ®ion->v2d; float viewrect[2]; sequencer_display_size(scene, viewrect); @@ -1982,7 +1982,7 @@ static void sequencer_draw_display_buffer(const bContext *C, static ImBuf *sequencer_get_scope(Scene *scene, SpaceSeq *sseq, ImBuf *ibuf, bool draw_backdrop) { - struct ImBuf *scope = NULL; + ImBuf *scope = NULL; SequencerScopes *scopes = &sseq->scopes; if (!draw_backdrop && (sseq->mainb != SEQ_DRAW_IMG_IMBUF || sseq->zebra != 0)) { @@ -2149,9 +2149,9 @@ void sequencer_draw_preview(const bContext *C, { struct Main *bmain = CTX_data_main(C); struct Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C); - struct View2D *v2d = ®ion->v2d; - struct ImBuf *ibuf = NULL; - struct ImBuf *scope = NULL; + View2D *v2d = ®ion->v2d; + ImBuf *ibuf = NULL; + ImBuf *scope = NULL; float viewrect[2]; const bool show_imbuf = ED_space_sequencer_check_show_imbuf(sseq); const bool draw_gpencil = ((sseq->preview_overlay.flag & SEQ_PREVIEW_SHOW_GPENCIL) && sseq->gpd); @@ -2436,7 +2436,7 @@ static void seq_draw_sfra_efra(const Scene *scene, View2D *v2d) } typedef struct CacheDrawData { - struct View2D *v2d; + View2D *v2d; float stripe_ofs_y; float stripe_ht; int cache_flag; @@ -2470,12 +2470,12 @@ static bool draw_cache_view_init_fn(void *userdata, size_t item_count) /* Called as a callback */ static bool draw_cache_view_iter_fn(void *userdata, - struct Sequence *seq, + Sequence *seq, int timeline_frame, int cache_type) { CacheDrawData *drawdata = userdata; - struct View2D *v2d = drawdata->v2d; + View2D *v2d = drawdata->v2d; float stripe_bot, stripe_top, stripe_ofs_y, stripe_ht; GPUVertBuf *vbo; size_t *vert_count; @@ -2553,7 +2553,7 @@ static void draw_cache_view(const bContext *C) { Scene *scene = CTX_data_scene(C); ARegion *region = CTX_wm_region(C); - struct View2D *v2d = ®ion->v2d; + View2D *v2d = ®ion->v2d; if ((scene->ed->cache_flag & SEQ_CACHE_VIEW_ENABLE) == 0) { return; @@ -2664,7 +2664,7 @@ static void draw_cache_view(const bContext *C) } /* Draw sequencer timeline. */ -static void draw_overlap_frame_indicator(const struct Scene *scene, const View2D *v2d) +static void draw_overlap_frame_indicator(const Scene *scene, const View2D *v2d) { int overlap_frame = (scene->ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) ? scene->ed->overlay_frame_abs : diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 6051db65c27..7ea2d4a45a8 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -142,8 +142,7 @@ static bool sequencer_fcurves_targets_color_strip(const FCurve *fcurve) return true; } -bool ED_space_sequencer_has_playback_animation(const struct SpaceSeq *sseq, - const struct Scene *scene) +bool ED_space_sequencer_has_playback_animation(const SpaceSeq *sseq, const Scene *scene) { if (sseq->draw_flag & SEQ_DRAW_BACKDROP) { return true; @@ -288,7 +287,7 @@ static int sequencer_gap_remove_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_gap_remove(struct wmOperatorType *ot) +void SEQUENCER_OT_gap_remove(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Remove Gaps"; @@ -326,7 +325,7 @@ static int sequencer_gap_insert_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_gap_insert(struct wmOperatorType *ot) +void SEQUENCER_OT_gap_insert(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Insert Gaps"; @@ -444,7 +443,7 @@ static int sequencer_snap_invoke(bContext *C, wmOperator *op, const wmEvent *UNU return sequencer_snap_exec(C, op); } -void SEQUENCER_OT_snap(struct wmOperatorType *ot) +void SEQUENCER_OT_snap(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Snap Strips to the Current Frame"; @@ -834,7 +833,7 @@ static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *even return OPERATOR_RUNNING_MODAL; } -void SEQUENCER_OT_slip(struct wmOperatorType *ot) +void SEQUENCER_OT_slip(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Slip Strips"; @@ -900,7 +899,7 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_mute(struct wmOperatorType *ot) +void SEQUENCER_OT_mute(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Mute Strips"; @@ -957,7 +956,7 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_unmute(struct wmOperatorType *ot) +void SEQUENCER_OT_unmute(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Unmute Strips"; @@ -998,7 +997,7 @@ static int sequencer_lock_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void SEQUENCER_OT_lock(struct wmOperatorType *ot) +void SEQUENCER_OT_lock(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Lock Strips"; @@ -1036,7 +1035,7 @@ static int sequencer_unlock_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void SEQUENCER_OT_unlock(struct wmOperatorType *ot) +void SEQUENCER_OT_unlock(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Unlock Strips"; @@ -1082,7 +1081,7 @@ static int sequencer_reload_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_reload(struct wmOperatorType *ot) +void SEQUENCER_OT_reload(wmOperatorType *ot) { PropertyRNA *prop; @@ -1132,7 +1131,7 @@ static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot) +void SEQUENCER_OT_refresh_all(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Refresh Sequencer"; @@ -1308,7 +1307,7 @@ static bool sequencer_effect_poll(bContext *C) return 0; } -void SEQUENCER_OT_reassign_inputs(struct wmOperatorType *ot) +void SEQUENCER_OT_reassign_inputs(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Reassign Inputs"; @@ -1349,7 +1348,7 @@ static int sequencer_swap_inputs_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot) +void SEQUENCER_OT_swap_inputs(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Swap Inputs"; @@ -1532,7 +1531,7 @@ static void sequencer_split_ui(bContext *UNUSED(C), wmOperator *op) } } -void SEQUENCER_OT_split(struct wmOperatorType *ot) +void SEQUENCER_OT_split(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Split Strips"; @@ -2783,7 +2782,7 @@ static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_change_effect_input(struct wmOperatorType *ot) +void SEQUENCER_OT_change_effect_input(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Change Effect Input"; @@ -2862,7 +2861,7 @@ static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot) +void SEQUENCER_OT_change_effect_type(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Change Effect Type"; @@ -3010,7 +3009,7 @@ static int sequencer_change_path_invoke(bContext *C, wmOperator *op, const wmEve return OPERATOR_RUNNING_MODAL; } -void SEQUENCER_OT_change_path(struct wmOperatorType *ot) +void SEQUENCER_OT_change_path(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Change Data/Files"; @@ -3090,7 +3089,7 @@ static int sequencer_change_scene_invoke(bContext *C, wmOperator *op, const wmEv return sequencer_change_scene_exec(C, op); } -void SEQUENCER_OT_change_scene(struct wmOperatorType *ot) +void SEQUENCER_OT_change_scene(wmOperatorType *ot) { PropertyRNA *prop; @@ -3255,7 +3254,7 @@ static bool sequencer_strip_is_text_poll(bContext *C) (seq->type == SEQ_TYPE_TEXT)); } -void SEQUENCER_OT_export_subtitles(struct wmOperatorType *ot) +void SEQUENCER_OT_export_subtitles(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Export Subtitles"; @@ -3332,7 +3331,7 @@ static int sequencer_set_range_to_strips_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_set_range_to_strips(struct wmOperatorType *ot) +void SEQUENCER_OT_set_range_to_strips(wmOperatorType *ot) { PropertyRNA *prop; @@ -3411,7 +3410,7 @@ static int sequencer_strip_transform_clear_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_strip_transform_clear(struct wmOperatorType *ot) +void SEQUENCER_OT_strip_transform_clear(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Clear Strip Transform"; @@ -3476,7 +3475,7 @@ static int sequencer_strip_transform_fit_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_strip_transform_fit(struct wmOperatorType *ot) +void SEQUENCER_OT_strip_transform_fit(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Strip Transform Set Fit"; @@ -3529,7 +3528,7 @@ static bool sequencer_strip_color_tag_set_poll(bContext *C) return act_seq != NULL; } -void SEQUENCER_OT_strip_color_tag_set(struct wmOperatorType *ot) +void SEQUENCER_OT_strip_color_tag_set(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Set Color Tag"; diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index d5be1a68a20..1bd2e373080 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -490,7 +490,7 @@ static int sequencer_de_select_all_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SEQUENCER_OT_select_all(struct wmOperatorType *ot) +void SEQUENCER_OT_select_all(wmOperatorType *ot) { /* Identifiers. */ ot->name = "(De)select All"; @@ -542,7 +542,7 @@ static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot) +void SEQUENCER_OT_select_inverse(wmOperatorType *ot) { /* Identifiers. */ ot->name = "Select Inverse"; diff --git a/source/blender/editors/space_sequencer/sequencer_thumbnails.c b/source/blender/editors/space_sequencer/sequencer_thumbnails.c index 358b9848019..ec7e4539558 100644 --- a/source/blender/editors/space_sequencer/sequencer_thumbnails.c +++ b/source/blender/editors/space_sequencer/sequencer_thumbnails.c @@ -242,7 +242,7 @@ static void sequencer_thumbnail_init_job(const bContext *C, tj = MEM_callocN(sizeof(ThumbnailDrawJob), "Thumbnail cache job"); /* Duplicate value of v2d->cur and v2d->tot to have module separation. */ - rctf *view_area = MEM_callocN(sizeof(struct rctf), "viewport area"); + rctf *view_area = MEM_callocN(sizeof(rctf), "viewport area"); view_area->xmax = v2d->cur.xmax; view_area->xmin = v2d->cur.xmin; view_area->ymax = v2d->cur.ymax; @@ -370,7 +370,7 @@ static int sequencer_thumbnail_closest_previous_frame_get(int timeline_frame, return best_frame; } -static int sequencer_thumbnail_closest_guaranteed_frame_get(struct Scene *scene, +static int sequencer_thumbnail_closest_guaranteed_frame_get(Scene *scene, Sequence *seq, int timeline_frame) { diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index cfb6e6b5384..3c4a051ff92 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -232,7 +232,7 @@ static void sequencer_free(SpaceLink *sl) } /* Space-type init callback. */ -static void sequencer_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} +static void sequencer_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} static void sequencer_refresh(const bContext *C, ScrArea *area) { diff --git a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc index ca91acd35af..f1b0b2369ad 100644 --- a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc +++ b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc @@ -182,7 +182,7 @@ static void spreadsheet_main_region_init(wmWindowManager *wm, ARegion *region) } } -ID *ED_spreadsheet_get_current_id(const struct SpaceSpreadsheet *sspreadsheet) +ID *ED_spreadsheet_get_current_id(const SpaceSpreadsheet *sspreadsheet) { if (BLI_listbase_is_empty(&sspreadsheet->viewer_path.path)) { return nullptr; diff --git a/source/blender/editors/space_statusbar/space_statusbar.c b/source/blender/editors/space_statusbar/space_statusbar.c index 65afd31b4e9..ac69f790c4c 100644 --- a/source/blender/editors/space_statusbar/space_statusbar.c +++ b/source/blender/editors/space_statusbar/space_statusbar.c @@ -52,7 +52,7 @@ static SpaceLink *statusbar_create(const ScrArea *UNUSED(area), const Scene *UNU static void statusbar_free(SpaceLink *UNUSED(sl)) {} /* spacetype; init callback */ -static void statusbar_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} +static void statusbar_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} static SpaceLink *statusbar_duplicate(SpaceLink *sl) { @@ -74,7 +74,7 @@ static void statusbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *r static void statusbar_operatortypes(void) {} -static void statusbar_keymap(struct wmKeyConfig *UNUSED(keyconf)) {} +static void statusbar_keymap(wmKeyConfig *UNUSED(keyconf)) {} static void statusbar_header_region_listener(const wmRegionListenerParams *params) { diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index c0da428031f..037e366ff59 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -94,7 +94,7 @@ static void text_free(SpaceLink *sl) } /* spacetype; init callback */ -static void text_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} +static void text_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} static SpaceLink *text_duplicate(SpaceLink *sl) { @@ -213,7 +213,7 @@ static void text_operatortypes(void) WM_operatortype_append(TEXT_OT_autocomplete); } -static void text_keymap(struct wmKeyConfig *keyconf) +static void text_keymap(wmKeyConfig *keyconf) { WM_keymap_ensure(keyconf, "Text Generic", SPACE_TEXT, 0); WM_keymap_ensure(keyconf, "Text", SPACE_TEXT, 0); diff --git a/source/blender/editors/space_text/text_format.c b/source/blender/editors/space_text/text_format.c index d1f283962a5..d6106340757 100644 --- a/source/blender/editors/space_text/text_format.c +++ b/source/blender/editors/space_text/text_format.c @@ -202,7 +202,7 @@ TextFormatType *ED_text_format_get(Text *text) const char *ED_text_format_comment_line_prefix(Text *text) { - const struct TextFormatType *format = ED_text_format_get(text); + const TextFormatType *format = ED_text_format_get(text); return format->comment_line; } diff --git a/source/blender/editors/space_text/text_undo.cc b/source/blender/editors/space_text/text_undo.cc index 34036629348..194dacaea61 100644 --- a/source/blender/editors/space_text/text_undo.cc +++ b/source/blender/editors/space_text/text_undo.cc @@ -143,7 +143,7 @@ static bool text_undosys_poll(bContext * /*C*/) return (ustack->step_init && (ustack->step_init->type == BKE_UNDOSYS_TYPE_TEXT)); } -static void text_undosys_step_encode_init(struct bContext *C, UndoStep *us_p) +static void text_undosys_step_encode_init(bContext *C, UndoStep *us_p) { TextUndoStep *us = (TextUndoStep *)us_p; BLI_assert(BLI_array_is_zeroed(us->states, ARRAY_SIZE(us->states))); @@ -169,7 +169,7 @@ static void text_undosys_step_encode_init(struct bContext *C, UndoStep *us_p) us->text_ref.ptr = text; } -static bool text_undosys_step_encode(struct bContext *C, struct Main * /*bmain*/, UndoStep *us_p) +static bool text_undosys_step_encode(bContext *C, Main * /*bmain*/, UndoStep *us_p) { TextUndoStep *us = (TextUndoStep *)us_p; @@ -184,11 +184,8 @@ static bool text_undosys_step_encode(struct bContext *C, struct Main * /*bmain*/ return true; } -static void text_undosys_step_decode(struct bContext *C, - struct Main * /*bmain*/, - UndoStep *us_p, - const eUndoStepDir dir, - bool is_final) +static void text_undosys_step_decode( + bContext *C, Main * /*bmain*/, UndoStep *us_p, const eUndoStepDir dir, bool is_final) { BLI_assert(dir != STEP_INVALID); diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c index 574d8ee6af9..6a9a063e849 100644 --- a/source/blender/editors/space_topbar/space_topbar.c +++ b/source/blender/editors/space_topbar/space_topbar.c @@ -69,7 +69,7 @@ static SpaceLink *topbar_create(const ScrArea *UNUSED(area), const Scene *UNUSED static void topbar_free(SpaceLink *UNUSED(sl)) {} /* spacetype; init callback */ -static void topbar_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} +static void topbar_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} static SpaceLink *topbar_duplicate(SpaceLink *sl) { @@ -97,7 +97,7 @@ static void topbar_main_region_init(wmWindowManager *wm, ARegion *region) static void topbar_operatortypes(void) {} -static void topbar_keymap(struct wmKeyConfig *UNUSED(keyconf)) {} +static void topbar_keymap(wmKeyConfig *UNUSED(keyconf)) {} /* add handlers, stuff you only do once or on area/region changes */ static void topbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region) @@ -189,7 +189,7 @@ static void topbar_header_region_message_subscribe(const wmRegionMessageSubscrib static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu) { - struct RecentFile *recent; + RecentFile *recent; uiLayout *layout = menu->layout; uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT); if (!BLI_listbase_is_empty(&G.recent_files)) { diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c index 3bd364fe65e..4d4009ad78a 100644 --- a/source/blender/editors/space_userpref/space_userpref.c +++ b/source/blender/editors/space_userpref/space_userpref.c @@ -84,7 +84,7 @@ static void userpref_free(SpaceLink *UNUSED(sl)) } /* spacetype; init callback */ -static void userpref_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} +static void userpref_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) {} static SpaceLink *userpref_duplicate(SpaceLink *sl) { @@ -131,7 +131,7 @@ static void userpref_main_region_layout(const bContext *C, ARegion *region) static void userpref_operatortypes(void) {} -static void userpref_keymap(struct wmKeyConfig *UNUSED(keyconf)) {} +static void userpref_keymap(wmKeyConfig *UNUSED(keyconf)) {} /* add handlers, stuff you only do once or on area/region changes */ static void userpref_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region) diff --git a/source/blender/editors/space_userpref/userpref_ops.c b/source/blender/editors/space_userpref/userpref_ops.c index 50a04f340d9..8158de8717d 100644 --- a/source/blender/editors/space_userpref/userpref_ops.c +++ b/source/blender/editors/space_userpref/userpref_ops.c @@ -285,7 +285,7 @@ static int associate_blend_exec(bContext *UNUSED(C), wmOperator *op) #endif } -static void PREFERENCES_OT_associate_blend(struct wmOperatorType *ot) +static void PREFERENCES_OT_associate_blend(wmOperatorType *ot) { /* identifiers */ ot->name = "Register File Association"; @@ -333,7 +333,7 @@ static int unassociate_blend_exec(bContext *UNUSED(C), wmOperator *op) #endif } -static void PREFERENCES_OT_unassociate_blend(struct wmOperatorType *ot) +static void PREFERENCES_OT_unassociate_blend(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove File Association"; diff --git a/source/blender/editors/space_view3d/space_view3d.cc b/source/blender/editors/space_view3d/space_view3d.cc index c53900e4364..8de9175ce3e 100644 --- a/source/blender/editors/space_view3d/space_view3d.cc +++ b/source/blender/editors/space_view3d/space_view3d.cc @@ -175,7 +175,7 @@ bool ED_view3d_area_user_region(const ScrArea *area, const View3D *v3d, ARegion return false; } -void ED_view3d_init_mats_rv3d(const struct Object *ob, struct RegionView3D *rv3d) +void ED_view3d_init_mats_rv3d(const Object *ob, RegionView3D *rv3d) { /* local viewmat and persmat, to calculate projections */ mul_m4_m4m4(rv3d->viewmatob, rv3d->viewmat, ob->object_to_world); @@ -185,7 +185,7 @@ void ED_view3d_init_mats_rv3d(const struct Object *ob, struct RegionView3D *rv3d ED_view3d_clipping_local(rv3d, ob->object_to_world); } -void ED_view3d_init_mats_rv3d_gl(const struct Object *ob, struct RegionView3D *rv3d) +void ED_view3d_init_mats_rv3d_gl(const Object *ob, RegionView3D *rv3d) { ED_view3d_init_mats_rv3d(ob, rv3d); @@ -507,7 +507,7 @@ static bool view3d_drop_id_in_main_region_poll(bContext *C, return WM_drag_is_ID_type(drag, id_type); } -static void view3d_ob_drop_draw_activate(struct wmDropBox *drop, wmDrag *drag) +static void view3d_ob_drop_draw_activate(wmDropBox *drop, wmDrag *drag) { V3DSnapCursorState *state = static_cast(drop->draw_data); if (state) { @@ -530,7 +530,7 @@ static void view3d_ob_drop_draw_activate(struct wmDropBox *drop, wmDrag *drag) BKE_object_dimensions_get(ob, dimensions); } else { - struct AssetMetaData *meta_data = WM_drag_get_asset_meta_data(drag, ID_OB); + AssetMetaData *meta_data = WM_drag_get_asset_meta_data(drag, ID_OB); IDProperty *dimensions_prop = BKE_asset_metadata_idprop_find(meta_data, "dimensions"); if (dimensions_prop) { copy_v3_v3(dimensions, static_cast(IDP_Array(dimensions_prop))); @@ -544,7 +544,7 @@ static void view3d_ob_drop_draw_activate(struct wmDropBox *drop, wmDrag *drag) } } -static void view3d_ob_drop_draw_deactivate(struct wmDropBox *drop, wmDrag * /*drag*/) +static void view3d_ob_drop_draw_deactivate(wmDropBox *drop, wmDrag * /*drag*/) { V3DSnapCursorState *state = static_cast(drop->draw_data); if (state) { @@ -743,7 +743,7 @@ static bool view3d_geometry_nodes_drop_poll(bContext *C, wmDrag *drag, const wmE static char *view3d_geometry_nodes_drop_tooltip(bContext *C, wmDrag * /*drag*/, const int xy[2], - struct wmDropBox *drop) + wmDropBox *drop) { ARegion *region = CTX_wm_region(C); int mval[2] = {xy[0] - region->winrct.xmin, xy[1] - region->winrct.ymin}; @@ -938,7 +938,7 @@ static void view3d_dropboxes() { ListBase *lb = WM_dropboxmap_find("View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW); - struct wmDropBox *drop; + wmDropBox *drop; drop = WM_dropbox_add(lb, "OBJECT_OT_add_named", view3d_ob_drop_poll_local_id, @@ -1394,9 +1394,9 @@ static void view3d_main_region_listener(const wmRegionListenerParams *params) } } -static void view3d_do_msg_notify_workbench_view_update(struct bContext *C, - struct wmMsgSubscribeKey * /*msg_key*/, - struct wmMsgSubscribeValue *msg_val) +static void view3d_do_msg_notify_workbench_view_update(bContext *C, + wmMsgSubscribeKey * /*msg_key*/, + wmMsgSubscribeValue *msg_val) { Scene *scene = CTX_data_scene(C); ScrArea *area = (ScrArea *)msg_val->user_data; @@ -1417,7 +1417,7 @@ static void view3d_do_msg_notify_workbench_view_update(struct bContext *C, static void view3d_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params) { - struct wmMsgBus *mbus = params->message_bus; + wmMsgBus *mbus = params->message_bus; const bContext *C = params->context; ScrArea *area = params->area; ARegion *region = params->region; @@ -1620,7 +1620,7 @@ static void view3d_header_region_listener(const wmRegionListenerParams *params) static void view3d_header_region_message_subscribe(const wmRegionMessageSubscribeParams *params) { - struct wmMsgBus *mbus = params->message_bus; + wmMsgBus *mbus = params->message_bus; ARegion *region = params->region; wmMsgParams_RNA msg_key_params{}; @@ -2003,7 +2003,7 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes return CTX_RESULT_MEMBER_NOT_FOUND; } -static void view3d_id_remap_v3d_ob_centers(View3D *v3d, const struct IDRemapper *mappings) +static void view3d_id_remap_v3d_ob_centers(View3D *v3d, const IDRemapper *mappings) { if (BKE_id_remapper_apply(mappings, (ID **)&v3d->ob_center, ID_REMAP_APPLY_DEFAULT) == ID_REMAP_RESULT_SOURCE_UNASSIGNED) @@ -2014,11 +2014,8 @@ static void view3d_id_remap_v3d_ob_centers(View3D *v3d, const struct IDRemapper } } -static void view3d_id_remap_v3d(ScrArea *area, - SpaceLink *slink, - View3D *v3d, - const struct IDRemapper *mappings, - const bool is_local) +static void view3d_id_remap_v3d( + ScrArea *area, SpaceLink *slink, View3D *v3d, const IDRemapper *mappings, const bool is_local) { ARegion *region; if (BKE_id_remapper_apply(mappings, (ID **)&v3d->camera, ID_REMAP_APPLY_DEFAULT) == @@ -2039,7 +2036,7 @@ static void view3d_id_remap_v3d(ScrArea *area, } } -static void view3d_id_remap(ScrArea *area, SpaceLink *slink, const struct IDRemapper *mappings) +static void view3d_id_remap(ScrArea *area, SpaceLink *slink, const IDRemapper *mappings) { if (!BKE_id_remapper_has_mapping_for(mappings, diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 33ae4cefa85..80a9770b0f9 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -112,7 +112,7 @@ static TransformProperties *v3d_transform_props_ensure(View3D *v3d); /** \name Edit Mesh Partial Updates * \{ */ -static void *editmesh_partial_update_begin_fn(struct bContext *UNUSED(C), +static void *editmesh_partial_update_begin_fn(bContext *UNUSED(C), const struct uiBlockInteraction_Params *params, void *arg1) { @@ -153,7 +153,7 @@ static void *editmesh_partial_update_begin_fn(struct bContext *UNUSED(C), return bmpinfo; } -static void editmesh_partial_update_end_fn(struct bContext *UNUSED(C), +static void editmesh_partial_update_end_fn(bContext *UNUSED(C), const struct uiBlockInteraction_Params *UNUSED(params), void *UNUSED(arg1), void *user_data) @@ -166,7 +166,7 @@ static void editmesh_partial_update_end_fn(struct bContext *UNUSED(C), } static void editmesh_partial_update_update_fn( - struct bContext *C, + bContext *C, const struct uiBlockInteraction_Params *UNUSED(params), void *arg1, void *user_data) diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c index 3672d846728..9b6bba206c8 100644 --- a/source/blender/editors/space_view3d/view3d_camera_control.c +++ b/source/blender/editors/space_view3d/view3d_camera_control.c @@ -101,10 +101,10 @@ Object *ED_view3d_cameracontrol_object_get(View3DCameraControl *vctrl) return NULL; } -struct View3DCameraControl *ED_view3d_cameracontrol_acquire(Depsgraph *depsgraph, - Scene *scene, - View3D *v3d, - RegionView3D *rv3d) +View3DCameraControl *ED_view3d_cameracontrol_acquire(Depsgraph *depsgraph, + Scene *scene, + View3D *v3d, + RegionView3D *rv3d) { View3DCameraControl *vctrl; diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c index 026fed29732..2bcdabd5d92 100644 --- a/source/blender/editors/space_view3d/view3d_cursor_snap.c +++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c @@ -52,7 +52,7 @@ typedef struct SnapCursorDataIntern { ListBase state_intern; V3DSnapCursorData snap_data; - struct SnapObjectContext *snap_context_v3d; + SnapObjectContext *snap_context_v3d; const Scene *scene; eSnapMode snap_elem_hidden; @@ -68,7 +68,7 @@ typedef struct SnapCursorDataIntern { } last_eventstate; #ifdef USE_SNAP_DETECT_FROM_KEYMAP_HACK - struct wmKeyMap *keymap; + wmKeyMap *keymap; int snap_on; #endif @@ -938,7 +938,7 @@ static void v3d_cursor_snap_activate(void) * TODO: ED_view3d_cursor_snap_init */ #ifdef USE_SNAP_DETECT_FROM_KEYMAP_HACK - struct wmKeyConfig *keyconf = ((wmWindowManager *)G.main->wm.first)->defaultconf; + wmKeyConfig *keyconf = ((wmWindowManager *)G.main->wm.first)->defaultconf; data_intern->keymap = WM_modalkeymap_find(keyconf, "Generic Gizmo Tweak Modal Map"); RNA_enum_value_from_id(data_intern->keymap->modal_items, "SNAP_ON", &data_intern->snap_on); @@ -1053,7 +1053,7 @@ V3DSnapCursorData *ED_view3d_cursor_snap_data_get(void) return &data_intern->snap_data; } -struct SnapObjectContext *ED_view3d_cursor_snap_context_ensure(Scene *scene) +SnapObjectContext *ED_view3d_cursor_snap_context_ensure(Scene *scene) { SnapCursorDataIntern *data_intern = &g_data_intern; v3d_cursor_snap_context_ensure(scene); diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc index f481c72b6f7..e932c26d775 100644 --- a/source/blender/editors/space_view3d/view3d_draw.cc +++ b/source/blender/editors/space_view3d/view3d_draw.cc @@ -381,7 +381,7 @@ void ED_view3d_draw_setup_view(const wmWindowManager *wm, * \{ */ static void view3d_camera_border(const Scene *scene, - struct Depsgraph *depsgraph, + Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const RegionView3D *rv3d, @@ -1664,7 +1664,7 @@ void ED_view3d_draw_offscreen(Depsgraph *depsgraph, /* Store `orig` variables. */ struct { - struct bThemeState theme_state; + bThemeState theme_state; /* #View3D */ eDrawType v3d_shading_type; @@ -1678,7 +1678,7 @@ void ED_view3d_draw_offscreen(Depsgraph *depsgraph, * Needed so the value won't be left overwritten, * Without this the #wmPaintCursor can't use the pixel size & view matrices for drawing. */ - struct RV3DMatrixStore *rv3d_mats; + RV3DMatrixStore *rv3d_mats; } orig{}; orig.v3d_shading_type = eDrawType(v3d->shading.type); orig.region_winx = region->winx; @@ -2163,7 +2163,7 @@ bool ED_view3d_clipping_test(const RegionView3D *rv3d, const float co[3], const /** * \note Only use in object mode. */ -static void validate_object_select_id(struct Depsgraph *depsgraph, +static void validate_object_select_id(Depsgraph *depsgraph, const Scene *scene, ViewLayer *view_layer, ARegion *region, @@ -2350,7 +2350,7 @@ void ED_view3d_depth_override(Depsgraph *depsgraph, return; } } - struct bThemeState theme_state; + bThemeState theme_state; Scene *scene = DEG_get_evaluated_scene(depsgraph); RegionView3D *rv3d = static_cast(region->regiondata); @@ -2514,9 +2514,9 @@ struct RV3DMatrixStore { float pixsize; }; -struct RV3DMatrixStore *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d) +RV3DMatrixStore *ED_view3d_mats_rv3d_backup(RegionView3D *rv3d) { - struct RV3DMatrixStore *rv3dmat = static_cast( + RV3DMatrixStore *rv3dmat = static_cast( MEM_mallocN(sizeof(*rv3dmat), __func__)); copy_m4_m4(rv3dmat->winmat, rv3d->winmat); copy_m4_m4(rv3dmat->viewmat, rv3d->viewmat); @@ -2528,9 +2528,9 @@ struct RV3DMatrixStore *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d) return rv3dmat; } -void ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, struct RV3DMatrixStore *rv3dmat_pt) +void ED_view3d_mats_rv3d_restore(RegionView3D *rv3d, RV3DMatrixStore *rv3dmat_pt) { - struct RV3DMatrixStore *rv3dmat = rv3dmat_pt; + RV3DMatrixStore *rv3dmat = rv3dmat_pt; copy_m4_m4(rv3d->winmat, rv3dmat->winmat); copy_m4_m4(rv3d->viewmat, rv3dmat->viewmat); copy_m4_m4(rv3d->persmat, rv3dmat->persmat); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 50e98e21eb0..63e54e276d6 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -848,7 +848,7 @@ void ED_view3d_cursor3d_position(bContext *C, } if (use_depth) { /* maybe this should be accessed some other way */ - struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); view3d_operator_needs_opengl(C); if (ED_view3d_autodist(depsgraph, region, v3d, mval, cursor_co, true, NULL)) { @@ -902,7 +902,7 @@ void ED_view3d_cursor3d_position_rotation(bContext *C, float ray_no[3]; float ray_co[3]; - struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create(scene, 0); + SnapObjectContext *snap_context = ED_transform_snap_object_context_create(scene, 0); float obmat[4][4]; Object *ob_dummy = NULL; diff --git a/source/blender/editors/space_view3d/view3d_gizmo_armature.c b/source/blender/editors/space_view3d/view3d_gizmo_armature.c index 3b7c29f7cac..2c5a90c169e 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_armature.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_armature.c @@ -196,7 +196,7 @@ static void WIDGETGROUP_armature_spline_refresh(const bContext *C, wmGizmoGroup /* need to set property here for undo. TODO: would prefer to do this in _init. */ WM_gizmo_target_property_def_func(gz, "offset", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_bbone_offset_get, .value_set_fn = gizmo_bbone_offset_set, .range_get_fn = NULL, diff --git a/source/blender/editors/space_view3d/view3d_gizmo_camera.c b/source/blender/editors/space_view3d/view3d_gizmo_camera.c index 6320983b890..1ca0055f020 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_camera.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_camera.c @@ -431,7 +431,7 @@ static void WIDGETGROUP_camera_view_draw_prepare(const bContext *C, wmGizmoGroup ARegion *region = CTX_wm_region(C); /* Drawing code should happen with fully evaluated graph. */ - struct Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C); + Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C); RegionView3D *rv3d = region->regiondata; if (rv3d->persp == RV3D_CAMOB) { Scene *scene = CTX_data_scene(C); @@ -486,7 +486,7 @@ static void WIDGETGROUP_camera_view_refresh(const bContext *C, wmGizmoGroup *gzg WM_gizmo_target_property_def_func(gz, "matrix", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_render_border_prop_matrix_get, .value_set_fn = gizmo_render_border_prop_matrix_set, .range_get_fn = NULL, diff --git a/source/blender/editors/space_view3d/view3d_gizmo_empty.c b/source/blender/editors/space_view3d/view3d_gizmo_empty.c index 07d34890166..11c708dcfcc 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_empty.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_empty.c @@ -176,7 +176,7 @@ static void WIDGETGROUP_empty_image_refresh(const bContext *C, wmGizmoGroup *gzg WM_gizmo_target_property_def_func(gz, "matrix", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_empty_image_prop_matrix_get, .value_set_fn = gizmo_empty_image_prop_matrix_set, .range_get_fn = NULL, diff --git a/source/blender/editors/space_view3d/view3d_gizmo_light.c b/source/blender/editors/space_view3d/view3d_gizmo_light.c index f37c52fdcec..b2a9e37c699 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_light.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_light.c @@ -191,7 +191,7 @@ static void WIDGETGROUP_light_spot_setup(const bContext *C, wmGizmoGroup *gzgrou WM_gizmo_target_property_def_func(gz, "matrix", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_spot_blend_prop_matrix_get, .value_set_fn = gizmo_spot_blend_prop_matrix_set, .range_get_fn = NULL, @@ -213,7 +213,7 @@ static void WIDGETGROUP_light_spot_setup(const bContext *C, wmGizmoGroup *gzgrou WM_gizmo_target_property_def_func(gz, "matrix", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_light_radius_prop_matrix_get, .value_set_fn = gizmo_light_radius_prop_matrix_set, .range_get_fn = NULL, @@ -339,7 +339,7 @@ static void WIDGETGROUP_light_point_setup(const bContext *C, wmGizmoGroup *gzgro WM_gizmo_target_property_def_func(gz, "matrix", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_light_radius_prop_matrix_get, .value_set_fn = gizmo_light_radius_prop_matrix_set, .range_get_fn = NULL, @@ -477,7 +477,7 @@ static void WIDGETGROUP_light_area_refresh(const bContext *C, wmGizmoGroup *gzgr /* need to set property here for undo. TODO: would prefer to do this in _init. */ WM_gizmo_target_property_def_func(gz, "matrix", - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = gizmo_area_light_prop_matrix_get, .value_set_fn = gizmo_area_light_prop_matrix_set, .range_get_fn = NULL, diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc index cf748633e06..de837600f3a 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc @@ -128,7 +128,7 @@ enum { struct RulerItem; struct RulerInfo { - struct RulerItem *item_active; + RulerItem *item_active; int flag; int snap_flag; int state; @@ -340,7 +340,7 @@ static void view3d_ruler_item_project(RulerInfo *ruler_info, float3 &r_co, const * Use for mouse-move events. */ static bool view3d_ruler_item_mousemove(const bContext *C, - struct Depsgraph *depsgraph, + Depsgraph *depsgraph, RulerInfo *ruler_info, RulerItem *ruler_item, const int mval[2], @@ -1068,7 +1068,7 @@ static int gizmo_ruler_modal(bContext *C, if (do_cursor_update) { if (ruler_info->state == RULER_STATE_DRAG) { - struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); if (view3d_ruler_item_mousemove( C, depsgraph, ruler_info, ruler_item, event->mval, do_thickness, do_snap)) { @@ -1129,7 +1129,7 @@ static int gizmo_ruler_invoke(bContext *C, wmGizmo *gz, const wmEvent *event) } /* update the new location */ - struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); view3d_ruler_item_mousemove( C, depsgraph, ruler_info, ruler_item_pick, event->mval, false, false); } @@ -1325,7 +1325,7 @@ static int view3d_ruler_add_invoke(bContext *C, wmOperator *op, const wmEvent *e { RulerInfo *ruler_info = static_cast(gzgroup->customdata); RulerInteraction *inter = static_cast(ruler_item->gz.interaction_data); - struct Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); inter->co_index = 0; #ifndef USE_SNAP_DETECT_FROM_KEYMAP_HACK diff --git a/source/blender/editors/space_view3d/view3d_gizmo_tool_generic.c b/source/blender/editors/space_view3d/view3d_gizmo_tool_generic.c index 5cbaea39469..57319dc5944 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_tool_generic.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_tool_generic.c @@ -106,7 +106,7 @@ static wmGizmo *tool_generic_create_gizmo(const bContext *C, wmGizmoGroup *gzgro } wmWindowManager *wm = CTX_wm_manager(C); - struct wmKeyConfig *kc = wm->defaultconf; + wmKeyConfig *kc = wm->defaultconf; gz->keymap = WM_keymap_ensure(kc, tref->runtime->keymap, tref->space_type, RGN_TYPE_WINDOW); return gz; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index fa5d8d6edf2..1be4891b515 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -79,7 +79,7 @@ void VIEW3D_OT_toggle_matcap_flip(wmOperatorType *ot) /** \name UI Templates * \{ */ -void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C) +void uiTemplateEditModeSelection(uiLayout *layout, bContext *C) { Object *obedit = CTX_data_edit_object(C); if (!obedit || obedit->type != OB_MESH) { @@ -120,7 +120,7 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C) RNA_enum_set(&op_ptr, "type", SCE_SELECT_FACE); } -static void uiTemplatePaintModeSelection(uiLayout *layout, struct bContext *C) +static void uiTemplatePaintModeSelection(uiLayout *layout, bContext *C) { const Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); @@ -144,7 +144,7 @@ static void uiTemplatePaintModeSelection(uiLayout *layout, struct bContext *C) } } -void uiTemplateHeader3D_mode(uiLayout *layout, struct bContext *C) +void uiTemplateHeader3D_mode(uiLayout *layout, bContext *C) { const Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); diff --git a/source/blender/editors/space_view3d/view3d_navigate.cc b/source/blender/editors/space_view3d/view3d_navigate.cc index 585a0384923..11c0d1c7162 100644 --- a/source/blender/editors/space_view3d/view3d_navigate.cc +++ b/source/blender/editors/space_view3d/view3d_navigate.cc @@ -1980,11 +1980,8 @@ ViewOpsData *ED_view3d_navigation_init(bContext *C) } /* Checks and initializes the navigation modal operation. */ -static int view3d_navigation_invoke(bContext *C, - ViewOpsData *vod, - const wmEvent *event, - struct wmKeyMapItem *kmi, - eV3D_OpMode nav_type) +static int view3d_navigation_invoke( + bContext *C, ViewOpsData *vod, const wmEvent *event, wmKeyMapItem *kmi, eV3D_OpMode nav_type) { switch (nav_type) { case V3D_OP_MODE_ZOOM: diff --git a/source/blender/editors/space_view3d/view3d_navigate_fly.c b/source/blender/editors/space_view3d/view3d_navigate_fly.c index 8c3ec1971b7..1e8c5a22bd7 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_fly.c +++ b/source/blender/editors/space_view3d/view3d_navigate_fly.c @@ -146,7 +146,7 @@ typedef struct FlyInfo { RegionView3D *rv3d; View3D *v3d; ARegion *region; - struct Depsgraph *depsgraph; + Depsgraph *depsgraph; Scene *scene; /** Needed for updating that isn't triggered by input. */ @@ -218,9 +218,9 @@ typedef struct FlyInfo { #ifdef WITH_INPUT_NDOF static void flyApply_ndof(bContext *C, FlyInfo *fly, bool is_confirm); #endif /* WITH_INPUT_NDOF */ -static int flyApply(bContext *C, struct FlyInfo *fly, bool is_confirm); +static int flyApply(bContext *C, FlyInfo *fly, bool is_confirm); -static void drawFlyPixel(const struct bContext *UNUSED(C), ARegion *UNUSED(region), void *arg) +static void drawFlyPixel(const bContext *UNUSED(C), ARegion *UNUSED(region), void *arg) { FlyInfo *fly = arg; rctf viewborder; diff --git a/source/blender/editors/space_view3d/view3d_navigate_ndof.c b/source/blender/editors/space_view3d/view3d_navigate_ndof.c index 8a964699368..ea4becbade7 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_ndof.c +++ b/source/blender/editors/space_view3d/view3d_navigate_ndof.c @@ -89,7 +89,7 @@ static float view3d_ndof_pan_speed_calc(RegionView3D *rv3d) * \param has_zoom: zoom, otherwise dolly, * often `!rv3d->is_persp` since it doesn't make sense to dolly in ortho. */ -static void view3d_ndof_pan_zoom(const struct wmNDOFMotionData *ndof, +static void view3d_ndof_pan_zoom(const wmNDOFMotionData *ndof, ScrArea *area, ARegion *region, const bool has_translate, @@ -153,7 +153,7 @@ static void view3d_ndof_pan_zoom(const struct wmNDOFMotionData *ndof, } } -static void view3d_ndof_orbit(const struct wmNDOFMotionData *ndof, +static void view3d_ndof_orbit(const wmNDOFMotionData *ndof, ScrArea *area, ARegion *region, ViewOpsData *vod, @@ -481,7 +481,7 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_FINISHED; } -void VIEW3D_OT_ndof_orbit(struct wmOperatorType *ot) +void VIEW3D_OT_ndof_orbit(wmOperatorType *ot) { /* identifiers */ ot->name = "NDOF Orbit View"; @@ -601,7 +601,7 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev return OPERATOR_FINISHED; } -void VIEW3D_OT_ndof_orbit_zoom(struct wmOperatorType *ot) +void VIEW3D_OT_ndof_orbit_zoom(wmOperatorType *ot) { /* identifiers */ ot->name = "NDOF Orbit View with Zoom"; @@ -673,7 +673,7 @@ static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *e return OPERATOR_FINISHED; } -void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot) +void VIEW3D_OT_ndof_pan(wmOperatorType *ot) { /* identifiers */ ot->name = "NDOF Pan View"; @@ -712,7 +712,7 @@ static int ndof_all_invoke(bContext *C, wmOperator *op, const wmEvent *event) return ret; } -void VIEW3D_OT_ndof_all(struct wmOperatorType *ot) +void VIEW3D_OT_ndof_all(wmOperatorType *ot) { /* identifiers */ ot->name = "NDOF Transform View"; diff --git a/source/blender/editors/space_view3d/view3d_navigate_smoothview.c b/source/blender/editors/space_view3d/view3d_navigate_smoothview.c index bd0cdb5f7ee..fa8c2437dbc 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_smoothview.c +++ b/source/blender/editors/space_view3d/view3d_navigate_smoothview.c @@ -368,7 +368,7 @@ void ED_view3d_smooth_view(bContext *C, View3D *v3d, ARegion *region, const int smooth_viewtx, - const struct V3D_SmoothParams *sview) + const V3D_SmoothParams *sview) { const Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); wmWindowManager *wm = CTX_wm_manager(C); @@ -376,7 +376,7 @@ void ED_view3d_smooth_view(bContext *C, ScrArea *area = CTX_wm_area(C); /* #ED_view3d_smooth_view_ex asserts this is not set as it doesn't support undo. */ - struct V3D_SmoothParams sview_no_undo = *sview; + V3D_SmoothParams sview_no_undo = *sview; sview_no_undo.undo_str = NULL; sview_no_undo.undo_grouped = false; diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c b/source/blender/editors/space_view3d/view3d_navigate_walk.c index b5a01e52393..b7f9814a40c 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.c +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c @@ -204,7 +204,7 @@ typedef struct WalkInfo { RegionView3D *rv3d; View3D *v3d; ARegion *region; - struct Depsgraph *depsgraph; + Depsgraph *depsgraph; Scene *scene; /** Needed for updating that isn't triggered by input. */ @@ -294,7 +294,7 @@ typedef struct WalkInfo { /** Nicer dynamics. */ float zlock_momentum; - struct SnapObjectContext *snap_context; + SnapObjectContext *snap_context; struct View3DCameraControl *v3d_camera_control; @@ -310,10 +310,10 @@ typedef struct WalkInfo { #ifdef WITH_INPUT_NDOF static void walkApply_ndof(bContext *C, WalkInfo *walk, bool is_confirm); #endif /* WITH_INPUT_NDOF */ -static int walkApply(bContext *C, struct WalkInfo *walk, bool is_confirm); +static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm); static float getVelocityZeroTime(const float gravity, const float velocity); -static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *region, void *arg) +static void drawWalkPixel(const bContext *UNUSED(C), ARegion *region, void *arg) { /* draws an aim/cross in the center */ WalkInfo *walk = arg; diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c index 42e545cb63e..1e4db88fe29 100644 --- a/source/blender/editors/space_view3d/view3d_placement.c +++ b/source/blender/editors/space_view3d/view3d_placement.c @@ -526,7 +526,7 @@ static void draw_circle_in_quad(const float v1[3], /** \name Drawing Callbacks * \{ */ -static void draw_primitive_view_impl(const struct bContext *C, +static void draw_primitive_view_impl(const bContext *C, struct InteractivePlaceData *ipd, const float color[4], int flatten_axis) @@ -628,7 +628,7 @@ static void draw_primitive_view_impl(const struct bContext *C, } } -static void draw_primitive_view(const struct bContext *C, ARegion *UNUSED(region), void *arg) +static void draw_primitive_view(const bContext *C, ARegion *UNUSED(region), void *arg) { struct InteractivePlaceData *ipd = arg; float color[4]; @@ -1259,7 +1259,7 @@ static bool view3d_interactive_add_poll(bContext *C) return ELEM(mode, CTX_MODE_OBJECT, CTX_MODE_EDIT_MESH); } -void VIEW3D_OT_interactive_add(struct wmOperatorType *ot) +void VIEW3D_OT_interactive_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Primitive Object"; diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c index 38c7491513f..b2e11b8ec72 100644 --- a/source/blender/editors/space_view3d/view3d_project.c +++ b/source/blender/editors/space_view3d/view3d_project.c @@ -76,9 +76,7 @@ void ED_view3d_project_float_v3_m4(const ARegion *region, /* Clipping Projection Functions * ***************************** */ -eV3DProjStatus ED_view3d_project_base(const struct ARegion *region, - struct Base *base, - float r_co[2]) +eV3DProjStatus ED_view3d_project_base(const ARegion *region, Base *base, float r_co[2]) { eV3DProjStatus ret = ED_view3d_project_float_global( region, base->object->object_to_world[3], r_co, V3D_PROJ_TEST_CLIP_DEFAULT); @@ -705,7 +703,7 @@ void ED_view3d_ob_project_mat_get_from_obmat(const RegionView3D *rv3d, mul_m4_m4m4(r_pmat, rv3d->winmat, vmat); } -void ED_view3d_project_v3(const struct ARegion *region, const float world[3], float r_region_co[3]) +void ED_view3d_project_v3(const ARegion *region, const float world[3], float r_region_co[3]) { /* Viewport is set up to make coordinates relative to the region, not window. */ RegionView3D *rv3d = region->regiondata; @@ -713,7 +711,7 @@ void ED_view3d_project_v3(const struct ARegion *region, const float world[3], fl GPU_matrix_project_3fv(world, rv3d->viewmat, rv3d->winmat, viewport, r_region_co); } -void ED_view3d_project_v2(const struct ARegion *region, const float world[3], float r_region_co[2]) +void ED_view3d_project_v2(const ARegion *region, const float world[3], float r_region_co[2]) { /* Viewport is set up to make coordinates relative to the region, not window. */ RegionView3D *rv3d = region->regiondata; @@ -722,7 +720,7 @@ void ED_view3d_project_v2(const struct ARegion *region, const float world[3], fl } bool ED_view3d_unproject_v3( - const struct ARegion *region, float regionx, float regiony, float regionz, float world[3]) + const ARegion *region, float regionx, float regiony, float regionz, float world[3]) { RegionView3D *rv3d = region->regiondata; const int viewport[4] = {0, 0, region->winx, region->winy}; diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc index f9e47aeeca7..2e547863a51 100644 --- a/source/blender/editors/space_view3d/view3d_select.cc +++ b/source/blender/editors/space_view3d/view3d_select.cc @@ -1624,7 +1624,7 @@ static bool object_mouse_select_menu(bContext *C, int base_count = 0; struct BaseRefWithDepth { - struct BaseRefWithDepth *next, *prev; + BaseRefWithDepth *next, *prev; Base *base; /** The scale isn't defined, simply use for sorting. */ uint depth_id; @@ -1835,7 +1835,7 @@ static bool bone_mouse_select_menu(bContext *C, int bone_count = 0; struct BoneRefWithDepth { - struct BoneRefWithDepth *next, *prev; + BoneRefWithDepth *next, *prev; Base *base; union { EditBone *ebone; @@ -3674,8 +3674,7 @@ static bool do_mesh_box_select(ViewContext *vc, } if (ts->selectmode & SCE_SELECT_EDGE) { /* Does both use_zbuf and non-use_zbuf versions (need screen cos for both) */ - struct BoxSelectUserData_ForMeshEdge cb_data { - }; + BoxSelectUserData_ForMeshEdge cb_data{}; cb_data.data = &data; cb_data.esel = use_zbuf ? esel : nullptr; cb_data.backbuf_offset = use_zbuf ? DRW_select_buffer_context_offset_for_object_elem( diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 2787ba0aa73..85ed99e327f 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -110,7 +110,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) MEM_freeN(objects); } else if (OBPOSE_FROM_OBACT(obact)) { - struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); + KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); uint objects_len = 0; Object **objects_eval = BKE_object_pose_array_get(scene, view_layer_eval, v3d, &objects_len); for (uint ob_index = 0; ob_index < objects_len; ob_index++) { @@ -171,7 +171,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) /* Object mode. */ Main *bmain = CTX_data_main(C); - struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); + KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); const bool use_transform_skip_children = (scene->toolsettings->transform_flag & SCE_XFORM_SKIP_CHILDREN); @@ -377,7 +377,7 @@ static bool snap_selected_to_location(bContext *C, MEM_freeN(objects); } else if (OBPOSE_FROM_OBACT(obact)) { - struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); + KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); ViewLayer *view_layer = CTX_data_view_layer(C); uint objects_len = 0; Object **objects = BKE_object_pose_array_get(scene, view_layer, v3d, &objects_len); @@ -457,7 +457,7 @@ static bool snap_selected_to_location(bContext *C, MEM_freeN(objects); } else { - struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); + KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); Main *bmain = CTX_data_main(C); Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index a99e121a2ac..3ffe27f58c0 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -631,11 +631,8 @@ bool ED_view3d_camera_lock_sync(const Depsgraph *depsgraph, View3D *v3d, RegionV return false; } -bool ED_view3d_camera_autokey(const Scene *scene, - ID *id_key, - struct bContext *C, - const bool do_rotate, - const bool do_translate) +bool ED_view3d_camera_autokey( + const Scene *scene, ID *id_key, bContext *C, const bool do_rotate, const bool do_translate) { if (autokeyframe_cfra_can_key(scene, id_key)) { const float cfra = (float)scene->r.cfra; @@ -650,11 +647,11 @@ bool ED_view3d_camera_autokey(const Scene *scene, * TODO: need to check in future that frame changed before doing this */ if (do_rotate) { - struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_ROTATION_ID); + KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_ROTATION_ID); ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra); } if (do_translate) { - struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); + KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra); } @@ -666,11 +663,8 @@ bool ED_view3d_camera_autokey(const Scene *scene, return false; } -bool ED_view3d_camera_lock_autokey(View3D *v3d, - RegionView3D *rv3d, - struct bContext *C, - const bool do_rotate, - const bool do_translate) +bool ED_view3d_camera_lock_autokey( + View3D *v3d, RegionView3D *rv3d, bContext *C, const bool do_rotate, const bool do_translate) { /* similar to ED_view3d_cameracontrol_update */ if (ED_view3d_camera_lock_check(v3d, rv3d)) { @@ -694,9 +688,7 @@ bool ED_view3d_camera_lock_autokey(View3D *v3d, return false; } -bool ED_view3d_camera_lock_undo_test(const View3D *v3d, - const RegionView3D *rv3d, - struct bContext *C) +bool ED_view3d_camera_lock_undo_test(const View3D *v3d, const RegionView3D *rv3d, bContext *C) { if (ED_view3d_camera_lock_check(v3d, rv3d)) { if (ED_undo_is_memfile_compatible(C)) { @@ -717,7 +709,7 @@ bool ED_view3d_camera_lock_undo_test(const View3D *v3d, static bool view3d_camera_lock_undo_ex(const char *str, const View3D *v3d, const RegionView3D *rv3d, - struct bContext *C, + bContext *C, const bool undo_group) { if (ED_view3d_camera_lock_undo_test(v3d, rv3d, C)) { @@ -1235,7 +1227,7 @@ float ED_view3d_radius_to_dist_ortho(const float lens, const float radius) float ED_view3d_radius_to_dist(const View3D *v3d, const ARegion *region, - const struct Depsgraph *depsgraph, + const Depsgraph *depsgraph, const char persp, const bool use_aspect, const float radius) diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index cd95eeb5954..d6f23ace292 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1229,7 +1229,7 @@ static void view3d_local_collections_reset(Main *bmain, const uint local_view_bi } } -bool ED_view3d_local_collections_set(Main *bmain, struct View3D *v3d) +bool ED_view3d_local_collections_set(Main *bmain, View3D *v3d) { if ((v3d->flag & V3D_LOCAL_COLLECTIONS) == 0) { return true; @@ -1253,7 +1253,7 @@ bool ED_view3d_local_collections_set(Main *bmain, struct View3D *v3d) return true; } -void ED_view3d_local_collections_reset(struct bContext *C, const bool reset_all) +void ED_view3d_local_collections_reset(bContext *C, const bool reset_all) { Main *bmain = CTX_data_main(C); uint local_view_bit = ~(0); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 7e23f87fe4d..9a651e19a7f 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1409,7 +1409,7 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa return success; } -static bool transinfo_show_overlay(const struct bContext *C, TransInfo *t, ARegion *region) +static bool transinfo_show_overlay(const bContext *C, TransInfo *t, ARegion *region) { /* Don't show overlays when not the active view and when overlay is disabled: #57139 */ bool ok = false; @@ -1428,7 +1428,7 @@ static bool transinfo_show_overlay(const struct bContext *C, TransInfo *t, ARegi return ok; } -static void drawTransformView(const struct bContext *C, ARegion *region, void *arg) +static void drawTransformView(const bContext *C, ARegion *region, void *arg) { TransInfo *t = arg; @@ -1483,7 +1483,7 @@ static void drawAutoKeyWarning(TransInfo *UNUSED(t), ARegion *region) GPU_blend(GPU_BLEND_NONE); } -static void drawTransformPixel(const struct bContext *C, ARegion *region, void *arg) +static void drawTransformPixel(const bContext *C, ARegion *region, void *arg) { TransInfo *t = arg; diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 6f4839d1c49..76cd4b2c3ee 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -872,7 +872,7 @@ void drawConstraint(TransInfo *t) } } -void drawPropCircle(const struct bContext *C, TransInfo *t) +void drawPropCircle(const bContext *C, TransInfo *t) { if (t->flag & T_PROP_EDIT) { RegionView3D *rv3d = CTX_wm_region_view3d(C); diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index d7d8d41c1ee..c419a9d12f1 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -465,7 +465,7 @@ void calc_distanceCurveVerts(TransData *head, TransData *tail, bool cyclic) BLI_LINKSTACK_FREE(queue); } -TransDataCurveHandleFlags *initTransDataCurveHandles(TransData *td, struct BezTriple *bezt) +TransDataCurveHandleFlags *initTransDataCurveHandles(TransData *td, BezTriple *bezt) { TransDataCurveHandleFlags *hdata; td->flag |= TD_BEZTRIPLE; @@ -1167,7 +1167,7 @@ void transform_convert_clip_mirror_modifier_apply(TransDataContainer *tc) } } -void animrecord_check_state(TransInfo *t, struct ID *id) +void animrecord_check_state(TransInfo *t, ID *id) { Scene *scene = t->scene; wmTimer *animtimer = t->animtimer; diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index ff3003b148d..a9bc21a1cf9 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -43,7 +43,7 @@ #include "transform_convert.h" typedef struct BoneInitData { - struct EditBone *bone; + EditBone *bone; float tail[3]; float rad_head; float rad_tail; @@ -464,7 +464,7 @@ static short pose_grab_with_ik(Main *bmain, Object *ob) typedef struct PoseInitData_Mirror { /** Points to the bone which this info is initialized & restored to. * A NULL value is used to terminate the array. */ - struct bPoseChannel *pchan; + bPoseChannel *pchan; struct { float loc[3]; float size[3]; @@ -1717,7 +1717,7 @@ static void special_aftertrans_update__pose(bContext *C, TransInfo *t) /* when running transform non-interactively (operator exec), * we need to update the pose otherwise no updates get called during * transform and the auto-ik is not applied. see #26164. */ - struct Object *pose_ob = tc->poseobj; + Object *pose_ob = tc->poseobj; BKE_pose_where_is(t->depsgraph, t->scene, pose_ob); } @@ -1741,7 +1741,7 @@ static void special_aftertrans_update__pose(bContext *C, TransInfo *t) } if (t->mode == TFM_TRANSLATION) { - struct Main *bmain = CTX_data_main(t->context); + Main *bmain = CTX_data_main(t->context); pose_grab_with_ik_clear(bmain, ob); } diff --git a/source/blender/editors/transform/transform_convert_mask.c b/source/blender/editors/transform/transform_convert_mask.c index ffbdaf57e22..d8219478fdf 100644 --- a/source/blender/editors/transform/transform_convert_mask.c +++ b/source/blender/editors/transform/transform_convert_mask.c @@ -32,7 +32,7 @@ typedef struct TransDataMasking { float handle[2], orig_handle[2]; float vec[3][3]; - struct MaskSplinePoint *point; + MaskSplinePoint *point; float parent_matrix[3][3]; float parent_inverse_matrix[3][3]; char orig_handle_type; diff --git a/source/blender/editors/transform/transform_convert_mesh.c b/source/blender/editors/transform/transform_convert_mesh.c index be250956a13..44fc5a615bf 100644 --- a/source/blender/editors/transform/transform_convert_mesh.c +++ b/source/blender/editors/transform/transform_convert_mesh.c @@ -38,15 +38,15 @@ /** \name Container TransCustomData Creation * \{ */ -static void tc_mesh_customdata_free_fn(struct TransInfo *t, - struct TransDataContainer *tc, - struct TransCustomData *custom_data); +static void tc_mesh_customdata_free_fn(TransInfo *t, + TransDataContainer *tc, + TransCustomData *custom_data); struct TransCustomDataLayer; static void tc_mesh_customdatacorrect_free(struct TransCustomDataLayer *tcld); struct TransCustomData_PartialUpdate { - struct BMPartialUpdate *cache; + BMPartialUpdate *cache; /** The size of proportional editing used for #BMPartialUpdate. */ float prop_size; @@ -123,9 +123,9 @@ static void tc_mesh_customdata_free(struct TransCustomDataMesh *tcmd) MEM_freeN(tcmd); } -static void tc_mesh_customdata_free_fn(struct TransInfo *UNUSED(t), - struct TransDataContainer *UNUSED(tc), - struct TransCustomData *custom_data) +static void tc_mesh_customdata_free_fn(TransInfo *UNUSED(t), + TransDataContainer *UNUSED(tc), + TransCustomData *custom_data) { struct TransCustomDataMesh *tcmd = custom_data->data; tc_mesh_customdata_free(tcmd); @@ -140,15 +140,15 @@ static void tc_mesh_customdata_free_fn(struct TransInfo *UNUSED(t), struct TransCustomDataMergeGroup { /** map {BMVert: TransCustomDataLayerVert} */ - struct LinkNode **cd_loop_groups; + LinkNode **cd_loop_groups; }; struct TransCustomDataLayer { BMesh *bm; - struct MemArena *arena; + MemArena *arena; - struct GHash *origfaces; - struct BMesh *bm_origfaces; + GHash *origfaces; + BMesh *bm_origfaces; /* Special handle for multi-resolution. */ int cd_loop_mdisp_offset; @@ -156,7 +156,7 @@ struct TransCustomDataLayer { /* Optionally merge custom-data groups (this keeps UVs connected for example). */ struct { /** map {BMVert: TransDataBasic} */ - struct GHash *origverts; + GHash *origverts; struct TransCustomDataMergeGroup *data; int data_len; /** Array size of 'layer_math_map_len' @@ -244,7 +244,7 @@ static BMFace *tc_mesh_customdatacorrect_face_substitute_get(BMFace *f_copy) #endif /* USE_FACE_SUBSTITUTE */ static void tc_mesh_customdatacorrect_init_vert(struct TransCustomDataLayer *tcld, - struct TransDataBasic *td, + TransDataBasic *td, const int index) { BMesh *bm = tcld->bm; @@ -310,11 +310,11 @@ static void tc_mesh_customdatacorrect_init_container_generic(TransDataContainer { BMesh *bm = tcld->bm; - struct GHash *origfaces = BLI_ghash_ptr_new(__func__); - struct BMesh *bm_origfaces = BM_mesh_create(&bm_mesh_allocsize_default, - &((struct BMeshCreateParams){ - .use_toolflags = false, - })); + GHash *origfaces = BLI_ghash_ptr_new(__func__); + BMesh *bm_origfaces = BM_mesh_create(&bm_mesh_allocsize_default, + &((struct BMeshCreateParams){ + .use_toolflags = false, + })); /* We need to have matching loop custom-data. */ BM_mesh_copy_init_customdata_all_layers(bm_origfaces, bm, BM_LOOP, NULL); @@ -502,7 +502,7 @@ static const float *tc_mesh_vert_orig_co_get(struct TransCustomDataLayer *tcld, } static void tc_mesh_customdatacorrect_apply_vert(struct TransCustomDataLayer *tcld, - struct TransDataBasic *td, + TransDataBasic *td, struct TransCustomDataMergeGroup *merge_data, bool do_loop_mdisps) { @@ -592,7 +592,7 @@ static void tc_mesh_customdatacorrect_apply_vert(struct TransCustomDataLayer *tc } if (tcld->use_merge_group) { - struct LinkNode **cd_loop_groups = merge_data->cd_loop_groups; + LinkNode **cd_loop_groups = merge_data->cd_loop_groups; if (tcld->merge_group.customdatalayer_map_len && cd_loop_groups) { if (do_loop_weight) { for (j = 0; j < tcld->merge_group.customdatalayer_map_len; j++) { @@ -679,7 +679,7 @@ static void tc_mesh_customdatacorrect_apply(TransDataContainer *tc, bool is_fina /** \name CustomData Layer Correction Restore * \{ */ -static void tc_mesh_customdatacorrect_restore(struct TransInfo *t) +static void tc_mesh_customdatacorrect_restore(TransInfo *t) { FOREACH_TRANS_DATA_CONTAINER (t, tc) { struct TransCustomDataMesh *tcmd = tc->custom.type.data; @@ -715,7 +715,7 @@ static void tc_mesh_customdatacorrect_restore(struct TransInfo *t) /** \name Island Creation * \{ */ -void transform_convert_mesh_islands_calc(struct BMEditMesh *em, +void transform_convert_mesh_islands_calc(BMEditMesh *em, const bool calc_single_islands, const bool calc_island_center, const bool calc_island_axismtx, @@ -991,7 +991,7 @@ static bool bmesh_test_loose_edge(BMEdge *edge) return true; } -void transform_convert_mesh_connectivity_distance(struct BMesh *bm, +void transform_convert_mesh_connectivity_distance(BMesh *bm, const float mtx[3][3], float *dists, int *index) @@ -1170,7 +1170,7 @@ static bool is_in_quadrant_v3(const float co[3], const int quadrant[3], const fl return true; } -void transform_convert_mesh_mirrordata_calc(struct BMEditMesh *em, +void transform_convert_mesh_mirrordata_calc(BMEditMesh *em, const bool use_select, const bool use_topology, const bool mirror_axis[3], @@ -1302,8 +1302,8 @@ void transform_convert_mesh_mirrordata_free(struct TransMirrorData *mirror_data) * \{ */ void transform_convert_mesh_crazyspace_detect(TransInfo *t, - struct TransDataContainer *tc, - struct BMEditMesh *em, + TransDataContainer *tc, + BMEditMesh *em, struct TransMeshDataCrazySpace *r_crazyspace_data) { float(*quats)[4] = NULL; @@ -1357,7 +1357,7 @@ void transform_convert_mesh_crazyspace_transdata_set(const float mtx[3][3], const float smtx[3][3], const float defmat[3][3], const float quat[4], - struct TransData *r_td) + TransData *r_td) { /* CrazySpace */ if (quat || defmat) { diff --git a/source/blender/editors/transform/transform_convert_nla.c b/source/blender/editors/transform/transform_convert_nla.c index 188eb04b2d0..caafc8f852d 100644 --- a/source/blender/editors/transform/transform_convert_nla.c +++ b/source/blender/editors/transform/transform_convert_nla.c @@ -40,12 +40,12 @@ typedef struct TransDataNla { ID *id; /** Original NLA-Track that the strip belongs to. */ - struct NlaTrack *oldTrack; + NlaTrack *oldTrack; /** Current NLA-Track that the strip belongs to. */ - struct NlaTrack *nlt; + NlaTrack *nlt; /** NLA-strip this data represents. */ - struct NlaStrip *strip; + NlaStrip *strip; /* dummy values for transform to write in - must have 3 elements... */ /** start handle. */ diff --git a/source/blender/editors/transform/transform_convert_object.c b/source/blender/editors/transform/transform_convert_object.c index 01a9f684a4a..90f8d0fce56 100644 --- a/source/blender/editors/transform/transform_convert_object.c +++ b/source/blender/editors/transform/transform_convert_object.c @@ -92,7 +92,7 @@ static void trans_obdata_in_obmode_update_all(TransInfo *t) return; } - struct Main *bmain = CTX_data_main(t->context); + Main *bmain = CTX_data_main(t->context); ED_object_data_xform_container_update_all(tdo->xds, bmain, t->depsgraph); } @@ -115,7 +115,7 @@ static void trans_obchild_in_obmode_update_all(TransInfo *t) return; } - struct Main *bmain = CTX_data_main(t->context); + Main *bmain = CTX_data_main(t->context); ED_object_xform_skip_child_container_update_all(tdo->xcs, bmain, t->depsgraph); } @@ -422,7 +422,7 @@ static int count_proportional_objects(TransInfo *t) int total = 0; ViewLayer *view_layer = t->view_layer; View3D *v3d = t->view; - struct Main *bmain = CTX_data_main(t->context); + Main *bmain = CTX_data_main(t->context); Scene *scene = t->scene; Depsgraph *depsgraph = BKE_scene_ensure_depsgraph(bmain, scene, view_layer); /* Clear all flags we need. It will be used to detect dependencies. */ diff --git a/source/blender/editors/transform/transform_convert_paintcurve.c b/source/blender/editors/transform/transform_convert_paintcurve.c index 5d4cca3856f..8984f179aaf 100644 --- a/source/blender/editors/transform/transform_convert_paintcurve.c +++ b/source/blender/editors/transform/transform_convert_paintcurve.c @@ -19,7 +19,7 @@ #include "transform_convert.h" typedef struct TransDataPaintCurve { - struct PaintCurvePoint *pcp; /* initial curve point */ + PaintCurvePoint *pcp; /* initial curve point */ char id; } TransDataPaintCurve; diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index 82422f9b032..47cbb8ad17d 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -45,7 +45,7 @@ /** Used for sequencer transform. */ typedef struct TransDataSeq { - struct Sequence *seq; + Sequence *seq; /** A copy of #Sequence.flag that may be modified for nested strips. */ int flag; /** Use this so we can have transform data at the strips start, diff --git a/source/blender/editors/transform/transform_convert_sequencer_image.c b/source/blender/editors/transform/transform_convert_sequencer_image.c index 38d4c31cc5c..44802a19ab3 100644 --- a/source/blender/editors/transform/transform_convert_sequencer_image.c +++ b/source/blender/editors/transform/transform_convert_sequencer_image.c @@ -36,7 +36,7 @@ /** Used for sequencer transform. */ typedef struct TransDataSeq { - struct Sequence *seq; + Sequence *seq; float orig_origin_position[2]; float orig_translation[2]; float orig_scale[2]; diff --git a/source/blender/editors/transform/transform_gizmo_2d.c b/source/blender/editors/transform/transform_gizmo_2d.c index 82e95012e49..75e31637fbc 100644 --- a/source/blender/editors/transform/transform_gizmo_2d.c +++ b/source/blender/editors/transform/transform_gizmo_2d.c @@ -101,7 +101,7 @@ static bool gizmo2d_generic_poll(const bContext *C, wmGizmoGroupType *gzgt) return true; } -static void gizmo2d_pivot_point_message_subscribe(struct wmGizmoGroup *gzgroup, +static void gizmo2d_pivot_point_message_subscribe(wmGizmoGroup *gzgroup, struct wmMsgBus *mbus, /* Additional args. */ bScreen *screen, @@ -751,8 +751,8 @@ static void gizmo2d_xform_setup_no_cage(const bContext *C, wmGizmoGroup *gzgroup ggd->no_cage = true; } -static void gizmo2d_xform_no_cage_message_subscribe(const struct bContext *C, - struct wmGizmoGroup *gzgroup, +static void gizmo2d_xform_no_cage_message_subscribe(const bContext *C, + wmGizmoGroup *gzgroup, struct wmMsgBus *mbus) { bScreen *screen = CTX_wm_screen(C); @@ -911,8 +911,8 @@ static void gizmo2d_resize_invoke_prepare(const bContext *C, RNA_enum_set(&gzop->ptr, "orient_type", orient_type); } -static void gizmo2d_resize_message_subscribe(const struct bContext *C, - struct wmGizmoGroup *gzgroup, +static void gizmo2d_resize_message_subscribe(const bContext *C, + wmGizmoGroup *gzgroup, struct wmMsgBus *mbus) { bScreen *screen = CTX_wm_screen(C); @@ -1022,8 +1022,8 @@ static void gizmo2d_rotate_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgrou } } -static void gizmo2d_rotate_message_subscribe(const struct bContext *C, - struct wmGizmoGroup *gzgroup, +static void gizmo2d_rotate_message_subscribe(const bContext *C, + wmGizmoGroup *gzgroup, struct wmMsgBus *mbus) { bScreen *screen = CTX_wm_screen(C); diff --git a/source/blender/editors/transform/transform_gizmo_3d.cc b/source/blender/editors/transform/transform_gizmo_3d.cc index 4cac2092b71..67be0ac4e26 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.cc +++ b/source/blender/editors/transform/transform_gizmo_3d.cc @@ -1112,9 +1112,7 @@ static bool gizmo_3d_calc_pos(const bContext *C, return false; } -void gizmo_prepare_mat(const struct bContext *C, - struct RegionView3D *rv3d, - const struct TransformBounds *tbounds) +void gizmo_prepare_mat(const bContext *C, RegionView3D *rv3d, const TransformBounds *tbounds) { Scene *scene = CTX_data_scene(C); gizmo_3d_calc_pos(C, scene, tbounds, scene->toolsettings->transform_pivot_point, rv3d->twmat[3]); @@ -2305,7 +2303,7 @@ void VIEW3D_GGT_xform_gizmo_context(wmGizmoGroupType *gzgt) static wmGizmoGroup *gizmogroup_xform_find(TransInfo *t) { - struct wmGizmoMap *gizmo_map = t->region->gizmo_map; + wmGizmoMap *gizmo_map = t->region->gizmo_map; if (gizmo_map == nullptr) { BLI_assert_msg(false, "#T_NO_GIZMO should already be set to return early before."); return nullptr; @@ -2462,9 +2460,7 @@ void transform_gizmo_3d_model_from_constraint_and_mode_restore(TransInfo *t) MAN_ITER_AXES_END; } -bool ED_transform_calc_pivot_pos(const struct bContext *C, - const short pivot_type, - float r_pivot_pos[3]) +bool ED_transform_calc_pivot_pos(const bContext *C, const short pivot_type, float r_pivot_pos[3]) { Scene *scene = CTX_data_scene(C); return gizmo_3d_calc_pos(C, scene, nullptr, pivot_type, r_pivot_pos); diff --git a/source/blender/editors/transform/transform_gizmo_extrude_3d.c b/source/blender/editors/transform/transform_gizmo_extrude_3d.c index 2c3cb00e0ca..f32dd958f0b 100644 --- a/source/blender/editors/transform/transform_gizmo_extrude_3d.c +++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.c @@ -85,7 +85,7 @@ typedef struct GizmoExtrudeGroup { PropertyRNA *gzgt_axis_type_prop; } GizmoExtrudeGroup; -static void gizmo_mesh_extrude_orientation_matrix_set(struct GizmoExtrudeGroup *ggd, +static void gizmo_mesh_extrude_orientation_matrix_set(GizmoExtrudeGroup *ggd, const float mat[3][3]) { for (int i = 0; i < 3; i++) { @@ -96,7 +96,7 @@ static void gizmo_mesh_extrude_orientation_matrix_set(struct GizmoExtrudeGroup * } } -static void gizmo_mesh_extrude_orientation_matrix_set_for_adjust(struct GizmoExtrudeGroup *ggd, +static void gizmo_mesh_extrude_orientation_matrix_set_for_adjust(GizmoExtrudeGroup *ggd, const float mat[3][3]) { /* Set orientation without location. */ @@ -109,7 +109,7 @@ static void gizmo_mesh_extrude_orientation_matrix_set_for_adjust(struct GizmoExt static void gizmo_mesh_extrude_setup(const bContext *C, wmGizmoGroup *gzgroup) { - struct GizmoExtrudeGroup *ggd = MEM_callocN(sizeof(GizmoExtrudeGroup), __func__); + GizmoExtrudeGroup *ggd = MEM_callocN(sizeof(GizmoExtrudeGroup), __func__); gzgroup->customdata = ggd; const wmGizmoType *gzt_arrow = WM_gizmotype_find("GIZMO_GT_arrow_3d", true); @@ -502,7 +502,7 @@ static void gizmo_mesh_extrude_message_subscribe(const bContext *C, } } -void VIEW3D_GGT_xform_extrude(struct wmGizmoGroupType *gzgt) +void VIEW3D_GGT_xform_extrude(wmGizmoGroupType *gzgt) { gzgt->name = "3D View Extrude"; gzgt->idname = "VIEW3D_GGT_xform_extrude"; diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 15455e4cccd..81e4adfd316 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -404,7 +404,7 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode) } } -void setInputPostFct(MouseInput *mi, void (*post)(struct TransInfo *t, float values[3])) +void setInputPostFct(MouseInput *mi, void (*post)(TransInfo *t, float values[3])) { mi->post = post; } diff --git a/source/blender/editors/transform/transform_mode_bend.c b/source/blender/editors/transform/transform_mode_bend.c index f1d37e8f4bd..ef6404f808e 100644 --- a/source/blender/editors/transform/transform_mode_bend.c +++ b/source/blender/editors/transform/transform_mode_bend.c @@ -324,7 +324,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2])) ED_area_status_text(t->area, str); } -static void initBend(TransInfo *t, struct wmOperator *UNUSED(op)) +static void initBend(TransInfo *t, wmOperator *UNUSED(op)) { const float mval_fl[2] = {UNPACK2(t->mval)}; const float *curs; diff --git a/source/blender/editors/transform/transform_mode_edge_seq_slide.c b/source/blender/editors/transform/transform_mode_edge_seq_slide.c index 0a46bafa156..7964af2aba4 100644 --- a/source/blender/editors/transform/transform_mode_edge_seq_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_seq_slide.c @@ -108,7 +108,7 @@ static void applySeqSlide(TransInfo *t, const int UNUSED(mval[2])) ED_area_status_text(t->area, str); } -static void initSeqSlide(TransInfo *t, struct wmOperator *UNUSED(op)) +static void initSeqSlide(TransInfo *t, wmOperator *UNUSED(op)) { initMouseInputMode(t, &t->mouse, INPUT_VECTOR); diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index 3d7a7b1d6ed..e9e79db0254 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -48,14 +48,14 @@ typedef struct TransDataEdgeSlideVert { /** #TransDataGenericSlideVert (header) */ - struct BMVert *v; + BMVert *v; struct LinkNode **cd_loop_groups; float v_co_orig[3]; /* end generic */ float edge_len; - struct BMVert *v_side[2]; + BMVert *v_side[2]; /* add origvert.co to get the original locations */ float dir_side[2][3]; @@ -104,7 +104,7 @@ static EdgeSlideData *edgeSlideFirstGet(TransInfo *t) return tc->custom.mode.data; } -static void calcEdgeSlideCustomPoints(struct TransInfo *t) +static void calcEdgeSlideCustomPoints(TransInfo *t) { EdgeSlideData *sld = edgeSlideFirstGet(t); @@ -1081,7 +1081,7 @@ static void freeEdgeSlideVerts(TransInfo *UNUSED(t), custom_data->data = NULL; } -static eRedrawFlag handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event) +static eRedrawFlag handleEventEdgeSlide(TransInfo *t, const wmEvent *event) { EdgeSlideParams *slp = t->custom.mode.data; diff --git a/source/blender/editors/transform/transform_mode_rotate.c b/source/blender/editors/transform/transform_mode_rotate.c index a918ec37bf4..4e7171b3e25 100644 --- a/source/blender/editors/transform/transform_mode_rotate.c +++ b/source/blender/editors/transform/transform_mode_rotate.c @@ -405,7 +405,7 @@ static void applyRotationMatrix(TransInfo *t, float mat_xform[4][4]) mul_m4_m4m4(mat_xform, mat4, mat_xform); } -static void initRotation(TransInfo *t, struct wmOperator *UNUSED(op)) +static void initRotation(TransInfo *t, wmOperator *UNUSED(op)) { if (t->spacetype == SPACE_ACTION) { BKE_report(t->reports, RPT_ERROR, "Rotation is not supported in the Dope Sheet Editor"); diff --git a/source/blender/editors/transform/transform_mode_shrink_fatten.c b/source/blender/editors/transform/transform_mode_shrink_fatten.c index 27304c84eab..4c56cdfb614 100644 --- a/source/blender/editors/transform/transform_mode_shrink_fatten.c +++ b/source/blender/editors/transform/transform_mode_shrink_fatten.c @@ -76,7 +76,7 @@ static void transdata_elem_shrink_fatten_fn(void *__restrict iter_data_v, /** \name Transform (Shrink-Fatten) * \{ */ -static eRedrawFlag shrinkfatten_handleEvent(struct TransInfo *t, const wmEvent *event) +static eRedrawFlag shrinkfatten_handleEvent(TransInfo *t, const wmEvent *event) { BLI_assert(t->mode == TFM_SHRINKFATTEN); const wmKeyMapItem *kmi = t->custom.mode.data; @@ -170,7 +170,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) ED_area_status_text(t->area, str); } -static void initShrinkFatten(TransInfo *t, struct wmOperator *UNUSED(op)) +static void initShrinkFatten(TransInfo *t, wmOperator *UNUSED(op)) { if ((t->flag & T_EDIT) == 0 || (t->obedit_type != OB_MESH)) { BKE_report(t->reports, RPT_ERROR, "'Shrink/Fatten' meshes is only supported in edit mode"); diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c index 88db72642eb..d8d8f2d718a 100644 --- a/source/blender/editors/transform/transform_mode_translate.c +++ b/source/blender/editors/transform/transform_mode_translate.c @@ -666,7 +666,7 @@ static void applyTranslationMatrix(TransInfo *t, float mat_xform[4][4]) add_v3_v3(mat_xform[3], delta); } -static void initTranslation(TransInfo *t, struct wmOperator *UNUSED(op)) +static void initTranslation(TransInfo *t, wmOperator *UNUSED(op)) { if (t->spacetype == SPACE_ACTION) { /* this space uses time translate */ diff --git a/source/blender/editors/transform/transform_mode_vert_slide.c b/source/blender/editors/transform/transform_mode_vert_slide.c index 854599975e8..0e6cc85125d 100644 --- a/source/blender/editors/transform/transform_mode_vert_slide.c +++ b/source/blender/editors/transform/transform_mode_vert_slide.c @@ -45,7 +45,7 @@ typedef struct TransDataVertSlideVert { /** #TransDataGenericSlideVert (header) */ - struct BMVert *v; + BMVert *v; struct LinkNode **cd_loop_groups; float co_orig_3d[3]; /* end generic */ @@ -99,7 +99,7 @@ static void vert_slide_update_input(TransInfo *t) } } -static void calcVertSlideCustomPoints(struct TransInfo *t) +static void calcVertSlideCustomPoints(TransInfo *t) { vert_slide_update_input(t); @@ -112,7 +112,7 @@ static void calcVertSlideCustomPoints(struct TransInfo *t) /** * Run once when initializing vert slide to find the reference edge */ -static void calcVertSlideMouseActiveVert(struct TransInfo *t, const int mval[2]) +static void calcVertSlideMouseActiveVert(TransInfo *t, const int mval[2]) { /* Active object may have no selected vertices. */ VertSlideData *sld = TRANS_DATA_CONTAINER_FIRST_OK(t)->custom.mode.data; @@ -140,7 +140,7 @@ static void calcVertSlideMouseActiveVert(struct TransInfo *t, const int mval[2]) /** * Run while moving the mouse to slide along the edge matching the mouse direction */ -static void calcVertSlideMouseActiveEdges(struct TransInfo *t, const int mval[2]) +static void calcVertSlideMouseActiveEdges(TransInfo *t, const int mval[2]) { VertSlideData *sld = TRANS_DATA_CONTAINER_FIRST_OK(t)->custom.mode.data; const float imval_fl[2] = {UNPACK2(t->mouse.imval)}; @@ -304,7 +304,7 @@ static void freeVertSlideVerts(TransInfo *UNUSED(t), custom_data->data = NULL; } -static eRedrawFlag handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event) +static eRedrawFlag handleEventVertSlide(TransInfo *t, const wmEvent *event) { VertSlideParams *slp = t->custom.mode.data; diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index cee373ebbf8..5bcf1de3d26 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -71,26 +71,26 @@ static const char OP_EDGE_BWEIGHT[] = "TRANSFORM_OT_edge_bevelweight"; static const char OP_SEQ_SLIDE[] = "TRANSFORM_OT_seq_slide"; static const char OP_NORMAL_ROTATION[] = "TRANSFORM_OT_rotate_normal"; -static void TRANSFORM_OT_translate(struct wmOperatorType *ot); -static void TRANSFORM_OT_rotate(struct wmOperatorType *ot); -static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot); -static void TRANSFORM_OT_resize(struct wmOperatorType *ot); -static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot); -static void TRANSFORM_OT_shear(struct wmOperatorType *ot); -static void TRANSFORM_OT_bend(struct wmOperatorType *ot); -static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot); -static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot); -static void TRANSFORM_OT_tilt(struct wmOperatorType *ot); -static void TRANSFORM_OT_trackball(struct wmOperatorType *ot); -static void TRANSFORM_OT_mirror(struct wmOperatorType *ot); -static void TRANSFORM_OT_bbone_resize(struct wmOperatorType *ot); -static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot); -static void TRANSFORM_OT_vert_slide(struct wmOperatorType *ot); -static void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot); -static void TRANSFORM_OT_vert_crease(struct wmOperatorType *ot); -static void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot); -static void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot); -static void TRANSFORM_OT_rotate_normal(struct wmOperatorType *ot); +static void TRANSFORM_OT_translate(wmOperatorType *ot); +static void TRANSFORM_OT_rotate(wmOperatorType *ot); +static void TRANSFORM_OT_tosphere(wmOperatorType *ot); +static void TRANSFORM_OT_resize(wmOperatorType *ot); +static void TRANSFORM_OT_skin_resize(wmOperatorType *ot); +static void TRANSFORM_OT_shear(wmOperatorType *ot); +static void TRANSFORM_OT_bend(wmOperatorType *ot); +static void TRANSFORM_OT_shrink_fatten(wmOperatorType *ot); +static void TRANSFORM_OT_push_pull(wmOperatorType *ot); +static void TRANSFORM_OT_tilt(wmOperatorType *ot); +static void TRANSFORM_OT_trackball(wmOperatorType *ot); +static void TRANSFORM_OT_mirror(wmOperatorType *ot); +static void TRANSFORM_OT_bbone_resize(wmOperatorType *ot); +static void TRANSFORM_OT_edge_slide(wmOperatorType *ot); +static void TRANSFORM_OT_vert_slide(wmOperatorType *ot); +static void TRANSFORM_OT_edge_crease(wmOperatorType *ot); +static void TRANSFORM_OT_vert_crease(wmOperatorType *ot); +static void TRANSFORM_OT_edge_bevelweight(wmOperatorType *ot); +static void TRANSFORM_OT_seq_slide(wmOperatorType *ot); +static void TRANSFORM_OT_rotate_normal(wmOperatorType *ot); static TransformModeItem transform_modes[] = { {OP_TRANSLATION, TFM_TRANSLATION, TRANSFORM_OT_translate}, @@ -185,7 +185,7 @@ static int select_orientation_invoke(bContext *C, return OPERATOR_INTERFACE; } -static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_select_orientation(wmOperatorType *ot) { PropertyRNA *prop; @@ -235,7 +235,7 @@ static bool delete_orientation_poll(bContext *C) (scene->orientation_slots[SCE_ORIENT_DEFAULT].index_custom != -1)); } -static void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_delete_orientation(wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Orientation"; @@ -283,7 +283,7 @@ static int create_orientation_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_create_orientation(wmOperatorType *ot) { /* identifiers */ ot->name = "Create Orientation"; @@ -618,7 +618,7 @@ static bool transform_poll_property(const bContext *C, wmOperator *op, const Pro return true; } -void Transform_Properties(struct wmOperatorType *ot, int flags) +void Transform_Properties(wmOperatorType *ot, int flags) { PropertyRNA *prop; @@ -812,7 +812,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags) } } -static void TRANSFORM_OT_translate(struct wmOperatorType *ot) +static void TRANSFORM_OT_translate(wmOperatorType *ot) { /* identifiers */ ot->name = "Move"; @@ -839,7 +839,7 @@ static void TRANSFORM_OT_translate(struct wmOperatorType *ot) P_VIEW3D_NAVIGATION | P_POST_TRANSFORM); } -static void TRANSFORM_OT_resize(struct wmOperatorType *ot) +static void TRANSFORM_OT_resize(wmOperatorType *ot) { /* identifiers */ ot->name = "Resize"; @@ -878,7 +878,7 @@ static void TRANSFORM_OT_resize(struct wmOperatorType *ot) P_OPTIONS | P_GPENCIL_EDIT | P_CENTER | P_VIEW3D_NAVIGATION); } -static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot) +static void TRANSFORM_OT_skin_resize(wmOperatorType *ot) { /* identifiers */ ot->name = "Skin Resize"; @@ -904,7 +904,7 @@ static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot) P_OPTIONS | P_NO_TEXSPACE); } -static void TRANSFORM_OT_trackball(struct wmOperatorType *ot) +static void TRANSFORM_OT_trackball(wmOperatorType *ot) { /* identifiers */ ot->name = "Trackball"; @@ -929,7 +929,7 @@ static void TRANSFORM_OT_trackball(struct wmOperatorType *ot) Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT | P_CENTER); } -static void TRANSFORM_OT_rotate(struct wmOperatorType *ot) +static void TRANSFORM_OT_rotate(wmOperatorType *ot) { /* identifiers */ ot->name = "Rotate"; @@ -955,7 +955,7 @@ static void TRANSFORM_OT_rotate(struct wmOperatorType *ot) P_GEO_SNAP | P_GPENCIL_EDIT | P_CENTER | P_VIEW3D_NAVIGATION); } -static void TRANSFORM_OT_tilt(struct wmOperatorType *ot) +static void TRANSFORM_OT_tilt(wmOperatorType *ot) { /* identifiers */ ot->name = "Tilt"; @@ -982,7 +982,7 @@ static void TRANSFORM_OT_tilt(struct wmOperatorType *ot) Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP); } -static void TRANSFORM_OT_bend(struct wmOperatorType *ot) +static void TRANSFORM_OT_bend(wmOperatorType *ot) { /* identifiers */ ot->name = "Bend"; @@ -1017,7 +1017,7 @@ static bool transform_shear_poll(bContext *C) return area && !ELEM(area->spacetype, SPACE_ACTION); } -static void TRANSFORM_OT_shear(struct wmOperatorType *ot) +static void TRANSFORM_OT_shear(wmOperatorType *ot) { /* identifiers */ ot->name = "Shear"; @@ -1042,7 +1042,7 @@ static void TRANSFORM_OT_shear(struct wmOperatorType *ot) P_MIRROR | P_SNAP | P_GPENCIL_EDIT); } -static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot) +static void TRANSFORM_OT_push_pull(wmOperatorType *ot) { /* identifiers */ ot->name = "Push/Pull"; @@ -1065,7 +1065,7 @@ static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot) Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_CENTER); } -static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot) +static void TRANSFORM_OT_shrink_fatten(wmOperatorType *ot) { /* identifiers */ ot->name = "Shrink/Fatten"; @@ -1094,7 +1094,7 @@ static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot) Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP); } -static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot) +static void TRANSFORM_OT_tosphere(wmOperatorType *ot) { /* identifiers */ ot->name = "To Sphere"; @@ -1117,7 +1117,7 @@ static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot) Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT | P_CENTER); } -static void TRANSFORM_OT_mirror(struct wmOperatorType *ot) +static void TRANSFORM_OT_mirror(wmOperatorType *ot) { /* identifiers */ ot->name = "Mirror"; @@ -1136,7 +1136,7 @@ static void TRANSFORM_OT_mirror(struct wmOperatorType *ot) Transform_Properties(ot, P_ORIENT_MATRIX | P_CONSTRAINT | P_GPENCIL_EDIT | P_CENTER); } -static void TRANSFORM_OT_bbone_resize(struct wmOperatorType *ot) +static void TRANSFORM_OT_bbone_resize(wmOperatorType *ot) { /* identifiers */ ot->name = "Scale B-Bone"; @@ -1160,7 +1160,7 @@ static void TRANSFORM_OT_bbone_resize(struct wmOperatorType *ot) Transform_Properties(ot, P_ORIENT_MATRIX | P_CONSTRAINT | P_MIRROR); } -static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot) +static void TRANSFORM_OT_edge_slide(wmOperatorType *ot) { PropertyRNA *prop; @@ -1200,7 +1200,7 @@ static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot) Transform_Properties(ot, P_MIRROR | P_GEO_SNAP | P_CORRECT_UV | P_VIEW3D_NAVIGATION); } -static void TRANSFORM_OT_vert_slide(struct wmOperatorType *ot) +static void TRANSFORM_OT_vert_slide(wmOperatorType *ot) { /* identifiers */ ot->name = "Vertex Slide"; @@ -1235,7 +1235,7 @@ static void TRANSFORM_OT_vert_slide(struct wmOperatorType *ot) Transform_Properties(ot, P_MIRROR | P_GEO_SNAP | P_CORRECT_UV | P_VIEW3D_NAVIGATION); } -static void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot) +static void TRANSFORM_OT_edge_crease(wmOperatorType *ot) { /* identifiers */ ot->name = "Edge Crease"; @@ -1258,7 +1258,7 @@ static void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot) Transform_Properties(ot, P_SNAP); } -static void TRANSFORM_OT_vert_crease(struct wmOperatorType *ot) +static void TRANSFORM_OT_vert_crease(wmOperatorType *ot) { /* identifiers */ ot->name = "Vertex Crease"; @@ -1281,7 +1281,7 @@ static void TRANSFORM_OT_vert_crease(struct wmOperatorType *ot) Transform_Properties(ot, P_SNAP); } -static void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot) +static void TRANSFORM_OT_edge_bevelweight(wmOperatorType *ot) { /* identifiers */ ot->name = "Edge Bevel Weight"; @@ -1303,7 +1303,7 @@ static void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot) Transform_Properties(ot, P_SNAP); } -static void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot) +static void TRANSFORM_OT_seq_slide(wmOperatorType *ot) { /* identifiers */ ot->name = "Sequence Slide"; @@ -1330,7 +1330,7 @@ static void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot) Transform_Properties(ot, P_SNAP | P_VIEW2D_EDGE_PAN); } -static void TRANSFORM_OT_rotate_normal(struct wmOperatorType *ot) +static void TRANSFORM_OT_rotate_normal(wmOperatorType *ot) { /* identifiers */ ot->name = "Rotate Normals"; @@ -1351,7 +1351,7 @@ static void TRANSFORM_OT_rotate_normal(struct wmOperatorType *ot) Transform_Properties(ot, P_ORIENT_AXIS | P_ORIENT_MATRIX | P_CONSTRAINT | P_MIRROR); } -static void TRANSFORM_OT_transform(struct wmOperatorType *ot) +static void TRANSFORM_OT_transform(wmOperatorType *ot) { PropertyRNA *prop; @@ -1424,7 +1424,7 @@ static int transform_from_gizmo_invoke(bContext *C, wmOperator *UNUSED(op), cons } /* Use with 'TRANSFORM_GGT_gizmo'. */ -static void TRANSFORM_OT_from_gizmo(struct wmOperatorType *ot) +static void TRANSFORM_OT_from_gizmo(wmOperatorType *ot) { /* identifiers */ ot->name = "Transform from Gizmo"; diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 918b48b56a2..1e6163609a3 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -888,8 +888,8 @@ static uint bm_mesh_faces_select_get_n(BMesh *bm, BMVert **elems, const uint n) int getTransformOrientation_ex(const Scene *scene, ViewLayer *view_layer, const View3D *v3d, - struct Object *ob, - struct Object *obedit, + Object *ob, + Object *obedit, float normal[3], float plane[3], const short around) diff --git a/source/blender/editors/transform/transform_snap.cc b/source/blender/editors/transform/transform_snap.cc index 930b996b910..2f1602b4373 100644 --- a/source/blender/editors/transform/transform_snap.cc +++ b/source/blender/editors/transform/transform_snap.cc @@ -167,7 +167,7 @@ static bool doForceIncrementSnap(const TransInfo *t) return !transformModeUseSnap(t); } -void drawSnapping(const struct bContext *C, TransInfo *t) +void drawSnapping(const bContext *C, TransInfo *t) { uchar col[4], selectedCol[4], activeCol[4]; if (!transform_snap_is_active(t)) { @@ -1439,13 +1439,13 @@ bool peelObjectsTransform(TransInfo *t, if (!BLI_listbase_is_empty(&depths_peel)) { /* At the moment we only use the hits of the first object */ - struct SnapObjectHitDepth *hit_min = static_cast(depths_peel.first); - for (struct SnapObjectHitDepth *iter = hit_min->next; iter; iter = iter->next) { + SnapObjectHitDepth *hit_min = static_cast(depths_peel.first); + for (SnapObjectHitDepth *iter = hit_min->next; iter; iter = iter->next) { if (iter->depth < hit_min->depth) { hit_min = iter; } } - struct SnapObjectHitDepth *hit_max = nullptr; + SnapObjectHitDepth *hit_max = nullptr; if (use_peel_object) { /* if peeling objects, take the first and last from each object */ diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index 634f3ede8a3..f90da11fb7a 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -1147,7 +1147,7 @@ static void nearest_world_tree_co(BVHTree *tree, } static bool nearest_world_tree(SnapObjectContext * /*sctx*/, - const struct SnapObjectParams *params, + const SnapObjectParams *params, BVHTree *tree, BVHTree_NearestPointCallback nearest_cb, void *treedata, @@ -1220,7 +1220,7 @@ static bool nearest_world_tree(SnapObjectContext * /*sctx*/, } static bool nearest_world_mesh(SnapObjectContext *sctx, - const struct SnapObjectParams *params, + const SnapObjectParams *params, Object *ob_eval, const Mesh *me_eval, const float (*obmat)[4], @@ -1253,7 +1253,7 @@ static bool nearest_world_mesh(SnapObjectContext *sctx, } static bool nearest_world_editmesh(SnapObjectContext *sctx, - const struct SnapObjectParams *params, + const SnapObjectParams *params, Object *ob_eval, BMEditMesh *em, const float (*obmat)[4], @@ -1291,7 +1291,7 @@ static eSnapMode nearest_world_object_fn(SnapObjectContext *sctx, bool use_hide, void *data) { - struct NearestWorldObjUserData *dt = static_cast(data); + NearestWorldObjUserData *dt = static_cast(data); bool retval = false; bool is_edit = false; @@ -1366,7 +1366,7 @@ static eSnapMode nearest_world_object_fn(SnapObjectContext *sctx, * \param prev_co: Current location of source point after transformation but before snapping. */ static bool nearestWorldObjects(SnapObjectContext *sctx, - const struct SnapObjectParams *params, + const SnapObjectParams *params, const float init_co[3], const float curr_co[3]) { diff --git a/source/blender/editors/transform/transform_snap_sequencer.c b/source/blender/editors/transform/transform_snap_sequencer.c index 4e1666c08fa..fc8bbc1f1e8 100644 --- a/source/blender/editors/transform/transform_snap_sequencer.c +++ b/source/blender/editors/transform/transform_snap_sequencer.c @@ -239,7 +239,7 @@ static void seq_snap_target_points_build(Scene *scene, static int seq_snap_threshold_get_frame_distance(const TransInfo *t) { const int snap_distance = SEQ_tool_settings_snap_distance_get(t->scene); - const struct View2D *v2d = &t->region->v2d; + const View2D *v2d = &t->region->v2d; return round_fl_to_int(UI_view2d_region_to_view_x(v2d, snap_distance) - UI_view2d_region_to_view_x(v2d, 0)); } @@ -387,7 +387,7 @@ bool ED_transform_snap_sequencer_to_closest_strip_calc(Scene *scene, return validSnap(&t); } -void ED_draw_sequencer_snap_point(struct bContext *C, float snap_point) +void ED_draw_sequencer_snap_point(bContext *C, float snap_point) { /* Reuse the snapping drawing code from the transform system. */ TransInfo t; diff --git a/source/blender/editors/undo/ed_undo.cc b/source/blender/editors/undo/ed_undo.cc index 33729f260ff..24d245b688b 100644 --- a/source/blender/editors/undo/ed_undo.cc +++ b/source/blender/editors/undo/ed_undo.cc @@ -445,7 +445,7 @@ bool ED_undo_is_memfile_compatible(const bContext *C) return true; } -bool ED_undo_is_legacy_compatible_for_property(struct bContext *C, ID *id) +bool ED_undo_is_legacy_compatible_for_property(bContext *C, ID *id) { const Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); @@ -668,7 +668,7 @@ int ED_undo_operator_repeat(bContext *C, wmOperator *op) if (op) { CLOG_INFO(&LOG, 1, "idname='%s'", op->type->idname); wmWindowManager *wm = CTX_wm_manager(C); - struct Scene *scene = CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); /* keep in sync with logic in view3d_panel_operator_redo() */ ARegion *region_orig = CTX_wm_region(C); @@ -818,7 +818,7 @@ void ED_undo_object_set_active_or_warn( } } -void ED_undo_object_editmode_restore_helper(struct bContext *C, +void ED_undo_object_editmode_restore_helper(bContext *C, Object **object_array, uint object_array_len, uint object_array_stride) diff --git a/source/blender/editors/undo/memfile_undo.cc b/source/blender/editors/undo/memfile_undo.cc index 9450b755789..3177f0078ed 100644 --- a/source/blender/editors/undo/memfile_undo.cc +++ b/source/blender/editors/undo/memfile_undo.cc @@ -72,9 +72,7 @@ static bool memfile_undosys_poll(bContext *C) return true; } -static bool memfile_undosys_step_encode(struct bContext * /*C*/, - struct Main *bmain, - UndoStep *us_p) +static bool memfile_undosys_step_encode(bContext * /*C*/, Main *bmain, UndoStep *us_p) { MemFileUndoStep *us = (MemFileUndoStep *)us_p; @@ -159,11 +157,8 @@ static void memfile_undosys_unfinished_id_previews_restart(ID *id) } } -static void memfile_undosys_step_decode(struct bContext *C, - struct Main *bmain, - UndoStep *us_p, - const eUndoStepDir undo_direction, - bool /*is_final*/) +static void memfile_undosys_step_decode( + bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir undo_direction, bool /*is_final*/) { BLI_assert(undo_direction != STEP_INVALID); @@ -355,13 +350,13 @@ void ED_memfile_undosys_type(UndoType *ut) * Ideally we wouldn't need to export global undo internals, * there are some cases where it's needed though. */ -static struct MemFile *ed_undosys_step_get_memfile(UndoStep *us_p) +static MemFile *ed_undosys_step_get_memfile(UndoStep *us_p) { MemFileUndoStep *us = (MemFileUndoStep *)us_p; return &us->data->memfile; } -struct MemFile *ED_undosys_stack_memfile_get_active(UndoStack *ustack) +MemFile *ED_undosys_stack_memfile_get_active(UndoStack *ustack) { UndoStep *us = BKE_undosys_stack_active_with_type(ustack, BKE_UNDOSYS_TYPE_MEMFILE); if (us) { diff --git a/source/blender/editors/util/ed_draw.c b/source/blender/editors/util/ed_draw.c index 66b2a4ce107..985cc4d310d 100644 --- a/source/blender/editors/util/ed_draw.c +++ b/source/blender/editors/util/ed_draw.c @@ -58,11 +58,11 @@ #define OVERSHOOT_RANGE_DELTA 0.2f typedef struct tSlider { - struct Scene *scene; - struct ScrArea *area; + Scene *scene; + ScrArea *area; /** Header of the region used for drawing the slider. */ - struct ARegion *region_header; + ARegion *region_header; /** Draw callback handler. */ void *draw_handle; @@ -244,7 +244,7 @@ static void draw_backdrop(const int fontid, /** * Draw an on screen Slider for a Pose Slide Operator. */ -static void slider_draw(const struct bContext *UNUSED(C), ARegion *region, void *arg) +static void slider_draw(const bContext *UNUSED(C), ARegion *region, void *arg) { tSlider *slider = arg; @@ -381,7 +381,7 @@ static void slider_update_factor(tSlider *slider, const wmEvent *event) } } -tSlider *ED_slider_create(struct bContext *C) +tSlider *ED_slider_create(bContext *C) { tSlider *slider = MEM_callocN(sizeof(tSlider), "tSlider"); slider->scene = CTX_data_scene(C); @@ -417,7 +417,7 @@ tSlider *ED_slider_create(struct bContext *C) return slider; } -void ED_slider_init(struct tSlider *slider, const wmEvent *event) +void ED_slider_init(tSlider *slider, const wmEvent *event) { copy_v2fl_v2i(slider->last_cursor, event->xy); } @@ -455,7 +455,7 @@ bool ED_slider_modal(tSlider *slider, const wmEvent *event) return event_handled; } -void ED_slider_status_string_get(const struct tSlider *slider, +void ED_slider_status_string_get(const tSlider *slider, char *status_string, const size_t size_of_status_string) { @@ -503,7 +503,7 @@ void ED_slider_status_string_get(const struct tSlider *slider, increments_str); } -void ED_slider_destroy(struct bContext *C, tSlider *slider) +void ED_slider_destroy(bContext *C, tSlider *slider) { /* Remove draw callback. */ if (slider->draw_handle) { @@ -516,12 +516,12 @@ void ED_slider_destroy(struct bContext *C, tSlider *slider) /* Setters & Getters */ -float ED_slider_factor_get(struct tSlider *slider) +float ED_slider_factor_get(tSlider *slider) { return slider->factor; } -void ED_slider_factor_set(struct tSlider *slider, const float factor) +void ED_slider_factor_set(tSlider *slider, const float factor) { slider->raw_factor = factor; slider->factor = factor; @@ -530,23 +530,23 @@ void ED_slider_factor_set(struct tSlider *slider, const float factor) } } -void ED_slider_allow_overshoot_set(struct tSlider *slider, const bool lower, const bool upper) +void ED_slider_allow_overshoot_set(tSlider *slider, const bool lower, const bool upper) { slider->allow_overshoot_lower = lower; slider->allow_overshoot_upper = upper; } -bool ED_slider_allow_increments_get(struct tSlider *slider) +bool ED_slider_allow_increments_get(tSlider *slider) { return slider->allow_increments; } -void ED_slider_allow_increments_set(struct tSlider *slider, const bool value) +void ED_slider_allow_increments_set(tSlider *slider, const bool value) { slider->allow_increments = value; } -void ED_slider_factor_bounds_set(struct tSlider *slider, +void ED_slider_factor_bounds_set(tSlider *slider, float factor_bound_lower, float factor_bound_upper) { diff --git a/source/blender/geometry/intern/uv_parametrizer.cc b/source/blender/geometry/intern/uv_parametrizer.cc index 134760e6624..36527a1eb10 100644 --- a/source/blender/geometry/intern/uv_parametrizer.cc +++ b/source/blender/geometry/intern/uv_parametrizer.cc @@ -38,7 +38,7 @@ namespace blender::geometry { using PHashKey = uintptr_t; struct PHashLink { - struct PHashLink *next; + PHashLink *next; PHashKey key; }; @@ -51,7 +51,7 @@ struct PHash { /* Simplices */ struct PVert { - struct PVert *nextlink; + PVert *nextlink; union PVertUnion { PHashKey key; /* Construct. */ @@ -66,25 +66,25 @@ struct PVert { }; struct PEdge { - struct PEdge *nextlink; + PEdge *nextlink; union PEdgeUnion { - PHashKey key; /* Construct. */ - int id; /* ABF matrix index. */ - HeapNode *heaplink; /* Fill holes. */ - struct PEdge *nextcollapse; /* Simplification. */ + PHashKey key; /* Construct. */ + int id; /* ABF matrix index. */ + HeapNode *heaplink; /* Fill holes. */ + PEdge *nextcollapse; /* Simplification. */ } u; - struct PVert *vert; - struct PEdge *pair; - struct PEdge *next; + PVert *vert; + PEdge *pair; + PEdge *next; struct PFace *face; float *orig_uv, old_uv[2]; uint flag; }; struct PFace { - struct PFace *nextlink; + PFace *nextlink; union PFaceUnion { PHashKey key; /* Construct. */ @@ -93,7 +93,7 @@ struct PFace { int id; /* ABF matrix index. */ } u; - struct PEdge *edge; + PEdge *edge; uint flag; }; @@ -3705,7 +3705,7 @@ void uv_parametrizer_delete(ParamHandle *phandle) } struct GeoUVPinIndex { - struct GeoUVPinIndex *next; + GeoUVPinIndex *next; float uv[2]; ParamKey reindex; }; diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_dash.c b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_dash.c index eea25e39daa..5cab4b6031f 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_dash.c +++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_dash.c @@ -278,13 +278,13 @@ static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk, walk(userData, ob, (ID **)&mmd->material, IDWALK_CB_USER); } -static void segment_list_item(struct uiList *UNUSED(ui_list), - const struct bContext *UNUSED(C), - struct uiLayout *layout, - struct PointerRNA *UNUSED(idataptr), - struct PointerRNA *itemptr, +static void segment_list_item(uiList *UNUSED(ui_list), + const bContext *UNUSED(C), + uiLayout *layout, + PointerRNA *UNUSED(idataptr), + PointerRNA *itemptr, int UNUSED(icon), - struct PointerRNA *UNUSED(active_dataptr), + PointerRNA *UNUSED(active_dataptr), const char *UNUSED(active_propname), int UNUSED(index), int UNUSED(flt_flag)) diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_hook.c b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_hook.c index 9fe8ddc0563..63f0e9c641d 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_hook.c +++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_hook.c @@ -53,7 +53,7 @@ /* temp struct to hold data */ struct GPHookData_cb { - struct CurveMapping *curfalloff; + CurveMapping *curfalloff; char falloff_type; float falloff; diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_time.c b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_time.c index 1df6cab68e7..f10cf15e475 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_time.c +++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_time.c @@ -80,11 +80,11 @@ static void freeData(GpencilModifierData *md) MEM_SAFE_FREE(gpmd->segments); } -static int remapTime(struct GpencilModifierData *md, - struct Depsgraph *UNUSED(depsgraph), - struct Scene *scene, - struct Object *UNUSED(ob), - struct bGPDlayer *gpl, +static int remapTime(GpencilModifierData *md, + Depsgraph *UNUSED(depsgraph), + Scene *scene, + Object *UNUSED(ob), + bGPDlayer *gpl, int cfra) { TimeGpencilModifierData *mmd = (TimeGpencilModifierData *)md; @@ -267,13 +267,13 @@ static int remapTime(struct GpencilModifierData *md, return nfra; } -static void segment_list_item(struct uiList *UNUSED(ui_list), - const struct bContext *UNUSED(C), - struct uiLayout *layout, - struct PointerRNA *UNUSED(idataptr), - struct PointerRNA *itemptr, +static void segment_list_item(uiList *UNUSED(ui_list), + const bContext *UNUSED(C), + uiLayout *layout, + PointerRNA *UNUSED(idataptr), + PointerRNA *itemptr, int UNUSED(icon), - struct PointerRNA *UNUSED(active_dataptr), + PointerRNA *UNUSED(active_dataptr), const char *UNUSED(active_propname), int UNUSED(index), int UNUSED(flt_flag)) diff --git a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_ops.c b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_ops.c index 389dec7f5f9..7d17860603a 100644 --- a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_ops.c +++ b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_ops.c @@ -244,7 +244,7 @@ static void lineart_gpencil_bake_startjob(void *customdata, for (LinkNode *l = bj->objects; l; l = l->next) { Object *ob = l->link; if (lineart_gpencil_bake_single_target(bj, ob, frame)) { - DEG_id_tag_update((struct ID *)ob->data, ID_RECALC_GEOMETRY); + DEG_id_tag_update((ID *)ob->data, ID_RECALC_GEOMETRY); WM_event_add_notifier(bj->C, NC_GPENCIL | ND_DATA | NA_EDITED, ob); } } @@ -406,7 +406,7 @@ static void lineart_gpencil_clear_strokes_exec_common(Object *ob) lmd->flags &= (~LRT_GPENCIL_IS_BAKED); } - DEG_id_tag_update((struct ID *)ob->data, ID_RECALC_GEOMETRY); + DEG_id_tag_update((ID *)ob->data, ID_RECALC_GEOMETRY); } static int lineart_gpencil_clear_strokes_exec(bContext *C, wmOperator *UNUSED(op)) diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc index 335d8d7e96f..c964bf580ef 100644 --- a/source/blender/gpu/intern/gpu_codegen.cc +++ b/source/blender/gpu/intern/gpu_codegen.cc @@ -87,7 +87,7 @@ struct GPUCodegenCreateInfo : ShaderCreateInfo { }; struct GPUPass { - struct GPUPass *next; + GPUPass *next; GPUShader *shader; GPUCodegenCreateInfo *create_info = nullptr; diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 617221e2ed1..606b454fb13 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -587,9 +587,9 @@ bool GPU_material_sss_profile_create(GPUMaterial *material, float radii[3]) return true; } -struct GPUUniformBuf *GPU_material_sss_profile_get(GPUMaterial *material, - int sample_len, - GPUTexture **tex_profile) +GPUUniformBuf *GPU_material_sss_profile_get(GPUMaterial *material, + int sample_len, + GPUTexture **tex_profile) { if (!material->sss_enabled) { return NULL; @@ -630,7 +630,7 @@ struct GPUUniformBuf *GPU_material_sss_profile_get(GPUMaterial *material, return material->sss_profile; } -struct GPUUniformBuf *GPU_material_create_sss_profile_ubo(void) +GPUUniformBuf *GPU_material_create_sss_profile_ubo(void) { return GPU_uniformbuf_create(sizeof(GPUSssKernelData)); } diff --git a/source/blender/gpu/intern/gpu_node_graph.cc b/source/blender/gpu/intern/gpu_node_graph.cc index 532d34528e7..397487b57aa 100644 --- a/source/blender/gpu/intern/gpu_node_graph.cc +++ b/source/blender/gpu/intern/gpu_node_graph.cc @@ -303,7 +303,7 @@ static bool uniform_attr_list_cmp(const void *a, const void *b) return attr_a || attr_b; } -struct GHash *GPU_uniform_attr_list_hash_new(const char *info) +GHash *GPU_uniform_attr_list_hash_new(const char *info) { return BLI_ghash_new(uniform_attr_list_hash, uniform_attr_list_cmp, info); } @@ -476,8 +476,8 @@ static GPULayerAttr *gpu_node_graph_add_layer_attribute(GPUNodeGraph *graph, con static GPUMaterialTexture *gpu_node_graph_add_texture(GPUNodeGraph *graph, Image *ima, ImageUser *iuser, - struct GPUTexture **colorband, - struct GPUTexture **sky, + GPUTexture **colorband, + GPUTexture **sky, bool is_tiled, GPUSamplerState sampler_state) { @@ -644,7 +644,7 @@ GPUNodeLink *GPU_image_sky(GPUMaterial *mat, float *layer, GPUSamplerState sampler_state) { - struct GPUTexture **sky = gpu_material_sky_texture_layer_set(mat, width, height, pixels, layer); + GPUTexture **sky = gpu_material_sky_texture_layer_set(mat, width, height, pixels, layer); GPUNodeGraph *graph = gpu_material_node_graph(mat); GPUNodeLink *link = gpu_node_link_create(); @@ -655,8 +655,8 @@ GPUNodeLink *GPU_image_sky(GPUMaterial *mat, } void GPU_image_tiled(GPUMaterial *mat, - struct Image *ima, - struct ImageUser *iuser, + Image *ima, + ImageUser *iuser, GPUSamplerState sampler_state, GPUNodeLink **r_image_tiled_link, GPUNodeLink **r_image_tiled_mapping_link) @@ -676,7 +676,7 @@ void GPU_image_tiled(GPUMaterial *mat, GPUNodeLink *GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *row) { - struct GPUTexture **colorband = gpu_material_ramp_texture_row_set(mat, size, pixels, row); + GPUTexture **colorband = gpu_material_ramp_texture_row_set(mat, size, pixels, row); MEM_freeN(pixels); GPUNodeGraph *graph = gpu_material_node_graph(mat); diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc index ca7302d9fd5..2da3a8bc2ff 100644 --- a/source/blender/gpu/intern/gpu_shader_dependency.cc +++ b/source/blender/gpu/intern/gpu_shader_dependency.cc @@ -39,7 +39,7 @@ extern "C" { namespace blender::gpu { using GPUSourceDictionnary = Map; -using GPUFunctionDictionnary = Map; +using GPUFunctionDictionnary = Map; struct GPUSource { StringRefNull fullpath; diff --git a/source/blender/gpu/intern/gpu_vertex_buffer.cc b/source/blender/gpu/intern/gpu_vertex_buffer.cc index 15c3c8790d5..6f38c47ff55 100644 --- a/source/blender/gpu/intern/gpu_vertex_buffer.cc +++ b/source/blender/gpu/intern/gpu_vertex_buffer.cc @@ -336,12 +336,12 @@ void GPU_vertbuf_wrap_handle(GPUVertBuf *verts, uint64_t handle) unwrap(verts)->wrap_handle(handle); } -void GPU_vertbuf_bind_as_ssbo(struct GPUVertBuf *verts, int binding) +void GPU_vertbuf_bind_as_ssbo(GPUVertBuf *verts, int binding) { unwrap(verts)->bind_as_ssbo(binding); } -void GPU_vertbuf_bind_as_texture(struct GPUVertBuf *verts, int binding) +void GPU_vertbuf_bind_as_texture(GPUVertBuf *verts, int binding) { unwrap(verts)->bind_as_texture(binding); } diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc index 7f5df49c972..9c232c9fa8d 100644 --- a/source/blender/gpu/intern/gpu_vertex_format.cc +++ b/source/blender/gpu/intern/gpu_vertex_format.cc @@ -430,7 +430,7 @@ static void recommended_fetch_mode_and_comp_type(Type gpu_type, } } -void GPU_vertformat_from_shader(GPUVertFormat *format, const struct GPUShader *gpushader) +void GPU_vertformat_from_shader(GPUVertFormat *format, const GPUShader *gpushader) { GPU_vertformat_clear(format); diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index f451ab012c6..143af598cc4 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -205,9 +205,7 @@ void GPU_viewport_bind(GPUViewport *viewport, int view, const rcti *rect) viewport->active_view = view; } -void GPU_viewport_bind_from_offscreen(GPUViewport *viewport, - struct GPUOffScreen *ofs, - bool is_xr_surface) +void GPU_viewport_bind_from_offscreen(GPUViewport *viewport, GPUOffScreen *ofs, bool is_xr_surface) { GPUTexture *color, *depth; GPUFrameBuffer *fb; @@ -527,7 +525,7 @@ void GPU_viewport_draw_to_screen(GPUViewport *viewport, int view, const rcti *re } void GPU_viewport_unbind_from_offscreen(GPUViewport *viewport, - struct GPUOffScreen *ofs, + GPUOffScreen *ofs, bool display_colorspace, bool do_overlay_merge) { diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index 031a31425a5..b8ea03590ff 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -527,7 +527,7 @@ void GLTexture::mip_range_set(int min, int max) } } -struct GPUFrameBuffer *GLTexture::framebuffer_get() +GPUFrameBuffer *GLTexture::framebuffer_get() { if (framebuffer_) { return framebuffer_; diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c index d8b6bce9007..307ac8a94a8 100644 --- a/source/blender/ikplugin/intern/ikplugin_api.c +++ b/source/blender/ikplugin/intern/ikplugin_api.c @@ -73,7 +73,7 @@ void BIK_init_tree(struct Depsgraph *depsgraph, Scene *scene, Object *ob, float } void BIK_execute_tree( - struct Depsgraph *depsgraph, struct Scene *scene, Object *ob, bPoseChannel *pchan, float ctime) + struct Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan, float ctime) { IKPlugin *plugin = get_plugin(ob->pose); @@ -82,7 +82,7 @@ void BIK_execute_tree( } } -void BIK_release_tree(struct Scene *scene, Object *ob, float ctime) +void BIK_release_tree(Scene *scene, Object *ob, float ctime) { IKPlugin *plugin = get_plugin(ob->pose); @@ -91,7 +91,7 @@ void BIK_release_tree(struct Scene *scene, Object *ob, float ctime) } } -void BIK_clear_data(struct bPose *pose) +void BIK_clear_data(bPose *pose) { IKPlugin *plugin = get_plugin(pose); @@ -100,7 +100,7 @@ void BIK_clear_data(struct bPose *pose) } } -void BIK_clear_cache(struct bPose *pose) +void BIK_clear_cache(bPose *pose) { IKPlugin *plugin = get_plugin(pose); @@ -109,7 +109,7 @@ void BIK_clear_cache(struct bPose *pose) } } -void BIK_update_param(struct bPose *pose) +void BIK_update_param(bPose *pose) { IKPlugin *plugin = get_plugin(pose); @@ -118,7 +118,7 @@ void BIK_update_param(struct bPose *pose) } } -void BIK_test_constraint(struct Object *ob, struct bConstraint *cons) +void BIK_test_constraint(Object *ob, struct bConstraint *cons) { IKPlugin *plugin = get_plugin(ob->pose); diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c index 0a1e55af151..b15b14edc74 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.c +++ b/source/blender/ikplugin/intern/iksolver_plugin.c @@ -33,7 +33,7 @@ /* allocates PoseTree, and links that to root bone/channel */ /* NOTE: detecting the IK chain is duplicate code... * in drawarmature.c and in transform_conversions.c */ -static void initialize_posetree(struct Object *UNUSED(ob), bPoseChannel *pchan_tip) +static void initialize_posetree(Object *UNUSED(ob), bPoseChannel *pchan_tip) { bPoseChannel *curchan, *pchan_root = NULL, *chanlist[256], **oldchan; PoseTree *tree; @@ -574,7 +574,7 @@ static void free_posetree(PoseTree *tree) void iksolver_initialize_tree(struct Depsgraph *UNUSED(depsgraph), struct Scene *UNUSED(scene), - struct Object *ob, + Object *ob, float UNUSED(ctime)) { bPoseChannel *pchan; @@ -632,7 +632,7 @@ void iksolver_execute_tree(struct Depsgraph *depsgraph, } } -void iksolver_release_tree(struct Scene *UNUSED(scene), struct Object *ob, float UNUSED(ctime)) +void iksolver_release_tree(struct Scene *UNUSED(scene), Object *ob, float UNUSED(ctime)) { iksolver_clear_data(ob->pose); } diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index 5ba314ee9dd..c9fc1faf31f 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -65,12 +65,12 @@ using ErrorCallback = void (*)(const iTaSC::ConstraintValues *values, /* one structure for each target in the scene */ struct IK_Target { - struct Depsgraph *bldepsgraph; - struct Scene *blscene; + Depsgraph *bldepsgraph; + Scene *blscene; iTaSC::MovingFrame *target; iTaSC::ConstraintSet *constraint; - struct bConstraint *blenderConstraint; - struct bPoseChannel *rootChannel; + bConstraint *blenderConstraint; + bPoseChannel *rootChannel; Object *owner; /* for auto IK */ ErrorCallback errorCallback; std::string targetName; @@ -135,8 +135,8 @@ struct IK_Channel { }; struct IK_Scene { - struct Depsgraph *bldepsgraph; - struct Scene *blscene; + Depsgraph *bldepsgraph; + Scene *blscene; IK_Scene *next; int numchan; /* number of channel in pchan */ int numjoint; /* number of joint in jointArray */ @@ -152,7 +152,7 @@ struct IK_Scene { Object *blArmature; float blScale; /* scale of the Armature object (assume uniform scaling) */ float blInvScale; /* inverse of Armature object scale */ - struct bConstraint *polarConstraint; + bConstraint *polarConstraint; std::vector targets; IK_Scene() @@ -920,10 +920,7 @@ static bool joint_callback(const iTaSC::Timestamp ×tamp, } /* build array of joint corresponding to IK chain */ -static int convert_channels(struct Depsgraph *depsgraph, - IK_Scene *ikscene, - PoseTree *tree, - float ctime) +static int convert_channels(Depsgraph *depsgraph, IK_Scene *ikscene, PoseTree *tree, float ctime) { IK_Channel *ikchan; bPoseChannel *pchan; @@ -1131,7 +1128,7 @@ static void BKE_pose_rest(IK_Scene *ikscene) } static IK_Scene *convert_tree( - struct Depsgraph *depsgraph, Scene *blscene, Object *ob, bPoseChannel *pchan, float ctime) + Depsgraph *depsgraph, Scene *blscene, Object *ob, bPoseChannel *pchan, float ctime) { PoseTree *tree = (PoseTree *)pchan->iktree.first; PoseTarget *target; @@ -1639,7 +1636,7 @@ static IK_Scene *convert_tree( return ikscene; } -static void create_scene(struct Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime) +static void create_scene(Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime) { bPoseChannel *pchan; @@ -1694,7 +1691,7 @@ static int init_scene(Object *ob) return 0; } -static void execute_scene(struct Depsgraph *depsgraph, +static void execute_scene(Depsgraph *depsgraph, Scene *blscene, IK_Scene *ikscene, bItasc *ikparam, @@ -1877,10 +1874,7 @@ static void execute_scene(struct Depsgraph *depsgraph, /** \name Plugin Interface * \{ */ -void itasc_initialize_tree(struct Depsgraph *depsgraph, - struct Scene *scene, - Object *ob, - float ctime) +void itasc_initialize_tree(Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime) { bPoseChannel *pchan; int count = 0; @@ -1910,11 +1904,8 @@ void itasc_initialize_tree(struct Depsgraph *depsgraph, ob->pose->flag &= ~POSE_WAS_REBUILT; } -void itasc_execute_tree(struct Depsgraph *depsgraph, - struct Scene *scene, - Object *ob, - bPoseChannel *pchan_root, - float ctime) +void itasc_execute_tree( + Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime) { if (ob->pose->ikdata) { IK_Data *ikdata = (IK_Data *)ob->pose->ikdata; @@ -1934,12 +1925,12 @@ void itasc_execute_tree(struct Depsgraph *depsgraph, } } -void itasc_release_tree(struct Scene *scene, struct Object *ob, float ctime) +void itasc_release_tree(Scene *scene, Object *ob, float ctime) { /* not used for iTaSC */ } -void itasc_clear_data(struct bPose *pose) +void itasc_clear_data(bPose *pose) { if (pose->ikdata) { IK_Data *ikdata = (IK_Data *)pose->ikdata; @@ -1952,7 +1943,7 @@ void itasc_clear_data(struct bPose *pose) } } -void itasc_clear_cache(struct bPose *pose) +void itasc_clear_cache(bPose *pose) { if (pose->ikdata) { IK_Data *ikdata = (IK_Data *)pose->ikdata; @@ -1965,7 +1956,7 @@ void itasc_clear_cache(struct bPose *pose) } } -void itasc_update_param(struct bPose *pose) +void itasc_update_param(bPose *pose) { if (pose->ikdata && pose->ikparam) { IK_Data *ikdata = (IK_Data *)pose->ikdata; @@ -1994,9 +1985,9 @@ void itasc_update_param(struct bPose *pose) } } -void itasc_test_constraint(struct Object *ob, struct bConstraint *cons) +void itasc_test_constraint(Object *ob, bConstraint *cons) { - struct bKinematicConstraint *data = (struct bKinematicConstraint *)cons->data; + bKinematicConstraint *data = (bKinematicConstraint *)cons->data; /* only for IK constraint */ if (cons->type != CONSTRAINT_TYPE_KINEMATIC || data == nullptr) { diff --git a/source/blender/imbuf/intern/allocimbuf.cc b/source/blender/imbuf/intern/allocimbuf.cc index 584b0dbfb01..81e56a26718 100644 --- a/source/blender/imbuf/intern/allocimbuf.cc +++ b/source/blender/imbuf/intern/allocimbuf.cc @@ -586,7 +586,7 @@ void IMB_assign_float_buffer(ImBuf *ibuf, float *buffer_data, const ImBufOwnersh } } -void IMB_assign_z_buffer(struct ImBuf *ibuf, int *buffer_data, ImBufOwnership ownership) +void IMB_assign_z_buffer(ImBuf *ibuf, int *buffer_data, ImBufOwnership ownership) { imb_free_buffer(ibuf->z_buffer); ibuf->flags &= ~IB_zbuf; @@ -599,7 +599,7 @@ void IMB_assign_z_buffer(struct ImBuf *ibuf, int *buffer_data, ImBufOwnership ow } } -void IMB_assign_float_z_buffer(struct ImBuf *ibuf, float *buffer_data, ImBufOwnership ownership) +void IMB_assign_float_z_buffer(ImBuf *ibuf, float *buffer_data, ImBufOwnership ownership) { imb_free_buffer(ibuf->float_z_buffer); ibuf->flags &= ~IB_zbuffloat; @@ -638,7 +638,7 @@ ImBuf *IMB_allocFromBufferOwn( return ibuf; } -struct ImBuf *IMB_allocFromBuffer( +ImBuf *IMB_allocFromBuffer( const uint8_t *byte_buffer, const float *float_buffer, uint w, uint h, uint channels) { ImBuf *ibuf = nullptr; @@ -684,7 +684,7 @@ ImBuf *IMB_allocImBuf(uint x, uint y, uchar planes, uint flags) return ibuf; } -bool IMB_initImBuf(struct ImBuf *ibuf, uint x, uint y, uchar planes, uint flags) +bool IMB_initImBuf(ImBuf *ibuf, uint x, uint y, uchar planes, uint flags) { memset(ibuf, 0, sizeof(ImBuf)); diff --git a/source/blender/imbuf/intern/anim_movie.cc b/source/blender/imbuf/intern/anim_movie.cc index 0e28a0ece50..84aa2035a90 100644 --- a/source/blender/imbuf/intern/anim_movie.cc +++ b/source/blender/imbuf/intern/anim_movie.cc @@ -82,15 +82,15 @@ int ismovie(const char * /*filepath*/) } /* never called, just keep the linker happy */ -static int startmovie(struct anim * /*anim*/) +static int startmovie(anim * /*anim*/) { return 1; } -static ImBuf *movie_fetchibuf(struct anim * /*anim*/, int /*position*/) +static ImBuf *movie_fetchibuf(anim * /*anim*/, int /*position*/) { return nullptr; } -static void free_anim_movie(struct anim * /*anim*/) +static void free_anim_movie(anim * /*anim*/) { /* pass */ } @@ -154,7 +154,7 @@ static void an_stringenc(char *string, } #ifdef WITH_AVI -static void free_anim_avi(struct anim *anim) +static void free_anim_avi(anim *anim) { # if defined(_WIN32) int i; @@ -195,10 +195,10 @@ static void free_anim_avi(struct anim *anim) #endif /* WITH_AVI */ #ifdef WITH_FFMPEG -static void free_anim_ffmpeg(struct anim *anim); +static void free_anim_ffmpeg(anim *anim); #endif -void IMB_free_anim(struct anim *anim) +void IMB_free_anim(anim *anim) { if (anim == nullptr) { printf("free anim, anim == nullptr\n"); @@ -220,7 +220,7 @@ void IMB_free_anim(struct anim *anim) MEM_freeN(anim); } -void IMB_close_anim(struct anim *anim) +void IMB_close_anim(anim *anim) { if (anim == nullptr) { return; @@ -229,7 +229,7 @@ void IMB_close_anim(struct anim *anim) IMB_free_anim(anim); } -void IMB_close_anim_proxies(struct anim *anim) +void IMB_close_anim_proxies(anim *anim) { if (anim == nullptr) { return; @@ -238,7 +238,7 @@ void IMB_close_anim_proxies(struct anim *anim) IMB_free_indices(anim); } -struct IDProperty *IMB_anim_load_metadata(struct anim *anim) +IDProperty *IMB_anim_load_metadata(anim *anim) { switch (anim->curtype) { case ANIM_FFMPEG: { @@ -273,12 +273,12 @@ struct IDProperty *IMB_anim_load_metadata(struct anim *anim) return anim->metadata; } -struct anim *IMB_open_anim(const char *filepath, - int ib_flags, - int streamindex, - char colorspace[IM_MAX_SPACE]) +anim *IMB_open_anim(const char *filepath, + int ib_flags, + int streamindex, + char colorspace[IM_MAX_SPACE]) { - struct anim *anim; + anim *anim; BLI_assert(!BLI_path_is_rel(filepath)); @@ -300,7 +300,7 @@ struct anim *IMB_open_anim(const char *filepath, return anim; } -bool IMB_anim_can_produce_frames(const struct anim *anim) +bool IMB_anim_can_produce_frames(const anim *anim) { #if !(defined(WITH_AVI) || defined(WITH_FFMPEG)) UNUSED_VARS(anim); @@ -319,13 +319,13 @@ bool IMB_anim_can_produce_frames(const struct anim *anim) return false; } -void IMB_suffix_anim(struct anim *anim, const char *suffix) +void IMB_suffix_anim(anim *anim, const char *suffix) { STRNCPY(anim->suffix, suffix); } #ifdef WITH_AVI -static int startavi(struct anim *anim) +static int startavi(anim *anim) { AviError avierror; @@ -444,7 +444,7 @@ static int startavi(struct anim *anim) #endif /* WITH_AVI */ #ifdef WITH_AVI -static ImBuf *avi_fetchibuf(struct anim *anim, int position) +static ImBuf *avi_fetchibuf(anim *anim, int position) { ImBuf *ibuf = nullptr; int *tmp; @@ -499,7 +499,7 @@ static ImBuf *avi_fetchibuf(struct anim *anim, int position) #ifdef WITH_FFMPEG -static int startffmpeg(struct anim *anim) +static int startffmpeg(anim *anim) { int i, video_stream_index; @@ -799,7 +799,7 @@ static int startffmpeg(struct anim *anim) return 0; } -static double ffmpeg_steps_per_frame_get(struct anim *anim) +static double ffmpeg_steps_per_frame_get(anim *anim) { AVStream *v_st = anim->pFormatCtx->streams[anim->videoStream]; AVRational time_base = v_st->time_base; @@ -812,7 +812,7 @@ static double ffmpeg_steps_per_frame_get(struct anim *anim) * It is likely to overshoot and scanning stops. Having previous frame backed up, it is possible * to use it when overshoot happens. */ -static void ffmpeg_double_buffer_backup_frame_store(struct anim *anim, int64_t pts_to_search) +static void ffmpeg_double_buffer_backup_frame_store(anim *anim, int64_t pts_to_search) { /* `anim->pFrame` is beyond `pts_to_search`. Don't store it. */ if (anim->pFrame_backup_complete && anim->cur_pts >= pts_to_search) { @@ -831,7 +831,7 @@ static void ffmpeg_double_buffer_backup_frame_store(struct anim *anim, int64_t p } /* Free stored backup frame. */ -static void ffmpeg_double_buffer_backup_frame_clear(struct anim *anim) +static void ffmpeg_double_buffer_backup_frame_clear(anim *anim) { if (anim->pFrame_backup_complete) { av_frame_unref(anim->pFrame_backup); @@ -840,7 +840,7 @@ static void ffmpeg_double_buffer_backup_frame_clear(struct anim *anim) } /* Return recently decoded frame. If it does not exist, return frame from backup buffer. */ -static AVFrame *ffmpeg_double_buffer_frame_fallback_get(struct anim *anim) +static AVFrame *ffmpeg_double_buffer_frame_fallback_get(anim *anim) { av_log(anim->pFormatCtx, AV_LOG_ERROR, "DECODE UNHAPPY: PTS not matched!\n"); @@ -858,7 +858,7 @@ static AVFrame *ffmpeg_double_buffer_frame_fallback_get(struct anim *anim) * * Output is `anim->cur_frame_final`. */ -static void ffmpeg_postprocess(struct anim *anim, AVFrame *input) +static void ffmpeg_postprocess(anim *anim, AVFrame *input) { ImBuf *ibuf = anim->cur_frame_final; int filter_y = 0; @@ -925,7 +925,7 @@ static void ffmpeg_postprocess(struct anim *anim, AVFrame *input) } } -static void final_frame_log(struct anim *anim, +static void final_frame_log(anim *anim, int64_t frame_pts_start, int64_t frame_pts_end, const char *str) @@ -944,7 +944,7 @@ static bool ffmpeg_pts_isect(int64_t pts_start, int64_t pts_end, int64_t pts_to_ } /* Return frame that matches `pts_to_search`, nullptr if matching frame does not exist. */ -static AVFrame *ffmpeg_frame_by_pts_get(struct anim *anim, int64_t pts_to_search) +static AVFrame *ffmpeg_frame_by_pts_get(anim *anim, int64_t pts_to_search) { /* NOTE: `frame->pts + frame->pkt_duration` does not always match pts of next frame. * See footage from #86361. Here it is OK to use, because PTS must match current or backup frame. @@ -971,7 +971,7 @@ static AVFrame *ffmpeg_frame_by_pts_get(struct anim *anim, int64_t pts_to_search return best_frame; } -static void ffmpeg_decode_store_frame_pts(struct anim *anim) +static void ffmpeg_decode_store_frame_pts(anim *anim) { anim->cur_pts = av_get_pts_from_frame(anim->pFrame); @@ -986,7 +986,7 @@ static void ffmpeg_decode_store_frame_pts(struct anim *anim) int64_t(anim->cur_pts)); } -static int ffmpeg_read_video_frame(struct anim *anim, AVPacket *packet) +static int ffmpeg_read_video_frame(anim *anim, AVPacket *packet) { int ret = 0; while ((ret = av_read_frame(anim->pFormatCtx, packet)) >= 0) { @@ -1001,7 +1001,7 @@ static int ffmpeg_read_video_frame(struct anim *anim, AVPacket *packet) } /* decode one video frame also considering the packet read into cur_packet */ -static int ffmpeg_decode_video_frame(struct anim *anim) +static int ffmpeg_decode_video_frame(anim *anim) { av_log(anim->pFormatCtx, AV_LOG_DEBUG, " DECODE VIDEO FRAME\n"); @@ -1114,7 +1114,7 @@ static int ffmpeg_seek_by_byte(AVFormatContext *pFormatCtx) return false; } -static int64_t ffmpeg_get_seek_pts(struct anim *anim, int64_t pts_to_search) +static int64_t ffmpeg_get_seek_pts(anim *anim, int64_t pts_to_search) { /* FFmpeg seeks internally using DTS values instead of PTS. In some files DTS and PTS values are * offset and sometimes ffmpeg fails to take this into account when seeking. @@ -1134,9 +1134,7 @@ static int64_t ffmpeg_get_seek_pts(struct anim *anim, int64_t pts_to_search) /* This gives us an estimate of which pts our requested frame will have. * Note that this might be off a bit in certain video files, but it should still be close enough. */ -static int64_t ffmpeg_get_pts_to_search(struct anim *anim, - struct anim_index *tc_index, - int position) +static int64_t ffmpeg_get_pts_to_search(anim *anim, anim_index *tc_index, int position) { int64_t pts_to_search; @@ -1157,12 +1155,12 @@ static int64_t ffmpeg_get_pts_to_search(struct anim *anim, return pts_to_search; } -static bool ffmpeg_is_first_frame_decode(struct anim *anim) +static bool ffmpeg_is_first_frame_decode(anim *anim) { return anim->pFrame_complete == false; } -static void ffmpeg_scan_log(struct anim *anim, int64_t pts_to_search) +static void ffmpeg_scan_log(anim *anim, int64_t pts_to_search) { int64_t frame_pts_start = av_get_pts_from_frame(anim->pFrame); int64_t frame_pts_end = frame_pts_start + av_get_frame_duration_in_pts_units(anim->pFrame); @@ -1175,7 +1173,7 @@ static void ffmpeg_scan_log(struct anim *anim, int64_t pts_to_search) } /* Decode frames one by one until its PTS matches pts_to_search. */ -static void ffmpeg_decode_video_frame_scan(struct anim *anim, int64_t pts_to_search) +static void ffmpeg_decode_video_frame_scan(anim *anim, int64_t pts_to_search) { const int64_t start_gop_frame = anim->cur_key_frame_pts; bool decode_error = false; @@ -1199,7 +1197,7 @@ static void ffmpeg_decode_video_frame_scan(struct anim *anim, int64_t pts_to_sea * read_seek2() functions defined. When seeking in these formats, rule to seek to last * necessary I-frame is not honored. It is not even guaranteed that I-frame, that must be * decoded will be read. See https://trac.ffmpeg.org/ticket/1607 & #86944. */ -static int ffmpeg_generic_seek_workaround(struct anim *anim, +static int ffmpeg_generic_seek_workaround(anim *anim, int64_t *requested_pts, int64_t pts_to_search) { @@ -1261,7 +1259,7 @@ static int ffmpeg_generic_seek_workaround(struct anim *anim, /* Read packet until timestamp matches `anim->cur_packet`, thus recovering internal `anim` stream * position state. */ -static void ffmpeg_seek_recover_stream_position(struct anim *anim) +static void ffmpeg_seek_recover_stream_position(anim *anim) { AVPacket *temp_packet = av_packet_alloc(); while (ffmpeg_read_video_frame(anim, temp_packet) >= 0) { @@ -1277,7 +1275,7 @@ static void ffmpeg_seek_recover_stream_position(struct anim *anim) } /* Check if seeking and mainly flushing codec buffers is needed. */ -static bool ffmpeg_seek_buffers_need_flushing(struct anim *anim, int position, int64_t seek_pos) +static bool ffmpeg_seek_buffers_need_flushing(anim *anim, int position, int64_t seek_pos) { /* Get timestamp of packet read after seeking. */ AVPacket *temp_packet = av_packet_alloc(); @@ -1306,9 +1304,9 @@ static bool ffmpeg_seek_buffers_need_flushing(struct anim *anim, int position, i } /* Seek to last necessary key frame. */ -static int ffmpeg_seek_to_key_frame(struct anim *anim, +static int ffmpeg_seek_to_key_frame(anim *anim, int position, - struct anim_index *tc_index, + anim_index *tc_index, int64_t pts_to_search) { int64_t seek_pos; @@ -1398,14 +1396,14 @@ static int ffmpeg_seek_to_key_frame(struct anim *anim, return ret; } -static bool ffmpeg_must_seek(struct anim *anim, int position) +static bool ffmpeg_must_seek(anim *anim, int position) { bool must_seek = position != anim->cur_position + 1 || ffmpeg_is_first_frame_decode(anim); anim->seek_before_decode = must_seek; return must_seek; } -static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position, IMB_Timecode_Type tc) +static ImBuf *ffmpeg_fetchibuf(anim *anim, int position, IMB_Timecode_Type tc) { if (anim == nullptr) { return nullptr; @@ -1413,7 +1411,7 @@ static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position, IMB_Timecode_Typ av_log(anim->pFormatCtx, AV_LOG_DEBUG, "FETCH: seek_pos=%d\n", position); - struct anim_index *tc_index = IMB_anim_open_index(anim, tc); + anim_index *tc_index = IMB_anim_open_index(anim, tc); int64_t pts_to_search = ffmpeg_get_pts_to_search(anim, tc_index, position); AVStream *v_st = anim->pFormatCtx->streams[anim->videoStream]; double frame_rate = av_q2d(v_st->r_frame_rate); @@ -1496,7 +1494,7 @@ static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position, IMB_Timecode_Typ return anim->cur_frame_final; } -static void free_anim_ffmpeg(struct anim *anim) +static void free_anim_ffmpeg(anim *anim) { if (anim == nullptr) { return; @@ -1524,7 +1522,7 @@ static void free_anim_ffmpeg(struct anim *anim) * Try to initialize the #anim struct. * Returns true on success. */ -static bool anim_getnew(struct anim *anim) +static bool anim_getnew(anim *anim) { BLI_assert(anim->curtype == ANIM_NONE); if (anim == nullptr) { @@ -1581,9 +1579,9 @@ static bool anim_getnew(struct anim *anim) return true; } -struct ImBuf *IMB_anim_previewframe(struct anim *anim) +ImBuf *IMB_anim_previewframe(anim *anim) { - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; int position = 0; ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE); @@ -1595,12 +1593,12 @@ struct ImBuf *IMB_anim_previewframe(struct anim *anim) return ibuf; } -struct ImBuf *IMB_anim_absolute(struct anim *anim, - int position, - IMB_Timecode_Type tc, - IMB_Proxy_Size preview_size) +ImBuf *IMB_anim_absolute(anim *anim, + int position, + IMB_Timecode_Type tc, + IMB_Proxy_Size preview_size) { - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; char head[256], tail[256]; ushort digits; int pic; @@ -1682,9 +1680,9 @@ struct ImBuf *IMB_anim_absolute(struct anim *anim, /***/ -int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc) +int IMB_anim_get_duration(anim *anim, IMB_Timecode_Type tc) { - struct anim_index *idx; + anim_index *idx; if (tc == IMB_TC_NONE) { return anim->duration_in_frames; } @@ -1697,12 +1695,12 @@ int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc) return IMB_indexer_get_duration(idx); } -double IMD_anim_get_offset(struct anim *anim) +double IMD_anim_get_offset(anim *anim) { return anim->start_offset; } -bool IMB_anim_get_fps(struct anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base) +bool IMB_anim_get_fps(anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base) { double frs_sec_base_double; if (anim->frs_sec) { @@ -1735,12 +1733,12 @@ bool IMB_anim_get_fps(struct anim *anim, short *frs_sec, float *frs_sec_base, bo return false; } -int IMB_anim_get_image_width(struct anim *anim) +int IMB_anim_get_image_width(anim *anim) { return anim->x; } -int IMB_anim_get_image_height(struct anim *anim) +int IMB_anim_get_image_height(anim *anim) { return anim->y; } diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.cc b/source/blender/imbuf/intern/cineon/cineon_dpx.cc index 09bb75312a9..b961beca48f 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.cc +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.cc @@ -22,7 +22,7 @@ #include "MEM_guardedalloc.h" -static struct ImBuf *imb_load_dpx_cineon( +static ImBuf *imb_load_dpx_cineon( const uchar *mem, size_t size, int use_cineon, int flags, char colorspace[IM_MAX_SPACE]) { ImBuf *ibuf; @@ -166,7 +166,7 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filepath, int use_cineon return rvalue; } -bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags) +bool imb_save_cineon(ImBuf *buf, const char *filepath, int flags) { return imb_save_dpx_cineon(buf, filepath, 1, flags); } diff --git a/source/blender/imbuf/intern/cineon/cineonlib.cc b/source/blender/imbuf/intern/cineon/cineonlib.cc index 6d07227c83a..8c82b194b1c 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.cc +++ b/source/blender/imbuf/intern/cineon/cineonlib.cc @@ -41,7 +41,7 @@ static void fillCineonMainHeader(LogImageFile *cineon, const char *creator) { time_t fileClock; - struct tm *fileTime; + tm *fileTime; int i; memset(header, 0, sizeof(CineonMainHeader)); diff --git a/source/blender/imbuf/intern/cineon/dpxlib.cc b/source/blender/imbuf/intern/cineon/dpxlib.cc index e5f2ba8c231..9a41e8cde1e 100644 --- a/source/blender/imbuf/intern/cineon/dpxlib.cc +++ b/source/blender/imbuf/intern/cineon/dpxlib.cc @@ -45,7 +45,7 @@ static void fillDpxMainHeader(LogImageFile *dpx, const char *creator) { time_t fileClock; - struct tm *fileTime; + tm *fileTime; memset(header, 0, sizeof(DpxMainHeader)); diff --git a/source/blender/imbuf/intern/colormanagement.cc b/source/blender/imbuf/intern/colormanagement.cc index 69ef393db87..85b15925516 100644 --- a/source/blender/imbuf/intern/colormanagement.cc +++ b/source/blender/imbuf/intern/colormanagement.cc @@ -215,12 +215,12 @@ typedef struct ColormanageCacheData { } ColormanageCacheData; typedef struct ColormanageCache { - struct MovieCache *moviecache; + MovieCache *moviecache; ColormanageCacheData *data; } ColormanageCache; -static struct MovieCache *colormanage_moviecache_get(const ImBuf *ibuf) +static MovieCache *colormanage_moviecache_get(const ImBuf *ibuf) { if (!ibuf->colormanage_cache) { return nullptr; @@ -255,14 +255,14 @@ static bool colormanage_hashcmp(const void *av, const void *bv) return ((a->view != b->view) || (a->display != b->display)); } -static struct MovieCache *colormanage_moviecache_ensure(ImBuf *ibuf) +static MovieCache *colormanage_moviecache_ensure(ImBuf *ibuf) { if (!ibuf->colormanage_cache) { ibuf->colormanage_cache = MEM_cnew("imbuf colormanage cache"); } if (!ibuf->colormanage_cache->moviecache) { - struct MovieCache *moviecache; + MovieCache *moviecache; moviecache = IMB_moviecache_create("colormanage cache", sizeof(ColormanageCacheKey), @@ -322,7 +322,7 @@ static ImBuf *colormanage_cache_get_ibuf(ImBuf *ibuf, void **cache_handle) { ImBuf *cache_ibuf; - struct MovieCache *moviecache = colormanage_moviecache_get(ibuf); + MovieCache *moviecache = colormanage_moviecache_get(ibuf); if (!moviecache) { /* If there's no moviecache it means no color management was applied @@ -402,7 +402,7 @@ static void colormanage_cache_put(ImBuf *ibuf, ImBuf *cache_ibuf; ColormanageCacheData *cache_data; int view_flag = 1 << (view_settings->view - 1); - struct MovieCache *moviecache = colormanage_moviecache_ensure(ibuf); + MovieCache *moviecache = colormanage_moviecache_ensure(ibuf); CurveMapping *curve_mapping = view_settings->curve_mapping; int curve_mapping_timestamp = curve_mapping ? curve_mapping->changed_timestamp : 0; @@ -758,7 +758,7 @@ void colormanage_cache_free(ImBuf *ibuf) if (ibuf->colormanage_cache) { ColormanageCacheData *cache_data = colormanage_cachedata_get(ibuf); - struct MovieCache *moviecache = colormanage_moviecache_get(ibuf); + MovieCache *moviecache = colormanage_moviecache_get(ibuf); if (cache_data) { MEM_freeN(cache_data); @@ -2142,12 +2142,8 @@ void IMB_colormanagement_colorspace_to_scene_linear_v4(float pixel[4], } } -void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, - int width, - int height, - int channels, - struct ColorSpace *colorspace, - bool predivide) +void IMB_colormanagement_colorspace_to_scene_linear( + float *buffer, int width, int height, int channels, ColorSpace *colorspace, bool predivide) { OCIO_ConstCPUProcessorRcPtr *processor; @@ -2186,7 +2182,7 @@ void IMB_colormanagement_imbuf_to_byte_texture(uchar *out_buffer, const int offset_y, const int width, const int height, - const struct ImBuf *ibuf, + const ImBuf *ibuf, const bool store_premultiplied) { /* Byte buffer storage, only for sRGB, scene linear and data texture since other @@ -2269,7 +2265,7 @@ void IMB_colormanagement_imbuf_to_float_texture(float *out_buffer, const int offset_y, const int width, const int height, - const struct ImBuf *ibuf, + const ImBuf *ibuf, const bool store_premultiplied) { /* Float texture are stored in scene linear color space, with premultiplied @@ -2915,7 +2911,7 @@ const char *IMB_colormanagement_display_get_none_name(void) } const char *IMB_colormanagement_display_get_default_view_transform_name( - struct ColorManagedDisplay *display) + ColorManagedDisplay *display) { return colormanage_view_get_default_name(display); } @@ -3310,7 +3306,7 @@ void IMB_colormanagement_view_items_add(EnumPropertyItem **items, } } -void IMB_colormanagement_look_items_add(struct EnumPropertyItem **items, +void IMB_colormanagement_look_items_add(EnumPropertyItem **items, int *totitem, const char *view_name) { @@ -3688,14 +3684,14 @@ void IMB_partial_display_buffer_update(ImBuf *ibuf, } void IMB_partial_display_buffer_update_threaded( - struct ImBuf *ibuf, + ImBuf *ibuf, const float *linear_buffer, const uchar *byte_buffer, int stride, int offset_x, int offset_y, - const struct ColorManagedViewSettings *view_settings, - const struct ColorManagedDisplaySettings *display_settings, + const ColorManagedViewSettings *view_settings, + const ColorManagedDisplaySettings *display_settings, int xmin, int ymin, int xmax, @@ -3832,7 +3828,7 @@ void IMB_colormanagement_processor_apply_v3(ColormanageProcessor *cm_processor, } } -void IMB_colormanagement_processor_apply_pixel(struct ColormanageProcessor *cm_processor, +void IMB_colormanagement_processor_apply_pixel(ColormanageProcessor *cm_processor, float *pixel, int channels) { @@ -4021,7 +4017,7 @@ bool IMB_colormanagement_support_glsl_draw(const ColorManagedViewSettings * /*vi bool IMB_colormanagement_setup_glsl_draw_from_space( const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, - struct ColorSpace *from_colorspace, + ColorSpace *from_colorspace, float dither, bool predivide, bool do_overlay_merge) @@ -4085,7 +4081,7 @@ bool IMB_colormanagement_setup_glsl_draw(const ColorManagedViewSettings *view_se } bool IMB_colormanagement_setup_glsl_draw_from_space_ctx(const bContext *C, - struct ColorSpace *from_colorspace, + ColorSpace *from_colorspace, float dither, bool predivide) { diff --git a/source/blender/imbuf/intern/divers.cc b/source/blender/imbuf/intern/divers.cc index 0043ee26095..4d113dfd040 100644 --- a/source/blender/imbuf/intern/divers.cc +++ b/source/blender/imbuf/intern/divers.cc @@ -748,9 +748,7 @@ void IMB_rect_from_float(ImBuf *ibuf) ibuf->userflags &= ~IB_RECT_INVALID; } -void IMB_float_from_rect_ex(struct ImBuf *dst, - const struct ImBuf *src, - const rcti *region_to_update) +void IMB_float_from_rect_ex(ImBuf *dst, const ImBuf *src, const rcti *region_to_update) { BLI_assert_msg(dst->float_buffer.data != nullptr, "Destination buffer should have a float buffer assigned."); diff --git a/source/blender/imbuf/intern/filter.cc b/source/blender/imbuf/intern/filter.cc index e848e079343..6fc3b273658 100644 --- a/source/blender/imbuf/intern/filter.cc +++ b/source/blender/imbuf/intern/filter.cc @@ -100,7 +100,7 @@ static void filtcolumf(float *point, int y, int skip) } } -void IMB_filtery(struct ImBuf *ibuf) +void IMB_filtery(ImBuf *ibuf) { uchar *point = ibuf->byte_buffer.data; float *pointf = ibuf->float_buffer.data; @@ -137,7 +137,7 @@ void IMB_filtery(struct ImBuf *ibuf) } } -void imb_filterx(struct ImBuf *ibuf) +void imb_filterx(ImBuf *ibuf) { uchar *point = ibuf->byte_buffer.data; float *pointf = ibuf->float_buffer.data; @@ -291,7 +291,7 @@ static void imb_filterN(ImBuf *out, ImBuf *in) } } -void IMB_filter(struct ImBuf *ibuf) +void IMB_filter(ImBuf *ibuf) { IMB_filtery(ibuf); imb_filterx(ibuf); @@ -397,7 +397,7 @@ static int check_pixel_assigned( return res; } -void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter) +void IMB_filter_extend(ImBuf *ibuf, char *mask, int filter) { const int width = ibuf->x; const int height = ibuf->y; diff --git a/source/blender/imbuf/intern/format_bmp.cc b/source/blender/imbuf/intern/format_bmp.cc index ae806b03ee3..11b61efbcfc 100644 --- a/source/blender/imbuf/intern/format_bmp.cc +++ b/source/blender/imbuf/intern/format_bmp.cc @@ -28,7 +28,7 @@ ImBuf *imb_load_bmp(const uchar *mem, size_t size, int flags, char colorspace[IM return imb_oiio_read(ctx, config, colorspace, spec); } -bool imb_save_bmp(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_bmp(ImBuf *ibuf, const char *filepath, int flags) { const int file_channels = ibuf->planes >> 3; const TypeDesc data_format = TypeDesc::UINT8; diff --git a/source/blender/imbuf/intern/format_dpx.cc b/source/blender/imbuf/intern/format_dpx.cc index 773fa81c836..5ce460d7c5f 100644 --- a/source/blender/imbuf/intern/format_dpx.cc +++ b/source/blender/imbuf/intern/format_dpx.cc @@ -35,7 +35,7 @@ ImBuf *imb_load_dpx(const uchar *mem, size_t size, int flags, char colorspace[IM return ibuf; } -bool imb_save_dpx(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_dpx(ImBuf *ibuf, const char *filepath, int flags) { int bits_per_sample = 8; if (ibuf->foptions.flag & CINEON_10BIT) { diff --git a/source/blender/imbuf/intern/format_hdr.cc b/source/blender/imbuf/intern/format_hdr.cc index 3cf188bad2b..dbdc5d6c892 100644 --- a/source/blender/imbuf/intern/format_hdr.cc +++ b/source/blender/imbuf/intern/format_hdr.cc @@ -39,7 +39,7 @@ ImBuf *imb_load_hdr(const uchar *mem, size_t size, int flags, char colorspace[IM return ibuf; } -bool imb_save_hdr(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_hdr(ImBuf *ibuf, const char *filepath, int flags) { const int file_channels = 3; const TypeDesc data_format = TypeDesc::FLOAT; diff --git a/source/blender/imbuf/intern/format_png.cc b/source/blender/imbuf/intern/format_png.cc index 4918d208614..c79506a2334 100644 --- a/source/blender/imbuf/intern/format_png.cc +++ b/source/blender/imbuf/intern/format_png.cc @@ -42,7 +42,7 @@ ImBuf *imb_load_png(const uchar *mem, size_t size, int flags, char colorspace[IM return ibuf; } -bool imb_save_png(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_png(ImBuf *ibuf, const char *filepath, int flags) { const bool is_16bit = (ibuf->foptions.flag & PNG_16BIT); const int file_channels = ibuf->planes >> 3; diff --git a/source/blender/imbuf/intern/format_targa.cc b/source/blender/imbuf/intern/format_targa.cc index 432c10c53aa..1dd93b0da6d 100644 --- a/source/blender/imbuf/intern/format_targa.cc +++ b/source/blender/imbuf/intern/format_targa.cc @@ -26,7 +26,7 @@ ImBuf *imb_load_tga(const uchar *mem, size_t size, int flags, char colorspace[IM return imb_oiio_read(ctx, config, colorspace, spec); } -bool imb_save_tga(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_tga(ImBuf *ibuf, const char *filepath, int flags) { const int file_channels = ibuf->planes >> 3; const TypeDesc data_format = TypeDesc::UINT8; diff --git a/source/blender/imbuf/intern/format_tiff.cc b/source/blender/imbuf/intern/format_tiff.cc index 0ac546c4b01..a65e093389d 100644 --- a/source/blender/imbuf/intern/format_tiff.cc +++ b/source/blender/imbuf/intern/format_tiff.cc @@ -48,7 +48,7 @@ ImBuf *imb_load_tiff(const uchar *mem, size_t size, int flags, char colorspace[I return ibuf; } -bool imb_save_tiff(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_tiff(ImBuf *ibuf, const char *filepath, int flags) { const bool is_16bit = ((ibuf->foptions.flag & TIF_16BIT) && ibuf->float_buffer.data); const int file_channels = ibuf->planes >> 3; diff --git a/source/blender/imbuf/intern/imageprocess.cc b/source/blender/imbuf/intern/imageprocess.cc index b80ab9d95ef..67343fd4357 100644 --- a/source/blender/imbuf/intern/imageprocess.cc +++ b/source/blender/imbuf/intern/imageprocess.cc @@ -24,7 +24,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -void IMB_convert_rgba_to_abgr(struct ImBuf *ibuf) +void IMB_convert_rgba_to_abgr(ImBuf *ibuf) { size_t size; uchar rt, *cp = ibuf->byte_buffer.data; @@ -59,7 +59,7 @@ void IMB_convert_rgba_to_abgr(struct ImBuf *ibuf) } } -static void pixel_from_buffer(const struct ImBuf *ibuf, uchar **outI, float **outF, int x, int y) +static void pixel_from_buffer(const ImBuf *ibuf, uchar **outI, float **outF, int x, int y) { size_t offset = size_t(ibuf->x) * y * 4 + 4 * x; @@ -77,8 +77,7 @@ static void pixel_from_buffer(const struct ImBuf *ibuf, uchar **outI, float **ou /** \name Bi-Cubic Interpolation * \{ */ -void bicubic_interpolation_color( - const struct ImBuf *in, uchar outI[4], float outF[4], float u, float v) +void bicubic_interpolation_color(const ImBuf *in, uchar outI[4], float outF[4], float u, float v) { if (outF) { BLI_bicubic_interpolation_fl(in->float_buffer.data, outF, in->x, in->y, 4, u, v); @@ -110,7 +109,7 @@ void bicubic_interpolation(const ImBuf *in, ImBuf *out, float u, float v, int xo * \{ */ void bilinear_interpolation_color_fl( - const struct ImBuf *in, uchar /*outI*/[4], float outF[4], float u, float v) + const ImBuf *in, uchar /*outI*/[4], float outF[4], float u, float v) { BLI_assert(outF); BLI_assert(in->float_buffer.data); @@ -118,15 +117,14 @@ void bilinear_interpolation_color_fl( } void bilinear_interpolation_color_char( - const struct ImBuf *in, uchar outI[4], float /*outF*/[4], float u, float v) + const ImBuf *in, uchar outI[4], float /*outF*/[4], float u, float v) { BLI_assert(outI); BLI_assert(in->byte_buffer.data); BLI_bilinear_interpolation_char(in->byte_buffer.data, outI, in->x, in->y, 4, u, v); } -void bilinear_interpolation_color( - const struct ImBuf *in, uchar outI[4], float outF[4], float u, float v) +void bilinear_interpolation_color(const ImBuf *in, uchar outI[4], float outF[4], float u, float v) { if (outF) { BLI_bilinear_interpolation_fl(in->float_buffer.data, outF, in->x, in->y, 4, u, v); @@ -140,7 +138,7 @@ void bilinear_interpolation_color( /* BILINEAR INTERPOLATION */ void bilinear_interpolation_color_wrap( - const struct ImBuf *in, uchar outI[4], float outF[4], float u, float v) + const ImBuf *in, uchar outI[4], float outF[4], float u, float v) { float *row1, *row2, *row3, *row4, a, b; uchar *row1I, *row2I, *row3I, *row4I; @@ -235,7 +233,7 @@ void bilinear_interpolation(const ImBuf *in, ImBuf *out, float u, float v, int x * \{ */ void nearest_interpolation_color_char( - const struct ImBuf *in, uchar outI[4], float /*outF*/[4], float u, float v) + const ImBuf *in, uchar outI[4], float /*outF*/[4], float u, float v) { BLI_assert(outI); BLI_assert(in->byte_buffer.data); @@ -258,7 +256,7 @@ void nearest_interpolation_color_char( } void nearest_interpolation_color_fl( - const struct ImBuf *in, uchar /*outI*/[4], float outF[4], float u, float v) + const ImBuf *in, uchar /*outI*/[4], float outF[4], float u, float v) { BLI_assert(outF); BLI_assert(in->float_buffer.data); @@ -277,8 +275,7 @@ void nearest_interpolation_color_fl( copy_v4_v4(outF, dataF); } -void nearest_interpolation_color( - const struct ImBuf *in, uchar outI[4], float outF[4], float u, float v) +void nearest_interpolation_color(const ImBuf *in, uchar outI[4], float outF[4], float u, float v) { if (outF) { nearest_interpolation_color_fl(in, outI, outF, u, v); @@ -289,7 +286,7 @@ void nearest_interpolation_color( } void nearest_interpolation_color_wrap( - const struct ImBuf *in, uchar outI[4], float outF[4], float u, float v) + const ImBuf *in, uchar outI[4], float outF[4], float u, float v) { const float *dataF; uchar *dataI; diff --git a/source/blender/imbuf/intern/indexer.cc b/source/blender/imbuf/intern/indexer.cc index 0580212e9b0..53639132596 100644 --- a/source/blender/imbuf/intern/indexer.cc +++ b/source/blender/imbuf/intern/indexer.cc @@ -155,10 +155,10 @@ void IMB_index_builder_finish(anim_index_builder *fp, int rollback) MEM_freeN(fp); } -struct anim_index *IMB_indexer_open(const char *filepath) +anim_index *IMB_indexer_open(const char *filepath) { char header[13]; - struct anim_index *idx; + anim_index *idx; FILE *fp = BLI_fopen(filepath, "rb"); int i; @@ -236,7 +236,7 @@ struct anim_index *IMB_indexer_open(const char *filepath) return idx; } -uint64_t IMB_indexer_get_seek_pos(struct anim_index *idx, int frame_index) +uint64_t IMB_indexer_get_seek_pos(anim_index *idx, int frame_index) { /* This is hard coded, because our current timecode files return non zero seek position for index * 0. Only when seeking to 0 it is guaranteed, that first packet will be read. */ @@ -249,7 +249,7 @@ uint64_t IMB_indexer_get_seek_pos(struct anim_index *idx, int frame_index) return idx->entries[frame_index].seek_pos; } -uint64_t IMB_indexer_get_seek_pos_pts(struct anim_index *idx, int frame_index) +uint64_t IMB_indexer_get_seek_pos_pts(anim_index *idx, int frame_index) { if (frame_index < 0) { frame_index = 0; @@ -260,7 +260,7 @@ uint64_t IMB_indexer_get_seek_pos_pts(struct anim_index *idx, int frame_index) return idx->entries[frame_index].seek_pos_pts; } -uint64_t IMB_indexer_get_seek_pos_dts(struct anim_index *idx, int frame_index) +uint64_t IMB_indexer_get_seek_pos_dts(anim_index *idx, int frame_index) { if (frame_index < 0) { frame_index = 0; @@ -271,7 +271,7 @@ uint64_t IMB_indexer_get_seek_pos_dts(struct anim_index *idx, int frame_index) return idx->entries[frame_index].seek_pos_dts; } -int IMB_indexer_get_frame_index(struct anim_index *idx, int frameno) +int IMB_indexer_get_frame_index(anim_index *idx, int frameno) { int len = idx->num_entries; int half; @@ -303,7 +303,7 @@ int IMB_indexer_get_frame_index(struct anim_index *idx, int frameno) return first; } -uint64_t IMB_indexer_get_pts(struct anim_index *idx, int frame_index) +uint64_t IMB_indexer_get_pts(anim_index *idx, int frame_index) { if (frame_index < 0) { frame_index = 0; @@ -314,7 +314,7 @@ uint64_t IMB_indexer_get_pts(struct anim_index *idx, int frame_index) return idx->entries[frame_index].pts; } -int IMB_indexer_get_duration(struct anim_index *idx) +int IMB_indexer_get_duration(anim_index *idx) { if (idx->num_entries == 0) { return 0; @@ -322,7 +322,7 @@ int IMB_indexer_get_duration(struct anim_index *idx) return idx->entries[idx->num_entries - 1].frameno + 1; } -int IMB_indexer_can_scan(struct anim_index *idx, int old_frame_index, int new_frame_index) +int IMB_indexer_can_scan(anim_index *idx, int old_frame_index, int new_frame_index) { /* makes only sense, if it is the same I-Frame and we are not * trying to run backwards in time... */ @@ -331,7 +331,7 @@ int IMB_indexer_can_scan(struct anim_index *idx, int old_frame_index, int new_fr old_frame_index < new_frame_index); } -void IMB_indexer_close(struct anim_index *idx) +void IMB_indexer_close(anim_index *idx) { MEM_freeN(idx->entries); MEM_freeN(idx); @@ -379,7 +379,7 @@ int IMB_timecode_to_array_index(IMB_Timecode_Type tc) * - rebuild helper functions * ---------------------------------------------------------------------- */ -static void get_index_dir(struct anim *anim, char *index_dir, size_t index_dir_maxncpy) +static void get_index_dir(anim *anim, char *index_dir, size_t index_dir_maxncpy) { if (!anim->index_dir[0]) { char filename[FILE_MAXFILE]; @@ -392,15 +392,12 @@ static void get_index_dir(struct anim *anim, char *index_dir, size_t index_dir_m } } -void IMB_anim_get_filename(struct anim *anim, char *filename, int filename_maxncpy) +void IMB_anim_get_filename(anim *anim, char *filename, int filename_maxncpy) { BLI_path_split_file_part(anim->filepath, filename, filename_maxncpy); } -static bool get_proxy_filepath(struct anim *anim, - IMB_Proxy_Size preview_size, - char *filepath, - bool temp) +static bool get_proxy_filepath(anim *anim, IMB_Proxy_Size preview_size, char *filepath, bool temp) { char index_dir[FILE_MAXDIR]; int i = IMB_proxy_size_to_array_index(preview_size); @@ -429,7 +426,7 @@ static bool get_proxy_filepath(struct anim *anim, return true; } -static void get_tc_filepath(struct anim *anim, IMB_Timecode_Type tc, char *filepath) +static void get_tc_filepath(anim *anim, IMB_Timecode_Type tc, char *filepath) { char index_dir[FILE_MAXDIR]; int i = IMB_timecode_to_array_index(tc); @@ -478,7 +475,7 @@ struct proxy_output_ctx { AVStream *st; AVCodecContext *c; const AVCodec *codec; - struct SwsContext *sws_ctx; + SwsContext *sws_ctx; AVFrame *frame; int cfra; IMB_Proxy_Size proxy_size; @@ -486,8 +483,8 @@ struct proxy_output_ctx { struct anim *anim; }; -static struct proxy_output_ctx *alloc_proxy_output_ffmpeg( - struct anim *anim, AVStream *st, IMB_Proxy_Size proxy_size, int width, int height, int quality) +static proxy_output_ctx *alloc_proxy_output_ffmpeg( + anim *anim, AVStream *st, IMB_Proxy_Size proxy_size, int width, int height, int quality) { proxy_output_ctx *rv = MEM_cnew("alloc_proxy_output"); @@ -665,7 +662,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg( return rv; } -static void add_to_proxy_output_ffmpeg(struct proxy_output_ctx *ctx, AVFrame *frame) +static void add_to_proxy_output_ffmpeg(proxy_output_ctx *ctx, AVFrame *frame) { if (!ctx) { return; @@ -743,7 +740,7 @@ static void add_to_proxy_output_ffmpeg(struct proxy_output_ctx *ctx, AVFrame *fr av_packet_free(&packet); } -static void free_proxy_output_ffmpeg(struct proxy_output_ctx *ctx, int rollback) +static void free_proxy_output_ffmpeg(proxy_output_ctx *ctx, int rollback) { char filepath[FILE_MAX]; char filepath_tmp[FILE_MAX]; @@ -803,7 +800,7 @@ typedef struct FFmpegIndexBuilderContext { int num_proxy_sizes; int num_indexers; - struct proxy_output_ctx *proxy_ctx[IMB_PROXY_MAX_SLOT]; + proxy_output_ctx *proxy_ctx[IMB_PROXY_MAX_SLOT]; anim_index_builder *indexer[IMB_TC_MAX_SLOT]; int tcs_in_use; @@ -825,7 +822,7 @@ typedef struct FFmpegIndexBuilderContext { bool building_cancelled; } FFmpegIndexBuilderContext; -static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, +static IndexBuildContext *index_ffmpeg_create_context(anim *anim, int tcs_in_use, int proxy_sizes_in_use, int quality, @@ -1255,7 +1252,7 @@ typedef struct FallbackIndexBuilderContext { } FallbackIndexBuilderContext; static AviMovie *alloc_proxy_output_avi( - struct anim *anim, char *filepath, int width, int height, int quality) + anim *anim, char *filepath, int width, int height, int quality) { int x, y; AviFormat format; @@ -1292,7 +1289,7 @@ static AviMovie *alloc_proxy_output_avi( return avi; } -static IndexBuildContext *index_fallback_create_context(struct anim *anim, +static IndexBuildContext *index_fallback_create_context(anim *anim, int /*tcs_in_use*/, int proxy_sizes_in_use, int quality) @@ -1333,7 +1330,7 @@ static IndexBuildContext *index_fallback_create_context(struct anim *anim, static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *context, const bool stop) { - struct anim *anim = context->anim; + anim *anim = context->anim; char filepath[FILE_MAX]; char filepath_tmp[FILE_MAX]; int i; @@ -1364,11 +1361,11 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context, { int count = IMB_anim_get_duration(context->anim, IMB_TC_NONE); int i, pos; - struct anim *anim = context->anim; + anim *anim = context->anim; for (pos = 0; pos < count; pos++) { - struct ImBuf *ibuf = IMB_anim_absolute(anim, pos, IMB_TC_NONE, IMB_PROXY_NONE); - struct ImBuf *tmp_ibuf = IMB_dupImBuf(ibuf); + ImBuf *ibuf = IMB_anim_absolute(anim, pos, IMB_TC_NONE, IMB_PROXY_NONE); + ImBuf *tmp_ibuf = IMB_dupImBuf(ibuf); float next_progress = float(pos) / float(count); if (*progress != next_progress) { @@ -1387,7 +1384,7 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context, int x = anim->x * proxy_fac[i]; int y = anim->y * proxy_fac[i]; - struct ImBuf *s_ibuf = IMB_dupImBuf(tmp_ibuf); + ImBuf *s_ibuf = IMB_dupImBuf(tmp_ibuf); IMB_scalefastImBuf(s_ibuf, x, y); @@ -1412,7 +1409,7 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context, * - public API * ---------------------------------------------------------------------- */ -IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, +IndexBuildContext *IMB_anim_index_rebuild_context(anim *anim, IMB_Timecode_Type tcs_in_use, int proxy_sizes_in_use, int quality, @@ -1495,7 +1492,7 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, UNUSED_VARS(tcs_in_use, proxy_sizes_in_use, quality); } -void IMB_anim_index_rebuild(struct IndexBuildContext *context, +void IMB_anim_index_rebuild(IndexBuildContext *context, /* NOLINTNEXTLINE: readability-non-const-parameter. */ bool *stop, /* NOLINTNEXTLINE: readability-non-const-parameter. */ @@ -1540,7 +1537,7 @@ void IMB_anim_index_rebuild_finish(IndexBuildContext *context, const bool stop) UNUSED_VARS(stop, proxy_sizes); } -void IMB_free_indices(struct anim *anim) +void IMB_free_indices(anim *anim) { int i; @@ -1562,7 +1559,7 @@ void IMB_free_indices(struct anim *anim) anim->indices_tried = 0; } -void IMB_anim_set_index_dir(struct anim *anim, const char *dir) +void IMB_anim_set_index_dir(anim *anim, const char *dir) { if (STREQ(anim->index_dir, dir)) { return; @@ -1572,7 +1569,7 @@ void IMB_anim_set_index_dir(struct anim *anim, const char *dir) IMB_free_indices(anim); } -struct anim *IMB_anim_open_proxy(struct anim *anim, IMB_Proxy_Size preview_size) +anim *IMB_anim_open_proxy(anim *anim, IMB_Proxy_Size preview_size) { char filepath[FILE_MAX]; int i = IMB_proxy_size_to_array_index(preview_size); @@ -1599,7 +1596,7 @@ struct anim *IMB_anim_open_proxy(struct anim *anim, IMB_Proxy_Size preview_size) return anim->proxy_anim[i]; } -struct anim_index *IMB_anim_open_index(struct anim *anim, IMB_Timecode_Type tc) +anim_index *IMB_anim_open_index(anim *anim, IMB_Timecode_Type tc) { char filepath[FILE_MAX]; int i = IMB_timecode_to_array_index(tc); @@ -1625,9 +1622,9 @@ struct anim_index *IMB_anim_open_index(struct anim *anim, IMB_Timecode_Type tc) return anim->curr_idx[i]; } -int IMB_anim_index_get_frame_index(struct anim *anim, IMB_Timecode_Type tc, int position) +int IMB_anim_index_get_frame_index(anim *anim, IMB_Timecode_Type tc, int position) { - struct anim_index *idx = IMB_anim_open_index(anim, tc); + anim_index *idx = IMB_anim_open_index(anim, tc); if (!idx) { return position; @@ -1636,7 +1633,7 @@ int IMB_anim_index_get_frame_index(struct anim *anim, IMB_Timecode_Type tc, int return IMB_indexer_get_frame_index(idx, position); } -int IMB_anim_proxy_get_existing(struct anim *anim) +int IMB_anim_proxy_get_existing(anim *anim) { const int num_proxy_sizes = IMB_PROXY_MAX_SLOT; int existing = IMB_PROXY_NONE; diff --git a/source/blender/imbuf/intern/iris.cc b/source/blender/imbuf/intern/iris.cc index 392108a309e..454b649b94c 100644 --- a/source/blender/imbuf/intern/iris.cc +++ b/source/blender/imbuf/intern/iris.cc @@ -201,7 +201,7 @@ static void readtab(MFileOffset *inf, uint *tab, int len) } } -static void test_endian_zbuf(struct ImBuf *ibuf) +static void test_endian_zbuf(ImBuf *ibuf) { int len; int *zval; @@ -238,7 +238,7 @@ bool imb_is_a_iris(const uchar *mem, size_t size) return ((GS(mem) == IMAGIC) || (GSS(mem) == IMAGIC)); } -struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) +ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { uint *base, *lptr = nullptr; float *fbase, *fptr = nullptr; @@ -961,7 +961,7 @@ static int compressrow(const uchar *lbuf, uchar *rlebuf, const int z, const int return optr - (uchar *)rlebuf; } -bool imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_saveiris(ImBuf *ibuf, const char *filepath, int flags) { short zsize; diff --git a/source/blender/imbuf/intern/jp2.cc b/source/blender/imbuf/intern/jp2.cc index a8f3bfed73b..005e9cba498 100644 --- a/source/blender/imbuf/intern/jp2.cc +++ b/source/blender/imbuf/intern/jp2.cc @@ -132,7 +132,7 @@ static void opj_read_from_buffer_free(void * /*p_user_data*/) static OPJ_SIZE_T opj_read_from_buffer(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data) { - struct BufInfo *p_file = static_cast(p_user_data); + BufInfo *p_file = static_cast(p_user_data); OPJ_UINT32 l_nb_read; if (p_file->cur + p_nb_bytes < p_file->buf + p_file->len) { @@ -160,7 +160,7 @@ static OPJ_SIZE_T opj_write_from_buffer(void *p_buffer, OPJ_SIZE_T p_nb_bytes, v static OPJ_OFF_T opj_skip_from_buffer(OPJ_OFF_T p_nb_bytes, void *p_user_data) { - struct BufInfo *p_file = static_cast(p_user_data); + BufInfo *p_file = static_cast(p_user_data); if (p_file->cur + p_nb_bytes < p_file->buf + p_file->len) { p_file->cur += p_nb_bytes; return p_nb_bytes; @@ -171,7 +171,7 @@ static OPJ_OFF_T opj_skip_from_buffer(OPJ_OFF_T p_nb_bytes, void *p_user_data) static OPJ_BOOL opj_seek_from_buffer(OPJ_OFF_T p_nb_bytes, void *p_user_data) { - struct BufInfo *p_file = static_cast(p_user_data); + BufInfo *p_file = static_cast(p_user_data); if (p_nb_bytes < p_file->len) { p_file->cur = p_file->buf + p_nb_bytes; return OPJ_TRUE; @@ -184,7 +184,7 @@ static OPJ_BOOL opj_seek_from_buffer(OPJ_OFF_T p_nb_bytes, void *p_user_data) * Stream wrapper for memory buffer * (would be nice if this was supported by the API). */ -static opj_stream_t *opj_stream_create_from_buffer(struct BufInfo *p_file, +static opj_stream_t *opj_stream_create_from_buffer(BufInfo *p_file, OPJ_UINT32 p_size, OPJ_BOOL p_is_read_stream) { @@ -304,7 +304,7 @@ ImBuf *imb_load_jp2(const uchar *mem, size_t size, int flags, char colorspace[IM { const OPJ_CODEC_FORMAT format = (size > JP2_FILEHEADER_SIZE) ? format_from_header(mem, size) : OPJ_CODEC_UNKNOWN; - struct BufInfo buf_wrapper = {}; + BufInfo buf_wrapper = {}; buf_wrapper.buf = mem; buf_wrapper.cur = mem; buf_wrapper.len = OPJ_OFF_T(size); @@ -347,7 +347,7 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, return nullptr; } - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; bool use_float = false; /* for precision higher than 8 use float */ bool use_alpha = false; @@ -1181,9 +1181,9 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) return image; } -bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int flags); +bool imb_save_jp2_stream(ImBuf *ibuf, opj_stream_t *stream, int flags); -bool imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_jp2(ImBuf *ibuf, const char *filepath, int flags) { opj_stream_t *stream = opj_stream_create_from_file( filepath, OPJ_J2K_STREAM_CHUNK_SIZE, false, nullptr); @@ -1196,7 +1196,7 @@ bool imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags) } /* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */ -bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int /*flags*/) +bool imb_save_jp2_stream(ImBuf *ibuf, opj_stream_t *stream, int /*flags*/) { int quality = ibuf->foptions.quality; diff --git a/source/blender/imbuf/intern/jpeg.cc b/source/blender/imbuf/intern/jpeg.cc index aaadee62462..6687b809a6c 100644 --- a/source/blender/imbuf/intern/jpeg.cc +++ b/source/blender/imbuf/intern/jpeg.cc @@ -41,11 +41,8 @@ static void skip_input_data(j_decompress_ptr cinfo, long num_bytes); static void term_source(j_decompress_ptr cinfo); static void memory_source(j_decompress_ptr cinfo, const uchar *buffer, size_t size); static boolean handle_app1(j_decompress_ptr cinfo); -static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, - int flags, - int max_size, - size_t *r_width, - size_t *r_height); +static ImBuf *ibJpegImageFromCinfo( + jpeg_decompress_struct *cinfo, int flags, int max_size, size_t *r_width, size_t *r_height); static const uchar jpeg_default_quality = 75; static uchar ibuf_quality; @@ -64,7 +61,7 @@ bool imb_is_a_jpeg(const uchar *mem, const size_t size) *---------------------------------------------------------- */ typedef struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ + jpeg_error_mgr pub; /* "public" fields */ jmp_buf setjmp_buffer; /* for return to caller */ } my_error_mgr; @@ -97,7 +94,7 @@ typedef struct { #endif typedef struct { - struct jpeg_source_mgr pub; /* public fields */ + jpeg_source_mgr pub; /* public fields */ const uchar *buffer; int size; @@ -151,7 +148,7 @@ static void memory_source(j_decompress_ptr cinfo, const uchar *buffer, size_t si my_src_ptr src; if (cinfo->src == nullptr) { /* first time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *)(*cinfo->mem->alloc_small)( + cinfo->src = (jpeg_source_mgr *)(*cinfo->mem->alloc_small)( (j_common_ptr)cinfo, JPOOL_PERMANENT, sizeof(my_source_mgr)); } @@ -175,7 +172,7 @@ static void memory_source(j_decompress_ptr cinfo, const uchar *buffer, size_t si } while (0) #define INPUT_VARS(cinfo) \ - struct jpeg_source_mgr *datasrc = (cinfo)->src; \ + jpeg_source_mgr *datasrc = (cinfo)->src; \ const JOCTET *next_input_byte = datasrc->next_input_byte; \ size_t bytes_in_buffer = datasrc->bytes_in_buffer @@ -222,7 +219,7 @@ struct NeoGeo_Word { uchar pad3; uchar quality; }; -BLI_STATIC_ASSERT(sizeof(struct NeoGeo_Word) == 4, "Must be 4 bytes"); +BLI_STATIC_ASSERT(sizeof(NeoGeo_Word) == 4, "Must be 4 bytes"); static boolean handle_app1(j_decompress_ptr cinfo) { @@ -241,7 +238,7 @@ static boolean handle_app1(j_decompress_ptr cinfo) } length = 0; if (STRPREFIX(neogeo, "NeoGeo")) { - struct NeoGeo_Word *neogeo_word = (struct NeoGeo_Word *)(neogeo + 6); + NeoGeo_Word *neogeo_word = (NeoGeo_Word *)(neogeo + 6); ibuf_quality = neogeo_word->quality; } } @@ -252,17 +249,14 @@ static boolean handle_app1(j_decompress_ptr cinfo) return true; } -static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, - int flags, - int max_size, - size_t *r_width, - size_t *r_height) +static ImBuf *ibJpegImageFromCinfo( + jpeg_decompress_struct *cinfo, int flags, int max_size, size_t *r_width, size_t *r_height) { JSAMPARRAY row_pointer; JSAMPLE *buffer = nullptr; int row_stride; int x, y, depth, r, g, b, k; - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; uchar *rect; jpeg_saved_marker_ptr marker; char *str, *key, *value; @@ -449,8 +443,8 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, ImBuf *imb_load_jpeg(const uchar *buffer, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { - struct jpeg_decompress_struct _cinfo, *cinfo = &_cinfo; - struct my_error_mgr jerr; + jpeg_decompress_struct _cinfo, *cinfo = &_cinfo; + my_error_mgr jerr; ImBuf *ibuf; if (!imb_is_a_jpeg(buffer, size)) { @@ -485,15 +479,15 @@ ImBuf *imb_load_jpeg(const uchar *buffer, size_t size, int flags, char colorspac #define JPEG_MARKER_APP1 (0xE1) #define JPEG_APP1_MAX (1 << 16) -struct ImBuf *imb_thumbnail_jpeg(const char *filepath, - const int flags, - const size_t max_thumb_size, - char colorspace[IM_MAX_SPACE], - size_t *r_width, - size_t *r_height) +ImBuf *imb_thumbnail_jpeg(const char *filepath, + const int flags, + const size_t max_thumb_size, + char colorspace[IM_MAX_SPACE], + size_t *r_width, + size_t *r_height) { - struct jpeg_decompress_struct _cinfo, *cinfo = &_cinfo; - struct my_error_mgr jerr; + jpeg_decompress_struct _cinfo, *cinfo = &_cinfo; + my_error_mgr jerr; FILE *infile = nullptr; colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE); @@ -562,19 +556,19 @@ struct ImBuf *imb_thumbnail_jpeg(const char *filepath, #undef JPEG_MARKER_APP1 #undef JPEG_APP1_MAX -static void write_jpeg(struct jpeg_compress_struct *cinfo, struct ImBuf *ibuf) +static void write_jpeg(jpeg_compress_struct *cinfo, ImBuf *ibuf) { JSAMPLE *buffer = nullptr; JSAMPROW row_pointer[1]; uchar *rect; int x, y; char neogeo[128]; - struct NeoGeo_Word *neogeo_word; + NeoGeo_Word *neogeo_word; jpeg_start_compress(cinfo, true); strcpy(neogeo, "NeoGeo"); - neogeo_word = (struct NeoGeo_Word *)(neogeo + 6); + neogeo_word = (NeoGeo_Word *)(neogeo + 6); memset(neogeo_word, 0, sizeof(*neogeo_word)); neogeo_word->quality = ibuf->foptions.quality; jpeg_write_marker(cinfo, 0xe1, (JOCTET *)neogeo, 10); @@ -661,7 +655,7 @@ static void write_jpeg(struct jpeg_compress_struct *cinfo, struct ImBuf *ibuf) MEM_freeN(row_pointer[0]); } -static int init_jpeg(FILE *outfile, struct jpeg_compress_struct *cinfo, struct ImBuf *ibuf) +static int init_jpeg(FILE *outfile, jpeg_compress_struct *cinfo, ImBuf *ibuf) { int quality; @@ -716,11 +710,11 @@ static int init_jpeg(FILE *outfile, struct jpeg_compress_struct *cinfo, struct I return 0; } -static bool save_stdjpeg(const char *filepath, struct ImBuf *ibuf) +static bool save_stdjpeg(const char *filepath, ImBuf *ibuf) { FILE *outfile; - struct jpeg_compress_struct _cinfo, *cinfo = &_cinfo; - struct my_error_mgr jerr; + jpeg_compress_struct _cinfo, *cinfo = &_cinfo; + my_error_mgr jerr; if ((outfile = BLI_fopen(filepath, "wb")) == nullptr) { return 0; @@ -750,7 +744,7 @@ static bool save_stdjpeg(const char *filepath, struct ImBuf *ibuf) return 1; } -bool imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_savejpeg(ImBuf *ibuf, const char *filepath, int flags) { ibuf->flags = flags; diff --git a/source/blender/imbuf/intern/metadata.cc b/source/blender/imbuf/intern/metadata.cc index fc697ee6021..f88954f417b 100644 --- a/source/blender/imbuf/intern/metadata.cc +++ b/source/blender/imbuf/intern/metadata.cc @@ -24,7 +24,7 @@ #include "IMB_metadata.h" -void IMB_metadata_ensure(struct IDProperty **metadata) +void IMB_metadata_ensure(IDProperty **metadata) { if (*metadata != nullptr) { return; @@ -34,7 +34,7 @@ void IMB_metadata_ensure(struct IDProperty **metadata) *metadata = IDP_New(IDP_GROUP, &val, "metadata"); } -void IMB_metadata_free(struct IDProperty *metadata) +void IMB_metadata_free(IDProperty *metadata) { if (metadata == nullptr) { return; @@ -43,7 +43,7 @@ void IMB_metadata_free(struct IDProperty *metadata) IDP_FreeProperty(metadata); } -bool IMB_metadata_get_field(struct IDProperty *metadata, +bool IMB_metadata_get_field(IDProperty *metadata, const char *key, char *value, const size_t value_maxncpy) @@ -63,7 +63,7 @@ bool IMB_metadata_get_field(struct IDProperty *metadata, return false; } -void IMB_metadata_copy(struct ImBuf *dimb, struct ImBuf *simb) +void IMB_metadata_copy(ImBuf *dimb, ImBuf *simb) { BLI_assert(dimb != simb); if (simb->metadata) { @@ -72,7 +72,7 @@ void IMB_metadata_copy(struct ImBuf *dimb, struct ImBuf *simb) } } -void IMB_metadata_set_field(struct IDProperty *metadata, const char *key, const char *value) +void IMB_metadata_set_field(IDProperty *metadata, const char *key, const char *value) { BLI_assert(metadata); IDProperty *prop = IDP_GetPropertyFromGroup(metadata, key); @@ -91,7 +91,7 @@ void IMB_metadata_set_field(struct IDProperty *metadata, const char *key, const } } -void IMB_metadata_foreach(struct ImBuf *ibuf, IMBMetadataForeachCb callback, void *userdata) +void IMB_metadata_foreach(ImBuf *ibuf, IMBMetadataForeachCb callback, void *userdata) { if (ibuf->metadata == nullptr) { return; diff --git a/source/blender/imbuf/intern/moviecache.cc b/source/blender/imbuf/intern/moviecache.cc index bd6232100b1..fd0f708e732 100644 --- a/source/blender/imbuf/intern/moviecache.cc +++ b/source/blender/imbuf/intern/moviecache.cc @@ -56,9 +56,9 @@ struct MovieCache { MovieCacheGetItemPriorityFP getitempriorityfp; MovieCachePriorityDeleterFP prioritydeleterfp; - struct BLI_mempool *keys_pool; - struct BLI_mempool *items_pool; - struct BLI_mempool *userkeys_pool; + BLI_mempool *keys_pool; + BLI_mempool *items_pool; + BLI_mempool *userkeys_pool; int keysize; @@ -295,7 +295,7 @@ void IMB_moviecache_set_getdata_callback(MovieCache *cache, MovieCacheGetKeyData cache->getdatafp = getdatafp; } -void IMB_moviecache_set_priority_callback(struct MovieCache *cache, +void IMB_moviecache_set_priority_callback(MovieCache *cache, MovieCacheGetPriorityDataFP getprioritydatafp, MovieCacheGetItemPriorityFP getitempriorityfp, MovieCachePriorityDeleterFP prioritydeleterfp) @@ -573,38 +573,38 @@ void IMB_moviecache_get_cache_segments( } } -struct MovieCacheIter *IMB_moviecacheIter_new(MovieCache *cache) +MovieCacheIter *IMB_moviecacheIter_new(MovieCache *cache) { GHashIterator *iter; check_unused_keys(cache); iter = BLI_ghashIterator_new(cache->hash); - return (struct MovieCacheIter *)iter; + return (MovieCacheIter *)iter; } -void IMB_moviecacheIter_free(struct MovieCacheIter *iter) +void IMB_moviecacheIter_free(MovieCacheIter *iter) { BLI_ghashIterator_free((GHashIterator *)iter); } -bool IMB_moviecacheIter_done(struct MovieCacheIter *iter) +bool IMB_moviecacheIter_done(MovieCacheIter *iter) { return BLI_ghashIterator_done((GHashIterator *)iter); } -void IMB_moviecacheIter_step(struct MovieCacheIter *iter) +void IMB_moviecacheIter_step(MovieCacheIter *iter) { BLI_ghashIterator_step((GHashIterator *)iter); } -ImBuf *IMB_moviecacheIter_getImBuf(struct MovieCacheIter *iter) +ImBuf *IMB_moviecacheIter_getImBuf(MovieCacheIter *iter) { MovieCacheItem *item = (MovieCacheItem *)BLI_ghashIterator_getValue((GHashIterator *)iter); return item->ibuf; } -void *IMB_moviecacheIter_getUserKey(struct MovieCacheIter *iter) +void *IMB_moviecacheIter_getUserKey(MovieCacheIter *iter) { MovieCacheKey *key = (MovieCacheKey *)BLI_ghashIterator_getKey((GHashIterator *)iter); return key->userkey; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index eb2226d0f75..375545201cb 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -431,7 +431,7 @@ static void openexr_header_compression(Header *header, int compression) } } -static void openexr_header_metadata(Header *header, struct ImBuf *ibuf) +static void openexr_header_metadata(Header *header, ImBuf *ibuf) { if (ibuf->metadata) { IDProperty *prop; @@ -654,7 +654,7 @@ static bool imb_save_openexr_float(ImBuf *ibuf, const char *filepath, const int return true; } -bool imb_save_openexr(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_openexr(ImBuf *ibuf, const char *filepath, int flags) { if (flags & IB_mem) { imb_addencodedbufferImBuf(ibuf); @@ -685,7 +685,7 @@ bool imb_save_openexr(struct ImBuf *ibuf, const char *filepath, int flags) static ListBase exrhandles = {nullptr, nullptr}; struct ExrHandle { - struct ExrHandle *next, *prev; + ExrHandle *next, *prev; char name[FILE_MAX]; IStream *ifile_stream; @@ -714,10 +714,10 @@ struct ExrHandle { /* flattened out channel */ struct ExrChannel { - struct ExrChannel *next, *prev; + ExrChannel *next, *prev; char name[EXR_TOT_MAXNAME + 1]; /* full name with everything */ - struct MultiViewChannelName *m; /* struct to store all multipart channel info */ + MultiViewChannelName *m; /* struct to store all multipart channel info */ int xstride, ystride; /* step to next pixel, to next scan-line. */ float *rect; /* first pointer to write in */ char chan_id; /* quick lookup of channel char */ @@ -727,11 +727,11 @@ struct ExrChannel { /* hierarchical; layers -> passes -> channels[] */ struct ExrPass { - struct ExrPass *next, *prev; + ExrPass *next, *prev; char name[EXR_PASS_MAXNAME]; int totchan; float *rect; - struct ExrChannel *chan[EXR_PASS_MAXCHAN]; + ExrChannel *chan[EXR_PASS_MAXCHAN]; char chan_id[EXR_PASS_MAXCHAN]; char internal_name[EXR_PASS_MAXNAME]; /* name with no view */ @@ -740,7 +740,7 @@ struct ExrPass { }; struct ExrLayer { - struct ExrLayer *next, *prev; + ExrLayer *next, *prev; char name[EXR_LAY_MAXNAME + 1]; ListBase passes; }; @@ -1994,12 +1994,9 @@ bool IMB_exr_has_multilayer(void *handle) return imb_exr_is_multi(*data->ifile); } -struct ImBuf *imb_load_openexr(const uchar *mem, - size_t size, - int flags, - char colorspace[IM_MAX_SPACE]) +ImBuf *imb_load_openexr(const uchar *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { - struct ImBuf *ibuf = nullptr; + ImBuf *ibuf = nullptr; IMemStream *membuf = nullptr; MultiPartInputFile *file = nullptr; @@ -2202,12 +2199,12 @@ struct ImBuf *imb_load_openexr(const uchar *mem, } } -struct ImBuf *imb_load_filepath_thumbnail_openexr(const char *filepath, - const int /*flags*/, - const size_t max_thumb_size, - char colorspace[], - size_t *r_width, - size_t *r_height) +ImBuf *imb_load_filepath_thumbnail_openexr(const char *filepath, + const int /*flags*/, + const size_t max_thumb_size, + char colorspace[], + size_t *r_width, + size_t *r_height) { IStream *stream = nullptr; Imf::RgbaInputFile *file = nullptr; @@ -2262,7 +2259,7 @@ struct ImBuf *imb_load_filepath_thumbnail_openexr(const char *filepath, int dest_w = MAX2(int(source_w * scale_factor), 1); int dest_h = MAX2(int(source_h * scale_factor), 1); - struct ImBuf *ibuf = IMB_allocImBuf(dest_w, dest_h, 32, IB_rectfloat); + ImBuf *ibuf = IMB_allocImBuf(dest_w, dest_h, 32, IB_rectfloat); /* A single row of source pixels. */ Imf::Array pixels(source_w); diff --git a/source/blender/imbuf/intern/readimage.cc b/source/blender/imbuf/intern/readimage.cc index c586b0ce3f5..e4adf6e7819 100644 --- a/source/blender/imbuf/intern/readimage.cc +++ b/source/blender/imbuf/intern/readimage.cc @@ -169,9 +169,9 @@ ImBuf *IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_S return ibuf; } -struct ImBuf *IMB_thumb_load_image(const char *filepath, - size_t max_thumb_size, - char colorspace[IM_MAX_SPACE]) +ImBuf *IMB_thumb_load_image(const char *filepath, + size_t max_thumb_size, + char colorspace[IM_MAX_SPACE]) { const ImFileType *type = IMB_file_type_from_ftype(IMB_ispic_type(filepath)); if (type == nullptr) { diff --git a/source/blender/imbuf/intern/rectop.cc b/source/blender/imbuf/intern/rectop.cc index 1ca1be07d15..3425e859f41 100644 --- a/source/blender/imbuf/intern/rectop.cc +++ b/source/blender/imbuf/intern/rectop.cc @@ -1134,7 +1134,7 @@ void buf_rectfill_area(uchar *rect, int width, int height, const float col[4], - struct ColorManagedDisplay *display, + ColorManagedDisplay *display, int x1, int y1, int x2, @@ -1240,13 +1240,8 @@ void buf_rectfill_area(uchar *rect, } } -void IMB_rectfill_area(ImBuf *ibuf, - const float col[4], - int x1, - int y1, - int x2, - int y2, - struct ColorManagedDisplay *display) +void IMB_rectfill_area( + ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2, ColorManagedDisplay *display) { if (!ibuf) { return; diff --git a/source/blender/imbuf/intern/rotate.cc b/source/blender/imbuf/intern/rotate.cc index 52ccf6c853f..9132ec3c0b6 100644 --- a/source/blender/imbuf/intern/rotate.cc +++ b/source/blender/imbuf/intern/rotate.cc @@ -14,7 +14,7 @@ #include "IMB_imbuf_types.h" #include "imbuf.h" -void IMB_flipy(struct ImBuf *ibuf) +void IMB_flipy(ImBuf *ibuf) { size_t x_size, y_size; @@ -73,7 +73,7 @@ void IMB_flipy(struct ImBuf *ibuf) } } -void IMB_flipx(struct ImBuf *ibuf) +void IMB_flipx(ImBuf *ibuf) { int x, y, xr, xl, yi; float px_f[4]; diff --git a/source/blender/imbuf/intern/scaling.cc b/source/blender/imbuf/intern/scaling.cc index 6fef78a9cf5..27d26c04b18 100644 --- a/source/blender/imbuf/intern/scaling.cc +++ b/source/blender/imbuf/intern/scaling.cc @@ -21,7 +21,7 @@ #include "BLI_sys_types.h" /* for intptr_t support */ -static void imb_half_x_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1) +static void imb_half_x_no_alloc(ImBuf *ibuf2, ImBuf *ibuf1) { uchar *p1, *_p1, *dest; short a, r, g, b; @@ -80,9 +80,9 @@ static void imb_half_x_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1) } } -struct ImBuf *IMB_half_x(struct ImBuf *ibuf1) +ImBuf *IMB_half_x(ImBuf *ibuf1) { - struct ImBuf *ibuf2; + ImBuf *ibuf2; if (ibuf1 == nullptr) { return nullptr; @@ -105,9 +105,9 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1) return ibuf2; } -struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1) +ImBuf *IMB_double_fast_x(ImBuf *ibuf1) { - struct ImBuf *ibuf2; + ImBuf *ibuf2; int *p1, *dest, i, col, do_rect, do_float; float *p1f, *destf; @@ -150,9 +150,9 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1) return ibuf2; } -struct ImBuf *IMB_double_x(struct ImBuf *ibuf1) +ImBuf *IMB_double_x(ImBuf *ibuf1) { - struct ImBuf *ibuf2; + ImBuf *ibuf2; if (ibuf1 == nullptr) { return nullptr; @@ -167,7 +167,7 @@ struct ImBuf *IMB_double_x(struct ImBuf *ibuf1) return ibuf2; } -static void imb_half_y_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1) +static void imb_half_y_no_alloc(ImBuf *ibuf2, ImBuf *ibuf1) { uchar *p1, *p2, *_p1, *dest; short a, r, g, b; @@ -234,9 +234,9 @@ static void imb_half_y_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1) } } -struct ImBuf *IMB_half_y(struct ImBuf *ibuf1) +ImBuf *IMB_half_y(ImBuf *ibuf1) { - struct ImBuf *ibuf2; + ImBuf *ibuf2; if (ibuf1 == nullptr) { return nullptr; @@ -259,9 +259,9 @@ struct ImBuf *IMB_half_y(struct ImBuf *ibuf1) return ibuf2; } -struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1) +ImBuf *IMB_double_fast_y(ImBuf *ibuf1) { - struct ImBuf *ibuf2; + ImBuf *ibuf2; int *p1, *dest1, *dest2; float *p1f, *dest1f, *dest2f; int x, y; @@ -306,9 +306,9 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1) return ibuf2; } -struct ImBuf *IMB_double_y(struct ImBuf *ibuf1) +ImBuf *IMB_double_y(ImBuf *ibuf1) { - struct ImBuf *ibuf2; + ImBuf *ibuf2; if (ibuf1 == nullptr) { return nullptr; @@ -354,7 +354,7 @@ MINLINE void premul_ushort_to_straight_uchar(uchar *result, const ushort color[4 } } -void imb_onehalf_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1) +void imb_onehalf_no_alloc(ImBuf *ibuf2, ImBuf *ibuf1) { int x, y; const bool do_rect = (ibuf1->byte_buffer.data != nullptr); @@ -432,9 +432,9 @@ void imb_onehalf_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1) } } -ImBuf *IMB_onehalf(struct ImBuf *ibuf1) +ImBuf *IMB_onehalf(ImBuf *ibuf1) { - struct ImBuf *ibuf2; + ImBuf *ibuf2; if (ibuf1 == nullptr) { return nullptr; @@ -536,13 +536,13 @@ static void shrink_picture_byte( intptr_t y_counter; uchar *dst_begin = dst; - struct scale_outpix_byte *dst_line1 = nullptr; - struct scale_outpix_byte *dst_line2 = nullptr; + scale_outpix_byte *dst_line1 = nullptr; + scale_outpix_byte *dst_line2 = nullptr; - dst_line1 = (struct scale_outpix_byte *)MEM_callocN( - (dst_width + 1) * sizeof(struct scale_outpix_byte), "shrink_picture_byte 1"); - dst_line2 = (struct scale_outpix_byte *)MEM_callocN( - (dst_width + 1) * sizeof(struct scale_outpix_byte), "shrink_picture_byte 2"); + dst_line1 = (scale_outpix_byte *)MEM_callocN((dst_width + 1) * sizeof(scale_outpix_byte), + "shrink_picture_byte 1"); + dst_line2 = (scale_outpix_byte *)MEM_callocN((dst_width + 1) * sizeof(scale_outpix_byte), + "shrink_picture_byte 2"); dx_dst = 65536.0 * ratiox; dy_dst = 65536.0 * ratioy; @@ -605,7 +605,7 @@ static void shrink_picture_byte( if (y_counter < 0) { int val; uintptr_t x; - struct scale_outpix_byte *temp; + scale_outpix_byte *temp; y_counter += 65536; @@ -616,7 +616,7 @@ static void shrink_picture_byte( *dst++ = (val = (dst_line1[x].b * f) >> 15) > 255 ? 255 : val; *dst++ = (val = (dst_line1[x].a * f) >> 15) > 255 ? 255 : val; } - memset(dst_line1, 0, dst_width * sizeof(struct scale_outpix_byte)); + memset(dst_line1, 0, dst_width * sizeof(scale_outpix_byte)); temp = dst_line1; dst_line1 = dst_line2; dst_line2 = temp; @@ -722,13 +722,13 @@ static void shrink_picture_float( float y_counter; const float *dst_begin = dst; - struct scale_outpix_float *dst_line1; - struct scale_outpix_float *dst_line2; + scale_outpix_float *dst_line1; + scale_outpix_float *dst_line2; - dst_line1 = (struct scale_outpix_float *)MEM_callocN( - (dst_width + 1) * sizeof(struct scale_outpix_float), "shrink_picture_float 1"); - dst_line2 = (struct scale_outpix_float *)MEM_callocN( - (dst_width + 1) * sizeof(struct scale_outpix_float), "shrink_picture_float 2"); + dst_line1 = (scale_outpix_float *)MEM_callocN((dst_width + 1) * sizeof(scale_outpix_float), + "shrink_picture_float 1"); + dst_line2 = (scale_outpix_float *)MEM_callocN((dst_width + 1) * sizeof(scale_outpix_float), + "shrink_picture_float 2"); dx_dst = ratiox; dy_dst = ratioy; @@ -788,7 +788,7 @@ static void shrink_picture_float( y_counter -= dy_dst; if (y_counter < 0) { uintptr_t x; - struct scale_outpix_float *temp; + scale_outpix_float *temp; y_counter += 1.0f; @@ -799,7 +799,7 @@ static void shrink_picture_float( *dst++ = dst_line1[x].b * f; *dst++ = dst_line1[x].a * f; } - memset(dst_line1, 0, dst_width * sizeof(struct scale_outpix_float)); + memset(dst_line1, 0, dst_width * sizeof(scale_outpix_float)); temp = dst_line1; dst_line1 = dst_line2; dst_line2 = temp; @@ -851,7 +851,7 @@ static void q_scale_float( * * NOTE: disabled, due to unacceptable inaccuracy and quality loss, see bug #18609 (ton) */ -static bool q_scale_linear_interpolation(struct ImBuf *ibuf, int newx, int newy) +static bool q_scale_linear_interpolation(ImBuf *ibuf, int newx, int newy) { if ((newx >= ibuf->x && newy <= ibuf->y) || (newx <= ibuf->x && newy >= ibuf->y)) { return false; @@ -877,7 +877,7 @@ static bool q_scale_linear_interpolation(struct ImBuf *ibuf, int newx, int newy) return true; } -static ImBuf *scaledownx(struct ImBuf *ibuf, int newx) +static ImBuf *scaledownx(ImBuf *ibuf, int newx) { const bool do_rect = (ibuf->byte_buffer.data != nullptr); const bool do_float = (ibuf->float_buffer.data != nullptr); @@ -1020,7 +1020,7 @@ static ImBuf *scaledownx(struct ImBuf *ibuf, int newx) return ibuf; } -static ImBuf *scaledowny(struct ImBuf *ibuf, int newy) +static ImBuf *scaledowny(ImBuf *ibuf, int newy) { const bool do_rect = (ibuf->byte_buffer.data != nullptr); const bool do_float = (ibuf->float_buffer.data != nullptr); @@ -1164,7 +1164,7 @@ static ImBuf *scaledowny(struct ImBuf *ibuf, int newy) return ibuf; } -static ImBuf *scaleupx(struct ImBuf *ibuf, int newx) +static ImBuf *scaleupx(ImBuf *ibuf, int newx) { uchar *rect, *_newrect = nullptr, *newrect; float *rectf, *_newrectf = nullptr, *newrectf; @@ -1364,7 +1364,7 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx) return ibuf; } -static ImBuf *scaleupy(struct ImBuf *ibuf, int newy) +static ImBuf *scaleupy(ImBuf *ibuf, int newy) { uchar *rect, *_newrect = nullptr, *newrect; float *rectf, *_newrectf = nullptr, *newrectf; @@ -1629,7 +1629,7 @@ static void scalefast_Z_ImBuf(ImBuf *ibuf, int newx, int newy) } } -bool IMB_scaleImBuf(struct ImBuf *ibuf, uint newx, uint newy) +bool IMB_scaleImBuf(ImBuf *ibuf, uint newx, uint newy) { BLI_assert_msg(newx > 0 && newy > 0, "Images must be at least 1 on both dimensions!"); @@ -1674,12 +1674,12 @@ struct imbufRGBA { float r, g, b, a; }; -bool IMB_scalefastImBuf(struct ImBuf *ibuf, uint newx, uint newy) +bool IMB_scalefastImBuf(ImBuf *ibuf, uint newx, uint newy) { BLI_assert_msg(newx > 0 && newy > 0, "Images must be at least 1 on both dimensions!"); uint *rect, *_newrect, *newrect; - struct imbufRGBA *rectf, *_newrectf, *newrectf; + imbufRGBA *rectf, *_newrectf, *newrectf; int x, y; bool do_float = false, do_rect = false; size_t ofsx, ofsy, stepx, stepy; @@ -1744,7 +1744,7 @@ bool IMB_scalefastImBuf(struct ImBuf *ibuf, uint newx, uint newy) } if (do_float) { - rectf = (struct imbufRGBA *)ibuf->float_buffer.data; + rectf = (imbufRGBA *)ibuf->float_buffer.data; rectf += (ofsy >> 16) * ibuf->x; ofsx = 32768; diff --git a/source/blender/imbuf/intern/stereoimbuf.cc b/source/blender/imbuf/intern/stereoimbuf.cc index 1cd27ce089e..424c80457fc 100644 --- a/source/blender/imbuf/intern/stereoimbuf.cc +++ b/source/blender/imbuf/intern/stereoimbuf.cc @@ -29,10 +29,8 @@ /* prototypes */ struct Stereo3DData; -static void imb_stereo3d_write_doit(struct Stereo3DData *s3d_data, - const struct Stereo3dFormat *s3d); -static void imb_stereo3d_read_doit(struct Stereo3DData *s3d_data, - const struct Stereo3dFormat *s3d); +static void imb_stereo3d_write_doit(Stereo3DData *s3d_data, const Stereo3dFormat *s3d); +static void imb_stereo3d_read_doit(Stereo3DData *s3d_data, const Stereo3dFormat *s3d); typedef struct Stereo3DData { struct { diff --git a/source/blender/imbuf/intern/thumbs.cc b/source/blender/imbuf/intern/thumbs.cc index 88a164eca5e..d599a4a9fb7 100644 --- a/source/blender/imbuf/intern/thumbs.cc +++ b/source/blender/imbuf/intern/thumbs.cc @@ -369,7 +369,7 @@ static ImBuf *thumb_create_ex(const char *file_path, } } else if (THB_SOURCE_MOVIE == source) { - struct anim *anim = nullptr; + anim *anim = nullptr; anim = IMB_open_anim(file_path, IB_rect | IB_metadata, 0, nullptr); if (anim != nullptr) { img = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE); diff --git a/source/blender/imbuf/intern/thumbs_blend.cc b/source/blender/imbuf/intern/thumbs_blend.cc index 0b447c2cf13..e3b19e2f17c 100644 --- a/source/blender/imbuf/intern/thumbs_blend.cc +++ b/source/blender/imbuf/intern/thumbs_blend.cc @@ -40,7 +40,7 @@ static ImBuf *imb_thumb_load_from_blend_id(const char *blen_path, BlendFileReadReport bf_reports = {}; bf_reports.reports = nullptr; - struct BlendHandle *libfiledata = BLO_blendhandle_from_file(blen_path, &bf_reports); + BlendHandle *libfiledata = BLO_blendhandle_from_file(blen_path, &bf_reports); if (libfiledata == nullptr) { return nullptr; } diff --git a/source/blender/imbuf/intern/thumbs_font.cc b/source/blender/imbuf/intern/thumbs_font.cc index c22cc711863..1e67f21998a 100644 --- a/source/blender/imbuf/intern/thumbs_font.cc +++ b/source/blender/imbuf/intern/thumbs_font.cc @@ -21,9 +21,9 @@ /* Only change if we need to update the previews in the on-disk cache. */ #define FONT_THUMB_VERSION "1.0.1" -struct ImBuf *IMB_thumb_load_font(const char *filename, uint x, uint y) +ImBuf *IMB_thumb_load_font(const char *filename, uint x, uint y) { - struct ImBuf *ibuf = IMB_allocImBuf(x, y, 32, IB_rect | IB_metadata); + ImBuf *ibuf = IMB_allocImBuf(x, y, 32, IB_rect | IB_metadata); /* fill with white and zero alpha */ const float col[4] = {1.0f, 1.0f, 1.0f, 0.0f}; diff --git a/source/blender/imbuf/intern/transform.cc b/source/blender/imbuf/intern/transform.cc index 4f5cb466d53..3fe11b01e82 100644 --- a/source/blender/imbuf/intern/transform.cc +++ b/source/blender/imbuf/intern/transform.cc @@ -726,13 +726,13 @@ extern "C" { using namespace blender::imbuf::transform; -void IMB_transform(const struct ImBuf *src, - struct ImBuf *dst, +void IMB_transform(const ImBuf *src, + ImBuf *dst, const eIMBTransformMode mode, const eIMBInterpolationFilterMode filter, const int num_subsamples, const float transform_matrix[4][4], - const struct rctf *src_crop) + const rctf *src_crop) { BLI_assert_msg(mode != IMB_TRANSFORM_MODE_CROP_SRC || src_crop != nullptr, "No source crop rect given, but crop source is requested. Or source crop rect " diff --git a/source/blender/imbuf/intern/webp.cc b/source/blender/imbuf/intern/webp.cc index 9ab66e4f3f7..2891ffe444b 100644 --- a/source/blender/imbuf/intern/webp.cc +++ b/source/blender/imbuf/intern/webp.cc @@ -76,12 +76,12 @@ ImBuf *imb_loadwebp(const uchar *mem, size_t size, int flags, char colorspace[IM return ibuf; } -struct ImBuf *imb_load_filepath_thumbnail_webp(const char *filepath, - const int /*flags*/, - const size_t max_thumb_size, - char colorspace[], - size_t *r_width, - size_t *r_height) +ImBuf *imb_load_filepath_thumbnail_webp(const char *filepath, + const int /*flags*/, + const size_t max_thumb_size, + char colorspace[], + size_t *r_width, + size_t *r_height) { const int file = BLI_open(filepath, O_BINARY | O_RDONLY, 0); if (file == -1) { @@ -120,7 +120,7 @@ struct ImBuf *imb_load_filepath_thumbnail_webp(const char *filepath, const int dest_h = MAX2(int(config.input.height * scale), 1); colorspace_set_default_role(colorspace, IM_MAX_SPACE, COLOR_ROLE_DEFAULT_BYTE); - struct ImBuf *ibuf = IMB_allocImBuf(dest_w, dest_h, 32, IB_rect); + ImBuf *ibuf = IMB_allocImBuf(dest_w, dest_h, 32, IB_rect); if (ibuf == nullptr) { fprintf(stderr, "WebP: Failed to allocate image memory\n"); imb_mmap_lock(); @@ -160,7 +160,7 @@ struct ImBuf *imb_load_filepath_thumbnail_webp(const char *filepath, return ibuf; } -bool imb_savewebp(struct ImBuf *ibuf, const char *filepath, int /*flags*/) +bool imb_savewebp(ImBuf *ibuf, const char *filepath, int /*flags*/) { const int bytesperpixel = (ibuf->planes + 7) >> 3; uchar *encoded_data, *last_row; diff --git a/source/blender/imbuf/intern/writeimage.cc b/source/blender/imbuf/intern/writeimage.cc index 828b71416b7..45cf6bae382 100644 --- a/source/blender/imbuf/intern/writeimage.cc +++ b/source/blender/imbuf/intern/writeimage.cc @@ -20,7 +20,7 @@ #include "IMB_colormanagement.h" #include "IMB_colormanagement_intern.h" -bool IMB_saveiff(struct ImBuf *ibuf, const char *filepath, int flags) +bool IMB_saveiff(ImBuf *ibuf, const char *filepath, int flags) { errno = 0; diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc index e7797f6e856..d9b72f73a80 100644 --- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc +++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc @@ -60,19 +60,19 @@ namespace blender::io::alembic { /* NOTE: Alembic's polygon winding order is clockwise, to match with Renderman. */ -static void get_vertices(struct Mesh *mesh, std::vector &points); -static void get_topology(struct Mesh *mesh, +static void get_vertices(Mesh *mesh, std::vector &points); +static void get_topology(Mesh *mesh, std::vector &poly_verts, std::vector &loop_counts, bool &r_has_flat_shaded_poly); -static void get_edge_creases(struct Mesh *mesh, +static void get_edge_creases(Mesh *mesh, std::vector &indices, std::vector &lengths, std::vector &sharpnesses); -static void get_vert_creases(struct Mesh *mesh, +static void get_vert_creases(Mesh *mesh, std::vector &indices, std::vector &sharpnesses); -static void get_loop_normals(struct Mesh *mesh, +static void get_loop_normals(Mesh *mesh, std::vector &normals, bool has_flat_shaded_poly); @@ -276,7 +276,7 @@ void ABCGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh) write_arb_geo_params(mesh); } -void ABCGenericMeshWriter::write_subd(HierarchyContext &context, struct Mesh *mesh) +void ABCGenericMeshWriter::write_subd(HierarchyContext &context, Mesh *mesh) { std::vector edge_crease_sharpness, vert_crease_sharpness; std::vector points; @@ -337,7 +337,7 @@ void ABCGenericMeshWriter::write_subd(HierarchyContext &context, struct Mesh *me } template -void ABCGenericMeshWriter::write_face_sets(Object *object, struct Mesh *mesh, Schema &schema) +void ABCGenericMeshWriter::write_face_sets(Object *object, Mesh *mesh, Schema &schema) { std::map> geo_groups; get_geo_groups(object, mesh, geo_groups); @@ -351,7 +351,7 @@ void ABCGenericMeshWriter::write_face_sets(Object *object, struct Mesh *mesh, Sc } } -void ABCGenericMeshWriter::write_arb_geo_params(struct Mesh *me) +void ABCGenericMeshWriter::write_arb_geo_params(Mesh *me) { if (!args_.export_params->vcolors) { return; @@ -367,7 +367,7 @@ void ABCGenericMeshWriter::write_arb_geo_params(struct Mesh *me) write_custom_data(arb_geom_params, m_custom_data_config, &me->ldata, CD_PROP_BYTE_COLOR); } -bool ABCGenericMeshWriter::get_velocities(struct Mesh *mesh, std::vector &vels) +bool ABCGenericMeshWriter::get_velocities(Mesh *mesh, std::vector &vels) { /* Export velocity attribute output by fluid sim, sequence cache modifier * and geometry nodes. */ @@ -392,7 +392,7 @@ bool ABCGenericMeshWriter::get_velocities(struct Mesh *mesh, std::vector> &geo_groups) { const bke::AttributeAccessor attributes = mesh->attributes(); @@ -435,7 +435,7 @@ void ABCGenericMeshWriter::get_geo_groups(Object *object, /* NOTE: Alembic's polygon winding order is clockwise, to match with Renderman. */ -static void get_vertices(struct Mesh *mesh, std::vector &points) +static void get_vertices(Mesh *mesh, std::vector &points) { points.clear(); points.resize(mesh->totvert); @@ -446,7 +446,7 @@ static void get_vertices(struct Mesh *mesh, std::vector &points) } } -static void get_topology(struct Mesh *mesh, +static void get_topology(Mesh *mesh, std::vector &poly_verts, std::vector &loop_counts, bool &r_has_flat_shaded_poly) @@ -480,7 +480,7 @@ static void get_topology(struct Mesh *mesh, } } -static void get_edge_creases(struct Mesh *mesh, +static void get_edge_creases(Mesh *mesh, std::vector &indices, std::vector &lengths, std::vector &sharpnesses) @@ -507,7 +507,7 @@ static void get_edge_creases(struct Mesh *mesh, lengths.resize(sharpnesses.size(), 2); } -static void get_vert_creases(struct Mesh *mesh, +static void get_vert_creases(Mesh *mesh, std::vector &indices, std::vector &sharpnesses) { @@ -530,7 +530,7 @@ static void get_vert_creases(struct Mesh *mesh, } } -static void get_loop_normals(struct Mesh *mesh, +static void get_loop_normals(Mesh *mesh, std::vector &normals, bool has_flat_shaded_poly) { diff --git a/source/blender/io/alembic/intern/abc_reader_archive.cc b/source/blender/io/alembic/intern/abc_reader_archive.cc index 17c40f907e8..3644d332683 100644 --- a/source/blender/io/alembic/intern/abc_reader_archive.cc +++ b/source/blender/io/alembic/intern/abc_reader_archive.cc @@ -63,7 +63,7 @@ static IArchive open_archive(const std::string &filename, return IArchive(); } -ArchiveReader *ArchiveReader::get(struct Main *bmain, const std::vector &filenames) +ArchiveReader *ArchiveReader::get(Main *bmain, const std::vector &filenames) { std::vector readers; @@ -103,7 +103,7 @@ ArchiveReader::ArchiveReader(const std::vector &readers) : m_re m_archive = IArchive(arPtr, kWrapExisting, ErrorHandler::kThrowPolicy); } -ArchiveReader::ArchiveReader(struct Main *bmain, const char *filename) +ArchiveReader::ArchiveReader(Main *bmain, const char *filename) { char abs_filepath[FILE_MAX]; STRNCPY(abs_filepath, filename); diff --git a/source/blender/io/alembic/intern/abc_reader_object.cc b/source/blender/io/alembic/intern/abc_reader_object.cc index 81f1fcba550..784a835e412 100644 --- a/source/blender/io/alembic/intern/abc_reader_object.cc +++ b/source/blender/io/alembic/intern/abc_reader_object.cc @@ -134,12 +134,12 @@ Imath::M44d get_matrix(const IXformSchema &schema, const chrono_t time) return s0.getMatrix(); } -struct Mesh *AbcObjectReader::read_mesh(struct Mesh *existing_mesh, - const Alembic::Abc::ISampleSelector & /*sample_sel*/, - int /*read_flag*/, - const char * /*velocity_name*/, - const float /*velocity_scale*/, - const char ** /*err_str*/) +Mesh *AbcObjectReader::read_mesh(Mesh *existing_mesh, + const Alembic::Abc::ISampleSelector & /*sample_sel*/, + int /*read_flag*/, + const char * /*velocity_name*/, + const float /*velocity_scale*/, + const char ** /*err_str*/) { return existing_mesh; } diff --git a/source/blender/io/alembic/intern/abc_reader_points.cc b/source/blender/io/alembic/intern/abc_reader_points.cc index 92b065fec6d..9775ca89861 100644 --- a/source/blender/io/alembic/intern/abc_reader_points.cc +++ b/source/blender/io/alembic/intern/abc_reader_points.cc @@ -109,12 +109,12 @@ void read_points_sample(const IPointsSchema &schema, read_mverts(*config.mesh, positions, vnormals); } -struct Mesh *AbcPointsReader::read_mesh(struct Mesh *existing_mesh, - const ISampleSelector &sample_sel, - int read_flag, - const char * /*velocity_name*/, - const float /*velocity_scale*/, - const char **err_str) +Mesh *AbcPointsReader::read_mesh(Mesh *existing_mesh, + const ISampleSelector &sample_sel, + int read_flag, + const char * /*velocity_name*/, + const float /*velocity_scale*/, + const char **err_str) { IPointsSchema::Sample sample; try { diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc index b925e303d47..e5726c81533 100644 --- a/source/blender/io/alembic/intern/alembic_capi.cc +++ b/source/blender/io/alembic/intern/alembic_capi.cc @@ -152,7 +152,7 @@ static bool gather_objects_paths(const IObject &object, ListBase *object_paths) return parent_is_part_of_this_object; } -CacheArchiveHandle *ABC_create_handle(struct Main *bmain, +CacheArchiveHandle *ABC_create_handle(Main *bmain, const char *filename, const CacheFileLayer *layers, ListBase *object_paths) diff --git a/source/blender/io/collada/DocumentExporter.cpp b/source/blender/io/collada/DocumentExporter.cpp index be46f6c3f16..6f50cb610fc 100644 --- a/source/blender/io/collada/DocumentExporter.cpp +++ b/source/blender/io/collada/DocumentExporter.cpp @@ -109,9 +109,7 @@ extern "C" char build_hash[]; #include -const char *bc_CustomData_get_layer_name(const struct CustomData *data, - const eCustomDataType type, - int n) +const char *bc_CustomData_get_layer_name(const CustomData *data, const eCustomDataType type, int n) { int layer_index = CustomData_get_layer_index(data, type); if (layer_index < 0) { diff --git a/source/blender/io/common/intern/orientation.c b/source/blender/io/common/intern/orientation.c index 22018dd0472..4898bc719c1 100644 --- a/source/blender/io/common/intern/orientation.c +++ b/source/blender/io/common/intern/orientation.c @@ -18,9 +18,7 @@ const EnumPropertyItem io_transform_axis[] = { {IO_AXIS_NEGATIVE_Z, "NEGATIVE_Z", 0, "-Z", "Negative Z axis"}, {0, NULL, 0, NULL, NULL}}; -void io_ui_forward_axis_update(struct Main *UNUSED(main), - struct Scene *UNUSED(scene), - struct PointerRNA *ptr) +void io_ui_forward_axis_update(Main *UNUSED(main), Scene *UNUSED(scene), PointerRNA *ptr) { /* Both forward and up axes cannot be along the same direction. */ @@ -31,9 +29,7 @@ void io_ui_forward_axis_update(struct Main *UNUSED(main), } } -void io_ui_up_axis_update(struct Main *UNUSED(main), - struct Scene *UNUSED(scene), - struct PointerRNA *ptr) +void io_ui_up_axis_update(Main *UNUSED(main), Scene *UNUSED(scene), PointerRNA *ptr) { int forward = RNA_enum_get(ptr, "forward_axis"); int up = RNA_enum_get(ptr, "up_axis"); diff --git a/source/blender/io/stl/IO_stl.cc b/source/blender/io/stl/IO_stl.cc index 4a0acc7e517..3b1c6e911d9 100644 --- a/source/blender/io/stl/IO_stl.cc +++ b/source/blender/io/stl/IO_stl.cc @@ -11,7 +11,7 @@ #include "IO_stl.h" #include "stl_import.hh" -void STL_import(bContext *C, const struct STLImportParams *import_params) +void STL_import(bContext *C, const STLImportParams *import_params) { SCOPED_TIMER("STL Import"); blender::io::stl::importer_main(C, *import_params); diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c index 7c9e1d7a735..d76b30e9506 100644 --- a/source/blender/makesdna/intern/dna_defaults.c +++ b/source/blender/makesdna/intern/dna_defaults.c @@ -329,7 +329,7 @@ SDNA_DEFAULT_DECL_STRUCT(EnvelopeGpencilModifierData); #undef SDNA_DEFAULT_DECL_STRUCT /* Reuse existing definitions. */ -extern const struct UserDef U_default; +extern const UserDef U_default; #define DNA_DEFAULT_UserDef U_default extern const bTheme U_theme_default; diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index b0539013f43..1e42c146b9e 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -564,7 +564,7 @@ void DNA_sdna_current_init(void) g_sdna = DNA_sdna_from_data(DNAstr, DNAlen, false, false, NULL); } -const struct SDNA *DNA_sdna_current_get(void) +const SDNA *DNA_sdna_current_get(void) { BLI_assert(g_sdna != NULL); return g_sdna; @@ -1870,7 +1870,7 @@ void DNA_sdna_alias_data_ensure_structs_map(SDNA *sdna) DNA_sdna_alias_data_ensure(sdna); #ifdef WITH_DNA_GHASH /* create a ghash lookup to speed up */ - struct GHash *structs_map = BLI_ghash_str_new_ex(__func__, sdna->structs_len); + GHash *structs_map = BLI_ghash_str_new_ex(__func__, sdna->structs_len); for (intptr_t nr = 0; nr < sdna->structs_len; nr++) { const SDNA_Struct *struct_info = sdna->structs[nr]; BLI_ghash_insert( diff --git a/source/blender/makesdna/intern/dna_utils.c b/source/blender/makesdna/intern/dna_utils.c index 8046fe5f6db..74a7bd5e676 100644 --- a/source/blender/makesdna/intern/dna_utils.c +++ b/source/blender/makesdna/intern/dna_utils.c @@ -126,7 +126,7 @@ bool DNA_elem_id_match(const char *elem_search, return false; } -char *DNA_elem_id_rename(struct MemArena *mem_arena, +char *DNA_elem_id_rename(MemArena *mem_arena, const char *elem_src, const int elem_src_len, const char *elem_dst, diff --git a/source/blender/makesrna/intern/rna_asset.c b/source/blender/makesrna/intern/rna_asset.c index 6cf7158cc00..818d6296638 100644 --- a/source/blender/makesrna/intern/rna_asset.c +++ b/source/blender/makesrna/intern/rna_asset.c @@ -604,7 +604,7 @@ static void rna_def_asset_library_reference(BlenderRNA *brna) srna, "Asset Library Reference", "Identifier to refer to the asset library"); } -PropertyRNA *rna_def_asset_library_reference_common(struct StructRNA *srna, +PropertyRNA *rna_def_asset_library_reference_common(StructRNA *srna, const char *get, const char *set) { diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 5796489cb50..b14d5b3bd4d 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -205,7 +205,7 @@ static void rna_brna_structs_remove_and_free(BlenderRNA *brna, StructRNA *srna) } #endif -static int DNA_struct_find_nr_wrapper(const struct SDNA *sdna, const char *struct_name) +static int DNA_struct_find_nr_wrapper(const SDNA *sdna, const char *struct_name) { struct_name = DNA_struct_rename_legacy_hack_static_from_alias(struct_name); #ifdef RNA_RUNTIME @@ -1103,7 +1103,7 @@ void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const cha ds->dnaname = structname; } -void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop) +void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop) { if (prop->type != PROP_STRING) { CLOG_ERROR(&LOG, "\"%s.%s\", must be a string property.", srna->identifier, prop->identifier); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index a393cb2dca9..89d938ea704 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -157,7 +157,7 @@ static PointerRNA rna_Test_test_get(PointerRNA *ptr) #else /* local convenience types */ -typedef void(CollectionDefFunc)(struct BlenderRNA *brna, struct PropertyRNA *cprop); +typedef void(CollectionDefFunc)(BlenderRNA *brna, PropertyRNA *cprop); typedef struct MainCollectionDef { const char *identifier; diff --git a/source/blender/makesrna/intern/rna_path.cc b/source/blender/makesrna/intern/rna_path.cc index ba2387e3591..df6ad03efd9 100644 --- a/source/blender/makesrna/intern/rna_path.cc +++ b/source/blender/makesrna/intern/rna_path.cc @@ -747,7 +747,7 @@ const char *RNA_path_array_index_token_find(const char *rna_path, const Property /* generic path search func * if its needed this could also reference the IDProperty direct */ typedef struct IDP_Chain { - struct IDP_Chain *up; /* parent member, reverse and set to child for path conversion. */ + IDP_Chain *up; /* parent member, reverse and set to child for path conversion. */ const char *name; int index; @@ -1020,7 +1020,7 @@ char *RNA_path_from_ID_to_struct(const PointerRNA *ptr) return ptrpath; } -char *RNA_path_from_real_ID_to_struct(Main *bmain, const PointerRNA *ptr, struct ID **r_real) +char *RNA_path_from_real_ID_to_struct(Main *bmain, const PointerRNA *ptr, ID **r_real) { char *path = RNA_path_from_ID_to_struct(ptr); diff --git a/source/blender/modifiers/intern/MOD_boolean.cc b/source/blender/modifiers/intern/MOD_boolean.cc index 0539bfae3a2..236a75a2f98 100644 --- a/source/blender/modifiers/intern/MOD_boolean.cc +++ b/source/blender/modifiers/intern/MOD_boolean.cc @@ -80,7 +80,7 @@ static void initData(ModifierData *md) MEMCPY_STRUCT_AFTER(bmd, DNA_struct_default_get(BooleanModifierData), modifier); } -static bool isDisabled(const struct Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) +static bool isDisabled(const Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) { BooleanModifierData *bmd = (BooleanModifierData *)md; Collection *col = bmd->collection; diff --git a/source/blender/modifiers/intern/MOD_datatransfer.cc b/source/blender/modifiers/intern/MOD_datatransfer.cc index e770773eed3..1e8ea1f2467 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.cc +++ b/source/blender/modifiers/intern/MOD_datatransfer.cc @@ -134,7 +134,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte } } -static bool isDisabled(const struct Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) +static bool isDisabled(const Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) { /* If no source object, bypass. */ DataTransferModifierData *dtmd = (DataTransferModifierData *)md; diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc index 98db757f12b..08d0fa90d07 100644 --- a/source/blender/modifiers/intern/MOD_mask.cc +++ b/source/blender/modifiers/intern/MOD_mask.cc @@ -748,7 +748,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext * /*ctx*/, M return result; } -static bool isDisabled(const struct Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) +static bool isDisabled(const Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) { MaskModifierData *mmd = reinterpret_cast(md); diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.cc b/source/blender/modifiers/intern/MOD_meshsequencecache.cc index 9e126339ecd..bf4a84b9cf7 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.cc +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.cc @@ -101,7 +101,7 @@ static void freeData(ModifierData *md) } } -static bool isDisabled(const struct Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) +static bool isDisabled(const Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) { MeshSeqCacheModifierData *mcmd = reinterpret_cast(md); diff --git a/source/blender/modifiers/intern/MOD_multires.cc b/source/blender/modifiers/intern/MOD_multires.cc index a9ddf8d41f7..fa475cb2476 100644 --- a/source/blender/modifiers/intern/MOD_multires.cc +++ b/source/blender/modifiers/intern/MOD_multires.cc @@ -48,7 +48,7 @@ struct MultiresRuntimeData { /* Cached subdivision surface descriptor, with topology and settings. */ - struct Subdiv *subdiv; + Subdiv *subdiv; }; static void initData(ModifierData *md) diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 0ca6b2fe731..8d7befc9fbf 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -321,7 +321,7 @@ static bool check_tree_for_time_node(const bNodeTree &tree, Set(md); const bNodeTree *tree = nmd->node_group; @@ -359,7 +359,7 @@ static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void walk(userData, ob, md, "texture"); } -static bool isDisabled(const struct Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) +static bool isDisabled(const Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) { NodesModifierData *nmd = reinterpret_cast(md); diff --git a/source/blender/modifiers/intern/MOD_normal_edit.cc b/source/blender/modifiers/intern/MOD_normal_edit.cc index 1553ec12fd9..5c68ce3b40b 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.cc +++ b/source/blender/modifiers/intern/MOD_normal_edit.cc @@ -648,7 +648,7 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u walk(userData, ob, (ID **)&enmd->target, IDWALK_CB_NOP); } -static bool isDisabled(const struct Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) +static bool isDisabled(const Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/) { NormalEditModifierData *enmd = (NormalEditModifierData *)md; diff --git a/source/blender/modifiers/intern/MOD_particlesystem.cc b/source/blender/modifiers/intern/MOD_particlesystem.cc index c2ba0e0b3d6..c495cbb044b 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.cc +++ b/source/blender/modifiers/intern/MOD_particlesystem.cc @@ -211,7 +211,7 @@ static void deformVerts(ModifierData *md, psmd->totdmface = psmd->mesh_final->totface; { - struct Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph); + Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph); psmd->flag &= ~eParticleSystemFlag_psys_updated; particle_system_update( ctx->depsgraph, scene, ctx->object, psys, (ctx->flag & MOD_APPLY_RENDER) != 0); diff --git a/source/blender/modifiers/intern/MOD_subsurf.cc b/source/blender/modifiers/intern/MOD_subsurf.cc index e034d950c40..976b4495f05 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.cc +++ b/source/blender/modifiers/intern/MOD_subsurf.cc @@ -327,7 +327,7 @@ static void deformMatrices(ModifierData *md, static bool get_show_adaptive_options(const bContext *C, Panel *panel) { /* Don't show adaptive options if cycles isn't the active engine. */ - const struct RenderEngineType *engine_type = CTX_data_engine_type(C); + const RenderEngineType *engine_type = CTX_data_engine_type(C); if (!STREQ(engine_type->idname, "CYCLES")) { return false; } diff --git a/source/blender/modifiers/intern/MOD_util.cc b/source/blender/modifiers/intern/MOD_util.cc index 27797b8c02a..e6642ec9cdb 100644 --- a/source/blender/modifiers/intern/MOD_util.cc +++ b/source/blender/modifiers/intern/MOD_util.cc @@ -165,7 +165,7 @@ void MOD_previous_vcos_store(ModifierData *md, const float (*vert_coords)[3]) } Mesh *MOD_deform_mesh_eval_get(Object *ob, - struct BMEditMesh *em, + BMEditMesh *em, Mesh *mesh, const float (*vertexCos)[3], const int verts_num, @@ -223,7 +223,7 @@ Mesh *MOD_deform_mesh_eval_get(Object *ob, } void MOD_get_vgroup( - Object *ob, struct Mesh *mesh, const char *name, const MDeformVert **dvert, int *defgrp_index) + Object *ob, Mesh *mesh, const char *name, const MDeformVert **dvert, int *defgrp_index) { if (mesh) { *defgrp_index = BKE_id_defgroup_name_index(&mesh->id, name); @@ -245,7 +245,7 @@ void MOD_get_vgroup( } } -void MOD_depsgraph_update_object_bone_relation(struct DepsNodeHandle *node, +void MOD_depsgraph_update_object_bone_relation(DepsNodeHandle *node, Object *object, const char *bonename, const char *description) diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc index 664462af877..3a87c4f62f5 100644 --- a/source/blender/modifiers/intern/MOD_volume_displace.cc +++ b/source/blender/modifiers/intern/MOD_volume_displace.cc @@ -86,7 +86,7 @@ static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void walk(userData, ob, md, "texture"); } -static bool dependsOnTime(struct Scene * /*scene*/, ModifierData *md) +static bool dependsOnTime(Scene * /*scene*/, ModifierData *md) { VolumeDisplaceModifierData *vdmd = reinterpret_cast(md); if (vdmd->texture) { diff --git a/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc b/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc index da4553697cd..7a91e5e7702 100644 --- a/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc +++ b/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc @@ -52,7 +52,7 @@ class ColorRampShaderNode : public ShaderNode { GPUNodeStack *inputs = get_inputs_array(); GPUNodeStack *outputs = get_outputs_array(); - struct ColorBand *color_band = get_color_band(); + ColorBand *color_band = get_color_band(); /* Common / easy case optimization. */ if ((color_band->tot <= 2) && (color_band->color_mode == COLBAND_BLEND_RGB)) { @@ -117,9 +117,9 @@ class ColorRampShaderNode : public ShaderNode { GPU_stack_link(material, &bnode(), "valtorgb", inputs, outputs, tex, GPU_constant(&layer)); } - struct ColorBand *get_color_band() + ColorBand *get_color_band() { - return static_cast(bnode().storage); + return static_cast(bnode().storage); } }; diff --git a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc index 84d8ad18627..09638865143 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc @@ -1153,7 +1153,7 @@ void NOD_geometry_simulation_output_remove_item(NodeGeometrySimulationOutput *si MEM_SAFE_FREE(old_items); } -void NOD_geometry_simulation_output_clear_items(struct NodeGeometrySimulationOutput *sim) +void NOD_geometry_simulation_output_clear_items(NodeGeometrySimulationOutput *sim) { for (NodeSimulationItem &item : sim->items_span_for_write()) { MEM_SAFE_FREE(item.name); diff --git a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc index 86f91ed4097..e95eb5044da 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc @@ -49,7 +49,7 @@ static void node_declare(NodeDeclarationBuilder &b) b.add_output("Pivot Point").field_on_all(); } -static void node_layout(uiLayout *layout, struct bContext *C, PointerRNA *ptr) +static void node_layout(uiLayout *layout, bContext *C, PointerRNA *ptr) { uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); @@ -212,7 +212,7 @@ static std::optional get_text_layout(GeoNodeExecParams ¶ms) cu.strinfo = static_cast(MEM_callocN((len_chars + 1) * sizeof(CharInfo), __func__)); BLI_strncpy(cu.str, layout.text.c_str(), len_bytes + 1); - struct CharTrans *chartransdata = nullptr; + CharTrans *chartransdata = nullptr; int text_len; bool text_free; const char32_t *r_text = nullptr; diff --git a/source/blender/nodes/intern/node_exec.cc b/source/blender/nodes/intern/node_exec.cc index 3107ffeed34..17585e17f9a 100644 --- a/source/blender/nodes/intern/node_exec.cc +++ b/source/blender/nodes/intern/node_exec.cc @@ -110,10 +110,7 @@ static void node_init_output_index(bNodeSocket *sock, int *index) } /* basic preparation of socket stacks */ -static struct bNodeStack *setup_stack(bNodeStack *stack, - bNodeTree *ntree, - bNode *node, - bNodeSocket *sock) +static bNodeStack *setup_stack(bNodeStack *stack, bNodeTree *ntree, bNode *node, bNodeSocket *sock) { bNodeStack *ns = node_get_socket_stack(stack, sock); if (!ns) { diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc index 3cd46be45bc..df7c897afa6 100644 --- a/source/blender/nodes/intern/node_socket.cc +++ b/source/blender/nodes/intern/node_socket.cc @@ -40,10 +40,10 @@ using namespace blender; using blender::fn::ValueOrField; using blender::nodes::SocketDeclarationPtr; -struct bNodeSocket *node_add_socket_from_template(struct bNodeTree *ntree, - struct bNode *node, - struct bNodeSocketTemplate *stemp, - eNodeSocketInOut in_out) +bNodeSocket *node_add_socket_from_template(bNodeTree *ntree, + bNode *node, + bNodeSocketTemplate *stemp, + eNodeSocketInOut in_out) { bNodeSocket *sock = nodeAddStaticSocket( ntree, node, in_out, stemp->type, stemp->subtype, stemp->identifier, stemp->name); diff --git a/source/blender/nodes/shader/node_shader_util.cc b/source/blender/nodes/shader/node_shader_util.cc index 64e6bedfeaa..caa13067928 100644 --- a/source/blender/nodes/shader/node_shader_util.cc +++ b/source/blender/nodes/shader/node_shader_util.cc @@ -43,7 +43,7 @@ static bool sh_fn_poll_default(const bNodeType * /*ntype*/, return true; } -void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass) +void sh_node_type_base(bNodeType *ntype, int type, const char *name, short nclass) { blender::bke::node_type_base(ntype, type, name, nclass); @@ -138,7 +138,7 @@ static void nodestack_get_vec(float *in, short type_in, bNodeStack *ns) } } -void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns) +void node_gpu_stack_from_data(GPUNodeStack *gs, int type, bNodeStack *ns) { memset(gs, 0, sizeof(*gs)); diff --git a/source/blender/nodes/shader/nodes/node_shader_color_ramp.cc b/source/blender/nodes/shader/nodes/node_shader_color_ramp.cc index 6f50250dcdd..538c8d67667 100644 --- a/source/blender/nodes/shader/nodes/node_shader_color_ramp.cc +++ b/source/blender/nodes/shader/nodes/node_shader_color_ramp.cc @@ -33,7 +33,7 @@ static int gpu_shader_valtorgb(GPUMaterial *mat, GPUNodeStack *in, GPUNodeStack *out) { - struct ColorBand *coba = (ColorBand *)node->storage; + ColorBand *coba = (ColorBand *)node->storage; float *array, layer; int size; diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc b/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc index a4e5af7e4b8..663f03cb408 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc +++ b/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc @@ -93,7 +93,7 @@ static int gpu_shader_vect_transform(GPUMaterial *mat, GPUNodeStack *in, GPUNodeStack *out) { - struct GPUNodeLink *inputlink; + GPUNodeLink *inputlink; NodeShaderVectTransform *nodeprop = (NodeShaderVectTransform *)node->storage; diff --git a/source/blender/nodes/texture/node_texture_tree.cc b/source/blender/nodes/texture/node_texture_tree.cc index 3f8e85593af..84cc9b10a36 100644 --- a/source/blender/nodes/texture/node_texture_tree.cc +++ b/source/blender/nodes/texture/node_texture_tree.cc @@ -48,7 +48,7 @@ static void texture_get_from_context( Tex *tx = nullptr; if (snode->texfrom == SNODE_TEX_BRUSH) { - struct Brush *brush = nullptr; + Brush *brush = nullptr; if (ob && (ob->mode & OB_MODE_SCULPT)) { brush = BKE_paint_brush(&scene->toolsettings->sculpt->paint); diff --git a/source/blender/nodes/texture/node_texture_util.cc b/source/blender/nodes/texture/node_texture_util.cc index 9431b17f5f1..f0af220eee4 100644 --- a/source/blender/nodes/texture/node_texture_util.cc +++ b/source/blender/nodes/texture/node_texture_util.cc @@ -37,7 +37,7 @@ bool tex_node_poll_default(const bNodeType * /*ntype*/, return true; } -void tex_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass) +void tex_node_type_base(bNodeType *ntype, int type, const char *name, short nclass) { blender::bke::node_type_base(ntype, type, name, nclass); @@ -137,7 +137,7 @@ void tex_output(bNode *node, dg->type = out->sockettype; } -void ntreeTexCheckCyclics(struct bNodeTree *ntree) +void ntreeTexCheckCyclics(bNodeTree *ntree) { bNode *node; for (node = static_cast(ntree->nodes.first); node; node = node->next) { diff --git a/source/blender/nodes/texture/nodes/node_texture_common.cc b/source/blender/nodes/texture/nodes/node_texture_common.cc index d8243fb69f2..b839c92734b 100644 --- a/source/blender/nodes/texture/nodes/node_texture_common.cc +++ b/source/blender/nodes/texture/nodes/node_texture_common.cc @@ -109,10 +109,10 @@ static void group_copy_outputs(bNode *gnode, bNodeStack **out, bNodeStack *gstac static void group_execute(void *data, int thread, - struct bNode *node, + bNode *node, bNodeExecData *execdata, - struct bNodeStack **in, - struct bNodeStack **out) + bNodeStack **in, + bNodeStack **out) { bNodeTreeExec *exec = static_cast(execdata->data); bNodeThreadStack *nts; diff --git a/source/blender/nodes/texture/nodes/node_texture_output.cc b/source/blender/nodes/texture/nodes/node_texture_output.cc index c68fd7c1f07..4e131d1c76b 100644 --- a/source/blender/nodes/texture/nodes/node_texture_output.cc +++ b/source/blender/nodes/texture/nodes/node_texture_output.cc @@ -92,7 +92,7 @@ static void unique_name(bNode *node) } } -static void assign_index(struct bNode *node) +static void assign_index(bNode *node) { bNode *tnode; int index = 1; diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c index ffe943e0188..5d1711bceb9 100644 --- a/source/blender/python/bmesh/bmesh_py_api.c +++ b/source/blender/python/bmesh/bmesh_py_api.c @@ -134,8 +134,7 @@ static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args, } { - extern void EDBM_update_extern( - struct Mesh * me, const bool do_tessface, const bool is_destructive); + extern void EDBM_update_extern(Mesh * me, const bool do_tessface, const bool is_destructive); EDBM_update_extern(me, do_loop_triangles, is_destructive); } @@ -143,7 +142,7 @@ static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args, Py_RETURN_NONE; } -static struct PyMethodDef BPy_BM_methods[] = { +static PyMethodDef BPy_BM_methods[] = { {"new", (PyCFunction)bpy_bm_new, METH_VARARGS | METH_KEYWORDS, bpy_bm_new_doc}, {"from_edit_mesh", (PyCFunction)bpy_bm_from_edit_mesh, METH_O, bpy_bm_from_edit_mesh_doc}, {"update_edit_mesh", @@ -157,7 +156,7 @@ PyDoc_STRVAR(BPy_BM_doc, "This module provides access to blenders bmesh data structures.\n" "\n" ".. include:: include__bmesh.rst\n"); -static struct PyModuleDef BPy_BM_module_def = { +static PyModuleDef BPy_BM_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh", /*m_doc*/ BPy_BM_doc, diff --git a/source/blender/python/bmesh/bmesh_py_geometry.c b/source/blender/python/bmesh/bmesh_py_geometry.c index 7248941c4d7..c33b76e0f53 100644 --- a/source/blender/python/bmesh/bmesh_py_geometry.c +++ b/source/blender/python/bmesh/bmesh_py_geometry.c @@ -51,7 +51,7 @@ static PyObject *bpy_bm_geometry_intersect_face_point(BPy_BMFace *UNUSED(self), return PyBool_FromLong(ret); } -static struct PyMethodDef BPy_BM_geometry_methods[] = { +static PyMethodDef BPy_BM_geometry_methods[] = { {"intersect_face_point", (PyCFunction)bpy_bm_geometry_intersect_face_point, METH_VARARGS, @@ -61,7 +61,7 @@ static struct PyMethodDef BPy_BM_geometry_methods[] = { PyDoc_STRVAR(BPy_BM_utils_doc, "This module provides access to bmesh geometry evaluation functions."); -static struct PyModuleDef BPy_BM_geometry_module_def = { +static PyModuleDef BPy_BM_geometry_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh.geometry", /*m_doc*/ BPy_BM_utils_doc, diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c index 4018b720a49..0220610f55b 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.c +++ b/source/blender/python/bmesh/bmesh_py_ops.c @@ -227,14 +227,14 @@ static PyObject *bpy_bmesh_ops_module_dir(PyObject *UNUSED(self)) return ret; } -static struct PyMethodDef BPy_BM_ops_methods[] = { +static PyMethodDef BPy_BM_ops_methods[] = { {"__getattr__", (PyCFunction)bpy_bmesh_ops_module_getattro, METH_O, NULL}, {"__dir__", (PyCFunction)bpy_bmesh_ops_module_dir, METH_NOARGS, NULL}, {NULL, NULL, 0, NULL}, }; PyDoc_STRVAR(BPy_BM_ops_doc, "Access to BMesh operators"); -static struct PyModuleDef BPy_BM_ops_module_def = { +static PyModuleDef BPy_BM_ops_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh.ops", /*m_doc*/ BPy_BM_ops_doc, diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index f2a05bfd4a2..97e82488a1c 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -1079,7 +1079,7 @@ static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject PyObject *py_object; PyObject *py_depsgraph; Object *ob, *ob_eval; - struct Depsgraph *depsgraph; + Depsgraph *depsgraph; struct Scene *scene_eval; const Mesh *me_eval; BMesh *bm; @@ -2797,7 +2797,7 @@ static PyObject *bpy_bmelemseq_sort(BPy_BMElemSeq *self, PyObject *args, PyObjec Py_RETURN_NONE; } -static struct PyMethodDef bpy_bmesh_methods[] = { +static PyMethodDef bpy_bmesh_methods[] = { /* utility */ {"copy", (PyCFunction)bpy_bmesh_copy, METH_NOARGS, bpy_bmesh_copy_doc}, {"clear", (PyCFunction)bpy_bmesh_clear, METH_NOARGS, bpy_bmesh_clear_doc}, @@ -2841,7 +2841,7 @@ static struct PyMethodDef bpy_bmesh_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmvert_methods[] = { +static PyMethodDef bpy_bmvert_methods[] = { {"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc}, {"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc}, {"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc}, @@ -2871,7 +2871,7 @@ static struct PyMethodDef bpy_bmvert_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmedge_methods[] = { +static PyMethodDef bpy_bmedge_methods[] = { {"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc}, {"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc}, {"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc}, @@ -2900,7 +2900,7 @@ static struct PyMethodDef bpy_bmedge_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmface_methods[] = { +static PyMethodDef bpy_bmface_methods[] = { {"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc}, {"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc}, @@ -2955,7 +2955,7 @@ static struct PyMethodDef bpy_bmface_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmloop_methods[] = { +static PyMethodDef bpy_bmloop_methods[] = { {"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc}, {"copy_from_face_interp", (PyCFunction)bpy_bmloop_copy_from_face_interp, @@ -2971,7 +2971,7 @@ static struct PyMethodDef bpy_bmloop_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmelemseq_methods[] = { +static PyMethodDef bpy_bmelemseq_methods[] = { /* odd function, initializes index values */ {"index_update", (PyCFunction)bpy_bmelemseq_index_update, @@ -2980,7 +2980,7 @@ static struct PyMethodDef bpy_bmelemseq_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmvertseq_methods[] = { +static PyMethodDef bpy_bmvertseq_methods[] = { {"new", (PyCFunction)bpy_bmvertseq_new, METH_VARARGS, bpy_bmvertseq_new_doc}, {"remove", (PyCFunction)bpy_bmvertseq_remove, METH_O, bpy_bmvertseq_remove_doc}, @@ -3000,7 +3000,7 @@ static struct PyMethodDef bpy_bmvertseq_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmedgeseq_methods[] = { +static PyMethodDef bpy_bmedgeseq_methods[] = { {"new", (PyCFunction)bpy_bmedgeseq_new, METH_VARARGS, bpy_bmedgeseq_new_doc}, {"remove", (PyCFunction)bpy_bmedgeseq_remove, METH_O, bpy_bmedgeseq_remove_doc}, /* 'bpy_bmelemseq_get' for different purpose */ @@ -3022,7 +3022,7 @@ static struct PyMethodDef bpy_bmedgeseq_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmfaceseq_methods[] = { +static PyMethodDef bpy_bmfaceseq_methods[] = { {"new", (PyCFunction)bpy_bmfaceseq_new, METH_VARARGS, bpy_bmfaceseq_new_doc}, {"remove", (PyCFunction)bpy_bmfaceseq_remove, METH_O, bpy_bmfaceseq_remove_doc}, /* 'bpy_bmelemseq_get' for different purpose */ @@ -3044,7 +3044,7 @@ static struct PyMethodDef bpy_bmfaceseq_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmloopseq_methods[] = { +static PyMethodDef bpy_bmloopseq_methods[] = { /* odd function, initializes index values */ /* no: index_update() function since we can't iterate over loops */ /* no: sort() function since we can't iterate over loops */ @@ -3744,7 +3744,7 @@ void BPy_BM_init_types(void) /* bmesh.types submodule * ********************* */ -static struct PyModuleDef BPy_BM_types_module_def = { +static PyModuleDef BPy_BM_types_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh.types", /*m_doc*/ NULL, diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index 0d101bf4530..6489e81cded 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -680,12 +680,12 @@ static PyObject *bpy_bmlayercollection_get(BPy_BMLayerCollection *self, PyObject return Py_INCREF_RET(def); } -static struct PyMethodDef bpy_bmlayeritem_methods[] = { +static PyMethodDef bpy_bmlayeritem_methods[] = { {"copy_from", (PyCFunction)bpy_bmlayeritem_copy_from, METH_O, bpy_bmlayeritem_copy_from_doc}, {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef bpy_bmelemseq_methods[] = { +static PyMethodDef bpy_bmelemseq_methods[] = { {"verify", (PyCFunction)bpy_bmlayercollection_verify, METH_NOARGS, diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index a39ffcdb5e5..c97368fc371 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -184,7 +184,7 @@ static void bm_init_types_bmloopuv(void) PyType_Ready(&BPy_BMLoopUV_Type); } -int BPy_BMLoopUV_AssignPyObject(struct BMesh *bm, BMLoop *loop, PyObject *value) +int BPy_BMLoopUV_AssignPyObject(BMesh *bm, BMLoop *loop, PyObject *value) { if (UNLIKELY(!BPy_BMLoopUV_Check(value))) { PyErr_Format(PyExc_TypeError, "expected BMLoopUV, not a %.200s", Py_TYPE(value)->tp_name); @@ -210,7 +210,7 @@ int BPy_BMLoopUV_AssignPyObject(struct BMesh *bm, BMLoop *loop, PyObject *value) return 0; } -PyObject *BPy_BMLoopUV_CreatePyObject(struct BMesh *bm, BMLoop *loop, int layer) +PyObject *BPy_BMLoopUV_CreatePyObject(BMesh *bm, BMLoop *loop, int layer) { BPy_BMLoopUV *self = PyObject_New(BPy_BMLoopUV, &BPy_BMLoopUV_Type); @@ -322,7 +322,7 @@ static void bm_init_types_bmvertskin(void) PyType_Ready(&BPy_BMVertSkin_Type); } -int BPy_BMVertSkin_AssignPyObject(struct MVertSkin *mvertskin, PyObject *value) +int BPy_BMVertSkin_AssignPyObject(MVertSkin *mvertskin, PyObject *value) { if (UNLIKELY(!BPy_BMVertSkin_Check(value))) { PyErr_Format(PyExc_TypeError, "expected BMVertSkin, not a %.200s", Py_TYPE(value)->tp_name); @@ -333,7 +333,7 @@ int BPy_BMVertSkin_AssignPyObject(struct MVertSkin *mvertskin, PyObject *value) return 0; } -PyObject *BPy_BMVertSkin_CreatePyObject(struct MVertSkin *mvertskin) +PyObject *BPy_BMVertSkin_CreatePyObject(MVertSkin *mvertskin) { BPy_BMVertSkin *self = PyObject_New(BPy_BMVertSkin, &BPy_BMVertSkin_Type); self->data = mvertskin; @@ -420,7 +420,7 @@ static void bm_init_types_bmloopcol(void) mathutils_bmloopcol_cb_index = Mathutils_RegisterCallback(&mathutils_bmloopcol_cb); } -int BPy_BMLoopColor_AssignPyObject(struct MLoopCol *mloopcol, PyObject *value) +int BPy_BMLoopColor_AssignPyObject(MLoopCol *mloopcol, PyObject *value) { float tvec[4]; if (mathutils_array_parse(tvec, 4, 4, value, "BMLoopCol") != -1) { @@ -431,7 +431,7 @@ int BPy_BMLoopColor_AssignPyObject(struct MLoopCol *mloopcol, PyObject *value) return -1; } -PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *mloopcol) +PyObject *BPy_BMLoopColor_CreatePyObject(MLoopCol *mloopcol) { PyObject *color_capsule; color_capsule = PyCapsule_New(mloopcol, NULL, NULL); @@ -706,7 +706,7 @@ static PyObject *bpy_bmdeformvert_clear(BPy_BMDeformVert *self) Py_RETURN_NONE; } -static struct PyMethodDef bpy_bmdeformvert_methods[] = { +static PyMethodDef bpy_bmdeformvert_methods[] = { {"keys", (PyCFunction)bpy_bmdeformvert_keys, METH_NOARGS, bpy_bmdeformvert_keys_doc}, {"values", (PyCFunction)bpy_bmdeformvert_values, METH_NOARGS, bpy_bmdeformvert_values_doc}, {"items", (PyCFunction)bpy_bmdeformvert_items, METH_NOARGS, bpy_bmdeformvert_items_doc}, @@ -736,7 +736,7 @@ static void bm_init_types_bmdvert(void) PyType_Ready(&BPy_BMDeformVert_Type); } -int BPy_BMDeformVert_AssignPyObject(struct MDeformVert *dvert, PyObject *value) +int BPy_BMDeformVert_AssignPyObject(MDeformVert *dvert, PyObject *value) { if (UNLIKELY(!BPy_BMDeformVert_Check(value))) { PyErr_Format(PyExc_TypeError, "expected BMDeformVert, not a %.200s", Py_TYPE(value)->tp_name); @@ -750,7 +750,7 @@ int BPy_BMDeformVert_AssignPyObject(struct MDeformVert *dvert, PyObject *value) return 0; } -PyObject *BPy_BMDeformVert_CreatePyObject(struct MDeformVert *dvert) +PyObject *BPy_BMDeformVert_CreatePyObject(MDeformVert *dvert) { BPy_BMDeformVert *self = PyObject_New(BPy_BMDeformVert, &BPy_BMDeformVert_Type); self->data = dvert; diff --git a/source/blender/python/bmesh/bmesh_py_types_select.c b/source/blender/python/bmesh/bmesh_py_types_select.c index 311f9ae7070..e39a27adb46 100644 --- a/source/blender/python/bmesh/bmesh_py_types_select.c +++ b/source/blender/python/bmesh/bmesh_py_types_select.c @@ -141,7 +141,7 @@ static PyObject *bpy_bmeditselseq_discard(BPy_BMEditSelSeq *self, BPy_BMElem *va Py_RETURN_NONE; } -static struct PyMethodDef bpy_bmeditselseq_methods[] = { +static PyMethodDef bpy_bmeditselseq_methods[] = { {"validate", (PyCFunction)bpy_bmeditselseq_validate, METH_NOARGS, diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c index 80973adafab..01ac9c118b2 100644 --- a/source/blender/python/bmesh/bmesh_py_utils.c +++ b/source/blender/python/bmesh/bmesh_py_utils.c @@ -758,7 +758,7 @@ static PyObject *bpy_bm_utils_loop_separate(PyObject *UNUSED(self), BPy_BMLoop * Py_RETURN_NONE; } -static struct PyMethodDef BPy_BM_utils_methods[] = { +static PyMethodDef BPy_BM_utils_methods[] = { {"vert_collapse_edge", (PyCFunction)bpy_bm_utils_vert_collapse_edge, METH_VARARGS, @@ -809,7 +809,7 @@ static struct PyMethodDef BPy_BM_utils_methods[] = { }; PyDoc_STRVAR(BPy_BM_utils_doc, "This module provides access to blenders bmesh data structures."); -static struct PyModuleDef BPy_BM_utils_module_def = { +static PyModuleDef BPy_BM_utils_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bmesh.utils", /*m_doc*/ BPy_BM_utils_doc, diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 4226aeeb542..3f9a1aac5ea 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -1438,7 +1438,7 @@ BGL_Wrap(TexImage3DMultisample, /** \name Module Definition * \{ */ -static struct PyModuleDef BGL_module_def = { +static PyModuleDef BGL_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bgl", /*m_doc*/ NULL, diff --git a/source/blender/python/generic/bl_math_py_api.c b/source/blender/python/generic/bl_math_py_api.c index 17a004ae819..2d3b5370278 100644 --- a/source/blender/python/generic/bl_math_py_api.c +++ b/source/blender/python/generic/bl_math_py_api.c @@ -129,7 +129,7 @@ static PyMethodDef M_bl_math_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef M_bl_math_module_def = { +static PyModuleDef M_bl_math_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bl_math", /*m_doc*/ M_bl_math_doc, diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c index 6cf8760bbed..92c2aa57536 100644 --- a/source/blender/python/generic/blf_py_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -460,7 +460,7 @@ static PyMethodDef BLF_methods[] = { }; PyDoc_STRVAR(BLF_doc, "This module provides access to Blender's text drawing functions."); -static struct PyModuleDef BLF_module_def = { +static PyModuleDef BLF_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "blf", /*m_doc*/ BLF_doc, diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 2db8826f86b..d06e78efba8 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -1597,7 +1597,7 @@ static PyObject *BPy_IDGroup_get(BPy_IDProperty *self, PyObject *args) return def; } -static struct PyMethodDef BPy_IDGroup_methods[] = { +static PyMethodDef BPy_IDGroup_methods[] = { {"pop", (PyCFunction)BPy_IDGroup_pop, METH_VARARGS, BPy_IDGroup_pop_doc}, {"keys", (PyCFunction)BPy_IDGroup_keys, METH_NOARGS, BPy_IDGroup_keys_doc}, {"values", (PyCFunction)BPy_IDGroup_values, METH_NOARGS, BPy_IDGroup_values_doc}, @@ -2180,7 +2180,7 @@ static PyObject *BPy_IDGroup_ViewItems_CreatePyObject(BPy_IDProperty *group) /** \name Public Module 'idprop.types' * \{ */ -static struct PyModuleDef IDProp_types_module_def = { +static PyModuleDef IDProp_types_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "idprop.types", /*m_doc*/ NULL, @@ -2229,7 +2229,7 @@ static PyMethodDef IDProp_methods[] = { PyDoc_STRVAR(IDProp_module_doc, "This module provides access id property types (currently mainly for docs)."); -static struct PyModuleDef IDProp_module_def = { +static PyModuleDef IDProp_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "idprop", /*m_doc*/ IDProp_module_doc, diff --git a/source/blender/python/generic/idprop_py_ui_api.c b/source/blender/python/generic/idprop_py_ui_api.c index 0a9bb39d6d9..d91d254ff89 100644 --- a/source/blender/python/generic/idprop_py_ui_api.c +++ b/source/blender/python/generic/idprop_py_ui_api.c @@ -749,7 +749,7 @@ static PyObject *BPy_IDPropertyUIManager_update_from(BPy_IDPropertyUIManager *se /** \name UI Data Manager Definition * \{ */ -static struct PyMethodDef BPy_IDPropertyUIManager_methods[] = { +static PyMethodDef BPy_IDPropertyUIManager_methods[] = { {"update", (PyCFunction)BPy_IDPropertyUIManager_update, METH_VARARGS | METH_KEYWORDS, diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c index b67cf68601d..5e149d31750 100644 --- a/source/blender/python/generic/imbuf_py_api.c +++ b/source/blender/python/generic/imbuf_py_api.c @@ -209,7 +209,7 @@ static PyObject *py_imbuf_free(Py_ImBuf *self) Py_RETURN_NONE; } -static struct PyMethodDef Py_ImBuf_methods[] = { +static PyMethodDef Py_ImBuf_methods[] = { {"resize", (PyCFunction)py_imbuf_resize, METH_VARARGS | METH_KEYWORDS, py_imbuf_resize_doc}, {"crop", (PyCFunction)py_imbuf_crop, METH_VARARGS | METH_KEYWORDS, (char *)py_imbuf_crop_doc}, {"free", (PyCFunction)py_imbuf_free, METH_NOARGS, py_imbuf_free_doc}, @@ -563,7 +563,7 @@ PyDoc_STRVAR(IMB_doc, "\n" "It provides access to image buffers outside of Blender's\n" ":class:`bpy.types.Image` data-block context.\n"); -static struct PyModuleDef IMB_module_def = { +static PyModuleDef IMB_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "imbuf", /*m_doc*/ IMB_doc, @@ -607,7 +607,7 @@ PyDoc_STRVAR(IMB_types_doc, " Image buffer is also the structure used by :class:`bpy.types.Image`\n" " ID type to store and manipulate image data at runtime.\n"); -static struct PyModuleDef IMB_types_module_def = { +static PyModuleDef IMB_types_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "imbuf.types", /*m_doc*/ IMB_types_doc, diff --git a/source/blender/python/gpu/gpu_py_api.c b/source/blender/python/gpu/gpu_py_api.c index ab0fbe81823..c7ff8db088f 100644 --- a/source/blender/python/gpu/gpu_py_api.c +++ b/source/blender/python/gpu/gpu_py_api.c @@ -33,7 +33,7 @@ PyDoc_STRVAR(pygpu_doc, "This module provides Python wrappers for the GPU implementation in Blender.\n" "Some higher level functions can be found in the `gpu_extras` module."); -static struct PyModuleDef pygpu_module_def = { +static PyModuleDef pygpu_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "gpu", /*m_doc*/ pygpu_doc, diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c index 65b3f62fef2..83e4e6819ca 100644 --- a/source/blender/python/gpu/gpu_py_batch.c +++ b/source/blender/python/gpu/gpu_py_batch.c @@ -336,7 +336,7 @@ static PyObject *pygpu_batch_program_use_end(BPyGPUBatch *self) Py_RETURN_NONE; } -static struct PyMethodDef pygpu_batch__tp_methods[] = { +static PyMethodDef pygpu_batch__tp_methods[] = { {"vertbuf_add", (PyCFunction)pygpu_batch_vertbuf_add, METH_O, pygpu_batch_vertbuf_add_doc}, {"program_set", (PyCFunction)pygpu_batch_program_set, METH_O, pygpu_batch_program_set_doc}, {"draw", (PyCFunction)pygpu_batch_draw, METH_VARARGS, pygpu_batch_draw_doc}, diff --git a/source/blender/python/gpu/gpu_py_capabilities.c b/source/blender/python/gpu/gpu_py_capabilities.c index f7f0a2f3f8a..fbc1db86533 100644 --- a/source/blender/python/gpu/gpu_py_capabilities.c +++ b/source/blender/python/gpu/gpu_py_capabilities.c @@ -234,7 +234,7 @@ static PyObject *pygpu_shader_image_load_store_support_get(PyObject *UNUSED(self /** \name Module * \{ */ -static struct PyMethodDef pygpu_capabilities__tp_methods[] = { +static PyMethodDef pygpu_capabilities__tp_methods[] = { {"max_texture_size_get", (PyCFunction)pygpu_max_texture_size_get, METH_NOARGS, diff --git a/source/blender/python/gpu/gpu_py_framebuffer.c b/source/blender/python/gpu/gpu_py_framebuffer.c index 3ab3494bc80..d819b227805 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.c +++ b/source/blender/python/gpu/gpu_py_framebuffer.c @@ -661,7 +661,7 @@ static PyGetSetDef pygpu_framebuffer__tp_getseters[] = { {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; -static struct PyMethodDef pygpu_framebuffer__tp_methods[] = { +static PyMethodDef pygpu_framebuffer__tp_methods[] = { {"bind", (PyCFunction)pygpu_framebuffer_bind, METH_NOARGS, pygpu_framebuffer_bind_doc}, {"clear", (PyCFunction)pygpu_framebuffer_clear, diff --git a/source/blender/python/gpu/gpu_py_matrix.c b/source/blender/python/gpu/gpu_py_matrix.c index 83da926a4b3..d4a6d84a255 100644 --- a/source/blender/python/gpu/gpu_py_matrix.c +++ b/source/blender/python/gpu/gpu_py_matrix.c @@ -461,7 +461,7 @@ static PyObject *pygpu_matrix_get_normal_matrix(PyObject *UNUSED(self)) /** \name Module * \{ */ -static struct PyMethodDef pygpu_matrix__tp_methods[] = { +static PyMethodDef pygpu_matrix__tp_methods[] = { /* Manage Stack */ {"push", (PyCFunction)pygpu_matrix_push, METH_NOARGS, pygpu_matrix_push_doc}, {"pop", (PyCFunction)pygpu_matrix_pop, METH_NOARGS, pygpu_matrix_pop_doc}, diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index 1ef6b8d92a8..d7f38516fd2 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -318,8 +318,8 @@ static PyObject *pygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *ar PyObject *py_scene, *py_view_layer, *py_region, *py_view3d; struct Depsgraph *depsgraph; - struct Scene *scene; - struct ViewLayer *view_layer; + Scene *scene; + ViewLayer *view_layer; View3D *v3d; ARegion *region; @@ -471,7 +471,7 @@ static PyGetSetDef pygpu_offscreen__tp_getseters[] = { {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; -static struct PyMethodDef pygpu_offscreen__tp_methods[] = { +static PyMethodDef pygpu_offscreen__tp_methods[] = { {"bind", (PyCFunction)pygpu_offscreen_bind, METH_NOARGS, pygpu_offscreen_bind_doc}, {"unbind", (PyCFunction)pygpu_offscreen_unbind, diff --git a/source/blender/python/gpu/gpu_py_platform.c b/source/blender/python/gpu/gpu_py_platform.c index 5e2d8675656..9a938dbbf7d 100644 --- a/source/blender/python/gpu/gpu_py_platform.c +++ b/source/blender/python/gpu/gpu_py_platform.c @@ -117,7 +117,7 @@ static PyObject *pygpu_platform_backend_type_get(PyObject *UNUSED(self)) /** \name Module * \{ */ -static struct PyMethodDef pygpu_platform__tp_methods[] = { +static PyMethodDef pygpu_platform__tp_methods[] = { {"vendor_get", (PyCFunction)pygpu_platform_vendor_get, METH_NOARGS, diff --git a/source/blender/python/gpu/gpu_py_select.c b/source/blender/python/gpu/gpu_py_select.c index 077097fbcb1..e6ea7e0e505 100644 --- a/source/blender/python/gpu/gpu_py_select.c +++ b/source/blender/python/gpu/gpu_py_select.c @@ -52,7 +52,7 @@ static PyObject *pygpu_select_load_id(PyObject *UNUSED(self), PyObject *value) /** \name Module * \{ */ -static struct PyMethodDef pygpu_select__tp_methods[] = { +static PyMethodDef pygpu_select__tp_methods[] = { /* Manage Stack */ {"load_id", (PyCFunction)pygpu_select_load_id, METH_O, pygpu_select_load_id_doc}, {NULL, NULL, 0, NULL}, diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c index 75f711a8e21..6fca97bf86e 100644 --- a/source/blender/python/gpu/gpu_py_shader.c +++ b/source/blender/python/gpu/gpu_py_shader.c @@ -656,7 +656,7 @@ static PyObject *pygpu_shader_attrs_info_get(BPyGPUShader *self, PyObject *UNUSE return ret; } -static struct PyMethodDef pygpu_shader__tp_methods[] = { +static PyMethodDef pygpu_shader__tp_methods[] = { {"bind", (PyCFunction)pygpu_shader_bind, METH_NOARGS, pygpu_shader_bind_doc}, {"uniform_from_name", (PyCFunction)pygpu_shader_uniform_from_name, @@ -881,7 +881,7 @@ static PyObject *pygpu_shader_create_from_info(BPyGPUShader *UNUSED(self), return BPyGPUShader_CreatePyObject(shader, false); } -static struct PyMethodDef pygpu_shader_module__tp_methods[] = { +static PyMethodDef pygpu_shader_module__tp_methods[] = { {"unbind", (PyCFunction)pygpu_shader_unbind, METH_NOARGS, pygpu_shader_unbind_doc}, {"from_builtin", (PyCFunction)pygpu_shader_from_builtin, diff --git a/source/blender/python/gpu/gpu_py_shader_create_info.cc b/source/blender/python/gpu/gpu_py_shader_create_info.cc index 34632b4ef74..993f0b4ab8b 100644 --- a/source/blender/python/gpu/gpu_py_shader_create_info.cc +++ b/source/blender/python/gpu/gpu_py_shader_create_info.cc @@ -60,7 +60,7 @@ static const struct PyC_FlagSet pygpu_qualifiers[] = { " - ``IVEC3``\n" \ " - ``IVEC4``\n" \ " - ``BOOL``\n" -const struct PyC_StringEnumItems pygpu_attrtype_items[] = { +const PyC_StringEnumItems pygpu_attrtype_items[] = { {int(Type::FLOAT), "FLOAT"}, {int(Type::VEC2), "VEC2"}, {int(Type::VEC3), "VEC3"}, @@ -112,7 +112,7 @@ const struct PyC_StringEnumItems pygpu_attrtype_items[] = { " - ``DEPTH_2D_ARRAY``\n" \ " - ``DEPTH_CUBE``\n" \ " - ``DEPTH_CUBE_ARRAY``\n" -static const struct PyC_StringEnumItems pygpu_imagetype_items[] = { +static const PyC_StringEnumItems pygpu_imagetype_items[] = { {int(ImageType::FLOAT_BUFFER), "FLOAT_BUFFER"}, {int(ImageType::FLOAT_1D), "FLOAT_1D"}, {int(ImageType::FLOAT_1D_ARRAY), "FLOAT_1D_ARRAY"}, @@ -148,7 +148,7 @@ static const struct PyC_StringEnumItems pygpu_imagetype_items[] = { {0, nullptr}, }; -static const struct PyC_StringEnumItems pygpu_dualblend_items[] = { +static const PyC_StringEnumItems pygpu_dualblend_items[] = { {int(DualBlend::NONE), "NONE"}, {int(DualBlend::SRC_0), "SRC_0"}, {int(DualBlend::SRC_1), "SRC_1"}, @@ -165,7 +165,7 @@ static bool pygpu_interface_info_get_args(BPyGPUStageInterfaceInfo *self, Type *r_type, const char **r_name) { - struct PyC_StringEnum pygpu_type = {pygpu_attrtype_items}; + PyC_StringEnum pygpu_type = {pygpu_attrtype_items}; PyObject *py_name; if (!PyArg_ParseTuple(args, format, PyC_ParseStringEnum, &pygpu_type, &py_name)) { @@ -260,7 +260,7 @@ static PyObject *pygpu_interface_info_no_perspective(BPyGPUStageInterfaceInfo *s Py_RETURN_NONE; } -static struct PyMethodDef pygpu_interface_info__tp_methods[] = { +static PyMethodDef pygpu_interface_info__tp_methods[] = { {"smooth", (PyCFunction)pygpu_interface_info_smooth, METH_VARARGS, @@ -415,7 +415,7 @@ PyDoc_STRVAR(pygpu_shader_info_vertex_in_doc, static PyObject *pygpu_shader_info_vertex_in(BPyGPUShaderCreateInfo *self, PyObject *args) { int slot; - struct PyC_StringEnum pygpu_type = {pygpu_attrtype_items}; + PyC_StringEnum pygpu_type = {pygpu_attrtype_items}; const char *param; if (!PyArg_ParseTuple(args, "iO&s:vertex_in", &slot, PyC_ParseStringEnum, &pygpu_type, ¶m)) { @@ -478,9 +478,9 @@ static PyObject *pygpu_shader_info_fragment_out(BPyGPUShaderCreateInfo *self, PyObject *kwds) { int slot; - struct PyC_StringEnum pygpu_type = {pygpu_attrtype_items}; + PyC_StringEnum pygpu_type = {pygpu_attrtype_items}; const char *name; - struct PyC_StringEnum blend_type = {pygpu_dualblend_items, int(DualBlend::NONE)}; + PyC_StringEnum blend_type = {pygpu_dualblend_items, int(DualBlend::NONE)}; static const char *_keywords[] = {"slot", "type", "name", "blend", nullptr}; static _PyArg_Parser _parser = { @@ -652,7 +652,7 @@ PyDoc_STRVAR( static PyObject *pygpu_shader_info_sampler(BPyGPUShaderCreateInfo *self, PyObject *args) { int slot; - struct PyC_StringEnum pygpu_samplertype = {pygpu_imagetype_items}; + PyC_StringEnum pygpu_samplertype = {pygpu_imagetype_items}; const char *name; if (!PyArg_ParseTuple( @@ -765,7 +765,7 @@ static PyObject *pygpu_shader_info_push_constant(BPyGPUShaderCreateInfo *self, PyObject *args, PyObject *kwds) { - struct PyC_StringEnum pygpu_type = {pygpu_attrtype_items}; + PyC_StringEnum pygpu_type = {pygpu_attrtype_items}; const char *name = nullptr; int array_size = 0; @@ -967,7 +967,7 @@ static PyObject *pygpu_shader_info_define(BPyGPUShaderCreateInfo *self, PyObject Py_RETURN_NONE; } -static struct PyMethodDef pygpu_shader_info__tp_methods[] = { +static PyMethodDef pygpu_shader_info__tp_methods[] = { {"vertex_in", (PyCFunction)pygpu_shader_info_vertex_in, METH_VARARGS, diff --git a/source/blender/python/gpu/gpu_py_state.c b/source/blender/python/gpu/gpu_py_state.c index a1145dc6fe6..8acad65770f 100644 --- a/source/blender/python/gpu/gpu_py_state.c +++ b/source/blender/python/gpu/gpu_py_state.c @@ -430,7 +430,7 @@ static PyObject *pygpu_state_framebuffer_active_get(PyObject *UNUSED(self)) /** \name Module * \{ */ -static struct PyMethodDef pygpu_state__tp_methods[] = { +static PyMethodDef pygpu_state__tp_methods[] = { /* Manage Stack */ {"blend_set", (PyCFunction)pygpu_state_blend_set, METH_O, pygpu_state_blend_set_doc}, {"blend_get", (PyCFunction)pygpu_state_blend_get, METH_NOARGS, pygpu_state_blend_get_doc}, diff --git a/source/blender/python/gpu/gpu_py_texture.c b/source/blender/python/gpu/gpu_py_texture.c index 8642584c351..e4cbca31a16 100644 --- a/source/blender/python/gpu/gpu_py_texture.c +++ b/source/blender/python/gpu/gpu_py_texture.c @@ -441,7 +441,7 @@ static PyGetSetDef pygpu_texture__tp_getseters[] = { {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; -static struct PyMethodDef pygpu_texture__tp_methods[] = { +static PyMethodDef pygpu_texture__tp_methods[] = { {"clear", (PyCFunction)pygpu_texture_clear, METH_VARARGS | METH_KEYWORDS, @@ -556,7 +556,7 @@ static PyObject *pygpu_texture_from_image(PyObject *UNUSED(self), PyObject *arg) return BPyGPUTexture_CreatePyObject(tex, true); } -static struct PyMethodDef pygpu_texture__m_methods[] = { +static PyMethodDef pygpu_texture__m_methods[] = { {"from_image", (PyCFunction)pygpu_texture_from_image, METH_O, pygpu_texture_from_image_doc}, {NULL, NULL, 0, NULL}, }; diff --git a/source/blender/python/gpu/gpu_py_types.c b/source/blender/python/gpu/gpu_py_types.c index 3e6607c4f3c..617c3d082af 100644 --- a/source/blender/python/gpu/gpu_py_types.c +++ b/source/blender/python/gpu/gpu_py_types.c @@ -20,7 +20,7 @@ /** \name GPU Types Module * \{ */ -static struct PyModuleDef pygpu_types_module_def = { +static PyModuleDef pygpu_types_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "gpu.types", /*m_doc*/ NULL, diff --git a/source/blender/python/gpu/gpu_py_uniformbuffer.c b/source/blender/python/gpu/gpu_py_uniformbuffer.c index 0db19c42cf4..88b70677fc3 100644 --- a/source/blender/python/gpu/gpu_py_uniformbuffer.c +++ b/source/blender/python/gpu/gpu_py_uniformbuffer.c @@ -150,7 +150,7 @@ static PyGetSetDef pygpu_uniformbuffer__tp_getseters[] = { {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; -static struct PyMethodDef pygpu_uniformbuffer__tp_methods[] = { +static PyMethodDef pygpu_uniformbuffer__tp_methods[] = { {"update", (PyCFunction)pygpu_uniformbuffer_update, METH_O, pygpu_uniformbuffer_update_doc}, #ifdef BPYGPU_USE_GPUOBJ_FREE_METHOD {"free", (PyCFunction)pygpu_uniformbuffer_free, METH_NOARGS, pygpu_uniformbuffer_free_doc}, diff --git a/source/blender/python/gpu/gpu_py_vertex_buffer.c b/source/blender/python/gpu/gpu_py_vertex_buffer.c index f71a908cfa5..3fa14059311 100644 --- a/source/blender/python/gpu/gpu_py_vertex_buffer.c +++ b/source/blender/python/gpu/gpu_py_vertex_buffer.c @@ -311,7 +311,7 @@ static PyObject *pygpu_vertbuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, Py Py_RETURN_NONE; } -static struct PyMethodDef pygpu_vertbuf__tp_methods[] = { +static PyMethodDef pygpu_vertbuf__tp_methods[] = { {"attr_fill", (PyCFunction)pygpu_vertbuf_attr_fill, METH_VARARGS | METH_KEYWORDS, diff --git a/source/blender/python/gpu/gpu_py_vertex_format.c b/source/blender/python/gpu/gpu_py_vertex_format.c index 54b249d21ef..8f7b61048af 100644 --- a/source/blender/python/gpu/gpu_py_vertex_format.c +++ b/source/blender/python/gpu/gpu_py_vertex_format.c @@ -120,7 +120,7 @@ static PyObject *pygpu_vertformat_attr_add(BPyGPUVertFormat *self, PyObject *arg return PyLong_FromLong(attr_id); } -static struct PyMethodDef pygpu_vertformat__tp_methods[] = { +static PyMethodDef pygpu_vertformat__tp_methods[] = { {"attr_add", (PyCFunction)pygpu_vertformat_attr_add, METH_VARARGS | METH_KEYWORDS, diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index a8d0d994865..8e322028c31 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -549,7 +549,7 @@ static PyObject *bpy_app_help_text(PyObject *UNUSED(self), PyObject *args, PyObj return result; } -static struct PyMethodDef bpy_app_methods[] = { +static PyMethodDef bpy_app_methods[] = { {"is_job_running", (PyCFunction)bpy_app_is_job_running, METH_VARARGS | METH_KEYWORDS | METH_STATIC, diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 7a34c5736cf..668b63516a4 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -27,7 +27,7 @@ #include "BPY_extern.h" void bpy_app_generic_callback(struct Main *main, - struct PointerRNA **pointers, + PointerRNA **pointers, const int pointers_num, void *arg); @@ -344,7 +344,7 @@ static PyObject *choose_arguments(PyObject *func, PyObject *args_all, PyObject * /* the actual callback - not necessarily called from py */ void bpy_app_generic_callback(struct Main *UNUSED(main), - struct PointerRNA **pointers, + PointerRNA **pointers, const int pointers_num, void *arg) { diff --git a/source/blender/python/intern/bpy_app_icons.c b/source/blender/python/intern/bpy_app_icons.c index 9c55f650443..cd79d188dc0 100644 --- a/source/blender/python/intern/bpy_app_icons.c +++ b/source/blender/python/intern/bpy_app_icons.c @@ -147,7 +147,7 @@ static PyObject *bpy_app_icons_release(PyObject *UNUSED(self), PyObject *args, P Py_RETURN_NONE; } -static struct PyMethodDef M_AppIcons_methods[] = { +static PyMethodDef M_AppIcons_methods[] = { {"new_triangles", (PyCFunction)bpy_app_icons_new_triangles, METH_VARARGS | METH_KEYWORDS, @@ -163,7 +163,7 @@ static struct PyMethodDef M_AppIcons_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef M_AppIcons_module_def = { +static PyModuleDef M_AppIcons_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bpy.app.icons", /*m_doc*/ NULL, diff --git a/source/blender/python/intern/bpy_app_timers.c b/source/blender/python/intern/bpy_app_timers.c index c35fd5e46b8..26835f9e9fc 100644 --- a/source/blender/python/intern/bpy_app_timers.c +++ b/source/blender/python/intern/bpy_app_timers.c @@ -151,7 +151,7 @@ static PyObject *bpy_app_timers_is_registered(PyObject *UNUSED(self), PyObject * return PyBool_FromLong(ret); } -static struct PyMethodDef M_AppTimers_methods[] = { +static PyMethodDef M_AppTimers_methods[] = { {"register", (PyCFunction)bpy_app_timers_register, METH_VARARGS | METH_KEYWORDS, @@ -164,7 +164,7 @@ static struct PyMethodDef M_AppTimers_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef M_AppTimers_module_def = { +static PyModuleDef M_AppTimers_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bpy.app.timers", /*m_doc*/ NULL, diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index 7754cf962ee..926b4566199 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -183,7 +183,7 @@ static void bpy_pydriver_namespace_update_frame(const float evaltime) } } -static void bpy_pydriver_namespace_update_self(struct PathResolvedRNA *anim_rna) +static void bpy_pydriver_namespace_update_self(PathResolvedRNA *anim_rna) { if ((g_pydriver_state_prev.self == NULL) || (pyrna_driver_is_equal_anim_rna(anim_rna, g_pydriver_state_prev.self) == false)) @@ -207,7 +207,7 @@ static void bpy_pydriver_namespace_clear_self(void) static PyObject *bpy_pydriver_depsgraph_as_pyobject(struct Depsgraph *depsgraph) { - struct PointerRNA depsgraph_ptr; + PointerRNA depsgraph_ptr; RNA_pointer_create(NULL, &RNA_Depsgraph, depsgraph, &depsgraph_ptr); return pyrna_struct_CreatePyObject(&depsgraph_ptr); } @@ -283,7 +283,7 @@ void BPY_driver_reset(void) * * \param anim_rna: Used to show the target when printing the error to give additional context. */ -static void pydriver_error(ChannelDriver *driver, const struct PathResolvedRNA *anim_rna) +static void pydriver_error(ChannelDriver *driver, const PathResolvedRNA *anim_rna) { driver->flag |= DRIVER_FLAG_INVALID; /* Python expression failed. */ @@ -556,7 +556,7 @@ bool BPY_driver_secure_bytecode_test(PyObject *expr_code, PyObject *namespace, c } #endif /* USE_BYTECODE_WHITELIST */ -float BPY_driver_exec(struct PathResolvedRNA *anim_rna, +float BPY_driver_exec(PathResolvedRNA *anim_rna, ChannelDriver *driver, ChannelDriver *driver_orig, const AnimationEvalContext *anim_eval_context) diff --git a/source/blender/python/intern/bpy_interface_run.c b/source/blender/python/intern/bpy_interface_run.c index cbf394a3c50..ecaf664454c 100644 --- a/source/blender/python/intern/bpy_interface_run.c +++ b/source/blender/python/intern/bpy_interface_run.c @@ -87,11 +87,8 @@ typedef struct { * * \note Share a function for this since setup/cleanup logic is the same. */ -static bool python_script_exec(bContext *C, - const char *filepath, - struct Text *text, - struct ReportList *reports, - const bool do_jump) +static bool python_script_exec( + bContext *C, const char *filepath, Text *text, ReportList *reports, const bool do_jump) { Main *bmain_old = CTX_data_main(C); PyObject *main_mod = NULL; @@ -226,12 +223,12 @@ static bool python_script_exec(bContext *C, /** \name Run Text / Filename / String * \{ */ -bool BPY_run_filepath(bContext *C, const char *filepath, struct ReportList *reports) +bool BPY_run_filepath(bContext *C, const char *filepath, ReportList *reports) { return python_script_exec(C, filepath, NULL, reports, false); } -bool BPY_run_text(bContext *C, struct Text *text, struct ReportList *reports, const bool do_jump) +bool BPY_run_text(bContext *C, Text *text, ReportList *reports, const bool do_jump) { return python_script_exec(C, NULL, text, reports, do_jump); } diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index 52b46e74ec6..d98e2726e77 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -460,7 +460,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) /* here appending/linking starts */ const int id_tag_extra = self->bmain_is_temp ? LIB_TAG_TEMP_MAIN : 0; - struct LibraryLink_Params liblink_params; + LibraryLink_Params liblink_params; BLO_library_link_params_init(&liblink_params, bmain, self->flag, id_tag_extra); BlendfileLinkAppendContext *lapp_context = BKE_blendfile_link_append_context_new( diff --git a/source/blender/python/intern/bpy_msgbus.c b/source/blender/python/intern/bpy_msgbus.c index c9724ccd63b..af724b8f618 100644 --- a/source/blender/python/intern/bpy_msgbus.c +++ b/source/blender/python/intern/bpy_msgbus.c @@ -178,8 +178,8 @@ static void bpy_msgbus_notify(bContext *C, } /* Follow wmMsgSubscribeValueFreeDataFn spec */ -static void bpy_msgbus_subscribe_value_free_data(struct wmMsgSubscribeKey *UNUSED(msg_key), - struct wmMsgSubscribeValue *msg_val) +static void bpy_msgbus_subscribe_value_free_data(wmMsgSubscribeKey *UNUSED(msg_key), + wmMsgSubscribeValue *msg_val) { const PyGILState_STATE gilstate = PyGILState_Ensure(); Py_DECREF(msg_val->owner); @@ -379,7 +379,7 @@ static PyObject *bpy_msgbus_clear_by_owner(PyObject *UNUSED(self), PyObject *py_ Py_RETURN_NONE; } -static struct PyMethodDef BPy_msgbus_methods[] = { +static PyMethodDef BPy_msgbus_methods[] = { {"subscribe_rna", (PyCFunction)bpy_msgbus_subscribe_rna, METH_VARARGS | METH_KEYWORDS, @@ -395,7 +395,7 @@ static struct PyMethodDef BPy_msgbus_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef _bpy_msgbus_def = { +static PyModuleDef _bpy_msgbus_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "msgbus", /*m_doc*/ NULL, diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c index 50564122bc7..af11f304342 100644 --- a/source/blender/python/intern/bpy_operator.c +++ b/source/blender/python/intern/bpy_operator.c @@ -425,7 +425,7 @@ static PyObject *pyop_get_bl_options(PyObject *UNUSED(self), PyObject *value) return pyrna_enum_bitfield_as_set(rna_enum_operator_type_flag_items, ot->flag); } -static struct PyMethodDef bpy_ops_methods[] = { +static PyMethodDef bpy_ops_methods[] = { {"poll", (PyCFunction)pyop_poll, METH_VARARGS, NULL}, {"call", (PyCFunction)pyop_call, METH_VARARGS, NULL}, {"as_string", (PyCFunction)pyop_as_string, METH_VARARGS, NULL}, @@ -436,7 +436,7 @@ static struct PyMethodDef bpy_ops_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef bpy_ops_module = { +static PyModuleDef bpy_ops_module = { PyModuleDef_HEAD_INIT, /*m_name*/ "_bpy.ops", /*m_doc*/ NULL, diff --git a/source/blender/python/intern/bpy_path.c b/source/blender/python/intern/bpy_path.c index a38ce92e31c..131f1d98b2e 100644 --- a/source/blender/python/intern/bpy_path.c +++ b/source/blender/python/intern/bpy_path.c @@ -22,7 +22,7 @@ extern const char *imb_ext_movie[]; extern const char *imb_ext_audio[]; /*----------------------------MODULE INIT-------------------------*/ -static struct PyModuleDef _bpy_path_module_def = { +static PyModuleDef _bpy_path_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "_bpy_path", /*m_doc*/ NULL, diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 3725ef9d768..2f0e91db271 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -167,7 +167,7 @@ struct BPyPropStore { */ static ListBase g_bpy_prop_store_list = {NULL, NULL}; -static struct BPyPropStore *bpy_prop_py_data_ensure(struct PropertyRNA *prop) +static struct BPyPropStore *bpy_prop_py_data_ensure(PropertyRNA *prop) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); if (prop_store == NULL) { @@ -523,9 +523,7 @@ static void bpy_prop_array_matrix_swap_row_column_vn( * \{ */ /* callbacks */ -static void bpy_prop_update_fn(struct bContext *C, - struct PointerRNA *ptr, - struct PropertyRNA *prop) +static void bpy_prop_update_fn(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyGILState_STATE gilstate; @@ -581,7 +579,7 @@ static void bpy_prop_update_fn(struct bContext *C, /** \name Boolean Property Callbacks * \{ */ -static bool bpy_prop_boolean_get_fn(struct PointerRNA *ptr, struct PropertyRNA *prop) +static bool bpy_prop_boolean_get_fn(PointerRNA *ptr, PropertyRNA *prop) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -644,7 +642,7 @@ static bool bpy_prop_boolean_get_fn(struct PointerRNA *ptr, struct PropertyRNA * return value; } -static void bpy_prop_boolean_set_fn(struct PointerRNA *ptr, struct PropertyRNA *prop, bool value) +static void bpy_prop_boolean_set_fn(PointerRNA *ptr, PropertyRNA *prop, bool value) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -700,9 +698,7 @@ static void bpy_prop_boolean_set_fn(struct PointerRNA *ptr, struct PropertyRNA * } } -static void bpy_prop_boolean_array_get_fn(struct PointerRNA *ptr, - struct PropertyRNA *prop, - bool *values) +static void bpy_prop_boolean_array_get_fn(PointerRNA *ptr, PropertyRNA *prop, bool *values) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -771,9 +767,7 @@ static void bpy_prop_boolean_array_get_fn(struct PointerRNA *ptr, } } -static void bpy_prop_boolean_array_set_fn(struct PointerRNA *ptr, - struct PropertyRNA *prop, - const bool *values) +static void bpy_prop_boolean_array_set_fn(PointerRNA *ptr, PropertyRNA *prop, const bool *values) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -846,7 +840,7 @@ static void bpy_prop_boolean_array_set_fn(struct PointerRNA *ptr, /** \name Int Property Callbacks * \{ */ -static int bpy_prop_int_get_fn(struct PointerRNA *ptr, struct PropertyRNA *prop) +static int bpy_prop_int_get_fn(PointerRNA *ptr, PropertyRNA *prop) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -906,7 +900,7 @@ static int bpy_prop_int_get_fn(struct PointerRNA *ptr, struct PropertyRNA *prop) return value; } -static void bpy_prop_int_set_fn(struct PointerRNA *ptr, struct PropertyRNA *prop, int value) +static void bpy_prop_int_set_fn(PointerRNA *ptr, PropertyRNA *prop, int value) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -962,9 +956,7 @@ static void bpy_prop_int_set_fn(struct PointerRNA *ptr, struct PropertyRNA *prop } } -static void bpy_prop_int_array_get_fn(struct PointerRNA *ptr, - struct PropertyRNA *prop, - int *values) +static void bpy_prop_int_array_get_fn(PointerRNA *ptr, PropertyRNA *prop, int *values) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1033,9 +1025,7 @@ static void bpy_prop_int_array_get_fn(struct PointerRNA *ptr, } } -static void bpy_prop_int_array_set_fn(struct PointerRNA *ptr, - struct PropertyRNA *prop, - const int *values) +static void bpy_prop_int_array_set_fn(PointerRNA *ptr, PropertyRNA *prop, const int *values) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1109,7 +1099,7 @@ static void bpy_prop_int_array_set_fn(struct PointerRNA *ptr, /** \name Float Property Callbacks * \{ */ -static float bpy_prop_float_get_fn(struct PointerRNA *ptr, struct PropertyRNA *prop) +static float bpy_prop_float_get_fn(PointerRNA *ptr, PropertyRNA *prop) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1169,7 +1159,7 @@ static float bpy_prop_float_get_fn(struct PointerRNA *ptr, struct PropertyRNA *p return value; } -static void bpy_prop_float_set_fn(struct PointerRNA *ptr, struct PropertyRNA *prop, float value) +static void bpy_prop_float_set_fn(PointerRNA *ptr, PropertyRNA *prop, float value) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1225,9 +1215,7 @@ static void bpy_prop_float_set_fn(struct PointerRNA *ptr, struct PropertyRNA *pr } } -static void bpy_prop_float_array_get_fn(struct PointerRNA *ptr, - struct PropertyRNA *prop, - float *values) +static void bpy_prop_float_array_get_fn(PointerRNA *ptr, PropertyRNA *prop, float *values) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1300,9 +1288,7 @@ static void bpy_prop_float_array_get_fn(struct PointerRNA *ptr, } } -static void bpy_prop_float_array_set_fn(struct PointerRNA *ptr, - struct PropertyRNA *prop, - const float *values) +static void bpy_prop_float_array_set_fn(PointerRNA *ptr, PropertyRNA *prop, const float *values) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1376,7 +1362,7 @@ static void bpy_prop_float_array_set_fn(struct PointerRNA *ptr, /** \name String Property Callbacks * \{ */ -static void bpy_prop_string_get_fn(struct PointerRNA *ptr, struct PropertyRNA *prop, char *value) +static void bpy_prop_string_get_fn(PointerRNA *ptr, PropertyRNA *prop, char *value) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1436,7 +1422,7 @@ static void bpy_prop_string_get_fn(struct PointerRNA *ptr, struct PropertyRNA *p } } -static int bpy_prop_string_length_fn(struct PointerRNA *ptr, struct PropertyRNA *prop) +static int bpy_prop_string_length_fn(PointerRNA *ptr, PropertyRNA *prop) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1499,9 +1485,7 @@ static int bpy_prop_string_length_fn(struct PointerRNA *ptr, struct PropertyRNA return length; } -static void bpy_prop_string_set_fn(struct PointerRNA *ptr, - struct PropertyRNA *prop, - const char *value) +static void bpy_prop_string_set_fn(PointerRNA *ptr, PropertyRNA *prop, const char *value) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1612,8 +1596,8 @@ static bool bpy_prop_string_visit_fn_call(PyObject *py_func, } static void bpy_prop_string_visit_for_search_fn(const struct bContext *C, - struct PointerRNA *ptr, - struct PropertyRNA *prop, + PointerRNA *ptr, + PropertyRNA *prop, const char *edit_text, StringPropertySearchVisitFunc visit_fn, void *visit_user_data) @@ -1728,9 +1712,7 @@ static void bpy_prop_string_visit_for_search_fn(const struct bContext *C, /** \name Pointer Property Callbacks * \{ */ -static bool bpy_prop_pointer_poll_fn(struct PointerRNA *self, - PointerRNA candidate, - struct PropertyRNA *prop) +static bool bpy_prop_pointer_poll_fn(PointerRNA *self, PointerRNA candidate, PropertyRNA *prop) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_self; @@ -1783,7 +1765,7 @@ static bool bpy_prop_pointer_poll_fn(struct PointerRNA *self, /** \name Enum Property Callbacks * \{ */ -static int bpy_prop_enum_get_fn(struct PointerRNA *ptr, struct PropertyRNA *prop) +static int bpy_prop_enum_get_fn(PointerRNA *ptr, PropertyRNA *prop) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -1843,7 +1825,7 @@ static int bpy_prop_enum_get_fn(struct PointerRNA *ptr, struct PropertyRNA *prop return value; } -static void bpy_prop_enum_set_fn(struct PointerRNA *ptr, struct PropertyRNA *prop, int value) +static void bpy_prop_enum_set_fn(PointerRNA *ptr, PropertyRNA *prop, int value) { struct BPyPropStore *prop_store = RNA_property_py_data_get(prop); PyObject *py_func; @@ -2236,7 +2218,7 @@ static int bpy_prop_callback_check(PyObject *py_func, const char *keyword, int a /** \name Shared Callback Assignment * \{ */ -static void bpy_prop_callback_assign_update(struct PropertyRNA *prop, PyObject *update_fn) +static void bpy_prop_callback_assign_update(PropertyRNA *prop, PyObject *update_fn) { /* assume this is already checked for type and arg length */ if (update_fn && update_fn != Py_None) { @@ -2249,7 +2231,7 @@ static void bpy_prop_callback_assign_update(struct PropertyRNA *prop, PyObject * } } -static void bpy_prop_callback_assign_pointer(struct PropertyRNA *prop, PyObject *poll_fn) +static void bpy_prop_callback_assign_pointer(PropertyRNA *prop, PyObject *poll_fn) { if (poll_fn && poll_fn != Py_None) { struct BPyPropStore *prop_store = bpy_prop_py_data_ensure(prop); @@ -2259,9 +2241,7 @@ static void bpy_prop_callback_assign_pointer(struct PropertyRNA *prop, PyObject } } -static void bpy_prop_callback_assign_boolean(struct PropertyRNA *prop, - PyObject *get_fn, - PyObject *set_fn) +static void bpy_prop_callback_assign_boolean(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) { BooleanPropertyGetFunc rna_get_fn = NULL; BooleanPropertySetFunc rna_set_fn = NULL; @@ -2283,7 +2263,7 @@ static void bpy_prop_callback_assign_boolean(struct PropertyRNA *prop, RNA_def_property_boolean_funcs_runtime(prop, rna_get_fn, rna_set_fn); } -static void bpy_prop_callback_assign_boolean_array(struct PropertyRNA *prop, +static void bpy_prop_callback_assign_boolean_array(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) { @@ -2307,9 +2287,7 @@ static void bpy_prop_callback_assign_boolean_array(struct PropertyRNA *prop, RNA_def_property_boolean_array_funcs_runtime(prop, rna_get_fn, rna_set_fn); } -static void bpy_prop_callback_assign_int(struct PropertyRNA *prop, - PyObject *get_fn, - PyObject *set_fn) +static void bpy_prop_callback_assign_int(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) { IntPropertyGetFunc rna_get_fn = NULL; IntPropertySetFunc rna_set_fn = NULL; @@ -2331,7 +2309,7 @@ static void bpy_prop_callback_assign_int(struct PropertyRNA *prop, RNA_def_property_int_funcs_runtime(prop, rna_get_fn, rna_set_fn, NULL); } -static void bpy_prop_callback_assign_int_array(struct PropertyRNA *prop, +static void bpy_prop_callback_assign_int_array(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) { @@ -2355,9 +2333,7 @@ static void bpy_prop_callback_assign_int_array(struct PropertyRNA *prop, RNA_def_property_int_array_funcs_runtime(prop, rna_get_fn, rna_set_fn, NULL); } -static void bpy_prop_callback_assign_float(struct PropertyRNA *prop, - PyObject *get_fn, - PyObject *set_fn) +static void bpy_prop_callback_assign_float(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) { FloatPropertyGetFunc rna_get_fn = NULL; FloatPropertySetFunc rna_set_fn = NULL; @@ -2379,7 +2355,7 @@ static void bpy_prop_callback_assign_float(struct PropertyRNA *prop, RNA_def_property_float_funcs_runtime(prop, rna_get_fn, rna_set_fn, NULL); } -static void bpy_prop_callback_assign_float_array(struct PropertyRNA *prop, +static void bpy_prop_callback_assign_float_array(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn) { @@ -2403,7 +2379,7 @@ static void bpy_prop_callback_assign_float_array(struct PropertyRNA *prop, RNA_def_property_float_array_funcs_runtime(prop, rna_get_fn, rna_set_fn, NULL); } -static void bpy_prop_callback_assign_string(struct PropertyRNA *prop, +static void bpy_prop_callback_assign_string(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *search_fn, @@ -2441,7 +2417,7 @@ static void bpy_prop_callback_assign_string(struct PropertyRNA *prop, } } -static void bpy_prop_callback_assign_enum(struct PropertyRNA *prop, +static void bpy_prop_callback_assign_enum(PropertyRNA *prop, PyObject *get_fn, PyObject *set_fn, PyObject *itemf_fn) @@ -4646,7 +4622,7 @@ static PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw /** \name Main Module `bpy.props` * \{ */ -static struct PyMethodDef props_methods[] = { +static PyMethodDef props_methods[] = { {"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS | METH_KEYWORDS, @@ -4726,7 +4702,7 @@ PyDoc_STRVAR( "\n" ".. note:: All parameters to these functions must be passed as keywords.\n"); -static struct PyModuleDef props_module = { +static PyModuleDef props_module = { PyModuleDef_HEAD_INIT, /*m_name*/ "bpy.props", /*m_doc*/ props_module_doc, diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index f16b376baec..93ff16935c9 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -288,7 +288,7 @@ static void id_release_weakref(struct ID *id) #endif /* USE_PYRNA_INVALIDATE_WEAKREF */ -void BPY_id_release(struct ID *id) +void BPY_id_release(ID *id) { #ifdef USE_PYRNA_INVALIDATE_GC id_release_gc(id); @@ -5803,7 +5803,7 @@ static PyObject *pyrna_prop_collection_iter(BPy_PropertyRNA *self) } #endif /* # !USE_PYRNA_ITER */ -static struct PyMethodDef pyrna_struct_methods[] = { +static PyMethodDef pyrna_struct_methods[] = { /* Only for PointerRNA's with ID'props. */ {"keys", (PyCFunction)pyrna_struct_keys, METH_NOARGS, pyrna_struct_keys_doc}, @@ -5906,7 +5906,7 @@ static struct PyMethodDef pyrna_struct_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef pyrna_prop_methods[] = { +static PyMethodDef pyrna_prop_methods[] = { {"path_from_id", (PyCFunction)pyrna_prop_path_from_id, METH_NOARGS, @@ -5917,7 +5917,7 @@ static struct PyMethodDef pyrna_prop_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef pyrna_prop_array_methods[] = { +static PyMethodDef pyrna_prop_array_methods[] = { {"foreach_get", (PyCFunction)pyrna_prop_array_foreach_get, METH_VARARGS, @@ -5930,7 +5930,7 @@ static struct PyMethodDef pyrna_prop_array_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef pyrna_prop_collection_methods[] = { +static PyMethodDef pyrna_prop_collection_methods[] = { {"foreach_get", (PyCFunction)pyrna_prop_collection_foreach_get, METH_VARARGS, @@ -5955,7 +5955,7 @@ static struct PyMethodDef pyrna_prop_collection_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyMethodDef pyrna_prop_collection_idprop_methods[] = { +static PyMethodDef pyrna_prop_collection_idprop_methods[] = { {"add", (PyCFunction)pyrna_prop_collection_idprop_add, METH_NOARGS, NULL}, {"remove", (PyCFunction)pyrna_prop_collection_idprop_remove, METH_O, NULL}, {"clear", (PyCFunction)pyrna_prop_collection_idprop_clear, METH_NOARGS, NULL}, @@ -7781,14 +7781,14 @@ static PyObject *bpy_types_module_dir(PyObject *self) return ret; } -static struct PyMethodDef bpy_types_module_methods[] = { +static PyMethodDef bpy_types_module_methods[] = { {"__getattr__", (PyCFunction)bpy_types_module_getattro, METH_O, NULL}, {"__dir__", (PyCFunction)bpy_types_module_dir, METH_NOARGS, NULL}, {NULL, NULL, 0, NULL}, }; PyDoc_STRVAR(bpy_types_module_doc, "Access to internal Blender types"); -static struct PyModuleDef bpy_types_module_def = { +static PyModuleDef bpy_types_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "bpy.types", /*m_doc*/ bpy_types_module_doc, @@ -9153,9 +9153,7 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla Py_RETURN_NONE; } -void pyrna_struct_type_extend_capi(struct StructRNA *srna, - struct PyMethodDef *method, - struct PyGetSetDef *getset) +void pyrna_struct_type_extend_capi(StructRNA *srna, PyMethodDef *method, PyGetSetDef *getset) { /* See 'add_methods' in Python's 'typeobject.c'. */ PyTypeObject *type = (PyTypeObject *)pyrna_srna_Subtype(srna); diff --git a/source/blender/python/intern/bpy_rna_callback.c b/source/blender/python/intern/bpy_rna_callback.c index 27e3e7e3038..5cb2c42f6d3 100644 --- a/source/blender/python/intern/bpy_rna_callback.c +++ b/source/blender/python/intern/bpy_rna_callback.c @@ -490,12 +490,12 @@ static void cb_customdata_free(void *customdata) } } -void BPY_callback_screen_free(struct ARegionType *art) +void BPY_callback_screen_free(ARegionType *art) { ED_region_draw_cb_remove_by_type(art, cb_region_draw, cb_customdata_free); } -void BPY_callback_wm_free(struct wmWindowManager *wm) +void BPY_callback_wm_free(wmWindowManager *wm) { WM_paint_cursor_remove_by_type(wm, cb_wm_cursor_draw, cb_customdata_free); } diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c index 13bb2882879..0dc8730dc3a 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.c +++ b/source/blender/python/intern/bpy_rna_gizmo.c @@ -398,7 +398,7 @@ static PyObject *bpy_gizmo_target_set_handler(PyObject *UNUSED(self), PyObject * WM_gizmo_target_property_def_func_ptr(gz, gz_prop_type, - &(const struct wmGizmoPropertyFnParams){ + &(const wmGizmoPropertyFnParams){ .value_get_fn = py_rna_gizmo_handler_get_cb, .value_set_fn = py_rna_gizmo_handler_set_cb, .range_get_fn = py_rna_gizmo_handler_range_get_cb, diff --git a/source/blender/python/intern/bpy_rna_types_capi.c b/source/blender/python/intern/bpy_rna_types_capi.c index d734cd21ba4..66be3eb5820 100644 --- a/source/blender/python/intern/bpy_rna_types_capi.c +++ b/source/blender/python/intern/bpy_rna_types_capi.c @@ -46,7 +46,7 @@ /** \name Blend Data * \{ */ -static struct PyMethodDef pyrna_blenddata_methods[] = { +static PyMethodDef pyrna_blenddata_methods[] = { {NULL, NULL, 0, NULL}, /* #BPY_rna_id_collection_user_map_method_def */ {NULL, NULL, 0, NULL}, /* #BPY_rna_id_collection_batch_remove_method_def */ {NULL, NULL, 0, NULL}, /* #BPY_rna_id_collection_orphans_purge_method_def */ @@ -60,7 +60,7 @@ static struct PyMethodDef pyrna_blenddata_methods[] = { /** \name Blend Data Libraries * \{ */ -static struct PyMethodDef pyrna_blenddatalibraries_methods[] = { +static PyMethodDef pyrna_blenddatalibraries_methods[] = { {NULL, NULL, 0, NULL}, /* #BPY_library_load_method_def */ {NULL, NULL, 0, NULL}, /* #BPY_library_write_method_def */ {NULL, NULL, 0, NULL}, @@ -72,7 +72,7 @@ static struct PyMethodDef pyrna_blenddatalibraries_methods[] = { /** \name UI Layout * \{ */ -static struct PyMethodDef pyrna_uilayout_methods[] = { +static PyMethodDef pyrna_uilayout_methods[] = { {NULL, NULL, 0, NULL}, /* #BPY_rna_uilayout_introspect_method_def */ {NULL, NULL, 0, NULL}, }; @@ -83,7 +83,7 @@ static struct PyMethodDef pyrna_uilayout_methods[] = { /** \name Operator * \{ */ -static struct PyMethodDef pyrna_operator_methods[] = { +static PyMethodDef pyrna_operator_methods[] = { {NULL, NULL, 0, NULL}, /* #BPY_rna_operator_poll_message_set */ {NULL, NULL, 0, NULL}, }; @@ -94,7 +94,7 @@ static struct PyMethodDef pyrna_operator_methods[] = { /** \name Text Editor * \{ */ -static struct PyMethodDef pyrna_text_methods[] = { +static PyMethodDef pyrna_text_methods[] = { {NULL, NULL, 0, NULL}, /* #BPY_rna_region_as_string_method_def */ {NULL, NULL, 0, NULL}, /* #BPY_rna_region_from_string_method_def */ {NULL, NULL, 0, NULL}, @@ -175,7 +175,7 @@ PyDoc_STRVAR(pyrna_draw_cursor_remove_doc, " :arg handler: The draw cursor handler that should be removed.\n" " :type handler: object\n"); -static struct PyMethodDef pyrna_windowmanager_methods[] = { +static PyMethodDef pyrna_windowmanager_methods[] = { {"draw_cursor_add", (PyCFunction)pyrna_callback_classmethod_add, METH_VARARGS | METH_CLASS, @@ -187,7 +187,7 @@ static struct PyMethodDef pyrna_windowmanager_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyGetSetDef pyrna_windowmanager_getset[] = { +static PyGetSetDef pyrna_windowmanager_getset[] = { {"clipboard", pyrna_WindowManager_clipboard_get, pyrna_WindowManager_clipboard_set, @@ -202,7 +202,7 @@ static struct PyGetSetDef pyrna_windowmanager_getset[] = { /** \name Context Type * \{ */ -static struct PyMethodDef pyrna_context_methods[] = { +static PyMethodDef pyrna_context_methods[] = { {NULL, NULL, 0, NULL}, /* #BPY_rna_context_temp_override_method_def */ {NULL, NULL, 0, NULL}, }; @@ -247,7 +247,7 @@ PyDoc_STRVAR(pyrna_draw_handler_remove_doc, " :arg region_type: Region type the callback was added to.\n" " :type region_type: str\n"); -static struct PyMethodDef pyrna_space_methods[] = { +static PyMethodDef pyrna_space_methods[] = { {"draw_handler_add", (PyCFunction)pyrna_callback_classmethod_add, METH_VARARGS | METH_CLASS, diff --git a/source/blender/python/intern/bpy_utils_previews.c b/source/blender/python/intern/bpy_utils_previews.c index 411e98bea6a..df4595c9388 100644 --- a/source/blender/python/intern/bpy_utils_previews.c +++ b/source/blender/python/intern/bpy_utils_previews.c @@ -148,7 +148,7 @@ static PyObject *bpy_utils_previews_release(PyObject *UNUSED(self), PyObject *ar Py_RETURN_NONE; } -static struct PyMethodDef bpy_utils_previews_methods[] = { +static PyMethodDef bpy_utils_previews_methods[] = { /* Can't use METH_KEYWORDS alone, see http://bugs.python.org/issue11587 */ {"new", (PyCFunction)bpy_utils_previews_new, METH_VARARGS, bpy_utils_previews_new_doc}, {"load", (PyCFunction)bpy_utils_previews_load, METH_VARARGS, bpy_utils_previews_load_doc}, @@ -163,7 +163,7 @@ PyDoc_STRVAR( bpy_utils_previews_doc, "This object contains basic static methods to handle cached (non-ID) previews in Blender\n" "(low-level API, not exposed to final users)."); -static struct PyModuleDef bpy_utils_previews_module = { +static PyModuleDef bpy_utils_previews_module = { PyModuleDef_HEAD_INIT, /*m_name*/ "bpy._utils_previews", /*m_doc*/ bpy_utils_previews_doc, diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c index 473dc1646bc..dc0cc477023 100644 --- a/source/blender/python/intern/bpy_utils_units.c +++ b/source/blender/python/intern/bpy_utils_units.c @@ -338,7 +338,7 @@ static PyMethodDef bpyunits_methods[] = { PyDoc_STRVAR(bpyunits_doc, "This module contains some data/methods regarding units handling."); -static struct PyModuleDef bpyunits_module = { +static PyModuleDef bpyunits_module = { PyModuleDef_HEAD_INIT, /*m_name*/ "bpy.utils.units", /*m_doc*/ bpyunits_doc, diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index b203daee1ba..5a0b4ac1323 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -528,7 +528,7 @@ int EXPP_VectorsAreEqual(const float *vecA, const float *vecB, int size, int flo } #ifndef MATH_STANDALONE -PyObject *mathutils_dynstr_to_py(struct DynStr *ds) +PyObject *mathutils_dynstr_to_py(DynStr *ds) { const int ds_len = BLI_dynstr_get_len(ds); /* space for \0 */ char *ds_buf = PyMem_Malloc(ds_len + 1); @@ -767,11 +767,11 @@ PyObject *_BaseMathObject_new_impl(PyTypeObject *root_type, PyTypeObject *base_t } /*----------------------------MODULE INIT-------------------------*/ -static struct PyMethodDef M_Mathutils_methods[] = { +static PyMethodDef M_Mathutils_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef M_Mathutils_module_def = { +static PyModuleDef M_Mathutils_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "mathutils", /*m_doc*/ M_Mathutils_doc, diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index 8451874204b..3042ed1dca3 100644 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -1053,7 +1053,7 @@ static PyGetSetDef Color_getseters[] = { /** \name Color Type: Method Definitions * \{ */ -static struct PyMethodDef Color_methods[] = { +static PyMethodDef Color_methods[] = { {"copy", (PyCFunction)Color_copy, METH_NOARGS, Color_copy_doc}, {"__copy__", (PyCFunction)Color_copy, METH_NOARGS, Color_copy_doc}, {"__deepcopy__", (PyCFunction)Color_deepcopy, METH_VARARGS, Color_copy_doc}, diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c index f2e027b1796..0791daf914b 100644 --- a/source/blender/python/mathutils/mathutils_Euler.c +++ b/source/blender/python/mathutils/mathutils_Euler.c @@ -749,7 +749,7 @@ static PyGetSetDef Euler_getseters[] = { /** \name Euler Type: Method Definitions * \{ */ -static struct PyMethodDef Euler_methods[] = { +static PyMethodDef Euler_methods[] = { {"zero", (PyCFunction)Euler_zero, METH_NOARGS, Euler_zero_doc}, {"to_matrix", (PyCFunction)Euler_to_matrix, METH_NOARGS, Euler_to_matrix_doc}, {"to_quaternion", (PyCFunction)Euler_to_quaternion, METH_NOARGS, Euler_to_quaternion_doc}, diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index da4d95fe71e..95549bcfb8f 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -3254,7 +3254,7 @@ static PyGetSetDef Matrix_getseters[] = { /** \name Matrix Type: Method Definitions * \{ */ -static struct PyMethodDef Matrix_methods[] = { +static PyMethodDef Matrix_methods[] = { /* Derived values. */ {"determinant", (PyCFunction)Matrix_determinant, METH_NOARGS, Matrix_determinant_doc}, {"decompose", (PyCFunction)Matrix_decompose, METH_NOARGS, Matrix_decompose_doc}, diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index 64c12e30133..d160123c560 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -1605,7 +1605,7 @@ static PyGetSetDef Quaternion_getseters[] = { /** \name Quaternion Type: Method Definitions * \{ */ -static struct PyMethodDef Quaternion_methods[] = { +static PyMethodDef Quaternion_methods[] = { /* In place only. */ {"identity", (PyCFunction)Quaternion_identity, METH_NOARGS, Quaternion_identity_doc}, {"negate", (PyCFunction)Quaternion_negate, METH_NOARGS, Quaternion_negate_doc}, diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 97340c62ddc..240655ee156 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -3135,7 +3135,7 @@ static PyGetSetDef Vector_getseters[] = { /** \name Vector Type: Method Definitions * \{ */ -static struct PyMethodDef Vector_methods[] = { +static PyMethodDef Vector_methods[] = { /* Class Methods */ {"Fill", (PyCFunction)C_Vector_Fill, METH_VARARGS | METH_CLASS, C_Vector_Fill_doc}, {"Range", (PyCFunction)C_Vector_Range, METH_VARARGS | METH_CLASS, C_Vector_Range_doc}, diff --git a/source/blender/python/mathutils/mathutils_bvhtree.cc b/source/blender/python/mathutils/mathutils_bvhtree.cc index 184b10ca04a..28fa23825a8 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.cc +++ b/source/blender/python/mathutils/mathutils_bvhtree.cc @@ -754,7 +754,7 @@ static PyObject *C_BVHTree_FromPolygons(PyObject * /*cls*/, PyObject *args, PyOb /* ngon support (much more involved) */ const uint polys_len = uint(PySequence_Fast_GET_SIZE(py_tris_fast)); struct PolyLink { - struct PolyLink *next; + PolyLink *next; uint len; uint poly[0]; } *plink_first = nullptr, **p_plink_prev = &plink_first, *plink = nullptr; diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c index 318039bfd21..2ee1cee55ef 100644 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -1827,7 +1827,7 @@ static PyMethodDef M_Geometry_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef M_Geometry_module_def = { +static PyModuleDef M_Geometry_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "mathutils.geometry", /*m_doc*/ M_Geometry_doc, diff --git a/source/blender/python/mathutils/mathutils_interpolate.c b/source/blender/python/mathutils/mathutils_interpolate.c index 20ec0dfb70c..5f6d8096742 100644 --- a/source/blender/python/mathutils/mathutils_interpolate.c +++ b/source/blender/python/mathutils/mathutils_interpolate.c @@ -90,7 +90,7 @@ static PyMethodDef M_Interpolate_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef M_Interpolate_module_def = { +static PyModuleDef M_Interpolate_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "mathutils.interpolate", /*m_doc*/ M_Interpolate_doc, diff --git a/source/blender/python/mathutils/mathutils_kdtree.c b/source/blender/python/mathutils/mathutils_kdtree.c index 98ed9fe361c..44fe41a1f38 100644 --- a/source/blender/python/mathutils/mathutils_kdtree.c +++ b/source/blender/python/mathutils/mathutils_kdtree.c @@ -404,7 +404,7 @@ PyTypeObject PyKDTree_Type = { /*tp_weaklistoffset*/ 0, /*tp_iter*/ NULL, /*tp_iternext*/ NULL, - /*tp_methods*/ (struct PyMethodDef *)PyKDTree_methods, + /*tp_methods*/ (PyMethodDef *)PyKDTree_methods, /*tp_members*/ NULL, /*tp_getset*/ NULL, /*tp_base*/ NULL, @@ -429,7 +429,7 @@ PyTypeObject PyKDTree_Type = { }; PyDoc_STRVAR(py_kdtree_doc, "Generic 3-dimensional kd-tree to perform spatial searches."); -static struct PyModuleDef kdtree_moduledef = { +static PyModuleDef kdtree_moduledef = { PyModuleDef_HEAD_INIT, /*m_name*/ "mathutils.kdtree", /*m_doc*/ py_kdtree_doc, diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c index 577cbcfd53b..6b22d0b6dd0 100644 --- a/source/blender/python/mathutils/mathutils_noise.c +++ b/source/blender/python/mathutils/mathutils_noise.c @@ -1098,7 +1098,7 @@ static PyMethodDef M_Noise_methods[] = { {NULL, NULL, 0, NULL}, }; -static struct PyModuleDef M_Noise_module_def = { +static PyModuleDef M_Noise_module_def = { PyModuleDef_HEAD_INIT, /*m_name*/ "mathutils.noise", /*m_doc*/ M_Noise_doc, diff --git a/source/blender/render/intern/engine.cc b/source/blender/render/intern/engine.cc index b4f9324937b..0a6a14aa71e 100644 --- a/source/blender/render/intern/engine.cc +++ b/source/blender/render/intern/engine.cc @@ -973,8 +973,8 @@ static void engine_render_view_layer(Render *re, /* Callback function for engine_render_create_result to add all render passes to the result. */ static void engine_render_add_result_pass_cb(void *user_data, - struct Scene * /*scene*/, - struct ViewLayer *view_layer, + Scene * /*scene*/, + ViewLayer *view_layer, const char *name, int channels, const char *chanid, @@ -1170,9 +1170,9 @@ bool RE_engine_render(Render *re, bool do_all) return true; } -void RE_engine_update_render_passes(struct RenderEngine *engine, - struct Scene *scene, - struct ViewLayer *view_layer, +void RE_engine_update_render_passes(RenderEngine *engine, + Scene *scene, + ViewLayer *view_layer, update_render_passes_cb_t callback, void *callback_data) { @@ -1191,9 +1191,9 @@ void RE_engine_update_render_passes(struct RenderEngine *engine, BLI_mutex_unlock(&engine->update_render_passes_mutex); } -void RE_engine_register_pass(struct RenderEngine *engine, - struct Scene *scene, - struct ViewLayer *view_layer, +void RE_engine_register_pass(RenderEngine *engine, + Scene *scene, + ViewLayer *view_layer, const char *name, int channels, const char *chanid, @@ -1219,7 +1219,7 @@ void RE_engine_free_blender_memory(RenderEngine *engine) engine_depsgraph_free(engine); } -struct RenderEngine *RE_engine_get(const Render *re) +RenderEngine *RE_engine_get(const Render *re) { return re->engine; } diff --git a/source/blender/render/intern/initrender.cc b/source/blender/render/intern/initrender.cc index c0f0529fb39..64409a4f3cd 100644 --- a/source/blender/render/intern/initrender.cc +++ b/source/blender/render/intern/initrender.cc @@ -149,7 +149,7 @@ float RE_filter_value(int type, float x) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -struct Object *RE_GetCamera(Render *re) +Object *RE_GetCamera(Render *re) { Object *camera = re->camera_override ? re->camera_override : re->scene->camera; return BKE_camera_multiview_render(re->scene, camera, re->viewname); @@ -180,13 +180,13 @@ void RE_SetCamera(Render *re, const Object *cam_ob) re->viewplane = params.viewplane; } -void RE_GetCameraWindow(struct Render *re, const struct Object *camera, float r_winmat[4][4]) +void RE_GetCameraWindow(Render *re, const Object *camera, float r_winmat[4][4]) { RE_SetCamera(re, camera); copy_m4_m4(r_winmat, re->winmat); } -void RE_GetCameraWindowWithOverscan(const struct Render *re, float overscan, float r_winmat[4][4]) +void RE_GetCameraWindowWithOverscan(const Render *re, float overscan, float r_winmat[4][4]) { CameraParams params; params.is_ortho = re->winmat[3][3] != 0.0f; @@ -204,7 +204,7 @@ void RE_GetCameraWindowWithOverscan(const struct Render *re, float overscan, flo copy_m4_m4(r_winmat, params.winmat); } -void RE_GetCameraModelMatrix(const Render *re, const struct Object *camera, float r_modelmat[4][4]) +void RE_GetCameraModelMatrix(const Render *re, const Object *camera, float r_modelmat[4][4]) { BKE_camera_multiview_model_matrix(&re->r, camera, re->viewname, r_modelmat); } diff --git a/source/blender/render/intern/pipeline.cc b/source/blender/render/intern/pipeline.cc index 4e37ce8abf3..53896aaeea8 100644 --- a/source/blender/render/intern/pipeline.cc +++ b/source/blender/render/intern/pipeline.cc @@ -166,7 +166,7 @@ static bool do_write_image_or_movie(Render *re, /* default callbacks, set in each new render */ static void result_nothing(void * /*arg*/, RenderResult * /*rr*/) {} -static void result_rcti_nothing(void * /*arg*/, RenderResult * /*rr*/, struct rcti * /*rect*/) {} +static void result_rcti_nothing(void * /*arg*/, RenderResult * /*rr*/, rcti * /*rect*/) {} static void current_scene_nothing(void * /*arg*/, Scene * /*scene*/) {} static void stats_nothing(void * /*arg*/, RenderStats * /*rs*/) {} static void float_nothing(void * /*arg*/, float /*val*/) {} @@ -227,9 +227,7 @@ void RE_FreeRenderResult(RenderResult *rr) render_result_free(rr); } -RenderBuffer *RE_RenderLayerGetPassBuffer(struct RenderLayer *rl, - const char *name, - const char *viewname) +RenderBuffer *RE_RenderLayerGetPassBuffer(RenderLayer *rl, const char *name, const char *viewname) { RenderPass *rpass = RE_pass_find_by_name(rl, name, viewname); return rpass ? &rpass->buffer : nullptr; @@ -1259,7 +1257,7 @@ bool RE_seq_render_active(Scene *scene, RenderData *rd) static void do_render_sequencer(Render *re) { static int recurs_depth = 0; - struct ImBuf *out; + ImBuf *out; RenderResult *rr; /* don't assign re->result here as it might change during give_ibuf_seq */ int cfra = re->r.cfra; SeqRenderData context; @@ -2542,7 +2540,7 @@ void RE_result_load_from_file(RenderResult *result, ReportList *reports, const c } } -bool RE_layers_have_name(struct RenderResult *result) +bool RE_layers_have_name(RenderResult *result) { switch (BLI_listbase_count_at_most(&result->layers, 2)) { case 0: @@ -2554,7 +2552,7 @@ bool RE_layers_have_name(struct RenderResult *result) } } -bool RE_passes_have_name(struct RenderLayer *rl) +bool RE_passes_have_name(RenderLayer *rl) { LISTBASE_FOREACH (RenderPass *, rp, &rl->passes) { if (!STREQ(rp->name, "Combined")) { diff --git a/source/blender/render/intern/render_result.cc b/source/blender/render/intern/render_result.cc index 7026b1c2851..42dfe8a9256 100644 --- a/source/blender/render/intern/render_result.cc +++ b/source/blender/render/intern/render_result.cc @@ -402,7 +402,7 @@ void RE_create_render_pass(RenderResult *rr, } } -void RE_pass_set_buffer_data(struct RenderPass *pass, float *data) +void RE_pass_set_buffer_data(RenderPass *pass, float *data) { RE_RenderBuffer_assign_data(&pass->buffer, data); } diff --git a/source/blender/render/intern/texture_image.c b/source/blender/render/intern/texture_image.c index 4b4521c01e3..a93239990c7 100644 --- a/source/blender/render/intern/texture_image.c +++ b/source/blender/render/intern/texture_image.c @@ -47,7 +47,7 @@ static void boxsample(ImBuf *ibuf, /* *********** IMAGEWRAPPING ****************** */ /* x and y have to be checked for image size */ -static void ibuf_get_color(float col[4], struct ImBuf *ibuf, int x, int y) +static void ibuf_get_color(float col[4], ImBuf *ibuf, int x, int y) { int ofs = y * ibuf->x + x; @@ -461,7 +461,7 @@ static float clipy_rctf(rctf *rf, float y1, float y2) return 1.0; } -static void boxsampleclip(struct ImBuf *ibuf, rctf *rf, TexResult *texres) +static void boxsampleclip(ImBuf *ibuf, rctf *rf, TexResult *texres) { /* Sample box, is clipped already, and minx etc. have been set at ibuf size. * Enlarge with anti-aliased edges of the pixels. */ diff --git a/source/blender/render/intern/texture_pointdensity.c b/source/blender/render/intern/texture_pointdensity.c index e079712fc37..b7c38699c2d 100644 --- a/source/blender/render/intern/texture_pointdensity.c +++ b/source/blender/render/intern/texture_pointdensity.c @@ -486,7 +486,7 @@ typedef struct PointDensityRangeData { short falloff_type; short noise_influence; float *age; - struct CurveMapping *density_curve; + CurveMapping *density_curve; float velscale; } PointDensityRangeData; @@ -567,7 +567,7 @@ static void init_pointdensityrangedata(PointDensity *pd, float *vec, float *age, float *col, - struct CurveMapping *density_curve, + CurveMapping *density_curve, float velscale) { pdr->squared_radius = pd->radius * pd->radius; @@ -798,7 +798,7 @@ static void particle_system_minmax(Depsgraph *depsgraph, psys_sim_data_free(&sim); } -void RE_point_density_cache(struct Depsgraph *depsgraph, PointDensity *pd) +void RE_point_density_cache(Depsgraph *depsgraph, PointDensity *pd) { Scene *scene = DEG_get_evaluated_scene(depsgraph); @@ -808,8 +808,8 @@ void RE_point_density_cache(struct Depsgraph *depsgraph, PointDensity *pd) BLI_mutex_unlock(&sample_mutex); } -void RE_point_density_minmax(struct Depsgraph *depsgraph, - struct PointDensity *pd, +void RE_point_density_minmax(Depsgraph *depsgraph, + PointDensity *pd, float r_min[3], float r_max[3]) { @@ -941,7 +941,7 @@ void RE_point_density_sample(Depsgraph *depsgraph, free_pointdensity(pd); } -void RE_point_density_free(struct PointDensity *pd) +void RE_point_density_free(PointDensity *pd) { free_pointdensity(pd); } diff --git a/source/blender/sequencer/intern/clipboard.c b/source/blender/sequencer/intern/clipboard.c index ede52c01676..77a4c9325a5 100644 --- a/source/blender/sequencer/intern/clipboard.c +++ b/source/blender/sequencer/intern/clipboard.c @@ -49,7 +49,7 @@ ListBase drivers_clipboard; int seqbase_clipboard_frame; static char seq_clipboard_active_seq_name[SEQ_NAME_MAXSTR]; -void seq_clipboard_pointers_free(struct ListBase *seqbase); +void seq_clipboard_pointers_free(ListBase *seqbase); void SEQ_clipboard_free(void) { diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index 6a5c1ea6012..be3b0a954bc 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -710,10 +710,10 @@ static void do_gammacross_effect_float( } } -static struct ImBuf *gammacross_init_execution(const SeqRenderData *context, - ImBuf *ibuf1, - ImBuf *ibuf2, - ImBuf *ibuf3) +static ImBuf *gammacross_init_execution(const SeqRenderData *context, + ImBuf *ibuf1, + ImBuf *ibuf2, + ImBuf *ibuf3) { ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3); build_gammatabs(); @@ -3307,7 +3307,7 @@ static ImBuf *do_text_effect(const SeqRenderData *context, TextVars *data = seq->effectdata; int width = out->x; int height = out->y; - struct ColorManagedDisplay *display; + ColorManagedDisplay *display; const char *display_device; int font = blf_mono_font_render; int line_height; @@ -3491,10 +3491,10 @@ static void get_default_fac_fade(const Scene *scene, *fac /= SEQ_time_strip_length_get(scene, seq); } -static struct ImBuf *init_execution(const SeqRenderData *context, - ImBuf *ibuf1, - ImBuf *ibuf2, - ImBuf *ibuf3) +static ImBuf *init_execution(const SeqRenderData *context, + ImBuf *ibuf1, + ImBuf *ibuf2, + ImBuf *ibuf3) { ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3); diff --git a/source/blender/sequencer/intern/image_cache.c b/source/blender/sequencer/intern/image_cache.c index faab373a3f5..72b804445d5 100644 --- a/source/blender/sequencer/intern/image_cache.c +++ b/source/blender/sequencer/intern/image_cache.c @@ -74,18 +74,18 @@ typedef struct SeqCache { Main *bmain; - struct GHash *hash; + GHash *hash; ThreadMutex iterator_mutex; - struct BLI_mempool *keys_pool; - struct BLI_mempool *items_pool; - struct SeqCacheKey *last_key; + BLI_mempool *keys_pool; + BLI_mempool *items_pool; + SeqCacheKey *last_key; struct SeqDiskCache *disk_cache; int thumbnail_count; } SeqCache; typedef struct SeqCacheItem { - struct SeqCache *cache_owner; - struct ImBuf *ibuf; + SeqCache *cache_owner; + ImBuf *ibuf; } SeqCacheItem; static ThreadMutex cache_create_lock = BLI_MUTEX_INITIALIZER; @@ -728,10 +728,7 @@ void seq_cache_thumbnail_cleanup(Scene *scene, rctf *view_area_safe) cache->last_key = NULL; } -struct ImBuf *seq_cache_get(const SeqRenderData *context, - Sequence *seq, - float timeline_frame, - int type) +ImBuf *seq_cache_get(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type) { if (context->skip_cache || context->is_proxy_render || !seq) { @@ -897,10 +894,10 @@ void seq_cache_put( } void SEQ_cache_iterate( - struct Scene *scene, + Scene *scene, void *userdata, bool callback_init(void *userdata, size_t item_count), - bool callback_iter(void *userdata, struct Sequence *seq, int timeline_frame, int cache_type)) + bool callback_iter(void *userdata, Sequence *seq, int timeline_frame, int cache_type)) { SeqCache *cache = seq_cache_get_from_scene(scene); if (!cache) { diff --git a/source/blender/sequencer/intern/modifier.c b/source/blender/sequencer/intern/modifier.c index 7da6f1d015c..6d805245fd0 100644 --- a/source/blender/sequencer/intern/modifier.c +++ b/source/blender/sequencer/intern/modifier.c @@ -823,7 +823,7 @@ static void curves_apply_threaded(int width, } } -static void curves_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask) +static void curves_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask) { CurvesModifierData *cmd = (CurvesModifierData *)smd; @@ -955,7 +955,7 @@ static void hue_correct_apply_threaded(int width, } } -static void hue_correct_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask) +static void hue_correct_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask) { HueCorrectModifierData *hcmd = (HueCorrectModifierData *)smd; @@ -1060,7 +1060,7 @@ static void brightcontrast_apply_threaded(int width, } } -static void brightcontrast_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask) +static void brightcontrast_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask) { BrightContrastModifierData *bcmd = (BrightContrastModifierData *)smd; BrightContrastThreadData data; @@ -1137,7 +1137,7 @@ static void maskmodifier_apply_threaded(int width, } } -static void maskmodifier_apply(struct SequenceModifierData *UNUSED(smd), ImBuf *ibuf, ImBuf *mask) +static void maskmodifier_apply(SequenceModifierData *UNUSED(smd), ImBuf *ibuf, ImBuf *mask) { // SequencerMaskModifierData *bcmd = (SequencerMaskModifierData *)smd; @@ -1163,7 +1163,7 @@ static SequenceModifierTypeInfo seqModifier_Mask = { typedef struct AvgLogLum { SequencerTonemapModifierData *tmmd; - struct ColorSpace *colorspace; + ColorSpace *colorspace; float al; float auto_key; float lav; @@ -1307,7 +1307,7 @@ static void tonemapmodifier_apply_threaded_photoreceptor(int width, } } -static void tonemapmodifier_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask) +static void tonemapmodifier_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask) { SequencerTonemapModifierData *tmmd = (SequencerTonemapModifierData *)smd; AvgLogLum data; diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c index ea0b9d2bb9d..463e2efc9e3 100644 --- a/source/blender/sequencer/intern/prefetch.c +++ b/source/blender/sequencer/intern/prefetch.c @@ -52,11 +52,11 @@ typedef struct PrefetchJob { struct PrefetchJob *next, *prev; - struct Main *bmain; - struct Main *bmain_eval; - struct Scene *scene; - struct Scene *scene_eval; - struct Depsgraph *depsgraph; + Main *bmain; + Main *bmain_eval; + Scene *scene; + Scene *scene_eval; + Depsgraph *depsgraph; ThreadMutex prefetch_suspend_mutex; ThreadCondition prefetch_suspend_cond; @@ -64,10 +64,10 @@ typedef struct PrefetchJob { ListBase threads; /* context */ - struct SeqRenderData context; - struct SeqRenderData context_cpy; - struct ListBase *seqbasep; - struct ListBase *seqbasep_cpy; + SeqRenderData context; + SeqRenderData context_cpy; + ListBase *seqbasep; + ListBase *seqbasep_cpy; /* prefetch area */ float cfra; diff --git a/source/blender/sequencer/intern/proxy.c b/source/blender/sequencer/intern/proxy.c index c912b79be9b..a82801cd0f2 100644 --- a/source/blender/sequencer/intern/proxy.c +++ b/source/blender/sequencer/intern/proxy.c @@ -189,7 +189,7 @@ static bool seq_proxy_get_filepath(Scene *scene, return true; } -bool SEQ_can_use_proxy(const struct SeqRenderData *context, Sequence *seq, int psize) +bool SEQ_can_use_proxy(const SeqRenderData *context, Sequence *seq, int psize) { if (seq->strip->proxy == NULL || !context->use_proxies) { return false; @@ -422,7 +422,7 @@ bool SEQ_proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Sequence *seq, - struct GSet *file_list, + GSet *file_list, ListBase *queue, bool build_only_on_bad_performance) { @@ -587,7 +587,7 @@ void SEQ_proxy_rebuild_finish(SeqIndexBuildContext *context, bool stop) MEM_freeN(context); } -void SEQ_proxy_set(struct Sequence *seq, bool value) +void SEQ_proxy_set(Sequence *seq, bool value) { if (value) { seq->flag |= SEQ_USE_PROXY; diff --git a/source/blender/sequencer/intern/proxy_job.c b/source/blender/sequencer/intern/proxy_job.c index 435cacfc5bf..19a6c590a8b 100644 --- a/source/blender/sequencer/intern/proxy_job.c +++ b/source/blender/sequencer/intern/proxy_job.c @@ -92,7 +92,7 @@ ProxyJob *ED_seq_proxy_job_get(const bContext *C, wmJob *wm_job) return pj; } -struct wmJob *ED_seq_proxy_wm_job_get(const bContext *C) +wmJob *ED_seq_proxy_wm_job_get(const bContext *C) { Scene *scene = CTX_data_scene(C); wmJob *wm_job = WM_jobs_get(CTX_wm_manager(C), diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index bad5ab38a4c..80d11dc0645 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -192,7 +192,7 @@ void SEQ_render_imbuf_from_sequencer_space(Scene *scene, ImBuf *ibuf) } } -void SEQ_render_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4]) +void SEQ_render_pixel_from_sequencer_space_v4(Scene *scene, float pixel[4]) { const char *from_colorspace = scene->sequencer_colorspace_settings.name; const char *to_colorspace = IMB_colormanagement_role_colorspace_name_get( @@ -214,7 +214,7 @@ void SEQ_render_pixel_from_sequencer_space_v4(struct Scene *scene, float pixel[4 * \{ */ void SEQ_render_new_render_data(Main *bmain, - struct Depsgraph *depsgraph, + Depsgraph *depsgraph, Scene *scene, int rectx, int recty, diff --git a/source/blender/sequencer/intern/sequence_lookup.c b/source/blender/sequencer/intern/sequence_lookup.c index ddaf6852f74..141b1aab580 100644 --- a/source/blender/sequencer/intern/sequence_lookup.c +++ b/source/blender/sequencer/intern/sequence_lookup.c @@ -33,7 +33,7 @@ typedef struct SequenceLookup { eSequenceLookupTag tag; } SequenceLookup; -static void seq_sequence_lookup_init(struct SequenceLookup *lookup) +static void seq_sequence_lookup_init(SequenceLookup *lookup) { lookup->seq_by_name = BLI_ghash_str_new(__func__); lookup->meta_by_seq = BLI_ghash_ptr_new(__func__); @@ -43,7 +43,7 @@ static void seq_sequence_lookup_init(struct SequenceLookup *lookup) static void seq_sequence_lookup_append_effect(Sequence *input, Sequence *effect, - struct SequenceLookup *lookup) + SequenceLookup *lookup) { if (input == NULL) { return; @@ -58,7 +58,7 @@ static void seq_sequence_lookup_append_effect(Sequence *input, SEQ_collection_append_strip(effect, effects); } -static void seq_sequence_lookup_build_effect(Sequence *seq, struct SequenceLookup *lookup) +static void seq_sequence_lookup_build_effect(Sequence *seq, SequenceLookup *lookup) { if ((seq->type & SEQ_TYPE_EFFECT) == 0) { return; @@ -70,7 +70,7 @@ static void seq_sequence_lookup_build_effect(Sequence *seq, struct SequenceLooku static void seq_sequence_lookup_build_from_seqbase(Sequence *parent_meta, const ListBase *seqbase, - struct SequenceLookup *lookup) + SequenceLookup *lookup) { LISTBASE_FOREACH (Sequence *, seq, seqbase) { BLI_ghash_insert(lookup->seq_by_name, seq->name + 2, seq); @@ -83,7 +83,7 @@ static void seq_sequence_lookup_build_from_seqbase(Sequence *parent_meta, } } -static void seq_sequence_lookup_build(const struct Scene *scene, struct SequenceLookup *lookup) +static void seq_sequence_lookup_build(const Scene *scene, SequenceLookup *lookup) { Editing *ed = SEQ_editing_get(scene); seq_sequence_lookup_build_from_seqbase(NULL, &ed->seqbase, lookup); @@ -97,7 +97,7 @@ static SequenceLookup *seq_sequence_lookup_new(void) return lookup; } -static void seq_sequence_lookup_free(struct SequenceLookup **lookup) +static void seq_sequence_lookup_free(SequenceLookup **lookup) { if (*lookup == NULL) { return; @@ -113,20 +113,19 @@ static void seq_sequence_lookup_free(struct SequenceLookup **lookup) *lookup = NULL; } -static void seq_sequence_lookup_rebuild(const struct Scene *scene, struct SequenceLookup **lookup) +static void seq_sequence_lookup_rebuild(const Scene *scene, SequenceLookup **lookup) { seq_sequence_lookup_free(lookup); *lookup = seq_sequence_lookup_new(); seq_sequence_lookup_build(scene, *lookup); } -static bool seq_sequence_lookup_is_valid(const struct SequenceLookup *lookup) +static bool seq_sequence_lookup_is_valid(const SequenceLookup *lookup) { return (lookup->tag & SEQ_LOOKUP_TAG_INVALID) == 0; } -static void seq_sequence_lookup_update_if_needed(const struct Scene *scene, - struct SequenceLookup **lookup) +static void seq_sequence_lookup_update_if_needed(const Scene *scene, SequenceLookup **lookup) { if (!scene->ed) { return; diff --git a/source/blender/sequencer/intern/sequencer.c b/source/blender/sequencer/intern/sequencer.c index 6dc1edcdf12..dd51a65c0ca 100644 --- a/source/blender/sequencer/intern/sequencer.c +++ b/source/blender/sequencer/intern/sequencer.c @@ -56,7 +56,7 @@ StripProxy *seq_strip_proxy_alloc(void) { - StripProxy *strip_proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy"); + StripProxy *strip_proxy = MEM_callocN(sizeof(StripProxy), "StripProxy"); strip_proxy->quality = 50; strip_proxy->build_tc_flags = SEQ_PROXY_TC_ALL; strip_proxy->tc = SEQ_PROXY_TC_RECORD_RUN; @@ -68,13 +68,13 @@ static Strip *seq_strip_alloc(int type) Strip *strip = MEM_callocN(sizeof(Strip), "strip"); if (ELEM(type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) == 0) { - strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform"); + strip->transform = MEM_callocN(sizeof(StripTransform), "StripTransform"); strip->transform->scale_x = 1; strip->transform->scale_y = 1; strip->transform->origin[0] = 0.5f; strip->transform->origin[1] = 0.5f; strip->transform->filter = SEQ_TRANSFORM_FILTER_BILINEAR; - strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop"); + strip->crop = MEM_callocN(sizeof(StripCrop), "StripCrop"); } strip->us = 1; @@ -744,7 +744,7 @@ static bool seq_write_data_cb(Sequence *seq, void *userdata) if (seq->type == SEQ_TYPE_IMAGE) { BLO_write_struct_array(writer, StripElem, - MEM_allocN_len(strip->stripdata) / sizeof(struct StripElem), + MEM_allocN_len(strip->stripdata) / sizeof(StripElem), strip->stripdata); } else if (ELEM(seq->type, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD)) { diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c index f08bdd53d1a..0a7b7c50159 100644 --- a/source/blender/sequencer/intern/strip_add.c +++ b/source/blender/sequencer/intern/strip_add.c @@ -114,7 +114,7 @@ static void seq_add_set_view_transform(Scene *scene, Sequence *seq, SeqLoadData role_colorspace_byte = IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE); if (STREQ(strip_colorspace, role_colorspace_byte)) { - struct ColorManagedDisplay *display = IMB_colormanagement_display_get_named( + ColorManagedDisplay *display = IMB_colormanagement_display_get_named( scene->display_settings.display_device); const char *default_view_transform = IMB_colormanagement_display_get_default_view_transform_name(display); @@ -123,7 +123,7 @@ static void seq_add_set_view_transform(Scene *scene, Sequence *seq, SeqLoadData } } -Sequence *SEQ_add_scene_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data) +Sequence *SEQ_add_scene_strip(Scene *scene, ListBase *seqbase, SeqLoadData *load_data) { Sequence *seq = SEQ_sequence_alloc( seqbase, load_data->start_frame, load_data->channel, SEQ_TYPE_SCENE); @@ -135,7 +135,7 @@ Sequence *SEQ_add_scene_strip(Scene *scene, ListBase *seqbase, struct SeqLoadDat return seq; } -Sequence *SEQ_add_movieclip_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data) +Sequence *SEQ_add_movieclip_strip(Scene *scene, ListBase *seqbase, SeqLoadData *load_data) { Sequence *seq = SEQ_sequence_alloc( seqbase, load_data->start_frame, load_data->channel, SEQ_TYPE_MOVIECLIP); @@ -147,7 +147,7 @@ Sequence *SEQ_add_movieclip_strip(Scene *scene, ListBase *seqbase, struct SeqLoa return seq; } -Sequence *SEQ_add_mask_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data) +Sequence *SEQ_add_mask_strip(Scene *scene, ListBase *seqbase, SeqLoadData *load_data) { Sequence *seq = SEQ_sequence_alloc( seqbase, load_data->start_frame, load_data->channel, SEQ_TYPE_MASK); @@ -159,7 +159,7 @@ Sequence *SEQ_add_mask_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData return seq; } -Sequence *SEQ_add_effect_strip(Scene *scene, ListBase *seqbase, struct SeqLoadData *load_data) +Sequence *SEQ_add_effect_strip(Scene *scene, ListBase *seqbase, SeqLoadData *load_data) { Sequence *seq = SEQ_sequence_alloc( seqbase, load_data->start_frame, load_data->channel, load_data->effect.type); @@ -684,11 +684,8 @@ void SEQ_add_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const boo SEQ_relations_invalidate_cache_raw(scene, seq); } -void SEQ_add_movie_reload_if_needed(struct Main *bmain, - struct Scene *scene, - struct Sequence *seq, - bool *r_was_reloaded, - bool *r_can_produce_frames) +void SEQ_add_movie_reload_if_needed( + Main *bmain, Scene *scene, Sequence *seq, bool *r_was_reloaded, bool *r_can_produce_frames) { BLI_assert(seq->type == SEQ_TYPE_MOVIE || !"This function is only implemented for movie strips."); diff --git a/source/blender/sequencer/intern/strip_relations.c b/source/blender/sequencer/intern/strip_relations.c index d5d7f666ad7..066b2051b7d 100644 --- a/source/blender/sequencer/intern/strip_relations.c +++ b/source/blender/sequencer/intern/strip_relations.c @@ -409,14 +409,14 @@ void SEQ_relations_sequence_free_anim(Sequence *seq) BLI_listbase_clear(&seq->anims); } -void SEQ_relations_session_uuid_generate(struct Sequence *sequence) +void SEQ_relations_session_uuid_generate(Sequence *sequence) { sequence->runtime.session_uuid = BLI_session_uuid_generate(); } static bool get_uuids_cb(Sequence *seq, void *user_data) { - struct GSet *used_uuids = (struct GSet *)user_data; + GSet *used_uuids = (GSet *)user_data; const SessionUUID *session_uuid = &seq->runtime.session_uuid; if (!BLI_session_uuid_is_generated(session_uuid)) { printf("Sequence %s does not have UUID generated.\n", seq->name); @@ -438,7 +438,7 @@ void SEQ_relations_check_uuids_unique_and_report(const Scene *scene) return; } - struct GSet *used_uuids = BLI_gset_new( + GSet *used_uuids = BLI_gset_new( BLI_session_uuid_ghash_hash, BLI_session_uuid_ghash_compare, "sequencer used uuids"); SEQ_for_each_callback(&scene->ed->seqbase, get_uuids_cb, used_uuids); @@ -446,7 +446,7 @@ void SEQ_relations_check_uuids_unique_and_report(const Scene *scene) BLI_gset_free(used_uuids, NULL); } -struct Sequence *SEQ_find_metastrip_by_sequence(ListBase *seqbase, Sequence *meta, Sequence *seq) +Sequence *SEQ_find_metastrip_by_sequence(ListBase *seqbase, Sequence *meta, Sequence *seq) { Sequence *iseq; diff --git a/source/blender/sequencer/intern/strip_retiming.cc b/source/blender/sequencer/intern/strip_retiming.cc index 556e1b0ab3b..89645192d3e 100644 --- a/source/blender/sequencer/intern/strip_retiming.cc +++ b/source/blender/sequencer/intern/strip_retiming.cc @@ -50,7 +50,7 @@ MutableSpan SEQ_retiming_handles_get(const Sequence *seq) return handles; } -struct SeqRetimingHandle *SEQ_retiming_last_handle_get(const struct Sequence *seq) +SeqRetimingHandle *SEQ_retiming_last_handle_get(const Sequence *seq) { return seq->retiming_handles + seq->retiming_handle_num - 1; } @@ -496,8 +496,7 @@ SeqRetimingHandle *SEQ_retiming_add_transition(const Scene *scene, } if (SEQ_retiming_handle_is_freeze_frame(handle) || - SEQ_retiming_handle_is_freeze_frame(handle - 1)) - { + SEQ_retiming_handle_is_freeze_frame(handle - 1)) { return nullptr; } diff --git a/source/blender/sequencer/intern/utils.c b/source/blender/sequencer/intern/utils.c index ead942441d1..7bae3dca9d1 100644 --- a/source/blender/sequencer/intern/utils.c +++ b/source/blender/sequencer/intern/utils.c @@ -72,9 +72,7 @@ static bool seqbase_unique_name_recursive_fn(Sequence *seq, void *arg_pt) return true; } -void SEQ_sequence_base_unique_name_recursive(struct Scene *scene, - ListBase *seqbasep, - Sequence *seq) +void SEQ_sequence_base_unique_name_recursive(Scene *scene, ListBase *seqbasep, Sequence *seq) { SeqUniqueInfo sui; char *dot; diff --git a/source/blender/simulation/intern/implicit_blender.c b/source/blender/simulation/intern/implicit_blender.c index bfefc88c91b..5c1ed8b9bbb 100644 --- a/source/blender/simulation/intern/implicit_blender.c +++ b/source/blender/simulation/intern/implicit_blender.c @@ -53,8 +53,6 @@ static float ZERO[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; # endif # endif /* if 0 */ -struct Cloth; - ////////////////////////////////////////// /* fast vector / matrix library, enhancements are welcome :) -dg */ ///////////////////////////////////////// @@ -1210,10 +1208,7 @@ void SIM_mass_spring_set_velocity(Implicit_Data *data, int index, const float v[ world_to_root_v3(data, index, data->V[index], v); } -void SIM_mass_spring_get_motion_state(struct Implicit_Data *data, - int index, - float x[3], - float v[3]) +void SIM_mass_spring_get_motion_state(Implicit_Data *data, int index, float x[3], float v[3]) { if (x) { root_to_world_v3(data, index, x, data->X[index]); @@ -1223,32 +1218,32 @@ void SIM_mass_spring_get_motion_state(struct Implicit_Data *data, } } -void SIM_mass_spring_get_position(struct Implicit_Data *data, int index, float x[3]) +void SIM_mass_spring_get_position(Implicit_Data *data, int index, float x[3]) { root_to_world_v3(data, index, x, data->X[index]); } -void SIM_mass_spring_get_velocity(struct Implicit_Data *data, int index, float v[3]) +void SIM_mass_spring_get_velocity(Implicit_Data *data, int index, float v[3]) { root_to_world_v3(data, index, v, data->V[index]); } -void SIM_mass_spring_get_new_position(struct Implicit_Data *data, int index, float x[3]) +void SIM_mass_spring_get_new_position(Implicit_Data *data, int index, float x[3]) { root_to_world_v3(data, index, x, data->Xnew[index]); } -void SIM_mass_spring_set_new_position(struct Implicit_Data *data, int index, const float x[3]) +void SIM_mass_spring_set_new_position(Implicit_Data *data, int index, const float x[3]) { world_to_root_v3(data, index, data->Xnew[index], x); } -void SIM_mass_spring_get_new_velocity(struct Implicit_Data *data, int index, float v[3]) +void SIM_mass_spring_get_new_velocity(Implicit_Data *data, int index, float v[3]) { root_to_world_v3(data, index, v, data->Vnew[index]); } -void SIM_mass_spring_set_new_velocity(struct Implicit_Data *data, int index, const float v[3]) +void SIM_mass_spring_set_new_velocity(Implicit_Data *data, int index, const float v[3]) { world_to_root_v3(data, index, data->Vnew[index], v); } @@ -1419,7 +1414,7 @@ void SIM_mass_spring_force_drag(Implicit_Data *data, float drag) } void SIM_mass_spring_force_extern( - struct Implicit_Data *data, int i, const float f[3], float dfdx[3][3], float dfdv[3][3]) + Implicit_Data *data, int i, const float f[3], float dfdx[3][3], float dfdv[3][3]) { float tf[3], tdfdx[3][3], tdfdv[3][3]; world_to_root_v3(data, i, tf, f); @@ -1525,7 +1520,7 @@ float SIM_tri_tetra_volume_signed_6x(Implicit_Data *data, int v1, int v2, int v3 return volume_tri_tetrahedron_signed_v3_6x(data->X[v1], data->X[v2], data->X[v3]); } -float SIM_tri_area(struct Implicit_Data *data, int v1, int v2, int v3) +float SIM_tri_area(Implicit_Data *data, int v1, int v2, int v3) { float nor[3]; diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c index cc74d40b16c..8859f32be9c 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c @@ -193,7 +193,7 @@ void WM_gizmo_unlink(ListBase *gizmolist, wmGizmoMap *gzmap, wmGizmo *gz, bConte * * \{ */ -struct wmGizmoOpElem *WM_gizmo_operator_get(wmGizmo *gz, int part_index) +wmGizmoOpElem *WM_gizmo_operator_get(wmGizmo *gz, int part_index) { if (gz->op_data && ((part_index >= 0) && (part_index < gz->op_data_len))) { return &gz->op_data[part_index]; @@ -346,7 +346,7 @@ void WM_gizmo_set_color_highlight(wmGizmo *gz, const float color_hi[4]) /** \name Gizmo Callback Assignment * \{ */ -void WM_gizmo_set_fn_custom_modal(struct wmGizmo *gz, wmGizmoFnModal fn) +void WM_gizmo_set_fn_custom_modal(wmGizmo *gz, wmGizmoFnModal fn) { gz->custom_modal = fn; } @@ -414,11 +414,8 @@ bool wm_gizmo_select_and_highlight(bContext *C, wmGizmoMap *gzmap, wmGizmo *gz) return false; } -void WM_gizmo_modal_set_from_setup(struct wmGizmoMap *gzmap, - struct bContext *C, - struct wmGizmo *gz, - int part_index, - const wmEvent *event) +void WM_gizmo_modal_set_from_setup( + wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, int part_index, const wmEvent *event) { gz->highlight_part = part_index; WM_gizmo_highlight_set(gzmap, gz); @@ -431,9 +428,9 @@ void WM_gizmo_modal_set_from_setup(struct wmGizmoMap *gzmap, } } -void WM_gizmo_modal_set_while_modal(struct wmGizmoMap *gzmap, - struct bContext *C, - struct wmGizmo *gz, +void WM_gizmo_modal_set_while_modal(wmGizmoMap *gzmap, + bContext *C, + wmGizmo *gz, const wmEvent *event) { if (gzmap->gzmap_context.modal) { @@ -723,7 +720,7 @@ void WM_gizmo_properties_free(PointerRNA *ptr) /** \name General Utilities * \{ */ -bool WM_gizmo_context_check_drawstep(const struct bContext *C, eWM_GizmoFlagMapDrawStep step) +bool WM_gizmo_context_check_drawstep(const bContext *C, eWM_GizmoFlagMapDrawStep step) { switch (step) { case WM_GIZMOMAP_DRAWSTEP_2D: { diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c index b5c3d529383..56f802bee21 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c @@ -867,52 +867,52 @@ wmKeyMap *WM_gizmogroup_setup_keymap_generic_select(const wmGizmoGroupType *UNUS * Key config version so these can be called from #wmGizmoGroupFnSetupKeymap. * \{ */ -struct wmKeyMap *WM_gizmo_keymap_generic_with_keyconfig(wmKeyConfig *kc) +wmKeyMap *WM_gizmo_keymap_generic_with_keyconfig(wmKeyConfig *kc) { const char *idname = "Generic Gizmo"; return WM_keymap_ensure(kc, idname, SPACE_EMPTY, RGN_TYPE_WINDOW); } -struct wmKeyMap *WM_gizmo_keymap_generic(wmWindowManager *wm) +wmKeyMap *WM_gizmo_keymap_generic(wmWindowManager *wm) { return WM_gizmo_keymap_generic_with_keyconfig(wm->defaultconf); } -struct wmKeyMap *WM_gizmo_keymap_generic_select_with_keyconfig(wmKeyConfig *kc) +wmKeyMap *WM_gizmo_keymap_generic_select_with_keyconfig(wmKeyConfig *kc) { const char *idname = "Generic Gizmo Select"; return WM_keymap_ensure(kc, idname, SPACE_EMPTY, RGN_TYPE_WINDOW); } -struct wmKeyMap *WM_gizmo_keymap_generic_select(wmWindowManager *wm) +wmKeyMap *WM_gizmo_keymap_generic_select(wmWindowManager *wm) { return WM_gizmo_keymap_generic_select_with_keyconfig(wm->defaultconf); } -struct wmKeyMap *WM_gizmo_keymap_generic_drag_with_keyconfig(wmKeyConfig *kc) +wmKeyMap *WM_gizmo_keymap_generic_drag_with_keyconfig(wmKeyConfig *kc) { const char *idname = "Generic Gizmo Drag"; return WM_keymap_ensure(kc, idname, SPACE_EMPTY, RGN_TYPE_WINDOW); } -struct wmKeyMap *WM_gizmo_keymap_generic_drag(wmWindowManager *wm) +wmKeyMap *WM_gizmo_keymap_generic_drag(wmWindowManager *wm) { return WM_gizmo_keymap_generic_drag_with_keyconfig(wm->defaultconf); } -struct wmKeyMap *WM_gizmo_keymap_generic_click_drag_with_keyconfig(wmKeyConfig *kc) +wmKeyMap *WM_gizmo_keymap_generic_click_drag_with_keyconfig(wmKeyConfig *kc) { const char *idname = "Generic Gizmo Click Drag"; return WM_keymap_ensure(kc, idname, SPACE_EMPTY, RGN_TYPE_WINDOW); } -struct wmKeyMap *WM_gizmo_keymap_generic_click_drag(wmWindowManager *wm) +wmKeyMap *WM_gizmo_keymap_generic_click_drag(wmWindowManager *wm) { return WM_gizmo_keymap_generic_click_drag_with_keyconfig(wm->defaultconf); } -struct wmKeyMap *WM_gizmo_keymap_generic_maybe_drag_with_keyconfig(wmKeyConfig *kc) +wmKeyMap *WM_gizmo_keymap_generic_maybe_drag_with_keyconfig(wmKeyConfig *kc) { const char *idname = "Generic Gizmo Maybe Drag"; return WM_keymap_ensure(kc, idname, SPACE_EMPTY, RGN_TYPE_WINDOW); } -struct wmKeyMap *WM_gizmo_keymap_generic_maybe_drag(wmWindowManager *wm) +wmKeyMap *WM_gizmo_keymap_generic_maybe_drag(wmWindowManager *wm) { return WM_gizmo_keymap_generic_maybe_drag_with_keyconfig(wm->defaultconf); } @@ -923,8 +923,8 @@ struct wmKeyMap *WM_gizmo_keymap_generic_maybe_drag(wmWindowManager *wm) /** \name wmGizmoGroupType * \{ */ -struct wmGizmoGroupTypeRef *WM_gizmomaptype_group_find_ptr(struct wmGizmoMapType *gzmap_type, - const wmGizmoGroupType *gzgt) +wmGizmoGroupTypeRef *WM_gizmomaptype_group_find_ptr(wmGizmoMapType *gzmap_type, + const wmGizmoGroupType *gzgt) { /* could use hash lookups as operator types do, for now simple search. */ LISTBASE_FOREACH (wmGizmoGroupTypeRef *, gzgt_ref, &gzmap_type->grouptype_refs) { @@ -935,8 +935,7 @@ struct wmGizmoGroupTypeRef *WM_gizmomaptype_group_find_ptr(struct wmGizmoMapType return NULL; } -struct wmGizmoGroupTypeRef *WM_gizmomaptype_group_find(struct wmGizmoMapType *gzmap_type, - const char *idname) +wmGizmoGroupTypeRef *WM_gizmomaptype_group_find(wmGizmoMapType *gzmap_type, const char *idname) { /* could use hash lookups as operator types do, for now simple search. */ LISTBASE_FOREACH (wmGizmoGroupTypeRef *, gzgt_ref, &gzmap_type->grouptype_refs) { @@ -1136,25 +1135,25 @@ bool WM_gizmo_group_type_ensure(const char *idname) return WM_gizmo_group_type_ensure_ptr(gzgt); } -void WM_gizmo_group_type_remove_ptr_ex(struct Main *bmain, +void WM_gizmo_group_type_remove_ptr_ex(Main *bmain, wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type) { WM_gizmomaptype_group_unlink(NULL, bmain, gzmap_type, gzgt); } -void WM_gizmo_group_type_remove_ptr(struct Main *bmain, wmGizmoGroupType *gzgt) +void WM_gizmo_group_type_remove_ptr(Main *bmain, wmGizmoGroupType *gzgt) { wmGizmoMapType *gzmap_type = WM_gizmomaptype_ensure(&gzgt->gzmap_params); WM_gizmo_group_type_remove_ptr_ex(bmain, gzgt, gzmap_type); } -void WM_gizmo_group_type_remove(struct Main *bmain, const char *idname) +void WM_gizmo_group_type_remove(Main *bmain, const char *idname) { wmGizmoGroupType *gzgt = WM_gizmogrouptype_find(idname, false); BLI_assert(gzgt != NULL); WM_gizmo_group_type_remove_ptr(bmain, gzgt); } -void WM_gizmo_group_type_reinit_ptr_ex(struct Main *bmain, +void WM_gizmo_group_type_reinit_ptr_ex(Main *bmain, wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type) { @@ -1164,12 +1163,12 @@ void WM_gizmo_group_type_reinit_ptr_ex(struct Main *bmain, WM_gizmomaptype_group_unlink(NULL, bmain, gzmap_type, gzgt); WM_gizmo_group_type_add_ptr_ex(gzgt, gzmap_type); } -void WM_gizmo_group_type_reinit_ptr(struct Main *bmain, wmGizmoGroupType *gzgt) +void WM_gizmo_group_type_reinit_ptr(Main *bmain, wmGizmoGroupType *gzgt) { wmGizmoMapType *gzmap_type = WM_gizmomaptype_ensure(&gzgt->gzmap_params); WM_gizmo_group_type_reinit_ptr_ex(bmain, gzgt, gzmap_type); } -void WM_gizmo_group_type_reinit(struct Main *bmain, const char *idname) +void WM_gizmo_group_type_reinit(Main *bmain, const char *idname) { wmGizmoGroupType *gzgt = WM_gizmogrouptype_find(idname, false); BLI_assert(gzgt != NULL); diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c index 254cd76ff56..c4dabd7baa7 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group_type.c @@ -98,7 +98,7 @@ static void wm_gizmogrouptype_append__end(wmGizmoGroupType *gzgt) BLI_ghash_insert(global_gizmogrouptype_hash, (void *)gzgt->idname, gzgt); } -wmGizmoGroupType *WM_gizmogrouptype_append(void (*wtfunc)(struct wmGizmoGroupType *)) +wmGizmoGroupType *WM_gizmogrouptype_append(void (*wtfunc)(wmGizmoGroupType *)) { wmGizmoGroupType *gzgt = wm_gizmogrouptype_append__begin(); wtfunc(gzgt); @@ -106,7 +106,7 @@ wmGizmoGroupType *WM_gizmogrouptype_append(void (*wtfunc)(struct wmGizmoGroupTyp return gzgt; } -wmGizmoGroupType *WM_gizmogrouptype_append_ptr(void (*wtfunc)(struct wmGizmoGroupType *, void *), +wmGizmoGroupType *WM_gizmogrouptype_append_ptr(void (*wtfunc)(wmGizmoGroupType *, void *), void *userdata) { wmGizmoGroupType *gzgt = wm_gizmogrouptype_append__begin(); @@ -116,7 +116,7 @@ wmGizmoGroupType *WM_gizmogrouptype_append_ptr(void (*wtfunc)(struct wmGizmoGrou } wmGizmoGroupTypeRef *WM_gizmogrouptype_append_and_link(wmGizmoMapType *gzmap_type, - void (*wtfunc)(struct wmGizmoGroupType *)) + void (*wtfunc)(wmGizmoGroupType *)) { wmGizmoGroupType *gzgt = WM_gizmogrouptype_append(wtfunc); diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c index ed1e87c47c7..a4835841c79 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c @@ -148,8 +148,7 @@ void wm_gizmomap_select_array_remove(wmGizmoMap *gzmap, wmGizmo *gz) /** \name wmGizmoMap * \{ */ -static wmGizmoMap *wm_gizmomap_new_from_type_ex(struct wmGizmoMapType *gzmap_type, - wmGizmoMap *gzmap) +static wmGizmoMap *wm_gizmomap_new_from_type_ex(wmGizmoMapType *gzmap_type, wmGizmoMap *gzmap) { gzmap->type = gzmap_type; gzmap->is_init = true; @@ -200,7 +199,7 @@ void WM_gizmomap_reinit(wmGizmoMap *gzmap) wm_gizmomap_new_from_type_ex(gzmap_type, gzmap); } -wmGizmoGroup *WM_gizmomap_group_find(struct wmGizmoMap *gzmap, const char *idname) +wmGizmoGroup *WM_gizmomap_group_find(wmGizmoMap *gzmap, const char *idname) { wmGizmoGroupType *gzgt = WM_gizmogrouptype_find(idname, false); if (gzgt) { @@ -209,8 +208,7 @@ wmGizmoGroup *WM_gizmomap_group_find(struct wmGizmoMap *gzmap, const char *idnam return NULL; } -wmGizmoGroup *WM_gizmomap_group_find_ptr(struct wmGizmoMap *gzmap, - const struct wmGizmoGroupType *gzgt) +wmGizmoGroup *WM_gizmomap_group_find_ptr(wmGizmoMap *gzmap, const wmGizmoGroupType *gzgt) { LISTBASE_FOREACH (wmGizmoGroup *, gzgroup, &gzmap->groups) { if (gzgroup->type == gzgt) { @@ -1071,7 +1069,7 @@ void wm_gizmomap_modal_set( gzmap->gzmap_context.event_xy[0] = INT_MAX; } - struct wmGizmoOpElem *gzop = WM_gizmo_operator_get(gz, gz->highlight_part); + wmGizmoOpElem *gzop = WM_gizmo_operator_get(gz, gz->highlight_part); if (gzop && gzop->type) { const int retval = WM_gizmo_operator_invoke(C, gz, gzop, event); if ((retval & OPERATOR_RUNNING_MODAL) == 0) { @@ -1191,11 +1189,11 @@ void WM_gizmomap_message_subscribe(const bContext *C, /** \name Tooltip Handling * \{ */ -struct ARegion *WM_gizmomap_tooltip_init(struct bContext *C, - struct ARegion *region, - int *UNUSED(r_pass), - double *UNUSED(pass_delay), - bool *r_exit_on_event) +ARegion *WM_gizmomap_tooltip_init(bContext *C, + ARegion *region, + int *UNUSED(r_pass), + double *UNUSED(pass_delay), + bool *r_exit_on_event) { wmGizmoMap *gzmap = region->gizmo_map; *r_exit_on_event = false; @@ -1306,7 +1304,7 @@ void WM_gizmoconfig_update_tag_group_remove(wmGizmoMap *gzmap) wm_gzmap_type_update_flag |= WM_GIZMOTYPE_GLOBAL_UPDATE_REMOVE; } -void WM_gizmoconfig_update(struct Main *bmain) +void WM_gizmoconfig_update(Main *bmain) { if (G.background) { return; diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c index 4bab2eac626..515cd4a8309 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.c @@ -92,14 +92,14 @@ static void wm_gizmotype_append__end(wmGizmoType *gzt) BLI_ghash_insert(global_gizmotype_hash, (void *)gzt->idname, gzt); } -void WM_gizmotype_append(void (*gtfunc)(struct wmGizmoType *)) +void WM_gizmotype_append(void (*gtfunc)(wmGizmoType *)) { wmGizmoType *gzt = wm_gizmotype_append__begin(); gtfunc(gzt); wm_gizmotype_append__end(gzt); } -void WM_gizmotype_append_ptr(void (*gtfunc)(struct wmGizmoType *, void *), void *userdata) +void WM_gizmotype_append_ptr(void (*gtfunc)(wmGizmoType *, void *), void *userdata) { wmGizmoType *mt = wm_gizmotype_append__begin(); gtfunc(mt, userdata); diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 806f8f3f3c0..0232c21113e 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -331,7 +331,7 @@ void WM_operator_free(wmOperator *op) MEM_freeN(op); } -void WM_operator_free_all_after(wmWindowManager *wm, struct wmOperator *op) +void WM_operator_free_all_after(wmWindowManager *wm, wmOperator *op) { op = op->next; while (op != NULL) { diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 587d988cff4..b9c37afbd7f 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -173,7 +173,7 @@ void WM_cursor_set(wmWindow *win, int curs) } } -bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *area, const ARegion *region) +bool WM_cursor_set_from_tool(wmWindow *win, const ScrArea *area, const ARegion *region) { if (region && !ELEM(region->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_PREVIEW)) { return false; diff --git a/source/blender/windowmanager/intern/wm_dragdrop.cc b/source/blender/windowmanager/intern/wm_dragdrop.cc index 62b5ed8b98b..29d540623e7 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.cc +++ b/source/blender/windowmanager/intern/wm_dragdrop.cc @@ -70,7 +70,7 @@ static void wm_drag_free_path_data(wmDragPath **path_data); /* when editors become configurable, they can add own dropbox definitions */ struct wmDropBoxMap { - struct wmDropBoxMap *next, *prev; + wmDropBoxMap *next, *prev; ListBase dropboxes; short spaceid, regionid; diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 48df2c6c2e1..6337e4a9c38 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -585,14 +585,12 @@ static const char *wm_area_name(ScrArea *area) typedef struct WindowDrawCB { struct WindowDrawCB *next, *prev; - void (*draw)(const struct wmWindow *, void *); + void (*draw)(const wmWindow *, void *); void *customdata; } WindowDrawCB; -void *WM_draw_cb_activate(wmWindow *win, - void (*draw)(const struct wmWindow *, void *), - void *customdata) +void *WM_draw_cb_activate(wmWindow *win, void (*draw)(const wmWindow *, void *), void *customdata) { WindowDrawCB *wdc = MEM_callocN(sizeof(*wdc), "WindowDrawCB"); diff --git a/source/blender/windowmanager/intern/wm_event_query.c b/source/blender/windowmanager/intern/wm_event_query.c index c89a0d12e70..0fce1e4f3fc 100644 --- a/source/blender/windowmanager/intern/wm_event_query.c +++ b/source/blender/windowmanager/intern/wm_event_query.c @@ -382,7 +382,7 @@ bool WM_event_consecutive_gesture_test_break(const wmWindow *win, const wmEvent * * \{ */ -int WM_event_drag_threshold(const struct wmEvent *event) +int WM_event_drag_threshold(const wmEvent *event) { int drag_threshold; BLI_assert(event->prev_press_type != MOUSEMOVE); @@ -442,7 +442,7 @@ void WM_event_drag_start_xy(const wmEvent *event, int r_xy[2]) /** \name Event Text Queries * \{ */ -char WM_event_utf8_to_ascii(const struct wmEvent *event) +char WM_event_utf8_to_ascii(const wmEvent *event) { if (BLI_str_utf8_size(event->utf8_buf) == 1) { return event->utf8_buf[0]; @@ -503,7 +503,7 @@ void WM_event_ndof_rotate_get(const wmNDOFMotionData *ndof, float r_rot[3]) r_rot[2] = ndof->rvec[2] * ((U.ndof_flag & NDOF_ROTZ_INVERT_AXIS) ? -1.0f : 1.0f); } -float WM_event_ndof_to_axis_angle(const struct wmNDOFMotionData *ndof, float axis[3]) +float WM_event_ndof_to_axis_angle(const wmNDOFMotionData *ndof, float axis[3]) { float angle; angle = normalize_v3_v3(axis, ndof->rvec); @@ -515,7 +515,7 @@ float WM_event_ndof_to_axis_angle(const struct wmNDOFMotionData *ndof, float axi return ndof->dt * angle; } -void WM_event_ndof_to_quat(const struct wmNDOFMotionData *ndof, float q[4]) +void WM_event_ndof_to_quat(const wmNDOFMotionData *ndof, float q[4]) { float axis[3]; float angle; @@ -532,7 +532,7 @@ void WM_event_ndof_to_quat(const struct wmNDOFMotionData *ndof, float q[4]) * \{ */ #ifdef WITH_XR_OPENXR -bool WM_event_is_xr(const struct wmEvent *event) +bool WM_event_is_xr(const wmEvent *event) { return (event->type == EVT_XR_ACTION && event->custom == EVT_DATA_XR); } @@ -573,7 +573,7 @@ float WM_event_tablet_data(const wmEvent *event, int *pen_flip, float tilt[2]) return event->tablet.pressure; } -bool WM_event_is_tablet(const struct wmEvent *event) +bool WM_event_is_tablet(const wmEvent *event) { return (event->tablet.active != EVT_TABLET_NONE); } @@ -588,7 +588,7 @@ bool WM_event_is_tablet(const struct wmEvent *event) * * \{ */ -int WM_event_absolute_delta_x(const struct wmEvent *event) +int WM_event_absolute_delta_x(const wmEvent *event) { int dx = event->xy[0] - event->prev_xy[0]; @@ -599,7 +599,7 @@ int WM_event_absolute_delta_x(const struct wmEvent *event) return dx; } -int WM_event_absolute_delta_y(const struct wmEvent *event) +int WM_event_absolute_delta_y(const wmEvent *event) { int dy = event->xy[1] - event->prev_xy[1]; diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 55ed4a37e63..b82fb75c2d5 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -677,7 +677,7 @@ struct wmFileReadPost_Params { * Logic shared between #WM_file_read & #wm_homefile_read, * updates to make after reading a file. */ -static void wm_file_read_post(bContext *C, const struct wmFileReadPost_Params *params) +static void wm_file_read_post(bContext *C, const wmFileReadPost_Params *params) { wmWindowManager *wm = CTX_wm_manager(C); @@ -1014,7 +1014,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports) BlendFileReadReport bf_reports{}; bf_reports.reports = reports; bf_reports.duration.whole = PIL_check_seconds_timer(); - struct BlendFileData *bfd = BKE_blendfile_read(filepath, ¶ms, &bf_reports); + BlendFileData *bfd = BKE_blendfile_read(filepath, ¶ms, &bf_reports); if (bfd != nullptr) { wm_file_read_pre(use_data, use_userdef); @@ -1134,9 +1134,9 @@ const char *WM_init_state_app_template_get(void) * \{ */ void wm_homefile_read_ex(bContext *C, - const struct wmHomeFileRead_Params *params_homefile, + const wmHomeFileRead_Params *params_homefile, ReportList *reports, - struct wmFileReadPost_Params **r_params_file_read_post) + wmFileReadPost_Params **r_params_file_read_post) { #if 0 /* UNUSED, keep as this may be needed later & the comment below isn't self evident. */ /* Context does not always have valid main pointer here. */ @@ -1330,7 +1330,7 @@ void wm_homefile_read_ex(bContext *C, params.skip_flags = skip_flags | BLO_READ_SKIP_USERDEF; BlendFileReadReport bf_reports{}; bf_reports.reports = reports; - struct BlendFileData *bfd = BKE_blendfile_read(filepath_startup, ¶ms, &bf_reports); + BlendFileData *bfd = BKE_blendfile_read(filepath_startup, ¶ms, &bf_reports); if (bfd != nullptr) { BKE_blendfile_read_setup_ex( @@ -1360,7 +1360,7 @@ void wm_homefile_read_ex(bContext *C, BlendFileReadParams read_file_params{}; read_file_params.is_startup = true; read_file_params.skip_flags = skip_flags; - struct BlendFileData *bfd = BKE_blendfile_read_from_memory( + BlendFileData *bfd = BKE_blendfile_read_from_memory( datatoc_startup_blend, datatoc_startup_blend_size, &read_file_params, nullptr); if (bfd != nullptr) { BlendFileReadReport read_report{}; @@ -1470,14 +1470,13 @@ void wm_homefile_read_ex(bContext *C, } void wm_homefile_read(bContext *C, - const struct wmHomeFileRead_Params *params_homefile, + const wmHomeFileRead_Params *params_homefile, ReportList *reports) { wm_homefile_read_ex(C, params_homefile, reports, nullptr); } -void wm_homefile_read_post(struct bContext *C, - const struct wmFileReadPost_Params *params_file_read_post) +void wm_homefile_read_post(bContext *C, const wmFileReadPost_Params *params_file_read_post) { wm_file_read_post(C, params_file_read_post); @@ -1518,7 +1517,7 @@ void wm_history_file_read(void) const char *line = static_cast(l->link); /* don't check if files exist, causes slow startup for remote/external drives */ if (line[0]) { - struct RecentFile *recent = (RecentFile *)MEM_mallocN(sizeof(RecentFile), "RecentFile"); + RecentFile *recent = (RecentFile *)MEM_mallocN(sizeof(RecentFile), "RecentFile"); BLI_addtail(&(G.recent_files), recent); recent->filepath = BLI_strdup(line); num++; @@ -2843,9 +2842,9 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op) return wm_open_mainfile__open(C, op); } -static char *wm_open_mainfile_description(struct bContext * /*C*/, - struct wmOperatorType * /*op*/, - struct PointerRNA *params) +static char *wm_open_mainfile_description(bContext * /*C*/, + wmOperatorType * /*op*/, + PointerRNA *params) { if (!RNA_struct_property_is_set(params, "filepath")) { return nullptr; @@ -2886,12 +2885,11 @@ static char *wm_open_mainfile_description(struct bContext * /*C*/, struct FileRuntime { bool is_untrusted; }; -BLI_STATIC_ASSERT(sizeof(struct FileRuntime) <= sizeof(void *), - "Struct must not exceed pointer size"); +BLI_STATIC_ASSERT(sizeof(FileRuntime) <= sizeof(void *), "Struct must not exceed pointer size"); static bool wm_open_mainfile_check(bContext * /*C*/, wmOperator *op) { - struct FileRuntime *file_info = (struct FileRuntime *)&op->customdata; + FileRuntime *file_info = (FileRuntime *)&op->customdata; PropertyRNA *prop = RNA_struct_find_property(op->ptr, "use_scripts"); bool is_untrusted = false; char filepath[FILE_MAX]; @@ -2921,7 +2919,7 @@ static bool wm_open_mainfile_check(bContext * /*C*/, wmOperator *op) static void wm_open_mainfile_ui(bContext * /*C*/, wmOperator *op) { - struct FileRuntime *file_info = (struct FileRuntime *)&op->customdata; + FileRuntime *file_info = (FileRuntime *)&op->customdata; uiLayout *layout = op->layout; const char *autoexec_text; @@ -3520,9 +3518,7 @@ static void wm_block_autorun_warning_enable_scripts(bContext *C, void *arg_block } /* Build the autorun warning dialog UI */ -static uiBlock *block_create_autorun_warning(struct bContext *C, - struct ARegion *region, - void * /*arg1*/) +static uiBlock *block_create_autorun_warning(bContext *C, ARegion *region, void * /*arg1*/) { const char *blendfile_path = BKE_main_blendfile_path_from_global(); wmWindowManager *wm = CTX_wm_manager(C); @@ -3807,9 +3803,7 @@ static void save_catalogs_when_file_is_closed_set_fn(bContext * /*C*/, void *arg ED_asset_catalogs_set_save_catalogs_when_file_is_saved(*save_catalogs_when_file_is_closed != 0); } -static uiBlock *block_create__close_file_dialog(struct bContext *C, - struct ARegion *region, - void *arg1) +static uiBlock *block_create__close_file_dialog(bContext *C, ARegion *region, void *arg1) { wmGenericCallback *post_action = (wmGenericCallback *)arg1; Main *bmain = CTX_data_main(C); diff --git a/source/blender/windowmanager/intern/wm_init_exit.cc b/source/blender/windowmanager/intern/wm_init_exit.cc index 9ee71a94817..d429ba24659 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.cc +++ b/source/blender/windowmanager/intern/wm_init_exit.cc @@ -289,7 +289,7 @@ void WM_init(bContext *C, int argc, const char **argv) * Creating a dummy window-manager early, or moving the key-maps into the preferences * would resolve this and may be worth looking into long-term, see: D12184 for details. */ - struct wmFileReadPost_Params *params_file_read_post = nullptr; + wmFileReadPost_Params *params_file_read_post = nullptr; wmHomeFileRead_Params read_homefile_params{}; read_homefile_params.use_data = true; read_homefile_params.use_userdef = true; @@ -487,9 +487,9 @@ void WM_exit_ex(bContext *C, const bool do_python, const bool do_user_exit_actio /* NOTE: same code copied in `wm_files.cc`. */ if (C && wm) { if (do_user_exit_actions) { - struct MemFile *undo_memfile = wm->undo_stack ? - ED_undosys_stack_memfile_get_active(wm->undo_stack) : - nullptr; + MemFile *undo_memfile = wm->undo_stack ? + ED_undosys_stack_memfile_get_active(wm->undo_stack) : + nullptr; if (undo_memfile != nullptr) { /* save the undo state as quit.blend */ Main *bmain = CTX_data_main(C); diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index 4cd8df5eca0..0cdfd6d2a37 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -56,7 +56,7 @@ */ struct wmJob { - struct wmJob *next, *prev; + wmJob *next, *prev; /** Job originating from, keep track of this when deleting windows */ wmWindow *win; @@ -576,7 +576,7 @@ void WM_jobs_kill_all_except(wmWindowManager *wm, const void *owner) } } -void WM_jobs_kill_type(struct wmWindowManager *wm, const void *owner, int job_type) +void WM_jobs_kill_type(wmWindowManager *wm, const void *owner, int job_type) { LISTBASE_FOREACH_MUTABLE (wmJob *, wm_job, &wm->jobs) { if (owner && wm_job->owner != owner) { @@ -717,7 +717,7 @@ bool WM_jobs_has_running(const wmWindowManager *wm) return false; } -bool WM_jobs_has_running_type(const struct wmWindowManager *wm, int job_type) +bool WM_jobs_has_running_type(const wmWindowManager *wm, int job_type) { LISTBASE_FOREACH (wmJob *, wm_job, &wm->jobs) { if (wm_job->running && wm_job->job_type == job_type) { diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index fe3d7478b3e..52c94b32224 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -177,7 +177,7 @@ static bool wm_keymap_item_equals(wmKeyMapItem *a, wmKeyMapItem *b) (a->flag & KMI_REPEAT_IGNORE) == (b->flag & KMI_REPEAT_IGNORE))); } -void WM_keymap_item_properties_reset(wmKeyMapItem *kmi, struct IDProperty *properties) +void WM_keymap_item_properties_reset(wmKeyMapItem *kmi, IDProperty *properties) { if (LIKELY(kmi->ptr)) { WM_operator_properties_free(kmi->ptr); @@ -367,7 +367,7 @@ void WM_keyconfig_set_active(wmWindowManager *wm, const char *idname) static wmKeyMap *wm_keymap_new(const char *idname, int spaceid, int regionid) { - wmKeyMap *km = MEM_callocN(sizeof(struct wmKeyMap), "keymap list"); + wmKeyMap *km = MEM_callocN(sizeof(wmKeyMap), "keymap list"); STRNCPY(km->idname, idname); km->spaceid = spaceid; @@ -525,7 +525,7 @@ wmKeyMapItem *WM_keymap_add_item(wmKeyMap *keymap, return kmi; } -wmKeyMapItem *WM_keymap_add_item_copy(struct wmKeyMap *keymap, wmKeyMapItem *kmi_src) +wmKeyMapItem *WM_keymap_add_item_copy(wmKeyMap *keymap, wmKeyMapItem *kmi_src) { wmKeyMapItem *kmi_dst = wm_keymap_item_copy(kmi_src); diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index fa87bd66c81..2961b4b236c 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -393,7 +393,7 @@ void WM_operator_properties_border(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } -void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect) +void WM_operator_properties_border_to_rcti(wmOperator *op, rcti *rect) { rect->xmin = RNA_int_get(op->ptr, "xmin"); rect->ymin = RNA_int_get(op->ptr, "ymin"); @@ -401,7 +401,7 @@ void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect) rect->ymax = RNA_int_get(op->ptr, "ymax"); } -void WM_operator_properties_border_to_rctf(struct wmOperator *op, rctf *rect) +void WM_operator_properties_border_to_rctf(wmOperator *op, rctf *rect) { rcti rect_i; WM_operator_properties_border_to_rcti(op, &rect_i); @@ -632,7 +632,7 @@ void WM_operator_properties_checker_interval(wmOperatorType *ot, bool nth_can_di 100); } -void WM_operator_properties_checker_interval_from_op(struct wmOperator *op, +void WM_operator_properties_checker_interval_from_op(wmOperator *op, struct CheckerIntervalParams *op_params) { const int nth = RNA_int_get(op->ptr, "nth"); diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c index 85d1352c518..24194f41262 100644 --- a/source/blender/windowmanager/intern/wm_operator_type.c +++ b/source/blender/windowmanager/intern/wm_operator_type.c @@ -570,7 +570,7 @@ static void wm_operatortype_free_macro(wmOperatorType *ot) BLI_freelistN(&ot->macro); } -const char *WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties) +const char *WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties) { const char *name = NULL; @@ -581,9 +581,7 @@ const char *WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *p return (name && name[0]) ? name : RNA_struct_ui_name(ot->srna); } -char *WM_operatortype_description(struct bContext *C, - struct wmOperatorType *ot, - struct PointerRNA *properties) +char *WM_operatortype_description(bContext *C, wmOperatorType *ot, PointerRNA *properties) { if (ot->get_description && properties) { char *description = ot->get_description(C, ot, properties); @@ -603,9 +601,7 @@ char *WM_operatortype_description(struct bContext *C, return NULL; } -char *WM_operatortype_description_or_name(struct bContext *C, - struct wmOperatorType *ot, - struct PointerRNA *properties) +char *WM_operatortype_description_or_name(bContext *C, wmOperatorType *ot, PointerRNA *properties) { char *text = WM_operatortype_description(C, ot, properties); if (text == NULL) { diff --git a/source/blender/windowmanager/intern/wm_operator_utils.c b/source/blender/windowmanager/intern/wm_operator_utils.c index 069d7fc0606..e543ff27d3e 100644 --- a/source/blender/windowmanager/intern/wm_operator_utils.c +++ b/source/blender/windowmanager/intern/wm_operator_utils.c @@ -32,7 +32,7 @@ /** \name Generic Utilities * \{ */ -int WM_operator_flag_only_pass_through_on_press(int retval, const struct wmEvent *event) +int WM_operator_flag_only_pass_through_on_press(int retval, const wmEvent *event) { if (event->val != KM_PRESS) { if (retval & OPERATOR_PASS_THROUGH) { diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 6d226554af9..97e81790093 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -994,7 +994,7 @@ int WM_generic_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) return op->type->modal(C, op, event); } -void WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op) +void WM_operator_view3d_unit_defaults(bContext *C, wmOperator *op) { if (op->flag & OP_IS_INVOKE) { Scene *scene = CTX_data_scene(C); @@ -1223,7 +1223,7 @@ int WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *UNUSED(event return OPERATOR_RUNNING_MODAL; } -bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format) +bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const ImageFormatData *im_format) { char filepath[FILE_MAX]; /* Don't NULL check prop, this can only run on ops with a 'filepath'. */ @@ -1283,7 +1283,7 @@ void WM_operator_last_properties_ensure(wmOperatorType *ot, PointerRNA *ptr) RNA_pointer_create(G_MAIN->wm.first, ot->srna, props, ptr); } -ID *WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short idcode) +ID *WM_operator_drop_load_path(bContext *C, wmOperator *op, const short idcode) { Main *bmain = CTX_data_main(C); ID *id = NULL; @@ -1517,7 +1517,7 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *region, void *userDa return block; } -static void wm_operator_ui_popup_cancel(struct bContext *C, void *userData) +static void wm_operator_ui_popup_cancel(bContext *C, void *userData) { wmOpPopUp *data = userData; wmOperator *op = data->op; @@ -1535,7 +1535,7 @@ static void wm_operator_ui_popup_cancel(struct bContext *C, void *userData) MEM_freeN(data); } -static void wm_operator_ui_popup_ok(struct bContext *C, void *arg, int retval) +static void wm_operator_ui_popup_ok(bContext *C, void *arg, int retval) { wmOpPopUp *data = arg; wmOperator *op = data->op; diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index c6e008c8506..ced24f58aa1 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -245,7 +245,7 @@ typedef struct PlayAnimPict { int size; /** The allocated file-path to the image. */ const char *filepath; - struct ImBuf *ibuf; + ImBuf *ibuf; struct anim *anim; int frame; int IB_flags; @@ -257,7 +257,7 @@ typedef struct PlayAnimPict { #endif } PlayAnimPict; -static struct ListBase picsbase = {NULL, NULL}; +static ListBase picsbase = {NULL, NULL}; /* frames in memory - store them here to for easy deallocation later */ static bool fromdisk = false; static double ptottime = 0.0, swaptime = 0.04; @@ -268,7 +268,7 @@ static double fps_movie; #ifdef USE_FRAME_CACHE_LIMIT static struct { /** A list of #LinkData nodes referencing #PlayAnimPict to track cached frames. */ - struct ListBase pics; + ListBase pics; /** Number if elements in `pics`. */ int pics_len; /** Keep track of memory used by #g_frame_cache.pics when `g_frame_cache.memory_limit != 0`. */ @@ -536,7 +536,7 @@ static void draw_display_buffer(PlayState *ps, ImBuf *ibuf) } static void playanim_toscreen( - PlayState *ps, PlayAnimPict *picture, struct ImBuf *ibuf, int fontid, int fstep) + PlayState *ps, PlayAnimPict *picture, ImBuf *ibuf, int fontid, int fstep) { GHOST_ActivateWindowDrawingContext(g_WS.ghost_window); @@ -639,7 +639,7 @@ static void build_pict_list_ex( struct anim *anim = IMB_open_anim(filepath_first, IB_rect, 0, NULL); if (anim) { int pic; - struct ImBuf *ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE); + ImBuf *ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE); if (ibuf) { playanim_toscreen(ps, NULL, ibuf, fontid, fstep); IMB_freeImBuf(ibuf); @@ -836,7 +836,7 @@ static void change_frame(PlayState *ps) } playanim_window_get_size(&sizex, &sizey); - i_last = ((struct PlayAnimPict *)picsbase.last)->frame; + i_last = ((PlayAnimPict *)picsbase.last)->frame; i = (i_last * ps->frame_cursor_x) / sizex; CLAMP(i, 0, i_last); @@ -1398,7 +1398,7 @@ static void playanim_window_zoom(PlayState *ps, const float zoom_offset) */ static char *wm_main_playanim_intern(int argc, const char **argv) { - struct ImBuf *ibuf = NULL; + ImBuf *ibuf = NULL; static char filepath[FILE_MAX]; /* abused to return dropped file path */ uint32_t maxwinx, maxwiny; int i; @@ -1612,7 +1612,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv) #ifdef WITH_AUDASPACE source = AUD_Sound_file(filepath); { - struct anim *anim_movie = ((struct PlayAnimPict *)picsbase.first)->anim; + struct anim *anim_movie = ((PlayAnimPict *)picsbase.first)->anim; if (anim_movie) { short frs_sec = 25; float frs_sec_base = 1.0; diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c index 68356e7767f..3f92a8c479b 100644 --- a/source/blender/windowmanager/intern/wm_toolsystem.c +++ b/source/blender/windowmanager/intern/wm_toolsystem.c @@ -57,7 +57,7 @@ static void toolsystem_refresh_screen_from_active_tool(Main *bmain, /** \name Tool Reference API * \{ */ -struct bToolRef *WM_toolsystem_ref_from_context(struct bContext *C) +bToolRef *WM_toolsystem_ref_from_context(bContext *C) { WorkSpace *workspace = CTX_wm_workspace(C); const Scene *scene = CTX_data_scene(C); @@ -78,7 +78,7 @@ struct bToolRef *WM_toolsystem_ref_from_context(struct bContext *C) return tref; } -struct bToolRef_Runtime *WM_toolsystem_runtime_from_context(struct bContext *C) +bToolRef_Runtime *WM_toolsystem_runtime_from_context(bContext *C) { bToolRef *tref = WM_toolsystem_ref_from_context(C); return tref ? tref->runtime : NULL; @@ -101,7 +101,7 @@ bToolRef_Runtime *WM_toolsystem_runtime_find(WorkSpace *workspace, const bToolKe return tref ? tref->runtime : NULL; } -bool WM_toolsystem_ref_ensure(struct WorkSpace *workspace, const bToolKey *tkey, bToolRef **r_tref) +bool WM_toolsystem_ref_ensure(WorkSpace *workspace, const bToolKey *tkey, bToolRef **r_tref) { bToolRef *tref = WM_toolsystem_ref_find(workspace, tkey); if (tref) { @@ -246,7 +246,7 @@ void WM_toolsystem_reinit(bContext *C, WorkSpace *workspace, const bToolKey *tke } } -void WM_toolsystem_unlink_all(struct bContext *C, struct WorkSpace *workspace) +void WM_toolsystem_unlink_all(bContext *C, WorkSpace *workspace) { LISTBASE_FOREACH (bToolRef *, tref, &workspace->tools) { tref->tag = 0; @@ -262,14 +262,14 @@ void WM_toolsystem_unlink_all(struct bContext *C, struct WorkSpace *workspace) } } -void WM_toolsystem_refresh_all(struct bContext *C, struct WorkSpace *workspace) +void WM_toolsystem_refresh_all(bContext *C, WorkSpace *workspace) { BLI_assert(0); LISTBASE_FOREACH (bToolRef *, tref, &workspace->tools) { toolsystem_refresh_ref(C, workspace, tref); } } -void WM_toolsystem_reinit_all(struct bContext *C, wmWindow *win) +void WM_toolsystem_reinit_all(bContext *C, wmWindow *win) { bScreen *screen = WM_window_get_active_screen(win); const Scene *scene = WM_window_get_active_scene(win); @@ -294,8 +294,8 @@ void WM_toolsystem_reinit_all(struct bContext *C, wmWindow *win) } } -void WM_toolsystem_ref_set_from_runtime(struct bContext *C, - struct WorkSpace *workspace, +void WM_toolsystem_ref_set_from_runtime(bContext *C, + WorkSpace *workspace, bToolRef *tref, const bToolRef_Runtime *tref_rt, const char *idname) diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 960454418ab..fed315a6283 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1770,9 +1770,7 @@ GHOST_TDrawingContextType wm_ghost_drawing_context_type(const eGPUBackendType gp return GHOST_kDrawingContextTypeNone; } -static uiBlock *block_create_opengl_usage_warning(struct bContext *C, - struct ARegion *region, - void *UNUSED(arg1)) +static uiBlock *block_create_opengl_usage_warning(bContext *C, ARegion *region, void *UNUSED(arg1)) { uiBlock *block = UI_block_begin(C, region, "autorun_warning_popup", UI_EMBOSS); UI_block_theme_style_set(block, UI_BLOCK_THEME_STYLE_POPUP); @@ -2244,7 +2242,7 @@ wmWindow *WM_window_find_under_cursor(wmWindow *win, const int mval[2], int r_mv return win_other; } -wmWindow *WM_window_find_by_area(wmWindowManager *wm, const struct ScrArea *area) +wmWindow *WM_window_find_by_area(wmWindowManager *wm, const ScrArea *area) { LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { bScreen *sc = WM_window_get_active_screen(win); diff --git a/source/blender/windowmanager/message_bus/intern/wm_message_bus.c b/source/blender/windowmanager/message_bus/intern/wm_message_bus.c index b7dff858e7e..24db4b885c4 100644 --- a/source/blender/windowmanager/message_bus/intern/wm_message_bus.c +++ b/source/blender/windowmanager/message_bus/intern/wm_message_bus.c @@ -190,7 +190,7 @@ void WM_msg_publish_with_key(struct wmMsgBus *mbus, wmMsgSubscribeKey *msg_key) } } -void WM_msg_id_update(struct wmMsgBus *mbus, struct ID *id_src, struct ID *id_dst) +void WM_msg_id_update(struct wmMsgBus *mbus, ID *id_src, ID *id_dst) { for (uint i = 0; i < WM_MSG_TYPE_NUM; i++) { wmMsgTypeInfo *info = &wm_msg_types[i]; @@ -200,7 +200,7 @@ void WM_msg_id_update(struct wmMsgBus *mbus, struct ID *id_src, struct ID *id_ds } } -void WM_msg_id_remove(struct wmMsgBus *mbus, const struct ID *id) +void WM_msg_id_remove(struct wmMsgBus *mbus, const ID *id) { for (uint i = 0; i < WM_MSG_TYPE_NUM; i++) { wmMsgTypeInfo *info = &wm_msg_types[i]; diff --git a/source/blender/windowmanager/xr/intern/wm_xr_action.c b/source/blender/windowmanager/xr/intern/wm_xr_action.c index 09362989756..4d31f9c8059 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_action.c +++ b/source/blender/windowmanager/xr/intern/wm_xr_action.c @@ -337,7 +337,7 @@ bool WM_xr_action_binding_create(wmXrData *xr, const ListBase *component_paths, const float *float_thresholds, const eXrAxisFlag *axis_flags, - const struct wmXrPose *poses) + const wmXrPose *poses) { const uint count = (uint)BLI_listbase_count(user_paths); BLI_assert(count == (uint)BLI_listbase_count(component_paths)); diff --git a/source/blender/windowmanager/xr/intern/wm_xr_actionmap.c b/source/blender/windowmanager/xr/intern/wm_xr_actionmap.c index abbbb66c134..d6cc0d0b788 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_actionmap.c +++ b/source/blender/windowmanager/xr/intern/wm_xr_actionmap.c @@ -392,7 +392,7 @@ XrActionMap *WM_xr_actionmap_new(wmXrRuntimeData *runtime, const char *name, boo return am_prev; } - XrActionMap *am = MEM_callocN(sizeof(struct XrActionMap), __func__); + XrActionMap *am = MEM_callocN(sizeof(XrActionMap), __func__); STRNCPY(am->name, name); if (am_prev) { WM_xr_actionmap_ensure_unique(runtime, am);