Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2004-07-03 09:17:04 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2004-07-03 09:17:04 +0400
commit928282772051eadd29b26a43b4c217ebf06d0ba9 (patch)
tree36e2a9906ed924e962554df716d30f0ad1bce798 /source/blender/python/api2_2x/doc/Blender.py
parent90d4f7a3c1f6f789df61f348f974813a260014f5 (diff)
New scripts:
- hotkeys, obdatacopier and renameobjectbyblock, all from Jean-Michel Soler (jms); - bevel_center by Loic Berthe, suggested for inclusion by jms; - doc_browser, by Daniel Dunbar (Zr) Thanks to them for the new contributions! (I included doc_browser at 'Misc' because only users interested in script writing would actually use it, but it could also be under 'Help'. Opinions?) BPython related: - Added scriptlink methods to object, lamp, camera and world. - Object: added object.makeTrack and object.clearTrack (old track method). - sys: made sys.exists(path) return 0 for not found; 1 for file, 2 for dir and -1 for neither. - doc updates and fixes. - made ONLOAD event work. G.f's SCENESCRIPT bit was being zeroed in set_app_data. - Blender: updated functions Load and Save to support the builtin importers and exporters besides .blend (dxf, videoscape, vrml 1.0, stl, ...) - Draw: added mouse wheel events. - Scene: added scene.play to play back animations (like ALT+A and SHIFT+ALT+A). Makes a good counter, too, when the 'win' attribute is set to a space that doesn't "animate". The scene.play() addition and the fix to ONLOAD scriptlinks is part of the work for a Blender demo mode. It already works, but I'll still add support for Radiosity calculations and fix a thing in main(): it executes onload scripts too early (BIF_Init), giving funny results in alt+a animations and renderings when firing up Blender. Loading after the program is up has no such problems. When I finish I'll post examples of demo mode scripts.
Diffstat (limited to 'source/blender/python/api2_2x/doc/Blender.py')
-rw-r--r--source/blender/python/api2_2x/doc/Blender.py65
1 files changed, 46 insertions, 19 deletions
diff --git a/source/blender/python/api2_2x/doc/Blender.py b/source/blender/python/api2_2x/doc/Blender.py
index b595bfb9e49..eb048b65e31 100644
--- a/source/blender/python/api2_2x/doc/Blender.py
+++ b/source/blender/python/api2_2x/doc/Blender.py
@@ -4,14 +4,14 @@
# Doc system used: epydoc - http://epydoc.sf.net
# command line:
-# epydoc -o BPY_API_230 --url "http://www.blender.org" -t Blender.py \
+# epydoc -o BPY_API_23x --url "http://www.blender.org" -t Blender.py \
# -n "Blender" --no-private --no-frames Blender.py \
# Types.py Scene.py Object.py NMesh.py Material.py Camera.py Lamp.py \
# Armature.py Metaball.py Effect.py Curve.py Ipo.py World.py BGL.py Window.py \
# Draw.py Image.py Text.py Lattice.py Texture.py Registry.py Sys.py Mathutils.py
"""
-The main Blender module.
+The main Blender module (*).
The Blender Python API Reference
================================
@@ -23,30 +23,32 @@ The Blender Python API Reference
- L{Bone}
- L{NLA}
- L{BGL}
- - L{Camera}
+ - L{Camera} (*)
- L{Curve}
- - L{Draw}
+ - L{Draw} (*)
- L{Effect}
- - L{Image}
+ - L{Image} (*)
- L{Ipo}
- - L{Lamp}
+ - L{Lamp} (*)
- L{Lattice}
- L{Library}
- - L{Material}
+ - L{Material} (*)
- L{Mathutils}
- - L{Metaball}
+ - L{Metaball} (*)
- L{NMesh}
- L{Noise}
- - L{Object}
+ - L{Object} (*)
- L{Registry}
- - L{Scene}
+ - L{Scene} (*)
- L{Render}
- L{Text}
- L{Texture}
- L{Types}
- L{Window}
- - L{World}
- - L{sys<Sys>}
+ - L{World} (*)
+ - L{sys<Sys>} (*)
+
+ (*) - marks updated.
Introduction:
-------------
@@ -104,29 +106,54 @@ def Redraw ():
def Load (filename = None):
"""
- Load a Blender .blend file.
+ Load a Blender .blend file or any of the other supported file formats.
+
+ Supported formats:
+ - Blender's .blend;
+ - DXF;
+ - Open Inventor 1.0 ASCII;
+ - Radiogour;
+ - STL;
+ - Videoscape;
+ - VRML 1.0 asc.
+
@type filename: string
- @param filename: the pathname to the desired .blend file. If 'filename'
+ @param filename: the pathname to the desired file. If 'filename'
isn't given or if it contains the substring '.B.blend', the default
.B.blend file is loaded.
@warn: loading a new .blend file removes the current data in Blender. For
safety, this function saves the current data as an autosave file in
- the temporary dir used by Blender before loading the new file.
+ the temporary dir used by Blender before loading a new Blender file.
+ @warn: after a call to Load(blendfile), current data in Blender is lost,
+ including the Python dictionaries. Any posterior references in the
+ script to previously defined data will generate a NameError. So it's
+ better to put Blender.Load as the last executed command in the script,
+ when this function is used to open .blend files.
"""
def Save (filename, overwrite = 0):
"""
- Save a Blender .blend file with the current program data.
+ Save a Blender .blend file with the current program data or export to
+ one of the builtin file formats.
+
+ Supported formats:
+ - Blender (.blend);
+ - DXF (.dxf);
+ - STL (.stl);
+ - Videoscape (.obj);
+ - VRML 1.0 (.wrl).
+
@type filename: string
- @param filename: the pathname for the desired .blend file. If it doesn't
- contain ".blend", this extension is automatically appended.
+ @param filename: the filename for the file to be written. It must have one
+ of the supported extensions or an error will be returned.
@type overwrite: int (bool)
@param overwrite: if non-zero, file 'filename' will be overwritten if it
already exists. By default existing files are not overwritten (an error
is returned).
- @note: the substring ".B.blend" is not accepted inside 'filename'.
+ @note: The substring ".B.blend" is not accepted inside 'filename'.
+ @note: DXF, STL and Videoscape export only B{selected} meshes.
"""
def Quit ():