How do you stop PPG's popping up?

Discussions concerning programming of SOFTIMAGE©
Post Reply
Pooby
Posts: 501
Joined: 27 Aug 2010, 22:25

How do you stop PPG's popping up?

Post by Pooby » 13 Nov 2013, 13:38

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?

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: How do you stop PPG's popping up?

Post by Hirazi Blue » 13 Nov 2013, 13:58

Try to add the following line to your presumably Python script...

Code: Select all

Application.SetValue("preferences.Interaction.autoinspect", False, "")
Not 100% sure, but I believe it does the trick...
It temporarily disables the popping up of new PPGs
Stay safe, sane & healthy!

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: How do you stop PPG's popping up?

Post by EricTRocks » 13 Nov 2013, 14:50

Also if you use the Object Model rather than commands (if possible in your situation) you will avoid the pop ups as well.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

User avatar
csaez
Posts: 253
Joined: 09 Jul 2012, 15:31
Skype: csaezmargotta
Location: Sydney, Australia
Contact:

Re: How do you stop PPG's popping up?

Post by csaez » 13 Nov 2013, 14:54

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

Pooby
Posts: 501
Joined: 27 Aug 2010, 22:25

Re: How do you stop PPG's popping up?

Post by Pooby » 13 Nov 2013, 15:01

Very Helpful.. thanks

How do you know what all these 'Object model' or 'SI*******' versions are? is there a list somewhere?

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: How do you stop PPG's popping up?

Post by EricTRocks » 13 Nov 2013, 15:08

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.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

Pooby
Posts: 501
Joined: 27 Aug 2010, 22:25

Re: How do you stop PPG's popping up?

Post by Pooby » 13 Nov 2013, 15:25

Thanks Eric

BenR
Posts: 92
Joined: 11 Jun 2009, 20:52

Re: How do you stop PPG's popping up?

Post by BenR » 13 Nov 2013, 18:59

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:

Code: Select all

@tempSetValues({'preferences.Interaction.autoinspect': 0})
def foo():
...
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.

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: How do you stop PPG's popping up?

Post by EricTRocks » 13 Nov 2013, 23:45

I think the autoinspect now automatically switches back no?
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

BenR
Posts: 92
Joined: 11 Jun 2009, 20:52

Re: How do you stop PPG's popping up?

Post by BenR » 14 Nov 2013, 03:01

EricTRocks wrote:I think the autoinspect now automatically switches back no?
Dunno. Do you mean when a function returns or fails, or when Soft is restarted?

El Burritoh
Posts: 151
Joined: 30 Nov 2010, 19:56
Location: Tennessee
Contact:

Re: How do you stop PPG's popping up?

Post by El Burritoh » 14 Nov 2013, 15:14

EricTRocks wrote:I think the autoinspect now automatically switches back no?
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.
-Tim Crowson
High Nerd, of the Order of Magnetic Nerds
Personal Website

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: How do you stop PPG's popping up?

Post by myara » 18 Nov 2013, 13:14

El Burritoh wrote:
EricTRocks wrote:I think the autoinspect now automatically switches back no?
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.
Exactly. It can't be modified permanently through scripting, the same is with cmdlog (command log).

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)

Post Reply

Who is online

Users browsing this forum: No registered users and 68 guests