diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-30 17:54:40 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-30 17:58:44 +0300 |
commit | a3b6ae9fb9dd76538ec04b9fa6953490d321dd32 (patch) | |
tree | 0bce9a5d00551e94b15e5195c7a80370ff6f788f /source/blender/editors/object | |
parent | 6d6deeb70086564418368a5213cd9d28cdfa51e2 (diff) |
Cleanup/Refactor: Move CurveCache runtime data into Object.runtime struct.
Also, fix missing cleanup of Object.runtime when copying Object
datablocks!
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 8c60dd01e89..68e84ec3f3b 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1479,7 +1479,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, ob_dst->parent = NULL; BKE_constraints_free(&ob_dst->constraints); - ob_dst->curve_cache = NULL; + ob_dst->runtime.curve_cache = NULL; ob_dst->transflag &= ~OB_DUPLI; copy_m4_m4(ob_dst->obmat, dob->mat); @@ -1638,7 +1638,7 @@ static const EnumPropertyItem convert_target_items[] = { static void convert_ensure_curve_cache(Depsgraph *depsgraph, Scene *scene, Object *ob) { - if (ob->curve_cache == NULL) { + if (ob->runtime.curve_cache == NULL) { /* Force creation. This is normally not needed but on operator * redo we might end up with an object which isn't evaluated yet. */ @@ -1966,7 +1966,7 @@ static int convert_exec(bContext *C, wmOperator *op) } convert_ensure_curve_cache(depsgraph, scene, baseob); - BKE_mesh_from_metaball(&baseob->curve_cache->disp, newob->data); + BKE_mesh_from_metaball(&baseob->runtime.curve_cache->disp, newob->data); if (obact->type == OB_MBALL) { basact = basen; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 4745a484475..331b4af077d 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -716,7 +716,7 @@ bool ED_object_parent_set(ReportList *reports, const bContext *C, Scene *scene, if (md) { ((CurveModifierData *)md)->object = par; } - if (par->curve_cache && par->curve_cache->path == NULL) { + if (par->runtime.curve_cache && par->runtime.curve_cache->path == NULL) { DEG_id_tag_update(&par->id, OB_RECALC_DATA); } } |