Announcement

Collapse
No announcement yet.

Set PostTranslatePython code by MEL/Python

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

  • Set PostTranslatePython code by MEL/Python

    Hi!

    I want to access Post Translate Python Script by MEL/Python.

    I could get Post Translate Python Script by "maya.cmds.getAttr('vraySettings.postTranslatePyth on')".
    But "maya.cmds.setAttr('vraySettings.postTranslatePyth on', code ,type="string")" was not executed.

    Please add how to set Post Translate Python Script by MEL/Python.

  • #2
    Hi,

    It seems that the control is not connected to the attribute and if you change the value of the attribute the value in the control won't change.
    So currently to set the code for the callback you have to use this MEL code snippet:
    Code:
    string $code="my code";
    setAttr "vraySettings.postTranslatePython" -type "string"  $code;
    scrollField -e -text $code vrayPostTranslatePythonCallbackControl;
    This sets the value in the control and in the attribute, so you should get reliable results.

    /Teodor
    V-Ray developer

    Comment


    • #3
      Thanks.
      It became study very much.

      Comment

      Working...
      X