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_add.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_add.c')
-rw-r--r-- | source/blender/editors/object/object_add.c | 8 |
1 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 92256d5e613..7205c8adf4b 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1067,7 +1067,7 @@ static Base *duplibase_for_convert(Scene *scene, Base *base, Object *ob) } obn= copy_object(ob); - obn->recalc |= OB_RECALC; + obn->recalc |= OB_RECALC_ALL; basen= MEM_mallocN(sizeof(Base), "duplibase"); *basen= *base; @@ -1150,7 +1150,7 @@ static int convert_exec(bContext *C, wmOperator *op) newob->data= copy_mesh(me); } else { newob = ob; - ob->recalc |= OB_RECALC; + ob->recalc |= OB_RECALC_ALL; } /* make new mesh data from the original copy */ @@ -1211,7 +1211,7 @@ static int convert_exec(bContext *C, wmOperator *op) for(ob1= G.main->object.first; ob1; ob1=ob1->id.next) { if(ob1->data==ob->data) { ob1->type= OB_CURVE; - ob1->recalc |= OB_RECALC; + ob1->recalc |= OB_RECALC_ALL; } } } @@ -1402,7 +1402,7 @@ static Base *object_add_duplicate_internal(Scene *scene, Base *base, int dupflag } else { obn= copy_object(ob); - obn->recalc |= OB_RECALC; + obn->recalc |= OB_RECALC_ALL; basen= MEM_mallocN(sizeof(Base), "duplibase"); *basen= *base; |