/* ----------------------------------------------------------------------------- This source file is part of OpenSpace3D For the latest info, see http://www.openspace3d.com Copyright (c) 2012 I-maginer This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt ----------------------------------------------------------------------------- */ fun cbCloseEdit(p)= let p -> [ctrltexture ctrlobjname ctrlmatname ctrlmattech ctrlmatpass ctrlmattex ctrlpath ctrlisurl ctrlurl ctrlstereo ctrlnavbar ctrlshowframe ctrlautoplay ctrlloop ctrlvolume ctrl3daudio ctrlattenuation ctrlinner ctrlouter ctrloutervol ctrlbackground ctrlkeepratio ctrlratioref ctrlwidth ctrlheight ctrlposx ctrlposy ctrlxpercent ctrlypercent ctrlwpercent ctrlhpercent ctrlxoffset ctrlyoffset ctrlwoffset ctrlhoffset ctrlxalign ctrlyalign ctrlopacity ctrltexturequality ctrlzorder ctrltrans ctrlfocus ctrltopfocus ctrltop ctrlshow ctrlinit ctrlenableeffect] in let getEdCtrlCheckState ctrltexture -> istexture in let getEdCtrlTextLineValue ctrlobjname -> objname in let getSelectedEdCtrlSelect ctrlmatname -> matname in let getSelectedEdCtrlSelectPos ctrlmattech -> technique in let getSelectedEdCtrlSelectPos ctrlmatpass -> pass in let getSelectedEdCtrlSelectPos ctrlmattex -> texture in let getEdCtrlTextLineValue ctrlpath -> path in let getEdCtrlCheckState ctrlisurl -> isurl in let getEdCtrlTextLineValue ctrlurl -> url in let getSelectedEdCtrlSelectPos ctrlstereo -> stereo in let getSelectedEdCtrlSelectPos ctrlnavbar -> navbar in let getEdCtrlCheckState ctrlshowframe -> showframe in let getEdCtrlCheckState ctrlautoplay -> autoplay in let getEdCtrlCheckState ctrlloop -> loop in let getEdCtrlCheckState ctrlenableeffect -> enableeffect in let ftoi getEdCtrlFloatValue ctrlvolume -> volume in let getEdCtrlCheckState ctrl3daudio -> is3daudio in let getEdCtrlFloatValue ctrlattenuation -> attenuation in let ftoi getEdCtrlFloatValue ctrlinner -> innerangle in let ftoi getEdCtrlFloatValue ctrlouter -> outerangle in let ftoi getEdCtrlFloatValue ctrloutervol -> outervol in let getEdCtrlCheckState ctrlbackground -> background in let getEdCtrlCheckState ctrlkeepratio -> keepratio in let getSelectedEdCtrlSelectPos ctrlratioref -> ratioref in let ftoi getEdCtrlFloatValue ctrlposx -> posx in let ftoi getEdCtrlFloatValue ctrlposy -> posy in let ftoi getEdCtrlFloatValue ctrlwidth -> width in let ftoi getEdCtrlFloatValue ctrlheight -> height in let getEdCtrlCheckState ctrlxpercent -> xpercent in let getEdCtrlCheckState ctrlypercent -> ypercent in let getEdCtrlCheckState ctrlwpercent -> wpercent in let getEdCtrlCheckState ctrlhpercent -> hpercent in let ftoi getEdCtrlFloatValue ctrlxoffset -> xoffset in let ftoi getEdCtrlFloatValue ctrlyoffset -> yoffset in let ftoi getEdCtrlFloatValue ctrlwoffset -> woffset in let ftoi getEdCtrlFloatValue ctrlhoffset -> hoffset in let getSelectedEdCtrlSelectPos ctrlxalign -> xalign in let getSelectedEdCtrlSelectPos ctrlyalign -> yalign in let ftoi getEdCtrlFloatValue ctrlopacity -> opacity in let ftoi getEdCtrlFloatValue ctrltexturequality -> texturequality in let ftoi getEdCtrlFloatValue ctrlzorder -> zorder in let getEdCtrlCheckState ctrltrans -> transparency in let getEdCtrlCheckState ctrlfocus -> focus in let getEdCtrlCheckState ctrltopfocus -> topfocus in let getEdCtrlCheckState ctrltop -> allwaysontop in let getEdCtrlCheckState ctrlshow -> show in let getEdCtrlCheckState ctrlinit -> init in ["istexture" itoa istexture]:: ["object" objname]:: ["material" matname]:: ["technique" itoa technique]:: ["pass" itoa pass]:: ["texture" itoa texture]:: ["isurl" itoa isurl]:: ["url" url]:: ["stereo" itoa stereo]:: ["navbar" itoa navbar]:: ["showframe" itoa showframe]:: ["path" path]:: ["autoplay" itoa autoplay]:: ["loop" itoa loop]:: ["enableeffect" itoa enableeffect]:: ["volume" itoa volume]:: ["is3daudio" itoa is3daudio]:: ["attenuation" ftoa attenuation]:: ["innerangle" itoa innerangle]:: ["outerangle" itoa outerangle]:: ["outervol" itoa outervol]:: ["background" itoa background]:: ["keepratio" itoa keepratio]:: ["ratioref" itoa ratioref]:: ["posx" itoa posx]:: ["posy" itoa posy]:: ["width" itoa width]:: ["height" itoa height]:: ["xpercent" itoa xpercent]:: ["ypercent" itoa ypercent]:: ["wpercent" itoa wpercent]:: ["hpercent" itoa hpercent]:: ["xoffset" itoa xoffset]:: ["yoffset" itoa yoffset]:: ["woffset" itoa woffset]:: ["hoffset" itoa hoffset]:: ["xalign" itoa xalign]:: ["yalign" itoa yalign]:: ["opacity" itoa opacity]:: ["texturequality" itoa texturequality]:: ["zorder" itoa zorder]:: ["transparency" itoa transparency]:: ["focus" itoa focus]:: ["toponfocus" itoa topfocus]:: ["allwaysontop" itoa allwaysontop]:: ["show" itoa show]:: ["init" itoa init]:: nil;; fun fillMaterialTextureSelector(viewstr, ctrlselect, mat, tech, pass)= if mat == nil then nil else let V3DgetDefaultSession viewstr -> sessionstr in let SO3MaterialNumberOfTexturesByTechniqueAndPass mat tech pass -> size in let 0 -> i in let nil -> lmatname in ( while i < size do ( let SO3MaterialTextureUnitGetNameByIndex mat tech pass i -> matname in set lmatname = lcat lmatname matname::nil; set i = i + 1; ); fillEdCtrlSelect ctrlselect lmatname; ); 0;; fun cbMatPassName(ctrlstr, pos, elem, p)= let p -> [inst viewstr group ctrlmatname ctrlmattech ctrlmattex] in let getSelectedEdCtrlSelectPos ctrlmattech -> tech in let getSelectedEdCtrlSelect ctrlmatname -> matname in let V3DgetDefaultSession viewstr -> sessionstr in let if matname != nil then SO3SceneGetMaterial (V3DgetSession sessionstr) group matname else nil -> mat in fillMaterialTextureSelector viewstr ctrlmattex mat tech pos; 0;; fun fillMaterialPassSelector(viewstr, p, mat, tech)= let p -> [ctrlselect ctrlmatname ctrlmattech ctrlmattex] in if mat == nil then nil else let V3DgetDefaultSession viewstr -> sessionstr in let SO3MaterialNumberOfPassesByTechnique mat tech -> size in let 0 -> i in let nil -> lmatname in ( while i < size do ( let SO3MaterialPassGetNameByIndex mat tech i -> matname in let if (!strcmp matname "") then (itoa i) else matname -> matname in set lmatname = lcat lmatname matname::nil; set i = i + 1; ); fillEdCtrlSelect ctrlselect lmatname; fillMaterialTextureSelector viewstr ctrlmattex mat tech 0; ); 0;; fun cbMatTechniqueName(ctrlstr, pos, elem, p)= let p -> [inst viewstr group ctrlmatname ctrlmatpass ctrlmattex] in let getSelectedEdCtrlSelect ctrlmatname -> matname in let V3DgetDefaultSession viewstr -> sessionstr in let if matname != nil then SO3SceneGetMaterial (V3DgetSession sessionstr) group matname else nil -> mat in fillMaterialPassSelector viewstr [ctrlmatpass ctrlmatname ctrlstr ctrlmattex] mat pos; 0;; fun fillMaterialTechSelector(viewstr, p, mat)= let p -> [ctrlselect ctrlmatname ctrlmatpass ctrlmattex] in if mat == nil then nil else let V3DgetDefaultSession viewstr -> sessionstr in let SO3MaterialNumberOfTechniques mat -> size in let 0 -> i in let nil -> lmatname in ( while i < size do ( let SO3MaterialTechniqueGetNameByIndex mat i -> matname in set lmatname = lcat lmatname matname::nil; set i = i + 1; ); fillEdCtrlSelect ctrlselect lmatname; fillMaterialPassSelector viewstr [ctrlmatpass ctrlmatname ctrlselect ctrlmattex] mat 0; ); 0;; fun cbMatName(ctrlstr, pos, elem, p)= let p -> [inst viewstr group ctrlmattech ctrlmatpass ctrlmattex] in let V3DgetDefaultSession viewstr -> sessionstr in let if elem != nil then SO3SceneGetMaterial (V3DgetSession sessionstr) group elem else nil -> mat in fillMaterialTechSelector viewstr [ctrlmattech ctrlstr ctrlmatpass ctrlmattex] mat; 0;; fun fillMaterialSelector(viewstr, p, objname)= let p -> [inst ctrlselect ctrlmattech ctrlmatpass ctrlmattex] in if objname == nil then nil else let V3DgetDefaultSession viewstr -> sessionstr in let SO3SceneGetObject (V3DgetSession sessionstr) objname -> obj in let SO3EntityGetResourceGroup obj -> group in let SO3EntityMaterialList obj -> lmat in let nil -> lmatname in ( setEdCtrlSelectCb ctrlselect mkfun4 @cbMatName [inst viewstr group ctrlmattech ctrlmatpass ctrlmattex]; setEdCtrlSelectCb ctrlmattech mkfun4 @cbMatTechniqueName [inst viewstr group ctrlselect ctrlmatpass ctrlmattex]; setEdCtrlSelectCb ctrlmatpass mkfun4 @cbMatPassName [inst viewstr group ctrlselect ctrlmattech ctrlmattex]; let sizelist lmat -> size in let 0 -> i in while i < size do ( let nth_list lmat i -> mat in let SO3MaterialGetName mat -> matname in set lmatname = lcat lmatname matname::nil; set i = i + 1; ); fillEdCtrlSelect ctrlselect lmatname; fillMaterialTechSelector viewstr [ctrlmattech ctrlselect ctrlmatpass ctrlmattex] (SO3SceneGetMaterial (V3DgetSession sessionstr) group (hd lmatname)); ); 0;; fun cbSelectObj(val, type, p)= let p -> [inst winstr viewstr ctrlobjname ctrlmatname ctrlmattech ctrlmatpass ctrlmattex] in let V3DgetDefaultSession viewstr -> sessionstr in let SO3SceneGetObject (V3DgetSession sessionstr) val -> obj in if obj == nil then nil else ( setEdCtrlTextLineValue ctrlobjname val; fillMaterialSelector viewstr [inst ctrlmatname ctrlmattech ctrlmatpass ctrlmattex] val; ); 0;; fun cbCloseRes(ctrlbtn)= setEdCtrlButtonEnable ctrlbtn 1; 0;; fun cbBtnPickObj(ctrlbtn, p)= let p -> [inst winstr viewstr ctrlobjname ctrlmatname ctrlmattech ctrlmatpass ctrlmattex objname] in ( setEdCtrlButtonEnable ctrlbtn 0; dlgSelectPluginInstanceResource inst winstr iTypeEntity objname mkfun3 @cbSelectObj [inst winstr viewstr ctrlobjname ctrlmatname ctrlmattech ctrlmatpass ctrlmattex] mkfun1 @cbCloseRes ctrlbtn 0; ); 0;; fun cbDlgGetPath(pfile, p)= let p -> [inst ctrlbtn winstr ctrlpath ctrlurl ctrlisurl] in ( if pfile == nil then nil else let _PtoScol pfile -> file in if file == nil then ( _DLGMessageBox _channel winstr.EDW_win (loc "OS3DVIDEO_0009") (loc "OS3DVIDEO_0041") 0; 0; ) else ( setEdCtrlTextLineValue ctrlpath file; setEdCtrlTextLineValue ctrlurl nil; setEdCtrlCheckState ctrlisurl 0; 0; ); setEdCtrlButtonEnable ctrlbtn 1; ); 0;; fun cbBtnPickFile(ctrlbtn, p)= let p -> [inst winstr ctrlpath ctrlurl ctrlisurl] in let getEdCtrlTextLineValue ctrlpath -> path in let getPathFile path "" -> [fpath fname] in ( setEdCtrlButtonEnable ctrlbtn 1; let _GETdesktopSize -> [sw sh] in let getEdWindowPos mainInterf.MINT_winMain -> [nx ny] in let getEdWindowSize mainInterf.MINT_winMain -> [nmw nmh] in let [750 450] -> [iw ih] in let crEdOpenFileDialog _channel winstr nx + ((nmw / 2) - (iw / 2)) ny + ((nmh / 2) - (ih / 2)) iw ih "" ["Videos" "avi"::"mp4"::"webm"::"mpeg"::"mpg"::"mkv"::"ogv"::"m4v"::"flv"::nil]::["AVI" "avi"::nil]::["FLV" "flv"::nil]::["MKV" "mkv"::nil]::["MP4/H.264" "mp4"::nil]::["WebM" "webm"::nil]::["All" "*.*"::nil]::nil EDFILE_DIALOG_LIST_FOLDERS|EDFILE_DIALOG_SHOW_TOOLBAR nil path -> dlgfstr in ( setEdWindowIcon dlgfstr.EDFD_dialog sWinDlgIcon; setEdOpenFileDialogCb dlgfstr mkfun2 @cbDlgGetPath [inst ctrlbtn winstr ctrlpath ctrlurl ctrlisurl]; 0; ); ); 0;; fun cbCheckUrl(ctrl, state, p)= let p -> [ctrlurl ctrlpath pickbtn] in if state then ( setEdCtrlTextLineEnable ctrlurl 1 ; setEdCtrlTextLineValue ctrlpath nil; setEdCtrlButtonEnable pickbtn 0; ) else ( setEdCtrlTextLineEnable ctrlurl 0; setEdCtrlButtonEnable pickbtn 1; ); 0;; fun cbCheckBackground(ctrl, state, p)= let p -> [ctrlzorder ctrlfocus ctrltopfocus ctrltop] in if state then ( setEdCtrlFloatEnable ctrlzorder 0; setEdCtrlCheckEnable ctrlfocus 0; setEdCtrlCheckEnable ctrltopfocus 0; setEdCtrlCheckEnable ctrltop 0; ) else ( setEdCtrlFloatEnable ctrlzorder 1; setEdCtrlCheckEnable ctrlfocus 1; setEdCtrlCheckEnable ctrltopfocus 1; setEdCtrlCheckEnable ctrltop 1; ); 0;; fun cbCheckTexture(ctrl, state, p)= let p -> [pickbtn ctrlbackground ctrlkeepratio ctrlratioref ctrlposx ctrlxpercent ctrlxalign ctrlposy ctrlypercent ctrlyalign ctrlwpercent ctrlhpercent ctrlxoffset ctrlyoffset ctrlwoffset ctrlhoffset ctrlzorder ctrltopfocus ctrltop ctrlmatname ctrlmattech ctrlmatpass ctrlmattex ctrlfocus ctrl3daudio ctrlattenuation ctrlinner ctrlouter ctrloutervol] in if state then ( setEdCtrlCheckEnable ctrlbackground 0; setEdCtrlFloatEnable ctrlposx 0; setEdCtrlFloatEnable ctrlposy 0; setEdCtrlCheckEnable ctrlxpercent 0; setEdCtrlCheckEnable ctrlypercent 0; setEdCtrlSelectEnable ctrlxalign 0; setEdCtrlSelectEnable ctrlyalign 0; setEdCtrlCheckEnable ctrlwpercent 0; setEdCtrlCheckEnable ctrlhpercent 0; setEdCtrlFloatEnable ctrlxoffset 0; setEdCtrlFloatEnable ctrlyoffset 0; setEdCtrlFloatEnable ctrlwoffset 0; setEdCtrlFloatEnable ctrlhoffset 0; setEdCtrlFloatEnable ctrlzorder 0; setEdCtrlCheckEnable ctrltopfocus 0; setEdCtrlCheckEnable ctrltop 0; setEdCtrlSelectEnable ctrlmatname 1; setEdCtrlSelectEnable ctrlmattech 1; setEdCtrlSelectEnable ctrlmatpass 1; setEdCtrlSelectEnable ctrlmattex 1; setEdCtrlCheckEnable ctrlfocus 1; setEdCtrlButtonEnable pickbtn 1; setEdCtrlCheckEnable ctrl3daudio 1; setEdCtrlFloatEnable ctrlattenuation (getEdCtrlCheckState ctrl3daudio); setEdCtrlFloatEnable ctrlinner (getEdCtrlCheckState ctrl3daudio); setEdCtrlFloatEnable ctrlouter (getEdCtrlCheckState ctrl3daudio); setEdCtrlFloatEnable ctrloutervol (getEdCtrlCheckState ctrl3daudio); ) else if (getEdCtrlCheckState ctrlbackground) then ( setEdCtrlCheckEnable ctrlbackground 1; setEdCtrlFloatEnable ctrlposx 1; setEdCtrlFloatEnable ctrlposy 1; setEdCtrlCheckEnable ctrlxpercent 1; setEdCtrlCheckEnable ctrlypercent 1; setEdCtrlSelectEnable ctrlxalign 1; setEdCtrlSelectEnable ctrlyalign 1; setEdCtrlCheckEnable ctrlwpercent 1; setEdCtrlCheckEnable ctrlhpercent 1; setEdCtrlFloatEnable ctrlxoffset (getEdCtrlCheckState ctrlxpercent); setEdCtrlFloatEnable ctrlyoffset (getEdCtrlCheckState ctrlypercent); setEdCtrlFloatEnable ctrlwoffset (getEdCtrlCheckState ctrlwpercent); setEdCtrlFloatEnable ctrlhoffset (getEdCtrlCheckState ctrlhpercent); //setEdCtrlCheckEnable ctrldrag 0; setEdCtrlFloatEnable ctrlzorder 0; setEdCtrlCheckEnable ctrltopfocus 0; setEdCtrlCheckEnable ctrltop 0; setEdCtrlSelectEnable ctrlmatname 0; setEdCtrlSelectEnable ctrlmattech 0; setEdCtrlSelectEnable ctrlmatpass 0; setEdCtrlSelectEnable ctrlmattex 0; setEdCtrlButtonEnable pickbtn 0; setEdCtrlCheckEnable ctrlfocus 0; setEdCtrlCheckEnable ctrl3daudio 0; setEdCtrlFloatEnable ctrlattenuation 0; setEdCtrlFloatEnable ctrlinner 0; setEdCtrlFloatEnable ctrlouter 0; setEdCtrlFloatEnable ctrloutervol 0; ) else ( setEdCtrlCheckEnable ctrlbackground 1; setEdCtrlFloatEnable ctrlposx 1; setEdCtrlFloatEnable ctrlposy 1; setEdCtrlCheckEnable ctrlxpercent 1; setEdCtrlCheckEnable ctrlypercent 1; setEdCtrlSelectEnable ctrlxalign 1; setEdCtrlSelectEnable ctrlyalign 1; setEdCtrlCheckEnable ctrlwpercent (!(getEdCtrlCheckState ctrlkeepratio) || (getSelectedEdCtrlSelectPos ctrlratioref) == 0); setEdCtrlCheckEnable ctrlhpercent (!(getEdCtrlCheckState ctrlkeepratio) || (getSelectedEdCtrlSelectPos ctrlratioref) == 1); setEdCtrlFloatEnable ctrlxoffset (getEdCtrlCheckState ctrlxpercent); setEdCtrlFloatEnable ctrlyoffset (getEdCtrlCheckState ctrlypercent); setEdCtrlFloatEnable ctrlwoffset (getEdCtrlCheckState ctrlwpercent); setEdCtrlFloatEnable ctrlhoffset (getEdCtrlCheckState ctrlhpercent); setEdCtrlFloatEnable ctrlzorder 1; setEdCtrlCheckEnable ctrltopfocus 1; setEdCtrlCheckEnable ctrltop 1; setEdCtrlSelectEnable ctrlmatname 0; setEdCtrlSelectEnable ctrlmattech 0; setEdCtrlSelectEnable ctrlmatpass 0; setEdCtrlSelectEnable ctrlmattex 0; setEdCtrlButtonEnable pickbtn 0; setEdCtrlCheckEnable ctrlfocus 1; setEdCtrlCheckEnable ctrl3daudio 0; setEdCtrlFloatEnable ctrlattenuation 0; setEdCtrlFloatEnable ctrlinner 0; setEdCtrlFloatEnable ctrlouter 0; setEdCtrlFloatEnable ctrloutervol 0; ); 0;; fun cbCheck3dAudio(ctrl, state, p)= let p -> [ctrlattenuation ctrlinner ctrlouter ctrloutervol] in ( setEdCtrlFloatEnable ctrlattenuation state; setEdCtrlFloatEnable ctrlinner state; setEdCtrlFloatEnable ctrlouter state; setEdCtrlFloatEnable ctrloutervol state; ); 0;; fun cbRefreshBtn(pickbtn, p)= let p -> [ctrlobjname] in setEdCtrlTextLineValue ctrlobjname ""; 0;; fun cbRefreshBtnSpec(pickbtn, p)= let p -> [ctrlobjname ctrlmatname ctrlmattech ctrlmatpass ctrlmattex] in ( setEdCtrlTextLineValue ctrlobjname ""; fillEdCtrlSelect ctrlmatname nil; fillEdCtrlSelect ctrlmattech nil; fillEdCtrlSelect ctrlmatpass nil; fillEdCtrlSelect ctrlmattex nil; ); 0;; fun cbPercentCheck(ctrlstr, state, ctrlfloat)= setEdCtrlFloatEnable ctrlfloat state; 0;; fun cbRatioRef(ctrlstr, pos, elem, p)= let p -> [ctrltexture ctrlwidth ctrlheight ctrlwpercent ctrlhpercent ctrlwoffset ctrlhoffset] in ( setEdCtrlFloatEnable ctrlwidth !pos; setEdCtrlCheckEnable ctrlwpercent (!pos && !(getEdCtrlCheckState ctrltexture)); setEdCtrlFloatEnable ctrlheight pos; setEdCtrlCheckEnable ctrlhpercent (pos && !(getEdCtrlCheckState ctrltexture)); if (pos == 0) then // width as reference ( //setEdCtrlFloatValue ctrlheight 0.0; //setEdCtrlCheckState ctrlhpercent 0; setEdCtrlFloatEnable ctrlhoffset 0; //setEdCtrlFloatValue ctrlhoffset 0.0; setEdCtrlFloatEnable ctrlwoffset (getEdCtrlCheckState ctrlwpercent); ) else // height as reference ( //setEdCtrlFloatValue ctrlwidth 0.0; //setEdCtrlCheckState ctrlwpercent 0; setEdCtrlFloatEnable ctrlwoffset 0; //setEdCtrlFloatValue ctrlwoffset 0.0; setEdCtrlFloatEnable ctrlhoffset (getEdCtrlCheckState ctrlhpercent); ); ); 0;; fun cbKeepRatioCheck(ctrlstr, state, p)= let p -> [ctrlratioref ctrltexture ctrlwidth ctrlheight ctrlwpercent ctrlhpercent ctrlwoffset ctrlhoffset] in if (state) then ( setEdCtrlSelectEnable ctrlratioref 1; cbRatioRef ctrlratioref (getSelectedEdCtrlSelectPos ctrlratioref) nil [ctrltexture ctrlwidth ctrlheight ctrlwpercent ctrlhpercent ctrlwoffset ctrlhoffset]; ) else ( setEdCtrlFloatEnable ctrlwidth 1; setEdCtrlFloatEnable ctrlheight 1; setEdCtrlCheckEnable ctrlwpercent !(getEdCtrlCheckState ctrltexture); setEdCtrlCheckEnable ctrlhpercent !(getEdCtrlCheckState ctrltexture); setEdCtrlFloatEnable ctrlwoffset (getEdCtrlCheckState ctrlwpercent); setEdCtrlFloatEnable ctrlhoffset (getEdCtrlCheckState ctrlhpercent); setEdCtrlSelectEnable ctrlratioref 0; ); 0;; fun dynamicedit(ewinstr, inst, viewstr, applybtn)= let [455 795] -> [iw ih] in let getPluginInstanceUserActions inst -> laction in let getPluginInstanceUserEvents inst -> levent in let 10 -> ypos in ( let (getPluginInstanceParam inst "object") -> objname in let (getPluginInstanceParam inst "material") -> matname in let atoi (getPluginInstanceParam inst "technique") -> technique in let if technique == nil then 0 else technique -> technique in let atoi (getPluginInstanceParam inst "pass") -> pass in let if pass == nil then 0 else pass -> pass in let atoi (getPluginInstanceParam inst "texture") -> texture in let if texture == nil then 0 else texture -> texture in let atoi (getPluginInstanceParam inst "istexture") -> istexture in let if istexture == nil then 0 else istexture -> istexture in let (getPluginInstanceParam inst "path") -> path in let atoi (getPluginInstanceParam inst "isurl") -> isurl in let if isurl == nil then 0 else isurl -> isurl in let (getPluginInstanceParam inst "url") -> url in let if url == nil then "http://" else url -> url in let atoi (getPluginInstanceParam inst "autoplay") -> autoplay in let if autoplay == nil then 1 else autoplay -> autoplay in let atoi (getPluginInstanceParam inst "loop") -> loop in let if loop == nil then 0 else loop -> loop in let atoi (getPluginInstanceParam inst "stereo") -> stereo in let if stereo == nil then 0 else stereo -> stereo in let atoi (getPluginInstanceParam inst "navbar") -> navbar in let if navbar == nil then 0 else navbar -> navbar in let atoi (getPluginInstanceParam inst "showframe") -> showframe in let if showframe == nil then 0 else showframe -> showframe in let atoi (getPluginInstanceParam inst "volume") -> volume in let if volume == nil then 100 else volume -> volume in let atoi (getPluginInstanceParam inst "is3daudio") -> is3daudio in let if is3daudio == nil then 0 else is3daudio -> is3daudio in let atof (getPluginInstanceParam inst "attenuation") -> attenuation in let if attenuation == nil then 1.0 else attenuation -> attenuation in let atoi (getPluginInstanceParam inst "innerangle") -> innerangle in let if innerangle == nil then 360 else innerangle -> innerangle in let atoi (getPluginInstanceParam inst "outerangle") -> outerangle in let if outerangle == nil then 360 else outerangle -> outerangle in let atoi (getPluginInstanceParam inst "outervol") -> outervol in let if outervol == nil then 0 else outervol -> outervol in let atoi (getPluginInstanceParam inst "enableeffect") -> enableeffect in let atoi (getPluginInstanceParam inst "background") -> background in let if background == nil then 0 else background -> background in let atoi (getPluginInstanceParam inst "keepratio") -> keepratio in let if (keepratio == nil) then 0 else keepratio -> keepratio in let atoi (getPluginInstanceParam inst "ratioref") -> ratioref in let if ratioref == nil then 0 else ratioref -> ratioref in let atoi (getPluginInstanceParam inst "xpercent") -> xpercent in let if xpercent == nil then 0 else xpercent -> xpercent in let atoi (getPluginInstanceParam inst "xalign") -> xalign in let if xalign == nil then 0 else xalign -> xalign in let atoi (getPluginInstanceParam inst "posx") -> posx in let if posx == nil then 0 else posx -> posx in let atoi (getPluginInstanceParam inst "ypercent") -> ypercent in let if ypercent == nil then 0 else ypercent -> ypercent in let atoi (getPluginInstanceParam inst "yalign") -> yalign in let if yalign == nil then 0 else yalign -> yalign in let atoi (getPluginInstanceParam inst "posy") -> posy in let if posy == nil then 0 else posy -> posy in let atoi (getPluginInstanceParam inst "wpercent") -> wpercent in let if wpercent == nil then 0 else wpercent -> wpercent in let atoi (getPluginInstanceParam inst "width") -> width in let if width == nil then 320 else width -> width in let atoi (getPluginInstanceParam inst "hpercent") -> hpercent in let if hpercent == nil then 0 else hpercent -> hpercent in let atoi (getPluginInstanceParam inst "height") -> height in let if height == nil then 200 else height -> height in let atoi (getPluginInstanceParam inst "xoffset") -> xoffset in let if xoffset == nil then 0 else xoffset -> xoffset in let atoi (getPluginInstanceParam inst "yoffset") -> yoffset in let if yoffset == nil then 0 else yoffset -> yoffset in let atoi (getPluginInstanceParam inst "woffset") -> woffset in let if woffset == nil then 0 else woffset -> woffset in let atoi (getPluginInstanceParam inst "hoffset") -> hoffset in let if hoffset == nil then 0 else hoffset -> hoffset in let atoi (getPluginInstanceParam inst "zorder") -> zorder in let if zorder == nil then 0 else zorder -> zorder in let atoi (getPluginInstanceParam inst "transparency") -> tranparency in let if tranparency == nil then 0 else tranparency -> tranparency in let atoi (getPluginInstanceParam inst "focus") -> focus in let if focus == nil then 0 else focus -> focus in let atoi (getPluginInstanceParam inst "toponfocus") -> topfocus in let if topfocus == nil then 1 else topfocus -> topfocus in let atoi (getPluginInstanceParam inst "allwaysontop") -> allwaysontop in let if allwaysontop == nil then 0 else allwaysontop -> allwaysontop in let atoi (getPluginInstanceParam inst "opacity") -> opacity in let if opacity == nil then 100 else opacity -> opacity in let atoi (getPluginInstanceParam inst "texturequality") -> texturequality in let if texturequality == nil then 100 else texturequality -> texturequality in let atoi (getPluginInstanceParam inst "show") -> show in let if show == nil then 1 else show -> show in let atoi (getPluginInstanceParam inst "init") -> init in let if init == nil then 1 else init -> init in ( if (!istexture) then nil else set ih = ih + 160; setEdWindowSize ewinstr iw ih; let crEdFrameWindowEx _channel ewinstr 0 0 iw 180 EDWIN_RESIZE_MW nil (loc "OS3DVIDEO_0017") (loc "OS3DVIDEO_0019") !istexture -> winfrm in let crEdWindow _channel winfrm 0 18 iw 160 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlCheck winstr 10 ypos 280 20 (loc "OS3DVIDEO_0002") EDWIN_RESIZE_MW -> ctrltexture in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 170 20 (loc "OS3DVIDEO_0021") nil -> labelobj in let crEdCtrlTextLine winstr 180 ypos 170 20 objname nil EDWIN_RESIZE_MW -> ctrlobjname in let crEdCtrlButton winstr 360 ypos 55 20 "..." nil -> pickbtn in let crEdCtrlButton winstr 420 ypos 35 20 "X" nil -> refreshobjname in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 170 20 (loc "OS3DVIDEO_0016") nil -> labelmat in let crEdCtrlSelect winstr 180 ypos (iw - 180) 120 EDWIN_RESIZE_MW -> ctrlmatname in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 170 20 (loc "OS3DVIDEO_0018") nil -> labeltech in let crEdCtrlSelect winstr 180 ypos (iw - 180) 120 EDWIN_RESIZE_MW -> ctrlmattech in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 170 20 (loc "OS3DVIDEO_0031") nil -> labelpass in let crEdCtrlSelect winstr 180 ypos (iw - 180) 120 EDWIN_RESIZE_MW -> ctrlmatpass in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 170 20 (loc "OS3DVIDEO_0024") nil -> labelpass in let crEdCtrlSelect winstr 180 ypos (iw - 180) 120 EDWIN_RESIZE_MW -> ctrlmattex in let crEdFrameWindow _channel ewinstr 0 0 iw 80 EDWIN_RESIZE_MW nil (loc "OS3DVIDEO_0010") (loc "OS3DVIDEO_0019") -> winfrm in let crEdWindow _channel winfrm 0 18 iw 60 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlCheck winstr 10 (set ypos = 10) 100 20 (loc "OS3DVIDEO_0036") EDWIN_RESIZE_MW -> ctrlisurl in let crEdCtrlTextLine winstr 180 ypos (iw - 200) 20 url nil EDWIN_RESIZE_MW -> ctrlurl in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0015") nil -> labelobj in let crEdCtrlTextLine winstr 180 ypos 170 20 path nil EDWIN_RESIZE_MW -> ctrlpath in let crEdCtrlButton winstr 360 ypos 55 20 "..." nil -> pickfilebtn in let crEdCtrlButton winstr 420 ypos 35 20 "X" nil -> refreshpath in let crEdFrameWindow _channel ewinstr 0 0 iw 205 EDWIN_RESIZE_MW nil (loc "OS3DVIDEO_0038") (loc "OS3DVIDEO_0019") -> winfrm in let crEdWindow _channel winfrm 0 18 iw 185 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlLabel winstr 10 (set ypos = 10) + 2 160 20 (loc "OS3DVIDEO_0039") nil -> labelv in let crEdCtrlFloat winstr 180 ypos 100 20 itof volume 0.0 100.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlvolume in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0050") nil -> labelstereo in let crEdCtrlSelect winstr 180 ypos (iw - 180) 120 EDWIN_RESIZE_MW -> ctrlstereo in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0057") nil -> labelnavbar in let crEdCtrlSelect winstr 180 ypos (iw - 180) 120 EDWIN_RESIZE_MW -> ctrlnavbar in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0060") EDWIN_RESIZE_MW -> ctrlshowframe in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0025") EDWIN_RESIZE_MW -> ctrlloop in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0048") nil -> ctrlenableeffect in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0003") EDWIN_RESIZE_MW -> ctrlautoplay in // 3D sound settings frame let crEdFrameWindowEx _channel ewinstr 0 0 iw 155 EDWIN_RESIZE_MW nil (loc "OS3DVIDEO_0042") (loc "OS3DVIDEO_0019") 1 -> winfrm in let crEdWindow _channel winfrm 0 18 iw 135 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlCheck winstr 10 ((set ypos = 10) + 2) 280 20 (loc "OS3DVIDEO_0043") EDWIN_RESIZE_MW -> ctrl3daudio in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0044") nil -> labelatt in let crEdCtrlFloat winstr 180 ypos 100 20 attenuation 0.0 10000.0 0.01 5 nil EDWIN_RESIZE_MW -> ctrlattenuation in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0045") nil -> labelinner in let crEdCtrlFloat winstr 180 ypos 100 20 itof innerangle 0.0 360.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlinner in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0046") nil -> labelouter in let crEdCtrlFloat winstr 180 ypos 100 20 itof outerangle 0.0 360.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlouter in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0047") nil -> labeloutervol in let crEdCtrlFloat winstr 180 ypos 100 20 itof outervol 0.0 1000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrloutervol in let crEdFrameWindow _channel ewinstr 0 0 iw 205 EDWIN_RESIZE_MW nil (loc "OS3DVIDEO_0028") (loc "OS3DVIDEO_0019") -> winfrm in let crEdWindow _channel winfrm 0 18 iw 185 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlCheck winstr 10 ((set ypos = 10) + 2) 280 20 (loc "OS3DVIDEO_0037") EDWIN_RESIZE_MW -> ctrlbackground in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0055") EDWIN_RESIZE_MW -> ctrlkeepratio in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 180 20 (loc "OS3DVIDEO_0056") nil -> labelratioref in let crEdCtrlSelect winstr 200 ypos 100 120 EDWIN_RESIZE_MW -> ctrlratioref in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 90 20 (loc "OS3DVIDEO_0026") nil -> labelx in let crEdCtrlFloat winstr 110 ypos 60 20 itof posx (-.10000.0) 10000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlposx in let crEdCtrlCheck winstr 180 ypos 40 20 "(%)" EDWIN_RESIZE_MW -> ctrlxpercent in let crEdCtrlLabel winstr 220 (ypos + 2) 60 20 (loc "OS3DVIDEO_0022") nil -> labelxo in let crEdCtrlFloat winstr 285 ypos 60 20 itof xoffset (-.10000.0) 10000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlxoffset in let crEdCtrlSelect winstr 355 ypos 100 120 EDWIN_RESIZE_MW -> ctrlxalign in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 90 20 (loc "OS3DVIDEO_0027") nil -> labely in let crEdCtrlFloat winstr 110 ypos 60 20 itof posy (-.10000.0) 10000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlposy in let crEdCtrlCheck winstr 180 ypos 40 20 "(%)" EDWIN_RESIZE_MW -> ctrlypercent in let crEdCtrlLabel winstr 220 (ypos + 2) 60 20 (loc "OS3DVIDEO_0022") nil -> labelyo in let crEdCtrlFloat winstr 285 ypos 60 20 itof yoffset (-.10000.0) 10000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlyoffset in let crEdCtrlSelect winstr 355 ypos 100 120 EDWIN_RESIZE_MW -> ctrlyalign in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 90 20 (loc "OS3DVIDEO_0040") nil -> labelw in let crEdCtrlFloat winstr 110 ypos 60 20 itof width 0.0 10000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlwidth in let crEdCtrlCheck winstr 180 ypos 40 20 "(%)" EDWIN_RESIZE_MW -> ctrlwpercent in let crEdCtrlLabel winstr 220 (ypos + 2) 60 20 (loc "OS3DVIDEO_0022") nil -> labelwo in let crEdCtrlFloat winstr 285 ypos 60 20 itof woffset (-.10000.0) 10000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlwoffset in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 90 20 (loc "OS3DVIDEO_0011") nil -> labelh in let crEdCtrlFloat winstr 110 ypos 60 20 itof height 0.0 10000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlheight in let crEdCtrlCheck winstr 180 ypos 40 20 "(%)" EDWIN_RESIZE_MW -> ctrlhpercent in let crEdCtrlLabel winstr 220 (ypos + 2) 60 20 (loc "OS3DVIDEO_0022") nil -> labelho in let crEdCtrlFloat winstr 285 ypos 60 20 itof hoffset (-.10000.0) 10000.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlhoffset in let crEdFrameWindow _channel ewinstr 0 0 iw 255 EDWIN_RESIZE_MW nil (loc "OS3DVIDEO_0020") (loc "OS3DVIDEO_0019") -> winfrm in let crEdWindow _channel winfrm 0 18 iw 235 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlLabel winstr 10 ((set ypos = 10) + 2) 160 20 (loc "OS3DVIDEO_0023") nil -> labelo in let crEdCtrlFloat winstr 180 ypos 100 20 itof opacity 0.0 100.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlopacity in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0032") nil -> labeltq in let crEdCtrlFloat winstr 180 ypos 100 20 itof texturequality 1.0 100.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrltexturequality in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3DVIDEO_0012") nil -> labelz in let crEdCtrlFloat winstr 180 ypos 100 20 itof zorder 0.0 650.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlzorder in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0035") EDWIN_RESIZE_MW -> ctrltrans in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0013") EDWIN_RESIZE_MW -> ctrlfocus in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0034") EDWIN_RESIZE_MW -> ctrltopfocus in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0001") EDWIN_RESIZE_MW -> ctrltop in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0049") EDWIN_RESIZE_MW -> ctrlshow in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3DVIDEO_0006") EDWIN_RESIZE_MW -> ctrlinit in let V3DgetDefaultSession viewstr -> sessionstr in let SO3SceneGetObject (V3DgetSession sessionstr) objname -> obj in let SO3EntityGetResourceGroup obj -> group in ( fillEdCtrlSelect ctrlxalign (loc "OS3DVIDEO_0014")::(loc "OS3DVIDEO_0005")::(loc "OS3DVIDEO_0029")::nil; fillEdCtrlSelect ctrlyalign (loc "OS3DVIDEO_0033")::(loc "OS3DVIDEO_0005")::(loc "OS3DVIDEO_0004")::nil; selectEdCtrlSelectByPos ctrlxalign xalign; selectEdCtrlSelectByPos ctrlyalign yalign; fillEdCtrlSelect ctrlstereo (loc "OS3DVIDEO_0051")::(loc "OS3DVIDEO_0052")::(loc "OS3DVIDEO_0053")::(loc "OS3DVIDEO_0054")::nil; selectEdCtrlSelectByPos ctrlstereo stereo; fillEdCtrlSelect ctrlnavbar (loc "OS3DVIDEO_0051")::(loc "OS3DVIDEO_0058")::(loc "OS3DVIDEO_0059")::nil; selectEdCtrlSelectByPos ctrlnavbar navbar; setEdCtrlCheckState ctrlautoplay autoplay; setEdCtrlCheckState ctrlloop loop; setEdCtrlCheckState ctrl3daudio is3daudio; setEdCtrlCheckState ctrlenableeffect enableeffect; setEdCtrlCheckState ctrlshowframe showframe; setEdCtrlCheckState ctrltexture istexture; setEdCtrlCheckState ctrltrans tranparency; setEdCtrlCheckState ctrlbackground background; setEdCtrlCheckState ctrlkeepratio keepratio; setEdCtrlCheckCbState ctrlkeepratio mkfun3 @cbKeepRatioCheck [ctrlratioref ctrltexture ctrlwidth ctrlheight ctrlwpercent ctrlhpercent ctrlwoffset ctrlhoffset]; fillEdCtrlSelect ctrlratioref (loc "OS3DVIDEO_0040")::(loc "OS3DVIDEO_0011")::nil; selectEdCtrlSelectByPos ctrlratioref ratioref; setEdCtrlSelectCb ctrlratioref mkfun4 @cbRatioRef [ctrltexture ctrlwidth ctrlheight ctrlwpercent ctrlhpercent ctrlwoffset ctrlhoffset]; setEdCtrlCheckState ctrlisurl isurl; setEdCtrlCheckState ctrlinit init; setEdCtrlCheckState ctrlshow show; setEdCtrlCheckState ctrlfocus focus; setEdCtrlCheckState ctrltopfocus topfocus; setEdCtrlCheckState ctrltop allwaysontop; setEdCtrlCheckState ctrlxpercent xpercent; setEdCtrlCheckState ctrlypercent ypercent; setEdCtrlCheckState ctrlwpercent wpercent; setEdCtrlCheckState ctrlhpercent hpercent; setEdCtrlCheckCbState ctrlxpercent mkfun3 @cbPercentCheck ctrlxoffset; setEdCtrlCheckCbState ctrlypercent mkfun3 @cbPercentCheck ctrlyoffset; setEdCtrlCheckCbState ctrlwpercent mkfun3 @cbPercentCheck ctrlwoffset; setEdCtrlCheckCbState ctrlhpercent mkfun3 @cbPercentCheck ctrlhoffset; setEdCtrlCheckCbState ctrl3daudio mkfun3 @cbCheck3dAudio [ctrlattenuation ctrlinner ctrlouter ctrloutervol]; setEdCtrlButtonCb pickfilebtn mkfun2 @cbBtnPickFile [inst winstr ctrlpath ctrlurl ctrlisurl]; setEdCtrlCheckCbState ctrlisurl mkfun3 @cbCheckUrl [ctrlurl ctrlpath pickfilebtn]; setEdCtrlTextLineEnable ctrlpath 0; setEdCtrlButtonCb refreshpath mkfun2 @cbRefreshBtn [ctrlpath]; if !isurl then ( setEdCtrlTextLineEnable ctrlurl 0; setEdCtrlButtonEnable pickfilebtn 1; ) else ( setEdCtrlTextLineEnable ctrlurl 1; setEdCtrlButtonEnable pickfilebtn 0; ); fillMaterialSelector viewstr [inst ctrlmatname ctrlmattech ctrlmatpass ctrlmattex] objname; selectEdCtrlSelect ctrlmatname matname; let V3DgetDefaultSession viewstr -> sessionstr in let SO3SceneGetMaterial (V3DgetSession sessionstr) group matname -> mat in if mat == nil then nil else ( selectEdCtrlSelectByPos ctrlmattech technique; fillMaterialPassSelector viewstr [ctrlmatpass ctrlmatname ctrlmattech ctrlmattex] mat technique; selectEdCtrlSelectByPos ctrlmatpass pass; fillMaterialTextureSelector viewstr ctrlmattex mat technique pass; selectEdCtrlSelectByPos ctrlmattex texture; ); setEdCtrlCheckCbState ctrltexture mkfun3 @cbCheckTexture [pickbtn ctrlbackground ctrlkeepratio ctrlratioref ctrlposx ctrlxpercent ctrlxalign ctrlposy ctrlypercent ctrlyalign ctrlwpercent ctrlhpercent ctrlxoffset ctrlyoffset ctrlwoffset ctrlhoffset ctrlzorder ctrltopfocus ctrltop ctrlmatname ctrlmattech ctrlmatpass ctrlmattex ctrlfocus ctrl3daudio ctrlattenuation ctrlinner ctrlouter ctrloutervol]; setEdCtrlCheckCbState ctrlbackground mkfun3 @cbCheckBackground [ctrlzorder ctrlfocus ctrltopfocus ctrltop]; setEdCtrlButtonCb pickbtn mkfun2 @cbBtnPickObj [inst winstr viewstr ctrlobjname ctrlmatname ctrlmattech ctrlmatpass ctrlmattex objname]; setEdCtrlTextLineEnable ctrlobjname 0; setEdCtrlButtonCb refreshobjname mkfun2 @cbRefreshBtnSpec [ctrlobjname ctrlmatname ctrlmattech ctrlmatpass ctrlmattex]; if istexture then ( setEdCtrlCheckEnable ctrlbackground 0; setEdCtrlFloatEnable ctrlposx 0; setEdCtrlFloatEnable ctrlposy 0; setEdCtrlCheckEnable ctrlxpercent 0; setEdCtrlCheckEnable ctrlypercent 0; setEdCtrlSelectEnable ctrlxalign 0; setEdCtrlSelectEnable ctrlyalign 0; setEdCtrlCheckEnable ctrlwpercent 0; setEdCtrlCheckEnable ctrlhpercent 0; setEdCtrlFloatEnable ctrlxoffset 0; setEdCtrlFloatEnable ctrlyoffset 0; setEdCtrlFloatEnable ctrlwoffset 0; setEdCtrlFloatEnable ctrlhoffset 0; setEdCtrlFloatEnable ctrlzorder 0; setEdCtrlCheckEnable ctrltopfocus 0; setEdCtrlCheckEnable ctrltop 0; setEdCtrlCheckEnable ctrlfocus 1; setEdCtrlSelectEnable ctrlmatname 1; setEdCtrlSelectEnable ctrlmattech 1; setEdCtrlSelectEnable ctrlmatpass 1; setEdCtrlSelectEnable ctrlmattex 1; setEdCtrlButtonEnable pickbtn 1; setEdCtrlCheckEnable ctrl3daudio 1; setEdCtrlFloatEnable ctrlattenuation (getEdCtrlCheckState ctrl3daudio); setEdCtrlFloatEnable ctrlinner (getEdCtrlCheckState ctrl3daudio); setEdCtrlFloatEnable ctrlouter (getEdCtrlCheckState ctrl3daudio); setEdCtrlFloatEnable ctrloutervol (getEdCtrlCheckState ctrl3daudio); ) else if background then ( setEdCtrlCheckEnable ctrlbackground 1; setEdCtrlFloatEnable ctrlposx 1; setEdCtrlFloatEnable ctrlposy 1; setEdCtrlCheckEnable ctrlxpercent 1; setEdCtrlCheckEnable ctrlypercent 1; setEdCtrlSelectEnable ctrlxalign 1; setEdCtrlSelectEnable ctrlyalign 1; setEdCtrlCheckEnable ctrlwpercent 1; setEdCtrlCheckEnable ctrlhpercent 1; setEdCtrlFloatEnable ctrlxoffset (getEdCtrlCheckState ctrlxpercent); setEdCtrlFloatEnable ctrlyoffset (getEdCtrlCheckState ctrlypercent); setEdCtrlFloatEnable ctrlwoffset (getEdCtrlCheckState ctrlwpercent); setEdCtrlFloatEnable ctrlhoffset (getEdCtrlCheckState ctrlhpercent); setEdCtrlFloatEnable ctrlzorder 0; setEdCtrlCheckEnable ctrltopfocus 0; setEdCtrlCheckEnable ctrltop 0; setEdCtrlCheckEnable ctrlfocus 0; setEdCtrlSelectEnable ctrlmatname 0; setEdCtrlSelectEnable ctrlmattech 0; setEdCtrlSelectEnable ctrlmatpass 0; setEdCtrlSelectEnable ctrlmattex 0; setEdCtrlButtonEnable pickbtn 0; setEdCtrlCheckEnable ctrl3daudio 0; setEdCtrlFloatEnable ctrlattenuation 0; setEdCtrlFloatEnable ctrlinner 0; setEdCtrlFloatEnable ctrlouter 0; setEdCtrlFloatEnable ctrloutervol 0; ) else ( setEdCtrlCheckEnable ctrlbackground 1; setEdCtrlFloatEnable ctrlposx 1; setEdCtrlFloatEnable ctrlposy 1; setEdCtrlCheckEnable ctrlxpercent 1; setEdCtrlCheckEnable ctrlypercent 1; setEdCtrlSelectEnable ctrlxalign 1; setEdCtrlSelectEnable ctrlyalign 1; setEdCtrlCheckEnable ctrlwpercent 1; setEdCtrlCheckEnable ctrlhpercent 1; setEdCtrlFloatEnable ctrlxoffset (getEdCtrlCheckState ctrlxpercent); setEdCtrlFloatEnable ctrlyoffset (getEdCtrlCheckState ctrlypercent); setEdCtrlFloatEnable ctrlwoffset (getEdCtrlCheckState ctrlwpercent); setEdCtrlFloatEnable ctrlhoffset (getEdCtrlCheckState ctrlhpercent); setEdCtrlFloatEnable ctrlzorder 1; setEdCtrlCheckEnable ctrltopfocus 1; setEdCtrlCheckEnable ctrltop 1; setEdCtrlCheckEnable ctrlfocus 1; setEdCtrlSelectEnable ctrlmatname 0; setEdCtrlSelectEnable ctrlmattech 0; setEdCtrlSelectEnable ctrlmatpass 0; setEdCtrlSelectEnable ctrlmattex 0; setEdCtrlButtonEnable pickbtn 0; setEdCtrlCheckEnable ctrl3daudio 0; setEdCtrlFloatEnable ctrlattenuation 0; setEdCtrlFloatEnable ctrlinner 0; setEdCtrlFloatEnable ctrlouter 0; setEdCtrlFloatEnable ctrloutervol 0; ); cbKeepRatioCheck ctrlkeepratio keepratio [ctrlratioref ctrltexture ctrlwidth ctrlheight ctrlwpercent ctrlhpercent ctrlwoffset ctrlhoffset]; [mkfun1 @cbCloseEdit [ctrltexture ctrlobjname ctrlmatname ctrlmattech ctrlmatpass ctrlmattex ctrlpath ctrlisurl ctrlurl ctrlstereo ctrlnavbar ctrlshowframe ctrlautoplay ctrlloop ctrlvolume ctrl3daudio ctrlattenuation ctrlinner ctrlouter ctrloutervol ctrlbackground ctrlkeepratio ctrlratioref ctrlwidth ctrlheight ctrlposx ctrlposy ctrlxpercent ctrlypercent ctrlwpercent ctrlhpercent ctrlxoffset ctrlyoffset ctrlwoffset ctrlhoffset ctrlxalign ctrlyalign ctrlopacity ctrltexturequality ctrlzorder ctrltrans ctrlfocus ctrltopfocus ctrltop ctrlshow ctrlinit ctrlenableeffect] nil]; ); ); );;