Stop PPG Pop-ups in scripts

149 views
Skip to first unread message

Dwayne Elahie

unread,
Jan 12, 2011, 5:11:47 PM1/12/11
to soft...@listproc.autodesk.com
Hi,

I wanted to know if it is possible to prevent the associated PPG of a
command popping up when called via script. For example, if you use the
ImportModel command the PPG pops up.

Thanks,

Dwayne

Eric Thivierge

unread,
Jan 12, 2011, 6:19:21 PM1/12/11
to soft...@listproc.autodesk.com
You probably have to disable the preference then re-enable after the
command is run. It's kinda hairy to do so because you may forget to
re-enable in your script.

--------------------------------------------
Eric Thivierge
Technical Director
http://www.ethivierge.com

Mark Hanny

unread,
Jan 12, 2011, 9:04:11 PM1/12/11
to soft...@listproc.autodesk.com
I find adding a simple function to the global variables is helpful in
turning on and off the PPG, and also a couple of other things. I guess
this is only helpful if you're using python. Oh you could try making a
custom command that you could call in a script as well, but here's I
what I use.

lm = xsi.LogMessage


def logOff(msg = "Logging has been turned off"):
pref = "preferences.scripting.cmdlog,
preferences.scripting.msglog, preferences.scripting.msglogverbose,
preferences.scripting.cmdlog, preferences.Interaction.autoinspect"
lm(msg, 32)
xsi.SetValue (pref, False)

def logOn(msg = "Logging has been turned on"):
pref = "preferences.scripting.cmdlog,
preferences.scripting.msglog, preferences.scripting.msglogverbose,
preferences.scripting.cmdlog, preferences.Interaction.autoinspect"
xsi.SetValue (pref, True)
lm(msg, 32)

Olivier Jeannel

unread,
Jan 13, 2011, 2:36:48 AM1/13/11
to soft...@listproc.autodesk.com
Dear list,
A little question regarding Kristinka.
I'm doing some kind of closup traveling on a head.
I have 2 Pointclouds. one for the guide, one for the hair themselves.
guide is something like 1200 strands
hair is around 100000 strands (but they render in capsule mode instead
of segments)

Poincloud guides have in Postsimulation an Icetree with 3 KH2bend
compounds (with turbulize around value).
there are no simulation Icetree

The rendering crashed (at frame 140 other 200) because memory went above
14Gb...

I thought, as there was no sim, the hair bend movements would be the
same, unfortunatly they are not. Rerendering from frame 140 didn't match.

So I need to cache the sim.

Do I need to cache(cacheonfile) at postSimulation level ? is there a
special procedure (I can't remember exactly how I did the last time I
used this super pluggin)

Thank's all

Olivier

Anto Matkovic

unread,
Jan 13, 2011, 4:09:08 AM1/13/11
to soft...@listproc.autodesk.com
Hi there,

Honestly I have no idea what's happen...

if there is no simulation, I think you can load cache anywhere in stack. But, if
you want to remove original ICE tree, you'll need a good bit of work, just to
keep the all custom attributes. If original ICE tree is still active, I'm afraid
the same process will perform two times.

What happen if you render this using segment type, instead of render-time
extrusions...
Could you use some of "render frame by frame" script, instead of sequence...

Cheers

Olivier Jeannel

unread,
Jan 13, 2011, 6:29:06 AM1/13/11
to soft...@listproc.autodesk.com
Ok, it all render properly :)
Adding some memory limit in MR, and plugging in the CacheOnFile in the
PostSimulation works great.

I'm doing some close up(camera flies through the top of the skull) and I
was using Blinn shading to get nice specular. The Hair Renderer looked
blurry so I turned segments to capsules.
Rendering time is good (demi HD)

Maybe, when that hairy stuff will be less top secret (agency maniacs) I
can send you some pic :)

Anyway, Kristinka is real great (easy to "brush", tons of controls, I
love the "is active" output) and I got my setup done in a night.

Thanks a lot :)

Olivier

Le 13/01/2011 10:09, Anto Matkovic a �crit :

Dwayne Elahie

unread,
Jan 13, 2011, 9:39:29 AM1/13/11
to soft...@listproc.autodesk.com
Thanks for the reply,

I thought of that solution. I don't want to do that for this script
because I think it is too small to mess around with user's preferences.

César Sáez

unread,
Jan 13, 2011, 9:52:40 AM1/13/11
to soft...@listproc.autodesk.com
Take a look into python's decorator, they're perfect for this kind of situation ;)

---
Regards,

César Sáez



De: "Dwayne Elahie" <dwa...@hybride.com>
Para: soft...@listproc.autodesk.com
Enviados: Jueves, 13 de Enero 2011 15:39:29
Asunto: Re: Stop PPG Pop-ups in scripts

Jason Brynford-Jones

unread,
Jan 13, 2011, 10:03:53 AM1/13/11
to soft...@listproc.autodesk.com
This pref does not actually turn off when called from scripting. So if the script fails the pref is still on. If the pref is turned off manually it will turn back on again on launch

It is safe to use this method

winmail.dat

Eric Thivierge

unread,
Jan 13, 2011, 10:18:45 AM1/13/11
to soft...@listproc.autodesk.com
Thanks for clarifying Chin.

--------------------------------------------
Eric Thivierge
Technical Director
http://www.ethivierge.com

Patrick Boucher

unread,
Jan 19, 2011, 1:09:15 PM1/19/11
to soft...@listproc.autodesk.com
Here's an example people can fork off of.

https://gist.github.com/786568

Cheers,
Patrick

On Thu, Jan 13, 2011 at 9:52 AM, C�sar S�ez <cs...@kandorgraphics.com> wrote:
> Take a look into python's decorator, they're perfect for this kind of
> situation ;)
>
> ---
> Regards,

> C�sar S�ez

Robert Moodie

unread,
Jan 19, 2011, 1:23:39 PM1/19/11
to soft...@listproc.autodesk.com
Pay attention people, the Python-fu is strong in this one.

-----Original Message-----
From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Patrick Boucher
Sent: January-19-11 1:09 PM
To: soft...@listproc.autodesk.com
Subject: Re: Stop PPG Pop-ups in scripts

Here's an example people can fork off of.

https://gist.github.com/786568

Cheers,
Patrick

This message, including any attachments, may contain privileged and/or confidential information. Any distribution or use of this email by anyone other than the intended recipient(s) is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and delete all copies. Thank you.

Patrick Boucher

unread,
Jan 19, 2011, 1:33:52 PM1/19/11
to soft...@listproc.autodesk.com
Reply all
Reply to author
Forward
0 new messages