This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| import bpy | |
| from mathutils.geometry import interpolate_bezier | |
| def get_points(spline, clean=True): | |
| knots = spline.bezier_points | |
| if len(knots) < 2: | |
| return |
| def showErrorMessage(message, wrap=80): | |
| lines = [] | |
| if wrap > 0: | |
| while len(message) > wrap: | |
| i = message.rfind(' ',0,wrap) | |
| if i == -1: | |
| lines += [message[:wrap]] | |
| message = message[wrap:] | |
| else: | |
| lines += [message[:i]] |
On Windows systems using Autodesk Maya, the text input field of the Script Editor doesn't regain focus after having restored focus to the main window. This event handler explicitly restores focus, if it turns out to have been the last active panel at the time of leaving the application.
Place the full contents of the script below into your userSetup.py and never again lose focus.
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
| # this code needs to be inserted into your SubmitNukeToDeadline script if you are using deadline's submission script. | |
| ###### INSERT AFTER THIS LINE, line 1308 in my file | |
| #if groupBatch or dialog.separateJobs.value(): | |
| # fileHandle.write(EncodeAsUTF16String("BatchName=%s\n" % batchName)) | |
| # Populating environment variables from running Nuke: | |
| # http://developer.shotgunsoftware.com/tk-core/platform.html#sgtk.platform.create_engine_launcher | |
| current_engine = sgtk.platform.current_engine() | |
| launcher = sgtk.platform.create_engine_launcher( |
| """Convert a pyblish context with collected instances to a flowpipe graph: | |
| +----------------------------+ +----------------------------+ +-----------------------------+ | |
| | ValidatorA Instance 0 | | ExtractorA Instance 0 | | IntegratorA Instance 0 | | |
| |----------------------------| |----------------------------| |-----------------------------| | |
| % contexts | % contexts | % contexts | | |
| o contexts.0<{"results"> | +--->o contexts.0<> | +--->o contexts.0<> | | |
| o instance<{"data": {> | |--->o contexts.1<> | |--->o instance<> | | |
| o plugin<"Validator> | |--->o instance<> | | o plugin<"Integrato> | | |
| o step<"validate"> | | o plugin<"Extractor> | | o step<"integrate> | |