diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-28 04:29:47 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-28 06:41:31 +0300 |
commit | 6f305577b346030249bdb762f887136ff02624e3 (patch) | |
tree | 207b1cbba07e8a0f864ff854d6d1a74c26c6beaf /source/blender/makesdna | |
parent | 24839fdefa89339e77465c27d89c86cd5ac0cdd9 (diff) |
Cleanup: use "num" as a suffix in: source/blender/modifiers
Also rename DNA struct members.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_modifier_defaults.h | 20 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 22 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_rename_defs.h | 17 |
4 files changed, 37 insertions, 24 deletions
diff --git a/source/blender/makesdna/DNA_modifier_defaults.h b/source/blender/makesdna/DNA_modifier_defaults.h index 299ac4e2fbe..77730ce254c 100644 --- a/source/blender/makesdna/DNA_modifier_defaults.h +++ b/source/blender/makesdna/DNA_modifier_defaults.h @@ -309,7 +309,7 @@ .falloff = 0.0f, \ .curfalloff = NULL, \ .indexar = NULL, \ - .totindex = 0, \ + .indexar_num = 0, \ .force = 1.0f, \ .name = "", \ } @@ -317,7 +317,7 @@ #define _DNA_DEFAULT_LaplacianDeformModifierData \ { \ .anchor_grp_name = "", \ - .total_verts = 0, \ + .verts_num = 0, \ .repeat = 1, \ .vertexco = NULL, \ .cache_system = NULL, \ @@ -381,13 +381,13 @@ .bindinfluences = NULL, \ .bindoffsets = NULL, \ .bindcagecos = NULL, \ - .totvert = 0, \ - .totcagevert = 0, \ + .verts_num = 0, \ + .cage_verts_num = 0, \ .dyngrid = NULL, \ .dyninfluences = NULL, \ .dynverts = NULL, \ .dyngridsize = 0, \ - .totinfluence = 0, \ + .influences_num = 0, \ .dyncellmin = {0.0f, 0.0f, 0.0f}, \ .dyncellwidth = 0.0f, \ .bindmat = _DNA_DEFAULT_UNIT_M4, \ @@ -621,7 +621,7 @@ .mesh = NULL, \ .bvhtree = NULL, \ .cfra = 0, \ - .numverts = 0, \ + .verts_num = 0, \ } #define _DNA_DEFAULT_SurfaceDeformModifierData \ @@ -630,9 +630,9 @@ .target = NULL, \ .verts = NULL, \ .falloff = 4.0f, \ - .num_mesh_verts = 0, \ - .num_bind_verts = 0, \ - .numpoly = 0, \ + .mesh_verts_num = 0, \ + .bind_verts_num = 0, \ + .polys_num = 0, \ .flags = 0, \ .mat = _DNA_DEFAULT_UNIT_M4, \ .strength = 1.0f, \ @@ -650,7 +650,7 @@ #define _DNA_DEFAULT_UVProjectModifierData \ { \ .projectors = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, \ - .num_projectors = 1, \ + .projectors_num = 1, \ .aspectx = 1.0f, \ .aspecty = 1.0f, \ .scalex = 1.0f, \ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 807a615f7f9..11825de4b33 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -617,7 +617,7 @@ typedef struct UVProjectModifierData { */ struct Object *projectors[10]; char _pad2[4]; - int num_projectors; + int projectors_num; float aspectx, aspecty; float scalex, scaley; /** MAX_CUSTOMDATA_LAYER_NAME. */ @@ -812,7 +812,7 @@ typedef struct HookModifierData { /** If NULL, it's using vertexgroup. */ int *indexar; - int totindex; + int indexar_num; float force; /** Optional vertexgroup name, MAX_VGROUP_NAME. */ char name[64]; @@ -895,7 +895,7 @@ typedef struct SurfaceModifierData { /** Bounding volume hierarchy of the mesh faces. */ struct BVHTreeFromMesh *bvhtree; - int cfra, numverts; + int cfra, verts_num; } SurfaceModifierData; typedef struct BooleanModifierData { @@ -945,7 +945,7 @@ typedef struct MDefInfluence { typedef struct MDefCell { int offset; - int totinfluence; + int influences_num; } MDefCell; typedef struct MeshDeformModifierData { @@ -967,7 +967,7 @@ typedef struct MeshDeformModifierData { /** Coordinates that cage was bound with. */ float *bindcagecos; /** Total vertices in mesh and cage. */ - int totvert, totcagevert; + int verts_num, cage_verts_num; /* result of dynamic binding */ /** Grid with dynamic binding cell points. */ @@ -979,7 +979,7 @@ typedef struct MeshDeformModifierData { /** Size of the dynamic bind grid. */ int dyngridsize; /** Total number of vertex influences. */ - int totinfluence; + int influences_num; /** Offset of the dynamic bind grid. */ float dyncellmin[3]; /** Width of dynamic bind cell. */ @@ -998,7 +998,7 @@ typedef struct MeshDeformModifierData { struct MeshDeformModifierData *mmd, struct Mesh *cagemesh, float *vertexcos, - int totvert, + int verts_num, float cagemat[4][4]); } MeshDeformModifierData; @@ -2018,7 +2018,7 @@ typedef struct LaplacianDeformModifierData { ModifierData modifier; /** MAX_VGROUP_NAME. */ char anchor_grp_name[64]; - int total_verts, repeat; + int verts_num, repeat; float *vertexco; /** Runtime only. */ void *cache_system; @@ -2201,7 +2201,7 @@ enum { typedef struct SDefBind { unsigned int *vert_inds; - unsigned int numverts; + unsigned int verts_num; int mode; float *vert_weights; float normal_dist; @@ -2210,7 +2210,7 @@ typedef struct SDefBind { typedef struct SDefVert { SDefBind *binds; - unsigned int numbinds; + unsigned int binds_num; unsigned int vertex_idx; } SDefVert; @@ -2223,7 +2223,7 @@ typedef struct SurfaceDeformModifierData { /** Vertex bind data. */ SDefVert *verts; float falloff; - unsigned int num_mesh_verts, num_bind_verts, numpoly; + unsigned int mesh_verts_num, bind_verts_num, polys_num; int flags; float mat[4][4]; float strength; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index c3708e25ee7..838a4ed2818 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -203,7 +203,7 @@ typedef struct Object_Runtime { float (*crazyspace_deform_imats)[3][3]; float (*crazyspace_deform_cos)[3]; - int crazyspace_num_verts; + int crazyspace_verts_num; int _pad3[3]; } Object_Runtime; diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h index 7ea8755412d..86649357433 100644 --- a/source/blender/makesdna/intern/dna_rename_defs.h +++ b/source/blender/makesdna/intern/dna_rename_defs.h @@ -74,13 +74,19 @@ DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_parent, guide_parent) DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_source, guide_source) DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_vel_factor, guide_vel_factor) DNA_STRUCT_RENAME_ELEM(FluidEffectorSettings, guiding_mode, guide_mode) +DNA_STRUCT_RENAME_ELEM(HookModifierData, totindex, indexar_num) DNA_STRUCT_RENAME_ELEM(Image, name, filepath) +DNA_STRUCT_RENAME_ELEM(LaplacianDeformModifierData, total_verts, verts_num) DNA_STRUCT_RENAME_ELEM(Library, name, filepath) DNA_STRUCT_RENAME_ELEM(LineartGpencilModifierData, line_types, edge_types) DNA_STRUCT_RENAME_ELEM(LineartGpencilModifierData, transparency_flags, mask_switches) DNA_STRUCT_RENAME_ELEM(LineartGpencilModifierData, transparency_mask, material_mask_bits) +DNA_STRUCT_RENAME_ELEM(MDefCell, totinfluence, influences_num) DNA_STRUCT_RENAME_ELEM(MaskLayer, restrictflag, visibility_flag) DNA_STRUCT_RENAME_ELEM(MaterialLineArt, transparency_mask, material_mask_bits) +DNA_STRUCT_RENAME_ELEM(MeshDeformModifierData, totcagevert, cage_verts_num) +DNA_STRUCT_RENAME_ELEM(MeshDeformModifierData, totinfluence, influences_num) +DNA_STRUCT_RENAME_ELEM(MeshDeformModifierData, totvert, verts_num) DNA_STRUCT_RENAME_ELEM(MovieClip, name, filepath) DNA_STRUCT_RENAME_ELEM(NodeCryptomatte, num_inputs, inputs_num) DNA_STRUCT_RENAME_ELEM(Object, col, color) @@ -88,18 +94,25 @@ DNA_STRUCT_RENAME_ELEM(Object, dup_group, instance_collection) DNA_STRUCT_RENAME_ELEM(Object, dupfacesca, instance_faces_scale) DNA_STRUCT_RENAME_ELEM(Object, restrictflag, visibility_flag) DNA_STRUCT_RENAME_ELEM(Object, size, scale) +DNA_STRUCT_RENAME_ELEM(Object_Runtime, crazyspace_num_verts, crazyspace_verts_num) DNA_STRUCT_RENAME_ELEM(ParticleSettings, child_nbr, child_percent) DNA_STRUCT_RENAME_ELEM(ParticleSettings, dup_group, instance_collection) DNA_STRUCT_RENAME_ELEM(ParticleSettings, dup_ob, instance_object) DNA_STRUCT_RENAME_ELEM(ParticleSettings, dupliweights, instance_weights) DNA_STRUCT_RENAME_ELEM(ParticleSettings, ren_child_nbr, child_render_percent) -DNA_STRUCT_RENAME_ELEM(RigidBodyWorld, steps_per_second, substeps_per_frame) DNA_STRUCT_RENAME_ELEM(RenderData, bake_filter, bake_margin) +DNA_STRUCT_RENAME_ELEM(RigidBodyWorld, steps_per_second, substeps_per_frame) +DNA_STRUCT_RENAME_ELEM(SDefBind, numverts, verts_num) +DNA_STRUCT_RENAME_ELEM(SDefVert, numbinds, binds_num) DNA_STRUCT_RENAME_ELEM(SpaceSeq, overlay_type, overlay_frame_type) -DNA_STRUCT_RENAME_ELEM(SurfaceDeformModifierData, numverts, num_bind_verts) +DNA_STRUCT_RENAME_ELEM(SurfaceDeformModifierData, num_mesh_verts, mesh_verts_num) +DNA_STRUCT_RENAME_ELEM(SurfaceDeformModifierData, numpoly, polys_num) +DNA_STRUCT_RENAME_ELEM(SurfaceDeformModifierData, numverts, bind_verts_num) +DNA_STRUCT_RENAME_ELEM(SurfaceModifierData, numverts, verts_num) DNA_STRUCT_RENAME_ELEM(Text, name, filepath) DNA_STRUCT_RENAME_ELEM(ThemeSpace, scrubbing_background, time_scrub_background) DNA_STRUCT_RENAME_ELEM(ThemeSpace, show_back_grad, background_type) +DNA_STRUCT_RENAME_ELEM(UVProjectModifierData, num_projectors, projectors_num) DNA_STRUCT_RENAME_ELEM(UserDef, gp_manhattendist, gp_manhattandist) DNA_STRUCT_RENAME_ELEM(VFont, name, filepath) DNA_STRUCT_RENAME_ELEM(View3D, far, clip_end) |