Announcement

Collapse
No announcement yet.

scripting question

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

  • scripting question

    I'm trying to write a script to automate a sequence of steps that our artists often do, and I can't figure out what commands correspond to the following steps (done via dialogs):

    (1) Open the material editor, and select a specific material.

    (2) Click the "M" next to "Reflection" to dispay the texture editor.

    (3) Set the Type dropdown to "Bitmap".

    (4) Click the "M" by "File" (in the Bitmap group), and select a bitmap.

    (5) Click Appply.

    I was hoping for a "SetMaterialreflectionTextureBitmap" command or some such, but see nothing like that.

    Any idea how I can modify a material in this way via a script?

    - Rich Wells

  • #2
    Re: scripting question

    Sorry, but you can't do any of those things. There are very limited material controls available via scripting. There were just too many variables and too much complexity to get this done for the first go around. I'm not sure how this will evolve for the next version, but the hope is that as much becomes available to scripters as possible.
    Damien Alomar<br />Generally Cool Dude

    Comment


    • #3
      Re: scripting question

      Originally posted by dalomar
      Sorry, but you can't do any of those things. [...] I'm not sure how this will evolve for the next version, but the hope is that as much becomes available to scripters as possible.
      Bummer. We have a few thousand files to process, and we really don't want to do these steps manually.

      Is there any timeframe for the next version? Could I put in a request to get this functionality added to the set of scriptable features?

      Alternatively, is there any way we can edit a vismat file directly (I'm a C/C++ guy, so it would be easy for me to do), or is the file format proprietary? If it is proprietary, would it be possible for us to sign an NDA and get that information? (We would, of course, accept the risk that the format would change in future versions.)

      Thanks,

      - Rich Wells

      Comment


      • #4
        Re: scripting question

        Currently there is no timeframe for the next full release. The feature request is definitely there, but I'm just not sure exactly where this fits into the development schedule at the moment. Even if they don't get in there, there will be some options for material adjustment via scripting in the next version, although it will be in a round about way.

        The materials (and options) for the next version will all be saved in XML format, so batching a couple thousand materials isn't that big of a deal. I'm not sure about the current file format details. I do know its a bit of a mess, and there really isn't any documentation for it. Let me ask around and see what's possible though.
        Damien Alomar<br />Generally Cool Dude

        Comment


        • #5
          Re: scripting question

          I found a work-around that I think appears to work.

          I renamed one of my texture bitmaps to "ReflectionTexture.jpg" and incorporated that into my material, which I then exported as a .vismat file. Now, for each file I want to process, I copy the appropriate .jpg file to ReflectionTexture.jpg, open the file, import the .vismat file, and render.

          As long as the .vismat file has no way of detecting that the .jpg it's pointing to was changed behind its back, I should be okay.

          - Rich

          Comment


          • #6
            Re: scripting question

            Glad you found something. I'll let you know once when we start putting some of these scripting methods together.
            Damien Alomar<br />Generally Cool Dude

            Comment

            Working...
            X