diff options
-rw-r--r-- | release/scripts/startup/bl_ui/properties_particle.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 10 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 35 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.cc | 36 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 15 |
7 files changed, 20 insertions, 82 deletions
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index db4e609be65..ae94accf5c7 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -72,7 +72,7 @@ class PARTICLE_MT_context_menu(Menu): props.use_active = False props.remove_target_particles = True - if experimental.use_new_curves_type and psys.settings.type == 'HAIR': + if psys.settings.type == 'HAIR': layout.operator( "curves.convert_from_particle_system", text="Convert to Curves") diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 9f7ca89b8c9..02abbd43986 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -3172,14 +3172,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): ), ], 'SCULPT_CURVES': [ - lambda context: ( - ( - _defs_curves_sculpt.selection_paint, - None, - ) - if context is None or context.preferences.experimental.use_new_curves_tools - else () - ), + _defs_curves_sculpt.selection_paint, + None, _defs_curves_sculpt.comb, _defs_curves_sculpt.add, _defs_curves_sculpt.delete, diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 603110b76e9..cccbb63d27c 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2272,7 +2272,6 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel): def draw(self, context): self._draw_items( context, ( - ({"property": "use_new_curves_type"}, "T68981"), ({"property": "use_new_curves_tools"}, "T68981"), ({"property": "use_new_point_cloud_type"}, "T75717"), ({"property": "use_sculpt_texture_paint"}, "T96225"), diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 72119030919..92dc4138530 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -718,19 +718,17 @@ class VIEW3D_HT_header(Header): row = layout.row(align=True) - experimental = context.preferences.experimental - if experimental.use_new_curves_tools: - # Combine the "use selection" toggle with the "set domain" operators - # to allow turning selection off directly. - domain = curves.selection_domain - if domain == 'POINT': - row.prop(curves, "use_sculpt_selection", text="", icon='CURVE_BEZCIRCLE') - else: - row.operator("curves.set_selection_domain", text="", icon='CURVE_BEZCIRCLE').domain = 'POINT' - if domain == 'CURVE': - row.prop(curves, "use_sculpt_selection", text="", icon='CURVE_PATH') - else: - row.operator("curves.set_selection_domain", text="", icon='CURVE_PATH').domain = 'CURVE' + # Combine the "use selection" toggle with the "set domain" operators + # to allow turning selection off directly. + domain = curves.selection_domain + if domain == 'POINT': + row.prop(curves, "use_sculpt_selection", text="", icon='CURVE_BEZCIRCLE') + else: + row.operator("curves.set_selection_domain", text="", icon='CURVE_BEZCIRCLE').domain = 'POINT' + if domain == 'CURVE': + row.prop(curves, "use_sculpt_selection", text="", icon='CURVE_PATH') + else: + row.operator("curves.set_selection_domain", text="", icon='CURVE_PATH').domain = 'CURVE' # Grease Pencil if obj and obj.type == 'GPENCIL' and context.gpencil_data: @@ -2111,14 +2109,13 @@ class VIEW3D_MT_curve_add(Menu): layout.operator("curve.primitive_nurbs_circle_add", text="Nurbs Circle", icon='CURVE_NCIRCLE') layout.operator("curve.primitive_nurbs_path_add", text="Path", icon='CURVE_PATH') - experimental = context.preferences.experimental - if experimental.use_new_curves_type: - layout.separator() + layout.separator() - layout.operator("object.curves_empty_hair_add", text="Empty Hair", icon='CURVES_DATA') + layout.operator("object.curves_empty_hair_add", text="Empty Hair", icon='CURVES_DATA') - if experimental.use_new_curves_tools: - layout.operator("object.curves_random_add", text="Random", icon='CURVES_DATA') + experimental = context.preferences.experimental + if experimental.use_new_curves_tools: + layout.operator("object.curves_random_add", text="Random", icon='CURVES_DATA') class VIEW3D_MT_surface_add(Menu): diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc index c350b955e14..a2c08109ec0 100644 --- a/source/blender/editors/object/object_add.cc +++ b/source/blender/editors/object/object_add.cc @@ -2030,14 +2030,6 @@ void OBJECT_OT_speaker_add(wmOperatorType *ot) /** \name Add Curves Operator * \{ */ -static bool object_curves_add_poll(bContext *C) -{ - if (!U.experimental.use_new_curves_type) { - return false; - } - return ED_operator_objectmode(C); -} - static int object_curves_random_add_exec(bContext *C, wmOperator *op) { using namespace blender; @@ -2066,7 +2058,7 @@ void OBJECT_OT_curves_random_add(wmOperatorType *ot) /* api callbacks */ ot->exec = object_curves_random_add_exec; - ot->poll = object_curves_add_poll; + ot->poll = ED_operator_objectmode; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -2117,9 +2109,6 @@ static int object_curves_empty_hair_add_exec(bContext *C, wmOperator *op) static bool object_curves_empty_hair_add_poll(bContext *C) { - if (!U.experimental.use_new_curves_type) { - return false; - } if (!ED_operator_objectmode(C)) { return false; } @@ -2781,28 +2770,6 @@ static const EnumPropertyItem convert_target_items[] = { {0, nullptr, 0, nullptr, nullptr}, }; -static const EnumPropertyItem *convert_target_items_fn(bContext *UNUSED(C), - PointerRNA *UNUSED(ptr), - PropertyRNA *UNUSED(prop), - bool *r_free) -{ - EnumPropertyItem *items = nullptr; - int items_num = 0; - for (const EnumPropertyItem *item = convert_target_items; item->identifier != nullptr; item++) { - if (item->value == OB_CURVES) { - if (U.experimental.use_new_curves_type) { - RNA_enum_item_add(&items, &items_num, item); - } - } - else { - RNA_enum_item_add(&items, &items_num, item); - } - } - RNA_enum_item_end(&items, &items_num); - *r_free = true; - return items; -} - static void object_data_convert_ensure_curve_cache(Depsgraph *depsgraph, Scene *scene, Object *ob) { if (ob->runtime.curve_cache == nullptr) { @@ -3562,7 +3529,6 @@ void OBJECT_OT_convert(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum( ot->srna, "target", convert_target_items, OB_MESH, "Target", "Type of object to convert to"); - RNA_def_enum_funcs(ot->prop, convert_target_items_fn); RNA_def_boolean(ot->srna, "keep_original", false, diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 753c41f7f1b..2ceef4f623e 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -644,8 +644,6 @@ 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_curves_type; - /** Only available when #use_new_curves_type is enabled. */ char use_new_curves_tools; char use_new_point_cloud_type; char use_full_frame_compositor; @@ -655,7 +653,6 @@ typedef struct UserDef_Experimental { char enable_eevee_next; char use_sculpt_texture_paint; char use_draw_manager_acquire_lock; - char _pad[7]; /** `makesdna` does not allow empty structs. */ } UserDef_Experimental; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index fd3479f6fe4..25eacdaab30 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1101,16 +1101,6 @@ int rna_show_statusbar_vram_editable(struct PointerRNA *UNUSED(ptr), const char return GPU_mem_stats_supported() ? PROP_EDITABLE : 0; } -static int rna_userdef_experimental_use_new_curve_tools_editable(struct PointerRNA *UNUSED(ptr), - const char **r_info) -{ - if (U.experimental.use_new_curves_type) { - return PROP_EDITABLE; - } - *r_info = "Only available when new curves type is enabled"; - return 0; -} - #else # define USERDEF_TAG_DIRTY_PROPERTY_UPDATE_ENABLE \ @@ -6414,13 +6404,8 @@ static void rna_def_userdef_experimental(BlenderRNA *brna) "reduces execution time and memory usage)"); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "use_new_curves_type", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "use_new_curves_type", 1); - RNA_def_property_ui_text(prop, "New Curves Type", "Enable the new curves data type in the UI"); - prop = RNA_def_property(srna, "use_new_curves_tools", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "use_new_curves_tools", 1); - RNA_def_property_editable_func(prop, "rna_userdef_experimental_use_new_curve_tools_editable"); RNA_def_property_ui_text( prop, "New Curves Tools", "Enable additional features for the new curves data block"); |