[Bf-blender-cvs] [0b41497c3cd] simulation-access-modifier: remove "Access" from name

Jacques Lucke noreply at git.blender.org
Mon May 4 12:36:22 CEST 2020


Commit: 0b41497c3cd4809321673baa2cb6dc6e4b6b129a
Author: Jacques Lucke
Date:   Mon May 4 12:36:11 2020 +0200
Branches: simulation-access-modifier
https://developer.blender.org/rB0b41497c3cd4809321673baa2cb6dc6e4b6b129a

remove "Access" from name

===================================================================

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/modifiers/MOD_modifiertypes.h
R078	source/blender/modifiers/intern/MOD_simulation_access.cc	source/blender/modifiers/intern/MOD_simulation.cc
M	source/blender/modifiers/intern/MOD_util.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 9efb2e693ee..3d1adf89e64 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1821,7 +1821,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "thresh", text="Threshold")
         col.prop(md, "face_influence")
 
-    def SIMULATION_ACCESS(self, layout, ob, md):
+    def SIMULATION(self, layout, ob, md):
         layout.prop(md, "simulation")
         layout.prop(md, "data_path")
 
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index d8d9e1189c6..13cbda5aad7 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -2191,7 +2191,7 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
             case eModifierType_WeightedNormal:
               data.icon = ICON_MOD_NORMALEDIT;
               break;
-            case eModifierType_SimulationAccess:
+            case eModifierType_Simulation:
               data.icon = ICON_PHYSICS; /* TODO: Use correct icon. */
               break;
               /* Default */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index c996483a38f..ac526face72 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -94,7 +94,7 @@ typedef enum ModifierType {
   eModifierType_WeightedNormal = 54,
   eModifierType_Weld = 55,
   eModifierType_Fluid = 56,
-  eModifierType_SimulationAccess = 57,
+  eModifierType_Simulation = 57,
   NUM_MODIFIER_TYPES,
 } ModifierType;
 
@@ -2118,12 +2118,12 @@ enum {
 #define MOD_MESHSEQ_READ_ALL \
   (MOD_MESHSEQ_READ_VERT | MOD_MESHSEQ_READ_POLY | MOD_MESHSEQ_READ_UV | MOD_MESHSEQ_READ_COLOR)
 
-typedef struct SimulationAccessModifierData {
+typedef struct SimulationModifierData {
   ModifierData modifier;
 
   struct Simulation *simulation;
   char data_path[64];
-} SimulationAccessModifierData;
+} SimulationModifierData;
 
 #ifdef __cplusplus
 }
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 7727f68c4c0..1b5a01aca75 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -290,10 +290,10 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = {
     {eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
     {eModifierType_Surface, "SURFACE", ICON_MODIFIER, "Surface", ""},
 #ifdef WITH_NEW_SIMULATION_TYPE
-    {eModifierType_SimulationAccess,
-     "SIMULATION_ACCESS",
+    {eModifierType_Simulation,
+     "SIMULATION",
      ICON_PHYSICS,
-     "Simulation Access",
+     "Simulation",
      ""}, /* TODO: Use correct icon. */
 #endif
     {0, NULL, 0, NULL, NULL},
@@ -723,8 +723,8 @@ static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr)
       return &RNA_SurfaceDeformModifier;
     case eModifierType_WeightedNormal:
       return &RNA_WeightedNormalModifier;
-    case eModifierType_SimulationAccess:
-      return &RNA_SimulationAccessModifier;
+    case eModifierType_Simulation:
+      return &RNA_SimulationModifier;
     /* Default */
     case eModifierType_Fluidsim: /* deprecated */
     case eModifierType_None:
@@ -6560,9 +6560,9 @@ static void rna_def_modifier_simulation_access(BlenderRNA *brna)
   StructRNA *srna;
   PropertyRNA *prop;
 
-  srna = RNA_def_struct(brna, "SimulationAccessModifier", "Modifier");
-  RNA_def_struct_ui_text(srna, "Simulation Access Modifier", "");
-  RNA_def_struct_sdna(srna, "SimulationAccessModifierData");
+  srna = RNA_def_struct(brna, "SimulationModifier", "Modifier");
+  RNA_def_struct_ui_text(srna, "Simulation Modifier", "");
+  RNA_def_struct_sdna(srna, "SimulationModifierData");
   RNA_def_struct_ui_icon(srna, ICON_PHYSICS); /* TODO: Use correct icon. */
 
 #  ifdef WITH_NEW_SIMULATION_TYPE
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index c31f5b3ff46..8ab7d35070b 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -78,7 +78,7 @@ set(SRC
   intern/MOD_shapekey.c
   intern/MOD_shrinkwrap.c
   intern/MOD_simpledeform.c
-  intern/MOD_simulation_access.cc
+  intern/MOD_simulation.cc
   intern/MOD_skin.c
   intern/MOD_smooth.c
   intern/MOD_softbody.c
diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h
index 5e596841787..ba676bbe459 100644
--- a/source/blender/modifiers/MOD_modifiertypes.h
+++ b/source/blender/modifiers/MOD_modifiertypes.h
@@ -86,7 +86,7 @@ extern ModifierTypeInfo modifierType_CorrectiveSmooth;
 extern ModifierTypeInfo modifierType_MeshSequenceCache;
 extern ModifierTypeInfo modifierType_SurfaceDeform;
 extern ModifierTypeInfo modifierType_WeightedNormal;
-extern ModifierTypeInfo modifierType_SimulationAccess;
+extern ModifierTypeInfo modifierType_Simulation;
 
 /* MOD_util.c */
 void modifier_type_init(ModifierTypeInfo *types[]);
diff --git a/source/blender/modifiers/intern/MOD_simulation_access.cc b/source/blender/modifiers/intern/MOD_simulation.cc
similarity index 78%
rename from source/blender/modifiers/intern/MOD_simulation_access.cc
rename to source/blender/modifiers/intern/MOD_simulation.cc
index 5b2c3a9d30f..3858fbb7592 100644
--- a/source/blender/modifiers/intern/MOD_simulation_access.cc
+++ b/source/blender/modifiers/intern/MOD_simulation.cc
@@ -48,39 +48,39 @@
 
 static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
 {
-  SimulationAccessModifierData *samd = (SimulationAccessModifierData *)md;
-  if (samd->simulation) {
-    DEG_add_simulation_relation(ctx->node, samd->simulation, "Accessed Simulation");
+  SimulationModifierData *smd = (SimulationModifierData *)md;
+  if (smd->simulation) {
+    DEG_add_simulation_relation(ctx->node, smd->simulation, "Accessed Simulation");
   }
 }
 
 static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
 {
-  SimulationAccessModifierData *samd = (SimulationAccessModifierData *)md;
-  walk(userData, ob, (ID **)&samd->simulation, IDWALK_CB_USER);
+  SimulationModifierData *smd = (SimulationModifierData *)md;
+  walk(userData, ob, (ID **)&smd->simulation, IDWALK_CB_USER);
 }
 
 static bool isDisabled(const struct Scene *UNUSED(scene),
                        ModifierData *md,
                        bool UNUSED(useRenderParams))
 {
-  SimulationAccessModifierData *samd = (SimulationAccessModifierData *)md;
-  return samd->simulation == nullptr;
+  SimulationModifierData *smd = (SimulationModifierData *)md;
+  return smd->simulation == nullptr;
 }
 
 static PointCloud *modifyPointCloud(ModifierData *md,
                                     const ModifierEvalContext *UNUSED(ctx),
                                     PointCloud *pointcloud)
 {
-  SimulationAccessModifierData *samd = (SimulationAccessModifierData *)md;
-  UNUSED_VARS(samd);
+  SimulationModifierData *smd = (SimulationModifierData *)md;
+  UNUSED_VARS(smd);
   return pointcloud;
 }
 
-ModifierTypeInfo modifierType_SimulationAccess = {
-    /* name */ "Simulation Access",
-    /* structName */ "SimulationAccessModifierData",
-    /* structSize */ sizeof(SimulationAccessModifierData),
+ModifierTypeInfo modifierType_Simulation = {
+    /* name */ "Simulation",
+    /* structName */ "SimulationModifierData",
+    /* structSize */ sizeof(SimulationModifierData),
     /* type */ eModifierTypeType_None,
     /* flags */ (ModifierTypeFlag)0,
 
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index a854db8cfb1..bd453c24a31 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -337,6 +337,6 @@ void modifier_type_init(ModifierTypeInfo *types[])
   INIT_TYPE(MeshSequenceCache);
   INIT_TYPE(SurfaceDeform);
   INIT_TYPE(WeightedNormal);
-  INIT_TYPE(SimulationAccess);
+  INIT_TYPE(Simulation);
 #undef INIT_TYPE
 }



More information about the Bf-blender-cvs mailing list