[Maya-Python] issueing commands to mayapy.exe

2018-02-21 Thread Juan Cristóbal Quesada
Hi, i would like to run several maya scripts from the command line and i would like each script to be executed by the same mayapy.exe instance. the intention is to run this command line from another python script via subprocess.Popen... so the desired behaviour is to have a single instance of the

[Maya-Python] 'module' object has no attribute

2018-02-21 Thread Jason Huang
Hi all, I got stuck at the beginning of creating a UI interface and couldn't figure out what was missing. ENV: Maya 2018 update 2, Windows 10. script name: assetManager.py (saved in Maya 2018 scripts folder) from Qt import QtWidgets, QtCore, QtGui import pymel.core as pm class

[Maya-Python] Re: issueing commands to mayapy.exe

2018-02-21 Thread Juan Cristóbal Quesada
guess what im asking is if there you can specify the process id for example to the Popen method and have it use the process if it already exists or create one if it doesnt 2018-02-21 14:53 GMT+01:00 Juan Cristóbal Quesada < juan.cristobal...@gmail.com>: > Hi, > i would like to run several maya

Re: [Maya-Python] issueing commands to mayapy.exe

2018-02-21 Thread Marcus Ottosson
Yes, when you import my_script, it is effectively “run”. So what you can do is launch 1 instance of mayapy, and pass it a single script that imports the others. $ mayapy my_script.py *my_script.py* import other_script1import other_script2 guess what im asking is if there you can specify the

Re: [Maya-Python] 'module' object has no attribute

2018-02-21 Thread Jason Huang
Hey Zeth, Sorry for the late response. Much appreciated for the attached script. It seems to be super handy tool. I am able to download the attachment just fine. Will definitely give that a go and let you know. cheers, Jason On Wednesday, February 21, 2018 at 12:43:07 PM UTC-8, zeth willie

[Maya-Python] writing compound attributes

2018-02-21 Thread fruityfrank
hi ! I'm writing a node with compound attributes, and, as always, I'm struggling with syntax ! I want my attributes to have this hierarchy : element |__element[0] |__ element[0].position |__element[0].positionX |__element[0].positionY |__element[0].positionZ

Re: [Maya-Python] 'module' object has no attribute

2018-02-21 Thread Marcus Ottosson
Try print(assetManager) to find out where the file actually resides on disk, and make sure it’s the file you expect. ​ On 21 February 2018 at 15:10, Jason Huang wrote: > Hi all, > > I got stuck at the beginning of creating a UI interface and couldn't > figure out what

Re: [Maya-Python] 'module' object has no attribute

2018-02-21 Thread Jason Huang
Thanks Marcus. Just tried that and apparently it's executing from the Maya 2017 scripts folder print(assetManager) If I remove the assetManager.py from Maya 2017 scripts folder, everything is fine. Is there a way to tell Maya 2018 to execute from the 2018 script folder instead of the 2017?

Re: [Maya-Python] 'module' object has no attribute

2018-02-21 Thread Marcus Ottosson
Yes, try something like this. import sys sys.path.insert(0, r"C:\Users\jason\Documents\maya\2018\scripts")import assetManager sys.path is a list of all directories Python will look for modules, prior to importing it for the first time. It’s a somewhat forceful way of achieving it however, it’s

Re: [Maya-Python] 'module' object has no attribute

2018-02-21 Thread Jason Huang
Thank you for the tips Marcus. As checking the PYTHONPATH, I guess the problem was I have an older version of assetManager.py saved in the 2017 scripts folder and that directory is part of the PYTHONPATH directories Maya will look for modules. Maya 2018 might parse the 2017 scripts directory

Re: [Maya-Python] 'module' object has no attribute

2018-02-21 Thread Marcus Ottosson
Ah, well you can spot the order in which directories are evaluated by looking at the order of paths in sys.path. You should find that the 2017 folder is before the 2018 folder. This shouldn’t be Maya’s doing, but rather something happening elsewhere. 2018 shouldn’t know about 2017, nor any other

Re: [Maya-Python] 'module' object has no attribute

2018-02-21 Thread Jason Huang
ha...you are right. The 2017 scripts directory indeed shows up in front of the 2018 one based on the order listed. Seems like my Maya 2018 is going a bit bananas... :) Now I know what's going on and a solution. Thank you, Marcus! On Wednesday, February 21, 2018 at 9:12:19 AM UTC-8, Marcus

Re: [Maya-Python] seqls/seqinfo (gofileseq) binary releases

2018-02-21 Thread Paul Molodowitch
On Tue, Feb 20, 2018 at 10:44 AM Justin Israel wrote: > > I'm not really familiar with existing other projects that provide this. > It's always been just a thing you have to rewrite at the next studio. > Only other one I'm aware of is one by mikros:

Re: [Maya-Python] mayapy interpreter error with Anaconda

2018-02-21 Thread Mike Bourbeau
I'm having an issue with PyCharm and autocomplete. The stubs work for autocompletion, but my code won't execute. I've added the stubs to the PYTHONPATH in my

Re: [Maya-Python] seqls/seqinfo (gofileseq) binary releases

2018-02-21 Thread Justin Israel
On Thu, Feb 22, 2018 at 9:33 AM Marcus Ottosson wrote: > I've mostly used clique myself, but > have also glanced at pyseq , fileseq > and filesequence >

Re: [Maya-Python] seqls/seqinfo (gofileseq) binary releases

2018-02-21 Thread Marcus Ottosson
I've mostly used clique myself, but have also glanced at pyseq , fileseq and filesequence .​ -- You received this message because you are

Re: [Maya-Python] seqls/seqinfo (gofileseq) binary releases

2018-02-21 Thread Justin Israel
On Thu, Feb 22, 2018, 6:46 AM Paul Molodowitch wrote: > On Tue, Feb 20, 2018 at 10:44 AM Justin Israel > wrote: > >> >> I'm not really familiar with existing other projects that provide this. >> It's always been just a thing you have to rewrite at the

Re: [Maya-Python] 'module' object has no attribute

2018-02-21 Thread zeth willie
Hey Jason- I've attached a script that I wrote a while back that may be useful for stuff like this. Put it in your scripts folder (instructions for executing in the header) and it will help manage your python paths (add, remove, reorder). The first tab lets you save/load paths for quickly