Previously this was working fine, now after the latest 3dsmax2024 updates I cannot assign a variable a glTFMaterial(). For example this will crash any script that uses the glTFMaterial():
Solved! Go to Solution.
Solved by denisT.MaxDoctor. Go to Solution.
For those testing this, it works only the first time its evaluated. Put the button on the toolbar and restart 3dsmax and try again, it will fail
@jmdvella wrote:Previously this was working fine, now after the latest 3dsmax2024 updates I cannot assign a variable a glTFMaterial(). For example this will crash any script that uses the glTFMaterial():
macroScript GLBTesttooltip:""buttonText:""(newMat = glTFMaterial()show newMat)How is this fixable? If I run the command when its not in a macro it works just fine.
do
(
if iskindof (gltf_mat = execute "glTFMaterial") Material do
(
newmat = gltf_mat()
show newmat
)
)
instead.
At the time the macro was loaded, the glTFMaterial class had not yet been defined.
Thank you Denis!
Why does this work differently than every other current material?
Every other material type works like this including StandardMaterial (legacy), Physical Material, VrayMtl, CoronaMtl, etc
@jmdvella wrote:Why does this work differently than every other current material?
Every other material type works like this including StandardMaterial (legacy), Physical Material, VrayMtl, CoronaMtl, etc
... different order of loading plugins. Some additional classes or third-party dlls may be loaded after all built-in ones.
Can't find what you're looking for? Ask the community or share your knowledge.