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 pymel.core as pm | |
# Select joint chain. | |
# On selected joints. | |
# Create a local oriented control. | |
joint_system = pm.ls(selection=True, dag=True) | |
last_control = None | |
# Loop through selected joints |
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 script will create an attribute called joint_vis on the first selected and then connect it to the visibility to the second selected. | |
You wll need to have two object in your scene selected to make this example work. | |
Mainly this script is a demo of connecting and disconecting attributes using pymel. | |
''' | |
import pymel.core as pm | |
selected = pm.ls(selection=True) |
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
''' | |
Copy Pivot | |
by TELIMS | |
How to Work: | |
Select object with pivot you want to change too. | |
Select object who's pivot you want to change. | |
If selecting multiple objects, the first selected object will |
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
''' | |
TELIMS - Color Curves | |
How to Use: | |
import telims_color_curves_wireframe | |
reload(telims_color_curves_wireframe) | |
Select 1 or multiple curves > run Script | |
Enter Yellow, Red or blue |
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
''' | |
controls.py | |
Michael Clavan | |
import controls | |
reload(controls) | |
''' |
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 pymel.core as pm | |
selected_material = pm.ls(selection=True)[0] | |
# Printing out the material type will give you the information you want to compare. | |
print selected_material.type() | |
# Here is a comparison check between the mental ray material and your target. | |
# selected_material.type() == 'mia_material_x' |
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 pymel.core as pm | |
selected_vtx = pm.ls(selection=True)[0] | |
locator_1 = pm.spaceLocator(name='name_locator') | |
locator_2 = pm.spaceLocator(name='name_locatorChild') | |
# Select the driver (vtx) and the driven locator 1. | |
pm.select(selected_vtx, locator_1, r=True) |
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
def get_icon_path(icon_name, icon_folder='icons'): | |
''' | |
The point of this function is ot return the location of | |
a icon in an adjacent folder next to the script. | |
Make sure ot import this script into the scirpt you want to use it. | |
Then you can use the path_tools.get_icon_path('icon.png') anywhere you | |
need to implant an image path. | |
How to Run: |
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 pymel.core as pm | |
current_transforms = pm.ls(selection=True, dag=True, type='transform') | |
controls = [] | |
for transform_node in current_transforms: | |
if transform_node.getShapes(): | |
controls.append(transform_node) | |
print 'You got {0} controls'.format(controls) |
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
''' | |
PySide Session 2 - Notes | |
''' | |
''' | |
Packages | |
''' | |
# Window flags |
OlderNewer