Announcement

Collapse
No announcement yet.

VRay and maxscript issues

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

  • VRay and maxscript issues

    Hi,

    showproperties renderers.current #notUsed

    and

    showproperties renderers.current #Override_Mtl

    are not outputting properly, making my script that collect type of value not work.
    I isolated these so I can probably do a workaround but it would be cleaner if it was outputting

    integer

    and

    material

    also how to set a property to undefined?
    For example if you clear the Override_Mtl manually it gets set to undefined, I can't find a way to do that with maxscript...

    thanks.

  • #2
    if you use

    setProperty renderers.current #Override_Mtl undefined

    for example it triggers a bunch of errors when it works fine in others properties in Max...
    to be honest I just tried with the map slot of volumeSelect....

    Comment


    • #3
      Are you wanting to remove the override?

      If so, then instead of setProperty, just use:

      Code:
      renderers.current.options_overrideMtl_mtl = undefined
      If you just want to see if a material is defined or not you can use
      Code:
      renderers.current.options_overrideMtl_mtl
      it will return the material used, or undefined if nothing is assigned. But remember, just because it is defined, doesnt mean it is active. You can switch it on or off with
      Code:
      renderers.current.options_overrideMtl_on = true
      or set it to false if you want to switch it off
      Last edited by Morne; 23-05-2016, 04:14 AM.
      Kind Regards,
      Morne

      Comment


      • #4
        Thank you, I am working on a function that is reading and writing any property, in any instance of max object.
        These two in VRay are the only ones messing with my function. Actually not the only ones, but close.

        The purpose is to massively store the values with the scene in dynamically created custom attributes.
        That is why I need to use getProperty and setProperty.

        Comment


        • #5
          why not just store a copy of renderers.current ?

          Comment


          • #6
            interesting!!
            but how do you save this copy with the scene?

            Comment


            • #7
              As a #maxObject type parameter in your CA if memory serves.

              Comment


              • #8
                wtf really?
                THANKS MAN it looks much simpler than what I have been working on for weeks!!

                Comment


                • #9
                  is there anyway to have the same behaviour with other maxObjects?
                  Right now if I copy a render elements or atmospheric or render effect it seems like taking an instance, meaning the parameters are remaining the last ones...

                  It is so convenient to do it the way copy renderers.current works!!!

                  Comment


                  • #10
                    I tested with an atmospheric and it seems to work fine for me.

                    Comment


                    • #11
                      ok, my mistake.
                      need to do a deepcopy of the array BEFORE passing it to a CA... if I do it while passing to the CA it doesn't work...

                      Comment


                      • #12
                        nope still doesn't work, can be an issue with other part of my script though but it seems to work fine inside a variable but not in a CA...

                        Comment


                        • #13
                          I think it is because I am using addeffect and addAtmospheric which may create a new instance instead of copying the objects
                          How to access the nested properties of atmospheric and effects ?

                          Comment


                          • #14
                            A bit unclear to me how you're using it. Could you show a minimal code sample which demonstrates your problem?

                            Comment


                            • #15
                              I am trying to copy the render things to CA to get them back
                              to save pass of rendering and send them to the farm
                              if scene state was working and simpler I wouldn't bother to do that, but it is too complex to use for my staff and breaks very easily...
                              anyway I isolated what doesn't work, everything but render effects works.
                              copy a render effect outputs undefined... trying to find a workaround...

                              Comment

                              Working...
                              X