Mod Tool/Scripting: Difference between revisions

m
using Image: consistently to make it easier to find all image refs on a page
m (changing link from http->https)
m (using Image: consistently to make it easier to find all image refs on a page)
 
(9 intermediate revisions by 2 users not shown)
Line 16: Line 16:
* [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://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://web.archive.org/web/20170616035120/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]'''
* '''[http://ss64.com/vb/ vbs commands]'''
* '''[https://ss64.com/vb/ vbs commands]'''
* [http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/filesfolders/files/ objFSO/objWSHShell: Scripts to manage Files] (replace "Wscript.Echo" with "logmessage")
* [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")
* [https://web.archive.org/web/20150504221146/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://web.archive.org/web/20080905102848/http://www.kxcad.net/softimage_xsi/Softimage_XSI_Documentation/script_basics_IncludingExternalScripts.htm using external scripts]
* [http://web.archive.org/web/20080905102848/http://www.kxcad.net/softimage_xsi/Softimage_XSI_Documentation/script_basics_IncludingExternalScripts.htm using external scripts]
* [http://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 ?)-->]
* [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 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===
===Dealing with different decimal marks===
Decimal sign is either period or comma.
Decimal sign is either period or comma.


Line 1,052: Line 1,052:
===Byte array -> string===
===Byte array -> string===
  Function ByteArrayToString(Binary)
  Function ByteArrayToString(Binary)
   'Antonin Foller, http://www.motobit.com
   '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 [[OBD_talk:OFGA#XML|OFGA files]]
  ' 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===
[[File:XSI_ModTool_ICE_workaround_displaying_a_flag.png|thumb|400px]]
[[Image:XSI_ModTool_ICE_workaround_displaying_a_flag.png|thumb|400px]]


  CreatePrim "Cube", "MeshSurface"
  CreatePrim "Cube", "MeshSurface"
2,112

edits