Fix T64342: Incorrect snapping of focus object in camera view
Use more granular dependency graph traversal, which allows to ignore dependencies which are not related on transform. Reviewers: mano-wii, brecht Differential Revision: https://developer.blender.org/D5184
This commit is contained in:
parent
16307d1e2a
commit
599626edd5
Notes:
blender-bot
2023-02-14 06:42:54 +01:00
Referenced by issue #64342, Incorrect snapping of focus object in camera view
|
@ -6443,19 +6443,25 @@ static void trans_object_base_deps_flag_prepare(ViewLayer *view_layer)
|
|||
}
|
||||
}
|
||||
|
||||
static void set_trans_object_base_deps_flag_cb(ID *id, void *UNUSED(user_data))
|
||||
static void set_trans_object_base_deps_flag_cb(ID *id,
|
||||
eDepsObjectComponentType component,
|
||||
void *UNUSED(user_data))
|
||||
{
|
||||
/* Here we only handle object IDs. */
|
||||
if (GS(id->name) != ID_OB) {
|
||||
return;
|
||||
}
|
||||
if (component != DEG_OB_COMP_TRANSFORM) {
|
||||
return;
|
||||
}
|
||||
id->tag |= LIB_TAG_DOIT;
|
||||
}
|
||||
|
||||
static void flush_trans_object_base_deps_flag(Depsgraph *depsgraph, Object *object)
|
||||
{
|
||||
object->id.tag |= LIB_TAG_DOIT;
|
||||
DEG_foreach_dependent_ID(depsgraph, &object->id, set_trans_object_base_deps_flag_cb, NULL);
|
||||
DEG_foreach_dependent_ID_component(
|
||||
depsgraph, &object->id, DEG_OB_COMP_TRANSFORM, set_trans_object_base_deps_flag_cb, NULL);
|
||||
}
|
||||
|
||||
static void trans_object_base_deps_flag_finish(ViewLayer *view_layer)
|
||||
|
|
Loading…
Reference in New Issue