Clear transform (ALT+G/R/S) in Pose sometimes didnt work, for example when
armature is being controlled by other armature. Caused by double depsgraph
flushing.
This commit is contained in:
2006-10-31 20:48:10 +00:00
parent da8e2749bc
commit cfe1756571
2 changed files with 5 additions and 3 deletions

View File

@@ -974,6 +974,7 @@ void clear_object(char mode)
Base *base;
Object *ob;
float *v1, *v3, mat[3][3];
int armature_clear= 0;
char *str=NULL;
if(G.obedit) return;
@@ -991,8 +992,8 @@ void clear_object(char mode)
ob= base->object;
if(ob->flag & OB_POSEMODE) {
/* no test if we got armature; could be in future... */
clear_armature(ob, mode);
armature_clear= 1; /* silly system to prevent another dag update, so no action applied */
}
else if((G.f & G_WEIGHTPAINT)==0) {
@@ -1057,7 +1058,8 @@ void clear_object(char mode)
}
allqueue(REDRAWVIEW3D, 0);
DAG_scene_flush_update(G.scene, screen_view3d_layers());
if(armature_clear==0) /* in this case flush was done */
DAG_scene_flush_update(G.scene, screen_view3d_layers());
BIF_undo_push(str);
}