Napisano 23 Listopad 200717 l Czesc! Proszę o podpowiedz jak właściwie podlaczyc skrypt do utility. Chcialabym miec mozliwosc zmiany wartosci w skrypcie za pomoca spinerow itd ale za diabla nie wiem jak to ugryzc. Dzięki za pomoc strChosenName = getSaveFileName types:"3ds(*.3ds)|*.3ds|All|*.*|" strBaseName = (getFilenamePath strChosenName) + (getFilenameFile strChosenName) escapeEnable = true progressStart "exporting..." DisableSceneRedraw() iFrame=0 for tmCounter = animationRange.start to animationRange.end by 4 do ( sliderTime = tmCounter offset = (tmCounter - animationRange.start) as float total = (animationRange.end - animationRange.start) as float progressUpdate (offset / total * 100) iDigit10 = iFrame/10 iDigit1 = (mod iFrame 10) as integer str = strBaseName + (iDigit10 as string) + (iDigit1 as string) + ".3ds" if getProgressCancel() then exit exportFile str #noPrompt iFrame = iFrame + 1 ) EnableSceneRedraw() progressEnd() utility savesequence "Export" ( label l01 "select frames:" spinner start "From:" type:#integer range:[0,1000,animationrange.start] spinner end "To:" type:#integer range:[0,1000,200] --animationrange.end] label l02 " " spinner every "every nth frame:" type:#integer range:[0,10,4] label l03 "mesh name:" edittext mesh_name " " text:"mesz" button export "Export" on export pressed do ;)
Napisano 23 Listopad 200717 l Sam skrypt wrzucasz do zdarzenia on export pressed do ( --tutaj ) Same wartosci ze spinnerow pobierasz tak: spinner_name.value, edittextow edittext_name.text itd. Ogolnie w helpie do kazdego elementu interfejsu masz opis jak pobrac z niego wartosc.
Napisano 23 Listopad 200717 l Autor Dziękuję za podpowiedź! Działa ale nadal nie wiem jak zrobic zeby spinner_every.value ladowala sie w miejscu by 4 for tmCounter = animationRange.start to animationRange.end by 4 do w helpie może jest gdzies zaszyta odpowiedz ale ja trafilam jedynie na util ze zmieniajaca sie srednica kulki ... i nie daję rady Myslisz o maxscript reference czy tak?
Napisano 23 Listopad 200717 l Dziękuję za podpowiedź! Działa ale nadal nie wiem jak zrobic zeby spinner_every.value ladowala sie w miejscu by 4 for tmCounter = animationRange.start to animationRange.end by 4 do w helpie może jest gdzies zaszyta odpowiedz ale ja trafilam jedynie na util ze zmieniajaca sie srednica kulki ... i nie daję rady Myslisz o maxscript reference czy tak? Zwyczajnie wstawiasz to w miejsce 4: for tmCounter = animationRange.start to animationRange.end by spinner_every.value do Oczywiscie chodzi o maxscript reference.
Napisano 23 Listopad 200717 l Autor Niestety ten "trzeci" mówi: MAXScript Rollout Handler Exception: -- Unknown property: "value" in undefined spinner_every: undefined hmm... przecież wprowadzam wartosc w spinerze np 6
Napisano 23 Listopad 200717 l Autor utility savesequence "ver 06" ( label l01 "select frames:" spinner RangeStart_Spn "From:" type:#integer range:[0,1000,0] spinner RangeEnd_Spn "To:" type:#integer range:[0,1000,12] label l02 " " spinner RangeStep_Spn "every nth frame:" type:#integer range:[0,10,2] label l03 "mesh name:" edittext Mesh_name_Txt " " text:"mesh" button export "Export" on export pressed do ( strChosenName = getSaveFileName types:"3ds(*.3ds)|*.3ds|All|*.*|" strBaseName = (getFilenamePath strChosenName) + (getFilenameFile strChosenName) escapeEnable = true progressStart "exporting..." DisableSceneRedraw() iFrame=0 animationRange = interval RangeStart_Spn.value RangeEnd_Spn.value for tmCounter = animationRange.start to animationRange.end by RangeStep_Spn.value do ( sliderTime = tmCounter offset = (tmCounter - animationRange.start) as float total = (animationRange.end - animationRange.start) as float progressUpdate (offset / total * 100) iDigit10 = iFrame/10 iDigit1 = (mod iFrame 10) as integer str = strBaseName + (iDigit10 as string) + (iDigit1 as string) + ".3ds" if getProgressCancel() thenexit exportFile str #noPrompt iFrame = iFrame + 1 ) EnableSceneRedraw() progressEnd() )) ok poprawilam. wszystko gra oprocz mesh name. podpowiesz co przestawić? teraz tmcounter pochodzi z wykopalisk cgtalku ;)
Napisano 24 Listopad 200717 l Nie wiem dokladnie w ktorym miejscu chcesz wykorzystac nazwe obiektu ale domyslam sie ze chodzi ci o to zeby exportowac go bez calej reszty sceny. W takim wypadku musisz zrobic cos takiego: zaznaczasz obiekt select (getNodeByName Mesh_name_Txt.text) i exportujesz wylacznie zaznaczone exportFile str #noPrompt selectedOnly:true
Napisano 24 Listopad 200717 l Autor selectedOnly:true bardzo wazne zapomnialam o tym! p.s.2 selekcje robie na razie myszką ;) Edit: Wygląda na grand finale! utility savesequence "ver 14" ( label l01 "select frames:" spinner RangeStart_Spn "From:" type:#integer range:[0,1000,0] spinner RangeEnd_Spn "To:" type:#integer range:[0,1000,208] label l02 " " spinner RangeStep_Spn "every nth frame:" type:#integer range:[0,50,50] label l03 "path:" edittext MeshName_Txt " " text:"C:\morph\mymesh" button export "Export" on export pressed do ( strBaseName = MeshName_Txt.text escapeEnable = true progressStart "exporting..." DisableSceneRedraw() iFrame=0 animationRange = interval RangeStart_Spn.value RangeEnd_Spn.value for tmCounter = animationRange.start to animationRange.end by RangeStep_Spn.value do ( sliderTime = tmCounter offset = (tmCounter - animationRange.start) as float total = (animationRange.end - animationRange.start) as float progressUpdate (offset / total * 100) iDigit10 = iFrame/10 iDigit1 = (mod iFrame 10) as integer str = strBaseName + (iDigit10 as string) + (iDigit1 as string) + ".3ds" if getProgressCancel() thenexit exportFile str #noprompt selectedOnly:true iFrame = iFrame + 1 ) EnableSceneRedraw() progressEnd() )) Hura! Dzięki za pomoc lechoo!!! Miłego weekendu!!!
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto