Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Node parameter values with API

2 ANTWORTEN 2
GELÖST
Antworten
Nachricht 1 von 3
cvnc
250 Aufrufe, 2 Antworten

Node parameter values with API

I am wanting to loop through all of the parameters on certain nodes in a .ass file so I can build a name:value pair, but I'm having trouble understanding the best approach to doing this.

 

I'm currently using the Parameter Reader methods to query the values but this means I need to check the type up front and call the correct method. This doesn't feel like the best way from seeing the available API methods but I'm not sure how to go about it any other way. 

 

Looping through the light nodes and iterating over the parameters for each light I'm able to get the name with AiParamGetName but I am clearly missing something obvious here to get the value!

2 ANTWORTEN 2
Nachricht 2 von 3
Stephen.Blair
als Antwort auf: cvnc

AiNodeEntryGetParamIterator is exactly what you need. You can traverse the node entry to get the AtParamEntry for each parameter, and using this AtParamEntry you can query the default value (same for all nodes of a given type), or the current value for a specific node, using AiNodeGet**.

You do need to know the type to call the right AiNodeGet
 


// Stephen Blair
// Arnold Renderer Support
Nachricht 3 von 3
cvnc
als Antwort auf: cvnc

Oh right in that case I am going down the right path and thanks for the confirm on that Stephen. Sounds like I may be a little used to python holding my hand with every step :grinsendes_Gesicht_mit_Schweißperlen:

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report