/* Authors: Arkeon */ /* Last update: 07.04.02 */ /* Version: 1.0 */ typeof plugin = S;; typeof class = S;; typeof ed = PluginEditor;; typeof rotx_e = ObjText;; typeof roty_e = ObjText;; typeof rotz_e = ObjText;; typeof posx_e = ObjText;; typeof posy_e = ObjText;; typeof posz_e = ObjText;; typeof scale_e = ObjText;; typeof SavedType = S;; typeof Init = ObjCheck;; typeof OBJAV = ObjCheck;; var rotx = 0;; var roty = 0;; var rotz = 0;; var posx = 0;; var posy = 0;; var posz = 0;; var scale = 100;; proto save=fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; fun openedit(win, param) = let strextr param -> l in let _GETwindowSizePosition win -> [w h x y] in { set ed = startPluginEditor _channel win 0 0 w h WN_CHILDINSIDE|WN_NOBORDER class; set rotx = let getInfo l "rotx" -> tmp in if tmp == nil then 0 else atoi tmp; set roty = let getInfo l "roty" -> tmp in if tmp == nil then 0 else atoi tmp; set rotz = let getInfo l "rotz" -> tmp in if tmp == nil then 0 else atoi tmp; set posx = let getInfo l "posx" -> tmp in if tmp == nil then 0 else atoi tmp; set posy = let getInfo l "posy" -> tmp in if tmp == nil then 0 else atoi tmp; set posz = let getInfo l "posz" -> tmp in if tmp == nil then 0 else atoi tmp; set scale = let getInfo l "scale" -> tmp in if tmp == nil then 0 else atoi tmp; _CRtext _channel ed.PluginEditorEditWin 5 10 50 20 ET_ALIGN_RIGHT "angle x"; set rotx_e = _CReditLine _channel ed.PluginEditorEditWin 60 35 100 20 ET_DOWN itoa rotx; _CRtext _channel ed.PluginEditorEditWin 5 65 50 20 ET_ALIGN_RIGHT "angle y"; set roty_e = _CReditLine _channel ed.PluginEditorEditWin 60 90 100 20 ET_DOWN itoa roty; _CRtext _channel ed.PluginEditorEditWin 5 120 50 20 ET_ALIGN_RIGHT "angle z"; set rotz_e = _CReditLine _channel ed.PluginEditorEditWin 60 145 100 20 ET_DOWN itoa rotz; _CRtext _channel ed.PluginEditorEditWin 170 10 50 20 ET_ALIGN_RIGHT "pos x"; set posx_e = _CReditLine _channel ed.PluginEditorEditWin 225 35 100 20 ET_DOWN itoa posx; _CRtext _channel ed.PluginEditorEditWin 170 65 50 20 ET_ALIGN_RIGHT "pos y"; set posy_e = _CReditLine _channel ed.PluginEditorEditWin 225 90 100 20 ET_DOWN itoa posy; _CRtext _channel ed.PluginEditorEditWin 170 120 50 20 ET_ALIGN_RIGHT "pos z"; set posz_e = _CReditLine _channel ed.PluginEditorEditWin 225 145 100 20 ET_DOWN itoa posz; _CRtext _channel ed.PluginEditorEditWin 170 175 50 20 ET_ALIGN_RIGHT "Scale"; set scale_e = _CReditLine _channel ed.PluginEditorEditWin 225 205 100 20 ET_DOWN itoa scale; set Init = _SETcheck _CRcheck _channel ed.PluginEditorEditWin 5 185 120 20 0 "Init on" if !strcmpi getInfo l "init" "on" then 1 else 0; set OBJAV = _SETcheck _CRcheck _channel ed.PluginEditorEditWin 5 210 150 20 0 "Link to AVATAR DUMMY" if !strcmpi getInfo l "ObjAv" "on" then 1 else 0; }; 0;; fun closeedit() = strbuild ("rotx"::(_GETtext rotx_e)::nil):: ("roty"::(_GETtext roty_e)::nil):: ("rotz"::(_GETtext rotz_e)::nil):: ("posx"::(_GETtext posx_e)::nil):: ("posy"::(_GETtext posy_e)::nil):: ("posz"::(_GETtext posz_e)::nil):: ("scale"::(_GETtext scale_e)::nil):: ("init"::(let _GETcheck Init -> x in if x then "on" else "off")::nil):: ("ObjAv"::(let _GETcheck OBJAV -> x in if x then "on" else "off")::nil):: nil ;; fun savesuppdmi(l) = if l==nil then nil else let l->[a n] in ("actionC"::(strcat a.nameInst ".LinkAv")::nil):: ("actionC"::(strcat a.nameInst ".UnLinkAV")::nil):: ("actionC"::(strcat a.nameInst ".link")::nil):: ("actionC"::(strcat a.nameInst ".unlink")::nil):: ("action"::(strcat a.nameInst ".linkS")::nil):: ("action"::(strcat a.nameInst ".unlinkS")::nil):: savesuppdmi n ;; fun save(l)= [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ savesuppdmi l /* supplemental Dmi */ ];; fun IniPlug(file) = set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit;;