diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-09 16:08:24 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-09 16:44:12 +0300 |
commit | 11f64f494b715498e4cbc147ae6a9d10538dc055 (patch) | |
tree | 9d7e7f9dfdce67c5ab285315e67736b56762faa7 /source/blender/editors | |
parent | 9044ccec5f811fd380fc0348d91d1c53729eea22 (diff) |
Refactor/enhance BKE_curve_make_local(), and add BKE_curve_copy_ex() that takes a Main as parameter.
Now using modern features from libquery/libremap areas.
Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.c | 10 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index d87f8a6d93d..9e04f410333 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1301,7 +1301,7 @@ static int separate_exec(bContext *C, wmOperator *op) DAG_relations_tag_update(bmain); newob = newbase->object; - newcu = newob->data = BKE_curve_copy(oldcu); + newcu = newob->data = BKE_curve_copy_ex(bmain, oldcu); newcu->editnurb = NULL; id_us_min(&oldcu->id); /* because new curve is a copy: reduce user count */ diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 69950ccc9a9..d160a62a3f4 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1673,7 +1673,7 @@ static int convert_exec(bContext *C, wmOperator *op) id_us_min(&((Curve *)newob->data)->id); /* make a new copy of the curve */ - newob->data = BKE_curve_copy(ob->data); + newob->data = BKE_curve_copy_ex(bmain, ob->data); } else { newob = ob; @@ -1744,7 +1744,7 @@ static int convert_exec(bContext *C, wmOperator *op) id_us_min(&((Curve *)newob->data)->id); /* make a new copy of the curve */ - newob->data = BKE_curve_copy(ob->data); + newob->data = BKE_curve_copy_ex(bmain, ob->data); } else { newob = ob; @@ -1986,7 +1986,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base if (dupflag & USER_DUP_CURVE) { ID_NEW_US2(obn->data) else { - obn->data = BKE_curve_copy(obn->data); + obn->data = BKE_curve_copy_ex(bmain, obn->data); didit = 1; } id_us_min(id); @@ -1996,7 +1996,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base if (dupflag & USER_DUP_SURF) { ID_NEW_US2(obn->data) else { - obn->data = BKE_curve_copy(obn->data); + obn->data = BKE_curve_copy_ex(bmain, obn->data); didit = 1; } id_us_min(id); @@ -2006,7 +2006,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base if (dupflag & USER_DUP_FONT) { ID_NEW_US2(obn->data) else { - obn->data = BKE_curve_copy(obn->data); + obn->data = BKE_curve_copy_ex(bmain, obn->data); didit = 1; } id_us_min(id); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 255477b4d90..fff4725951c 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1886,7 +1886,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, const int flag) case OB_CURVE: case OB_SURF: case OB_FONT: - ob->data = cu = BKE_curve_copy(ob->data); + ob->data = cu = BKE_curve_copy_ex(bmain, ob->data); ID_NEW(cu->bevobj); ID_NEW(cu->taperobj); if (cu->key) |