Page MenuHome

New Depsgraph: Auto-IK doesn't work.
Closed, ResolvedPublic

Description

Blender 2.76-rc2 2eb0c99

Ubuntu 14.04 64x, nVidia GT620

Auto-IK doesn't work on new DEPSGRAPH

Open the file with new depsgraph and try to move the bone selected. You won't can.

With old depsgraph, it works.

Event Timeline

Mario Mey (mariomey) raised the priority of this task from to Needs Triage by Developer.
Mario Mey (mariomey) updated the task description. (Show Details)
Mario Mey (mariomey) set Type to Bug.
Sergey Sharybin (sergey) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Sep 30 2015, 9:37 AM

Can confirm the issue. Will look into it shortly.

Developer's note:

The issue is caused by transform tool temporary affecting on the pose constraints, which actually changes the way how pose is to be evaluated. Here's a patch which makes sure dependency graph is always up-to-date after such modifications:

{

1diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
2index 5898ad6..6bf9507 100644
3--- a/source/blender/editors/transform/transform_conversions.c
4+++ b/source/blender/editors/transform/transform_conversions.c
5@@ -845,6 +845,8 @@ static void pose_grab_with_ik_clear(Object *ob)
6 }
7 }
8 }
9+
10+ DAG_relations_tag_update(G.main);
11 }
12
13 /* adds the IK to pchan - returns if added */
14@@ -995,8 +997,10 @@ static short pose_grab_with_ik(Object *ob)
15 }
16
17 /* iTaSC needs clear for new IK constraints */
18- if (tot_ik)
19+ if (tot_ik) {
20 BIK_clear_data(ob->pose);
21+ DAG_relations_tag_update(G.main);
22+ }
23
24 return (tot_ik) ? 1 : 0;
25 }
}

Not sure if there's better approach to this problem. @Joshua Leung (aligorith), @Campbell Barton (campbellbarton), any ideas?

@Sergey Sharybin (sergey), seems correct API usage and fine for master.


Note - calling into DAG directly seems a bit low level (we could have a version of BKE_pose_tag_recalc for this).

@Campbell Barton (campbellbarton), we can't only tag pose for recalc, nodes in depsgraph are to be updated to mimic updated armature settings. In theory it's possible to perform partial depsgraph topology update, but in practice it's quite tricky to do correct.

Sorry for the spam.

On another hand on a production scene full relations update could be rather too much costly to be performed on transform. Maybe there's some better trick to do.