This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"OTIO_SCHEMA": "Timeline.1", | |
"metadata": {}, | |
"name": "test_sequence", | |
"tracks": { | |
"OTIO_SCHEMA": "Stack.1", | |
"children": [ | |
{ | |
"OTIO_SCHEMA": "Sequence.1", | |
"children": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE xmeml> | |
<xmeml version="4"> | |
<sequence id="sequence-1" TL.SQAudioVisibleBase="0" TL.SQVideoVisibleBase="0" TL.SQVisibleBaseTime="0" TL.SQAVDividerPosition="0.5" TL.SQHideShyTracks="0" TL.SQHeaderWidth="236" Monitor.ProgramZoomOut="1262874412800" Monitor.ProgramZoomIn="0" TL.SQTimePerPixel="0.61538461538461542" MZ.EditLine="0" MZ.Sequence.PreviewFrameSizeHeight="480" MZ.Sequence.PreviewFrameSizeWidth="720" MZ.Sequence.AudioTimeDisplayFormat="200" MZ.Sequence.PreviewRenderingClassID="1061109567" MZ.Sequence.PreviewRenderingPresetCodec="1685288558" MZ.Sequence.PreviewRenderingPresetPath="EncoderPresets\SequencePreview\0f3c7317-cf5d-44e8-8b19-1bc6d7b05ce6\Microsoft AVI DV NTSC.epr" MZ.Sequence.PreviewUseMaxRenderQuality="false" MZ.Sequence.PreviewUseMaxBitDepth="false" MZ.Sequence.EditingModeGUID="0f3c7317-cf5d-44e8-8b19-1bc6d7b05ce6" MZ.Sequence.VideoTimeDisplayFormat="102" MZ.WorkOutPoint="15239249625600" MZ.WorkInPoint="0" explodedTracks="true"> | |
<uuid> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query = { | |
'entity_type': 'Task', | |
'filters': [ | |
['project', 'is', {'type': 'Project', 'id': project_id}], | |
{'filter_operator': 'any', | |
'filters': [ | |
# Ensure that the task is on a shot, we're not setting | |
# the sequence on the tasks in Shotgun. | |
['entity.Shot.id', 'is_not', None], | |
# Or that the task is on an asset. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some old unittesting notes I consult once in a while when I get stuck writing a test | |
In the broadest sense of the term, unit testing simply means testing a single unit of code, isolated from other code that it might be integrated with. Traditionally, unit testing was an activity that was primarily performed by test engineers. These engineers would take code given by the developers and run them through a suite of tests to verify that the code worked. Since this code was tested before integration, the process fits into the definition of a unit test. Traditional unit testing was typically a manual affair, with test engineers walking through the tests cases by hand, although some teams would go a step further and automate the tests. | |
An integration test is a test that involves exercising more than one unit of the system. The goal is to check whether these units have been integrated correctly. A typical integration test might be to go to a web page, fill in a form, and check whether the right message is display |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import (Dict, Tuple, List, NewType, Callable, Mapping, Sequence, TypeVar, Generic, | |
Iterable) | |
from logging import Logger | |
Vector = List[float] | |
def scale(scalar: float, vector: Vector) -> Vector: | |
return [scalar * num for num in vector] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RST ===================== | |
============================ | |
# Code block for RST # | |
============================ | |
.. code-block:: python | |
$END$ | |
============================= | |
# Inline code block for RST # | |
============================= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5 import QtCore, QtGui, QtWidgets | |
class Node(object): | |
def __init__(self, name, parent=None): | |
self._name = name | |
self._parent = parent | |
self._children = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render : function(outputPresetPath, outputPath) { | |
app.enableQE(); | |
var activeSequence = qe.project.getActiveSequence(); | |
if (activeSequence) { | |
app.encoder.launchEncoder(); | |
var timeSecs = activeSequence.CTI.secs; | |
var timeFrames = activeSequence.CTI.frames; | |
var timeTicks = activeSequence.CTI.ticks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
import shiboken2 | |
import maya.OpenMayaUI as OMUI | |
from PySide2 import QtWidgets | |
def deleteSignInButton(): | |
statusLine = pm.mel.eval('$tmp = $gStatusLineForm') | |
pointer = OMUI.MQtUtil_findControl(statusLine) | |
statusLine = shiboken2.wrapInstance(long(pointer), QtWidgets.QWidget) | |
mayaStatusShelf = statusLine.children()[1].children()[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MayaPluginWizard never works. Here's setting up a project from scratch. | |
File > New Project > Visual C++ > Win32 > Win 32 Project > Name it. | |
Win32 Application Wizard > Next > DLL | |
Additional Options > Empty Project checked > Finish | |
Main Window | |
Right-click Source Files > Create an empty .cpp file |