PDA

View Full Version : get connections infos


X-Tender
03-16-2003, 07:32 PM
ho .. i want to make an if() sequnce by ask i f an object is connected with an other .. eg.

if test_file5.outColor is connected with test_lambert3.color

so .. how i get the conectiosn from a material or SG ..

thanx

bigfatMELon
03-16-2003, 08:35 PM
if you want to see if there is anything downstream from a node at a specific attribute:

string $thingsDownStream[] = `connectionInfo -dfs "thisNode.attribute"`;

if (size($thingsDownStream) != 0){
do stuff;
}

With this method you are collecting the data that you will likely need later (the array of connected nodes) and at the same time creating a value that you can measure (the size of the array).

To look up stream:

string $thingUpStream = `connectionInfo -sfd "thisNode.attribute"`;

The the flag changes to -sfd and the data type is a string rather than string[] because only one node can result.

-jl

X-Tender
03-16-2003, 10:30 PM
Hey... thats great .. thanx .. :bounce:

X-Tender
03-24-2003, 04:56 PM
i dont wnat to open a new thread .. so i post it here .. how can i change the render quality of the maya render .. spezial the anti aliasing ..

tymznd
03-24-2003, 10:14 PM
There's probably an easier way..... but if you "echo all" commands in the script editor you do see setting calls as you change them:

i.e.

setAttr defaultRenderQuality.shadingSamples 2;updateRenderQuality;
RGsetEdgeQuality;

X-Tender
03-24-2003, 10:44 PM
hmm .. i try it that way .. but i only get

RGsetDefaultQuality;
and
RGsetEdgeQuality;

dwalden74
03-25-2003, 09:19 AM
i want to make an if() sequnce by ask i f an object is connected with an other .

Hi guys-

I do this all the time and one really useful command is `isConnected`, which returns true or false whether the two objattrs are connected or not.

:beer:
David

alexx
03-25-2003, 10:21 AM
defaultRenderGlobals
is the one you are looking for and for AA settings defaultRenderQuality

cheers

alexx

X-Tender
03-25-2003, 10:37 AM
yeah sure .. so was so far that i get it .. but how i get and set the defaultquality?

alexx
03-25-2003, 12:01 PM
check the node (!) (no mel command)
renderQuality in the manuals..
there are all the attributes listed you will need

cheers

alexx

X-Tender
03-25-2003, 04:29 PM
:surprised: i cant find it .. which page? --- or where in the online document?

alexx
03-25-2003, 04:43 PM
in 4.5:

F1
reference->nodes and attributes
name
r
renderQuality

cheers

alexx

X-Tender
03-25-2003, 05:02 PM
You did it Dude! ... You did it!.. :thumbsup: :beer:

CGTalk Moderation
01-14-2006, 05:00 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.