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".
This commit is contained in:
parent
819b1a7f9d
commit
8738a668d8
|
@ -2184,7 +2184,6 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
|
|||
def draw(self, context):
|
||||
self._draw_items(
|
||||
context, (
|
||||
({"property": "use_new_particle_system"}, "T73324"),
|
||||
({"property": "use_sculpt_vertex_colors"}, "T71947"),
|
||||
({"property": "use_tools_missing_icons"}, "T80331"),
|
||||
({"property": "use_switch_object_operator"}, "T80402"),
|
||||
|
@ -2200,6 +2199,8 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel):
|
|||
self._draw_items(
|
||||
context, (
|
||||
({"property": "use_new_hair_type"}, "T68981"),
|
||||
({"property": "use_new_point_cloud_type"}, "T75717"),
|
||||
({"property": "use_new_geometry_nodes"}, "project/profile/121"),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -2110,7 +2110,7 @@ class VIEW3D_MT_add(Menu):
|
|||
layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
|
||||
if context.preferences.experimental.use_new_hair_type:
|
||||
layout.operator("object.hair_add", text="Hair", icon='OUTLINER_OB_HAIR')
|
||||
if context.preferences.experimental.use_new_particle_system:
|
||||
if context.preferences.experimental.use_new_point_cloud_type:
|
||||
layout.operator("object.pointcloud_add", text="Point Cloud", icon='OUTLINER_OB_POINTCLOUD')
|
||||
layout.menu("VIEW3D_MT_volume_add", text="Volume", icon='OUTLINER_OB_VOLUME')
|
||||
layout.operator_menu_enum("object.gpencil_add", "type", text="Grease Pencil", icon='OUTLINER_OB_GREASEPENCIL')
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue