Re: Softimage Python versus Maya Python

2014-07-09 Thread Raffaele Fragapane
py API v2 is actually pretty robust, and it certainly is fast.
It doesn't miss a lot actually, contrary to what goes around, at least in
terms of what you can do with it. What it does distinctly lack is a pass of
hand crafted love.

Most of it, if not its entirety, seems to be a SWIG wrapper built solely
from the headers with the only tweaks being pruning what couldn't quite
translate. What that results into is python that reads like crippled C++,
because the API faces that kind of interface without pythonic additions,
and on top of that C++ "only" features such as overloaded methods are not
implemented, leaving you with more type handling than in Python than you
would do in C++.

pyMEL is a mix of hand crafted wrappers around different bits and bobs, and
it shows, as it tries (and mostly manages) to wrap the lot in a "pythonic"
way.

If you are comfortable with it and can complete a task with it and read the
code a week later there is no reason to not use the OM modules, it won't
magically crap itself on you one day, the only real downside to it is
simply that you end up writing this weird bastardized code in many cases.
Some people can stomach it, personally I'd rather write in C++ right away
if I'm not going to get python's advantages out of using it.

That's true for the "guts" part of the client, and certainly for the DG.
The DAG and scene item management side of things is generally quite painful
in Maya, and while the OM modules have mostly everything, pyMEL will read
better.
The UI side of things you will be pretty much dealing with an only slightly
smelly Qt all the time, so that's pretty good by any standard really, and
probably better in Python than in C++ anyway.

All in all all it is is that it's painful and could be much less so with a
little additional work, not that it's not functional or too incomplete.


On Thu, Jul 10, 2014 at 12:35 AM, Mike Donovan 
wrote:

>  Hey Guys,
>
>
>
> I too am moving from Softimage’s Python API to Maya’s python API … its
> seems pretty robust so far. Love that PySide is built in.
>
>
>
> I am wondering if you need to use PyMel … or if you can access everything
> directly through an object model API with Python. I am about to convert a
> lot of our tools this week.
>
>
>
> Also .. I would recommend checking out the Charcoal editor … its really
> sweet and has auto-completion for much of the api.
>
>
>
> M
>
>
>
>
>


RE: Softimage Python versus Maya Python

2014-07-09 Thread Matt Lind
The problem isn't creating an arbitrary UI, I can do that with Win32, MFC, or 
even C++ QT.  The issue is getting that UI to send/receive notifications with 
the host application to tap into their event hooks.

Matt





-Original Message-
From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Yi Liang Siew
Sent: Wednesday, July 09, 2014 11:38 AM
To: softimage@listproc.autodesk.com
Subject: Re: Softimage Python versus Maya Python

PyQt all the UIs!!!

(And then despair when your colleagues are like, "how i install pyqt to maya" 
when you need to deploy it :P ) On 7/9/2014 10:41 AM, Matt Lind wrote:
> I was going to suggest the same.  I dabbled around not too long ago with MEL, 
> Python, and C++, and C++ seems the most straightforward as you can talk 
> directly to the API whereas the other two require you go through layers of 
> bloat and indirection.  The unfortunate part of using C++ is you still have 
> to rely on scripting for UI elements.
>
>
> Matt
>
>




Re: Softimage Python versus Maya Python

2014-07-09 Thread Yi Liang Siew

PyQt all the UIs!!!

(And then despair when your colleagues are like, "how i install pyqt to 
maya" when you need to deploy it :P )

On 7/9/2014 10:41 AM, Matt Lind wrote:

I was going to suggest the same.  I dabbled around not too long ago with MEL, 
Python, and C++, and C++ seems the most straightforward as you can talk 
directly to the API whereas the other two require you go through layers of 
bloat and indirection.  The unfortunate part of using C++ is you still have to 
rely on scripting for UI elements.


Matt






RE: Softimage Python versus Maya Python

2014-07-09 Thread Matt Lind
I was going to suggest the same.  I dabbled around not too long ago with MEL, 
Python, and C++, and C++ seems the most straightforward as you can talk 
directly to the API whereas the other two require you go through layers of 
bloat and indirection.  The unfortunate part of using C++ is you still have to 
rely on scripting for UI elements.


Matt



-Original Message-
From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Yi Liang Siew
Sent: Wednesday, July 09, 2014 8:41 AM
To: softimage@listproc.autodesk.com
Subject: Re: Softimage Python versus Maya Python

I dunno about everyone else, but I actually really like PyCharm a lot these 
days (went from NPP to Sublime to PyCharm). Being able to debug Python scripts 
is super helpful in Maya/XSI :) (haven't gotten around to trying to connect it 
with Nuke as well yet hehe)

I don't really like PyMEL that much, I only use it when I need quick access to 
vector math functions etcNow that I'm more familiar with 
C++, I have to say the advice of everyone here to go ahead and 'do it in 
C++' from the get-go is a lot less painful overall than dealing with all
the SWIG-stuff that I would have to go through when using PyMEL or OpenMaya. :D



Re: Softimage Python versus Maya Python

2014-07-09 Thread Tim Crowson
I would also recommend reading through this thread on the 
Python-Inside-Maya Google Group:


https://groups.google.com/forum/#!topic/python_inside_maya/jb0lD8SXk_M 



Lots of good info there.

-Tim

On 7/9/2014 10:40 AM, Yi Liang Siew wrote:
I dunno about everyone else, but I actually really like PyCharm a lot 
these days (went from NPP to Sublime to PyCharm). Being able to debug 
Python scripts is super helpful in Maya/XSI :) (haven't gotten around 
to trying to connect it with Nuke as well yet hehe)


I don't really like PyMEL that much, I only use it when I need quick 
access to vector math functions etcNow that I'm more familiar with 
C++, I have to say the advice of everyone here to go ahead and 'do it 
in C++' from the get-go is a lot less painful overall than dealing 
with all the SWIG-stuff that I would have to go through when using 
PyMEL or OpenMaya. :D


--
Signature




Re: Softimage Python versus Maya Python

2014-07-09 Thread Yi Liang Siew
I dunno about everyone else, but I actually really like PyCharm a lot 
these days (went from NPP to Sublime to PyCharm). Being able to debug 
Python scripts is super helpful in Maya/XSI :) (haven't gotten around to 
trying to connect it with Nuke as well yet hehe)


I don't really like PyMEL that much, I only use it when I need quick 
access to vector math functions etcNow that I'm more familiar with 
C++, I have to say the advice of everyone here to go ahead and 'do it in 
C++' from the get-go is a lot less painful overall than dealing with all 
the SWIG-stuff that I would have to go through when using PyMEL or 
OpenMaya. :D


RE: Re: Softimage Python versus Maya Python

2014-07-09 Thread Mike Donovan
Thanks guys,

Saved me a lot of frustration ! I had sorted my email by conversation and did 
not realized I was responding to an ancient thread … lol ! Helped me anyway. =)

M

From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Leo Quensel
Sent: Wednesday, July 09, 2014 10:53 AM
To: softimage@listproc.autodesk.com
Subject: Aw: Re: Softimage Python versus Maya Python

I too would recommend relying on PyMel for non-performance related tasks (and 
even for some of those). The only time I found myself
using the OpenMaya API was when setting Vertex Colors (similar to Eric's 
envelope weights). We are still on 2012 and the API v2 is completely
unusable, don't know how much has changed over the years.

Leo
Gesendet: Mittwoch, 09. Juli 2014 um 16:41 Uhr
Von: "Eric Thivierge" mailto:ethivie...@hybride.com>>
An: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com>
Betreff: Re: Softimage Python versus Maya Python
The OpenMaya API is pretty crippled and missing tons of stuff from what
I've read, seen, and worked with. It's a lot of bloated code to just
get to objects you want. As Raf mentioned before though some things
need to be run through it for performance sake. Getting and setting
envelope weights for example. For the majority of the stuff I'm doing
in Maya for tools and scripts it's PyMel.

Eric T.

On Wednesday, July 09, 2014 10:35:05 AM, Mike Donovan wrote:
> Hey Guys,
>
> I too am moving from Softimage’s Python API to Maya’s python API … its
> seems pretty robust so far. Love that PySide is built in.
>
> I am wondering if you need to use PyMel … or if you can access
> everything directly through an object model API with Python. I am
> about to convert a lot of our tools this week.
>
> Also .. I would recommend checking out the Charcoal editor … its
> really sweet and has auto-completion for much of the api.
>
> M
>
> *From:*softimage-boun...@listproc.autodesk.com
> [mailto:softimage-boun...@listproc.autodesk.com] *On Behalf Of *Siew
> Yi Liang
> *Sent:* Monday, May 05, 2014 12:10 PM
> *To:* softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com>
> *Subject:* Re: Softimage Python versus Maya Python
>
> Hi Hirazi:
>
> It doesn't talk about PyMEL, and yes it's super-old, and it's written
> in a very non-pythonic manner, but it's still a good resouce imho.
>
> Still, for what it is (and its price) it's about the most
> comprehensive beginner's intro guide to working with Maya (and some
> API stuff as well!) that I know of for now. :D
>
> If you prefer video tutorials, Chad Vernon's stuff on CGCircuit is
> pretty nice, and he has some basic stuff on his site, too:
> http://www.chadvernon.com/blog/resources/python-scripting-for-maya-artists/python-in-maya/
>
> HTH!
>
> Yours sincerely,
> Siew Yi Liang
>
> On 5/5/2014 8:47 AM, Leendert A. Hartog wrote:
>
> Thanks for the kind offer, I'm afraid I'm going to have to take
> you up on that... ;)
>
> On the CGTalk the book you mention was said to be somewhat outdated,
> which I cannot really judge for myself, lacking the necessary Maya
> experience,
> they advised me to wait for "Practical Maya Programming with
> Python" by Robert Galanakis
> but looking at the website of the publisher it is somewhat of a
> mystery when it will actually be released.
> And I am terrible at waiting... :D
>
> Greetz
> Leendert
>
>
> 
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> 



This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk



Aw: Re: Softimage Python versus Maya Python

2014-07-09 Thread Leo Quensel

I too would recommend relying on PyMel for non-performance related tasks (and even for some of those). The only time I found myself

using the OpenMaya API was when setting Vertex Colors (similar to Eric's envelope weights). We are still on 2012 and the API v2 is completely

unusable, don't know how much has changed over the years.

 

Leo



Gesendet: Mittwoch, 09. Juli 2014 um 16:41 Uhr
Von: "Eric Thivierge" 
An: softimage@listproc.autodesk.com
Betreff: Re: Softimage Python versus Maya Python

The OpenMaya API is pretty crippled and missing tons of stuff from what
I've read, seen, and worked with. It's a lot of bloated code to just
get to objects you want. As Raf mentioned before though some things
need to be run through it for performance sake. Getting and setting
envelope weights for example. For the majority of the stuff I'm doing
in Maya for tools and scripts it's PyMel.

Eric T.

On Wednesday, July 09, 2014 10:35:05 AM, Mike Donovan wrote:
> Hey Guys,
>
> I too am moving from Softimage’s Python API to Maya’s python API … its
> seems pretty robust so far. Love that PySide is built in.
>
> I am wondering if you need to use PyMel … or if you can access
> everything directly through an object model API with Python. I am
> about to convert a lot of our tools this week.
>
> Also .. I would recommend checking out the Charcoal editor … its
> really sweet and has auto-completion for much of the api.
>
> M
>
> *From:*softimage-boun...@listproc.autodesk.com
> [mailto:softimage-boun...@listproc.autodesk.com] *On Behalf Of *Siew
> Yi Liang
> *Sent:* Monday, May 05, 2014 12:10 PM
> *To:* softimage@listproc.autodesk.com
> *Subject:* Re: Softimage Python versus Maya Python
>
> Hi Hirazi:
>
> It doesn't talk about PyMEL, and yes it's super-old, and it's written
> in a very non-pythonic manner, but it's still a good resouce imho.
>
> Still, for what it is (and its price) it's about the most
> comprehensive beginner's intro guide to working with Maya (and some
> API stuff as well!) that I know of for now. :D
>
> If you prefer video tutorials, Chad Vernon's stuff on CGCircuit is
> pretty nice, and he has some basic stuff on his site, too:
> http://www.chadvernon.com/blog/resources/python-scripting-for-maya-artists/python-in-maya/
>
> HTH!
>
> Yours sincerely,
> Siew Yi Liang
>
> On 5/5/2014 8:47 AM, Leendert A. Hartog wrote:
>
> Thanks for the kind offer, I'm afraid I'm going to have to take
> you up on that... ;)
>
> On the CGTalk the book you mention was said to be somewhat outdated,
> which I cannot really judge for myself, lacking the necessary Maya
> experience,
> they advised me to wait for "Practical Maya Programming with
> Python" by Robert Galanakis
> but looking at the website of the publisher it is somewhat of a
> mystery when it will actually be released.
> And I am terrible at waiting... :D
>
> Greetz
> Leendert
>
>
> 
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> 
 





Re: Softimage Python versus Maya Python

2014-07-09 Thread Eric Thivierge
The OpenMaya API is pretty crippled and missing tons of stuff from what 
I've read, seen, and worked with. It's a lot of bloated code to just 
get to objects you want. As Raf mentioned before though some things 
need to be run through it for performance sake. Getting and setting 
envelope weights for example. For the majority of the stuff I'm doing 
in Maya for tools and scripts it's PyMel.


Eric T.

On Wednesday, July 09, 2014 10:35:05 AM, Mike Donovan wrote:

Hey Guys,

I too am moving from Softimage’s Python API to Maya’s python API … its
seems pretty robust so far. Love that PySide is built in.

I am wondering if you need to use PyMel … or if you can access
everything directly through an object model API with Python. I am
about to convert a lot of our tools this week.

Also .. I would recommend checking out the Charcoal editor … its
really sweet and has auto-completion for much of the api.

M

*From:*softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] *On Behalf Of *Siew
Yi Liang
*Sent:* Monday, May 05, 2014 12:10 PM
*To:* softimage@listproc.autodesk.com
*Subject:* Re: Softimage Python versus Maya Python

Hi Hirazi:

It doesn't talk about PyMEL, and yes it's super-old, and it's written
in a very non-pythonic manner, but it's still a good resouce imho.

Still, for what it is (and its price) it's about the most
comprehensive beginner's intro guide to working with Maya (and some
API stuff as well!) that I know of for now.  :D

If you prefer video tutorials, Chad Vernon's stuff on CGCircuit is
pretty nice, and he has some basic stuff on his site, too:
http://www.chadvernon.com/blog/resources/python-scripting-for-maya-artists/python-in-maya/

HTH!

Yours sincerely,
Siew Yi Liang

On 5/5/2014 8:47 AM, Leendert A. Hartog wrote:

Thanks for the kind offer, I'm afraid I'm going to have to take
you up on that... ;)

On the CGTalk the book you mention was said to be somewhat outdated,
which I cannot really judge for myself, lacking the necessary Maya
experience,
they advised me to wait for "Practical Maya Programming with
Python" by Robert Galanakis
but looking at the website of the publisher it is somewhat of a
mystery when it will actually be released.
And I am terrible at waiting... :D

Greetz
Leendert



This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk





RE: Softimage Python versus Maya Python

2014-07-09 Thread Mike Donovan
Hey Guys,

I too am moving from Softimage's Python API to Maya's python API ... its seems 
pretty robust so far. Love that PySide is built in.

I am wondering if you need to use PyMel ... or if you can access everything 
directly through an object model API with Python. I am about to convert a lot 
of our tools this week.

Also .. I would recommend checking out the Charcoal editor ... its really sweet 
and has auto-completion for much of the api.

M




From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Siew Yi Liang
Sent: Monday, May 05, 2014 12:10 PM
To: softimage@listproc.autodesk.com
Subject: Re: Softimage Python versus Maya Python

Hi Hirazi:

It doesn't talk about PyMEL, and yes it's super-old, and it's written in a very 
non-pythonic manner, but it's still a good resouce imho.

Still, for what it is (and its price) it's about the most comprehensive 
beginner's intro guide to working with Maya (and some API stuff as well!) that 
I know of for now.  :D

If you prefer video tutorials, Chad Vernon's stuff on CGCircuit is pretty nice, 
and he has some basic stuff on his site, too:
http://www.chadvernon.com/blog/resources/python-scripting-for-maya-artists/python-in-maya/

HTH!


Yours sincerely,

Siew Yi Liang
On 5/5/2014 8:47 AM, Leendert A. Hartog wrote:
Thanks for the kind offer, I'm afraid I'm going to have to take you up on 
that... ;)

On the CGTalk the book you mention was said to be somewhat outdated,
which I cannot really judge for myself, lacking the necessary Maya experience,
they advised me to wait for "Practical Maya Programming with Python" by Robert 
Galanakis
but looking at the website of the publisher it is somewhat of a mystery when it 
will actually be released.
And I am terrible at waiting... :D

Greetz
Leendert



This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk


Re: Softimage Python versus Maya Python

2014-05-07 Thread Raffaele Fragapane
I got word from both the publisher and the author.
Apparently Galakanis had to go through a relocation and some work shuffling
towards the end of the editing process, and that delayed matters.
I'm told that's settled and the book is practically wrapped, and everybody
swears in front of God and Man that it will be out by end of May, or early
June at the latest.

Just reporting, I have no stakes in it and can offer no guarantee of the
above :)


On Tue, May 6, 2014 at 1:47 AM, Leendert A. Hartog wrote:

> Thanks for the kind offer, I'm afraid I'm going to have to take you up on
> that... ;)
>
> On the CGTalk the book you mention was said to be somewhat outdated,
> which I cannot really judge for myself, lacking the necessary Maya
> experience,
> they advised me to wait for "Practical Maya Programming with Python" by
> Robert Galanakis
> but looking at the website of the publisher it is somewhat of a mystery
> when it will actually be released.
> And I am terrible at waiting... :D
>
>
> Greetz
> Leendert
>
> --
>
> Leendert A. Hartog AKA Hirazi Blue
> Administrator NOT the owner of si-community.com
>
>


-- 
Our users will know fear and cower before our software! Ship it! Ship it
and let them flee like the dogs they are!


Re: Softimage Python versus Maya Python

2014-05-07 Thread Leendert A. Hartog

@Raffaele Fragapane – That indeed clears thing up quite a bit.
As a side-note: I am fully aware of the limitations/quirks of the way 
Softimage implemented Python, but as I hardly ever use Python outside of 
Softimage,
its shortcomings do not bother me that much , as so far it's “all” the 
Python I know.
And as my main programming language in the 80s and 90s has been Forth, 
I’m still reeling from the fact that it doesn’t use RPN… ;)


@Christopher Crouzet – Although I am pretty sure, this will be way too 
technical for me, I’d definitely be interested.


--

Leendert A. Hartog AKA Hirazi Blue
Administrator NOT the owner of si-community.com




Re: Softimage Python versus Maya Python

2014-05-06 Thread Christopher Crouzet
Back to when I had to work on Maya 2010 and that PyMEL wasn't shipped with
it, I banned the idea to deal with the Python command layer (the port of
MEL to Python) and decided to work exclusively with the Maya Python API.
It's been a painful experience and—as probably everyone using it—I ended up
writing a lot of routines to fill-in the gaps.

I did this using a well-known technique called monkey patching. It can be
quite hackish, dangerous and even evil depending on how it's being used but
I've intensively made use of it in a few productions and it's been quite
helpful for me. It should be seen as a last resort kind of thing though, if
no better alternatives are available.

I've started to write an article some times ago that mainly focuses on a
convenient way to implement the monkey patching technique for the Maya
Python API. If you guys are interested, I'll share the link over here when
it'll be online.



On 6 May 2014 19:42, Raffaele Fragapane  wrote:

> Your beloved Softimage scripting experience won't be coming back. It's not
> all downsides, but Maya just works very differently. In some cases it's
> superior, in some cases it's even more pleasant to deal with (Qt), and in
> some others it's so dreadful you'll just be better off using the C++ API
> even if performance wasn't a concern.
>
> In Soft, for better or for worse, the entire API was passing COM objects
> around towards the scripting side of things. On Top of that, the general
> layout of the application, the scene, and the various accessors lent itself
> very well to Pythonic styles.
>
> In Maya you do have several options.
> You can import mel commands, which is largely a legacy thing but some
> times still needed, which was the first implementation offered back then.
> It's OK if you miss something somewhere (there are some dark corners of
> Maya where only MEL can go still, places where innocence dies) and have to
> absolutely get there, or have to quickly convert some MEL script to Python
> with little time to do it.
>
> You have pymel, which was originally a private initiative by some VFX
> shops (tempted to say Luma started it originally), which is a wrap that's
> intended to "feel" pythonic in how it divides and offers modules, and does
> a decent enough job of it, this was later bought and offered by Autodesk.
> It's not bad for pipeline-y scripts actually, but performance can swing a
> lot.
>
> And lastly you have OpenMaya, which I think gets referred to as the Python
> API these days, which is now up to v2.
> OpenMaya is a 1:1 binding of the C++ API, which IMO is by far the
> strongest and better engineered of various things in Maya. The good news is
> that that makes it relatively fast and gives it access to a considerable
> extent of Maya's guts. The bad news is that the wrapper being a largely
> automated job derived from headers it has limitations and requires you
> constantly deal with very, very type specific methods and constructors,
> which usually leads to Python code that vastly surpasses the line count of
> the same in C++, not to mention is simply not meant to be written or read
> like that.
> In some cases it gets to the point where I don't even bother doing proto
> work in Python, and just straight away pick up a template and start writing
> a step further than that in C++, because it's just too damn noodly to have
> any of the benefits of doing a sketch.
>
> Lastly, you have pyQt (or pySide, the distinction as a user is almost
> academic), which is the framework a great deal of Maya's UI work and a
> handful of other things, and that works quite well at several different
> levels of depth. On that I agree with Luc-Eric.
> I also agree with Luc-Eric on the availability of more and better
> examples, especially in the advanced topics, but there's also a lot more
> crud to sift through. All in all though it's rare I can't find at all what
> I need if I look for it hard enough.
>
> Hopefully that clears it up in terms of what the options are.
> As for what your scripting experience will be, you have to bear in mind
> Maya and XSI do things very, very differently.
> I have a deep dislike for the mantra "all software are the same it's just
> a matter of finding what the button is named". It's total and utter
> bullshit if you do anything more than pushing buttons :p
>
> Some things are better in one app, some in the other, but in general be
> ready to write A LOT more code when it comes to Maya. It has a very...
> "diverse" approach to many things, often scattered and specialized in
> inscrutable ways. Some things that are trivialities or have obvious
> feedback when operated in XSI will have crawling over walls and spewing
> like the child from the Exorcist movie.
> There are good days when I don't have to roam in the dark areas, and
> writing/porting some nodes is an enjoyable experience. Other days I have to
> call IT for a new monitor.
>
>
>
>
> On Wed, May 7, 2014 at 12:35 AM, Leendert A. Hartog wrote:
>
>> See what y

Re: Softimage Python versus Maya Python

2014-05-06 Thread Raffaele Fragapane
Your beloved Softimage scripting experience won't be coming back. It's not
all downsides, but Maya just works very differently. In some cases it's
superior, in some cases it's even more pleasant to deal with (Qt), and in
some others it's so dreadful you'll just be better off using the C++ API
even if performance wasn't a concern.

In Soft, for better or for worse, the entire API was passing COM objects
around towards the scripting side of things. On Top of that, the general
layout of the application, the scene, and the various accessors lent itself
very well to Pythonic styles.

In Maya you do have several options.
You can import mel commands, which is largely a legacy thing but some times
still needed, which was the first implementation offered back then. It's OK
if you miss something somewhere (there are some dark corners of Maya where
only MEL can go still, places where innocence dies) and have to absolutely
get there, or have to quickly convert some MEL script to Python with little
time to do it.

You have pymel, which was originally a private initiative by some VFX shops
(tempted to say Luma started it originally), which is a wrap that's
intended to "feel" pythonic in how it divides and offers modules, and does
a decent enough job of it, this was later bought and offered by Autodesk.
It's not bad for pipeline-y scripts actually, but performance can swing a
lot.

And lastly you have OpenMaya, which I think gets referred to as the Python
API these days, which is now up to v2.
OpenMaya is a 1:1 binding of the C++ API, which IMO is by far the strongest
and better engineered of various things in Maya. The good news is that that
makes it relatively fast and gives it access to a considerable extent of
Maya's guts. The bad news is that the wrapper being a largely automated job
derived from headers it has limitations and requires you constantly deal
with very, very type specific methods and constructors, which usually leads
to Python code that vastly surpasses the line count of the same in C++, not
to mention is simply not meant to be written or read like that.
In some cases it gets to the point where I don't even bother doing proto
work in Python, and just straight away pick up a template and start writing
a step further than that in C++, because it's just too damn noodly to have
any of the benefits of doing a sketch.

Lastly, you have pyQt (or pySide, the distinction as a user is almost
academic), which is the framework a great deal of Maya's UI work and a
handful of other things, and that works quite well at several different
levels of depth. On that I agree with Luc-Eric.
I also agree with Luc-Eric on the availability of more and better examples,
especially in the advanced topics, but there's also a lot more crud to sift
through. All in all though it's rare I can't find at all what I need if I
look for it hard enough.

Hopefully that clears it up in terms of what the options are.
As for what your scripting experience will be, you have to bear in mind
Maya and XSI do things very, very differently.
I have a deep dislike for the mantra "all software are the same it's just a
matter of finding what the button is named". It's total and utter bullshit
if you do anything more than pushing buttons :p

Some things are better in one app, some in the other, but in general be
ready to write A LOT more code when it comes to Maya. It has a very...
"diverse" approach to many things, often scattered and specialized in
inscrutable ways. Some things that are trivialities or have obvious
feedback when operated in XSI will have crawling over walls and spewing
like the child from the Exorcist movie.
There are good days when I don't have to roam in the dark areas, and
writing/porting some nodes is an enjoyable experience. Other days I have to
call IT for a new monitor.




On Wed, May 7, 2014 at 12:35 AM, Leendert A. Hartog wrote:

> See what you did there? You confused me needlessly. ;)
> From all of this I gather there is an original Python implementation,
> PyMEL and Maya Python 2.0.
> And some comments seem to imply none of them are any good...
> So where to actually start, if this is more of less true?
> What comes closest to our "beloved" Softimage Python scripting experience?
>
>
> Greetz
> Leendert
>
> --
>
> Leendert A. Hartog AKA Hirazi Blue
> Administrator NOT the owner of si-community.com
>
>


-- 
Our users will know fear and cower before our software! Ship it! Ship it
and let them flee like the dogs they are!


Re: Softimage Python versus Maya Python

2014-05-06 Thread Leendert A. Hartog

Stuff to think about. Thanks.

Greetz
Leendert

PS Although I do love a book in my hands, call me old-fashioned that 
way... ;)


--

Leendert A. Hartog AKA Hirazi Blue
Administrator NOT the owner of si-community.com



Re: Softimage Python versus Maya Python

2014-05-06 Thread Luc-Eric Rousseau
Depends on what type work Leendert plans to do.  Personally I'm quite
happy with it for crafting scripts and bulding UI either with commands
or Qt.  I did hit a a few walls where a C++ API wasn't wrapped and
eventually couldn't be called at al - it was doing an image conversion
with MImage in my case.  Something I wouldn't have thought to attempt
in XSI anyway (there is no such API).

I'm a little skeptical of a python book on the subject - I've always
been disappointed by them.  Python is python.  Mel is mel, Qt(Pyside)
is Qt.  the Maya C++ API is the Maya C++ Api.  You have to learn what
you need when you need it - and ignore the rest.  Books waste a lot of
time getting you started and installed, it's always 300 of pages of
beginnings.  Unlike Softimage, there isn't this whole world of the COM
layer and collections conversions.  And if you need to google for
example.. there are a hundred more times information out there.  Plus
all the source that ships with the app.

On Mon, May 5, 2014 at 7:13 PM, Raffaele Fragapane
 wrote:
> Python in Maya is generally a good deal faster, at least through OpenMaya.
> That's largely due to the fact that it's a fairly 1:1 wrap (SWIG on headers
> I believe) of the C++ API.
> Sadly, you pay a price for that in how you have to write it, which is a
> crapload of explicitly typed work that clashes with pythonic style a lot,
> and you do bump into an unholy amount of unimplemented methods that really,
> really should have been offered.


Re: Softimage Python versus Maya Python

2014-05-06 Thread Leendert A. Hartog

See what you did there? You confused me needlessly. ;)
From all of this I gather there is an original Python implementation, 
PyMEL and Maya Python 2.0.

And some comments seem to imply none of them are any good...
So where to actually start, if this is more of less true?
What comes closest to our "beloved" Softimage Python scripting experience?

Greetz
Leendert

--

Leendert A. Hartog AKA Hirazi Blue
Administrator NOT the owner of si-community.com



RE: Softimage Python versus Maya Python

2014-05-06 Thread Raffaele Fragapane
That's what I refer to with open Maya 2.
It's about as pythonic as writing Haskell on punch cards :)
On 6 May 2014 23:16, "Marc-Andre Belzile" 
wrote:

> There is also Maya Python 2.0 which is more pythonic than v1.0. However,
> the class set in v2.0 is not as exhaustive in v1.0.
>
> -mab
>
> From: softimage-boun...@listproc.autodesk.com [mailto:
> softimage-boun...@listproc.autodesk.com] On Behalf Of Raffaele Fragapane
> Sent: Monday, May 05, 2014 8:42 PM
> To: softimage@listproc.autodesk.com
> Subject: Re: Softimage Python versus Maya Python
>
> Yeah, I can agree with pretty much all of it.
> It's a shame, because coverage and performance are very good, but the fact
> there is no hand crafting of a higher thin layer makes it horrendously
> clunky.
>
> With just a little bit of additional effort it could actually be very
> suitable for a lot more than it is suitable for now, but there doesn't seem
> to be a lot of interest in improving and extending the bindings, which
> ironically leaves the Python wrapper less friendly to read and operate than
> the C++ equivalent.
>
> I think I officially hit breaking point a few weeks ago at the hundredth
> (literally) time in what should have been a simple script I had to
> explicitly cast and recast across multiple variables the same damn data,
> and then handle every-single-F'ing-instance of a return explicitly.
> God forbid various adaptive set and get methods and constructors that work
> perfectly in C++ are wrapped, you can only use the explicitly type handling
> ones instead in Python, which makes any upstream change of a type combined
> with Python's eco system an absolute nightmare.
>
> If you're mostly doing pipe work that's far enough removed from the scene
> data and the DG, or has only minimal and simple interaction, you're mostly
> OK though.
> On Tue, May 6, 2014 at 9:12 AM, Serguei Kalentchouk <
> serguei.kalentch...@gmail.com<mailto:serguei.kalentch...@gmail.com>>
> wrote:
> That certainly holds true if you intend to do any plugin development.
> For all the pipeline / glew / build code you will still need to operate
> within Maya Python unfortunately.
> Otherwise the Python implementation in Maya is very straight forward but
> you have to make your piece with the fact that it is not OOP (not
> considering PyMel).
> So without any custom involvement on your end it's basically just
> functional programming with logs of string manipulation.
> On the bright side Maya's command module is pretty substantial in terms of
> its breadth and depth so you have little limitations in terms of what you
> can do.
> If you want to get back some OOP sanity then you're welcome to try PyMel
> although it has it's own issues and quirks.
> I've ended up writing my own wrapper that covers 90% of my use cases.
>
>


RE: Softimage Python versus Maya Python

2014-05-06 Thread Marc-Andre Belzile
There is also Maya Python 2.0 which is more pythonic than v1.0. However, the 
class set in v2.0 is not as exhaustive in v1.0.

-mab

From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Raffaele Fragapane
Sent: Monday, May 05, 2014 8:42 PM
To: softimage@listproc.autodesk.com
Subject: Re: Softimage Python versus Maya Python

Yeah, I can agree with pretty much all of it.
It's a shame, because coverage and performance are very good, but the fact 
there is no hand crafting of a higher thin layer makes it horrendously clunky.

With just a little bit of additional effort it could actually be very suitable 
for a lot more than it is suitable for now, but there doesn't seem to be a lot 
of interest in improving and extending the bindings, which ironically leaves 
the Python wrapper less friendly to read and operate than the C++ equivalent.

I think I officially hit breaking point a few weeks ago at the hundredth 
(literally) time in what should have been a simple script I had to explicitly 
cast and recast across multiple variables the same damn data, and then handle 
every-single-F'ing-instance of a return explicitly.
God forbid various adaptive set and get methods and constructors that work 
perfectly in C++ are wrapped, you can only use the explicitly type handling 
ones instead in Python, which makes any upstream change of a type combined with 
Python's eco system an absolute nightmare.

If you're mostly doing pipe work that's far enough removed from the scene data 
and the DG, or has only minimal and simple interaction, you're mostly OK though.
On Tue, May 6, 2014 at 9:12 AM, Serguei Kalentchouk 
mailto:serguei.kalentch...@gmail.com>> wrote:
That certainly holds true if you intend to do any plugin development.
For all the pipeline / glew / build code you will still need to operate within 
Maya Python unfortunately.
Otherwise the Python implementation in Maya is very straight forward but you 
have to make your piece with the fact that it is not OOP (not considering 
PyMel).
So without any custom involvement on your end it's basically just functional 
programming with logs of string manipulation.
On the bright side Maya's command module is pretty substantial in terms of its 
breadth and depth so you have little limitations in terms of what you can do.
If you want to get back some OOP sanity then you're welcome to try PyMel 
although it has it's own issues and quirks.
I've ended up writing my own wrapper that covers 90% of my use cases.

<>

Re: Softimage Python versus Maya Python

2014-05-05 Thread Raffaele Fragapane
Yeah, I can agree with pretty much all of it.
It's a shame, because coverage and performance are very good, but the fact
there is no hand crafting of a higher thin layer makes it horrendously
clunky.

With just a little bit of additional effort it could actually be very
suitable for a lot more than it is suitable for now, but there doesn't seem
to be a lot of interest in improving and extending the bindings, which
ironically leaves the Python wrapper less friendly to read and operate than
the C++ equivalent.

I think I officially hit breaking point a few weeks ago at the hundredth
(literally) time in what should have been a simple script I had to
explicitly cast and recast across multiple variables the same damn data,
and then handle every-single-F'ing-instance of a return explicitly.
God forbid various adaptive set and get methods and constructors that work
perfectly in C++ are wrapped, you can only use the explicitly type handling
ones instead in Python, which makes any upstream change of a type combined
with Python's eco system an absolute nightmare.

If you're mostly doing pipe work that's far enough removed from the scene
data and the DG, or has only minimal and simple interaction, you're mostly
OK though.

On Tue, May 6, 2014 at 9:12 AM, Serguei Kalentchouk <
serguei.kalentch...@gmail.com> wrote:

> That certainly holds true if you intend to do any plugin development.
> For all the pipeline / glew / build code you will still need to operate
> within Maya Python unfortunately.
>
> Otherwise the Python implementation in Maya is very straight forward but
> you have to make your piece with the fact that it is not OOP (not
> considering PyMel).
> So without any custom involvement on your end it's basically just
> functional programming with logs of string manipulation.
> On the bright side Maya's command module is pretty substantial in terms of
> its breadth and depth so you have little limitations in terms of what you
> can do.
>
> If you want to get back some OOP sanity then you're welcome to try PyMel
> although it has it's own issues and quirks.
> I've ended up writing my own wrapper that covers 90% of my use cases.
>
>


Re: Softimage Python versus Maya Python

2014-05-05 Thread Raffaele Fragapane
Python in Maya is generally a good deal faster, at least through OpenMaya.
That's largely due to the fact that it's a fairly 1:1 wrap (SWIG on headers
I believe) of the C++ API.
Sadly, you pay a price for that in how you have to write it, which is a
crapload of explicitly typed work that clashes with pythonic style a lot,
and you do bump into an unholy amount of unimplemented methods that really,
really should have been offered.


On Tue, May 6, 2014 at 9:04 AM, Cesar Saez  wrote:

> I totally agree, when it comes to custom nodes just skip python, but for
> general purposes pymel is not that bad (actually python seems way faster on
> maya than in softimage).
>
> On Mon, May 5, 2014 at 6:41 PM, Raffaele Fragapane <
> raffsxsil...@googlemail.com> wrote:
>
>> My personal recommendation when it comes to Python and Maya is to learn
>> C++. I wish I was kidding.
>>
>


-- 
Our users will know fear and cower before our software! Ship it! Ship it
and let them flee like the dogs they are!


Re: Softimage Python versus Maya Python

2014-05-05 Thread Serguei Kalentchouk
That certainly holds true if you intend to do any plugin development.
For all the pipeline / glew / build code you will still need to operate
within Maya Python unfortunately.

Otherwise the Python implementation in Maya is very straight forward but
you have to make your piece with the fact that it is not OOP (not
considering PyMel).
So without any custom involvement on your end it's basically just
functional programming with logs of string manipulation.
On the bright side Maya's command module is pretty substantial in terms of
its breadth and depth so you have little limitations in terms of what you
can do.

If you want to get back some OOP sanity then you're welcome to try PyMel
although it has it's own issues and quirks.
I've ended up writing my own wrapper that covers 90% of my use cases.

On Mon, May 5, 2014 at 3:41 PM, Raffaele Fragapane <
raffsxsil...@googlemail.com> wrote:

> My personal recommendation when it comes to Python and Maya is to learn
> C++. I wish I was kidding.
>
>
-- 
Technical Director @ DreamWorks Animation


Re: Softimage Python versus Maya Python

2014-05-05 Thread Cesar Saez
I totally agree, when it comes to custom nodes just skip python, but for
general purposes pymel is not that bad (actually python seems way faster on
maya than in softimage).

On Mon, May 5, 2014 at 6:41 PM, Raffaele Fragapane <
raffsxsil...@googlemail.com> wrote:

> My personal recommendation when it comes to Python and Maya is to learn
> C++. I wish I was kidding.
>


Re: Softimage Python versus Maya Python

2014-05-05 Thread Raffaele Fragapane
My personal recommendation when it comes to Python and Maya is to learn
C++. I wish I was kidding.


On Mon, May 5, 2014 at 10:46 PM, Leendert A. Hartog wrote:

> Is there any good tutorial on Maya Python from a Softimage Python
> perspective?
> The pitfalls, the gotchas, that sort of thing...
>
> Greetz
> Leendert
>
> --
>
> Leendert A. Hartog AKA Hirazi Blue
> Administrator NOT the owner of si-community.com
>
>


-- 
Our users will know fear and cower before our software! Ship it! Ship it
and let them flee like the dogs they are!


Re: Softimage Python versus Maya Python

2014-05-05 Thread Leendert A. Hartog

I think you've got me convinced. I'll be ordering the book soon. Thanks.

--

Leendert A. Hartog AKA Hirazi Blue
Administrator NOT the owner of si-community.com



Re: Softimage Python versus Maya Python

2014-05-05 Thread Siew Yi Liang

Hi Hirazi:

It doesn't talk about PyMEL, and yes it's super-old, and it's written in 
a very non-pythonic manner, but it's still a good resouce imho.


Still, for what it is (and its price) it's about the most comprehensive 
beginner's intro guide to working with Maya (and some API stuff as 
well!) that I know of for now. :D


If you prefer video tutorials, Chad Vernon's stuff on CGCircuit is 
pretty nice, and he has some basic stuff on his site, too:

http://www.chadvernon.com/blog/resources/python-scripting-for-maya-artists/python-in-maya/

HTH!

Yours sincerely,
Siew Yi Liang

On 5/5/2014 8:47 AM, Leendert A. Hartog wrote:
Thanks for the kind offer, I'm afraid I'm going to have to take you up 
on that... ;)


On the CGTalk the book you mention was said to be somewhat outdated,
which I cannot really judge for myself, lacking the necessary Maya 
experience,
they advised me to wait for "Practical Maya Programming with Python" 
by Robert Galanakis
but looking at the website of the publisher it is somewhat of a 
mystery when it will actually be released.

And I am terrible at waiting... :D

Greetz
Leendert





Re: Softimage Python versus Maya Python

2014-05-05 Thread Leendert A. Hartog
Thanks for the kind offer, I'm afraid I'm going to have to take you up 
on that... ;)


On the CGTalk the book you mention was said to be somewhat outdated,
which I cannot really judge for myself, lacking the necessary Maya 
experience,
they advised me to wait for "Practical Maya Programming with Python" by 
Robert Galanakis
but looking at the website of the publisher it is somewhat of a mystery 
when it will actually be released.

And I am terrible at waiting... :D

Greetz
Leendert

--

Leendert A. Hartog AKA Hirazi Blue
Administrator NOT the owner of si-community.com



Re: Softimage Python versus Maya Python

2014-05-05 Thread Siew Yi Liang

Hi Hirazi:

http://www.amazon.com/Maya-Python-Games-Film-Reference/dp/0123785782

It's not really from a "XSI perspective", but it's the most useful 
resource I have among all the Maya python tutorials I've come across so 
far. But most people I think will advise switching to PyMEL these days.


If you've got any specific questions I could try to answer them as well, 
like command equivalents, how-I-do-specific-thing etc. (and I'm sure 
there are tons of people here smarter than me anyway in both DCCs who 
would be happy to help out too!) I started learning with Maya for python 
first before XSI, so I guess I would be considered a heretic :P


Yours sincerely,
Siew Yi Liang

On 5/5/2014 5:46 AM, Leendert A. Hartog wrote:
Is there any good tutorial on Maya Python from a Softimage Python 
perspective?

The pitfalls, the gotchas, that sort of thing...

Greetz
Leendert