Announcement

Collapse
No announcement yet.

Missing vrayUserAttributes added to a reference, when file opened through mayapy

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

  • Missing vrayUserAttributes added to a reference, when file opened through mayapy

    Hi there,

    I'm having an issue with vrayUserAttributes when opening files through mayapy.
    It seems that any vrayUserAttributes that is applied to a reference within the scene, no longer exists when the scene is opened through mayapy.
    I can access vrayUserAttributes saved in the referenced file.
    I cannot expose the vrayUserAttribute using maya.mel.eval('vray addAttributesFromGroup "'namespace:name'" "vray_user_attributes" 1'), which work in standard maya.
    I also get this warning when opening a file: "Warning: line 1: Scene-Metadata is not supported for referenced files." when opening the file in mayapy.

    Is there any work around besides importing the reference?

  • #2
    Hello!
    Unfortunately I cannot reproduce neither the warning you experience when opening a scene with a referenced file in mayapy nor the problem with vrayUserAttributes. Can you share more details about your scene setup or the commands you use?
    In mayapy I suggest that you can try listing the scene nodes or ones of a certain type using:
    Code:
    maya.cmds.ls()
    This way you will know the proper way to refer to a given node. In general, you would use "namespace:nodeName".
    I have successfully added vrayUserAttributes and set a value in mayapy using the following code:
    Code:
    maya.mel.eval('vray addAttributesFromGroup "namespace:nodeName" "vray_user_attributes" 1')
    maya.cmds.setAttr('namespace:nodeName.vrayUserAttributes', 'color=0,0,1;', type="string")
    Iliyana Vladeva
    Software Development Engineer
    V-Ray for Maya

    Comment

    Working...
    X