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
""" | |
MIT License | |
Copyright (c) 2019 Roy Nieterau | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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 maya.cmds as cmds | |
import maya.OpenMaya as omo | |
# (Open Maya Old) | |
def soft_selection_weights(): | |
''' create and return a list of the soft selection weights ''' | |
#TODO: Would be nice to rewrite this using the new API. Low priority. | |
#TODO: Debug on multiple selections | |
# temporary hack. Turn off symmetry when reading MRichSelection until I learn to use symmetry. |
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
""" | |
MIT License | |
Copyright (c) [year] [fullname] | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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/python3 | |
import hashlib, sys | |
""" | |
Command line tool to get checksums in python. | |
Supply filepath for file to process, and which hash | |
method to use. | |
""" |
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
#!/usr/bin/env python | |
# To install this plugin, simply copy this file (selectAxisUVs.py) into folder called "lxserv" in your modo scripts folder (and restart modo, if it's open). | |
# If you are unsure where your modo scripts folder is, you can open modo, then select System > Open User Scripts Folder. | |
# If there is no folder called "lxserv" in your MODO Scripts folder, simply create one and then put this file in there. | |
# Once MODO has been restarted, you can run the command via ffr.selectaxisuv | |
# | |
# Any issues, please drop me a line at [email protected]. | |
# | |
# James O'Hare |
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 | |
''' | |
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 |