Modifiers: Fix bug where UVWarp Modifier would try to get bone matrix from a non armature object

There is a bug where the UVWarp modifier will stop working if an armature bone is set as the Bone To target and then later changed to a non armature object without clearing the Bone To string property. The modifier will still think it is needing a bone matrix and not properly use the object matrix.

A simple fix by adding a check for the object being an armature as well as the bonename string being set.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6809
This commit is contained in:
Cody Winchester 2020-02-12 10:18:52 +01:00 committed by Bastien Montagne
parent cc6defa244
commit 1f28af6a79
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ static void uv_warp_deps_object_bone_new(struct DepsNodeHandle *node,
const char *bonename)
{
if (object != NULL) {
if (bonename[0]) {
if (object->type == OB_ARMATURE && bonename[0]) {
DEG_add_object_relation(node, object, DEG_OB_COMP_EVAL_POSE, "UVWarp Modifier");
}
else {