Notifications
Clear all

[Closed] Max SDK – Get Arch & Design parameters

Does anyone know how to (or have any code samples) get parameters from an Arch & Design material in the Max SDK?

I can’t even find in the docs how to get a pointer to the main material.

2 Replies

I think (and hope) that you will find the procedure to get any material parameters here:
http://forums.cgsociety.org/showthread.php?f=98&t=1074731

Thanks so much! I was able to use the info in that post to get me going in the right direction. I got some other help from the Autodesk Area site that gave some simple code for seeing all the parameters in a parameter block while being aware that parameter ID’s are not necessarily the same as their index in the paramblock.

// loop through all of the Parameter Blocks (There's prob only one)
for (int p = 0; p < Mat.NumParamBlocks; p++)
{

// The ParamBlock stores all the parameters for the material
IIParamBlock2 PB = Mat.GetParamBlockByID((short)p);
 
// loop through all of its parameters
for (int d = 0; d < PB.NumParams; d++)
{
// Property ID's are not nessisarily the same as thier index
short PID = PB.IndextoID(d);
// The ParamDef stores info about the Parameter
IParamDef PDef = PB.GetParamDef(PID);
string ThisPropName = PDef.IntName;
...