Announcement

Collapse
No announcement yet.

VrayMultiSubTex = make enumerable

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

  • VrayMultiSubTex = make enumerable

    i'd like to be able to do this in maxscript:

    Code:
    		for m in multiTex do
    		(
    			m.texmap = someTex
    		)
    Maxscript complains that it's not "mappable" or something.

    Explicitly iterating over each one (ie. "multiTex.id_1 = 5") is really awful.

  • #2
    Hm, I'm not sure it is possible to make a plugin parameter mappable. Does it work for the multi/sub-object material?

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      i think what duke is pointing out is that every ID in a vrayMultiSubTex is a separate property (instead of having a single property array for each property type) :

      .id_1 : integer
      .color_1 (color1) : RGB color
      .texmap_1 : texturemap
      .texmap_on_1 : boolean
      .texmap_mult_1 : float
      .id_2 : integer
      .color_2 (color2) : RGB color
      .texmap_2 : texturemap
      .texmap_on_2 : boolean
      .texmap_mult_2 : float

      this means you have to get tricky if you want to do something to a specific id or loop through all of the id properties. it's not a huge deal but it is more of a pain than just looping through an array. the multi/sub-object material, for example, uses arrays for properties:

      .materialList (Material) : material array
      .mapEnabled (Map_1_Enable) : boolean array
      .names (Map) : string array
      .materialIDList (Index) : int array

      Comment


      • #4
        Ok, I see. Will check if we can do something about it.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          It's not that tricky to get around that. You can estimate the number of maps by counting the properties and test them in a loop with getProperty/setProperty.
          Marc Lorenz
          ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
          www.marclorenz.com
          www.facebook.com/marclorenzvisualization

          Comment


          • #6
            sure--like i said, it's not a big deal.. but programmatically speaking it's not the cleanest or simplest.. (e.g., if vray 2.2 has 40 slots instead of 20 or something) especially when there are already precedents that handle it differently.

            Comment


            • #7
              Hi, we have made the parameters of the VrayMultiSubTex's subtexmaps accessible as arrays, as follows:
              .texmap_on : boolean array
              .texmap_id : int array
              .texmap_color : RGB color array
              .texmap : texturemap array
              .texmap_mapOn : boolean array
              .texmap_mult : float array

              A version with the change can be obtained by request to vlado@chaosgroup.com.

              Best regards
              Alexander Kazandzhiev
              V-Ray for 3ds Max developer

              Comment

              Working...
              X