diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-23 00:24:59 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-23 00:24:59 +0400 |
commit | 3d7ed80ed44a30bdc9a4af457df70207dde20d99 (patch) | |
tree | 6e7a1e9953f4c4746b04d9f5dc1b82fadd7c8bce | |
parent | 43b59afebb7b4887028786174978ab551e8cb9d2 (diff) |
- added modifiers_isDeformedByArmature function
-rw-r--r-- | source/blender/blenkernel/BKE_modifier.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index ce3082fc9b4..e600c0752fb 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -201,6 +201,7 @@ void modifiers_clearErrors (struct Object *ob); int modifiers_getCageIndex (struct Object *ob, int *lastPossibleCageIndex_r); int modifiers_isSoftbodyEnabled (struct Object *ob); +int modifiers_isDeformedByArmature(struct Object *ob, struct Object *armOb); ModifierData* modifiers_getVirtualModifierList (struct Object *ob); diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 532317a6520..1db9c55e8ad 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -1447,3 +1447,19 @@ ModifierData *modifiers_getVirtualModifierList(Object *ob) return ob->modifiers.first; } + +int modifiers_isDeformedByArmature(Object *ob, Object *armOb) +{ + ModifierData *md; + + for (md=ob->modifiers.first; md; md=md->next) { + if (md->type==eModifierType_Armature) { + ArmatureModifierData *amd = (ArmatureModifierData*) md; + + if (amd->object==armOb) + return 1; + } + } + + return 0; +}
\ No newline at end of file |