[Bf-python] VRML Import/Export script

Willian Padovani Germano wgermano at ig.com.br
Mon May 19 07:41:22 CEST 2003


Hi Stephen,

On Sun, 2003-05-18 at 22:55, Stephen Doughty wrote:

> I don't have any experience at OOP so would use a
> conventional approach (would be useful to learn OOP!!)

The Python Tutorial doc has a nice chapter about OOP with Python.  It's
not enough to teach you OOP, but it's a good start.  For more, I like
Bruce Eckel's C++ books (and they are available online, along with other
books for Java and Python, for free, at www.bruceeckel.com).  The first
volume has a chapter about OOP principles.

For the script, no problem, you don't need to use OOP.

> If the powers that be are interested, please email me
> with more info.

We need import/export scripts for many formats, VRML is one of the most
important ones.  You can write the script for Blender 2.27, since
exppython isn't complete enough yet and should be able to parse scripts
written for Blender 2.25, 2.26 and 2.27 (maybe with really minor
changes, we're not sure yet -- nothing to worry about, though).

Now about VRML, there is work done in

blender/intern/python/modules/vrml and
blender/intern/python/modules/Converter/Importer

They look independent from each other.  Personally I don't know the
situation about VRML import/export in Blender, I tried it once, but more
than 2 years ago.  Michel, maybe what we need is already there.

But someone needs to check (with Blender 2.27) whether any of those
scripts work well enough, what they miss, etc.  So that might be a good
start, Stephen.

There's a lot that can be done in this important area
(importers/exporters).  There are new scripts to write, lists of
available ones to be made, possibly conversion of older ones from even
older Blender Python API's (shouldn't be hard), etc.

> Idea:
> I wonder if import/export scripts could be scripted
> into the File> (or other) menus.  Have a script dir in
> the blender dir and links to the scripts in that dir
> gets incorporated in the menu options when blender
> starts.
> 
> Well crafted scripts could well be indistinguishable
> from hardcoded blender functions.

That's the plan.  But first we need to replace the current
implementation with exppython -- that means -- we need to get all that
functionality available from exppython.  Then we'll be able to consider
new additions (though some are already being put in) and the interface. 
You're right, the access method and the look of scripts should be
natural enough to make them indistinguishable from other parts of
Blender.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list