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
void input_testing(ILxUnknownID vts) | |
{ | |
// setup | |
CLxUser_VectorStack vec(vts); | |
LXpToolInputEvent *input_event; | |
input_event = (LXpToolInputEvent *)vec.Read(offset_input); | |
// Tool Input Count(could be used to track number of clicks etc) | |
int count = input_event->count; |
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 modo, lxifc | |
geo = modo.MeshGeometry("Cube").internalMesh | |
port = lx.object.ListenerPort(geo) | |
class mesh_listener(lxifc.MeshListener): | |
undoService = lx.service.Undo() | |
def __init__(self): | |
self.listenerService = lx.service.Listener() | |
self.COM_object = lx.object.Unknown(port) |
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 modo | |
scene = modo.Scene() | |
i = scene.selected[0] | |
l = modo.LocatorSuperType(i) | |
rot = l.rotation | |
transformsStack = [xfrm for xfrm in l.transforms] |
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
""" This gist will calculate rotation offset angle values for a rotation constraint | |
between two items in MODO. It'll be exactly the same as setting up the constraint | |
with compensation turned on. | |
This code can be useed to update existing rotation constraint setup with new offset | |
without reapplying the constraint again. | |
The process is simple. | |
- get the world rotation matrix of the target and invert it. | |
- multiply source world rotation matrix by the inverted target matrix. |
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
<atom type="Filters"> | |
<hash type="Preset" key="ffr_morphCage.package:filterPreset"> | |
<atom type="Name">Morph Cage View</atom> | |
<atom type="Enable">1</atom> | |
<list type="Node">1 .group 0 ""</list> | |
<list type="Node">1 packagename ffr_morphCage</list> | |
<list type="Node">-1 .endgroup </list> | |
</hash> | |
</atom> |
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
class Notifier(lxifc.UIValueHints): | |
def __init__(self): | |
self._notifiers = [('channel.value', '+v channelName itemType'),] | |
def uiv_NotifierCount(self): | |
return len(self._notifiers) | |
def uiv_NotifierByIndex(self, index): | |
return self._notifiers[index] |
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
<atom type="Frame"> | |
<hash type="Layout" key="base.mbUVSingle_Layout" val="viewportGroup"> | |
<atom type="IdealSize">1323 875</atom> | |
<list type="Port">UVmodel 0 1 0 1 TemplateUV_View</list> | |
<atom type="SwitcherClass">normal</atom> | |
<atom type="UserName">Mario UV</atom> | |
</hash> | |
<hash type="LayoutWindow" key="mbUvWindow"> | |
<atom type="Title">Mario UV</atom> |
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
#python | |
import lx | |
import lxu.command | |
my_hint = ( (0, 'zero' ), | |
(1, 'one' ), | |
(-1, 'minusone' ),) | |
class TextValueHint_Cmd(lxu.command.BasicCommand): |
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 modo | |
item = modo.Scene().selected[0] | |
chanCount = item.internalItem.ChannelCount() | |
chanList = [] | |
for i in xrange(chanCount - 1, -1, -1): | |
try: | |
package = item.internalItem.ChannelPackage(i) | |
except LookupError: | |
lx.out(item.internalItem.ChannelName(i)) |
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
/* | |
* This snippet demonstrates two of the ways to obtain item's inverted world transform matrix. | |
*/ | |
// --- METHOD 1 | |
CLxUser_Scene scene; | |
item.Context (scene); | |
CLxUser_ChannelRead chanRead; | |
CLxUser_SelectionService selSvc; |