su37
09-02-2011, 12:58 PM
Help
I write a simple script,but the script can Correctly run ,
a messge " Unknown property: "color" in undefined"
The script:
------------------------------------------------------------
(
global theColor
fn yansegj = (
if selection.count == 1 do
(
if (classof $.material == Standardmaterial) or (classof $.material == Vraymtl)
do (theColor.color = $.material.diffuse)
))
rollout change_wirecolor "Object Color Changer"
(
global theColor
colorpicker theColor "Wireframe color:" color:[0,0,255]
on theColor changed new_col do $.material.diffuse = new_col
on change_wirecolor open do ( registerRedrawViewsCallback yansegj ))
createDialog change_wirecolor --modal:true
)
------------------------------------------------------------
I write a simple script,but the script can Correctly run ,
a messge " Unknown property: "color" in undefined"
The script:
------------------------------------------------------------
(
global theColor
fn yansegj = (
if selection.count == 1 do
(
if (classof $.material == Standardmaterial) or (classof $.material == Vraymtl)
do (theColor.color = $.material.diffuse)
))
rollout change_wirecolor "Object Color Changer"
(
global theColor
colorpicker theColor "Wireframe color:" color:[0,0,255]
on theColor changed new_col do $.material.diffuse = new_col
on change_wirecolor open do ( registerRedrawViewsCallback yansegj ))
createDialog change_wirecolor --modal:true
)
------------------------------------------------------------
