Commit Graph

390 Commits

Author SHA1 Message Date
Mitchell Stokes
13f49f3101 BGE: Adding a maxJumps to the character controller to adjust how many jumps a character can perform before having to touch the ground. By default this is set to 1, which means a character can only jump once before having to touch the ground again. Setting this to 2 allows for double jumping. 2012-12-26 01:25:53 +00:00
Mitchell Stokes
84966c3d0a BGE: Committing async LibLoad from Swiss. This does the lib loading in a separate thread to keep the BGE from freezing. Here is an example from the docs:
# Print a message when an async LibLoad is done
      import bge

      def finished_cb(status):
          print("Library (%s) loaded in %.2fms." % (status.libraryName, status.timeTaken))

      bge.logic.LibLoad('myblend.blend', 'Scene', async=True).onFinish = finished_cb

LibLoad() now returns a KX_LibLoadStatus object for information on the library loading. LibNew() and LibFree() are unaffected by this commit. In other words, the async option only works for LibLoad(). Furthermore it only works for Scenes, not Actions or Meshes.
2012-12-22 05:38:32 +00:00
Mitchell Stokes
f2f2b6153a BGE: Adding a Python interface for handling joysticks without needing logic bricks. These new SCA_PythonJoystick objects can be accessed using bge.logic.joysticks, which is a list of joysticks. The length of the list is the number of maximum supported joysticks, and indexes that do not have a joystick available are set to None. This means joysticks can be checked for using something like:
if bge.logic.joysticks[0]:
    activate_player_one()

if bge.logic.joysticks[1]:
    activate_player_two()

etc..

The interface exposed by SCA_PythonJoystick is very similar to the joystick logic brick except for one key difference: axis values are normalized to a -1.0 to 1.0 range instead of -32767 to 32767, which is what the logic brick exposed.
2012-12-21 02:28:59 +00:00
Campbell Barton
a6e9c9fda0 update api changelog 2012-12-11 02:13:42 +00:00
Campbell Barton
4fd9df25c6 Add 2 documents to the python api reference.
- Blender/Python Addon Tutorial: a step by step guide on how to write an addon from scratch

- Blender/Python API Reference Usage: examples of how to use the API reference docs

Thanks to John Nyquist for editing these docs and giving feedback.
2012-12-07 05:27:09 +00:00
Campbell Barton
57d7c1f226 pydna experimental ctypes DNA api was broken with more recent python versions, and some minor doc edits. 2012-12-05 03:38:01 +00:00
Campbell Barton
af51827dda add a message when solidify is used with only-edges, this isn't properly supported.
also minor edits to py-api-ref
-- This line, and those below, will be ignored--

M    doc/python_api/sphinx_doc_gen.py
M    doc/python_api/rst/include__bmesh.rst
M    source/blender/modifiers/intern/MOD_solidify.c
2012-12-05 01:02:41 +00:00
Campbell Barton
c0078a9879 osl style cleanup and update man-page. 2012-12-04 03:18:08 +00:00
Campbell Barton
ca25fd0307 fix [#33389] Curve points restricted to 0..1 range,
also added note on python3.3's faulthandler module.
2012-12-03 07:10:31 +00:00
Campbell Barton
61da29996a fix own mistake with recent commit to skip calculating tessface. If you were already in editmode the tessfaces wouldn't get recalculated.
also minor edits to bmesh rst.
2012-12-03 02:26:13 +00:00
Campbell Barton
f7f4148b40 change uiButGetStrInfo() to use a trailing NULL arg rather then passing the number of args as an arg. 2012-12-02 04:51:15 +00:00
Campbell Barton
b290f9a6cc add bmesh.free() to example & template 2012-12-01 07:16:08 +00:00
Brecht Van Lommel
c3e1813820 Fix related to #33340: add a warning to bge from_id documentation to not store id()
in game object integer properties since it may not fit in 32 bits integers.
2012-11-29 01:25:38 +00:00
Campbell Barton
f828a318f5 include an example in the api docs for using bmesh operators to make 2 links in a chain. 2012-11-28 15:08:45 +00:00
Campbell Barton
4fe35721e6 bmesh operator api reference - add in 'bmesh' arg at the start of each operator, also use :class: references. 2012-11-28 01:14:11 +00:00
Campbell Barton
9775f1d743 generate api reference for 'bmesh.ops', restructured text is extracted from bmesh_opdefines.c.
see:
http://www.blender.org/documentation/blender_python_api_2_64_9/bmesh.ops.html
2012-11-27 06:56:51 +00:00
Campbell Barton
0a5d44588c switch verious references from py3.2 -> 3.3 or just 3. 2012-11-26 13:58:06 +00:00
Mitchell Stokes
f22fb939d3 BGE Docs: Adding some docs for some of the Steering Actuator attributes. I grabbed the docs from the UI descriptions from RNA for the Steering Actuator. However, these aren't the best descriptions, and both the UI descriptions and the docs could use some attention. Also, steeringVec and facingMode didn't have corresponding UI elements, so I've left them undocumented for now. Someone who knows what they do can hopefully document them. 2012-11-23 07:47:53 +00:00
Mitchell Stokes
c6f98cfa95 BGE Docs: Adding docs for bge.logic.NextFrame() and bge.logic.PrintMemInfo() based on their doc strings. There was also an :rtype: in the bge.logic.setExitKey() docs that should have been :type:. 2012-11-22 22:38:31 +00:00
Mitchell Stokes
de57d61f62 BGE Docs: Adding docs for KX_Scene.drawObstacleSimulation() based on its doc string. 2012-11-22 22:25:12 +00:00
Mitchell Stokes
ff94827965 BGE Docs: Documenting missing Sound Actuator attributes based on RNA UI strings. 2012-11-22 22:13:27 +00:00
Mitchell Stokes
f90298bc0a BGE Docs: Adding docs for the KX_GameObject.playAction() play_mode constants. 2012-11-22 21:52:30 +00:00
Mitchell Stokes
2765f1fffc BGE Docs: Reordering the "Various" constants so they are in alphabetical order. 2012-11-22 21:37:12 +00:00
Mitchell Stokes
899290dd47 BGE Docs: Moving the KX_ArmatureSensor.type constant docs from bge.types.rst to bge.logic.rst where the rest of the constants docs are. 2012-11-22 11:09:42 +00:00
Mitchell Stokes
989b5983c8 BGE Docs: Changing ROT_* Armature Channel constants in the docs to be ROT_MODE_* to match the actual constants from bge.logic. 2012-11-22 09:20:36 +00:00
Mitchell Stokes
9b571c2d54 BGE Docs: Fixing indentation. 2012-11-22 09:12:21 +00:00
Campbell Barton
762016c746 indentation edits 2012-11-22 08:30:54 +00:00
Mitchell Stokes
74ffa7bb8a BGE Docs: Adding some basic docs for the KX_STEERING_* constants. Right now just their names and values are in the docs, not what they actually do. 2012-11-22 08:22:46 +00:00
Mitchell Stokes
d9f6edff14 BGE Docs: Moving the BL_ArmatureChannel.rotation_mode constant docs from bge.types.rst to bge.logic.rst where the rest of the constants docs are. 2012-11-22 08:16:30 +00:00
Mitchell Stokes
8dd96bcefb BGE Docs: Moving the BL_ArmatureConstraint constant docs from bge.types.rst to bge.logic.rst with the rest of the constants docs are. 2012-11-22 08:07:13 +00:00
Mitchell Stokes
5da6c02188 BGE Docs: Adding RM_* mode constants from KX_NavMeshObject.draw() 2012-11-22 08:01:02 +00:00
Mitchell Stokes
a660ebc16e Moving the Armature Actuator constant docs from bge.types.rst to bge.logic.rst with the rest of the constants docs are. Not only is this more consistent, but it also makes Campbell's script happier. 2012-11-22 07:52:17 +00:00
Mitchell Stokes
6a5d5ed206 Some KX_CONSTRAINTACT_* constants were incorrectly documented as KX_CONSTRAINT_*. 2012-11-22 07:31:51 +00:00
Mitchell Stokes
8a62ec63c8 Adding docs for KX_NavMeshObject based on doc strings found in KX_NavMeshObject.cpp. 2012-11-22 07:24:00 +00:00
Mitchell Stokes
30a292b61f BGE: KX_PhysicsObjectWrapper was not being used anywhere in the code base, but it was being maintained (style, docs, name changes, etc), so I'm removing it. 2012-11-22 07:08:02 +00:00
Campbell Barton
b7f5c1c121 more bge reference api docstrings, leaving KX_FontObject and KX_NavMeshObject as TODO. 2012-11-22 06:04:12 +00:00
Campbell Barton
89b0b0516e bge camera axix actuator was undocumented and python had incorrect limits on this attribute. 2012-11-22 05:33:05 +00:00
Campbell Barton
9d0334bc74 add missing bgl and gpu api docstrings (found using docstring completeness checker) 2012-11-22 05:15:52 +00:00
Campbell Barton
3370e3ca43 doc corrections and add bge.types.KX_ArmatureSensor 2012-11-21 08:53:04 +00:00
Campbell Barton
7c3db355b1 remove ifdef'd bevel code, current bevel works better then the previous code.
reduce strlen check in texttool_suggest_add()
use 'del list[:]' rather then 'list[:] = []' in python scripts which clear lists.
2012-11-14 09:45:15 +00:00
Mitchell Stokes
093854e564 Docs update for r52164 2012-11-13 17:50:18 +00:00
Campbell Barton
955b5db5e9 build fix: recent commit broke building on 64bit linux 2012-11-12 03:37:28 +00:00
Campbell Barton
d22c5d4341 update to python api Gotcha docs to reflect changes to the api. also add a section about modifying linked library data. 2012-11-12 03:23:47 +00:00
Campbell Barton
250109f5ac add argument so recent bge function mesh.transform_uv() so you can optionally transform between UV1 / UV2 2012-11-10 10:26:39 +00:00
Campbell Barton
fecc3b9d68 add 2 new utility functions to the BGE mesh py api.
mesh.transform(matid, matrix)
  mesh.transform_uv(matid, matrix, uv_index=-1))


much more efficient then looping over verts in python to transform them.
2012-11-10 09:45:43 +00:00
Mitchell Stokes
f6a110d6ea BGE: Committing patch [#32697] "New BGE gravity API" by HG1.
This patch adds a gravity attribute to KX_Scene.
2012-11-10 03:11:18 +00:00
Mitchell Stokes
f840bd4a9f BGE: This patch adds a character wrapper (similar to the already implemented vehicle wrapper) to control character physics options. Currently supported options are:
* jump() -- causes the character to jump
  * onGround -- specifies whether or not the character is on the ground
  * gravity -- controls the "gravity" that the character physics uses for the character

More options could be added (such as jump speed, step height, make fall speed, max slope, etc).
2012-11-04 20:56:02 +00:00
Campbell Barton
7353f8d58e remove unneeded string in datatoc.c and correct some of the context types in our documentation. 2012-11-03 09:14:06 +00:00
Campbell Barton
d24278635a auto-generated py api now shows bpy.context.* items in the 'References' section of each type. 2012-11-03 07:28:51 +00:00
Campbell Barton
aeba4950c3 style cleanup 2012-10-27 10:42:28 +00:00