Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
<script >Python and the PPG global variable?

<script >Python and the PPG global variable?

2005-04-25       - By Aloys Baillet

 Back
Reply:     1     2     3     4     5     6     7     8  

Hi Nick,

Actually, if you declare a self-installable custom property, you wont need
to pass the logic code to the layout.
If you lok at the jscript exemple in thuis file:
C:\Softimage\XSI_4.2\XSISDK\examples\properties\PSetUIDemo\jscript
\PSetUIDemoJScript.js
you wont see any toString() function to pass the logic code.
In this case, the logic is symply defined in the body of the file and is
automagically found by XSI.
In python it will be the same.
IMHO, this kind of custom property is better than the one you are trying to
build because if you change your logic code after some time, the old PPG
will follow the new rules defined in your plugin. In your current setup, the
PPG logic code is "freezed" inside the scene. I hope I am clear enough;)
Good luck in Adelaide!

Aloys

On 4/23/05, Nick <nick.petit@(protected)> wrote:
>
> Cheers Bernard but I think I must have not explained myself properly...
>
> I already have the whole ppg thing going (as you have it in your
> example) in the main ppg declaration. I'm trying to get the PPG object
> in the logic section of the ppg. For example, in jscript:
>
> opset = ActiveSceneRoot.AddProperty( "CustomProperty", false,
> "EasyCaptureSettings" );
> var olayout = opset.PPGLayout;
>
> opset.AddParameter3 ( "MachineName", siString, "Nick" );
> ... etc
>
> olayout.Language = "Jscript" ;
> olayout.Logic = OnInit.toString() +
> oIO_OnChanged.toString() +
> iIn_OnChanged.toString() +
> iOut_OnChanged.toString() +
> Bypass_OnChanged.toString() +
> Multi_OnChanged.toString() +
> Flip_OnClicked.toString() +
> FlipAll_OnClicked.toString() +
> OpFol_OnClicked.toString() +
> ZoomCam.toString() +
> foldername.toString() +
> SceneChecks.toString() +
> Cln_OnClicked.toString();
>
> Then in the functions themselves you can get the ppg by simply calling
> it using the PPG global variable...
>
> function OnInit()
> {
> var olayout = PPG.PPGLayout;
> etc...
> }
>
> I haven't declared this variable anywhere, it's an object that is
> available by simply calling its global variable... from the docs:
>
> PPG
>
> Represents an instance of a Property Page. This object can be
> manipulated within the event handling script code associated with a
> PPGLayout. (This event handling code is often called "SPDL logic"
> because in previous versions it could only be specified by putting
> script code directly in a spdl file.) This object is available to
> logic code as a global variable called "PPG". (For the purposes of
> backward compatibility it is also available via the global variable
> "PSet". It is also for reasons of backward compatibility that this
> object does not derive from Context and is available as a global
> variable rather than being passed as an argument to the callback
> routines).
>
> At the moment, I can create the ppg and the layout in python by hacking
> it:
>
> opset = xsi.ActiveSceneRoot.AddProperty( "CustomProperty", False,
> "ConstraintChanger" )
> olayout = opset.PPGLayout
>
> ## Parameters
> opset.AddParameter3 ( "Cons", c.siString, oCns.FullName )
> opset.AddParameter3 ( "Details", c.siString, "" )
>
> olayout.AddRow()
> ## Constraint DropDown
> oItem = olayout.AddEnumControl( "Cons", list(), "Which constraint?",
> c.siControlCombo )
> olayout.EndRow()
>
> olayout.AddRow()
> ## Details
> oItem = olayout.AddString( "Details", "Details", True, 100 )
> olayout.EndRow()
>
> olayout.Language = "PythonScript"
> olayout.Logic = str(OnInit(opset)) + \
> str(Cons_OnChanged(opset))
>
> """ Now, passing the ppg object this way is dodgy as opset doesn't
> exist anymore once the ppg has been created. At the moment it simply
> allows me to create the ppg. """
>
> def OnInit(opset):
> olayout = opset.PPGLayout
> # down here I populate the combo...
>
> def Cons_OnChanged(opset):
> oCns = Application.Dictionary.GetObject( str(opset.Cons.Value) )
> # I use the ppg's combo value to get to an object and retrieve
> the info I want and then print that info in a multi-line text box...
>
> """ this is where is all fails... str(opset.Cons.Value). It works when
> I first create the ppg, but since opset is no longer available after
> the ppg has been created, this throws an error.
> You normally would do this by simply using the "PPG" global variable
> that self references the ppg object, however I can't seem to get to
> it... I could do it with a Dictionary.GetObject
> and then using the name of the ppg but that is unreliable...
>
> I must be missing something but I have no idea what...
>
> Cheers!
> Nick.
>
> On 4/23/05, Bernard Lebel <3dbernard@(protected)> wrote:
> > Hi Nick,
> >
> > Here is an example of a ppg item in Python:
> >
> > # Create custom pset
> > oProp = xsi.activesceneroot.addproperty( 'CustomProperty', False,
> > 'ColorPicker' )
> >
> > # Create color parameters
> > oProp.addparameter3( 'red', c.siDouble )
> > oProp.addparameter3( 'green', c.siDouble )
> > oProp.addparameter3( 'blue', c.siDouble )
> > oProp.addparameter3( 'alpha', c.siDouble )
> >
> > # Provide layout to pset
> > oLayout = oProp.ppglayout
> >
> > # Add widget
> > oColor = oLayout.addcolor( 'red', 'red', True )
> > oColor.setattribute( 'NoLabel', True )
> >
> > Hope this helps
> > Bernard
> >
> >
> > Bernard Lebel wrote:
> >
> > >Is PPG indeed defined somewhere? If so, where?
> > >
> > >Perhaps you are running into a scope problem, wich is critical in
> > >Python. Keep in mind that a name assigned on the wrong scope will
> > >prevent it from being usable in other scopes.
> > >For instance, if you run a command that assigns a name a the top level
> > >(a global for the entire script), this global will not be accessible
> > >outside this file unless you import the file as a module and then
> > >fetch the variable by name qualification (ie: myvariable =
> > >modulename.variablename).
> > >
> > >Normally functions inside a module can access all global names from
> > >that same module, but not from other functions, unless all these
> > >functions are nested into another function and the name is assigned in
> > >that one. The only way to make a name global from a function is to
> > >declare it first as global with the global statement), then assign it
> > >to a value.
> > >
> > >
> > >Cheers
> > >Bernard
> > >
> > >
> > >On 4/22/05, Nick <nick.petit@(protected)> wrote:
> > >
> > >
> > >>I haven't seen any docs or examples of creating dynamic ppgs done in
> > >>Python but I'm sure it must be feasable... so far I can't seem to get
> > >>the PPG global variable to work with the OnChange callback... I'm
> > >>probably doing this entirely wrong as I'm still fumbling around in the
> > >>dark, but this works in jscript and in vbs but I can't seem to make it
> > >>work in python...
> > >>
> > >>olayout.Logic = str(OnInit()) + \
> > >> str(Cons_OnChanged())
> > >>
> > >># then I define my functions
> > >>
> > >>def OnInit(opset):
> > >> olayout = PPG.PPGLayout
> > >>
> > >>This keeps on returning this error:
> > >>
> > >>#ERROR : Traceback (most recent call last):
> > >># File "<Script Block >", line 100, in ?
> > >># PPGCreator()
> > >># File "<Script Block >", line 38, in PPGCreator
> > >># olayout.Logic = str(OnInit(opset)) + str(Cons_OnChanged(opset))
> > >># File "<Script Block >", line 41, in OnInit
> > >># olayout = PPG.PPGLayout
> > >>#NameError: global name 'PPG' is not defined
> > >># - [line 41]
> > >>
> > >>I can hack it in a very fugly way so it will work on init by passing
> > >>the functions the actual custom prop object as a variable, but after
> > >>it's been created this variable no longer exists in the logic section
> > >>and I'd rather not get it using a Dictionary.GetObject as it's just
> > >>not reliable enough. If someone could shed some light on where I've
> > >>gone wrong that would be really appreciated... :)
> > >>
> > >>Cheers!
> > >>Nick.
> > >>
> > >>---
> > >>Unsubscribe? Mail Majordomo@(protected) with the following text in
> body:
> > >>unsubscribe xsi
> > >>
> > >>
> > >>
> > >
> > >
> > >
> >
> > ---
> > Unsubscribe? Mail Majordomo@(protected) with the following text in
> body:
> > unsubscribe xsi
> >
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following text in body:
> unsubscribe xsi
>



--
Aloys Baillet - Character TD @ Animal Logic

Hi Nick,<br>
<br>
Actually, if you declare a self-installable custom property, you wont need to
pass the logic code to the layout.<br>
If you lok at the jscript exemple in thuis file:<br>
C:\Softimage\XSI_4.2\XSISDK\examples\properties\PSetUIDemo\jscript
\PSetUIDemoJScript.js<br>
you wont see any toString() function to pass the logic code.<br>
In this case, the logic is symply defined in the body of the file and is
automagically found by XSI.<br>
In python it will be the same.<br>
IMHO, this kind of custom property is better than the one you are
trying to build because if you change your logic code after some time,
the old PPG will follow the new rules defined in your plugin. In your
current setup, the PPG logic code is &quot;freezed&quot; inside the scene. I
hope
I am clear enough;)<br>
Good luck in Adelaide!<br>
<br>
Aloys<br><br><div><span class="gmail_quote">On 4/23/05, <b class="gmail
_sendername">Nick</b> &lt;<a href="mailto:nick.petit@(protected)">nick.petit@(protected)
.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left:
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Cheers Bernard but I think I must have not explained myself properly...<br><br
>I already have the whole ppg thing going (as you have it in your<br>example) in
the main ppg declaration. I'm trying to get the PPG object<br>
in the logic section of the ppg. For example, in jscript:<br><br>opset =
ActiveSceneRoot.AddProperty( &quot;CustomProperty&quot;, false,<br>&quot
;EasyCaptureSettings&quot; );<br>var olayout = opset.PPGLayout;<br><br>opset
.AddParameter3
( &quot;MachineName&quot;, siString, &quot;Nick&quot;&nbsp;&nbsp;);<br>... etc
<br><br>olayout.Language = &quot;Jscript&quot; ;<br>olayout.Logic = OnInit
.toString() +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;oIO_OnChanged.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iIn
_OnChanged.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iOut
_OnChanged.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bypass
_OnChanged.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multi
_OnChanged.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flip
_OnClicked.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FlipAll
_OnClicked.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OpFol
_OnClicked.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ZoomCam
.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;foldername.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;SceneChecks.toString()
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cln
_OnClicked.toString();<br><br>Then in the functions themselves you can get the
ppg by simply calling<br>it using the PPG global variable...<br><br>function
OnInit()<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var olayout =
PPG.PPGLayout;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;etc...<br>}
<br><br>I haven't declared this variable anywhere, it's an object that is<br
>available by simply calling its global variable... from the docs:<br><br>PPG<br
><br>Represents an instance of a Property Page. This object can be
<br>manipulated within the event handling script code associated with a<br
>PPGLayout. (This event handling code is often called &quot;SPDL logic&quot;<br
>because in previous versions it could only be specified by putting<br>
script code directly in a spdl file.) This object is available to<br>logic code
as a global variable called &quot;PPG&quot;. (For the purposes of<br>backward
compatibility it is also available via the global variable<br>&quot;PSet&quot;.
It is also for reasons of backward compatibility that this
<br>object does not derive from Context and is available as a global<br
>variable rather than being passed as an argument to the callback<br>routines).
<br><br>At the moment, I can create the ppg and the layout in python by hacking
it:
<br><br>opset = xsi.ActiveSceneRoot.AddProperty( &quot;CustomProperty&quot;,
False,<br>&quot;ConstraintChanger&quot; )<br>olayout = opset.PPGLayout<br><br>#
# Parameters<br>opset.AddParameter3 ( &quot;Cons&quot;, c.siString
, oCns.FullName&nbsp;&nbsp;)<br>opset.AddParameter3 ( &quot;Details&quot;, c
.siString, &quot;&quot; )<br><br>olayout.AddRow()<br>## Constraint DropDown<br
>oItem = olayout.AddEnumControl( &quot;Cons&quot;, list(), &quot;Which
constraint?&quot;,
<br>c.siControlCombo )<br>olayout.EndRow()<br><br>olayout.AddRow()<br>##
Details<br>oItem = olayout.AddString( &quot;Details&quot;, &quot;Details&quot;,
True, 100 )<br>olayout.EndRow()<br><br>olayout.Language = &quot;PythonScript
&quot;
<br>olayout.Logic = str(OnInit(opset)) + \<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str(Cons_OnChanged(opset))<br><br> &quot;
&quot;&quot; Now, passing the ppg object this way is dodgy as opset doesn't<br
>exist anymore once the ppg has been created. At the moment it simply
<br>allows me to create the ppg. &quot;&quot;&quot;<br><br>def OnInit(opset):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;olayout = opset.PPGLayout<br
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# down here I populate the
combo...<br><br>def Cons_OnChanged(opset):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;oCns = Application.Dictionary.GetObject
( str(opset.Cons.Value) )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#
I use the ppg's combo value to get to an object and retrieve<br>the info I want
and then print that info in a multi-line text box...<br><br>&quot;&quot;&quot;
this is where is all fails... str(
opset.Cons.Value). It works when<br>I first create the ppg, but since opset is
no longer available after<br>the ppg has been created, this throws an error.<br
>You normally would do this by simply using the &quot;PPG&quot; global variable
<br>that self references the ppg object, however I can't seem to get to<br>it..
. I could do it with a Dictionary.GetObject<br>and then using the name of the
ppg but that is unreliable...<br><br>I must be missing something but I have no
idea what...
<br><br>Cheers!<br>Nick.<br><br>On 4/23/05, Bernard Lebel &lt;<a href="mailto
:3dbernard@(protected)">3dbernard@(protected)</a>&gt; wrote:<br>&gt; Hi Nick,<br>&gt
;<br>&gt; Here is an example of a ppg item in Python:<br>&gt;<br>
&gt; # Create custom pset<br>&gt; oProp = xsi.activesceneroot.addproperty(
'CustomProperty', False,<br>&gt; 'ColorPicker' )<br>&gt;<br>&gt; # Create color
parameters<br>&gt; oProp.addparameter3( 'red', c.siDouble )<br>&gt;
oProp.addparameter3( 'green', c.siDouble )<br>&gt; oProp.addparameter3( 'blue',
c.siDouble )<br>&gt; oProp.addparameter3( 'alpha', c.siDouble )<br>&gt;<br>&gt;
# Provide layout to pset<br>&gt; oLayout = oProp.ppglayout<br>
&gt;<br>&gt; # Add widget<br>&gt; oColor = oLayout.addcolor( 'red', 'red', True
)<br>&gt; oColor.setattribute( 'NoLabel', True )<br>&gt;<br>&gt; Hope this
helps<br>&gt; Bernard<br>&gt;<br>&gt;<br>&gt; Bernard Lebel wrote:
<br>&gt;<br>&gt; &gt;Is PPG indeed defined somewhere? If so, where?<br>&gt; &gt
;<br>&gt; &gt;Perhaps you are running into a scope problem, wich is critical in
<br>&gt; &gt;Python. Keep in mind that a name assigned on the wrong scope will
<br>&gt; &gt;prevent it from being usable in other scopes.<br>&gt; &gt;For
instance, if you run a command that assigns a name a the top level<br>&gt; &gt;
(a global for the entire script), this global will not be accessible
<br>&gt; &gt;outside this file unless you import the file as a module and then
<br>&gt; &gt;fetch the variable by name qualification (ie: myvariable =<br>&gt;
&gt;modulename.variablename).<br>&gt; &gt;<br>&gt; &gt;Normally functions inside
a module can access all global names from
<br>&gt; &gt;that same module, but not from other functions, unless all these
<br>&gt; &gt;functions are nested into another function and the name is assigned
in<br>&gt; &gt;that one. The only way to make a name global from a function is
to
<br>&gt; &gt;declare it first as global with the global statement), then assign
it<br>&gt; &gt;to a value.<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;Cheers<br>&gt;
&gt;Bernard<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;On 4/22/05, Nick &lt;
<a href="mailto:nick.petit@(protected)">nick.petit@(protected)</a>&gt; wrote:<br>
&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;&gt;I haven't seen any docs or examples of
creating dynamic ppgs done in<br>&gt; &gt;&gt;Python but I'm sure it must be
feasable... so far I can't seem to get
<br>&gt; &gt;&gt;the PPG global variable to work with the OnChange callback...
I'm<br>&gt; &gt;&gt;probably doing this entirely wrong as I'm still fumbling
around in the<br>&gt; &gt;&gt;dark, but this works in jscript and in vbs but I
can't seem to make it
<br>&gt; &gt;&gt;work in python...<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;olayout
.Logic = str(OnInit()) + \<br>&gt;
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str
(Cons_OnChanged())<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;# then I define my functions
<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;def OnInit(opset):<br>&gt; &gt;&gt;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;olayout = PPG.PPGLayout<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt;This keeps on returning this error:<br>&gt; &gt;&gt;<br>&gt;
&gt;&gt;#ERROR : Traceback (most recent call last):<br>&gt; &gt;&gt;#&nbsp;&nbsp
;File &quot;&lt;Script Block &gt;&quot;, line 100, in ?<br>&gt; &gt;&gt;#&nbsp;
&nbsp;&nbsp;&nbsp;PPGCreator()
<br>&gt; &gt;&gt;#&nbsp;&nbsp;File &quot;&lt;Script Block &gt;&quot;, line 38,
in PPGCreator<br>&gt; &gt;&gt;#&nbsp;&nbsp;&nbsp;&nbsp;olayout.Logic = str
(OnInit(opset)) + str(Cons_OnChanged(opset))<br>&gt; &gt;&gt;#&nbsp;&nbsp;File
&quot;&lt;Script Block &gt;&quot;, line 41, in OnInit
<br>&gt; &gt;&gt;#&nbsp;&nbsp;&nbsp;&nbsp;olayout = PPG.PPGLayout<br>&gt; &gt;
&gt;#NameError: global name 'PPG' is not defined<br>&gt; &gt;&gt;# - [line 41]
<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;I can hack it in a very fugly way so it will
work on init by passing
<br>&gt; &gt;&gt;the functions the actual custom prop object as a variable, but
after<br>&gt; &gt;&gt;it's been created this variable no longer exists in the
logic section<br>&gt; &gt;&gt;and I'd rather not get it using a
Dictionary.GetObject as it's just<br>&gt; &gt;&gt;not reliable enough. If
someone could shed some light on where I've<br>&gt; &gt;&gt;gone wrong that
would be really appreciated... :)<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;Cheers!
<br>&gt; &gt;&gt;Nick.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;---<br>&gt; &gt;&gt
;Unsubscribe? Mail <a href="mailto:Majordomo@(protected)">Majordomo@(protected)
.COM</a> with the following text in body:<br>&gt; &gt;&gt;unsubscribe xsi
<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;<br>&gt; &gt;
<br>&gt; &gt;<br>&gt;<br>&gt; ---<br>&gt; Unsubscribe? Mail <a href="mailto
:Majordomo@(protected)">Majordomo@(protected)</a> with the following text in
body:
<br>&gt; unsubscribe xsi<br>&gt;<br><br>---<br>Unsubscribe? Mail <a href=
"mailto:Majordomo@(protected)">Majordomo@(protected)</a> with the following
text in body:<br>unsubscribe xsi<br></blockquote></div><br><br><br>--
<br>Aloys Baillet - Character TD @ Animal Logic