Announcement

Collapse
No announcement yet.

Edit Trace Sets for Multiple Objects at Once

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

  • Edit Trace Sets for Multiple Objects at Once

    I could have sworn you used to be able to do this, but there is a bug in the later VRay version whereby you cannot edit Trace Sets Reflections or Refraction Excludes in VRayProperties when there is more than one object selected. This means you have to apply them manually to each object, which is a massive pain in the but, Not sure if this is scriptable either because I need to add a list of objects to exclude to each each master object's reflection exclude...

    Ugh! Any way to do this now? Can this please be fixed? I seem to run into this at least once every other project.

  • #2
    I tested V-Ray NEXT and 5 and you can't do it there either. This thread provides a MaxScript for adding trace sets, however, it's kinda of rough. I'll see if I can make it more intuitive.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thanks for the info. Of course it would be easiest to just add the option to edit multiple objects at once to the VRayProperties dialog. But perhaps a script that would let you, say, select a base object, along with a series of other objects and then copy all those trace sets from the first object to the other objects. I guess this would ideally let you do Reflection Sets and Refraction Sets separately.

      But I just looked at the existing script that had been posted, and that may very well work as well. Thank you.

      Comment


      • #4
        FYI, I've logged an improvement request (internal bug-tracker id: VMAX-13955).
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          As promised, I have attached the script. Use it until we implement the functionality.
          Attached Files
          Aleksandar Hadzhiev | chaos.com
          Chaos Support Representative | contact us

          Comment


          • #6
            Thanks for this! It does work. I wish it would exclude the currently selected objects form the list, as you can't exclude them anyway (easy to do). It would be way cool if it supported Selection sets so you could easily exclude all objects in a selection set. Not sure how hard this is to do, or if you can even do that with Maxscript.

            EDIT: It looks like those selection sets are accessible via MaxScript. Of course I understand you may not want to spend the time to do all this
            Last edited by Joelaff; 13-02-2024, 12:39 PM.

            Comment


            • #7
              hermit.crab Here is a modified version that adds support for selection sets. It also ignore any dependency loops, logging them to the console instead.

              Turning into a nice tool. Thanks.


              Attached Files

              Comment


              • #8
                I had a different approach, but you decide which is better. FYI. Just took the dependency loop catch lines from you.

                EDIT: Reupload.
                Attached Files
                Last edited by hermit.crab; 15-02-2024, 04:21 AM.
                Aleksandar Hadzhiev | chaos.com
                Chaos Support Representative | contact us

                Comment


                • #9
                  Very nice, hermit.crab !
                  The exclusion of the selected objects approach is what I did initially, but then I realized that the Clear functionality no longer worked because teh selected objects weren't in the list. I see you have just ignored the list for the Clear functionality to get around this problem. That works too, though it may be a little unclear to the user which objects are having their trace sets cleared.

                  Your method of letting the user just choose a selection set is nice. I had been going off the UX of the traditional exclusion dialog you guys use.
                  I did notice that your latest throws an error if there are no selected objects when you first execute the script.

                  On the dependency loop thing... yeah, I had tried with an earlier script to handle those in Maxscript, but with a bunch of objects in the scene it got incredibly slow trying to check them all for the existing trace sets (probably my algorithm could have been optimized... it was at least O n^2 or worse!). I noticed that the actual code to add the object to the trace set returned quickly with an error in the case of a dependency loop. So it was easier just to ignore and log it.

                  Anyway, thanks for this. I think we now have something quite usable, and I have learned some stuff in the process.

                  Comment

                  Working...
                  X