hello ive run into a problem when loading my code into softimage's UI
1) The code consists of several script files, some of them in js the majority in python
2) They call each other with the ExecuteScript command
3) if i run the code from the script editor it runs smoothly from beggining to end
4) Now that i am trying register the first script with XSILoadPlugin and run everything from a workgroup if i execute the code from the UI every single command my script executes opens a PPG and after a while SI collapses
is there some silent option i am missing while registering the command? or the executeScripts works this way when called from the XSILoadPlugin?
any help would be appreciated
cheers
code execution problem with XSILoadPlugin
-
Hirazi Blue
- Administrator
- Posts: 5113
- Joined: 04 Jun 2009, 10:15
Re: code execution problem with XSILoadPlugin
You could try to turn off the autoinspect property in your script:
SDK docs: Property Editor Automatic Inspection
;)
SDK docs: Property Editor Automatic Inspection
;)
Stay safe, sane & healthy!
-
coss
- Posts: 6
- Joined: 17 Feb 2012, 01:03
Re: code execution problem with XSILoadPlugin
...and that solved the problem!!! thanks a lot!!!
i knew by holding control you could skip the PPG's opening never thought about a script command to emulate that
cheers
i knew by holding control you could skip the PPG's opening never thought about a script command to emulate that
cheers
-
EricTRocks
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 00:41
Re: code execution problem with XSILoadPlugin
I'd make sure you return that preference when finishing the code and also if an error occurs it gets set back as well. It's a bad habit in my opinion to suppress those. You'll end up not remembering at some point and get an ear full from artists.
You should try to use the Object Model instead of commands. If you have to use commands try to find the equivalent that starts with "SI" such as "SIImportModel" which usually surpresses the PPGs.
You should try to use the Object Model instead of commands. If you have to use commands try to find the equivalent that starts with "SI" such as "SIImportModel" which usually surpresses the PPGs.
-
coss
- Posts: 6
- Joined: 17 Feb 2012, 01:03
Re: code execution problem with XSILoadPlugin
Hey Eric
After i saw your post, my first reaction was like "omg, i would have to change all my code as it is mainly written as commands and my experience coding thourgh the OM is very limited and i barely understand it". After a few days of this subject spinning in the back of my head i decided to give it a shot. It was frustrating at the beginning but now i start to see the beauty and speed i get with this method. Thanks for the tip!
cheers
After i saw your post, my first reaction was like "omg, i would have to change all my code as it is mainly written as commands and my experience coding thourgh the OM is very limited and i barely understand it". After a few days of this subject spinning in the back of my head i decided to give it a shot. It was frustrating at the beginning but now i start to see the beauty and speed i get with this method. Thanks for the tip!
cheers
-
EricTRocks
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 00:41
Re: code execution problem with XSILoadPlugin
Great to hear. Object Model is actually more powerful and will most likely help make your code more concise and flexible. 