diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-06-15 16:54:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-06-15 16:54:11 +0300 |
commit | a35e733ff18fcdf5b57937cd85f9bcd6aec236b0 (patch) | |
tree | 30a1508ee4a7b6ba4df705721fb2133b70a20798 /source/blender/editors/object | |
parent | 60a36f202837037b6f6d31d4d067ec783f53d0ba (diff) | |
parent | 880e96dd667aedea17353803bcc5721f3cc34d50 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/collada/MeshImporter.cpp
source/blender/editors/object/object_add.c
source/blender/editors/screen/screen_edit.c
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 19 | ||||
-rw-r--r-- | source/blender/editors/object/object_group.c | 3 |
2 files changed, 17 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 33af8f94d04..e8343dce384 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1701,7 +1701,7 @@ static int convert_exec(bContext *C, wmOperator *op) MetaBall *mb; Mesh *me; const short target = RNA_enum_get(op->ptr, "target"); - const bool keep_original = RNA_boolean_get(op->ptr, "keep_original"); + bool keep_original = RNA_boolean_get(op->ptr, "keep_original"); int a, mballConverted = 0; /* don't forget multiple users! */ @@ -1738,7 +1738,20 @@ static int convert_exec(bContext *C, wmOperator *op) * on other objects data masks too, see: T50950. */ { for (CollectionPointerLink *link = selected_editable_bases.first; link; link = link->next) { - Base *base = link->ptr.data; + BaseLegacy *base = link->ptr.data; + ob = base->object; + + /* The way object type conversion works currently (enforcing conversion of *all* objetcs using converted + * obdata, even some un-selected/hidden/inother scene ones, sounds totally bad to me. + * However, changing this is more design than bugfix, not to mention convoluted code below, + * so that will be for later. + * But at the very least, do not do that with linked IDs! */ + if ((ID_IS_LINKED_DATABLOCK(ob) || ID_IS_LINKED_DATABLOCK(ob->data)) && !keep_original) { + keep_original = true; + BKE_reportf(op->reports, RPT_INFO, + "Converting some linked object/object data, enforcing 'Keep Original' option to True"); + } + DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); } @@ -1749,7 +1762,7 @@ static int convert_exec(bContext *C, wmOperator *op) } for (CollectionPointerLink *link = selected_editable_bases.first; link; link = link->next) { - Base *base = link->ptr.data; + BaseLegacy *base = link->ptr.data; ob = base->object; if (ob->flag & OB_DONE || !IS_TAGGED(ob->data)) { diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index 9d06624bd9c..3064bf8af1a 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -522,8 +522,7 @@ static int group_unlink_exec(bContext *C, wmOperator *UNUSED(op)) if (!group) return OPERATOR_CANCELLED; - BKE_libblock_unlink(bmain, group, false, false); - BKE_libblock_free(bmain, group); + BKE_libblock_delete(bmain, group); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL); |