Mod Tool: Difference between revisions

1,216 bytes added ,  14 September 2012
m
no edit summary
mNo edit summary
mNo edit summary
Line 48: Line 48:


'''[http://softimage.wiki.softimage.com/sdkdocs/cus_addons_WalkthroughBuildinganAddon.htm building .xsiaddon]'''
'''[http://softimage.wiki.softimage.com/sdkdocs/cus_addons_WalkthroughBuildinganAddon.htm building .xsiaddon]'''
* building addon file seems so far to be the most difficult among those 'extension' files but for the end user it's best because it can hold all other files: toolbars, plugins, etc.
* So far building an addon file seems to be the most difficult among those 'extension' files but for the end user it's best because it can hold all other files: toolbars, plugins, etc.
** seems not to work with script file (but embedded code does), the [http://xsisupport.com/2012/04/30/packaging-toolbars-and-script-commands-into-addons/ alternate method] (File > Add-On > Package... ) doesn't work at all with ModTool ... "Add-Ons cannot be created with Softimage Demo Version."
** It Seems not to work with script file (but embedded code does), the [http://xsisupport.com/2012/04/30/packaging-toolbars-and-script-commands-into-addons/ alternate method] (File > Add-On > Package... ) doesn't work at all with ModTool ... "Add-Ons cannot be created with Softimage Demo Version."
** The problem with embedded code:
:: Let's say you want to integrate a toolbar into the xsiaddon file. The toolbar button was created as '''Script Button''' and holds: ''CreatePrim "Cube", "MeshSurface"''
:: When using that button it will also call the cube's property page. Image what happens if you make a script that creates hundreds of objects. Right, the user would have to close all those property pages.
:: The property pages (PPG) will not open if the button was created as '''Script Command''' linking to an external script file. But xsiaddon seems unable to ship the script file's location as relative path. The relative path is needed because other user could have Mod Tool installed in a different location. What now?
:: '''''ExecuteScript XSIUtils.ResolvePath("$XSI_USERHOME/")''' & "Addons\Oni_TRGV_tools\Application\Plugins\add_TV.vbs"'' This example use ''ExecuteScript'' to lunch a script file and ''XSIUtils.ResolvePath("$XSI_USERHOME/")'' to get the first part of it's location. The rest of the path depends how the author stores the files on the system where the addon was created.
:: That combination of embedded code and extern script file could create the cube without opening the PPG.




8,452

edits