arcburn
03-03-2009, 08:17 PM
Hey guys,
I have a problem with trying to control the diffuse color of an object with a custom attribute.
This script works correctly until I save the resulting max file. When I reopen the file the custom attribute is no longer connected to the diffuse.
Anyone have any ideas?
sphere()
$sphere01.material = standardmaterial()
ca = attributes colorControls
(
parameters params rollout:LBR
(
LA1 type:#color ui:LA1SP
)
rollout LBR "diffuse controls"
(
colorpicker LA1SP "" fieldwidth:25 height:25 --pos:[5,30]
)
)
select $sphere01
modPanel.addModToSelection (EmptyModifier ()) ui:on
custattributes.add $sphere01.modifiers[1] ca
paramWire.connect2way $sphere01.material[#Shader_Basic_Parameters][#Diffuse_Color] $sphere01.modifiers[#Attribute_Holder].colorControls[#LA1] "LA1" "Diffuse_Color"
I have a problem with trying to control the diffuse color of an object with a custom attribute.
This script works correctly until I save the resulting max file. When I reopen the file the custom attribute is no longer connected to the diffuse.
Anyone have any ideas?
sphere()
$sphere01.material = standardmaterial()
ca = attributes colorControls
(
parameters params rollout:LBR
(
LA1 type:#color ui:LA1SP
)
rollout LBR "diffuse controls"
(
colorpicker LA1SP "" fieldwidth:25 height:25 --pos:[5,30]
)
)
select $sphere01
modPanel.addModToSelection (EmptyModifier ()) ui:on
custattributes.add $sphere01.modifiers[1] ca
paramWire.connect2way $sphere01.material[#Shader_Basic_Parameters][#Diffuse_Color] $sphere01.modifiers[#Attribute_Holder].colorControls[#LA1] "LA1" "Diffuse_Color"
