Depsgraph: Fix extra operations and relations created for shared armatures
This commit is contained in:
parent
b886cdf81d
commit
fa11dc6730
|
@ -33,6 +33,8 @@
|
|||
#include "BLI_utildefines.h"
|
||||
#include "BLI_ghash.h"
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
namespace DEG {
|
||||
|
||||
BuilderMap::BuilderMap() {
|
||||
|
|
|
@ -150,7 +150,7 @@ void DepsgraphNodeBuilder::build_rig(Object *object)
|
|||
* Eventually, we need some type of proxy/isolation mechanism in-between here
|
||||
* to ensure that we can use same rig multiple times in same scene...
|
||||
*/
|
||||
if (!built_map_.checkIsBuilt(arm)) {
|
||||
if (!built_map_.checkIsBuiltAndTag(arm)) {
|
||||
build_animdata(&arm->id);
|
||||
/* Make sure pose is up-to-date with armature updates. */
|
||||
add_operation_node(&arm->id,
|
||||
|
|
|
@ -509,7 +509,9 @@ void DepsgraphRelationBuilder::build_object_data(Object *object)
|
|||
}
|
||||
ID *obdata_id = (ID *)object->data;
|
||||
/* Object data animation. */
|
||||
build_animdata(obdata_id);
|
||||
if (!built_map_.checkIsBuilt(obdata_id)) {
|
||||
build_animdata(obdata_id);
|
||||
}
|
||||
/* type-specific data. */
|
||||
switch (object->type) {
|
||||
case OB_MESH:
|
||||
|
@ -527,7 +529,7 @@ void DepsgraphRelationBuilder::build_object_data(Object *object)
|
|||
build_proxy_rig(object);
|
||||
}
|
||||
else {
|
||||
build_rig(object);
|
||||
build_rig(object);
|
||||
}
|
||||
break;
|
||||
case OB_LAMP:
|
||||
|
|
|
@ -316,11 +316,13 @@ void DepsgraphRelationBuilder::build_rig(Object *object)
|
|||
add_relation(init_ik_key, flush_key, "Pose Init IK -> Pose Cleanup");
|
||||
|
||||
/* Make sure pose is up-to-date with armature updates. */
|
||||
OperationKey armature_key(&arm->id,
|
||||
DEG_NODE_TYPE_PARAMETERS,
|
||||
DEG_OPCODE_PLACEHOLDER,
|
||||
"Armature Eval");
|
||||
add_relation(armature_key, init_key, "Data dependency");
|
||||
if (!built_map_.checkIsBuiltAndTag(arm)) {
|
||||
OperationKey armature_key(&arm->id,
|
||||
DEG_NODE_TYPE_PARAMETERS,
|
||||
DEG_OPCODE_PLACEHOLDER,
|
||||
"Armature Eval");
|
||||
add_relation(armature_key, init_key, "Data dependency");
|
||||
}
|
||||
|
||||
/* IK Solvers...
|
||||
* - These require separate processing steps are pose-level
|
||||
|
|
Loading…
Reference in New Issue