Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to access material node parameters other than textures (RGB Multiply...)?

2 REPLIES 2
Reply
Message 1 of 3
vidar.rinne
496 Views, 2 Replies

How to access material node parameters other than textures (RGB Multiply...)?

Hello,

We are currently looking into supporting additional texture nodes for Max standard material such as RGB Multiply, Tint and those nodes.

 

We are able to identify nodes and textures with Texmap, GetSubTexmap ,BMTEX_CLASS_ID, GNORMAL_CLASS_ID, RGBMULT_CLASS_ID and so on. But how do we get access to the rest of the node properties, such as color and blend modes inside these nodes?

 

For DX shaders many years ago we had to move over to param block traversal to be able to read and write properties, is this the way to go or are there other API calls to fetch color and bool values from a node?

 

Language: C++

Max version: Max 2020 and earlier

Labels (1)
2 REPLIES 2
Message 2 of 3

what is the problem? you should understand that all mxs methods are by MAX SDK, so see:

 

 

t = RGB_Multiply()

showproperties t

getpropnames t

for k=1 to t.numsubs collect getsubanimname t k

 

 

 

and, of course, we can always ask the paramblock (s) of the object about the parameters ...

Message 3 of 3

Thanks!

 

I was just hoping for a simpler method of fetching data. We are not really interested in third party nodes so an interface for each node would've been great. We managed to solve it by traversing param blocks similar to our previous solution for dx shaders, and having the parameter fetching as a templated function minimizes the code so I guess that is fine for now.

 

Printing the properties using MaxScript seems like a good idea, to be able to see the property names and types beforehand.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report