Mod Tool: Difference between revisions

1,885 bytes added ,  3 August 2012
m
installing scripts/toolbars/addons
m (+cat)
m (installing scripts/toolbars/addons)
Line 23: Line 23:




'''how to bind scripts to buttons'''
'''how to bind scripts to buttons (embedded code or .vbs/.js)'''
* You can enable/disable the Main Shelf over "View" > "Optional Panels" > "Main Shelf". Then click the "Custom" tab.
* A) Right-click the free gray space, click on "Customize Toolbar...". Select "Toolbar Widgets" > "Script Button".
:* Enter your code and make sure you selected the correct Scripting Language. Click okay when you are done.
* B) You can also drag'n'drop your script file directly onto the free gray space.
:* A new window pops up, check the settings and click okay when done.
* Right-click the Main Shelf the "Save" option. "Save As" let you save the Main Shelf as toolbar file.




'''how to install toolbars'''
'''how to install toolbars (.xsitb)'''
* creation: goto "View" > "New custom toolbar"
:* Now you can add buttons like in Main Shelf. Remember to save your changes. (Right-click, "Save As".)
* installation: drag'n'drop the xsitb file onto the viewport (it's simply the window where you can see 3D objects).
* access: goto "View" > "Toolbars"
* deletion: goto "View" > "Manage..." Check a toolbar and click Delete button.
:* The file will remain with a new file suffix ".bak" You can restore this backup if you remove the ".bak" again.




'''how to install addons'''
'''how to install addons (.xsiaddon)'''
* Drag'n'drop the file into the so-called viewport (it's simply the window where you can see 3D objects)
* then restart Mod Tool




Line 91: Line 105:
* actions from button embedded code will be logged
* actions from button embedded code will be logged
* actions from code files that are linked in a button won't be logged (results in a performance boost)
* actions from code files that are linked in a button won't be logged (results in a performance boost)
* you can save your code to a file via "File" > "Save As..." or "Save Selection"




Line 112: Line 127:




'''some basic stuff for VB Script'''
'''some basics of VBScript'''
: Logged stuff will be rewritten if you change the script language. (File > Preferences...)
* Logged stuff will be rewritten if you change the script language. (File > Preferences...)  
* You can also change the language by right-click the white script box and click on "Set to JScript" or "Set to VBScript".
* Same way you can load a few code piece, e.g. "Syntax Help" > "If..Else" or "Catch Error".
* Mark code you want to disable ("Comment Out") with single apostrophes or enable ("Comment Remove").
* In VBS you declare variables only as a variant e.g. "dim PolygonCount". Mod Tool decides what type it becomes when it uses the variable the first time.
 
 
'''some VBS commands that might interesting for Oni related stuff'''


{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
8,452

edits