diff options
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r-- | source/blender/editors/object/object_add.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 56279522c88..18c18f10c13 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2081,7 +2081,9 @@ void OBJECT_OT_convert(wmOperatorType *ot) /* used below, assumes id.new is correct */ /* leaves selection of base/object unaltered */ /* Does set ID->newid pointers. */ -static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer *view_layer, Object *ob, int dupflag) +static Base *object_add_duplicate_internal( + Main *bmain, Scene *scene, + ViewLayer *view_layer, Object *ob, int dupflag) { #define ID_NEW_REMAP_US(a) if ( (a)->id.newid) { (a) = (void *)(a)->id.newid; (a)->id.us++; } #define ID_NEW_REMAP_US2(a) if (((ID *)a)->newid) { (a) = ((ID *)a)->newid; ((ID *)a)->us++; } @@ -2092,10 +2094,14 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer ID *id; int a, didit; - if (ob->mode & OB_MODE_POSE) { + /* ignore pose mode now, Caller can inspect mode. */ +#if 0 + if (eval_ctx->object_mode & OB_MODE_POSE) { ; /* nothing? */ } - else { + else +#endif + { obn = ID_NEW_SET(ob, BKE_object_copy(bmain, ob)); DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); |