naming with add_single VRayDisplacement ? (mel)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  02 February 2013
naming with add_single VRayDisplacement ? (mel)

Hi all! Im currently writing a script that adds vraydisplacement nodes and attributes to selected object, but i cant find any way of naming the node you get with :
vray objectProperties add_single VRayDisplacement;

the -n argument doesnt seem to work. Any idea if there is any other way of naming it?

i suppose i could search through all the objects in the scene and just filter the result, feed the node into an array an put that through a for-loop, but in scenes with gazillions of objects that wouldnt be practical....
  02 February 2013
Since the vray procedure ain't kind enough to return the name of the newly created object you can, for example, trace the output connections of your source object after the vray procedure:

$objs = `ls -sl`;
 vray objectProperties add_single VRayDisplacement;
 print `listConnections -s 0 -d 1 -type VRayDisplacement ($objs[0]+".instObjGroups")`;
..aut inveniam viam aut faciam..
::Copy SOP 4 Maya::
  02 February 2013
Thanks, worked like a charm! too bad Vray wasn't much help tough.
  02 February 2013
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 05:35 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.