forked from bartvdbraak/blender
Fix for missing pose bone hash in the new dependency graph.
The hash table is used to look up bone poses, particularly during constraint evaluation. Without this the default BLI_findstring method on a plain ListBase is used, which is really slow for extensive rigs.
This commit is contained in:
parent
3ac2028df0
commit
a10b2fefab
@ -778,6 +778,14 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob)
|
||||
}
|
||||
}
|
||||
|
||||
/* speed optimization for animation lookups */
|
||||
if (ob->pose) {
|
||||
BKE_pose_channels_hash_make(ob->pose);
|
||||
if (ob->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
|
||||
BKE_pose_update_constraint_flags(ob->pose);
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure pose is up-to-date with armature updates. */
|
||||
add_operation_node(&arm->id,
|
||||
DEPSNODE_TYPE_PARAMETERS,
|
||||
@ -872,6 +880,14 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *ob)
|
||||
ID *obdata = (ID *)ob->data;
|
||||
build_animdata(obdata);
|
||||
|
||||
BLI_assert(ob->pose != NULL);
|
||||
|
||||
/* speed optimization for animation lookups */
|
||||
BKE_pose_channels_hash_make(ob->pose);
|
||||
if (ob->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
|
||||
BKE_pose_update_constraint_flags(ob->pose);
|
||||
}
|
||||
|
||||
add_operation_node(&ob->id,
|
||||
DEPSNODE_TYPE_EVAL_POSE,
|
||||
DEPSOP_TYPE_INIT,
|
||||
|
Loading…
Reference in New Issue
Block a user