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 | |
""" | |
Group Statistics Command | |
------------------------ | |
A simple command that enumerates all selected groups | |
and returns a number of items and channels in every group | |
Author: Lukasz Pazera |
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 | |
''' | |
List Item Transforms | |
-------------------- | |
Plugin implements item.listXfrm command that lists | |
all selected item's transforms in Event Log | |
''' |
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 | |
""" Get Channel Selection. | |
There is no utility class for handling channel selection | |
like there is for items and scenes so it has to be done manually. | |
""" | |
import lx | |
selection_service = lx.service.Selection() |
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 | |
""" Custom item drawing a shape. | |
---------------------------- | |
Implements a custom item that draws a simple shape in viewport. | |
The item is of Locator supertype. | |
""" | |
import lx | |
import lxifc |
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 | |
""" Match Item Transforms. | |
Command matches transforms of one item to another. | |
Select 2 or more items and all items will be matched to last selected one. | |
I'm not author of this command. | |
This is python translation of Matt Cox's matchXfrm.cpp C++ equivalent | |
and was done as an exercise while learning MODO python API. |
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 | |
""" Aim Item Command. | |
Command sets one item (source item) rotation so that it | |
points at another item (target item) with an upvector defined | |
by third item (up vector item). | |
Command essentially replicates what Direction Constraint does. | |
Only it just applies rotation to the source item only at a current frame and action. |
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 | |
""" Short snippet demonstrating how you can edit scene item's name using MODO 701 Python API. | |
""" | |
import lx | |
import lxu.select | |
PREFIX = 'prefix_' |
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 | |
""" Snippet demonstrates how to filter item selection out so it contains | |
only items of required type (group items in this case). | |
Filtered items are printed out in Event Log. | |
""" | |
import lx | |
import lxu.select |
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 | |
""" Log allows for writing messages into choosen log subsystem. | |
Messages can have simple hierarchical format: | |
- Head Message, | |
- Child Message 1, | |
- Child Message 2, | |
- Child Message 3, | |
- etc. |
OlderNewer