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:
authorDalai Felinto <dalai@blender.org>2022-07-08 15:41:21 +0300
committerDalai Felinto <dalai@blender.org>2022-07-08 16:11:32 +0300
commitbecb1530b1c81a408e202ebd3c43037928dc1679 (patch)
treecd64b10af0a2aea97a351cebc9b5fa486d3637c3 /source/blender/editors/object
parent2c55d8c1cf6acd633f8acf9adc4e545cd965822c (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/editors/object')
-rw-r--r--source/blender/editors/object/object_add.cc36
1 files changed, 1 insertions, 35 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,