diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-07-03 09:17:04 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-07-03 09:17:04 +0400 |
commit | 928282772051eadd29b26a43b4c217ebf06d0ba9 (patch) | |
tree | 36e2a9906ed924e962554df716d30f0ad1bce798 /source/blender/python/api2_2x/doc/World.py | |
parent | 90d4f7a3c1f6f789df61f348f974813a260014f5 (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/World.py')
-rw-r--r-- | source/blender/python/api2_2x/doc/World.py | 47 |
1 files changed, 38 insertions, 9 deletions
diff --git a/source/blender/python/api2_2x/doc/World.py b/source/blender/python/api2_2x/doc/World.py index 625f0432212..3b133deec5d 100644 --- a/source/blender/python/api2_2x/doc/World.py +++ b/source/blender/python/api2_2x/doc/World.py @@ -3,7 +3,10 @@ """ The Blender.World submodule +B{New}: scriptLink methods: L{World.getScriptLinks}, ... + INTRODUCTION +============ The module world allows you to access all the data of a Blender World. @@ -80,7 +83,7 @@ class World: def getName(): """ - Retreives the name of an world object + Retrieves the name of an world object @rtype: string @return: the name of the world object. """ @@ -116,7 +119,7 @@ class World: def getSkytype(): """ - Retreives the skytype of a world object. + Retrieves the skytype of a world object. The skytype is a combination of 3 bits : Bit 0 : Blend; Bit 1 : Real; Bit 2 : paper. @rtype: int @return: the skytype of the world object. @@ -135,7 +138,7 @@ class World: def getMode(): """ - Retreives the mode of a world object. + Retrieves the mode of a world object. The mode is a combination of 3 bits : Bit 0 : Blend; Bit 1 : Real; Bit 2 : paper. @rtype: int @return: the mode of the world object. @@ -154,7 +157,7 @@ class World: def getMistype(): """ - Retreives the mist type of a world object. + Retrieves the mist type of a world object. The mist type is an integer 0 : quadratic; 1 : linear; 2 : square. @rtype: int @return: the mistype of the world object. @@ -173,7 +176,7 @@ class World: def getHor(): """ - Retreives the horizon color of a world object. + Retrieves the horizon color of a world object. This color is a list of 3 floats. @rtype: list of three floats @return: the horizon color of the world object. @@ -191,7 +194,7 @@ class World: def getZen(): """ - Retreives the zenith color of a world object. + Retrieves the zenith color of a world object. This color is a list of 3 floats. @rtype: list of three floats @return: the zenith color of the world object. @@ -209,7 +212,7 @@ class World: def getAmb(): """ - Retreives the ambient color of a world object. + Retrieves the ambient color of a world object. This color is a list of 3 floats. @rtype: list of three floats @return: the ambient color of the world object. @@ -227,7 +230,7 @@ class World: def getStar(): """ - Retreives the star parameters of a world object. + Retrieves the star parameters of a world object. It is a list of nine floats : red component of the color green component of the color @@ -253,7 +256,7 @@ class World: def getMist(): """ - Retreives the mist parameters of a world object. + Retrieves the mist parameters of a world object. It is a list of four floats : intensity of the mist start of the mist @@ -273,3 +276,29 @@ class World: @rtype: PyNone @return: PyNone """ + + def getScriptLinks (event): + """ + Get a list with this World's script links of type 'event'. + @type event: string + @param event: "FrameChanged" or "Redraw". + @rtype: list + @return: a list with Blender L{Text} names (the script links of the given + 'event' type) or None if there are no script links at all. + """ + + def clearScriptLinks (): + """ + Delete all this World's script links! + @rtype: bool + @return: 0 if some internal problem occurred or 1 if successful. + """ + + def addScriptLink (text, event): + """ + Add a new script link to this World. + @type text: string + @param text: the name of an existing Blender L{Text}. + @type event: string + @param event: "FrameChanged" or "Redraw". + """ |