8,452
edits
Paradox-01 (talk | contribs) mNo edit summary |
Paradox-01 (talk | contribs) m (improved code piece: DnD) |
||
Line 1,482: | Line 1,482: | ||
function XSILoadPlugin( in_reg ) | function XSILoadPlugin( in_reg ) | ||
in_reg.Author = "" | in_reg.Author = "" | ||
in_reg.Name = " | in_reg.Name = "Oni drag and drop support" | ||
in_reg.Email = "" | in_reg.Email = "" | ||
in_reg.URL = "" | in_reg.URL = "" | ||
Line 1,489: | Line 1,489: | ||
in_reg.RegisterEvent "support_oni_DnD",siOnDragAndDrop | in_reg.RegisterEvent "support_oni_DnD",siOnDragAndDrop | ||
'RegistrationInsertionPoint - do not remove this line | |||
XSILoadPlugin = true | XSILoadPlugin = true | ||
Line 1,501: | Line 1,501: | ||
end function | end function | ||
function | function support_oni_DnD_OnEvent( in_ctxt ) | ||
Set objFSO = CreateObject("Scripting.FileSystemObject") | |||
FullFilePath = in_ctxt.GetAttribute("DragSource") | |||
FileExt = objFSO.GetExtensionName(FullFilePath) | |||
FileName = objFSO.GetBaseName(FullFilePath) | |||
if instr(LCase(FileExt), "oni") = 1 then | |||
in_ctxt.SetAttribute "DragSourceSupported", true | |||
' next line prevents the code from being repeated | |||
if in_ctxt.GetAttribute("DragAndDropAction") = 1 then | |||
logmessage "What I'm supposed to do with that oni?" | |||
' do more stuff here | |||
' .................. | |||
' e.g. telling onisplit to extract the oni | |||
end if | |||
end if | end if | ||
support_oni_DnD_OnEvent = true | support_oni_DnD_OnEvent = true | ||
end function | end function | ||
Line 1,611: | Line 1,609: | ||
** LSIs gets imported with a placeholder geometry (there's no easy way to detect what actual LSI is used for a level) | ** LSIs gets imported with a placeholder geometry (there's no easy way to detect what actual LSI is used for a level) | ||
** using LSIs from the manager works though (just keep in mind that levels are fixed to one type of LSI) | ** using LSIs from the manager works though (just keep in mind that levels are fixed to one type of LSI) | ||
** new LSIs can be added at ...\Softimage\Softimage_Mod_Tool_7.5\OniXSI_resources\PowerUps\LSI | |||
version 2 (skipped release) | |||
* better support for future custom resources | |||
<!-- | <!-- | ||
pushed back | pushed back |
edits