Hi everyone,
I'm currently in Maya, trying to create my custom node inside MtoA so I can deal with internal Arnold's nodes.
I have a very simple node network in my maya session, it is basically 2 nodes, one is a aiMaterialX node and the other one is ai StandIn Arnold node. The first one is the one that describe a more complex shader that coming from another scene with a more complex node network (a shader basically).
So now, what I would like to do is replicate the aiSetParameter behaviour but with some sort of multiple selection, for instance:
I've got two nodes inside the materialX like a aiColorCorrect and a aiImage and I would change the aiColorCorrect.multiply and aiImage.offset without creating two aiSetParameter.
Ideally the node I would create will send those two parameters to the materialX node operator just plug-in my custom node/operator to it.
Any idea about how to set this kind of things?
I already have some knowledges about how to create a translator for MtoA/Arnold and I was trying, in a first attempt, to get the same thing of a aiSetParameter just setting (hardcoding) some attributes in this way:
void MyCustomNode::Export(AtNode* node) { // Selection AiNodeSetStr(node, "selection", "/NG_beauty_skin/aiColorCorrect5"); // Assignments AtArray *assignmentsArray = AiArrayAllocate(2, 1, AI_TYPE_STRING); AiArraySetStr(assignmentsArray, 0, "/NG_beauty_skin/aiColorCorrect5 float gamma=8.0"); AiArraySetStr(assignmentsArray, 1, "/NG_beauty_skin/aiColorCorrect5 rgb add=[0.0 0.3 1.0]"); AiNodeSetArray(node, "assignment", assignmentsArray); }
but I just encounter a problem after this, and basically I cannot able to get the same array in the selection part of the code.
Any thoughts?
Thank you so much in advance.
Fabio