8,452
edits
Paradox-01 (talk | contribs) mNo edit summary |
Paradox-01 (talk | contribs) mNo edit summary |
||
Line 52: | Line 52: | ||
** The problem with embedded code: | ** 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"'' | :: 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. | :: When using that button it will also call the cube's property page. Imagine 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? | :: 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. | :: '''''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. |
edits