restart Softimage
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
restart Softimage
Hey All,
I was just been familiarizing myself with self-installing plugins, and just thought I'd share...
It's a restart softimage command... Hoooraayyyyyy!!! lmao
It adds a "Restart SI" command to the file menu, closes your current SI session (without saving), and opens a fresh SI App.
There is also a command "Save Kill Restart Reopen", which saves your current scene, kills SI, reopens SI, reopens your scene
and Another command to just open up another instance of the SI app.
As simple as it sounds, It's kinda nice having it. Enjoy!
I was just been familiarizing myself with self-installing plugins, and just thought I'd share...
It's a restart softimage command... Hoooraayyyyyy!!! lmao
It adds a "Restart SI" command to the file menu, closes your current SI session (without saving), and opens a fresh SI App.
There is also a command "Save Kill Restart Reopen", which saves your current scene, kills SI, reopens SI, reopens your scene
and Another command to just open up another instance of the SI app.
As simple as it sounds, It's kinda nice having it. Enjoy!
- Attachments
-
- restartSI.png (11.1 KiB) Viewed 3019 times
-
- restartSI.zip
- (1.2 KiB) Downloaded 147 times
Last edited by missingkey on 24 Jan 2014, 23:57, edited 10 times in total.
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: restart Softimage
I am sure the "without saving" feature will make it a.veritable hit.
But seriously: thanks, might come in handy!
;)
But seriously: thanks, might come in handy!
;)
Stay safe, sane & healthy!
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: restart Softimage
Hey Thanks!
I just updated it to be linux friendly. It doesn't work in linux yet, but it's friendly. lol
btw, it's nothing pretty, it just kills the process. Use at your own risk.
I just updated it to be linux friendly. It doesn't work in linux yet, but it's friendly. lol
btw, it's nothing pretty, it just kills the process. Use at your own risk.
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: restart Softimage
okay it works in linux too now. I updated the linked file in the first post.
sorry for the confusion.
sorry for the confusion.
Last edited by missingkey on 24 Jan 2014, 18:16, edited 1 time in total.
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: restart Softimage
You might want to explicitly clarify if the version in your first post has already been updated to the Linux one or not.
;)
;)
Stay safe, sane & healthy!
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: restart Softimage
Hi, Yeah, sorry for the confusion. I removed the file from my previous post, and updated the file linked in the first post.
I'm working on another option for saving the scene, killing SI, and reopening the scene.
It works well when I'm working on an existing scene. But I'm trying to throw in a condition that when the scene name is "Untitled", it does a "SaveSceneAs", then i'm trying to get the current project and scene after saving it, So that I can reopen them when SI relaunches, but it doesn't define the new variables correctly or maybe not quick enough, and SI just starts with an empty scene.
any ideas?
I'm working on another option for saving the scene, killing SI, and reopening the scene.
It works well when I'm working on an existing scene. But I'm trying to throw in a condition that when the scene name is "Untitled", it does a "SaveSceneAs", then i'm trying to get the current project and scene after saving it, So that I can reopen them when SI relaunches, but it doesn't define the new variables correctly or maybe not quick enough, and SI just starts with an empty scene.
any ideas?
Code: Select all
def saveKillRestartSI_Execute( ):
si = Application
log = si.LogMessage
import os, sys
import subprocess as sub
from signal import SIGTERM
pid = os.getpid()
scene = str( si.ActiveProject.ActiveScene ) + ".scn"
project = str( si.ActiveProject )
scenePath = project + "/" + scene
def saveKillRestartSI():
if sys.platform == "linux2":
siPath = os.getenv( "XSI_BINDIR" ) + "/XSI.bin"
elif sys.platform == "win32":
siPath = os.getenv( "XSI_BINDIR" ) + "/XSI.exe"
else:
log( "Dude, what OS are you using?" )
if scene == "Scene.scn":
si.SaveSceneAs()
scene2 = str( si.ActiveProject.ActiveScene ) + ".scn"
project2 = str( si.ActiveProject )
scenePath2 = project2 + "/" + scene2
sub.Popen( [ siPath, scenePath2 ] )
os.kill( pid, SIGTERM )
else:
si.SaveSceneAs( scenePath )
sub.Popen( [ siPath, scenePath ] )
os.kill( pid, SIGTERM )
saveKillRestartSI()
Re: restart Softimage
It does open the saved scene here, but it doesn't kill my SI. I haven't installed Python in this PC, only using the SI default python so that may be the cause.
I see also that it doesn't use xsi.bat but xsi.exe so it doesn't run setenv.bat which may not be a good thing.
And btw, the File name isn't always the same as the scene name so you may want to get ActiveScene.FileName.value instead.
I see also that it doesn't use xsi.bat but xsi.exe so it doesn't run setenv.bat which may not be a good thing.
And btw, the File name isn't always the same as the scene name so you may want to get ActiveScene.FileName.value instead.
M.Yara
Character Modeler | Softimage Generalist (sort of)
Character Modeler | Softimage Generalist (sort of)
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: restart Softimage
Hey thanks, that's great feedback.
I'll have to look into why it doesnt work with just Si python. Seems strange.
I also didn't know about using xsi.bat instead of xsi.exe, or about the file name. Many thanks! This helps me a lot.
I'll have to look into why it doesnt work with just Si python. Seems strange.
I also didn't know about using xsi.bat instead of xsi.exe, or about the file name. Many thanks! This helps me a lot.
Re: restart Softimage
you should call the Quit() command. if you kill Softimage, that's gonna be reported to autodesk as an unclean crash exit.
all you needed to do quit Softimage without saving was to call NewScene with the False parameter to not save the scene, before calling Quit()
all you needed to do quit Softimage without saving was to call NewScene with the False parameter to not save the scene, before calling Quit()
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: restart Softimage
Haha, That is much simpler, many thanks for the tip. I had a feeling there was a way to do within SI, and not have to use os.kill()
This is really helpful, thanks guys!
Is there a way so that when SI reopens, it doesn't ask to save the empty scene before loading your saved scene?
This is really helpful, thanks guys!
Is there a way so that when SI reopens, it doesn't ask to save the empty scene before loading your saved scene?
Re: restart Softimage
It shouldn't be asking to save on an empty scene. Maybe a plug in dirties the scene. Anyway
running "Xsi.bat (name of the scene)" should load the scene directly.
running "Xsi.bat (name of the scene)" should load the scene directly.
Last edited by luceric on 30 Jan 2014, 19:53, edited 1 time in total.
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: restart Softimage
Is there any easy way to figure out which plugin would cause this?
The described problem has been one of my "small annoying things" for years now...
The described problem has been one of my "small annoying things" for years now...
Stay safe, sane & healthy!
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: restart Softimage
so in the past. It hasn't done this (at least for me). If I never changed/dirtied a fresh new "untitled" scene, it would never ask me to save. But now, It almost seems like no matter what. SI asks if I want to save.
I'd love to figure this out, lol.
I'd love to figure this out, lol.
- csaez
- Posts: 253
- Joined: 09 Jul 2012, 15:31
- Skype: csaezmargotta
- Location: Sydney, Australia
- Contact:
Re: restart Softimage
Hirazi Blue wrote:Is there any easy way to figure out which plugin would cause this?
The described problem has been one of my "small annoying things" for years now...
Code: Select all
print [e.Name for e in Application.EventInfos if "Startup" in e.Type]
-
- Posts: 91
- Joined: 19 Dec 2012, 18:16
Re: restart Softimage
this is my output from the line of code above:
Not sure where to go from here. lol.
Code: Select all
# [u'XSISeqCamStartup', u'OnStartupInitNetview', u'OneClickStartup', u'XSI_Startup', u'mi_decl_fixup_startup', u'RTShaderSetCategoriesEvent']
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: restart Softimage
But that would give you a list of Events at Startup, not necessarily the plugins that dirty the scene in the manner described above? Or am I missing something here?csaez wrote:Code: Select all
print [e.Name for e in Application.EventInfos if "Startup" in e.Type]
Stay safe, sane & healthy!
Who is online
Users browsing this forum: No registered users and 30 guests