There is no excerpt because this is a protected post.
Tag: python
Protected: MAP_module.py
by admin •
There is no excerpt because this is a protected post.
textIn() / readFile()
by admin •
def textIn(): import EasyDialogs input_file = EasyDialogs.AskFileForOpen() wanted=unicode import os input_text = os.path.basename(input_file) input2_text = os.path.dirname(os.path.abspath(input_text)) output_text = os.path.splitext(input2_text)[0]+ ‘\\’ + os.path.splitext(input_text)[0] + “.csv” fileLocation = pm.text(‘File_Location_Label’, e=True, l=output_text) def readFile(): import pymel.core as pm import re dataFile = pm.text(‘File_Location_Label’, q=True, l=True) dataPath = dataFile f = open (dataPath) line = f.readline() while line: parts…
curve fixer – gui creator maya
by admin •
import pymel.core as pm pm.shadingNode (‘ramp’,asTexture=True,n=”curveRamp”) pm.shadingNode (‘place2dTexture’,asUtility=True,n=”curveRamp_place2dTexture”) pm.connectAttr (“curveRamp_place2dTexture.outUV”, “curveRamp.uv”); pm.connectAttr( “curveRamp_place2dTexture.outUvFilterSize”, “curveRamp.uvFilterSize”); pm.disconnectAttr (“curveRamp_place2dTexture.outUV”, “curveRamp.uvCoord”); if (pm.window(‘Normal_Curve_Creator’,exists=True)): pm.deleteUI(‘Normal_Curve_Creator’) import curve_fixer reload(curve_fixer) dialog2 = pm.loadUI(f=”C:/Users/luke/Documents/QTDESIGNER/rebuild_curve.ui”) allowedAreas = [‘right’, ‘left’] pm.showWindow() pm.dockControl(area=’left’,content=dialog2,allowedArea=allowedAreas,l=’Normal_Curve_Creator’)
Text_Output.py
by admin •
def textOut(): fileName = pm.fileDialog2(fileFilter=’*.csv’, caption=’Write to a csv file’) fileWrite = open(fileName[0], ‘w’) firstFrame = pm.intSlider(‘StartFrameSlider’, query=True, value=True) lastFrame = pm.intSlider(‘EndFrameSlider’, query=True, value=True) # animation time range animTimeRange = pm.checkBox(‘AnimBackRange_checkBox’, query=True, value=True) if animTimeRange == True: animStart = pm.playbackOptions(query=True,animationStartTime=True) animEnd = pm.playbackOptions(query=True,animationEndTime=True) firstFrame = int(animStart) lastFrame = int(animEnd) # playback time range playBackRange =…