problem in making a material plug in
hello all!
im new to scripting...
recently i was making a script for v-ray car paint
but on compiling ... the material dont appear on material slot... :(
heres... it
plugin material V_shader
name:"V-style shader"
classid:#(0x4a8b48c4, 0xe2b2078)
extends:standard replaceui:true
(
rollout harami "V-style shader main parameters"
(
group "Main parametes"
(
colorpicker car_col "paint color"
colorpicker ref_col "reflection amount"
)
)
parameters main rollout:harami
(
color type:#color default:[151,151,151] ui:car_col
color1 type:#color ui:ref_col
)
on create do
(
delegate = shellac()
delegate.shellacmtl1 = vraymtl()
delegate.shellacmtl1.name = "base"
delegate.shellacmtl1.texmap_diffuse = rgb_tint()
delegate.shellacmtl1.texmap_diffuse.red = [0,0,0]
delegate.shellacmtl1.texmap_diffuse.green = [0,0,0]
delegate.shellacmtl1.texmap_diffuse.blue = [0,0,0]
body_color = delegate.shellacmtl1.texmap_diffuse.map1 = output()
delegate.shellacmtl1.texmap_diffuse.map1.map1enabled = on
delegate.shellacmtl1.texmap_reflection = falloff()
middle_reflection = delegate.shellacmtl1.texmap_reflection.color1 = [0,0,0]
outer_reflection = delegate.shellacmtl1.texmap_reflection.color1 = [255,255,255]
delegate.shellacmtl1.texmap_reflection.type = 2
delegate.shellacmtl1.texmap_reflectionglossiness = falloff()
specular = delegate.shellacmtl1.texmap_reflectionglossiness.color1 = [255,255,255]
outer_reflection = delegate.shellacmtl1.texmap_reflectionglossiness.color2 = [0,0,0]
delegate.shellacmtl2 = vraymtl()
delegate.shellacmtl2.texmap_diffuse = rgb_tint()
delegate.shellacmtl2.texmap_diffuse.red = [151,151,151]
delegate.shellacmtl2.texmap_diffuse.green = [0,0,0]
delegate.shellacmtl2.texmap_diffuse.blue = [0,0,0]
--delegate.shellacmtl2.texmap_diffuse.map1.map1enabled = on
paint_color = delegate.shellacmtl2.texmap_diffuse.map1 = output()
slight_reflection = delegate.shellacmtl2.reflection = [255,255,255]
delegate.shellacmtl2.reflection_fresnel = on
delegate.shellaccolorblend = 100
)
)
and on selecting the material... theres no change in the material slot :(
see the pic
http://www.imagebam.com/image/0d1ab424080168
thankyou in advance.
Comments
emm... what is the correct
emm... what is the correct syntax for calling a material other than standard material via material plugin...
sorry for my bad english.
emmm? ... is my script
emmm? ...
is my script allright?
Dumb response but it doesn't
Dumb response but it doesn't appear you have that material applied to anything in the scene...
nope. its not visible in
nope. its not visible in render too.
the script runs fine on standard material...
i mean... if we use the following code...
on create do
(
delegate = standard()
)
instead of "delegate = vraymtl()"
everything works fine ....
--- this script was an inspiration frm following tutorial.
http://www.cgcookie.com/articles/2008/11/22/custom-scripted-shader-in-3d...
Is it visible on the object
Is it visible on the object when you render?