Script thing

There’s a Swami-script I use from time to time called “Make Sign”. It creates a plane with the same dimensions as a bitmap that you select and applys a material with that bitmap to the plane.

I was wondering if it would be possible to modify the script so that the material it creates is a VRay material.

Here’s the script:

macroScript MakeSign
    category: “Uplate Stuff”
    internalCategory: “Uplate Stuff”
    buttonText: “Make Sign”
(

fn makeSign bm =
(
    rName =getFilenameFile bm.filename
    m =standard name:rName diffuseMap:(bmt=bitmaptex bitmap:bm)
    showTextureMap m m.diffuseMap true
    meditMaterials[1]=m
    r =rectangle \
                name: rName \
                length: bm.height \
                width: bm.width \
                material: m \
                isSelected: true
    addModifier r (uvwmap())
)

bm=selectBitMap()
if bm!=undefined then makeSign bm

)-- end macroScript.

I tried changing the word “standard” to “VRayMtl”, but I got an error. Is it possible to make this work?

Thanks.

m =standard name:rName diffuseMap:(bmt=bitmaptex bitmap:bm)

to

m = vraymtl name:rName diffuseMap:(bmt=bitmaptex bitmap:bm)

should work.. dunno

Thanks, but like I said, I tried that.

The error message I get is: Unknown property: “diffuseMap” in (material name):VRayMtl

---------------------Cut-here

fn makeSign bm =
(
rName =getFilenameFile bm.filename
m = vraymtl name:rName texmap_diffuse:(bmt=bitmaptex bitmap:bm)
showTextureMap m m.texmap_diffuse true
meditMaterials[1]=m
r =rectangle \
name: rName \
length: bm.height \
width: bm.width \
material: m \
isSelected: true
addModifier r (uvwmap())
)

bm=selectBitMap()
if bm!=undefined then makeSign bm

-------------------------------end-cut

Thanks!

After putting )-- end macroScript. at the end it works great!

uh.. forgot the different map namings ..sorry!