[Bf-blender-cvs] [622cbd9] decklink: BGE: API documentation for FBO creation and use in VideoTexture.

Benoit Bolsee noreply at git.blender.org
Thu Oct 8 22:30:30 CEST 2015


Commit: 622cbd9d7f870b3f6d6b56be741a2a3f688f2790
Author: Benoit Bolsee
Date:   Tue Oct 6 17:49:27 2015 +0200
Branches: decklink
https://developer.blender.org/rB622cbd9d7f870b3f6d6b56be741a2a3f688f2790

BGE: API documentation for FBO creation and use in VideoTexture.

===================================================================

M	doc/python_api/rst/bge.render.rst
M	doc/python_api/rst/bge.texture.rst
A	doc/python_api/rst/bmesh.ops.rst

===================================================================

diff --git a/doc/python_api/rst/bge.render.rst b/doc/python_api/rst/bge.render.rst
index 3b565e2..80638c3 100644
--- a/doc/python_api/rst/bge.render.rst
+++ b/doc/python_api/rst/bge.render.rst
@@ -90,6 +90,29 @@ Constants
 
    Right eye being used during stereoscopic rendering.
 
+*****
+Types
+*****
+
+.. class:: RASOffScreen
+
+   An off-screen render buffer object. 
+
+   Use bge.render.offScreenCreate() to create it.
+   Currently it can only be used in the :class:`bge.texture.ImageRender` constructor to render on a FBO rather than the 
+   default viewport.
+
+  .. attribute:: width
+
+     The width in pixel of the FBO
+
+     :type: integer
+
+  .. attribute:: height
+
+     The height in pixel of the FBO
+
+     :type: integer
 
 *********
 Functions
@@ -362,3 +385,14 @@ Functions
    Get the current vsync value
 
    :rtype: One of VSYNC_OFF, VSYNC_ON, VSYNC_ADAPTIVE
+
+.. function:: offScreenCreate(width,height)
+
+   Create a Off-screen render buffer object.
+
+   :arg width: the width of the buffer in pixels
+   :type width: integer
+   :arg height: the height of the buffer in pixels
+   :type height: integer
+   :rtype: :class:`RASOffScreen`
+
diff --git a/doc/python_api/rst/bge.texture.rst b/doc/python_api/rst/bge.texture.rst
index 4588a3e..167f2a4 100644
--- a/doc/python_api/rst/bge.texture.rst
+++ b/doc/python_api/rst/bge.texture.rst
@@ -545,14 +545,17 @@ Image classes
 
       :type: bool
 
-.. class:: ImageRender(scene, camera)
+.. class:: ImageRender(scene, camera, fbo=None)
 
-   Image source from render.
+   Image source from render. The render is done on a custom framebuffer object if fbo is specified, otherwise on 
+   the default framebuffer.
    
    :arg scene: Scene in which the image has to be taken.
    :type scene: :class:`~bge.types.KX_Scene`
    :arg camera: Camera from which the image has to be taken.
    :type camera: :class:`~bge.types.KX_Camera`
+   :arg fbo: Off-screen render buffer object (optional)
+   :type fbo: :class:`~bge.render.RASOffScreen`
 
    .. attribute:: alpha
 
diff --git a/doc/python_api/rst/bmesh.ops.rst b/doc/python_api/rst/bmesh.ops.rst
new file mode 100644
index 0000000..3c307bc
--- /dev/null
+++ b/doc/python_api/rst/bmesh.ops.rst
@@ -0,0 +1,1944 @@
+
+BMesh Operators (bmesh.ops)
+===========================
+
+.. module:: bmesh.ops
+
+This module gives access to low level bmesh operations.
+
+Most operators take input and return output, they can be chained together
+to perform useful operations.
+
+.. note::
+
+   This API us new in 2.65 and not yet well tested.
+
+
+Operator Example
+++++++++++++++++
+This script shows how operators can be used to model a link of a chain.
+
+.. literalinclude:: ../examples/bmesh.ops.1.py
+.. function:: smooth_vert(bm, verts, factor, mirror_clip_x, mirror_clip_y, mirror_clip_z, clip_dist, use_axis_x, use_axis_y, use_axis_z)
+
+   Vertex Smooth.
+
+   Smooths vertices by using a basic vertex averaging scheme.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg verts: input vertices
+   :type verts: list of (:class:`bmesh.types.BMVert`)
+   :arg factor: smoothing factor
+   :type factor: float
+   :arg mirror_clip_x: set vertices close to the x axis before the operation to 0
+   :type mirror_clip_x: bool
+   :arg mirror_clip_y: set vertices close to the y axis before the operation to 0
+   :type mirror_clip_y: bool
+   :arg mirror_clip_z: set vertices close to the z axis before the operation to 0
+   :type mirror_clip_z: bool
+   :arg clip_dist: clipping threshold for the above three slots
+   :type clip_dist: float
+   :arg use_axis_x: smooth vertices along X axis
+   :type use_axis_x: bool
+   :arg use_axis_y: smooth vertices along Y axis
+   :type use_axis_y: bool
+   :arg use_axis_z: smooth vertices along Z axis
+   :type use_axis_z: bool
+
+
+.. function:: smooth_laplacian_vert(bm, verts, lambda_factor, lambda_border, use_x, use_y, use_z, preserve_volume)
+
+   Vertext Smooth Laplacian.
+
+   Smooths vertices by using Laplacian smoothing propose by.
+   Desbrun, et al. Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg verts: input vertices
+   :type verts: list of (:class:`bmesh.types.BMVert`)
+   :arg lambda_factor: lambda param
+   :type lambda_factor: float
+   :arg lambda_border: lambda param in border
+   :type lambda_border: float
+   :arg use_x: Smooth object along X axis
+   :type use_x: bool
+   :arg use_y: Smooth object along Y axis
+   :type use_y: bool
+   :arg use_z: Smooth object along Z axis
+   :type use_z: bool
+   :arg preserve_volume: Apply volume preservation after smooth
+   :type preserve_volume: bool
+
+
+.. function:: recalc_face_normals(bm, faces)
+
+   Right-Hand Faces.
+
+   Computes an "outside" normal for the specified input faces.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg faces: Undocumented.
+   :type faces: list of (:class:`bmesh.types.BMFace`)
+
+
+.. function:: planar_faces(bm, faces, iterations, factor)
+
+   Planar Faces.
+
+   Iteratively flatten faces.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg faces: input geometry.
+   :type faces: list of (:class:`bmesh.types.BMFace`)
+   :arg iterations: Undocumented.
+   :type iterations: int
+   :arg factor: planar factor
+   :type factor: float
+   :return:
+
+      - ``geom``: output slot, computed boundary geometry.
+
+        **type** list of (:class:`bmesh.types.BMVert`, :class:`bmesh.types.BMEdge`, :class:`bmesh.types.BMFace`)
+
+   :rtype: dict with string keys
+
+
+.. function:: region_extend(bm, geom, use_contract, use_faces, use_face_step)
+
+   Region Extend.
+
+   used to implement the select more/less tools.
+   this puts some geometry surrounding regions of
+   geometry in geom into geom.out.
+
+   if use_faces is 0 then geom.out spits out verts and edges,
+   otherwise it spits out faces.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg geom: input geometry
+   :type geom: list of (:class:`bmesh.types.BMVert`, :class:`bmesh.types.BMEdge`, :class:`bmesh.types.BMFace`)
+   :arg use_contract: find boundary inside the regions, not outside.
+   :type use_contract: bool
+   :arg use_faces: extend from faces instead of edges
+   :type use_faces: bool
+   :arg use_face_step: step over connected faces
+   :type use_face_step: bool
+   :return:
+
+      - ``geom``: output slot, computed boundary geometry.
+
+        **type** list of (:class:`bmesh.types.BMVert`, :class:`bmesh.types.BMEdge`, :class:`bmesh.types.BMFace`)
+
+   :rtype: dict with string keys
+
+
+.. function:: rotate_edges(bm, edges, use_ccw)
+
+   Edge Rotate.
+
+   Rotates edges topologically.  Also known as "spin edge" to some people.
+   Simple example: ``[/] becomes [|] then [\]``.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg edges: input edges
+   :type edges: list of (:class:`bmesh.types.BMEdge`)
+   :arg use_ccw: rotate edge counter-clockwise if true, otherwise clockwise
+   :type use_ccw: bool
+   :return:
+
+      - ``edges``: newly spun edges
+
+        **type** list of (:class:`bmesh.types.BMEdge`)
+
+   :rtype: dict with string keys
+
+
+.. function:: reverse_faces(bm, faces)
+
+   Reverse Faces.
+
+   Reverses the winding (vertex order) of faces.
+   This has the effect of flipping the normal.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg faces: input faces
+   :type faces: list of (:class:`bmesh.types.BMFace`)
+
+
+.. function:: bisect_edges(bm, edges, cuts, edge_percents)
+
+   Edge Bisect.
+
+   Splits input edges (but doesn't do anything else).
+   This creates a 2-valence vert.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg edges: input edges
+   :type edges: list of (:class:`bmesh.types.BMEdge`)
+   :arg cuts: number of cuts
+   :type cuts: int
+   :arg edge_percents: Undocumented.
+   :type edge_percents: dict mapping vert/edge/face types to float
+   :return:
+
+      - ``geom_split``: newly created vertices and edges
+
+        **type** list of (:class:`bmesh.types.BMVert`, :class:`bmesh.types.BMEdge`, :class:`bmesh.types.BMFace`)
+
+   :rtype: dict with string keys
+
+
+.. function:: mirror(bm, geom, matrix, merge_dist, axis, mirror_u, mirror_v)
+
+   Mirror.
+
+   Mirrors geometry along an axis.  The resulting geometry is welded on using
+   merge_dist.  Pairs of original/mirrored vertices are welded using the merge_dist
+   parameter (which defines the minimum distance for welding to happen).
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg geom: input geometry
+   :type geom: list of (:class:`bmesh.types.BMVert`, :class:`bmesh.types.BMEdge`, :class:`bmesh.types.BMFace`)
+   :arg matrix: matrix defining the mirror transformation
+   :type matrix: :class:`mathutils.Matrix`
+   :arg merge_dist: maximum distance for merging.  does no merging if 0.
+   :type merge_dist: float
+   :arg axis: the axis to use, 0, 1, or 2 for x, y, z
+   :type axis: int
+   :arg mirror_u: mirror UVs across the u axis
+   :type mirror_u: bool
+   :arg mirror_v: mirror UVs across the v axis
+   :type mirror_v: bool
+   :return:
+
+      - ``geom``: output geometry, mirrored
+
+        **type** list of (:class:`bmesh.types.BMVert`, :class:`bmesh.types.BMEdge`, :class:`bmesh.types.BMFace`)
+
+   :rtype: dict with string keys
+
+
+.. function:: find_doubles(bm, verts, keep_verts, dist)
+
+   Find Doubles.
+
+   Takes input verts and find vertices they should weld to.
+   Outputs a mapping slot suitable for use with the weld verts bmop.
+
+   If keep_verts is used, vertices outside that set can only be merged
+   with vertices in that set.
+
+   :arg bm: The bmesh to operate on.
+   :type bm: :class:`bmesh.types.BMesh`
+   :arg verts: input vertices
+   :type verts: list of (:class:`bmesh.types.BMVert`)
+   :arg keep_verts: list of verts to keep
+   :type keep_verts: list of (:class:`bmesh.types.BMVert`)
+   :arg dist: minimum distance
+   :type dist: float
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list