How do you stop PPG's popping up?
How do you stop PPG's popping up?
Hi. i wonder if anyone can help me please?
I made a script to generate nulls constrained to a surface. but I end up with 100 open PPGs which take agest to close after the script has run.
How can this be avoided?
I made a script to generate nulls constrained to a surface. but I end up with 100 open PPGs which take agest to close after the script has run.
How can this be avoided?
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: How do you stop PPG's popping up?
Try to add the following line to your presumably Python script...
Not 100% sure, but I believe it does the trick...
It temporarily disables the popping up of new PPGs
Code: Select all
Application.SetValue("preferences.Interaction.autoinspect", False, "")
It temporarily disables the popping up of new PPGs
Stay safe, sane & healthy!
-
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 01:41
- Contact:
Re: How do you stop PPG's popping up?
Also if you use the Object Model rather than commands (if possible in your situation) you will avoid the pop ups as well.
- csaez
- Posts: 253
- Joined: 09 Jul 2012, 15:31
- Skype: csaezmargotta
- Location: Sydney, Australia
- Contact:
Re: How do you stop PPG's popping up?
There is usually an alternative version called SIxxxxxxxx
Code: Select all
Application.ApplyCns("Surface", my_null, my_surface)
Application.SIApplyCns("Surface", my_null, my_surface) # skip PPG
my_null.Kinematics.AddConstraint("Surface", my_surface) # object model
Re: How do you stop PPG's popping up?
Very Helpful.. thanks
How do you know what all these 'Object model' or 'SI*******' versions are? is there a list somewhere?
How do you know what all these 'Object model' or 'SI*******' versions are? is there a list somewhere?
-
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 01:41
- Contact:
Re: How do you stop PPG's popping up?
Look in the SDK Explorer view to be able to navigate on selected object into the object model. Also if you look at the SDK docs there is a section of "commands" and "object model reference"
For me, it just took a bit of getting used to and referencing the docs. If you highlight something in the script editor and hit F1 it will bring you to the docs. At the top it will tell you if it is a command.
For me, it just took a bit of getting used to and referencing the docs. If you highlight something in the script editor and hit F1 it will bring you to the docs. At the top it will tell you if it is a command.
Re: How do you stop PPG's popping up?
When I need to do this I use the same command as Hirazi but I apply it using a function decorator which temporarily sets values while a function runs. It's from Patrick Boucher and the code is here. It's also described on this blog post.
So you just include the tempSetValues decorator code and then put this line above your function definition:
The nice thing is that it's easy to apply and will return the settings to their original values even if the function call fails.
So you just include the tempSetValues decorator code and then put this line above your function definition:
Code: Select all
@tempSetValues({'preferences.Interaction.autoinspect': 0})
def foo():
...
-
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 01:41
- Contact:
Re: How do you stop PPG's popping up?
I think the autoinspect now automatically switches back no?
Re: How do you stop PPG's popping up?
Dunno. Do you mean when a function returns or fails, or when Soft is restarted?EricTRocks wrote:I think the autoinspect now automatically switches back no?
-
- Posts: 151
- Joined: 30 Nov 2010, 19:56
- Location: Tennessee
- Contact:
Re: How do you stop PPG's popping up?
I was under the impression that the command to deactivate it lasted only for the duration of the script, and that it auto-reverted when it was done.EricTRocks wrote:I think the autoinspect now automatically switches back no?
Re: How do you stop PPG's popping up?
Exactly. It can't be modified permanently through scripting, the same is with cmdlog (command log).El Burritoh wrote:I was under the impression that the command to deactivate it lasted only for the duration of the script, and that it auto-reverted when it was done.EricTRocks wrote:I think the autoinspect now automatically switches back no?
I also prefer the OM in this case.
Code: Select all
objA.Kinematics.AddConstraint( "Pose", objB, false )
M.Yara
Character Modeler | Softimage Generalist (sort of)
Character Modeler | Softimage Generalist (sort of)
Who is online
Users browsing this forum: No registered users and 68 guests