fun cbCloseEdit(p)= let p -> [ctrlobjname ctrlpath ctrlscale ctrlmarginx ctrlmarginy ctrlnbrow ctrlnbpage ctrlspeed ctrlangle ctrlshowcurrent ctrlshow] in let getEdCtrlTextLineValue ctrlobjname -> objname in let getEdCtrlTextLineValue ctrlpath -> path in let ftoa getEdCtrlFloatValue ctrlscale -> scale in let ftoa getEdCtrlFloatValue ctrlmarginx -> marginx in let ftoa getEdCtrlFloatValue ctrlmarginy -> marginy in let ftoi getEdCtrlFloatValue ctrlnbrow -> nbperrow in let ftoi getEdCtrlFloatValue ctrlnbpage -> nbperpage in let ftoa getEdCtrlFloatValue ctrlspeed -> transspeed in let ftoa getEdCtrlFloatValue ctrlangle -> transangle in let getEdCtrlCheckState ctrlshow -> show in let getEdCtrlCheckState ctrlshowcurrent -> showcurrent in ["parent" objname]:: ["path" path]:: ["scale" scale]:: ["marginx" marginx]:: ["marginy" marginy]:: ["nbperrow" itoa nbperrow]:: ["nbperpage" itoa nbperpage]:: ["transspeed" transspeed]:: ["transangle" transangle]:: ["showcurrent" itoa showcurrent]:: ["show" itoa show]:: nil;; fun cbSelectObj(val, type, p)= let p -> [inst winstr viewstr ctrlobjname] in let V3DgetDefaultSession viewstr -> sessionstr in let SO3SceneGetObject (V3DgetSession sessionstr) val -> obj in if (obj != nil) || (!strcmpi "Current camera" val) || (!strcmpi "Current camera shell" val) then ( setEdCtrlTextLineValue ctrlobjname val; ) else nil; 0;; fun cbCloseRes(ctrlbtn)= setEdCtrlButtonEnable ctrlbtn 1; 0;; fun cbBtnPickObj(ctrlbtn, p)= let p -> [inst winstr viewstr ctrlobjname objname] in ( setEdCtrlButtonEnable ctrlbtn 0; dlgSelectPluginInstanceResource inst winstr iTypeGroup|iTypeEntity|iTypeNode|iTypeLight|iTypeCamera|iTypeParticle|iTypeCubeMap|iTypeGroup objname mkfun3 @cbSelectObj [inst winstr viewstr ctrlobjname] mkfun1 @cbCloseRes ctrlbtn 0; ); 0;; fun cbDlgGetDir(dlg, p, dir)= let p -> [inst ctrlbtn winstr ctrlpath] in ( if dir == nil then nil else ( setEdCtrlTextLineValue ctrlpath dir; 0; ); setEdCtrlButtonEnable ctrlbtn 1; ); 0;; fun cbBtnPickDir(ctrlbtn, p)= let p -> [inst winstr ctrlpath] in let getEdCtrlTextLineValue ctrlpath -> path in let getPathFile path "" -> [fpath fname] in ( setEdCtrlButtonEnable ctrlbtn 1; _DLGrflopenDir (_DLGOpenDir _channel winstr.EDW_win nil (loc "OS3D3DGALLERY_0001")) @cbDlgGetDir [inst ctrlbtn winstr ctrlpath]; ); 0;; fun cbRefreshBtn(pickbtn, ctrlobjname)= setEdCtrlTextLineValue ctrlobjname ""; 0;; fun dynamicedit(ewinstr, inst, viewstr, applybtn)= let [455 375] -> [iw ih] in let 10 -> ypos in ( setEdWindowSize ewinstr iw ih; let (getPluginInstanceParam inst "path") -> path in let (getPluginInstanceParam inst "parent") -> objname in let atoi (getPluginInstanceParam inst "show") -> show in let if (show == nil) then 1 else show -> show in let atof (getPluginInstanceParam inst "scale") -> scale in let if (scale == nil) then 1.0 else scale -> scale in let atof (getPluginInstanceParam inst "marginx") -> marginx in let if (marginx == nil) then 2.0 else marginx -> marginx in let atof (getPluginInstanceParam inst "marginy") -> marginy in let if (marginy == nil) then 2.0 else marginy -> marginy in let atof (getPluginInstanceParam inst "nbperrow") -> nbperrow in let if (nbperrow == nil) then 3.0 else nbperrow -> nbperrow in let atof (getPluginInstanceParam inst "nbperpage") -> nbperpage in let if (nbperpage == nil) then 9.0 else nbperpage -> nbperpage in let atof (getPluginInstanceParam inst "transspeed") -> transspeed in let if (transspeed == nil) then 1.0 else transspeed -> transspeed in let atof (getPluginInstanceParam inst "transangle") -> transangle in let if (transangle == nil) then 15.0 else transangle -> transangle in let atoi (getPluginInstanceParam inst "showcurrent") -> showcurrent in let if (showcurrent == nil) then 0 else showcurrent -> showcurrent in let crEdFrameWindow _channel ewinstr 0 0 iw 60 EDWIN_RESIZE_MW nil (loc "OS3D3DGALLERY_0013") (loc "OS3D3DGALLERY_0008") -> winfrm in let crEdWindow _channel winfrm 0 18 iw 40 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlLabel winstr 10 ((set ypos = 10) + 2) 160 20 (loc "OS3D3DGALLERY_0012") nil -> labelobj in let crEdCtrlTextLine winstr 180 ypos 175 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 crEdFrameWindow _channel ewinstr 0 0 iw 60 EDWIN_RESIZE_MW nil (loc "OS3D3DGALLERY_0005") (loc "OS3D3DGALLERY_0008") -> winfrm in let crEdWindow _channel winfrm 0 18 iw 40 WN_CHILDINSIDE|WN_NOBORDER EDWIN_RESIZE_MW nil nil -> winstr in let crEdCtrlLabel winstr 10 ((set ypos = 10) + 2) 160 20 (loc "OS3D3DGALLERY_0004") nil -> labelobj in let crEdCtrlTextLine winstr 180 ypos 175 20 path nil EDWIN_RESIZE_MW -> ctrlpath in let crEdCtrlButton winstr 360 ypos 55 20 "..." nil -> pickdirbtn in let crEdCtrlButton winstr 420 ypos 35 20 "X" nil -> refreshpath in let crEdFrameWindow _channel ewinstr 0 0 iw 255 EDWIN_RESIZE_MW nil (loc "OS3D3DGALLERY_0009") (loc "OS3D3DGALLERY_0008") -> 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 "3D scale" nil -> labelscale in let crEdCtrlFloat winstr 180 ypos 100 20 scale 0.0 10000.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlscale in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3D3DGALLERY_0006") nil -> labelmx in let crEdCtrlFloat winstr 180 ypos 100 20 marginx 0.0 99.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlmarginx in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3D3DGALLERY_0007") nil -> labelmy in let crEdCtrlFloat winstr 180 ypos 100 20 marginy 0.0 99.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlmarginy in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3D3DGALLERY_0011") nil -> labelnr in let crEdCtrlFloat winstr 180 ypos 100 20 nbperrow 1.0 100.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlnbrow in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3D3DGALLERY_0010") nil -> labelnp in let crEdCtrlFloat winstr 180 ypos 100 20 nbperpage 1.0 100.0 1.0 0 nil EDWIN_RESIZE_MW -> ctrlnbpage in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3D3DGALLERY_0017") nil -> labelsp in let crEdCtrlFloat winstr 180 ypos 100 20 transspeed 0.0 100.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlspeed in let crEdCtrlLabel winstr 10 ((set ypos = ypos + 25) + 2) 160 20 (loc "OS3D3DGALLERY_0016") nil -> labelta in let crEdCtrlFloat winstr 180 ypos 100 20 transangle (-.90.0) 90.0 0.1 4 nil EDWIN_RESIZE_MW -> ctrlangle in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3D3DGALLERY_0015") EDWIN_RESIZE_MW -> ctrlshowcurrent in let crEdCtrlCheck winstr 10 (set ypos = ypos + 25) 280 20 (loc "OS3D3DGALLERY_0014") EDWIN_RESIZE_MW -> ctrlshow in ( setEdCtrlCheckState ctrlshowcurrent showcurrent; setEdCtrlCheckState ctrlshow show; setEdCtrlButtonCb pickbtn mkfun2 @cbBtnPickObj [inst winstr viewstr ctrlobjname objname]; setEdCtrlTextLineEnable ctrlobjname 0; setEdCtrlButtonCb refreshobjname mkfun2 @cbRefreshBtn ctrlobjname; setEdCtrlButtonCb pickdirbtn mkfun2 @cbBtnPickDir [inst winstr ctrlpath]; setEdCtrlTextLineEnable ctrlobjname 0; setEdCtrlButtonCb refreshpath mkfun2 @cbRefreshBtn ctrlobjname; [mkfun1 @cbCloseEdit [ctrlobjname ctrlpath ctrlscale ctrlmarginx ctrlmarginy ctrlnbrow ctrlnbpage ctrlspeed ctrlangle ctrlshowcurrent ctrlshow] nil]; ); );;