Announcement

Collapse
No announcement yet.

edit selected lights at once

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

  • edit selected lights at once

    hi all

    I need to edit some values of different vray lights, but with light lister it's not possible to do it for all lights at once...

    I need to change http://c2n.me/3ItiqqN.png

    is this possible and easy to make? I think I have to do it via maxscript...
    has anybody an idea to do it?

    thanks in advance.

    best regards
    themaxxer
    Pixelschmiede GmbH
    www.pixelschmiede.ch

  • #2
    This one should do the job:

    for each in selection where classof each == VRayLight do
    (
    each.invisible = on
    each.lightDistribution = 1 --directionality
    each.size1 = 10 --half width
    each.multiplier = 20
    each.affect_diffuse = off
    each.affect_specualr = off
    each.affect_reflections = off
    each.color_mode = 1 --temperature
    each.color = color 251.15 252.763 255 --temp color
    each.color_temperature = 6630.65 --temp value
    )



    Just replace the values or states as you wish.
    Tashko Zashev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Hi,

      You're right it can be done relatively easily with maxscript especially if you don't need a floating window with a UI.

      Have a look at the code below. It will change four properties of any V-Ray lights selected (half-width, mode, invisible and units). You can add more lines between the parentheses to change more properties at once.
      Code:
      (
      	for vrLight in selection where isKindOf vrLight vrayLight do
      	(
      		vrLight.size1 = 0.5 --Half-width
      		vrLight.color_mode = 1 --Mode
      		vrLight.invisible = true --Invisible
      		vrLight.normalizeColor = 0 --Units (0 for Default, 1 for Luminous Power, 2 for Luminance)
      	)
      )
      Here is a complete list of all the properties that can be changed this way. With some it's obvious which property they relate to, others might require a bit of trial and error.
      Code:
      on : boolean
        .type : integer
        .targeted : boolean
        .target_distance : worldUnits
        .color_mode : integer
        .color_temperature : float
        .color : RGB color
        .multiplier : float
        .normalizeColor : integer
        .size0 : worldUnits
        .size1 : worldUnits
        .size2 : worldUnits
        .castShadows : boolean
        .doubleSided : boolean
        .invisible : boolean
        .affect_diffuse : boolean
        .diffuse_contribution : float
        .affect_specualr (affect_specular) : boolean
        .specular_contribution : float
        .affect_reflections : boolean
        .ignoreNormals : boolean
        .noDecay : boolean
        .storeWithIrradMap : boolean
        .skylightPortal : boolean
        .simplePortal : boolean
        .subdivs : integer
        .shadowBias : worldUnits
        .cutoffThreshold : float
        .notUsed : integer
        .notUsed : integer
        .smoothSurfaceShadows : boolean
        .texmap : texturemap
        .texmap_on : boolean
        .texmap_resolution : integer
        .texmap_adaptiveness : float
        .texmap_locktodome (Lock_texmap_to_dome_orientation) : integer
        .dome_emitRadius : worldUnits
        .dome_targetRadius : worldUnits
        .dome_spherical : boolean
        .dome_affect_alpha (Affect_alpha) : boolean
        .dome_rayDistanceMode : integer
        .dome_rayDistance : worldUnits
        .dome_visibleOriginal : integer
        .mesh_source : node
        .mesh_replaceOnPick : boolean
        .mesh_flip : boolean
        .lightDistribution : float
        .preview_distribution (type) : integer
        .preview_texmap (texmap_preview) : boolean
        .use_mis : boolean
        .enable_viewport_shading : boolean
        .viewport_wire_color_on : boolean
        .viewport_wire_color : RGB color
        .icon_text : boolean
        .excludeList : node array
        .includeList : node array
        .inclExclType : integer
      Dan Brew

      Comment


      • #4
        For batch changing just about everything in max I recommend you use this: http://www.scriptspot.com/3ds-max/sc...-modifier-zorb
        A.

        ---------------------
        www.digitaltwins.be

        Comment


        • #5
          Originally posted by Vizioen View Post
          For batch changing just about everything in max I recommend you use this: http://www.scriptspot.com/3ds-max/sc...-modifier-zorb
          man I use zorb for modifiers but have not noticed the other useful options, thank you.
          Pixelschmiede GmbH
          www.pixelschmiede.ch

          Comment


          • #6
            thank you guys, very helpful and it takes some fear of maxscript away from me... I will use it more often now it seems possible even for me.
            Pixelschmiede GmbH
            www.pixelschmiede.ch

            Comment


            • #7
              Originally posted by themaxxer View Post
              thank you guys, very helpful and it takes some fear of maxscript away from me... I will use it more often now it seems possible even for me.
              You're welcome.

              It can be frustrating at first as it's generally intolerant of small typos. If you get stuck just post on here, I'm sure someone will be able to help.
              Dan Brew

              Comment


              • #8
                you can use my script as well if you want to.

                Click image for larger version

Name:	help.png
Views:	1
Size:	92.4 KB
ID:	867060

                download version 1.20:

                MohseniLightTools_120.zip
                Mohammadreza Mohseni

                Website | Instagram | E-Mail | Art Station | Behance | Twitter | Facebook

                Comment


                • #9
                  thank you mohammadreza, nice script. if you can add the directional parameter and the multiplier options like "units" then it would be very helpful.
                  Pixelschmiede GmbH
                  www.pixelschmiede.ch

                  Comment


                  • #10
                    There is also Mission Control (http://reformstudios.com/mission-control-for-3ds-max/)
                    Still in alpha, but workable. If you want to be able to access ALL parameters in ANY kind of object, light, material, etc. this is the next thing.

                    Comment


                    • #11
                      for sure I will add it in next weekend. thanks for feedback.
                      Mohammadreza Mohseni

                      Website | Instagram | E-Mail | Art Station | Behance | Twitter | Facebook

                      Comment

                      Working...
                      X