Re: [Maya-Python] Kill child process on exit

2015-03-04 Thread Justin Israel
Hey, I was reading your question a certain way at first (which is more complicated) and posed it to a colleague since he loves process management questions. He actually read it the other way, and gave me an answer that addresses how to manage the standard parent-child relationship where Maya is st

Re: [Maya-Python] object inverse matrix

2015-03-04 Thread Marcus Ottosson
Sounds like you’ve got a number of problems here and I’m not sure which ones solves your problem, but I might be able to help you with this. Usually it comes down to me not knowing how to “multiply” the matrix * the child object’s transform node In Maya, there’s an output on each transform node t

[Maya-Python] Re: Wierd Geo Cache Problem

2015-03-04 Thread Ajay Kumar.R.P
Hi, i also experienced the same problem but it happened to me only when the number of cache nodes exceeded 500 so if you could combine some geo during modeling and reduce the count and then create the cache you could work a way around. Ajay On Wednesday, 18 February 2015 08:43:04 UTC+5:30

Re: [Maya-Python] Kill child process on exit

2015-03-04 Thread Marcus Ottosson
I might add that, from what I can tell, the Windows method of achieving this is apparently quite different and more difficult than the Unix version, so although Unix suggestions would be great, I'm mainly looking for a solution which works well on Windows; even if it's Windows-only. Thanks -- Yo

[Maya-Python] Kill child process on exit

2015-03-04 Thread Marcus Ottosson
Hi all, I’d like something like this. 1. Maya is launched 2. A child process is launched; via e.g. subprocess.Popen 3. Upon exiting Maya, I’d like the child process to be killed Ideally, it dies no matter how the parent died; be it normally or when crashing. And ideally, it’d be cross-p

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-04 Thread francois bonnard
the trick was : path = "C:/Users/francesco/Desktop/selectionMaya" myFile = "C:/Users/francesco/Desktop/selectionMaya/" dir = os.listdir(path) junk = [".mayaSwatches", ".DS_Store", ".picasa.ini"] for texture in dir: if texture not in junk: img = Image.open(os.path.join(myFile,texture)) Thank

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-04 Thread Marcus Ottosson
Ok, slow down a little. Let’s take this one step at a time. os.path.isfile takes a path as input. If that path is not absolute - i.e. does not have the root/drive-letter included - then it will assume that the string you gave it is re

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-04 Thread Chris Lesage
Here is a relevant Stack Overflow Question: http://stackoverflow.com/questions/17893542/why-do-os-path-isfile-return-false It seems you need to test the full path with os.path.isfile() but listdir() is returning just filenames. On Wed, Mar 4, 2015 at 10:50 AM, francois bonnard wrote: > import

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-04 Thread francois bonnard
import os import maya.cmds as cmds from PIL import Image path = "C:/Users/francesco/Desktop/selectionMaya" dir = os.listdir(path) junk = [".mayaSwatches", ".DS_Store", ".picasa.ini"] for texture in dir: if texture not in junk: print texture with this script I got : a.jpg b.jpg c.JPG d.

Re: [Maya-Python] creating a curve from points

2015-03-04 Thread Chris Lesage
Whoops, if you are working with selection, us os=True, instead of sl=True. Otherwise your point order won't necessarily be in order: selPoints = cmds.ls(flatten=True, orderedSelection=True) postList = [cmds.pointPosition(x) for x in selPoints] cmds.curve(n='curve1', d=1, p=postList) Cheers, Chris

Re: [Maya-Python] creating a curve from points

2015-03-04 Thread Chris Lesage
Hi Sam, How are you getting the list of vertices in the first place? If you are selecting points, see my 3rd example. 1. You can also use list comprehension to shorten this a bit more. vertexList = [330, 136, 58] postList = [cmds.pointPosition('pSphere1.vtx[%s]'%x) for x in vertexList] cmds.curv

[Maya-Python] Merging Alembic cache question

2015-03-04 Thread Panupat Chongstitwattana
Hi. I'm wondering if anyone can point me to the correct workflow for importing Alembic Cache please? I'm experimenting with character and so far I can't get the cache to merge with my geometry. Always get a separate model in the scene instead. The character is referenced into scene and I think