Announcement

Collapse
No announcement yet.

SCRIPTING _ remove/empty vrayobjectproperties

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

  • SCRIPTING _ remove/empty vrayobjectproperties

    Hello,

    I would like to remove objects from a vrayobjectproperties set with scripting but I can't find how to do so.
    For exemple, I would like to remove pShere1, here is the help command and what I tried so far but not working:

    Usage: vray objectProperties [add_single|add_multiple|remove|remove_sub|showInAE |assign_existing] <PROPERTIES TYPE - STRING> <NODE NAME - STRING> <force>
    vray objectProperties remove "pSphere1" "vrayobjectproperties"

    Also what is the difference between remove and remove_sub?

    Thanks for your help

  • #2
    I'm sure we had documented the difference between remove and remove from hierarchy but I can't find it right now. Basically, remove from from sub (hierarchy) will disconnect all objects from an object properties set that are in a hierarchy. For example if you have a group within a group and each group contains objects and all of them are in an object properties set, you can click ANY of those objects and hit remove sub and this will disconnect all of them from the set.

    as for scripting it - it should be fairly easy and I'll look into it tomorrow. Would you like yo remove just a specific object from any object properties? Or remove all objects from a specific properties set?
    Last edited by yolov; 27-09-2017, 12:07 PM.
    Alex Yolov
    Product Manager
    V-Ray for Maya, Chaos Player
    www.chaos.com

    Comment


    • #3
      Hi yolov, thanks for the explanations.

      As for scripting, actually I found how to remove a specific object from any object properties, I have to select the object first and then run the command : vray objectProperties "remove". I thought I could do it without selecting it first.

      But I don't know how to remove all objects from a specific object properties set. Maybe there is a way to query/get the list of the objects in the object properties?

      Comment


      • #4
        Since VRayObjectProperties (VOP) is a set, you can use the sets -clear <name_of_set> command in MEL which removes all members and makes the set empty http://help.autodesk.com/cloudhelp/2...ands/sets.html. That's the easiest way. Here's an example where the VOP node is called vrayobjectproperties:
        Code:
        sets -clear vrayobjectproperties
        The alternative would be to simply delete the set
        Code:
        delete vrayobjectproperties
        - it just deletes the VOP set node without deleting the objects in it.
        Alex Yolov
        Product Manager
        V-Ray for Maya, Chaos Player
        www.chaos.com

        Comment


        • #5
          Great thank you!

          Comment

          Working...
          X