grabjacket
05-12-2009, 01:04 PM
Hi,
I'm porting a few material plugins from max 2008 to max 2010 and run into a problem I didn't have before. In general: the material plugin doens't work anymore in max 2010. To be specific: whenever I create the material I don't see any element of the scripted material plugin-interface (which can cause a few startup errors). If I then click on another material-slot and click back to the material I've just created, everything's fine.
I've added a plugin here which illustrates the problem.
Evaluate the code
Create the new material (test material 3) from the material/map browser
The interface is empty now
Click on another material slot
Click back on the new test material
The interface is visible
Could someone help me solve this problem? The issue for me isn't so much the interface but in my real plugin, some of the code depends on the interface being there. So whenever i create such a material, max throws me an error.
The test plugin:
plugin material TestInterface3
name:"Test Interface 3"
classID:#(0x3222c2bd, 0xc5394f0)
extends:Standard
replaceUI:true
(
parameters main rollout:params
(
mtlCurrent type:#material ui:mtlBtn
)
rollout params "Material test"
(
label lbl "This message is part of the scripted interface"
materialbutton mtlBtn "material button"
on params open do
(
delegate.name = "a standard material"
mtlCurrent = delegate --if you disable this line, the interface appears when you make a new material
)
)
)
I'm porting a few material plugins from max 2008 to max 2010 and run into a problem I didn't have before. In general: the material plugin doens't work anymore in max 2010. To be specific: whenever I create the material I don't see any element of the scripted material plugin-interface (which can cause a few startup errors). If I then click on another material-slot and click back to the material I've just created, everything's fine.
I've added a plugin here which illustrates the problem.
Evaluate the code
Create the new material (test material 3) from the material/map browser
The interface is empty now
Click on another material slot
Click back on the new test material
The interface is visible
Could someone help me solve this problem? The issue for me isn't so much the interface but in my real plugin, some of the code depends on the interface being there. So whenever i create such a material, max throws me an error.
The test plugin:
plugin material TestInterface3
name:"Test Interface 3"
classID:#(0x3222c2bd, 0xc5394f0)
extends:Standard
replaceUI:true
(
parameters main rollout:params
(
mtlCurrent type:#material ui:mtlBtn
)
rollout params "Material test"
(
label lbl "This message is part of the scripted interface"
materialbutton mtlBtn "material button"
on params open do
(
delegate.name = "a standard material"
mtlCurrent = delegate --if you disable this line, the interface appears when you make a new material
)
)
)
