/* Rotate Plugin Editor - DMS - Mar 99 - by Sylvain HUET */ /* modified - Jun 99 - by Christophe LOREK */ /* plugin Rotobjet par iri - http://www.irizone.net */ typeof plugin=S;; typeof class=S;; typeof ed = PluginEditor;; typeof AngularX = ObjCheck;; typeof AngularY = ObjCheck;; typeof AngularZ = ObjCheck;; typeof LBframerate = ObjText;; typeof Framerate = ObjText;; proto save=fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; fun savesuppdmi(l) = if l==nil then nil /* supplemental Dmi */ else let l->[a n] in ("actionC"::(strcat a.nameInst ".activate")::nil):: ("actionC"::(strcat a.nameInst ".desactivate")::nil):: ("eventC"::(strcat a.nameInst ".activated")::nil):: ("eventC"::(strcat a.nameInst ".desactivated")::nil):: savesuppdmi n;; fun save(l)= if l==nil then [nil nil nil nil] else [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ savesuppdmi l /* supplemental Dmi */ ];; 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 AngularX = _CRcheck _channel ed.PluginEditorEditWin 5 5 w-10 20 CH_LEFT "Rotation X "; let atoi getInfo l "angularX" -> int in _SETcheck AngularX if (nil == int) then 0 else int; set AngularY = _CRcheck _channel ed.PluginEditorEditWin 5 30 w-10 20 CH_LEFT "Rotation Y "; let atoi getInfo l "angularY" -> int in _SETcheck AngularY if (nil == int) then 0 else int; set AngularZ = _CRcheck _channel ed.PluginEditorEditWin 5 55 w-10 20 CH_LEFT "Rotation Z "; let atoi getInfo l "angularZ" -> int in _SETcheck AngularZ if (nil == int) then 0 else int; set LBframerate = _CRtext _channel ed.PluginEditorEditWin 5 80 80 20 ET_ALIGN_LEFT "framerate : "; set Framerate = _CReditLine _channel ed.PluginEditorEditWin 85 80 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "Framerate" -> string in if (nil == string) then "1" else string; 0 );; fun closeedit() = strbuild ("angularX"::(itoa _GETcheck AngularX)::nil):: ("angularY"::(itoa _GETcheck AngularY)::nil):: ("angularZ"::(itoa _GETcheck AngularZ)::nil):: ("Framerate"::(_GETtext Framerate)::nil)::nil;; fun IniPlug(file)= set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit;;