Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-05-04 04:59:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-05-04 04:59:02 +0400
commitcb67cba19a85b6a43faba2cd700973bb3f061b37 (patch)
treeb8b2c8e6906e3576a6049f02f87e1d15382aa869 /source/blender/blenkernel
parente5ccb8773dd16b528eef300fdbc012fafb4e47ea (diff)
Multiple armatures<>mesh objects now work with name flipping.
previously would only work if the armature was the first in the meshes modifier list, in that case the armature would be name flipped but the mesh would not)
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_modifier.h1
-rw-r--r--source/blender/blenkernel/intern/modifier.c15
2 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index b90758a52fb..ecbfeed157a 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -202,6 +202,7 @@ int modifiers_getCageIndex (struct Object *ob, int *lastPossibleCageIndex_r)
int modifiers_isSoftbodyEnabled (struct Object *ob);
struct Object* modifiers_isDeformedByArmature(struct Object *ob);
+int modifiers_usesArmature(struct Object *ob, struct bArmature *arm);
int modifiers_isDeformed (struct Object *ob);
ModifierData* modifiers_getVirtualModifierList (struct Object *ob);
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 39e61fd63e3..edda9f7a9a1 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -2125,6 +2125,21 @@ Object *modifiers_isDeformedByArmature(Object *ob)
return NULL;
}
+int modifiers_usesArmature(Object *ob, bArmature *arm)
+{
+ ModifierData *md = modifiers_getVirtualModifierList(ob);
+
+ for (; md; md=md->next) {
+ if (md->type==eModifierType_Armature) {
+ ArmatureModifierData *amd = (ArmatureModifierData*) md;
+ if (amd->object->data==arm)
+ return 1;
+ }
+ }
+
+ return NULL;
+}
+
int modifiers_isDeformed(Object *ob)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);