diff options
author | Dalai Felinto <dalai@blender.org> | 2022-07-08 15:41:21 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2022-07-08 16:11:32 +0300 |
commit | becb1530b1c81a408e202ebd3c43037928dc1679 (patch) | |
tree | cd64b10af0a2aea97a351cebc9b5fa486d3637c3 /source/blender | |
parent | 2c55d8c1cf6acd633f8acf9adc4e545cd965822c (diff) |
Hair Curves: The new curves object is now available
This commit doesn't implement any new feature but makes the new curves
object type no longer experimental.
Documentation:
* https://docs.blender.org/manual/en/3.3/modeling/curves/primitives.html#empty-hair
* https://docs.blender.org/manual/en/3.3/sculpt_paint/curves_sculpting/introduction.html
Note: This also makes the Selection Paint tool available. This tool
should have been moved out of the "New Curves Tool" flag when we got the
selection drawing to work.
Differential Revision: https://developer.blender.org/D15402
Diffstat (limited to 'source/blender')
-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 |
3 files changed, 1 insertions, 53 deletions
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"); |