Tried to do a quick google search on this with no luck. Does anyone know why setting a default project doesn't seem to do anything? Every time I open the software it loads the "Modtool_Database" project rather than the one that I have set.
Is this something that is specific to this freeware version of Softimage or does it happen in the full version?
Softimage Mod Tool not starting with user defined default project
- minilogoguy18
- Posts: 110
- Joined: 24 Dec 2012, 19:34
Re: Softimage Mod Tool not starting with user defined default project
I haven't used Mod Tool in years so I can't tell anything about it. The full version Softimage opens the last used project and this project path is stored in a file called default.xsipref inside your Data\Preferences folder. You can open this file in a text editor and change it.
M.Yara
Character Modeler | Softimage Generalist (sort of)
Character Modeler | Softimage Generalist (sort of)
- minilogoguy18
- Posts: 110
- Joined: 24 Dec 2012, 19:34
Re: Softimage Mod Tool not starting with user defined default project
Yeah it's set in there, must be something hard coded with Mod Tool like how it automatically opens net view with the mod tool resources page.
Re: Softimage Mod Tool not starting with user defined default project
If you have the last used scene inside your default.xsipref, then you could try writing a script to load the last project using the ActiveProject command.
The default.xsipref stores the last directory, not the project itself so if you have changed the structure, and you want to set your project through this file, it may not work well but it's a start.
You would have to replace the pref_File variable with your local path.
This code opens the default.xsipref and searches for the last used scene path, strips the "Scene" part and assumes it is the last used project.
If the folder exists, just in case it will verify if the system folder exists. If it does, then it will set it as the active project.
It won't search in other directories, for that you would have to write a recursive function.
If you haven't changed the project structure, then it should work.
You could also put this in an event to load it on start.
The default.xsipref stores the last directory, not the project itself so if you have changed the structure, and you want to set your project through this file, it may not work well but it's a start.
Code: Select all
//JScript
var fso = new ActiveXObject("Scripting.FileSystemObject");
pref_File = "C:\\Users\\myara\\Autodesk\\Softimage_2013_SP1\\Data\\Preferences\\default.xsipref"
f = fso.OpenTextFile(pref_File, 1)
while (!f.AtEndOfStream) {
var line = f.ReadLine();
if (line.search('last_sequence_dir') != -1 ){
// Get Scene Path
scenesPath = line.substr(line.search("= ")+2)
// Get Path without \Scenes
projPath = scenesPath.substr(0, scenesPath.toLowerCase().lastIndexOf("\\scenes"))
if (fso.FolderExists(projPath)){
if (fso.FolderExists(projPath + "\\system")){
LogMessage (projPath)
ActiveProject = projPath
break
}
}
}
}
f.Close()
This code opens the default.xsipref and searches for the last used scene path, strips the "Scene" part and assumes it is the last used project.
If the folder exists, just in case it will verify if the system folder exists. If it does, then it will set it as the active project.
It won't search in other directories, for that you would have to write a recursive function.
If you haven't changed the project structure, then it should work.
You could also put this in an event to load it on start.
M.Yara
Character Modeler | Softimage Generalist (sort of)
Character Modeler | Softimage Generalist (sort of)
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Softimage Mod Tool not starting with user defined default project
If I recall correctly (and that's a big "IF" after all these years), the Mod Tool starts by calling a script file called "ModStartup.js".
This can be modified, but I can't recall how and can't seem to find any more info on it on the internet.
Maybe you could post the content of that file, so we can figure out, what needed to be done to this file to make it work in the intended manner...
This can be modified, but I can't recall how and can't seem to find any more info on it on the internet.
Maybe you could post the content of that file, so we can figure out, what needed to be done to this file to make it work in the intended manner...
Stay safe, sane & healthy!
- minilogoguy18
- Posts: 110
- Joined: 24 Dec 2012, 19:34
Re: Softimage Mod Tool not starting with user defined default project
Code: Select all
in_reg.Author = "Softimage";
in_reg.Name = "ModStartup";
in_reg.Email = "";
in_reg.URL = "";
in_reg.Major = 1;
in_reg.Minor = 0;
in_reg.RegisterEvent("ModStartupEvent",siOnStartup);
return true;
}
function XSIUnloadPlugin( in_reg )
{
// If not "Mod Tool" then Plugin was disabled.
if ( Application.License != "Mod Tool" )
{
return true;
}
return true;
}
// Callback for the ModStartupEvent event.
function ModStartupEvent_OnEvent( in_ctxt )
{
// check if check for update is turned off
var oPreferences = Application.Preferences;
//if ( oPreferences.GetPreferenceValue( "ModTool.CheckForUpdates" ) == "True")
{
Application.ExecuteCommand ( "SIAutoUpdate" );
}
//if ( oPreferences.GetPreferenceValue( "ModTool.ShowSplash" ) == "True")
{
var oActiveLayout = Application.Desktop.ActiveLayout;
var oNETVIEW = oActiveLayout.CreateView( "Netview", "ModToolNetview" );
var pathToModToolWeb = Application.GetInstallationPath2( siInstallationPath.siAddonPath );
pathToModToolWeb += "\\ModTool\\Data\\HTML\\modtool.html";
oNETVIEW.SetAttributeValue( "url", pathToModToolWeb );
oNETVIEW.SetAttributeValue( "toolbar", false );
oNETVIEW.Resize( 826, 598 );
var w = ModGetScreenWidth();
var h = ModGetScreenHeight();
var wt = (w - 826) / 2;
var ht = (h -598) / 2;
oNETVIEW.Move( wt, ht );
}
// Set the Database Path to the ModTool DB
var pathToModToolDB = Application.GetInstallationPath2( siInstallationPath.siAddonPath );
Application.ActiveProject2 = Application.CreateProject( pathToModToolDB + "\\ModTool_Database");
return true;
}
Last edited by minilogoguy18 on 07 Jan 2019, 17:47, edited 2 times in total.
Re: Softimage Mod Tool not starting with user defined default project
Well, that’s it.
Add a // before the Application.ActiveProject2 to make it inactive (comment)
This will prevent XSI from creating and setting a Modtool database project. I’m not sure if by not doing it, it will affect some tools.
I’ve never used modtool, but my guess is it should be fine without setting that project folder every single time
If you don’t need any of that at all, you could comment the line
in_reg.RegisterEvent (with //) that will prevent from executing anything. It would be easier to just move the file but XSI may need it, I don’t know.
Add a // before the Application.ActiveProject2 to make it inactive (comment)
This will prevent XSI from creating and setting a Modtool database project. I’m not sure if by not doing it, it will affect some tools.
I’ve never used modtool, but my guess is it should be fine without setting that project folder every single time
If you don’t need any of that at all, you could comment the line
in_reg.RegisterEvent (with //) that will prevent from executing anything. It would be easier to just move the file but XSI may need it, I don’t know.
Last edited by myara on 07 Jan 2019, 17:50, edited 1 time in total.
M.Yara
Character Modeler | Softimage Generalist (sort of)
Character Modeler | Softimage Generalist (sort of)
- minilogoguy18
- Posts: 110
- Joined: 24 Dec 2012, 19:34
Re: Softimage Mod Tool not starting with user defined default project
Yeah it worked, got it to load like the commercial version, no netview popup, disabled checking for updates from Autodesk and the default project I set now loads.
Now if only I could find out how to disable whatever is preventing me from using EMDL (Model) export...
Now if only I could find out how to disable whatever is preventing me from using EMDL (Model) export...
Who is online
Users browsing this forum: No registered users and 43 guests