http://dl.dropbox.com/u/34893475/exportObjSeq.mel
CODE
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// RF2011
////////////////////////////////////////////////////////////////////////////////
// GUI
////////////////////////////////////////////////////////////////////////////////
if ( `window -exists eObjS` ) {
deleteUI eObjS;
}
window -widthHeight 263 300 -t "exportObjSequence" eObjS;
columnLayout -columnWidth 240 -height 275 ;
text -height 20 -label "export selected objects as obj sequence" -width 230;
separator -height 17 -width 290;
text -height 20 -label "SequenceName" -width 80;
textField -height 23 -width 200 exportedSequence;
separator -height 17 -width 290;
radioButtonGrp -numberOfRadioButtons 2 -label "Groups" -labelArray2 "Off" "On" -select 1 -width 400 rbGGroups;
radioButtonGrp -numberOfRadioButtons 2 -label "pointGroups" -labelArray2 "Off" "On" -select 2 rbGpointGroups ;
radioButtonGrp -numberOfRadioButtons 2 -label "Materials" -labelArray2 "Off" "On" -select 2 rbGMaterials ;
radioButtonGrp -numberOfRadioButtons 2 -label "Smoothing" -labelArray2 "Off" "On" -select 2 rbGSmoothing ;
radioButtonGrp -numberOfRadioButtons 2 -label "Normals" -labelArray2 "Off" "On" -select 2 rbGNormals ;
separator -height 17 -width 290;
checkBox -height 28 -label "useSceneRange" -width 100 -v true -ofc "allowCustomFrames" -onc " forbidCustomFrames" cBuSR;
text -height 20 -label "startFrame endFrame" -width 160;
rowLayout -columnWidth2 100 100 -height 23 -numberOfColumns 2 -width 200;
intField -height 23 -width 100 -en false -v (`playbackOptions -q -minTime`) startFrame;
intField -height 23 -width 100 -en false -v (`playbackOptions -q -maxTime`) endFrame ;
setParent ..;
separator -height 17 -width 290;
checkBox -height 28 -label "useDefaultLocation__workspace/data/" -width 250 -v true -onc "forbidCustomPath" -ofc "allowCustomPath" cBudP ;
textFieldButtonGrp -text "setPath" -buttonLabel "Browse" -bc "getPAth"-adj true -cw1 200 -cal 1 left -en false tFBGBrowse ;
separator -height 17 -width 302;
button -height 45 -label "createObjSequece" -c "OBJExportProc" -width 290;
showWindow;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////UI Procs and Vars
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
proc allowCustomFrames()
{
intField -e -en true startFrame;
intField -e -en true endFrame;
}
proc forbidCustomFrames()
{
intField -e -en false startFrame;
intField -e -en false endFrame;
}
proc allowCustomPath()
{
textFieldButtonGrp -e -en true tFBGBrowse;
}
proc forbidCustomPath()
{
textFieldButtonGrp -e -en false tFBGBrowse;
}
proc getPAth()
{
string $filename[] = `fileDialog2 -fileMode 3 -caption "setPath"`;
textFieldButtonGrp -edit -text $filename tFBGBrowse ;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////OBJExportProc
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
proc OBJExportProc()
{
//////////////////emty Variables
int $rf_startFrame ;
int $rf_endFrame ;
//////////////////Get Workspace
string $workspace = `workspace -q -rd`;
print $workspace ;
string $dataFolder ="data" ;
/////////////////getUI informations
string $seqName = `textField -q -text exportedSequence` ;
print $seqName ;
int $rBgG =`radioButtonGrp -q -select rbGGroups` ;
int $rBgPG =`radioButtonGrp -q -select rbGpointGroups` ;
int $rBgM =`radioButtonGrp -q -select rbGMaterials` ;
int $rBgS =`radioButtonGrp -q -select rbGSmoothing` ;
int $rBgN =`radioButtonGrp -q -select rbGNormals` ;
////////////////Ui if statements
////////switchCase start-EndFrame
int $frameCheckBox = `checkBox -q -v cBuSR` ;
switch($frameCheckBox) {
case 1 :
int $rf_startFrame = `playbackOptions -q -minTime` ;
int $rf_endFrame = `playbackOptions -q -maxTime` ;
break;
default :
int $rf_startFrame = `intField -q -v startFrame` ;
int $rf_endFrame =` intField -q -v endFrame` ;
}
////////switchCase outPutPath
int $frameCheckBox2 = `checkBox -q -v cBudP` ;
print $frameCheckBox2 ;
switch($frameCheckBox2) {
case 1 :
string $outputPath = ($workspace + $dataFolder );
break;
default :
string $outputPath =`textFieldButtonGrp -q -tx tFBGBrowse` ;
}
////////set Obj Options
string $objOptions = ("\"" + "groups="+($rBgG-1)+";ptgroups="+($rBgPG-1)+";materials="+($rBgM-1)+";smoothing="+($rBgS-1)+";normals="+($rBgN-1)+ "\"") ;
print $objOptions ;
for( $i=$rf_startFrame; $i<($rf_endFrame+1); ++$i )
{
currentTime -e $i ;
file -force -options $objOptions -typ "OBJexport" -pr -es ($outputPath + "/" + $seqName + "_" + $i + ".obj") ;
}
}
JT Casino and Hotel Tickets - JamBase
AntwortenLöschenBuy tickets for 부천 출장마사지 upcoming 김제 출장샵 events and events at JT Casino and Hotel in Tunica 경상북도 출장샵 on JT. Learn more.Jan 7, 2022The Miss America 100th Sat, Jan 8, 2022The Miss America 100th Sat, Feb 5, 2022The Miss America 전주 출장안마 100th 강원도 출장안마