This file contains 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
#python | |
import lx | |
import lxu.vector | |
import math | |
# this something I got from stackoverflow some time ago | |
# if you'd like to know more about it have a look at this: http://www.soi.city.ac.uk/~sbbh653/publications/euler.pdf | |
def getRot2(m): | |
if m[0][0] == 1.0: | |
x = math.atan2(m[0][2],m[2][3]) |
This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
This Command will smooth the transition between two conected curves. | |
""" | |
import lx | |
import lxu.command | |
import lxifc |
This file contains 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
# !/usr/bin/env python | |
#sunFlower | |
# base on https://commons.wikimedia.org/wiki/File:SunflowerModel.svg | |
# also because of http://community.thefoundry.co.uk/discussion/topic.aspx?f=4&t=114228 | |
# main thread http://community.thefoundry.co.uk/discussion/topic.aspx?f=4&t=114228 | |
# small changes to include the orientation | |
# eulerToMatrix function from here: https://gist.github.com/Farfarer/4fb11fc8d4290241e92b | |
import lx | |
import math |
This file contains 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
#python | |
import lx | |
import lxifc | |
SERVER_NAME= "mop.2PointCurve" | |
class pointVisitor(lxifc.Visitor): | |
def __init__(self, pointObj, markMode): | |
self.pointObj = pointObj | |
self.values = [] |
This file contains 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
#python | |
import lx | |
import lxu | |
import lxifc | |
sSERVER_NAME = "mopCurveGroup" | |
sGRAPH_NAME = sSERVER_NAME + ".graph" | |
sGRAPH_USERNAME = sSERVER_NAME + ".graphUserName" | |
sCHAN_COUNT = "count" |
This file contains 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 lx | |
import lxu.meta | |
class StringLength(lxu.meta.ChannelModifier): | |
def init_chan(self, desc): | |
desc.add ("input", lx.symbol.sTYPE_STRING) | |
desc.chmod_value (lx.symbol.fCHMOD_INPUT) | |
desc.add ("length", lx.symbol.sTYPE_INTEGER) | |
desc.chmod_value (lx.symbol.fCHMOD_OUTPUT) |
This file contains 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 lx | |
import modo | |
scene = modo.Scene() | |
# default is nuke-default:sRGB | |
default8bitColorSpace = scene.sceneItem.channel("def8bitColorspace").get() | |
# create color mapping service instance | |
colorMappingService = lx.service.ColorMapping() |