Commit Graph

339 Commits

Author SHA1 Message Date
Benoit Bolsee
4213eca5fc BGE VideoTexture: add depth buffer access to ImageViewport and ImageRender.
2 new attributes to ImageViewport and ImageRender object:
depth: set to True to retrieve the depth buffer as an array of float
       (not suitable for texture source).
zbuff: set to True to retrieve the depth buffer as a grey scale pixel array
       (suitable for texture source).

A new mode 'F' is added to VideoTexture.imageToArray() to allow returning the image
buffer as a one dimensional array of float. This mode should only be used to retrieve
the depth buffer of ImageViewport and ImageRender objects.

Example:

viewport = VideoTexture.ImageViewport()
viewport.depth = True
depth = VideoTexture.imageToArray(viewport,'F')
# show depth of bottom left pixel
# 1.0 = infinite, 0.0 = on near clip plane.
print(depth[0])
2012-10-20 22:28:44 +00:00
Jiri Hnidek
13d829e57d * Fix small bug in Python operator example; improved example of modal operator 2012-10-12 18:19:39 +00:00
Campbell Barton
b1c4809f50 rename BGE KX_GameObject attrs
* group -> group_parent
* members -> group_children

so its more clear what direction the relationship is.
2012-10-09 06:03:57 +00:00
Campbell Barton
8d2835b5e5 patch [#31875] Patch to get scene access through a game object
from Jay Parker (battery)
2012-10-09 05:58:09 +00:00
Campbell Barton
acf3a2790e api changelog for 2.64 and 2.63 (which I missed last release) 2012-10-09 01:07:08 +00:00
Campbell Barton
7614428c09 style cleanup: pep8 2012-10-08 10:03:01 +00:00
Campbell Barton
d5de816a15 patch [#32791] Spelling mistakes corrected.
from Sunny Gogoi (darkowlzz)
2012-10-07 03:26:30 +00:00
Mitchell Stokes
7beff06950 BGE: Committing patch [#31442] "API improvements: Group references python api, for better control over groups and instances" by Martin Sell (moerdn). This patch adds a member and a group property to KX_GameObject:
* KX_GameObject.member returns the list of group members if the object is a group object, otherwise None is returned
  * KX_GameObject.group returns the group object that the object belongs to or None if the object is not part of a group
2012-10-07 00:09:02 +00:00
Campbell Barton
d8144ef0f5 style cleanup: comment blocks 2012-10-04 13:26:15 +00:00
Alex Fraser
27c4c1f417 Added example of KX_GameObject subclassing to game engine docs. 2012-10-02 14:15:02 +00:00
Campbell Barton
721c37072e uncomment data identifiers from sphinx docs (own error made r41509) 2012-09-03 02:08:56 +00:00
Campbell Barton
3ec93e8c35 doc type correction 2012-08-22 15:04:11 +00:00
Campbell Barton
994d75b6ae spelling cleanup: spelling corrections from user zeffii on IRC. 2012-08-19 15:28:24 +00:00
Campbell Barton
4c5925503e fix for building docs 2012-07-30 10:44:57 +00:00
Campbell Barton
4ef8f3f537 code cleanup: assign mode to a variable in the 3d view header and remove some unused imports 2012-07-29 14:07:57 +00:00
Thomas Dinges
4fc078001d Documentation:
* Some UI docs for the Best Practise guide. Still WIP.
2012-07-29 01:38:31 +00:00
Mitchell Stokes
7fb85e1fb7 BGE LibLoad: Allow the user to disable loading text datablocks if they want to attempt to increase security by not loading potential Python scripts. 2012-07-22 22:58:12 +00:00
Campbell Barton
2557eaf0dd print names of nodes/sockets when cycles complains about only being able to connect a closure to another closure. 2012-07-19 13:04:43 +00:00
Mitchell Stokes
9d73cbf2c4 As a response to issue [#28483] "Enable/Disable Rigid Body actuator do nothing" reported by Jean-Francois Gallant (pyroevil), I'm adding preliminary support to enable and disable rigid body physics on dynamic objects. This is can be done via the Edit Object Actuator or through KX_GameObject.enableRigidBody() and KX_GameObject.disableRigidBody(). Thanks to Sergej Reich for his help with the patch. 2012-07-09 04:57:21 +00:00
Mitchell Stokes
d77e658c91 Adding a note to KX_Camera.projection_matrix and KX_Camera.modelview_matrix to warn that both values are the identity matrix prior to the first frame of rendering. Both values are calculated when rendering, which is after Python scripts have a chance to run on frame 1. 2012-07-07 06:42:44 +00:00
Bastien Montagne
4d2a6a8e21 Spellfixes: colour -> color 2012-07-04 12:19:50 +00:00
Bastien Montagne
468ef74ed7 More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). 2012-07-03 19:09:07 +00:00
Campbell Barton
edf244cbf7 document calling operators with undo enabled. 2012-06-28 08:17:28 +00:00
Mitchell Stokes
ecc15e53bd Removing channel manipulation from the Action Actuator Python API since this has been broken since the animation changes from Pepper. BL_ArmatureObject.channels should be used instead. For more information see bug #28843 for more info:
http://projects.blender.org/tracker/index.php?func=detail&aid=28843&group_id=9&atid=306
2012-06-28 06:22:47 +00:00
Dalai Felinto
7016538974 bge.logic.keyboard.getClipboard() and .setClipboard methods
the idea of using methods instead of attributes is to avoid users abusing of the system calls.

Thanks Campbell Barton for reviewing and small corrections
2012-06-27 21:57:33 +00:00
Campbell Barton
15cb064e1b style cleanup 2012-06-25 07:24:48 +00:00
Campbell Barton
98e6912480 style cleanup 2012-06-19 22:17:19 +00:00
Campbell Barton
b5b8306685 code cleanup: includes, also correct some py example typos 2012-06-16 20:20:07 +00:00
Mitchell Stokes
418451fa03 KX_RadarSensor.getConeHeight() not longer exists, removing it from the docs. 2012-06-14 08:02:45 +00:00
Mitchell Stokes
c07c572373 Fix for [#31813] "bge.types.KX_RadarSensor incorrect attributes" reported by Monster.
KX_RadarSensor.angle was returning the angle that was used to construct Bullet's physics shape, which is calculated from the logic brick gui. KX_RadarSensor.angle now recalculates the original value from the gui. However, m_coneradius isn't actually used by KX_RadarSensor that I can see, so it might be better to just assign the original angle to m_coneradius instead of the calculated value. I've also made KX_RadarSensor.angle read-only, since setting m_coneradius does not appear to have any affect, which means writing to KX_RadarSensor.angle never worked properly.
2012-06-14 08:01:20 +00:00
Campbell Barton
5248ec57d9 minor fixes
- new compositor could use uninitialized var
- profile conversion could use uninitialized var
- set better warnings for clang+cmake.
- remove picky warnings from sphinx doc gen shell script.
2012-06-11 12:13:41 +00:00
Campbell Barton
abfe63d8aa updates to context docs and add missing member to node context 'node_context_dir'. 2012-06-11 09:24:25 +00:00
Sergey Sharybin
8849a78970 Added example of basic objects ooperations in Python, liek adding object
datablock, adding object, linking it to scene and making selected and active.
2012-06-06 10:01:17 +00:00
Campbell Barton
e2133842c0 patch [#31594] [Documentation]: fix for example in bge.render.rst
by Philipp Oeser (lichtwerk)
2012-05-25 12:37:14 +00:00
Dalai Felinto
800e79c088 expanding bmesh example (py api) 2012-05-22 18:14:34 +00:00
Campbell Barton
f16f545c6e style cleanup
also fix example for mesh uv's
2012-05-22 16:24:09 +00:00
Dalai Felinto
39f2f99794 fix for bmesh api example
worth noticing is that the example in bpy.types.Mesh is wrong too (Mesh type does not have an uv element)
but I would prefer someone more familiar with bmesh to take a look at those
2012-05-22 15:19:19 +00:00
Brecht Van Lommel
2151c2f28e Python: documentation about overriding context members. 2012-05-02 13:28:13 +00:00
Campbell Barton
c6051ea87b replace python3 command with python3.2, python3 isnt available on ubuntu. 2012-05-01 20:45:16 +00:00
Dalai Felinto
ac4b757287 patch [#31216] OpenGL urls updated by Julien DUROURE (julien)
update for the apidocs for the BGL module
2012-05-01 20:45:03 +00:00
Campbell Barton
657e62c912 code cleanup: tag unused vars 2012-05-01 18:57:32 +00:00
Sergey Sharybin
e75e40c972 Release commit, 2.63!
Special thanks to Mango team for awesome splash screen!
And everybody else who made this release! :)
2012-04-26 17:49:48 +00:00
Campbell Barton
a1b9608ddd add mesh example with docs explaining polygon / loop relationship 2012-04-23 00:20:32 +00:00
Campbell Barton
1642e2888c rename Mesh.uv_loop_layers --> uv_layers
add filtering for document generator to support --partial bpy.types.SomeType
2012-04-22 23:51:50 +00:00
Campbell Barton
15eb3452ec style cleanup: pep8, also quiet compiler warning. 2012-04-20 18:50:18 +00:00
Campbell Barton
f774384606 updated man page 2012-04-05 09:41:55 +00:00
Campbell Barton
20e2330434 added Mesh.calc_tessface(), needed to update mesh tessface after bmesh edits.
also add py api BMDeformVert.clear()
2012-03-29 13:44:30 +00:00
Campbell Barton
7f1e9b8c41 bmesh py api:
added access to deform weights, access to weights acts like a python dict so you can do...

  print(group in dvert)
  dvert[group] = 0.5
  print(dvert[group])
  del dvert[group]
  print(dvert.items())
2012-03-27 10:30:10 +00:00
Campbell Barton
81d8f17843 style cleanup: pep8, indentation 2012-03-24 07:36:32 +00:00
Howard Trickey
ef1d3a3993 Fixed a couple of typos in the Python API docs 2012-03-23 14:29:59 +00:00