[Maya-Python] Transform showing up as Shape, or vice versa

42 views
Skip to first unread message

Marcus Ottosson

unread,
Dec 13, 2018, 7:54:57 AM12/13/18
to python_in...@googlegroups.com
Hi all,

The various Maya constraints, like parentConstraint, is funny in that it shows up as a transform child in the Outliner, but as a shape in the channel box.

That's really useful in that (a) they appear in the channelbox when selecting the parent and (b) can be selected in the outliner and deleted like any other transform node.

I'd like to try and replicate that for some of my custom shape nodes (inheriting MPxLocatorNode). Any idea of where to start looking for something like that? I'd imagine it'd be a flag of sorts, but more likely it's out of reach for anything coming out of the API. :(

Best,
Marcus

Tim Fowler

unread,
Dec 13, 2018, 9:33:19 AM12/13/18
to python_in...@googlegroups.com
The Channel Box specifically looks for Shapes and Constraints so you'd have to look at something derived from MPxConstraint.  I don't know of any flag that can override that behaviour.

--
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/CAFRtmOC_jMCAYYfmN1iccu%3DtKOgPzVg8yZdza%2B0jck0g9G-MJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Marcus Ottosson

unread,
Dec 13, 2018, 12:29:47 PM12/13/18
to python_in...@googlegroups.com
Ah that is interesting, thanks for the insight. Will have a look at whether I can inherit from MPxConstraint!

Marcus Ottosson

unread,
Dec 13, 2018, 12:31:07 PM12/13/18
to python_in...@googlegroups.com
Alas, MPxConstraints seems to be off-limits (a.k.a. not in the Python 2.0 API).. :(

Tim Fowler

unread,
Dec 13, 2018, 1:31:36 PM12/13/18
to python_in...@googlegroups.com
So you can't use it because it's not in the Python 2.0 API?  

Lucky for me I have access to the Maya source :-)  so I honestly don't actually have to do much through the public API, but out of interest why can't you use it?

I'm not on the team that deals with the API much so I actually don't know the answer to this, hope this isn't too stupid a question!

-Tim

Marcus Ottosson

unread,
Dec 13, 2018, 3:53:36 PM12/13/18
to python_in...@googlegroups.com

Lucky for me I have access to the Maya source :-)

Oh my, that’s effectively having access to the source code of my reality.

So you can’t use it because it’s not in the Python 2.0 API?

For this particular task, that’s right; if it isn’t in the Python 2.0 API, in Maya 2015-2018 then it may as well not exist. It’s for a third-party plug-in with no compiled parts.


--
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.
Reply all
Reply to author
Forward
0 new messages