2,112
edits
Paradox-01 (talk | contribs)  | 
				m (using Image: consistently to make it easier to find all image refs on a page)  | 
				||
| (11 intermediate revisions by 2 users not shown) | |||
| Line 14: | Line 14: | ||
'''Links'''  | '''Links'''  | ||
* [http://softimage.wiki.softimage.com/index.php?title=Scripting_Tips_and_Tricks_%28XSISDK%29 xsi wiki page about scripting]  | * [http://web.archive.org/web/20160803061035/http://softimage.wiki.softimage.com/index.php?title=Scripting_Tips_and_Tricks_%28XSISDK%29 xsi wiki page about scripting]  | ||
* '''[http://softimage.wiki.softimage.com/sdkdocs/scriptsdb/scriptsdb/scrdb_vbscript.htm many vbscript examples]'''  | * '''[http://web.archive.org/web/20170616035120/http://softimage.wiki.softimage.com/sdkdocs/scriptsdb/scriptsdb/scrdb_vbscript.htm many vbscript examples]'''  | ||
* '''[  | * '''[https://ss64.com/vb/ vbs commands]'''  | ||
* [  | * [https://web.archive.org/web/20070510173452/https://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/filesfolders/files/ objFSO/objWSHShell: Scripts to manage Files] (replace "Wscript.Echo" with "logmessage")  | ||
* [http://activexperts.com/activmonitor/windowsmanagement/adminscripts/other/textfiles/ objFSO/objWSHShell: Scripts to manage Text Files]  | * [https://web.archive.org/web/20150504221146/http://activexperts.com/activmonitor/windowsmanagement/adminscripts/other/textfiles/ objFSO/objWSHShell: Scripts to manage Text Files]  | ||
* [http://www.kxcad.net/  | * [http://web.archive.org/web/20080905102848/http://www.kxcad.net/softimage_xsi/Softimage_XSI_Documentation/script_basics_IncludingExternalScripts.htm using external scripts]  | ||
* [  | * [https://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=si_om/XSIUIToolkit.html,topicNumber=si_om_XSIUIToolkit_html progress bar and open file dialog<!-- (hm, InitialDirectory code for quick save idea ?)-->]  | ||
<!--* [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=files/cus_ppg_FileBrowserWidget.htm,topicNumber=d30e11980,hash=WS34BA39B437A993419C80CAB58E3BEFA1-0059 text box]-->  | <!--* [http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html?url=files/cus_ppg_FileBrowserWidget.htm,topicNumber=d30e11980,hash=WS34BA39B437A993419C80CAB58E3BEFA1-0059 text box]-->  | ||
| Line 83: | Line 83: | ||
  logmessage GetGlobal ("MyGloVar")  |   logmessage GetGlobal ("MyGloVar")  | ||
Further information are found over [  | Further information are found over [https://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cmds/SetGlobal.html HERE.]  | ||
| Line 100: | Line 100: | ||
  logmessage XSIUtils.Environment("MyVar")  |   logmessage XSIUtils.Environment("MyVar")  | ||
As the information is a string you need to convert it back to what it was meant originally e.g. with cBool and cInt. For more conversion see [http://www.w3schools.com/vbscript/vbscript_ref_functions.asp HERE]  | As the information is a string you need to convert it back to what it was meant originally e.g. with cBool and cInt. For more conversion see [http://web.archive.org/web/20150707131602/http://www.w3schools.com/vbscript/vbscript_ref_functions.asp HERE]  | ||
| Line 375: | Line 375: | ||
===  | ===Dealing with different decimal marks===  | ||
Decimal sign is either period or comma.  | Decimal sign is either period or comma.  | ||
| Line 570: | Line 570: | ||
'''Via winmgmts'''  | '''Via winmgmts'''  | ||
  ' slightly modified code from [  |   ' slightly modified code from [https://devblogs.microsoft.com/scripting/how-can-i-start-a-process-and-then-wait-for-the-process-to-end-before-terminating-the-script/ that site]  | ||
  ' ''logmessage "onisplit finished."'' will be executed after the conversion finished, there should be also an delay of 3 seconds to support very slow computers    |   ' ''logmessage "onisplit finished."'' will be executed after the conversion finished, there should be also an delay of 3 seconds to support very slow computers    | ||
  ' if you are going to use this method consider to extent the code to check if input file and output directory exist  |   ' if you are going to use this method consider to extent the code to check if input file and output directory exist  | ||
| Line 1,052: | Line 1,052: | ||
===Byte array -> string===  | ===Byte array -> string===  | ||
  Function ByteArrayToString(Binary)  |   Function ByteArrayToString(Binary)  | ||
    'Antonin Foller,   |     'Antonin Foller, https://www.motobit.com/  | ||
    'Optimized version of a simple BinaryToString algorithm.  |     'Optimized version of a simple BinaryToString algorithm.  | ||
| Line 1,443: | Line 1,443: | ||
====Bounding box values====  | ====Bounding box values====  | ||
  ' this could be useful to create a bounding box for [[  |   ' this could be useful to create a bounding box for [[XML:OFGA|OFGA files]]  | ||
  ' let's get the bounding box of a simple cylinder  |   ' let's get the bounding box of a simple cylinder  | ||
| Line 1,736: | Line 1,736: | ||
==Softimage ICE==  | ==Softimage ICE==  | ||
===Show a simple value in the viewport===  | ===Show a simple value in the viewport===  | ||
[[  | [[Image:XSI_ModTool_ICE_workaround_displaying_a_flag.png|thumb|400px]]  | ||
  CreatePrim "Cube", "MeshSurface"  |   CreatePrim "Cube", "MeshSurface"  | ||