#!BPY
# """
# Name: 'Find linked armature'
# Blender: 245
# Group: 'Object'
# Tooltip: 'Find the armatures modifier linked to this object.'
# """
__author__ = 'Jm Soler'
__version__ = '0.0.1 2008/04/19'
__url__ = ["""jms's site, http://jmsoler.free.fr/didacticiel/blender/tutor/bpy_trouve_quellearmature.htm""",
"""Support forum, http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender"""
]
__email__ = ["jms, jmsoler:free.fr"]
__bpydoc__ = """\
Cette macro trouve tous les nms des armatures liees a un objet.
How to:
Just call this script.
il suffit d'appeler le script.
"""
# -------------
# jms soler Avril 2008
# -------------
import Blender
from Blender import Scene, Object
scene=Scene.GetCurrent()
NOM_ARMATURE=Blender.Draw.PupStrInput("Armature Name:", "untitled",
25)
block = []
if Object.GetSelected():
ob = Object.GetSelected()
A=[ a[Blender.Modifier.Settings.OBJECT].name for a in ob[0].modifiers
if (a.type == Blender.Modifier.Types.ARMATURE
and
a[Blender.Modifier.Settings.OBJECT])]
print A
if A:
for a in A:
block.append(a)
else:
print 'liste vide '
block.append('liste vide ')
retval = Blender.Draw.PupBlock("Armature list for %s"%NOM_ARMATURE,
block)
|