in_reg.OriginPath will give you something like
U:\My Workgroup\Addons\XSIDB\Application\Plugins\
Given that, you can work out where the .xsi/.scn file is.
eg
s = "U:\My Workgroup\Addons\XSIDB\Application\Plugins\"
LogMessage Left( s, InStr( s, "XSIDB" )+5 ) & "Data\Scene
Files\dotXSI\XSIDB_Full_Geo.xsi"
-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Eric Thivierge
Sent: Sun 02 September 2007 10:36 AM
To: XSI(at)Softimage.COM
Subject: Re: XSIDatabase.com Updates!
Hey Bernard,
I'm not sure if this would help... Doesn't the PluginRegister only tell
you where is has already been installed / loaded from?? I need to
determine whether the user has selected the user addon directory or the
workgroup addon directory.
Here is my code fro the v6_02 plugin (Just hacked the sample code from
the TD Layout):
function XSILoadPlugin( in_reg )
in_reg.Author = "Eric Thivierge"
in_reg.Name = "Import XSIDB v6_02 Scene Plugin"
in_reg.Email = ""
in_reg.URL = ""
in_reg.Major = 1
in_reg.Minor = 0
in_reg.RegisterCommand
"Import_XSIDB_v6_02_Scene","Import_XSIDB_v6_02_Scene"
in_reg.RegisterMenu
siMenuMainFileImportID,"Import_XSIDB_v6_02_Scene_Menu",false,false
'RegistrationInsertionPoint - do not remove this line
XSILoadPlugin = true
end function
function XSIUnloadPlugin( in_reg )
dim strPluginName
strPluginName = in_reg.Name
Application.LogMessage strPluginName & " has been unloaded."
XSIUnloadPlugin = true
end function
function Import_XSIDB_v6_02_Scene_Init( ctxt )
dim oCmd
set oCmd = ctxt.Source
oCmd.Description = "Import XSIDB v6.02 Scene"
oCmd.Tooltip = "Import XSIDB v6.02 Scene"
oCmd.SetFlag siCannotBeUsedInBatch,true
oCmd.ReturnValue = false
Import_XSIDB_v6_02_Scene_Init = true end function
sub Import_XSIDB_v6_02_Scene_Execute( )
Application.LogMessage "Import_XSIDB_v6_02_Scene_Execute called"
'
XSIDBv6File = Application.InstallationPath( siUserPath ) &
"\Addons\XSIDB\Data\Scene Files\Scenes\XSIDB_ShaderBall_v3_6.02.scn"
OpenScene XSIDBv6File
'
end sub
function Import_XSIDB_v6_02_Scene_Menu_Init( ctxt )
dim oMenu
set oMenu = ctxt.Source
oMenu.AddCommandItem
"Import_XSIDB_v6_02_Scene","Import_XSIDB_v6_02_Scene"
Import_XSIDB_v6_02_Scene_Menu_Init = true end function
Thanks,
Eric Thivierge, XSI Database Admin
www.xsidatabase.com
eric(at)xsidatabase.com
Forum Username: EricTRocks
Bernard Lebel wrote:
I'm not in front of XSI atm so sorry in advance if what I'll say is
not 100% accurate.
If you have implemented the plugin as a self-installed plugin, then
you can look in the PluginRegistrar object to find the plugin object,
and with the plugin object determine in what location it is installed.
Cheers
Bernard
On 9/2/07, Eric Thivierge <eric(at)xsidatabase.com> wrote:
Any scripting guru's that can help with this it'd be appreciated:
If you look at the addon file I just release, I have released it
under
the assumption that everyone installs the plugin under the user
addons...
I use:
siUserPath
How do I have XSI determine whether they are installing under the
workgroup or the user addons and install accordingly??? I don't have
access to a workgroup setup BTW.
Thanks,
Eric Thivierge, XSI Database Admin
www.xsidatabase.com
eric(at)xsidatabase.com
Forum Username: EricTRocks
Eric Thivierge wrote:
I've just release the XSI Database Shaderball Plugin. This adds
options on the File > Import menu to open the appropriate scene file
for your XSI version. If you are using XSI v5.0 or v6.0 you should
import the dotxsi file.
Download here:
http://www.xsidatabase.com/XSIDB_Shaderball.rar
Thanks,
Eric Thivierge, XSI Database Admin
www.xsidatabase.com
eric(at)xsidatabase.com
Forum Username: EricTRocks
Eric Thivierge wrote:
Hey,
I'll try to keep all these updates in this new thread. Read on...
Check the site for layout / usability updates:
- Added about us Page.
- Turned base material into link on material page
- Added tags field on upload / modify material page, will be making
a
tag cloud feature soon.
- Fixed CSS on footer, now is consistently small
- Updated navigation buttons to be orange to match link color
- opened up 25 more spots in the beta.
We're going to have a new default material scene for v5 and v6 up
later tonight. Many improvements within them. Please upload as many
material presets as you can. I'm going to be working on User
Profiles
& Plug-ins / Scripts uploads next.
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi