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?
 
Custom Objects and Classes for Scripting

Custom Objects and Classes for Scripting

2005-03-27       - By kim aldis

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



> -- --Original Message-- --
> From: owner-xsi@(protected)
> [mailto:owner-xsi@(protected)] On Behalf Of Brad Friedman
> Sent: 26 March 2005 21:35
> To: XSI@(protected)
> Subject: Re: Custom Objects and Classes for Scripting
>
>
>
> What I'm currious about is just overhead and best practices
> with that technique.  The CGSoup piece isn't an all inclusive
> tutorial that covers all the potential pitfalls so i was
> hoping someone had been using the technique and could shed
> some light on the intricacies of it.  In particular, if
> anyone had been using it as a function library.  Since its
> functions on an instance rather than static functions in a class...
> how does one get around the overhead of constant
> instantiation of the object by clients of the library?  Or is
> the overhead so tiny that its trivial to constantly
> instantiate the object to get at what are essentially static methods?
>
I use this method for pretty much all my libtary code now. My observation
the overhead of instanciation is negligable when compared to calling the
command itself, which is pretty slow. Although Brad is the one to answer
questions on speed. In fact, one of the great advantages of this method is
that you can minimise the number of calls to commands by creating them as
methods of an object itself, creating the object, for example, outside of
the loop, keeping the method calls inside.

If you're really concerned, though, why not do some timing tests.

As for Python classes as commands, I also use this a lot to pull in the kind
of tools not available from Jscript or VB. In particular I prefer the file
handling tools but there's also socket handling, mail, filetype, XML, SQL
...... It opens up a whole bunch of possibilities. It allows me to carry on
working with my core scripting tools, which are Jscript, but with increased
fucntionality.

An yeah, I know Bernard. I'll get on the case as soon as I clear up what I'm
doing right now. I should keep my mouth shut until I can deliver. ;)


---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi