On Sun, 1 Nov 2015 10:15 AM Ben Hearn <[email protected]> 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.

On Saturday, 31 October 2015, Justin Israel <[email protected]> wrote:


On Sun, 1 Nov 2015 10:05 AM Ben Hearn <[email protected]> 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

On Saturday, 31 October 2015, Justin Israel <[email protected]> wrote:


l

On Sun, 1 Nov 2015 9:44 AM Ben Hearn <[email protected]> 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)



I hope that cleared up a couple of things. I will amend the tut to more
clearly explain your feedback

Cheers,

Ben

On Saturday, 31 October 2015, Justin Israel <[email protected]> wrote:

Hey Ben,

I had a couple questions...

You make a couple references to the preference of switching to the system
PyQt4 versus the Maya PySide, for reasons of it being easier to develop
without a Maya-specific PySide. I wasn't clear on this statement. I don't
believe there is anything special about the Maya PySide, other than it
being bundled. Could you just as easily install PySide on your system, the
same as you would PyQt, and then be able to use PySide inside and outside
of Maya?  This isn't really a comment on preference or anything. I just
didn't get the part about it being easier to develop, or that anything was
special about PySide in Maya.

Also, as a non-windows user that hasn't seen batch file programming in many
many years, I was a bit unclear as to the behavior of the built PYTHONPATH
at runtime. I figure this is similar to someone who uses windows and knows
nothing about batch file syntax.  Is that a hard-coded SHOW variable in the
batch file, or does it somehow derive from external sources? Or is the goal
that you would have different batch files for different shows, and the only
externally derived bit is the CGROOT? I'm trying to map this to my
osx/linux env experience, where you would launch Maya from a shell, with a
wrapper that would pick up your shell environment. Such as, starting from a
shell that is set to SHOW=MyShow, in which case that Maya session would be
launched under those settings.

Maybe it might help to describe the behavior of the variables and the
intended usage of the batch file? As in, how would you end up using it
across 3 shows?

Justin

On Sun, Nov 1, 2015 at 8:47 AM Benjam901 <[email protected]> wrote:

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 is

Why it is useful

How we set it up

How we can set relative pathing for each users session

How we can open our Maya files using our setup (double clicking in windows)

Setting up a pinnable shortcut

Customising our Maya icons and splash screen

If 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/1987a6d4-7924-4bff-976c-b08085502bb9%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/1987a6d4-7924-4bff-976c-b08085502bb9%40googlegroups.com?utm_medium=email&utm_source=footer>
.
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
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0nkVzT9Qmy810Q40_hLRFn1oPc%3DR9noXkTTk11jjnYEA%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0nkVzT9Qmy810Q40_hLRFn1oPc%3DR9noXkTTk11jjnYEA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.



For more options, visit https://groups.google.com/d/optout.


-- 

<img src="
https://ci3.googleusercontent.com/proxy/a_UFhwHkn_1-r78vYCHjmB12ryot0bY5WWMX5kXIaLF28rBlLQfIDVBKuShy_4q9dui8rTtIYfJakyYgy5WkoFrsI-sK_YsaGMsvOgyCuoCVgbC5JXtEGjoCz2xjrIROpNyudrK86lNLV8SQ16Y1bVMWA90pUA=s0-d-e1-ft#https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-ash3/1397644_10151776789302986_608293640_o.jpg
">

Tel - +46 76245 92 90 (Sweden)

LinkedIn: http://www.linkedin.com/pub/ben-hearn/50/a64/33b

-- 
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 [email protected].
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
<https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkWw64YMKAN1LPM3L%3D%3D%3Dg-33YrkzeBWFeam93PY_A_n5cw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
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
[email protected].

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
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0i%3D6C_P%2BLTzw9GkMLgQZrE1OgAkMSYG41mzAqRr%2B5FSQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.


For more options, visit https://groups.google.com/d/optout.



-- 

<img src="
https://ci3.googleusercontent.com/proxy/a_UFhwHkn_1-r78vYCHjmB12ryot0bY5WWMX5kXIaLF28rBlLQfIDVBKuShy_4q9dui8rTtIYfJakyYgy5WkoFrsI-sK_YsaGMsvOgyCuoCVgbC5JXtEGjoCz2xjrIROpNyudrK86lNLV8SQ16Y1bVMWA90pUA=s0-d-e1-ft#https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-ash3/1397644_10151776789302986_608293640_o.jpg
">

Tel - +46 76245 92 90 (Sweden)

LinkedIn: http://www.linkedin.com/pub/ben-hearn/50/a64/33b

-- 
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkVh2y5Qeay%2B%3DeENgYn9mtHHjMWRrzi7prdg_2OrwTGDUg%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkVh2y5Qeay%2B%3DeENgYn9mtHHjMWRrzi7prdg_2OrwTGDUg%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
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
[email protected].


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
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2w%3Dz0RxVpCKNbTfcwafP-RKvJN1frmkf5G%2BFgs8L_UYw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.



For more options, visit https://groups.google.com/d/optout.


-- 

<img src="
https://ci3.googleusercontent.com/proxy/a_UFhwHkn_1-r78vYCHjmB12ryot0bY5WWMX5kXIaLF28rBlLQfIDVBKuShy_4q9dui8rTtIYfJakyYgy5WkoFrsI-sK_YsaGMsvOgyCuoCVgbC5JXtEGjoCz2xjrIROpNyudrK86lNLV8SQ16Y1bVMWA90pUA=s0-d-e1-ft#https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-ash3/1397644_10151776789302986_608293640_o.jpg
">

Tel - +46 76245 92 90 (Sweden)

LinkedIn: http://www.linkedin.com/pub/ben-hearn/50/a64/33b

-- 
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 [email protected].
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
<https://groups.google.com/d/msgid/python_inside_maya/CAM2ybkW38wuD0N%2Bru6%3DFzQEoarxmPGJKd%3D9mq8SixAm4-Lg%2Bqg%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
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.

Reply via email to