

- #Maya python print selection how to#
- #Maya python print selection code#
- #Maya python print selection windows#
#Maya python print selection code#
The sample code above adds keyframe animation to a channel (in other words, a plug). TimeArray.append(om.MTime(times, om.MTime.uiUnit())) # Copy the times into an MTimeArray and the values into an MDoubleArray. You can use this Python example script to create an animated curve and set its key frames:ĭef addkeys(plugName, times, values, changeCache):ĪnimCurve = animfn.create(plug, ) Mel.createMelWrapper(setThisContainerCurrent)Īssets > Advanced Assets > Create and add Mel.createMelWrapper(rmbM圜ontainerScript,retType='string') This will create the MEL wrapper scripts needed:
#Maya python print selection how to#
The following is an example of how to use theĬreateMelWrapper function to register a Python function as a MEL procedure in order to use the For example, in theĪsset (formerly container) node, the Rmb Command attribute under theĬontext Properties section only accepts MEL procedures.

Registering a Python function as a MEL procedureĬreateMelWrapper function to register a Python function as a MEL procedure. Press F5 or the green play button to return control to Maya. Now you can use all the debugging features of Wing IDE to examine the state of your program.A red line highlights the next line of code to be executed. When that breakpoint is reached, the status indicator turns yellow to indicate that Maya has been paused. In Maya, call the Python function that contains your breakpoint.This indicates that the remote debugging connection has been established, and that Maya is running. Check back in Wing IDE the status indicator in the lower left of the main Wing IDE window should be green.
#Maya python print selection windows#
Windows may pop up another authorization dialog box asking for authorization. Set a breakpoint using F9 or by clicking in the leftmost margin. Start Maya, and ensure your Python script can be imported successfully and run.Windows may pop up a dialog box asking for authorization to open a communication port.


To start a debugging session of a Maya Python script with Wing IDE 3.1 in Windows, do as follows:
