Creating a transform with multiple shared parents

602 views
Skip to first unread message

notanymike

unread,
Apr 24, 2011, 9:14:34 PM4/24/11
to python_inside_maya
Hi, I'm trying to come with some sort of transform node that can have
multiple transform matrices influencing it's own translate,rotate,and
scale attributes, but still allows for control, animation, and
preservation of the user-intended position of that transform.
Basically it's a space-switching/dynamic parenting transform.I have
two ideas for what attributes to create on the transform: Either have
a compound message attributes or compound matrix attributes that the
user can add or delete, with an enable and/or weight attribute for
each added parent. The only two parts I'm stuck on is how to write out
"when the enable and/or weight attribute is changed, recompute the
transforms position" in python, and how to re-compute the transform's
final position after parents have been added/removed from the compound
attribute. Does anyone have time to help me on this? I'm brand new to
python, but I'm starting to understand the syntax. It's structure I
have to learn somehow...

Shawn Patapoff

unread,
Apr 26, 2011, 12:54:40 PM4/26/11
to python_in...@googlegroups.com
Doesn't a parent constraint do all this all ready for you?


Animatix

unread,
Apr 26, 2011, 3:43:52 PM4/26/11
to python_inside_maya
It sounds like he is talking about a parent constraint with mulitple
offsets firing at a particular frame, do that sound right?

On Apr 26, 9:54 am, Shawn Patapoff <spatap...@bluecastlegames.com>
wrote:
> Doesn't a parent constraint do all this all ready for you?
>

notanymike

unread,
Apr 28, 2011, 6:41:53 PM4/28/11
to python_inside_maya
Well parent constraints would work but I'd need to know how to get
past namespace issues to get it working properly. What I need is a
node for setting up space-switching without jumping for a character's
already broken hierarchy that eliminates the need for mel scripts to
do the same job since they easily break once the rig that script is
intended for has all it's node name strings changed when the rig is
referenced (a common practice at my school).

John Patrick

unread,
Apr 29, 2011, 12:24:45 AM4/29/11
to python_in...@googlegroups.com
I think you'll find the changing node name pattern quite frequently. Space switching is still usually implemented as a script though, from my experience.

One trick is to tag special space switching nodes with some attr, and find them with your script by listing nodes with that attr. Then trace connections to find the other relevant nodes to the switch.

node names are always subject to change, but attribute names are pretty reliable.

I can try and give you a better example when I'm in front of a computer, but maybe those ideas will get you started

-jp

Sent from my iPhone

> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Judah Baron

unread,
Apr 29, 2011, 4:19:52 AM4/29/11
to python_in...@googlegroups.com
It sounds like your scripts need to be addressed, in that case.
Referencing isn't just common practice at your school, it's also a
ubiquitous and necessary practice in the industry. Working with
namespaces is just one of the hazards of this work.

-Judah

On Apr 28, 2011, at 3:41 PM, notanymike <notan...@gmail.com> wrote:

stephenkmann

unread,
Apr 29, 2011, 7:58:40 AM4/29/11
to python_in...@googlegroups.com
except that you don't have to use name spaces to reference...

They did do some updates that speed up some things with referencing
using name spacing but in the end its pretty much the same.
-s

--
Sent from my mobile device

Geordie Martinez

unread,
Apr 29, 2011, 11:33:25 AM4/29/11
to python_in...@googlegroups.com, python_in...@googlegroups.com
Have you tried applying the space switching to the original rig before it gets referenced? Then when it is in the shot it can pass its long name to your script.

notanymike

unread,
Apr 30, 2011, 11:22:03 PM4/30/11
to python_inside_maya
I hadn't known that attributes can be passed through the `ls` command.
However that trick only works when only one instance of the character
is in the scene. I know there is a way to do it with mel because the
morpheus rig can be referenced multiple times and still all of it's
scriptNodes work, so there must be some way to query that....

A plugin still feels like it would be more solid, though...

On Apr 29, 8:33 am, Geordie Martinez <geordiemarti...@gmail.com>
wrote:
> Have you tried applying the space switching to the original rig before it gets referenced? Then when it is in the shot it can pass its long name to your script.
>
> On Apr 29, 2011, at 4:58 AM, stephenkmann <stephenkm...@gmail.com> wrote:
>
>
>
>
>
>
>
> > except that you don't have to use name spaces to reference...
>
> > They did do some updates that speed up some things with referencing
> > using name spacing but in the end its pretty much the same.
> > -s
>
> > On 4/29/11, Judah Baron <judah.ba...@gmail.com> wrote:
> >> It sounds like your scripts need to be addressed, in that case.
> >> Referencing isn't just common practice at your school, it's also a
> >> ubiquitous and necessary practice in the industry. Working with
> >> namespaces is just one of the hazards of this work.
>
> >> -Judah
>
Reply all
Reply to author
Forward
0 new messages