Hi there
Im currently finishing up a custom exporter plugin in python but Ive ran into a bit of a problem .I would like to include a command line executable as part of the package which I can run from python (its basically a texture converter .exe) .But I'm not 100% sure where it will be installed when someone installs it.
Can anyone suggest a good way of solving this problem ?
Including a command line executable tool with a .xsiaddon
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Including a command line executable tool with a .xsiaddon
One way that might work is the following: using “__sipath__” from the sipyutils module you can get the path to your script plugin from within the script itself, I believe. As the hierarchy of your addon doesn’t change, merely its location, you can use this “__sipath__” as a basis to get to the necessary other file. You'll have to dissect the path given by "__sipath__" a bit, but that's a relatively minor problem.
Stay safe, sane & healthy!
Re: Including a command line executable tool with a .xsiaddon
Thanks for the speedy help Hirazi.
Re: Including a command line executable tool with a .xsiaddon
You can get your Plugin Path with :
that will most probably will be:
Normal installation (user folder):
Workgroup installation:
Code: Select all
Application.Plugins( "PluginName" ).OriginPath
Normal installation (user folder):
Code: Select all
users\[userName]\Autodesk\Softimage...\Application\Addons\[AddonName]\Application\Plugins
Code: Select all
[Workgroup]\Addons\[AddonName]\Application\Plugins
M.Yara
Character Modeler | Softimage Generalist (sort of)
Character Modeler | Softimage Generalist (sort of)
Re: Including a command line executable tool with a .xsiaddon
Thank you myara.
I found to my dismay that pyutils isn't available to me as Im using XSI 7.01 here at work.
So your method works for me .
Cheers
Kenny
I found to my dismay that pyutils isn't available to me as Im using XSI 7.01 here at work.
So your method works for me .
Cheers
Kenny
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Including a command line executable tool with a .xsiaddon
Friendly suggestion: when using an earlier version, specifying this version when asking questions could prove to be helpful to both parties!
Stay safe, sane & healthy!
Re: Including a command line executable tool with a .xsiaddon
My apologies Hirazi .I will mention it from now on.
Who is online
Users browsing this forum: No registered users and 32 guests