Last active
August 29, 2015 14:09
-
-
Save JFlynnXYZ/8c3c5edfb871d809b97a to your computer and use it in GitHub Desktop.
List Shape/Mesh Relatives for Selected Objects and Render Pass Primary Visibility
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
#Creats a list of all selected objects name of shape/mesh node | |
import maya.cmds as cmds | |
cmds.listRelatives(cmds.ls(selection=True), type='mesh') |
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
#Changes primary visibility for the currently selected objects on the current render layer | |
import maya.cmds as cmds | |
for shape in cmds.listRelatives(cmds.ls(selection=True), type='mesh'): | |
cmds.setAttr('%s.primaryVisibility' % shape, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment