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
#include <lxsdk/lx_mesh.hpp> | |
#include <lxsdk/lx_pmodel.hpp> | |
#include <lxsdk/lx_seltypes.hpp> | |
#include <lxsdk/lxu_attributes.hpp> | |
#define SERVER_NAME "pmodel.createPlane" | |
#define ATTRs_SIZE "size" | |
#define ATTRi_SIZE 0 | |
class MeshOp : |
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
/* | |
matchXfrm.cpp | |
Sample plugin to demonstrate a simple command that matches | |
position, rotation and scale between multiple selected items. | |
This command operates slightly differently to the built in | |
match.position, rotation, scale commands. The built in commands | |
will average out the transform if multiple items are selected, |
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 | |
''' | |
Surface Force | |
This example plugin for modo 701, shows how to create a surface force in | |
Python. The force will read a mesh, get the closest position on that mesh | |
and find the normal at that position. A force will be created along the | |
normal vector of the surface. The result is a force that pushes particles |
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 | |
''' | |
Auto generates material masks for every material ptag in the scene. | |
Usage: Put the script in a folder called lxserv inside your modo scripts | |
folder. Restart modo. Run the command: material.generate | |
''' | |
import lx |
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
#include <lxsdk/lx_mesh.hpp> | |
#include <lxsdk/lx_pmodel.hpp> | |
#include <lxsdk/lx_seltypes.hpp> | |
#include <lxsdk/lx_thread.hpp> | |
#include <lxsdk/lxu_attributes.hpp> | |
#define SERVER_NAME "pmodel.selectEveryOther" | |
/* | |
* The Selection Operation is evaluated in parallel from multiple threads. As |
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 Cocoa | |
import Foundation | |
let pathToImage = "/some/path/to/an/image.png" | |
let pathToFolders = URL(fileURLWithPath: "/Some/Folder/Path/") | |
guard let image = NSImage(contentsOfFile: pathToImage) else { | |
fatalError("Unable to load image.") | |
} |
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 | |
''' | |
Shape Draw python example. This python plugins demonstrates how to create | |
a Package that can be added to existing items, that controls how they draw | |
in the GL viewport. We will simply draw a circle. A radius channel and an | |
sides channel will control how the circle is drawn. | |
To use, add the python script to an lxserv folder in your scripts directory. | |
Select an locator item and enter: item.addPackage shape.draw. To remove the |
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 | |
import lxu.command | |
import modo | |
class Command(lxu.command.BasicCommand): | |
def __init__(self): | |
lxu.command.BasicCommand.__init__(self) |
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 lxu.select | |
class ReferencedItems: | |
def __init__(self, scene): | |
self.mScene = lx.object.Scene(scene) | |
self.mSceneFilename = self.mScene.Filename() | |
self.mItems = [] | |
def AddItem(self, item): | |
print item |
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
class SomeInterface : | |
public CLxImpl_Foo | |
{ | |
public: | |
class MyPolymorph : | |
public CLxPolymorph<SomeInterface> | |
{ | |
public: | |
virtual void | |
SetCOM( |
NewerOlder