Announcement

Collapse
No announcement yet.

getAttr vraySettings.imageFormatStr and vraySettings.fileNamePrefix

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

  • getAttr vraySettings.imageFormatStr and vraySettings.fileNamePrefix

    Hi there,

    I'm making myself a confirm batch render dialogue/window in MEL. A last minute check-list to make sure I get all the settings right before sending them off to the renderfarm!

    I'm familiar with most getAttr in V-Ray but sometimes they do not return any results, for example:

    getAttr vraySettings.imageFormatStr
    getAttr vraySettings.fileNamePrefix

    Is there a way to force Maya to find these attribute values? Or will it rely on some global procedures?
    Maya 2020/2022
    Win 10x64
    Vray 5

  • #2
    works like this

    getAttr "vraySettings.imageFormatStr";
    getAttr "vraySettings.fileNamePrefix";

    Comment


    • #3
      Of course. But try on a new scene with V-Ray Render Settings loaded. It returns nothing.
      Maya 2020/2022
      Win 10x64
      Vray 5

      Comment


      • #4
        I have no problems with `getAttr vraySettings.fileNamePrefix` here.
        If `getAttr vraySettings.imageFormatStr` return an empty string, the extension is "png"
        V-Ray/PhoenixFD for Maya developer

        Comment


        • #5
          Originally posted by ivaylo.ivanov View Post
          If `getAttr vraySettings.imageFormatStr` return an empty string, the extension is "png"
          Thank you, this seems to be the case!

          Originally posted by ivaylo.ivanov View Post
          I have no problems with `getAttr vraySettings.fileNamePrefix` here
          It just returns a blank result, but this is okay- I htink I can work around. Nothing serious obviously! I was just wondering.

          Thanks for the replies though! It did indeed help.
          Maya 2020/2022
          Win 10x64
          Vray 5

          Comment


          • #6
            Hello,

            These attributes gets updated once you set their values. If you open a new scene, they return empty strings and, as Ivaylo mentioned, you can use the default values - for vraySettings.imageFormatStr it's "png", for vraySettings.fileNamePrefix it is the name of the scene, which by default is "untitled". You can also use getSceneName command for it. One more way to get the full name of the file would be to use the value of the text field of the preview:
            text -q -label vrayFilenamePreview;

            Hope that helps. Let me know if there are any issues.

            Best regards,

            Milena

            P.S. Ops, I just saw your last posting after I replied. I am glad you've found some work around. Good luck!
            V-Ray for Maya developer

            Comment

            Working...
            X