Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Calling Python Procedure from Expression?
  RSS 2.0 ATOM  

Calling Python Procedure from Expression?
Rate this thread
 
54618
 
Permlink of this thread  
avatar
  • Total Posts: 10
  • Joined: 03 October 2008 12:38 PM

I’m currently trying to run a procedure during playback, that executes every frame. I’m planning to use an expression which calls the appropriate procedure in my .py file. However, I can only seem to currently get it to call a procedure using MEL.

I understand that you can use Python to evaluate MEL strings, but is the reverse possible, i.e. using MEL to run a Python procedure?

(NB: Re-writing the script in MEL isn’t a possibility - if anyone knows of a better way to run a procedure every frame during playback (already tried scriptJob) please let me know. Currently the tool is manually moving the time-slider, which isn’t what I want)

Thanks!



Replies: 0
avatar
  • THNKR
  • Posted: 18 April 2011 03:35 AM

python “myproc()”;



Replies: 1
/img/forum/dark/default_avatar.png

Can’t believe it was that simple. Thanks.

Author: Tom Rowell

Replied: 18 April 2011 03:38 AM