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 | |
''' | |
This script when attached to a breakpoint will continue lldb if the provided | |
function doesn't appear in the current backtrace. | |
To use this script, add a file called .lldbinit to your home directory, | |
with the following line: | |
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
/* | |
* This demonstrates how to evaluate a particle source for it's particles. | |
* By default, only position, transform and ID are evaluated, however it | |
* could easily be extended to support other types. | |
* | |
* To evaluate particles, you must provide a TriangleSoup to the Tableau, | |
* allowing it populate your soup with the particle data. This is very | |
* similar to reading surfaces, but we only care about vertex data, not | |
* polygons. | |
* |
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 | |
''' | |
Notifier Command | |
Demonstrates how to write an executable and queryable command. | |
The difference is that this command will listen for state changes | |
in a scene. If the selection changes, then the command will check | |
its enable/disable state and force any form it's embedded into |
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
/* | |
* | |
* This example demonstrates how to manually implement a tool operation | |
* item. | |
* | |
*/ | |
#include <lxsdk/lx_mesh.hpp> | |
#include <lxsdk/lx_tool.hpp> | |
#include <lxsdk/lx_toolui.hpp> | |
#include <lxsdk/lx_vector.hpp> |
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
#!/usr/bin/env python | |
import lx | |
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
Instance * | |
getInstance ( | |
ILxUnknownID item) | |
{ | |
CLxLoc_PackageInstance pkgInstance (item); | |
CLxSpawner <Instance> spawn ("myInstance"); | |
if (pkgInstance.test ()) | |
return spawn.Cast (pkgInstance); | |
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
/* | |
* | |
* modifierSample.cpp | |
* | |
* This sample plugin demonstrates how to create a very simple and pointless | |
* modifier. The modifier attaches to every light in the scene and sets the | |
* light radiance value to the distance from the center of the world. | |
* | |
*/ |
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 <lx_plugin.hpp> | |
#include <lxu_command.hpp> | |
/* | |
* The server name is the name of the command that is used to run the command | |
* in modo. The argument name is the name of the argument that will define the | |
* material mask. | |
*/ | |
#define SERVER_NAME "command.demo" |
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
/* | |
This snippet is to demonstrate how to write to a matrix channel | |
in modo from an eval modifier. This is the correct way to write | |
to a matrix. This does assume that you have set the matrix channel | |
you want to drive as a channel for the modifier, using something like: | |
eval.AddChan(item_loc, LXsICHAN_XFRMCORE_WPOSMATRIX, LXfECHAN_WRITE); | |
in your modifier constructor. This method will drive the matrix | |
channel directly, so instead of using the local channels to calculate | |
the world SRT, it'll use the values the modifier provides it with. | |
*/ |