blender/release/scripts/fixfromarmature.py
Willian Padovani Germano a6d077bae2 Scripts:
- tiny updates for better behavior, unix line endings, cvs Id tags;
- Updated DX7 exporter (thanks to author Ben Omari who's also working on a DX8 one);
- added sysinfo script;

Interface (scripts):

- changed behavior for which win is chosen for script guis:
    Now there's a smarter order, guis will use either:
    - Scripts win
    - Buttons win (if not a script from groups Wizards or Utils)
    - Text win
    - Closest bigger area
- Added a button to the scripts header so that it's faster to return to the buttons win (this can be made general), if that was the previous win used.
2004-06-10 03:27:46 +00:00

39 lines
1.2 KiB
Python

#!BPY
""" Registration info for Blender menus: <- these words are ignored
Name: 'Fix from Armature'
Blender: 232
Group: 'Generators'
Tip: 'Fix armature deformation.'
"""
# $Id$
#
#----------------------------------------------
# jm soler 05/2004 : 'FixfromArmature'
#----------------------------------------------
# Official Page :
# http://jmsoler.free.fr/util/blenderfile/py/fixfromarmature.py
# Communicate problems and errors on:
# http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender
#---------------------------------------------
# Page officielle :
# http://jmsoler.free.fr/util/blenderfile/py/fixfromarmature.py
# Communiquer les problemes et erreurs sur:
# http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender
#---------------------------------------------
import Blender
try:
Ozero=Blender.Object.GetSelected()[0]
nomdelobjet=Ozero.getName()
Mesh=Blender.NMesh.GetRawFromObject(nomdelobjet)
Obis = Blender.Object.New ('Mesh')
Obis.link(Mesh)
Obis.setSize(Ozero.getSize())
Obis.setEuler(Ozero.getEuler())
Obis.setLocation(Ozero.getMatrix()[3][0:3])
scene = Blender.Scene.getCurrent()
scene.link (Obis)
except:
print "not a mesh or no object selected"