Announcement

Collapse
No announcement yet.

Script thing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 diffuseMapbmt=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.
    - Geoff

  • #2
    m =standard name:rName diffuseMapbmt=bitmaptex bitmap:bm)

    to

    m = vraymtl name:rName diffuseMapbmt=bitmaptex bitmap:bm)


    should work.. dunno
    www.cgtechniques.com | http://www.hdrlabs.com - home of hdri knowledge

    Comment


    • #3
      Thanks, but like I said, I tried that.

      The error message I get is: Unknown property: "diffuseMap" in (material name):VRayMtl
      - Geoff

      Comment


      • #4
        ---------------------Cut-here

        fn makeSign bm =
        (
        rName =getFilenameFile bm.filename
        m = vraymtl name:rName texmap_diffusebmt=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
        Dave Buchhofer. // Vsaiwrk

        Comment


        • #5
          Thanks!

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

          Comment


          • #6
            uh.. forgot the different map namings ..sorry!
            www.cgtechniques.com | http://www.hdrlabs.com - home of hdri knowledge

            Comment

            Working...
            X