Hello all,I have been meaning to start a scripting blog on my portfolio for a while now and have recently finished up a tutorial that covers setting up a localised Maya environment using batch files.
The tutorial covers:What it isWhy it is useful
--How we set it upHow we can set relative pathing for each users sessionHow we can open our Maya files using our setup (double clicking in windows)Setting up a pinnable shortcutCustomising our Maya icons and splash screenIf you have 10 mins please take a read and let me know what you think :)Cheers,Ben
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1987a6d4-7924-4bff-976c-b08085502bb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0nkVzT9Qmy810Q40_hLRFn1oPc%3DR9noXkTTk11jjnYEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
l
On Sun, 1 Nov 2015 9:44 AM Ben Hearn <benandr...@gmail.com> wrote:
Hey Justin,
Thanks for the feedback I should have been more concise with the explanation of SHOW and CGROOT.
The SHOW variable is hard coded to the batch file In question and Is the name of the top level directory where your tools live. For example if you had a huge structure for maya tools and your batch file was 5 directories into your top level folder the for loop steps back through the directories until it finds the folder name specified with SHOW.
CGROOT is mapped throughout the for loop and is the path to the top level directory you specified in SHOW.
My CGROOT on my machine would end up being D:/projects/tools/maya_tools for example.
If we had 3 projects we could set 3 batch files up and simply change the SHOW variable to use an entirely different set of directories if we wanted to or even restrict a specific maya setup to only step back a couple of directories and not give it full access to our entire tools folder.
We use the CGROOT variable on our python path so we can set CGROOT/dirname/subdir/subsubdir etc.
The built PYTHONPATH at runtime does the same thing as sys.path.append but we are not specifying it in a script we are giving maya and any other script we want to run access to these directories specified. It allows us to easily add directories later without the hassle of any scripts in our sub folders not having access to them.
Oh I see it now. The pdf didn't go into detail on what that for loop really does. I glossed over it.
Yes you can install pyside on your machine but I use the anaconda python distributable and when I'm using my IDE (pycharm) I can run any UI using pyqt without having to install pyside and avoid that hassle inside my IDE. I think it's a personal preference :)
So does that mean you still build and install PyQt for Maya 2016? Or that you always write your Maya UI code to dynamically switch on whichever is available to import (using that method which remaps PySide to PyQt names, and sticking to SIP api v2)
--
Tel - +46 76245 92 90 (Sweden)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkWw64YMKAN1LPM3L%3D%3D%3Dg-33YrkzeBWFeam93PY_A_n5cw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0i%3D6C_P%2BLTzw9GkMLgQZrE1OgAkMSYG41mzAqRr%2B5FSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Sun, 1 Nov 2015 10:05 AM Ben Hearn <benandr...@gmail.com> wrote:
Yes essentially we are dynamically switching from PySide to PyQt4. Not sure about building and installing for Maya, we are just telling maya to use the system version of pyqt. We do not need to install and build into Maya's system directories. We are essentially keeping our native maya clean and unaltered. We can still use pyside if we want to
But does that work across many versions of Maya, when the Qt ABI changed? It means your system install works for a certain range of Maya's. Then again you probably aren't running Maya 2013 anymore. But what happens if they bump the Qt ABI on the next Maya? I suppose it just means your batch file needs to switch on different locations of PyQt to match the Maya
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkVh2y5Qeay%2B%3DeENgYn9mtHHjMWRrzi7prdg_2OrwTGDUg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2w%3Dz0RxVpCKNbTfcwafP-RKvJN1frmkf5G%2BFgs8L_UYw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2w%3Dz0RxVpCKNbTfcwafP-RKvJN1frmkf5G%2BFgs8L_UYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
It was Halloween for me yesterday, in New Zealand ;-)
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7993D3F1-1E22-45CE-BAA4-83BFE26FB8FF%40gmail.com.
On Sun, 1 Nov 2015 10:15 AM Ben Hearn <benandr...@gmail.com> wrote:
Yes, we can set our pyqt version to whichever works with maya it does not have to be fixed. In my example my pyqt path is set to c/anaconda/pyqt. We can easily change this to a newer or older version of pyqt by just setting the path on our PYTHONPATH
Right on. Just clarifying. The script is meant to be all-inclusive to bootstrap Maya.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkW38wuD0N%2Bru6%3DFzQEoarxmPGJKd%3D9mq8SixAm4-Lg%2Bqg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA29HDWZq1JR8cHqaxhknXBp7QzzxwAcZDKPu%3Dt4p1U6ww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1oHdp_xbxNdFNaW64mPzVEi9WA2oW_ti%3DQD4xokP_xVA%40mail.gmail.com.
Yes indeed. An all inclusive maya bootstrap. Great way to sum it up :) how is it the logic working with osx?
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkUDho%2BJZDJ3aMnxkf2_UBa5KRBO5b9jrh2eS4de9nTEPA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA24%2BsTco%3D2Js5Ndx8%3Dyh_duJNivwooPFdoGG3SbGA0jAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Sun, 1 Nov 2015 10:54 AM Ben Hearn <benandr...@gmail.com> wrote:
I hadn't considered that approach but you are correct most if not all windows users don't tend to work directly from the command line. Setting it up as we have here allows windows users to just double click on either the setup or the maya file itself
Either way, nice write up. Thanks for sharing, and engaging on questions about it.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkUDho%2BJZDJ3aMnxkf2_UBa5KRBO5b9jrh2eS4de9nTEPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA24%2BsTco%3D2Js5Ndx8%3Dyh_duJNivwooPFdoGG3SbGA0jAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Tel - +46 76245 92 90 (Sweden)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkUQckDsJ69N7c9cwwYz%2BbT1AwL1PxyJsJ%2Bdijv6rqE3mA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3KzVauxch2S_CjoP_DXHCQ0RVBSnLXxiZVBVKTRQO%3D%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi Ben,
First off, great work. Having control over your environment is one of those invisible things you are either afraid of or have built your entire studio built upon, so this is a very good step in the right direction.
A few comments.
mayapy
as your Python interpreter, then you won’t even need to install PySide nor Python separately, and will benefit from the exact environment as the one you have in Maya, with the added bonus of being able to actually initialise Maya at will to use more intimate features such as the cmds
module.So here’s an example of what part of your script might looks like as .py
instead of .bat
.
import os
import subprocess
root = r"C:\Program Files\Autodesk\Maya2015"
exe = os.path.join(root, "bin", "maya.exe")
env = dict(os.environ, **{
"CYGWIN": "nodosfilewarning",
"SHOW": "maya_batch_file_tut",
"USER": os.environ["USERNAME"],
"MAYA_VERSION": str(2015),
"MAYA_DISABLE_CIP": str(1),
"MAYA_DISABLE_CER": str(1),
"PYTHONPATH": ";".join([
root,
r"c:\Anaconda\Lib\site-packages",
r"c:\some\other\path"
])
})
print("Running {exe} with:\n\t{env}".format(**locals()))
subprocess.call(exe, env=env)
Running that produces the same results and has the same advantages as you proposed about .bat
, but is both cross-platform and more powerful. This isn’t the end though, the next phase might be to produce what Justin referred to above as a “wrapper” and implement more logic into it. That’s where .bat
starts to show it’s flaws and where Python can really shine. Especially when moving on the the next-next phase; GUIs. :)
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkVo4FMOJRs-mSG9OJNzDkYmR1HHB-appaJmd3QvMxc17A%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1987a6d4-7924-4bff-976c-b08085502bb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0nkVzT9Qmy810Q40_hLRFn1oPc%3DR9noXkTTk11jjnYEA%40mail.gmail.com.
--Tel - +46 76245 92 90 (Sweden)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkWw64YMKAN1LPM3L%3D%3D%3Dg-33YrkzeBWFeam93PY_A_n5cw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0i%3D6C_P%2BLTzw9GkMLgQZrE1OgAkMSYG41mzAqRr%2B5FSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Tel - +46 76245 92 90 (Sweden)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkVh2y5Qeay%2B%3DeENgYn9mtHHjMWRrzi7prdg_2OrwTGDUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2w%3Dz0RxVpCKNbTfcwafP-RKvJN1frmkf5G%2BFgs8L_UYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Tel - +46 76245 92 90 (Sweden)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkW38wuD0N%2Bru6%3DFzQEoarxmPGJKd%3D9mq8SixAm4-Lg%2Bqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
...To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
While we’re at it, here’s how you might take it to the next level using Python.
There aren’t that many examples of interfaces for wrappers/launchers that deal with environment variables like this, yet oddly enough every studio that I’ve ever been to with even a hint of pipeline has had it in one form or another. Sometimes as a command-line utility like be
, sometimes as a graphical interface and other times as some form of web/native hybrid where you establish an environment and launch software via something like Shotgun or Ftrack.
If you do find more examples, please do share. :)
For completeness, here’s the design document for be
along with an earlier prototype.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1987a6d4-7924-4bff-976c-b08085502bb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0nkVzT9Qmy810Q40_hLRFn1oPc%3DR9noXkTTk11jjnYEA%40mail.gmail.com.
--Tel - +46 76245 92 90 (Sweden)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkWw64YMKAN1LPM3L%3D%3D%3Dg-33YrkzeBWFeam93PY_A_n5cw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0i%3D6C_P%2BLTzw9GkMLgQZrE1OgAkMSYG41mzAqRr%2B5FSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Tel - +46 76245 92 90 (Sweden)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkVh2y5Qeay%2B%3DeENgYn9mtHHjMWRrzi7prdg_2OrwTGDUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2w%3Dz0RxVpCKNbTfcwafP-RKvJN1frmkf5G%2BFgs8L_UYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Tel - +46 76245 92 90 (Sweden)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkW38wuD0N%2Bru6%3DFzQEoarxmPGJKd%3D9mq8SixAm4-Lg%2Bqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
...To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ea9ae417-8e9f-4b68-9f11-35f7d2cb0294%40googlegroups.com.
On Mon, 2 Nov 2015 12:12 AM Marcus Ottosson <konstr...@gmail.com> wrote:
Hi Ben,
First off, great work. Having control over your environment is one of those invisible things you are either afraid of or have built your entire studio built upon, so this is a very good step in the right direction.
A few comments.
As Justin said, there isn’t really a different between PyQt and PySide when working in or outside of Maya. In fact, if you use mayapy as your Python interpreter, then you won’t even need to install PySide nor Python separately, and will benefit from the exact environment as the one you have in Maya, with the added bonus of being able to actually initialise Maya at will to use more intimate features such as the cmds module.Bat files are at a disadvantage in a few areas.One of which is portability. If you’re a Windows-only shop then that’s okay, but whatever work you do is locked to Windows and neither you or anyone else on Unix can benefit from it.The other is syntax and what it can actually do for you. The syntax is of course new if you’re from Python, but also limiting compared to what they use on Unix; bash. A more powerful alternative on Windows is Powershell, which is essentially all of C# available via the command-line. It’s more powerful than bash in many respects, but then also more complicated to work with in as many circumstances. But the most powerful alternative is something we already know. Python. And it just so has it that Python is also cross-platform.
So here’s an example of what part of your script might looks like as .py instead of .bat.
import os import subprocess root = r"C:\Program Files\Autodesk\Maya2015" exe = os.path.join(root, "bin", "maya.exe") env = dict(os.environ, **{ "CYGWIN": "nodosfilewarning", "SHOW": "maya_batch_file_tut", "USER": os.environ["USERNAME"], "MAYA_VERSION": str(2015), "MAYA_DISABLE_CIP": str(1), "MAYA_DISABLE_CER": str(1), "PYTHONPATH": ";".join([ root, r"c:\Anaconda\Lib\site-packages", r"c:\some\other\path" ]) }) print("Running {exe} with:\n\t{env}".format(**locals())) subprocess.call(exe, env=env)
Running that produces the same results and has the same advantages as you proposed about .bat, but is both cross-platform and more powerful. This isn’t the end though, the next phase might be to produce what Justin referred to above as a “wrapper” and implement more logic into it. That’s where .bat starts to show it’s flaws and where Python can really shine. Especially when moving on the the next-next phase; GUIs. :)
Also, if you don't want that python wrapper script sitting around as a parent process in the process tree, you could just exec the Maya process and let it replace the pid
https://docs.python.org/2/library/os.html#os.execvpe
You don't do anything after the subprocess returns, so the script is basically done with its job anyways. It can be cleaner in the long run is someone is ever inspecting their launched "maya" command, to actually get the pid of the Maya process and not a wrapper parent process.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkVo4FMOJRs-mSG9OJNzDkYmR1HHB-appaJmd3QvMxc17A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Marcus Ottosson
konstr...@gmail.com--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBUxUuLMimNhZds_Nu6%2BX8nc%2BzLr_fCahaGFW2j8ODWhA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBPCtT2OAjL_U%3Dd%2B47caoMENkxGmwZnwWJAHHzzEzn5Ow%40mail.gmail.com.
Also, if you don’t want that python wrapper script sitting around as a parent process in the process tree, you could just exec the Maya process and let it replace the pid
That’s a neat trick.
Is its focus primarily unix systems?
Thanks, happy to hear you like it. It’s mostly seen use on Windows, as far as I know, and it’s been developed there also. But it’s meant to be used on any major platform.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkUyc6Ht_WX0UYMpMSzhetUhB2O276WLP%2Bp1HaZtc9qeSg%40mail.gmail.com.
Also, if you don’t want that python wrapper script sitting around as a parent process in the process tree, you could just exec the Maya process and let it replace the pid
Except it looks like Windows doesn’t “embed” the wrapped process in that way, instead both are visible with their own PIDs, should the wrapping process be long-lived. For a batch script, it usually dies upon completion, and Python does too unless it’s explicitly kept open.
Also, if you don’t want that python wrapper script sitting around as a parent process in the process tree, you could just exec the Maya process and let it replace the pid
Except it looks like Windows doesn’t “embed” the wrapped process in that way, instead both are visible with their own PIDs, should the wrapping process be long-lived. For a batch script, it usually dies upon completion, and Python does too unless it’s explicitly kept open.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODxmWjK%2BWWb%3DWweFfT19%3DF8p91%2BHKRTH6Sof9zZSbDczw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1987a6d4-7924-4bff-976c-b08085502bb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0nkVzT9Qmy810Q40_hLRFn1oPc%3DR9noXkTTk11jjnYEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Tel - +46 76245 92 90 (Sweden)
LinkedIn: http://www.linkedin.com/pub/ben-hearn/50/a64/33b
--
You received this message be
...
Yea its true, Windows has a different process model and no exact equivalent for execv[pe] that works the same as posix
http://serverfault.com/a/567393/105722
It says it launches a new process and the calling process ends.
In terms of just booting up Maya, from a posix perspective, that could mean either exec'ing which replaces the current process with the Maya process, or launching it as a child process and waiting, which keeps the parent open as well, or forking Maya as a background process and letting the parent end (effectively what you are getting in windows, if the wrapper is finishing)
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1987a6d4-7924-4bff-976c-b08085502bb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/UV_fdWrS3YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0nkVzT9Qmy810Q40_hLRFn1oPc%3DR9noXkTTk11jjnYEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Tel - +46 76245 92 90 (Sweden)
LinkedIn: http://www.linkedin.com/pub/ben-hearn/50/a64/33b
--
You received this message be
--...
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/fbea4dc3-eb72-49c4-be40-cd2e88e5d0c6%40googlegroups.com.