8,452
edits
Paradox-01 (talk | contribs) mNo edit summary |
Paradox-01 (talk | contribs) (vbs code for drag and drop support) |
||
Line 1,049: | Line 1,049: | ||
* import/export of powerup collection | * import/export of powerup collection | ||
* [...] | * [...] | ||
* autoheal discontinuities (blue lines) of overlaying edges (for repairing google sketchup objects that weren't yet textured) | * autoheal discontinuities (blue lines) of overlaying edges (for repairing google sketchup objects that weren't yet textured) | ||
* making loops from parts of animations | * making loops from parts of animations | ||
Line 1,078: | Line 1,077: | ||
SelectNeighborObj , 2 | SelectNeighborObj , 2 | ||
SelectNeighborObj , 3 | SelectNeighborObj , 3 | ||
=====Drag and drop support for specific oni files===== | |||
function XSILoadPlugin( in_reg ) | |||
in_reg.Author = "" | |||
in_reg.Name = "Oni_drag_and_drop" | |||
in_reg.Email = "" | |||
in_reg.URL = "" | |||
in_reg.Major = 1 | |||
in_reg.Minor = 0 | |||
in_reg.RegisterEvent "siOnDragAndDropEvent",siOnDragAndDrop | |||
'RegistrationInsertionPoint - do not remove this line | |||
XSILoadPlugin = true | |||
end function | |||
function XSIUnloadPlugin( in_reg ) | |||
dim strPluginName | |||
strPluginName = in_reg.Name | |||
Application.LogMessage strPluginName & " has been unloaded.",siVerbose | |||
XSIUnloadPlugin = true | |||
end function | |||
function siOnDragAndDropEvent_Init( in_ctxt ) | |||
dim action | |||
set action = in_ctxt.GetAttribute( "DragAndDropAction" ) | |||
end function | |||
' Callback for the siOnDragAndDropEvent event. | |||
function siOnDragAndDropEvent_OnEvent( in_ctxt ) | |||
filename = in_ctxt.GetAttribute("DragSource") | |||
' isolate file extension from full name | |||
FileExt = right(filename, len(filename) - instrrev(filename, ".")) | |||
' use LCase to recognize extension that might be in upper case, e.g. rewrites "ONI" to "oni" | |||
if len(FileExt) = 3 and instr(LCase(FileExt), "oni") = 1 then | |||
'enable drop if file extension is "oni" | |||
in_ctxt.SetAttribute "DragSourceSupported", true | |||
end if | |||
' catch file drop event | |||
if in_ctxt.GetAttribute("DragAndDropAction") = 1 then | |||
' code that handels the imported file | |||
' there could be a subtype recognition e.g. to let onisplit convert AKEV to dae files | |||
' [...] | |||
end if | |||
' Return value is ignored as this event can not be aborted. | |||
siOnDragAndDropEvent_OnEvent = true | |||
end function | |||
edits