I’m having an issue in MaxScript whereby the first time I try to modify for get the value of a property in a DirectX_Shader material using MaxScript, it will kick back an error to the effect of “Unknown property—”
So if I had something like this:
currentMaterial =
dxProps = getPropNames currentMaterial.DirectX_Shader
for dxProp in dxProps do
(
evalString = "currentMaterial.DirectX_Shader." + dxProp
execute(evalString)
)
The first time I evaluate the code, “execute(evalString)” would raise an exception. Every subsequent time I evaluate the code, no exception is raised until I reboot 3DS Max.
Has anyone else encountered this before and know a workaround or solution?
I’d also like to know if anyone knows of a better way of looping over all properties in a DirectX_Shader in this fashion without using the execute command.