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 CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2013   #1
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....
 
Old 02 February 2013   #2
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::
 
Old 02 February 2013   #3
Thanks, worked like a charm! too bad Vray wasn't much help tough.
 
Old 02 February 2013   #4
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 12:50 AM.


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