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-22       - By Nick

 Back
Reply:     1     2     3     4     5     6     7     8  

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