Bugix #3200
DAG_object_flush_update() always used scene layers, causing updates to go wrong with 3d windows with "Lock" off (allowing local layer and camera). This fixes a larger amount of potential issues. Also: fixed menu title for adding IK constraint to Bone (CTRL+I).
This commit is contained in:
@@ -59,6 +59,7 @@
|
|||||||
#include "DNA_screen_types.h"
|
#include "DNA_screen_types.h"
|
||||||
#include "DNA_space_types.h"
|
#include "DNA_space_types.h"
|
||||||
#include "DNA_view2d_types.h"
|
#include "DNA_view2d_types.h"
|
||||||
|
#include "DNA_view3d_types.h"
|
||||||
|
|
||||||
#include "BKE_action.h"
|
#include "BKE_action.h"
|
||||||
#include "BKE_global.h"
|
#include "BKE_global.h"
|
||||||
@@ -1532,6 +1533,23 @@ void DAG_scene_update_flags(Scene *sce, unsigned int lay)
|
|||||||
DAG_scene_flush_update(sce, lay);
|
DAG_scene_flush_update(sce, lay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* for depgraph updating, all layers visible in a screen */
|
||||||
|
/* this is a copy from editscreen.c... I need to think over a more proper solution for this */
|
||||||
|
/* probably the DAG_object_flush_update() should give layer too? */
|
||||||
|
/* or some kind of dag context... (DAG_set_layer) */
|
||||||
|
static unsigned int dag_screen_view3d_layers(void)
|
||||||
|
{
|
||||||
|
ScrArea *sa;
|
||||||
|
int layer= 0;
|
||||||
|
|
||||||
|
for(sa= G.curscreen->areabase.first; sa; sa= sa->next) {
|
||||||
|
if(sa->spacetype==SPACE_VIEW3D)
|
||||||
|
layer |= ((View3D *)sa->spacedata.first)->lay;
|
||||||
|
}
|
||||||
|
return layer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* flag this object and all its relations to recalc */
|
/* flag this object and all its relations to recalc */
|
||||||
/* if you need to do more objects, tag object yourself and
|
/* if you need to do more objects, tag object yourself and
|
||||||
use DAG_scene_flush_update() in end */
|
use DAG_scene_flush_update() in end */
|
||||||
@@ -1561,6 +1579,9 @@ void DAG_object_flush_update(Scene *sce, Object *ob, short flag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(G.curscreen)
|
||||||
|
DAG_scene_flush_update(sce, dag_screen_view3d_layers());
|
||||||
|
else
|
||||||
DAG_scene_flush_update(sce, sce->lay);
|
DAG_scene_flush_update(sce, sce->lay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -618,7 +618,7 @@ void add_constraint(int only_IK)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(pchansel)
|
if(pchansel)
|
||||||
nr= pupmenu("Add IK Constraint%t|To New Empty Object%x10");
|
nr= pupmenu("Add IK Constraint%t|To Selected Bone");
|
||||||
else if(obsel)
|
else if(obsel)
|
||||||
nr= pupmenu("Add IK Constraint%t|To Selected Object%x10");
|
nr= pupmenu("Add IK Constraint%t|To Selected Object%x10");
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user