Announcement

Collapse
No announcement yet.

Naming vray object properties nodes on creation?

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

  • Naming vray object properties nodes on creation?

    Is there a way to name the vray object properties node on creation?

    I want a way to mel script this so that I can create VrobProp (Vray object properties) nodes based on the selected object they are attached to.

    Like if pPlane1 is selected and I apply a VrobProp setup with the right attributes checked for it to be a shadow catcher. So essentially making a little button that is "Make Vray Shadow catcher"

    Then the pPlane1 name is applied to the VrobProp when created. This way when i have multiple vrayobject properties nodes in the outliner they don't just appear as

    vrayobjectproperties
    vrayobjectproperties1
    vrayobjectproperties2
    vrayobjectproperties3

    But rather how I want to see them so they are associated with the objects/groups connected

    VrobProp_pPlane1
    VrobProp_pSphere1
    VrobProp_pPlane2
    VrobProp_Wheels_Group

    Then I can easily see that the wheels_group will have the motion blur override
    The planes are shadow catchers...
    .. and the sphere is matte zero.

    Even though I would have to click through them at least I can tell at a glance what I attached them to.

    Currently I just rename them manually but I wanted a way of naming on creation so that the mel script is easy to track.

    I mean I could always

    Code:
    vray objectProperties add_single;
    connectAttr vrayobjectproperties1.outConnect vraySettings.vray_nodes_connect -nextAvailable;
    Then rename the vrayobjectProperties node. Maybe do a check to see if vrayobjectproperties1,2,3 etc exists.

    But.. Is there a flag for naming the vrayobjectproperties on creation?
    ------
    KC

  • #2
    No there is no way to set the name at the creation time at the moment, sorry.

    I'm thinking that instead of adding a parameter to allow you to specify the name a better approach is to return the path/name of the created object.
    This way we can make add_single and add_multiple to behave similarly. The former will return a single string, the latter will return an array of string.

    What do you think? Will this be behaviour be good enough for you?

    /Teodor
    V-Ray developer

    Comment


    • #3
      Yeah that could work. I mean any data input is fine because we could always catch it in a string $variable[] and end up where we want right?
      ------
      KC

      Comment


      • #4
        Ok, I've added it to our ToDo and we'll notify you when we've implemented it.
        Is this something you need urgently?
        V-Ray developer

        Comment


        • #5
          Well, I can work around it for now so not really urgent. Besides I can't implement a new build at the moment. So when it gets implemented I'll start utilizing it at that point.

          Thanks.
          ------
          KC

          Comment


          • #6
            Btw, I just noticed that the

            vray objectProperties add_multiple;

            Does append the transform name to the VrobProp node.

            This will be fine for now.
            ------
            KC

            Comment


            • #7
              The "vray objectProperties add_single/add_multiple" commands now return a string array with the names of the newly created object properties nodes.
              You can check it out in the nightly builds
              V-Ray for Maya developer

              Comment


              • #8
                For vray 2 you will have to wait till next week for the next nightlies (the 3.0 ones already got this feature)
                V-Ray for Maya developer

                Comment


                • #9
                  Ok, thanks.

                  Currently I am using am naming the node on creation with the create node command as a workaround.

                  Code:
                  createNode -name $namedNode VRayObjectProperties;
                  ------
                  KC

                  Comment

                  Working...
                  X