python main.py --amount 100
- Panning by left-click + drag
- Scale by rotating the mouse wheel
#python | |
import lx | |
import lxu.object | |
import lxu.command | |
import lxifc | |
class AwSelListener(lxifc.SelectionListener): | |
running = False |
import subprocess | |
import threading | |
def _print_stdout(process): | |
''' | |
Print out the stream line by line. If line is empty we know that the process has finished and we exit | |
''' | |
while True: | |
try: | |
line = process.stdout.readline() |
import modo | |
import lx | |
scene = modo.scene.current() | |
selected = scene.selected[0] | |
list = [] | |
rp = scene.renderPassGroups[0] | |
for ch in rp.groupChannels: | |
g=ch.item.itemGraph('xfrmCore') |
# @author David Ballesteros | |
# | |
# @brief Helper classes to deal with the read and write of Item Channels. | |
# Based on a ChannelRead class sample code provided by Matt Cox | |
import lx | |
class ChannelRead: | |
def __init__(self, item): | |
""" |
import sip | |
sip.setapi('QString', 2) | |
sip.setapi('QVariant', 2) | |
from PyQt4 import QtCore, QtGui | |
class TableModel(QtCore.QAbstractTableModel): | |
""" | |
A simple 5x4 table model to demonstrate the delegates |
import sip | |
sip.setapi('QVariant', 2) | |
from PyQt4 import QtCore, QtGui | |
class SpinBoxDelegate(QtGui.QItemDelegate): | |
def createEditor(self, parent, option, index): | |
editor = QtGui.QSpinBox(parent) | |
editor.setMinimumHeight(100) |
def CreateTeleParam(parentParam, targetParam): | |
teleParam = parentParam.createChildString( | |
'%sTeleParam' % targetParam.getName(), '') | |
teleParam.setExpression('getParam("%s").param.getFullName()' | |
% targetParam.getFullName()) | |
teleParam.setHintString(repr({'widget': 'teleparam'})) |
f = open(file_path) | |
file_size = os.path.getsize(file_path) | |
CHUNK_SIZE = 4 * 1024 * 1024 | |
if file_size <= CHUNK_SIZE: | |
print dbx.files_upload(f, dest_path) | |
else: |
import re | |
def replace(obj): | |
print(obj.groups()) | |
if obj.group(0) == '\'': | |
return '"' | |
if obj.group(0) == '"': | |
return '\'' | |
if obj.group(0) == '"""': |