Created
August 29, 2015 11:28
-
-
Save SEVEZ/7f316e3038bccb50fb55 to your computer and use it in GitHub Desktop.
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
import maya.cmds as cmds | |
import maya.mel as mel | |
import maya.OpenMaya as om | |
#Add Render Element Extra_Tex | |
mel.eval("vrayAddRenderElement ExtraTexElement") | |
#Rename Extra_Tex | |
cmds.rename("vrayRE_Extra_Tex", "vrayRE_Extra_Tex_PP") | |
#Set Consider for Anti-Aliasing to 0 | |
cmds.getAttr("vrayRE_Extra_Tex_PP.vray_considerforaa_extratex") | |
cmds.setAttr("vrayRE_Extra_Tex_PP.vray_considerforaa_extratex", 0) | |
#Set Filtering to 0 | |
cmds.getAttr("vrayRE_Extra_Tex_PP.vray_filtering_extratex") | |
cmds.setAttr("vrayRE_Extra_Tex_PP.vray_filtering_extratex", 0) | |
#Set Filename suffix to "PointPosition" | |
cmds.getAttr("vrayRE_Extra_Tex_PP.vray_name_extratex") | |
cmds.setAttr("vrayRE_Extra_Tex_PP.vray_name_extratex", "PointPosition", type="string") | |
#Create a Sampler Info Node | |
cmds.createNode("samplerInfo", n="samplerInfo_PP") | |
#Connect Sampler Info to PP | |
cmds.connectAttr("samplerInfo_PP.pointWorldX", "vrayRE_Extra_Tex_PP.vray_texture_extratexR") | |
cmds.connectAttr("samplerInfo_PP.pointWorldY", "vrayRE_Extra_Tex_PP.vray_texture_extratexG") | |
cmds.connectAttr("samplerInfo_PP.pointWorldZ", "vrayRE_Extra_Tex_PP.vray_texture_extratexB") | |
#Deselect SamplerInfo | |
cmds.select("samplerInfo_PP", d=True) | |
#Display Render Element PointPosition created | |
om.MGlobal.displayInfo("Render Element PointPosition created") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment