View Full Version : Get a list of transforms per vertex in Python
I am trying to get a list of transforms per vertex (of skinned mesh), and I need to do it in Python.
It seams that I can't use skinPercent command, because it has a limitation with transform flag in query mode. The only thread I found on the subject is this:
Anybody knows if there is another way of getting a list of influences per vertex using Python?
10-13-2010, 05:05 AM
i've got the similar problem
Exception in thread Thread-2:
Traceback (most recent call last):
File "D:\Python25\lib\threading.py", line 488, in __bootstrap_inner
File "D:\Python25\lib\threading.py", line 448, in run
File "D:\INVINCIBLE\code\python\project\pdeExportTool\animationUI.py", line 38, in __call__
self.res = self.func(*self.args)
File "D:\INVINCIBLE\code\python\project\pdeExportTool\animationUI.py", line 410, in OnRun
File "D:\INVINCIBLE\code\python\project\pdeExportTool\exportAnimationBatch.py", line 155, in exportCharacterAnimation
mc.select('root',replace = True)
TypeError: Flag 'replace' must be passed a boolean argument
I finally find that error :
RuntimeError: Maya commands (maya.cmds.*) maya only be called from the main thread
I found a solution to my problem (thanks to my colleagues).
Python code to get transforms per vertex is this:
mc.skinPercent("skinCluster5", 'symetricalHead.vtx', query=True, transform=None)
Trick here is using None with transform flag.
INVINCIBLE0918, I am only starting with Python and didn't get to threading, but thanks for heads up, I will remember that.
10-13-2010, 07:34 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.