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
path: root/source
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
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')
-rw-r--r--source/blender/editors/object/CMakeLists.txt3
-rw-r--r--source/blender/editors/object/object_add.c6
-rw-r--r--source/blender/editors/space_buttons/CMakeLists.txt3
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c6
-rw-r--r--source/blender/editors/space_node/space_node.c2
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h5
-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
-rw-r--r--source/blender/modifiers/CMakeLists.txt3
-rw-r--r--source/blender/modifiers/intern/MOD_simulation.cc2
19 files changed, 51 insertions, 41 deletions
diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt
index a1f8061c9f7..2f72f563e68 100644
--- a/source/blender/editors/object/CMakeLists.txt
+++ b/source/blender/editors/object/CMakeLists.txt
@@ -87,7 +87,8 @@ if(WITH_INTERNATIONAL)
endif()
if(WITH_EXPERIMENTAL_FEATURES)
- add_definitions(-DWITH_PARTICLE_NODES)
+ add_definitions(-DWITH_GEOMETRY_NODES)
+ add_definitions(-DWITH_POINT_CLOUD)
add_definitions(-DWITH_HAIR_NODES)
endif()
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index eb2f5f8ca51..36e780f7472 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1713,7 +1713,7 @@ void OBJECT_OT_hair_add(wmOperatorType *ot)
static bool object_pointcloud_add_poll(bContext *C)
{
- if (!U.experimental.use_new_particle_system) {
+ if (!U.experimental.use_new_point_cloud_type) {
return false;
}
return ED_operator_objectmode(C);
@@ -2318,7 +2318,7 @@ static const EnumPropertyItem convert_target_items[] = {
"MESH",
ICON_OUTLINER_OB_MESH,
"Mesh",
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_POINT_CLOUD
"Mesh from Curve, Surface, Metaball, Text, or Pointcloud objects"},
#else
"Mesh from Curve, Surface, Metaball, or Text objects"},
@@ -2328,7 +2328,7 @@ static const EnumPropertyItem convert_target_items[] = {
ICON_OUTLINER_OB_GREASEPENCIL,
"Grease Pencil",
"Grease Pencil from Curve or Mesh objects"},
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_POINT_CLOUD
{OB_POINTCLOUD,
"POINTCLOUD",
ICON_OUTLINER_OB_POINTCLOUD,
diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt
index ce0787dbdb9..c71e5e49d8d 100644
--- a/source/blender/editors/space_buttons/CMakeLists.txt
+++ b/source/blender/editors/space_buttons/CMakeLists.txt
@@ -50,7 +50,8 @@ if(WITH_FREESTYLE)
endif()
if(WITH_EXPERIMENTAL_FEATURES)
- add_definitions(-DWITH_PARTICLE_NODES)
+ add_definitions(-DWITH_GEOMETRY_NODES)
+ add_definitions(-DWITH_POINT_CLOUD)
add_definitions(-DWITH_HAIR_NODES)
endif()
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index dcf2e6e74fa..0d1efcab125 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -244,7 +244,7 @@ static bool buttons_context_path_data(ButsContextPath *path, int type)
return true;
}
#endif
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_POINT_CLOUD
if (RNA_struct_is_a(ptr->type, &RNA_PointCloud) && (type == -1 || type == OB_POINTCLOUD)) {
return true;
}
@@ -773,7 +773,7 @@ const char *buttons_context_dir[] = {
#ifdef WITH_HAIR_NODES
"hair",
#endif
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_POINT_CLOUD
"pointcloud",
#endif
"volume",
@@ -862,7 +862,7 @@ int /*eContextResult*/ buttons_context(const bContext *C,
return CTX_RESULT_OK;
}
#endif
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_POINT_CLOUD
if (CTX_data_equals(member, "pointcloud")) {
set_pointer_type(path, result, &RNA_PointCloud);
return CTX_RESULT_OK;
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 299d3d938d6..d2502e6408c 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -935,7 +935,7 @@ static void node_space_subtype_item_extend(bContext *C, EnumPropertyItem **item,
bool free;
const EnumPropertyItem *item_src = RNA_enum_node_tree_types_itemf_impl(C, &free);
for (const EnumPropertyItem *item_iter = item_src; item_iter->identifier; item_iter++) {
- if (!U.experimental.use_new_particle_system &&
+ if (!U.experimental.use_new_geometry_nodes &&
STREQ(item_iter->identifier, "SimulationNodeTree")) {
continue;
}
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 1f39e803f12..ad032a6d7b6 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -629,13 +629,14 @@ typedef struct UserDef_Experimental {
char SANITIZE_AFTER_HERE;
/* The following options are automatically sanitized (set to 0)
* when the release cycle is not alpha. */
- char use_new_particle_system;
+ char use_new_geometry_nodes;
char use_new_hair_type;
+ char use_new_point_cloud_type;
char use_sculpt_vertex_colors;
char use_tools_missing_icons;
char use_switch_object_operator;
char use_sculpt_tools_tilt;
- char _pad[7];
+ char _pad[6];
/** `makesdna` does not allow empty structs. */
} UserDef_Experimental;
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);
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 754a7eefee7..65024e46a2b 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -195,7 +195,8 @@ if(WITH_OPENVDB)
endif()
if(WITH_EXPERIMENTAL_FEATURES)
- add_definitions(-DWITH_PARTICLE_NODES)
+ add_definitions(-DWITH_GEOMETRY_NODES)
+ add_definitions(-DWITH_POINT_CLOUD)
add_definitions(-DWITH_HAIR_NODES)
endif()
diff --git a/source/blender/modifiers/intern/MOD_simulation.cc b/source/blender/modifiers/intern/MOD_simulation.cc
index 28b4c329730..10a4b3f7cf9 100644
--- a/source/blender/modifiers/intern/MOD_simulation.cc
+++ b/source/blender/modifiers/intern/MOD_simulation.cc
@@ -158,7 +158,7 @@ ModifierTypeInfo modifierType_Simulation = {
/* name */ "Simulation",
/* structName */ "SimulationModifierData",
/* structSize */ sizeof(SimulationModifierData),
-#ifdef WITH_PARTICLE_NODES
+#ifdef WITH_GEOMETRY_NODES
/* srna */ &RNA_SimulationModifier,
#else
/* srna */ &RNA_Modifier,