2015
12.07


하드코딩이기 때문에 다른사람이 사용하기에는 조금 수정이 필요.

씬에 있는 Dummy04와 camera_left를 이름으로 검색해서 렌더를 건다.

Dummy04가 45도씩 돌면서 밑에 딸려있는 camera_left에서 렌더를 거는형태. 





try(DestroyDialogAutoSpriteRender)catch()

rollout AutoSpriteRender "AutoSpriteRender"

(

local tempfilename = "D:\\Render\\Unit_Red_Yeti01_Attack"

group "File:"

    (

 label lbl_A "Save Loacation"

 edittext text1 text:"D:\\Render\\Unit_Red_Yeti01_Attack"

on text1 entered txt do ( tempfilename = txt )

)

group "Frame:"

    (

spinner stFr "StartFrame : " range:[0,1000,0] type:#integer

spinner edFr "EndFrame : " range:[0,1000,13] type:#integer 

    )

 local array = #(false,false,false,false,false,false,false,false)

 group "Rotation:"

    (

 checkbutton a4 "BL" across:3  checked:true  width:45 height:20

 checkbutton a5 "B" checked:true  width:45 height:20

 checkbutton a6 "BR" checked:true  width:45 height:20

 checkbutton a3 "L" across:2  checked:true  width:45 height:20

 checkbutton a7 "R"  checked:true  width:45 height:20

 checkbutton a2 "FL"  across:3 checked:true  width:45 height:20

 checkbutton a1 "F"  checked:true  width:45 height:20

 checkbutton a8 "FR"  checked:true  width:45 height:20


checkbox ckbx1 "Start RotateZ from 0" checked:true

    )

 group "Output:"

    (

spinner wid "Width : " range:[0,1000,256] type:#integer

spinner hei "Height : " range:[0,1000,256] type:#integer 

)

 group "Render:"

    (

 button start "StartRender" width:150 height:35

on start pressed do

(

array[1] = a1.state

array[2] = a2.state 

array[3] = a3.state 

array[4] = a4.state

array[5] = a5.state

array[6] = a6.state

array[7] = a7.state

array[8] = a8.state


cRenderCam = $Camera_left


if ckbx1.state == true do $Dummy004.rotation.z = 0

for rotateflag = 1 to 8 do

(

if array[rotateflag] == true do

(

for i = stFr.value to edFr.value do

(

sliderTime = i   

case rotateflag of

(

1: filename = tempfilename + "_F_"

2: filename = tempfilename + "_FL_"

3: filename = tempfilename + "_L_"

4: filename = tempfilename + "_BL_"

5: filename = tempfilename + "_B_"

6: filename = tempfilename + "_BR_"

7: filename = tempfilename + "_R_"

8: filename = tempfilename + "_FR_"

)

f_name = filename  +(formattedPrint i format:"04d")+ ".png"

Render outputfile:f_name vfb:false outputwidth:wid.value outputheight:hei.value

)

)

currentMatrix = $Dummy004.transform

preRotate currentMatrix (eulertoquat (eulerAngles 0 0 45))

$Dummy004.transform = currentMatrix

)

)

)

 group "How to Use:"

    (

label h1 "1.file name will be saved"

label h2 "with postfix of Rotation"

label h5 "2.rendered Camera name is"

label h6 "Camera_left under Dummy04."

label h7 "3.other option isn't here"

label h8 "will be Scene render option."

)

)

createdialog AutoSpriteRender 170 530




COMMENT