Page MenuHome

pydoc_patch.text

pydoc_patch.text

Index: source/blender/python/api2_2x/doc/API_intro.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/API_intro.py,v
retrieving revision 1.20
diff -u -u -r1.20 API_intro.py
--- source/blender/python/api2_2x/doc/API_intro.py 1 Aug 2005 03:06:24 -0000 1.20
+++ source/blender/python/api2_2x/doc/API_intro.py 28 Aug 2005 07:48:44 -0000
@@ -41,11 +41,12 @@
- L{Text3d}
- L{Font}
- L{Texture}
+ - L{TimeLine}
- L{Types}
- L{Window}
- L{Theme}
- L{World}
- - L{sys<Sys>}
+ - L{sys}
Additional information:
-----------------------
Index: source/blender/python/api2_2x/doc/Draw.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/Draw.py,v
retrieving revision 1.18
diff -u -u -r1.18 Draw.py
--- source/blender/python/api2_2x/doc/Draw.py 15 Jun 2005 06:22:26 -0000 1.18
+++ source/blender/python/api2_2x/doc/Draw.py 28 Aug 2005 07:48:45 -0000
@@ -632,6 +632,10 @@
either the width or the height of the clipping rectangle are negative then
the corresponding dimension (width or height) is set to include as much of
the image as possible.
+
+ For drawing images with alpha blending with the background you will need to enable blending as shown in the example.
+
+
Example::
import Blender
@@ -640,7 +644,12 @@
myimage = Image.Load('myimage.png')
def gui():
+ BGL.glEnable( BGL.GL_BLEND ) # Only needed for alpha blening images with background.
+ BGL.glBlendFunc(BGL.GL_SRC_ALPHA, BGL.GL_ONE_MINUS_SRC_ALPHA)
+
Draw.Image(myimage, 50, 50)
+
+ BGL.glDisable( BGL.GL_BLEND )
def event(evt, val):
if evt == Draw.ESCKEY:
Draw.Exit()
Index: source/blender/python/api2_2x/doc/NMesh.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/NMesh.py,v
retrieving revision 1.37
diff -u -u -r1.37 NMesh.py
--- source/blender/python/api2_2x/doc/NMesh.py 1 Aug 2005 06:01:24 -0000 1.37
+++ source/blender/python/api2_2x/doc/NMesh.py 28 Aug 2005 07:48:46 -0000
@@ -4,11 +4,11 @@
The Blender.NMesh submodule.
B{New}:
- - edges class (L{NMEdge}) and nmesh methods (L{NMesh.addEdge},
-L{NMesh.addEdgesData}, etc.);
- - new optional arguments to L{NMesh.update};
- - L{NMesh.transform};
- - L{GetNames}.
+ - edges class (L{NMEdge}) and nmesh methods (L{NMesh.NMesh.addEdge},
+L{NMesh.NMesh.addEdgesData}, etc.);
+ - new optional arguments to L{NMesh.NMesh.update};
+ - L{NMesh.NMesh.transform};
+ - L{GetNames};
- L{GetRawFromObject} supports Surface/Curve/Text/Meta objects
Mesh Data
@@ -161,7 +161,7 @@
matters, the rendering one is only processed at the rendering pre-stage
and is not available for scripts. This is not a problem at all, since
you can get and set the subdivision levels via scripting, too (see
- L{NMesh.getSubDivLevels}, L{NMesh.setSubDivLevels}).
+ L{NMesh.NMesh.getSubDivLevels}, L{NMesh.NMesh.setSubDivLevels}).
@note: Meshes extracted from curve based objects (Font/2D filled curves)
contain both the filled surfaces and the outlines of the shapes.
@warn: This function gets I{deformed} mesh data, already modified for
@@ -296,11 +296,11 @@
@type sel: bool
@ivar sel: The selection state (1: selected, 0: unselected) of this NMesh's
faces *in edit mode*. This is not the same as the selection state of
- the textured faces (see L{NMesh.NMFace.flag}).
+ the textured faces (see L{flag}).
@type hide: bool
@ivar hide: The visibility state (1: hidden, 0: visible) of this NMesh's
faces *in edit mode*. This is not the same as the visibility state of
- the textured faces (see L{NMesh.NMFace.flag}).
+ the textured faces (see L{flag}).
@ivar col: The list of vertex colours.
@ivar mat: Same as I{materialIndex} below.
@ivar materialIndex: The index of this face's material in its NMesh materials
@@ -319,8 +319,8 @@
@note: there are normal faces and textured faces in Blender, both currently
with their own selection and visibility states, due to a mix of old and new
code. To (un)select or (un)hide normal faces (visible in editmode), use
- L{NMFace.sel} and L{NMFace.hide} vars. For textured faces (Face Select
- mode in Blender) use the old L{NMFace.flag} bitflag. Also check the
+ L{sel} and L{hide} vars. For textured faces (Face Select
+ mode in Blender) use the old L{flag} bitflag. Also check the
example above and note L{Window.EditMode}.
@note: Assigning uv textures to mesh faces in Blender works like this:
1. Select your mesh.
@@ -349,7 +349,7 @@
@ivar name: The NMesh name. It's common to use this field to store extra
data about the mesh (to be exported to another program, for example).
@ivar materials: The list of materials used by this NMesh. See
- L{NMesh.getMaterials} for important details.
+ L{getMaterials} for important details.
@ivar verts: The list of NMesh vertices (NMVerts).
@ivar users: The number of Objects using (linked to) this mesh.
@ivar faces: The list of NMesh faces (NMFaces).
@@ -437,7 +437,7 @@
- -1: return the current nmesh's list;
- 0: retrieve a fresh list from the Blender mesh -- eventual
modifications made by the script not included, unless
- L{NMesh.update}d is called before this method;
+ L{update} is called before this method;
- 1: like 0, but empty slots are not ignored, they are returned as
None's.
@note: what >= 0 also updates nmesh.materials attribute.
Index: source/blender/python/api2_2x/doc/Object.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/Object.py,v
retrieving revision 1.39
diff -u -u -r1.39 Object.py
--- source/blender/python/api2_2x/doc/Object.py 20 Jul 2005 00:03:52 -0000 1.39
+++ source/blender/python/api2_2x/doc/Object.py 28 Aug 2005 07:48:48 -0000
@@ -4,11 +4,11 @@
The Blender.Object submodule
B{New}:
- - L{Object.getData} now accepts an optional bool keyword argument to
+ - L{Object.Object.getData} now accepts an optional bool keyword argument to
define if the user wants the data object or just its name.
- - L{Object.clearScriptLinks} accepts a parameter now.
- - Object attributes: renamed Layer to L{Layers<Object.Object.Layers>} and
- added the easier L{layers<Object.Object.layers>}. The old form "Layer"
+ - L{Object.Object.clearScriptLinks} accepts a parameter now.
+ - Object attributes: renamed Layer to Object.Layers and
+ added the easier Object.layers. The old form "Layer"
will continue to work.
Object
@@ -104,6 +104,7 @@
The Object object
=================
This object gives access to generic data from all objects in Blender.
+
@ivar LocX: The X location coordinate of the object.
@ivar LocY: The Y location coordinate of the object.
@ivar LocZ: The Z location coordinate of the object.
@@ -139,7 +140,7 @@
@ivar dsize: The delta (X,Y,Z) size of the object.
@type Layers: integer (bitmask)
@ivar Layers: The object layers (also check the newer attribute
- L{layers<Object.Object.layers>}). This value is a bitmask with at
+ L{layers<layers>}). This value is a bitmask with at
least one position set for the 20 possible layers starting from the low
order bit. The easiest way to deal with these values in in hexadecimal
notation.
@@ -149,7 +150,7 @@
the interface.
@type layers: list of integers
@ivar layers: The layers this object is visible in (also check the older
- attribute L{Layers<Object.Object.Layers>}). This returns a list of
+ attribute L{Layers<Layers>}). This returns a list of
integers in the range [1, 20], each number representing the respective
layer. Setting is done by passing a list of ints or an empty list for
no layers.
@@ -179,7 +180,7 @@
of: 2 - axis, 4 - texspace, 8 - drawname, 16 - drawimage,
32 - drawwire.
@ivar name: The name of the object.
- @ivar sel: The selection state of the object, 1/0.
+ @ivar sel: The selection state of the object in the current scene, 1/0.
"""
def buildParts():
@@ -248,7 +249,7 @@
def getEuler():
"""
- Returns the object's rotation as Euler rotation vector (rotX, rotY, rotZ). Angles are in radians.
+ Returns the object's localspace rotation as Euler rotation vector (rotX, rotY, rotZ). Angles are in radians.
@rtype: Py_Euler
@return: A python euler
"""
@@ -268,14 +269,14 @@
"""
def isSelected():
"""
- Returns the objects selection state as a boolean value True or False.
+ Returns the objects selection state in the current scene as a boolean value True or False.
@rtype: Boolean
@return: Selection state as True or False
"""
def getLocation():
"""
- Returns the object's location (x, y, z).
+ Returns the object's localspace location (x, y, z).
@return: (x, y, z)
I{B{Example:}}
@@ -351,7 +352,7 @@
def getSize():
"""
- Returns the object's size.
+ Returns the object's localspace size.
@return: (SizeX, SizeY, SizeZ)
"""
@@ -426,12 +427,12 @@
@return: py_none
"""
- def link(object):
+ def link(datablock):
"""
- Links Object with data provided in the argument. The data must match the
+ Links Object with datablock provided in the argument. The data must match the
Object's type, so you cannot link a Lamp to a Mesh type object.
- @type object: Blender Object
- @param object: A Blender Object.
+ @type datablock: Blender datablock
+ @param datablock: A Blender datablock matching the objects type.
"""
def makeParent(objects, noninverse = 0, fast = 0):
@@ -535,7 +536,7 @@
def setEuler(euler):
"""
- Sets the object's rotation according to the specified Euler angles.
+ Sets the object's localspace rotation according to the specified Euler angles.
@type euler: Py_Euler or a list of floats
@param euler: a python euler or x,y,z rotations as floats
"""
@@ -549,7 +550,7 @@
def setLocation(x, y, z):
"""
- Sets the object's location.
+ Sets the object's localspace location relative to the parent object (if any).
@type x: float
@param x: The X coordinate of the new location.
@type y: float
@@ -560,7 +561,7 @@
def setMaterials(materials):
"""
- Sets the materials. The argument must be a list of valid material objects.
+ Sets the materials. The argument must be a list 16 items or less, consisting of material objects, None for an empty material slot.
@type materials: Materials list
@param materials: A list of Blender material objects.
"""
@@ -574,14 +575,14 @@
def setName(name):
"""
- Sets the name of the object.
+ Sets the name of the object. A string longer then 20 characters will be shortened.
@type name: String
@param name: The new name for the object.
"""
def setSize(x, y, z):
"""
- Sets the object's size.
+ Sets the object's size, relative to the parent object (if any)
@type x: float
@param x: The X size multiplier.
@type y: float
@@ -607,7 +608,7 @@
def select(boolean):
"""
- Sets the object's selection state.
+ Sets the object's selection state in the current scene.
@type boolean: Integer
@param boolean:
- 0 - unselected
@@ -616,7 +617,7 @@
def getBoundBox():
"""
- Returns the bounding box of this object. This works for meshes (out of
+ Returns the worldspace bounding box of this object. This works for meshes (out of
edit mode) and curves.
@rtype: list of 8 (x,y,z) float coordinate vectors
@return: The coordinates of the 8 corners of the bounding box.
Index: source/blender/python/api2_2x/doc/Scene.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/Scene.py,v
retrieving revision 1.16
diff -u -u -r1.16 Scene.py
--- source/blender/python/api2_2x/doc/Scene.py 3 Jul 2005 17:35:32 -0000 1.16
+++ source/blender/python/api2_2x/doc/Scene.py 28 Aug 2005 07:48:48 -0000
@@ -4,10 +4,10 @@
The Blender.Scene submodule.
B{New}:
- - L{Scene.clearScriptLinks} accepts a parameter now.
- - L{Scene.getLayers}, L{Scene.setLayers} and the L{layers<Scene.layers>} and
- L{Layers<Scene.Layers>} Scene attributes.
- - L{Scene.getActiveObject} method.
+ - L{Scene.clearScriptLinks<Scene.Scene.clearScriptLinks>} accepts a parameter now.
+ - L{Scene.getLayers<Scene.Scene.getLayers>}, L{Scene.setLayers<Scene.Scene.setLayers>} and the layers and
+ Layers Scene attributes.
+ - L{Scene.getActiveObject<Scene.Scene.getActiveObject>} method.
Scene
=====
@@ -83,7 +83,7 @@
@ivar name: The Scene name.
@type Layers: integer (bitmask)
@ivar Layers: The Scene layers (check also the easier to use
- L{layers<Scene.Scene.layers>}). This value is a bitmask with at least
+ L{layers}). This value is a bitmask with at least
one position set for the 20 possible layers starting from the low order
bit. The easiest way to deal with these values in in hexadecimal
notation.
@@ -94,7 +94,7 @@
After setting the Layers value, the interface (at least the 3d View and
the Buttons window) needs to be redrawn to show the changes.
@type layers: list of integers
- @ivar layers: The Scene layers (check also L{Layers<Scene.Scene.Layers>}).
+ @ivar layers: The Scene layers (check also L{Layers}).
This attribute accepts and returns a list of integer values in the
range [1, 20].
Example::
@@ -207,8 +207,9 @@
def getCurrentCamera():
"""
Get the currently active Camera for this Scene.
- @rtype: Blender Camera
- @return: The currently active Camera.
+ @note: The active camera can be any object type, not just a camera object.
+ @rtype: Blender Object
+ @return: The currently active Camera object.
"""
def setCurrentCamera(camera):
@@ -253,6 +254,24 @@
def addScriptLink (text, event):
"""
Add a new script link to this Scene.
+
+ Using OpenGL functions within a scene scriptlink will draw graphics over the 3D view.
+ There is an issue with the zoom of the floating panels also scaling graphics drawn your scriptlink.
+ This makes matching OpenGL graphics to mouse location impossible.
+ Make sure that you use floating point for operations that you would useually int functions for: glRasterPos2f rather then glRasterPos2i.
+
+ The following example shows how you can use the OpenGL model view matrix to obtain the scale value.
+
+ Example::
+ from Blender import BGL
+ view_matrix = BGL.Buffer(BGL.GL_FLOAT, 16)
+ BGL.glGetFloatv(BGL.GL_MODELVIEW_MATRIX, view_matrix)
+ gl_scale = 1/viewMatrix[0]
+
+ # Now we have the scale we can draw to the correct scale.
+ BGL.glRect2f(10*gl_scale, 10*gl_scale, 110*gl_scale, 110*gl_scale)
+
+
@type text: string
@param text: the name of an existing Blender L{Text}.
@type event: string
@@ -271,7 +290,7 @@
- 2: play once in the biggest VIEW3D;
- 3: play once in all 'win', VIEW3D and SEQ windows.
@type win: int
- @param win: window type, see L{Window.Types}. Only some of them are
+ @param win: window type, see L{Window.Window.Types}. Only some of them are
meaningful here: VIEW3D, SEQ, IPO, ACTION, NLA, SOUND. But the others
are also accepted, since this function can be used simply as an
interruptible timer. If 'win' is not visible or invalid, VIEW3D is
Index: source/blender/python/api2_2x/doc/Theme.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/Theme.py,v
retrieving revision 1.4
diff -u -u -r1.4 Theme.py
--- source/blender/python/api2_2x/doc/Theme.py 15 Jun 2005 06:22:26 -0000 1.4
+++ source/blender/python/api2_2x/doc/Theme.py 28 Aug 2005 07:48:48 -0000
@@ -96,7 +96,7 @@
Get a space or the ui (sub)theme from this Theme.
@type t: string, int or None
@param t: the wanted sub-theme as either:
- - int: -1 for UI or the types in L{Window.Types} for the others;
+ - int: -1 for UI or the types in L{Window.Types<Window.Window.Types>} for the others;
- string: use get() to know them (they are case insensitive);
- nothing: as written above, get() returns a list of names.
@rtype: Blender ThemeSpace or ThemeUI or list of sub-theme types as strings.
Index: source/blender/python/api2_2x/doc/Window.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/doc/Window.py,v
retrieving revision 1.17
diff -u -u -r1.17 Window.py
--- source/blender/python/api2_2x/doc/Window.py 21 Apr 2005 19:44:52 -0000 1.17
+++ source/blender/python/api2_2x/doc/Window.py 28 Aug 2005 07:48:49 -0000
@@ -410,7 +410,7 @@
"""
Get the current qualifier keys state (see / compare against L{Qual}).
@rtype: int
- @return: an or'ed combination of values in L{Window.Qual}.
+ @return: an or'ed combination of values in L{Qual}.
"""
def SetKeyQualifiers (qual):
@@ -418,7 +418,7 @@
Fake qualifier keys state. This is useful because some key events require
one or more qualifiers to be active (see L{QAdd}).
@type qual: int
- @param qual: an or'ed combination of values in L{Window.Qual}.
+ @param qual: an or'ed combination of values in L{Qual}.
@rtype: int
@return: the current state, that should be equal to 'qual'.
@warn: remember to reset the qual keys to 0 once they are not necessary
@@ -465,7 +465,7 @@
"""
Get info about the current screen setup.
@type type: int
- @param type: the space type (see L{Window.Types}) to restrict the
+ @param type: the space type (see L{Types}) to restrict the
results to. If -1 (the default), info is reported about all available
areas.
@type rect: string

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
de/62/260abc05f29c7d306518509fc7d8

Event Timeline