Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-10-21 14:47:50 +0300
committerJacques Lucke <jacques@blender.org>2020-10-21 14:47:50 +0300
commit8738a668d8209b41e7554b3711213b43800b3bd4 (patch)
tree2a49295639b7f6cb473039d95f980c23b6bdc993 /source/blender/makesrna
parent819b1a7f9da05cc49c8cbe56a98886ed58bbc31c (diff)
Preferences: separate feature flags for geometry nodes and point cloud type
Those two features are not directly related and one might be activated in master earlier than the other. WITH_PARTICLE_NODES was removed, because we continue the project under the name "Geometry Nodes".
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h2
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt3
-rw-r--r--source/blender/makesrna/intern/makesrna.c4
-rw-r--r--source/blender/makesrna/intern/rna_ID.c8
-rw-r--r--source/blender/makesrna/intern/rna_internal.h4
-rw-r--r--source/blender/makesrna/intern/rna_main.c8
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c12
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c4
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c4
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c11
11 files changed, 34 insertions, 28 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 6b92c99df87..6dfd7b0fdf5 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -565,7 +565,7 @@ extern StructRNA RNA_ShrinkwrapModifier;
extern StructRNA RNA_SimpleDeformModifier;
extern StructRNA RNA_SimplifyGpencilModifier;
extern StructRNA RNA_Simulation;
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_GEOMETRY_NODES
extern StructRNA RNA_SimulationModifier;
#endif
extern StructRNA RNA_SimulationNode;
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index f2d4859977f..d8029ff16a0 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -98,7 +98,8 @@ set(DEFSRC
)
if(WITH_EXPERIMENTAL_FEATURES)
- add_definitions(-DWITH_PARTICLE_NODES)
+ add_definitions(-DWITH_GEOMETRY_NODES)
+ add_definitions(-DWITH_POINT_CLOUD)
add_definitions(-DWITH_HAIR_NODES)
list(APPEND DEFSRC
rna_hair.c
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index bd762bd5357..e193aa78353 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -4307,7 +4307,7 @@ static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_packedfile.c", NULL, RNA_def_packedfile},
{"rna_palette.c", NULL, RNA_def_palette},
{"rna_particle.c", NULL, RNA_def_particle},
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_POINT_CLOUD
{"rna_pointcloud.c", NULL, RNA_def_pointcloud},
#endif
{"rna_pose.c", "rna_pose_api.c", RNA_def_pose},
@@ -4319,7 +4319,7 @@ static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_screen.c", NULL, RNA_def_screen},
{"rna_sculpt_paint.c", NULL, RNA_def_sculpt_paint},
{"rna_sequencer.c", "rna_sequencer_api.c", RNA_def_sequencer},
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_GEOMETRY_NODES
{"rna_simulation.c", NULL, RNA_def_simulation},
#endif
{"rna_space.c", "rna_space_api.c", RNA_def_space},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 320476c22b1..a6084ae6a43 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -289,7 +289,7 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_PaintCurve) {
return ID_PC;
}
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_POINT_CLOUD
if (base_type == &RNA_PointCloud) {
return ID_PT;
}
@@ -303,7 +303,7 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_Screen) {
return ID_SCR;
}
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
if (base_type == &RNA_Simulation) {
return ID_SIM;
}
@@ -399,7 +399,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_PC:
return &RNA_PaintCurve;
case ID_PT:
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_POINT_CLOUD
return &RNA_PointCloud;
# else
return &RNA_ID;
@@ -411,7 +411,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_SCR:
return &RNA_Screen;
case ID_SIM:
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
return &RNA_Simulation;
# else
return &RNA_ID;
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index eaf4e8866f9..2e24461d332 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -466,11 +466,11 @@ void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop);
#ifdef WITH_HAIR_NODES
void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop);
#endif
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_POINT_CLOUD
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop);
#endif
void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop);
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_GEOMETRY_NODES
void RNA_def_main_simulations(BlenderRNA *brna, PropertyRNA *cprop);
#endif
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index d83fca69278..aa22a4307d2 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -128,13 +128,13 @@ RNA_MAIN_LISTBASE_FUNCS_DEF(objects)
RNA_MAIN_LISTBASE_FUNCS_DEF(paintcurves)
RNA_MAIN_LISTBASE_FUNCS_DEF(palettes)
RNA_MAIN_LISTBASE_FUNCS_DEF(particles)
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_POINT_CLOUD
RNA_MAIN_LISTBASE_FUNCS_DEF(pointclouds)
# endif
RNA_MAIN_LISTBASE_FUNCS_DEF(scenes)
RNA_MAIN_LISTBASE_FUNCS_DEF(screens)
RNA_MAIN_LISTBASE_FUNCS_DEF(shapekeys)
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
RNA_MAIN_LISTBASE_FUNCS_DEF(simulations)
# endif
RNA_MAIN_LISTBASE_FUNCS_DEF(sounds)
@@ -393,7 +393,7 @@ void RNA_def_main(BlenderRNA *brna)
# ifdef WITH_HAIR_NODES
{"hairs", "Hair", "rna_Main_hairs_begin", "Hairs", "Hair data-blocks", RNA_def_main_hairs},
# endif
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_POINT_CLOUD
{"pointclouds",
"PointCloud",
"rna_Main_pointclouds_begin",
@@ -407,7 +407,7 @@ void RNA_def_main(BlenderRNA *brna)
"Volumes",
"Volume data-blocks",
RNA_def_main_volumes},
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
{"simulations",
"Simulation",
"rna_Main_simulations_begin",
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 8a34bf0245b..d2381ac7577 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -680,7 +680,7 @@ static Hair *rna_Main_hairs_new(Main *bmain, const char *name)
}
# endif
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_POINT_CLOUD
static PointCloud *rna_Main_pointclouds_new(Main *bmain, const char *name)
{
char safe_name[MAX_ID_NAME - 2];
@@ -702,7 +702,7 @@ static Volume *rna_Main_volumes_new(Main *bmain, const char *name)
return volume;
}
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
static Simulation *rna_Main_simulations_new(Main *bmain, const char *name)
{
char safe_name[MAX_ID_NAME - 2];
@@ -759,11 +759,11 @@ RNA_MAIN_ID_TAG_FUNCS_DEF(lightprobes, lightprobes, ID_LP)
# ifdef WITH_HAIR_NODES
RNA_MAIN_ID_TAG_FUNCS_DEF(hairs, hairs, ID_HA)
# endif
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_POINT_CLOUD
RNA_MAIN_ID_TAG_FUNCS_DEF(pointclouds, pointclouds, ID_PT)
# endif
RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volumes, ID_VO)
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
RNA_MAIN_ID_TAG_FUNCS_DEF(simulations, simulations, ID_SIM)
# endif
@@ -2212,7 +2212,7 @@ void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop)
}
# endif
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_POINT_CLOUD
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
@@ -2305,7 +2305,7 @@ void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
void RNA_def_main_simulations(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index e42dfb83885..7885e182787 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -6919,7 +6919,7 @@ static void rna_def_modifier_weightednormal(BlenderRNA *brna)
RNA_define_lib_overridable(false);
}
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
static void rna_def_modifier_simulation(BlenderRNA *brna)
{
StructRNA *srna;
@@ -7289,7 +7289,7 @@ void RNA_def_modifier(BlenderRNA *brna)
rna_def_modifier_meshseqcache(brna);
rna_def_modifier_surfacedeform(brna);
rna_def_modifier_weightednormal(brna);
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
rna_def_modifier_simulation(brna);
# endif
rna_def_modifier_mesh_to_volume(brna);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 91f1bbc03d7..8b227774d66 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -579,7 +579,7 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr)
return &RNA_ID;
# endif
case OB_POINTCLOUD:
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_POINT_CLOUD
return &RNA_PointCloud;
# else
return &RNA_ID;
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index d3c7787586f..3255f335e74 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2178,7 +2178,7 @@ static void rna_SpaceNodeEditor_node_tree_update(const bContext *C, PointerRNA *
ED_node_tree_update(C);
}
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
static PointerRNA rna_SpaceNodeEditor_simulation_get(PointerRNA *ptr)
{
SpaceNode *snode = (SpaceNode *)ptr->data;
@@ -6347,7 +6347,7 @@ static void rna_def_space_node(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "ID From", "Data-block from which the edited data-block is linked");
-# ifdef WITH_PARTICLE_NODES
+# ifdef WITH_GEOMETRY_NODES
prop = RNA_def_property(srna, "simulation", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Simulation");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 91660342d10..061026288e6 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -6147,10 +6147,15 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
"Undo Legacy",
"Use legacy undo (slower than the new default one, but may be more stable in some cases)");
- prop = RNA_def_property(srna, "use_new_particle_system", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "use_new_particle_system", 1);
+ prop = RNA_def_property(srna, "use_new_geometry_nodes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "use_new_geometry_nodes", 1);
RNA_def_property_ui_text(
- prop, "New Particle System", "Enable the new particle system in the ui");
+ prop, "New Geometry Nodes", "Enable the new geometry nodes system in the ui");
+
+ prop = RNA_def_property(srna, "use_new_point_cloud_type", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "use_new_point_cloud_type", 1);
+ RNA_def_property_ui_text(
+ prop, "New Point Cloud Type", "Enable the new point cloud type in the ui");
prop = RNA_def_property(srna, "use_new_hair_type", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_new_hair_type", 1);