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?
 
PPG logic

PPG logic

2005-06-07       - By Patrick Boucher

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Bernard Lebel wrote:
> pointing to the line
>
> oLayout.Logic = OnInit()

As Brad mentioned you have to supply the logic as a stirng to
oLayout.Logic and JScript, with it's string representation of a
function, is really handy with this. In python you'll want to use the
inspect module.

import inspect
import foo.bar.myLogicFunctions as tootsieRoll
# or wherever your logic functions are

layout.Logic = inspect.getsource(tootsieRoll)

I use this trick in PB_Jitter that you can get off XSI Blog if you want
to check out some actual working source

You can't really put your logic code in the main file because Python
parses/compiles it and dumps the source but with modules, it keeps links
back to the source on disk thus enabling this trick. If you do figure
out how to do it in the main file, I'd like to know.

Big thanks to Jerry Gamache for originaly helping me out on this one!

--
Patrick Boucher
TD - Coder - Resident geek
Buzz Image Group
Tel 514.848.0579
Fax 514.848.6371

www.buzzimage.com
www.xsi-blog.com
---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi