struct PBEstruct= [ PBEchannel : Chn, PBEfatherWin : ObjWin, PBEbrowserWin : ObjWin, PBEpluginTR : ObjTree, PBElistTreeItem : [[S ObjTreeItem ObjTreeItem] r1], PBEselected : ObjTreeItem, PBEbrowserSelect : fun [S S] I, PBEbrowserEnd : fun [] I, PBEdata : [Plug H3d HMat3d fun [] S], PBEbrowserDelete : ObjButton, PBEbrowserEdit : ObjButton, PBEcurrentOb : S, PBEeditMainWin : ObjWin, PBEeditChildWin : ObjWin, PBEbuffer3dSU : ObjSurface, PBEshellH3 : H3d, PBEcameraH3 : H3d, PBEobjectH3 : H3d, PBEtargetH3 : H3d, PBErenderTI : Timer, PBEapply : ObjButton, PBEdelete : ObjButton, PBEtext1 : ObjText, PBEtext2 : ObjText, PBEtext3 : ObjText, PBEtext4 : ObjText, PBEtext5 : ObjText, PBEtext6 : ObjText ] mkPBEstruct;; typeof globalPBE = PBEstruct;; /* rendition callback */ fun renderPBE3D(timer, param)= MX3render session globalPBE.PBEbuffer3dSU globalPBE.PBEcameraH3 0 0 0; _BLTsurface globalPBE.PBEeditMainWin 5 5 globalPBE.PBEbuffer3dSU 0 0 100 100; M3rotateObj session globalPBE.PBEobjectH3 [100 0 0]; 0 ;; /* close the plugin editor interface */ fun closePluginEditorInterface(win, param)= _deltimer globalPBE.PBErenderTI; set globalPBE.PBErenderTI = nil; M3delObj session globalPBE.PBEshellH3; M3freeMemory session; _DSsurface globalPBE.PBEbuffer3dSU; _DSwindow globalPBE.PBEeditMainWin; set globalPBE.PBEdata = nil; set globalPBE.PBEeditMainWin = nil ;; fun PLUGEDIT_Close () = if globalPBE.PBEeditMainWin == nil then nil else closePluginEditorInterface nil nil ;; fun CBpluginEditorInterfaceClose (but, param) = closePluginEditorInterface nil nil;; fun PLUGEDIT_GetUniqueName (oblist, name, idvalue) = let strcatn "inst_"::name::"."::(itoa idvalue)::nil -> completename in if (search_in_list oblist @OB_CompareName completename) == nil then completename else PLUGEDIT_GetUniqueName oblist name idvalue+1 ;; fun PLUGEDIT_GetNewName (plugin, o, m, oblist) = let M3objName session o -> oname in let M3materialName session m -> mname in let if (PLUG_GetType plugin) & PLUGIN_OBJECT then strcatn (PLUG_GetClass plugin)::"."::oname::nil else if (PLUG_GetType plugin) & PLUGIN_MATERIAL then strcatn (PLUG_GetClass plugin)::"."::oname::"."::mname::nil else PLUG_GetClass plugin -> newname in PLUGEDIT_GetUniqueName oblist newname 1 ;; fun PLUGEDIT_GetParam (o, m, plugin, closedit, name) = let exec closedit with [] -> param in let M3objName session o -> oname in let M3materialName session m -> mname in if (PLUG_GetType plugin) & PLUGIN_OBJECT then strcat (strbuild ("name"::name::nil):: ("anchor"::(strbuild ("#"::oname::nil)::nil)::nil)::nil) param else if (PLUG_GetType plugin) & PLUGIN_MATERIAL then strcat (strbuild ("name"::name::nil):: ("anchor"::(strbuild ("#"::oname::mname::nil)::nil)::nil)::nil) param else strcat (strbuild ("name"::name::nil)::nil) param ;; fun CBpluginEditorInterfaceApply (but, param) = let param -> [o m plugin instanceName closeedt] in if if (instanceName != nil) || ((PLUG_GetType plugin) & PLUGIN_NOTRESERVED) then 1 else let search_all_in_list ObList @OB_CompareObjMatDependingOnType [o m] -> instanceList in if instanceList == nil then 1 else let if (PLUG_GetType plugin) & PLUGIN_OBJECT then [@OB_CompareType PLUGIN_OBJECT] else if (PLUG_GetType plugin) & PLUGIN_MATERIAL then [@OB_CompareType PLUGIN_MATERIAL] else [@OB_IsGlobalType nil] -> [func param2] in let search_all_in_list instanceList func param2 -> instanceTypeListtmp in let search_all_in_list instanceTypeListtmp @OB_IsNotNotReserved nil -> instanceTypeList in if instanceTypeList == nil then 1 else let search_in_list instanceTypeList @OB_CompareType PLUGIN_RESERVED -> instanceReserved in if instanceReserved == nil then if ((PLUG_GetType plugin) & PLUGIN_RESERVED) then ( _DLGMessageBox globalPBE.PBEchannel globalPBE.PBEeditMainWin (_loc this "EFFECT_CANNOT_ADD" (PLUG_GetClass plugin)::nil) (_loc this "EFFECT_CANNOT_ADDRESERVED" (GetInstancePlugin hd instanceTypeList)::nil) 0; 0 ) else 1 else ( _DLGMessageBox globalPBE.PBEchannel globalPBE.PBEeditMainWin (_loc this "EFFECT_CANNOT_ADD" (PLUG_GetClass plugin)::nil) (_loc this "EFFECT_CANNOT_EXISTRESERVED" (GetInstancePlugin instanceReserved)::nil) 0; 0 ) then let if instanceName == nil then PLUGEDIT_GetNewName plugin o m (search_all_in_list ObList @OB_CompareClass (PLUG_GetClass plugin)) else instanceName -> newnameinstance in ( set globalPBE.PBEcurrentOb = newnameinstance; C3DaddInstance instanceName PLUG_GetClass plugin (PLUGEDIT_GetParam o m plugin closeedt newnameinstance) ) else nil ;; fun CBpluginEditorInterfaceDelete (but, param) = let param -> [instanceName plugName] in if (plugName == nil) || (instanceName == nil) then nil else C3DdelInstance instanceName plugName ;; fun PLUGINEDITOR_Update (instanceName) = set globalPBE.PBEcurrentOb = instanceName; let globalPBE.PBEdata -> [plugin1 o1 m1 closeedt] in ( if instanceName == nil then ( _SETtext globalPBE.PBEtext4 strcatn (_loc this "EFFECT_INSTANCENAME" nil)::" : "::(_loc this "EFFECT_NOINSTANCENAME" nil)::nil; _ENbutton globalPBE.PBEdelete 0; _CBbutton globalPBE.PBEdelete nil nil ) else ( _SETtext globalPBE.PBEtext4 strcatn (_loc this "EFFECT_INSTANCENAME" nil)::" : "::instanceName::nil; _ENbutton globalPBE.PBEdelete 1; _CBbutton globalPBE.PBEdelete @CBpluginEditorInterfaceDelete [instanceName PLUG_GetClass plugin1]; ); _CBbutton globalPBE.PBEapply @CBpluginEditorInterfaceApply [o1 m1 plugin1 instanceName closeedt]; ) ;; /* create the plugin editor interface */ fun PLUGINEDITOR_Create (has3d) = let 500 -> w in let 500 -> h in ( if globalPBE.PBEeditMainWin != nil then ( M3delObj session globalPBE.PBEobjectH3; M3delObj session globalPBE.PBEcameraH3; _deltimer globalPBE.PBErenderTI; set globalPBE.PBErenderTI = nil; M3freeMemory session; _DSwindow globalPBE.PBEeditChildWin; _DSsurface globalPBE.PBEbuffer3dSU; set globalPBE.PBEbuffer3dSU = nil; nil ) else ( let _GETscreenSize -> [sw sh] in let [(sw-w)/2 (sh-h)/2] -> [x y] in set globalPBE.PBEeditMainWin = _CRwindow globalPBE.PBEchannel globalPBE.PBEfatherWin x y w h WN_MENU (_loc this "EFFECT_EDITOR" nil); set globalPBE.PBEshellH3 = M3createShell session; set globalPBE.PBEapply = _CRbutton globalPBE.PBEchannel globalPBE.PBEeditMainWin 12 h-25 150 20 0 (_loc this "EFFECT_APPLY" nil); set globalPBE.PBEdelete = _CRbutton globalPBE.PBEchannel globalPBE.PBEeditMainWin 175 h-25 150 20 0 (_loc this "EFFECT_DELETE" nil); _CBbutton _CRbutton globalPBE.PBEchannel globalPBE.PBEeditMainWin 338 h-25 150 20 0 (_loc this "EFFECT_CLOSE" nil) @CBpluginEditorInterfaceClose nil; _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 10 h-75 w-20 15 ET_ALIGN_CENTER strcatn (_loc this "EFFECT_APPLY" nil)::" : "::(_loc this "EFFECT_APPLY_HELP" nil)::nil; _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 10 h-60 w-20 15 ET_ALIGN_CENTER strcatn (_loc this "EFFECT_DELETE" nil)::" : "::(_loc this "EFFECT_DELETE_HELP" nil)::nil; _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 10 h-45 w-20 15 ET_ALIGN_CENTER strcatn (_loc this "EFFECT_CLOSE" nil)::" : "::(_loc this "EFFECT_CLOSE_HELP" nil)::nil; set globalPBE.PBEtext1 = _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 120 5 w-160 20 ET_ALIGN_CENTER ""; set globalPBE.PBEtext2 = _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 120 30 w-160 20 ET_ALIGN_CENTER ""; set globalPBE.PBEtext3 = _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 120 55 w-160 20 ET_ALIGN_CENTER ""; set globalPBE.PBEtext4 = _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 120 80 w-160 20 ET_ALIGN_CENTER ""; set globalPBE.PBEtext5 = _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 120 105 w-160 20 ET_ALIGN_CENTER ""; set globalPBE.PBEtext6 = _CRtext globalPBE.PBEchannel globalPBE.PBEeditMainWin 120 130 w-160 20 ET_ALIGN_CENTER ""; _CBwinClose globalPBE.PBEeditMainWin @closePluginEditorInterface nil; ); if has3d then ( set globalPBE.PBEtargetH3 = M3createShell session; set globalPBE.PBEbuffer3dSU = _CRsurface globalPBE.PBEchannel 100 100; set globalPBE.PBErenderTI = _starttimer globalPBE.PBEchannel 40 ) else nil; set globalPBE.PBEeditChildWin = _CRwindow globalPBE.PBEchannel globalPBE.PBEeditMainWin 5 155 w-10 h-240 WN_CHILDINSIDE "Activate effect"; ) ;; fun openPluginEditorInterface(a,data)= let data -> [o m plugin instance] in ( if instance == nil then nil else let OB_GetFirstAnchorData instance -> [o1 m1] in ( set o = o1; set m = m1; set plugin = OB_GetPlugin instance ); let if (PLUG_GetType plugin) & PLUGIN_OBJECT then ( set m = nil; if o == nil then ( _DLGMessageBox globalPBE.PBEchannel globalPBE.PBEfatherWin (_loc this "EFFECT_CANNOT_EDIT" (PLUG_GetClass plugin)::nil) strcatn (_loc this "EFFECT_NO_OBJECT" nil)::" "::(if instance == nil then nil else (_loc this "EFFECT_CANNOTDYNAMICEDIT" nil))::nil 0; 0 ) else 1 ) else if (PLUG_GetType plugin) & PLUGIN_MATERIAL then if (o == nil)||(m == nil) then ( _DLGMessageBox globalPBE.PBEchannel globalPBE.PBEfatherWin (_loc this "EFFECT_CANNOT_EDIT" (PLUG_GetClass plugin)::nil) strcatn (_loc this "EFFECT_NO_MATERIAL" nil)::" "::(if instance == nil then nil else (_loc this "EFFECT_CANNOTDYNAMICEDIT" nil))::nil 0; 0 ) else 1 else ( set o = nil; set m = nil; 1 ) -> continue in if continue then ( PLUGINEDITOR_Create (o !=nil); _SETtext globalPBE.PBEtext1 strcatn (_loc this "EFFECT_CLASSNAME" nil)::" : "::(PLUG_GetClass plugin)::nil; _SETtext globalPBE.PBEtext2 strcatn (_loc this "EFFECT_TYPE" nil)::" : ":: ( if (PLUG_GetType plugin) & PLUGIN_OBJECT then ( _SETtext globalPBE.PBEtext5 strcatn (_loc this "EFFECT_OBJECTNAME" nil)::" : "::(M3objName session o)::nil; _SETtext globalPBE.PBEtext6 ""; (_loc this "EFFECT_OBJECT" nil)::nil ) else if (PLUG_GetType plugin) & PLUGIN_MATERIAL then ( _SETtext globalPBE.PBEtext5 strcatn (_loc this "EFFECT_OBJECTNAME" nil)::" : "::(M3objName session o)::nil; _SETtext globalPBE.PBEtext6 strcatn (_loc this "EFFECT_MATERIALNAME" nil)::" : "::(M3materialName session m)::nil; (_loc this "EFFECT_MATERIAL" nil)::nil ) else ( _SETtext globalPBE.PBEtext5 ""; _SETtext globalPBE.PBEtext6 ""; (_loc this "EFFECT_GLOBAL" nil)::nil ) ); _SETtext globalPBE.PBEtext3 ( if (PLUG_GetType plugin) & PLUGIN_RESERVED then _loc this "EFFECT_RESERVED" nil else if (PLUG_GetType plugin) & PLUGIN_NOTRESERVED then _loc this "EFFECT_NOTRESERVED" nil else "" ); /* la 3d */ if (o != nil) then ( set globalPBE.PBEobjectH3 = M3copyObj session o; M3renameObj session globalPBE.PBEobjectH3 strcat "tmp_" (M3objName session o); M3setObjVec session globalPBE.PBEobjectH3 [0 0 0]; M3setObjAng session globalPBE.PBEobjectH3 [0 0 0]; M3link session globalPBE.PBEtargetH3 globalPBE.PBEshellH3; let M3getRadius session globalPBE.PBEobjectH3 -> radius in let M3calcObb session globalPBE.PBEobjectH3 -> [[o3dx o3dy o3dz][o3dw o3dh o3dd]] in ( M3setObjVec session globalPBE.PBEtargetH3 [o3dx o3dy o3dz]; M3loadString session strcatn "camera PBEcameraH3 {\n0 "::(itoa radius/2)::" -"::(itoa radius)::" 0 0 0 100\n50 50 50 50\n 10 10000 10000}"::nil globalPBE.PBEtargetH3; set globalPBE.PBEcameraH3 = M3getObj session "PBEcameraH3"; M3link session globalPBE.PBEobjectH3 globalPBE.PBEshellH3; M3setObjVec session globalPBE.PBEobjectH3 [0 0 0]; M3recursFillMatObj session globalPBE.PBEshellH3; M3setObjAng session globalPBE.PBEcameraH3 M3angularTarget (M3getObjVec session globalPBE.PBEcameraH3) [o3dx o3dy o3dz]; ); _rfltimer globalPBE.PBErenderTI @renderPBE3D globalPBE; ) else nil; let ObUi instance -> instanceUi in set globalPBE.PBEdata = [plugin o m (PLUGstartEditor plugin globalPBE.PBEeditChildWin o m strbuild instanceUi.paramUI)]; PLUGINEDITOR_Update ObName instance ) else nil ); 0 ;; fun PLUGINBROWER_UpdatePluginEditorRemove (instance) = if !strcmp (ObName instance) globalPBE.PBEcurrentOb then PLUGINEDITOR_Update nil else nil ;; fun PLUGINBROWER_UpdatePluginEditorAdd (instance) = if !strcmp (ObName instance) globalPBE.PBEcurrentOb then openPluginEditorInterface nil [nil nil nil instance] else nil ;; /************************** fonctions relatives au browser de plugin **********************/ /* add an effect item to the effect menu */ fun AddEffectToEffectMenu(menu, pl, il, o, m)= if pl == nil then 0 else let pl -> [currentplugin npl] in let OB_FindInstanceByClassObjMat PLUG_GetClass currentplugin o m il -> instance in let _APPitem _channel menu ME_ENABLED PLUG_GetClass currentplugin -> currentmenuitem in ( if instance == nil then _CHKmenu currentmenuitem 0 else _CHKmenu currentmenuitem 1; _CBmenu currentmenuitem @openPluginEditorInterface [o m currentplugin instance]; AddEffectToEffectMenu menu npl il o m );; fun PLUGBROWSER_SelectEffect (tree, treeI, valid) = let if valid then ( set globalPBE.PBEselected = treeI; 1 ) else ( set globalPBE.PBEselected = nil; 0 ) -> result in ( _ENbutton globalPBE.PBEbrowserEdit result; _ENbutton globalPBE.PBEbrowserDelete result ) ;; fun PLUGBROWSER_ADDtreeChild (father, name) = PLUGBROWSER_SelectEffect nil nil 0; let _ADDtreeChild globalPBE.PBEpluginTR father TREE_INSERT_SORT name -> newTreeI in ( set globalPBE.PBElistTreeItem = [name newTreeI father]::globalPBE.PBElistTreeItem; newTreeI ) ;; /* adds an Instance to the effect tree */ fun AddInstanceToEffectTree (instance, father) = PLUGBROWSER_ADDtreeChild father ObName instance;; /* adds a plugin class to the effect tree */ fun AddEffectToEffectTree (currentplugin, param) = let PLUGBROWSER_ADDtreeChild nil PLUG_GetClass currentplugin -> newTree in apply_on_list (search_all_in_list ObList @OB_CompareClass (PLUG_GetClass currentplugin)) @AddInstanceToEffectTree newTree ;; fun PLUGBROWSER_ByTreeItem(x, treeI) = let x -> [_ item _] in treeI==item ;; fun PLUGBROWSER_ByNameAndTreeItem(x, param) = let param -> [name treeI] in let x -> [na _ item] in (((treeI == nil) && (item == nil)) ||(treeI==item)) && !(strcmp name na) ;; fun PLUGBROWSER_GetEffectByTreeItem (treeI) = search_in_list globalPBE.PBElistTreeItem @PLUGBROWSER_ByTreeItem treeI;; fun PLUGBROWSER_GetTreeByNameAndTreeFather (name, treeIFather) = let search_in_list globalPBE.PBElistTreeItem @PLUGBROWSER_ByNameAndTreeItem [name treeIFather] -> [_ tree _] in tree ;; fun PLUGBROWSER_GetAllNameByTreeItem (treeI) = if treeI == nil then [nil nil] else let PLUGBROWSER_GetEffectByTreeItem treeI -> [name _ father] in if father == nil then /* plugin */ [name nil] else /* instance */ let PLUGBROWSER_GetEffectByTreeItem father -> [namefather _ _] in [namefather name] ;; /********************************************* Callback de clic dans le browser de plugins **********************************************/ fun CBbrowserClick (tree, param, treeI) = let PLUGBROWSER_GetAllNameByTreeItem treeI -> [namePlug nameInstance] in PLUGBROWSER_SelectEffect tree treeI if nameInstance == nil then 0 else let OB_FindInstanceByNameClass nameInstance namePlug ObList -> instance in if instance == nil then 0 else ( exec globalPBE.PBEbrowserSelect with (ANCHOR_GetObjNameMatName (hd ObAnchor instance) session); 1 ) ;; /********************************************* Callback de double clic dans le browser de plugins **********************************************/ fun CBbrowserDClick (tree, param, treeI, x, y) = let PLUGBROWSER_GetAllNameByTreeItem treeI -> [namePlug nameInstance] in if namePlug == nil || nameInstance == nil then nil else openPluginEditorInterface nil [nil nil nil OB_FindInstanceByNameClass nameInstance namePlug ObList] ;; /********************************* fonction de fermeture du browser de plugins **********************************/ fun CBExitPluginBrowser(win, param)= _DStree globalPBE.PBEpluginTR; _DSwindow globalPBE.PBEbrowserWin; exec globalPBE.PBEbrowserEnd with []; set globalPBE.PBEbrowserWin = nil; 0 ;; fun PLUGINBROWSER_CBClose (but, param) = CBExitPluginBrowser nil nil;; fun closePluginBrowser()= CBExitPluginBrowser nil nil;; /********************************************* Callback d'ajout dynamique d'instance a l'arbre du browser de plugin **********************************************/ fun AddInstanceToBrowser (instance) = let PLUGBROWSER_GetTreeByNameAndTreeFather (GetInstancePlugin instance) nil -> classTree in if classTree == nil then nil else let PLUGBROWSER_GetTreeByNameAndTreeFather (ObName instance) classTree -> instanceTree in if instanceTree == nil then PLUGBROWSER_ADDtreeChild classTree (ObName instance) else nil; /* already exist ! */ 0 ;; fun PLUGBROWSER_DELtree (treeI) = if treeI == nil then nil else ( PLUGBROWSER_SelectEffect nil nil 0; set globalPBE.PBElistTreeItem = removef_from_list globalPBE.PBElistTreeItem @PLUGBROWSER_ByTreeItem treeI; _DStreeItem globalPBE.PBEpluginTR treeI ) ;; /********************************************* Callback d'effacement dynamique d'instance a l'arbre du browser de plugin **********************************************/ fun DelInstanceFromBrowser(instance)= let PLUGBROWSER_GetTreeByNameAndTreeFather (GetInstancePlugin instance) nil -> classTree in if classTree == nil then nil else let PLUGBROWSER_GetTreeByNameAndTreeFather (ObName instance) classTree -> instanceTree in PLUGBROWSER_DELtree instanceTree; 0 ;; fun PLUGINBROWSER_EditEffect (but, param) = if globalPBE.PBEselected == nil then nil else /* edit corresponding effect */ let PLUGBROWSER_GetAllNameByTreeItem globalPBE.PBEselected -> [namePlug nameInstance] in if namePlug == nil || nameInstance == nil then nil /* uh ?? */ else openPluginEditorInterface nil [nil nil nil OB_FindInstanceByNameClass nameInstance namePlug ObList] ;; fun PLUGINBROWSER_DeleteEffect (but, param) = if globalPBE.PBEselected == nil then nil else /* delete corresponding effect */ let PLUGBROWSER_GetAllNameByTreeItem globalPBE.PBEselected -> [namePlug nameInstance] in if (namePlug == nil) || (nameInstance == nil) then nil /* uh ?? */ else C3DdelInstance nameInstance namePlug ;; /************************************ fonction d'ouverture du browser de plugins *************************************/ fun openPluginBrowser(funselect, funclose)= set globalPBE.PBEbrowserSelect = funselect; set globalPBE.PBEbrowserEnd = funclose; let 200 -> w in let 350 -> h in let _GETscreenSize -> [sw sh] in ( set globalPBE.PBEbrowserWin = _CRwindow globalPBE.PBEchannel globalPBE.PBEfatherWin (sw-w)/2 (sh-h)/2 w h WN_MENU (_loc this "MNU_BROWSER_EFFECT" nil); set globalPBE.PBEpluginTR = _CRtree globalPBE.PBEchannel globalPBE.PBEbrowserWin 10 10 w-20 h-110 TV_VSCROLL|TV_BORDER|TV_BUTTON; _CBwinClose globalPBE.PBEbrowserWin @CBExitPluginBrowser nil; apply_on_list (PLUG_GetOnlineEditingList) @AddEffectToEffectTree nil; _CBtreeSelect globalPBE.PBEpluginTR @CBbrowserClick nil; _CBtreeDClick globalPBE.PBEpluginTR @CBbrowserDClick nil; set globalPBE.PBEbrowserEdit = _ENbutton _CBbutton _CRbutton globalPBE.PBEchannel globalPBE.PBEbrowserWin 10 h-90 w-20 20 0 (_loc this "EFFECT_EDIT" nil) @PLUGINBROWSER_EditEffect nil 0; set globalPBE.PBEbrowserDelete = _ENbutton _CBbutton _CRbutton globalPBE.PBEchannel globalPBE.PBEbrowserWin 10 h-60 w-20 20 0 (_loc this "EFFECT_DELETE" nil) @PLUGINBROWSER_DeleteEffect nil 0; _CBbutton _CRbutton globalPBE.PBEchannel globalPBE.PBEbrowserWin 10 h-30 w-20 20 0 (_loc this "EFFECT_CLOSE" nil) @PLUGINBROWSER_CBClose nil; 0 ) ;; /* opens the plugin editor menu */ fun openPluginEditor(o, m, EffectMenu)= AddEffectToEffectMenu EffectMenu (PLUG_GetOnlineEditingList) (search_all_in_list ObList @OB_CompareObjMatDependingOnType [o m]) o m; 0 ;; fun PLUGINBROWSER_InstanceAdded (instance)= if globalPBE.PBEeditMainWin != nil then PLUGINBROWER_UpdatePluginEditorAdd instance else nil; if globalPBE.PBEbrowserWin != nil then AddInstanceToBrowser instance else nil ;; fun PLUGINBROWSER_InstanceDeleted (instance) = if globalPBE.PBEeditMainWin != nil then PLUGINBROWER_UpdatePluginEditorRemove instance else nil; if globalPBE.PBEbrowserWin != nil then DelInstanceFromBrowser instance else nil ;; fun PLUGINBROWSER_Init (canal,win) = C3DsetCBaddInstance @PLUGINBROWSER_InstanceAdded; C3DsetCBdelInstance @PLUGINBROWSER_InstanceDeleted; set globalPBE = mkPBEstruct [canal win nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ]; 0 ;;