Anim_picker 1.0.2 for Maya (maya script)

This tool allows you to create a graphical interface for quick animation controls selection

Bugs

right menu calling customs scripts

Statusclosed
Prioritymedium
Date05/30/2013
Submitted by Mr.Balancer _zhaojie Mr.Balancer _zhaojie

can you take an example for customs scripts of right menu?


if i use py,like  "   cmds.move( 0, 0, 0, objectSpace=True );   "
error:
# Traceback (most recent call last):
#   File "D:\Program Files (x64)\Autodesk\Maya2013\Python\anim_picker\gui.py", line 2405, in custom_eval
#     env=self.get_exec_env())
#   File "D:\Program Files (x64)\Autodesk\Maya2013\Python\anim_picker\handlers\python_handlers.py", line 11, in safe_code_exec
#     exec cmd in env
#   File "<string>", line 1, in <module>
# NameError: name 'cmds' is not defined

Comments on this bug:

  • CharlieWales

    CharlieWales said over 13 years ago:

    I had to: import maya.cmds as cmds at the beginning of the script for it to work. Hope it helps
    Report
  • Guillaume Barlier

    Guillaume Barlier said over 13 years ago:

    Yes that's not a bug, it's by choice. Currently for the menus i'm creating a clean environnement to prevent globals conflicts. Consider the menu script window as you would a separate python file, you have to import what you use. I just provide custom globals variable to access the related controls.
    Report

Post a comment:

Sign in