maya scriptjob

Always parent your scriptJobs to your main UI window. This will ensure that the scriptJob is deleted when it is no longer needed.


http://ewertb.soundlinker.com/mel/mel.095.php


the scriptJob only fires when
> the playback is *over*, not during playback.

https://www.mail-archive.com/[email protected]/msg12220.html


Script jobs are tied to the event loop in the interactive application. They are run during idle events. This means that script jobs do not exist in the batch application. The scriptJob command does nothing in batch mode. This triggering happens very frequently so for speed considerations no events are forwarded during playback. This means that you cannot use scriptJob -tc tcCallback; to alter animation behaviour. Use an expression instead


This triggering happens very frequently so for speed considerations no events are forwarded during playback. This means that you cannot use scriptJob -tc tcCallback; to alter animation behaviour. Use an expression instead, or the rendering callbacks "preRenderMel" and "postRenderMel".


http://forums.cgsociety.org/archive/index.php?t-597317.html


http://forums.autodesk.com/t5/maya-programming/scriptjob-to-run-during-playback/td-p/4187814


two ways to work around:

1. expression (haven't tried)

2. condition


condition:

scriptJob -listConditions;

# list all the existing conditions and print them
# nicely
conds2 = cmds.scriptJob( listConditions=True )
for cond in sorted(conds2):
	print cond


PySide: Using ScriptJobs


http://austinjbaker.com/pyside-using-scriptjobs


Script Jobs (and calls to python-execute through MEL) execute inside Maya's python namespace (global namespace), not the module namespace they are created in.

To call a function inside a module from within a script-job, you will have to specify the fully qualified path to the function you want to execute.
In your case "vray_listener.is_vray_loaded()".
You can also get the module's name dynamically, so you are still safe if you change the module structure:
__name__+".is_vray_loaded()"

You will also have to do this for the "hey()" inside the scriptjob.


http://tech-artists.org/forum/showthread.php?6359-Problems-with-creating-a-module-that-can-execute-condition-and-scriptJob-commands


Attaches this job to a piece of maya UI. When the UI is destroyed, the job will be killed along with it.

Just parent all your scriptjobs to your ui's main window when they are created.


http://forums.cgsociety.org/archive/index.php?t-892447.html



http://austinjbaker.com/pyside-using-scriptjobs


http://www.rigging101.com/forum/topic.php?id=197


http://td-matt.blogspot.com/2010/12/selection-highlight-using-scriptjob.html


http://austinjbaker.com/pyside-using-scriptjobs


http://tech-artists.org/forum/showthread.php?325-ScriptJob-tools-in-maya





你可能感兴趣的:(Maya,API,Maya,programming,Maya,Tool)