diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-07-05 07:55:28 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-07-05 07:55:28 +0400 |
commit | faf1c9a4bb27dfdd843cc745707d15ab47ce8683 (patch) | |
tree | f57e5bdca9359ff2b80c02f3cf0053b9842b55ca /source/blender/editors/object/object_relations.c | |
parent | 02b0188c163343cf1e21123b33cf98d3beb606c2 (diff) |
Bugfix #22685: Screen update slow, animation player ALT-A, files created with 2.4x
Modifiers were being mistakenly recalculated at every frame as long as the object had animation, slowing things down due to incorrect depsgraph recalc tags.
Renamed OB_RECALC -> OB_RECALC_ALL to reduce future confusion. During this process, I noticed a few dubious usages of OB_RECALC, so it's best to use this commit as a guide of places to check on. Apart from the place responsible for this bug, I haven't changed any OB_RECALC -> OB_RECALC_OB/DATA in case that introduces more unforseen bugs now, making it more difficult to track the problems later (rename + value change can be confusing to identify the genuine typos).
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 91f054f7209..fbc6075796c 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -193,7 +193,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) { if(ob != obedit) { - ob->recalc |= OB_RECALC; + ob->recalc |= OB_RECALC_ALL; par= obedit->parent; while(par) { @@ -339,7 +339,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op) /* depsgraph flushes are needed for the new data */ DAG_scene_sort(scene); - DAG_id_flush_update(&newob->id, OB_RECALC); + DAG_id_flush_update(&newob->id, OB_RECALC_ALL); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, newob); } else { @@ -427,7 +427,7 @@ static int parent_clear_exec(bContext *C, wmOperator *op) else if(type == 2) unit_m4(ob->parentinv); - ob->recalc |= OB_RECALC; + ob->recalc |= OB_RECALC_ALL; } CTX_DATA_END; @@ -869,7 +869,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) /* remove track-object for old track */ ob->track= NULL; - ob->recalc |= OB_RECALC; + ob->recalc |= OB_RECALC_ALL; /* also remove all tracking constraints */ for (con= ob->constraints.last; con; con= pcon) { @@ -935,7 +935,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - ob->recalc |= OB_RECALC; + ob->recalc |= OB_RECALC_ALL; /* Lamp and Camera track differently by default */ if (ob->type == OB_LAMP || ob->type == OB_CAMERA) @@ -954,7 +954,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - ob->recalc |= OB_RECALC; + ob->recalc |= OB_RECALC_ALL; /* Lamp and Camera track differently by default */ if (ob->type == OB_LAMP || ob->type == OB_CAMERA) { @@ -975,7 +975,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - ob->recalc |= OB_RECALC; + ob->recalc |= OB_RECALC_ALL; /* Lamp and Camera track differently by default */ if (ob->type == OB_LAMP || ob->type == OB_CAMERA) { @@ -1259,7 +1259,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) break; case MAKE_LINKS_MODIFIERS: object_link_modifiers(obt, ob); - obt->recalc |= OB_RECALC; + obt->recalc |= OB_RECALC_ALL; break; } } |