PDA

View Full Version : Impoting Changes name space and kills my expression


acc9340
01-30-2008, 12:42 AM
I wrote an expression to govern various aspects of scene a.
The expression calls certain channels by precise name like ball.translateX.

Scene a gets imported into scene b. and the naming space gets changed. Th expression stops working.

Is there a way to have the expression grab the new naming scheme and append it to the relevant parts of the script? If so how? If you know, could you please show an example of mel code. I am stumped.

Thanks as always,

ACC

BenBarker
01-30-2008, 04:25 AM
The name space getting changed is odd, you may want to check your import settings, and make sure you are not using prefixing, and are appending a unique namespace to everything being imported.

I've seen expressions break when importing because of names changing when NOT using namespaces. The only way around it I know of is to make attribute connections between your nodes and query those inside the expression, instead of referencing the objects by name directly. Something like a message attribute would do.
So instead of:

sphere1.tx

you would have

connections[] = `listConnections expressionNode.messageAttribute`
mySphere = connections[0]

Pretty sloppy.

acc9340
01-30-2008, 04:18 PM
Well, I'll give it a try. Sloppy is fine, so long as it works.

Will post back if it works.

Cheers,

ACC

acc9340
01-30-2008, 04:23 PM
Well, I just tried re-importing it into a new file, the name space changed and yet the expression is functioning fine... so now I am stumped by inconsistency.

If the problem creeps up again I'll continue to try.

Cheers,

ACC

CGTalk Moderation
01-30-2008, 04:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.