Commit Graph

416 Commits

Author SHA1 Message Date
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
Campbell Barton
7c846bbe75 add section on how to run scripts in blender for the API intro, found there were no simple docs like this in the wiki.
also set the window type to normal on start when -p argument is given, since the view could be maximized/fullscreen.
2012-10-24 16:55:06 +00:00
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
Campbell Barton
174a46361f doc cleanup: minor corrections and improvements to docstrings + recent doc changes. 2012-03-23 01:55:38 +00:00
Campbell Barton
8e2efc1dbf rna/python api change: rename Mesh.faces --> tessfaces, since existing scripts are using this to modify the mesh and its confusing that the edits are not kept.
This also makes it clearer that the faces are for tessellated results only.

Added a section on the Gotcha's about upgrading scripts, the pros and cons of MeshTessFace/MeshPoly/BMFace.
and spesifically how to upgrade importers and exporters for 2.63+.
2012-03-23 00:28:29 +00:00
Sergey Sharybin
c3e37cf15f Fix #30622: documentation example code for bge.types.KX_MeshProxy did not work,
using fix suggested by Ryan King.
2012-03-21 14:13:54 +00:00
Campbell Barton
9773f87891 bmesh docs:
- add examples for custom-data access
- group BMesh types logically in docs
- added missing docstrings

needed to add grouping functionality to sphinx for this.
2012-03-21 05:33:37 +00:00
Campbell Barton
1d5922fbaf minor changes to sphinx doc generator title formatting 2012-03-21 04:43:17 +00:00
Luca Bonavita
4e6669cee3 == Python API docs ==
Small fixes (thanks Terry Wallwork for reporting)
- adding logger filehandler in main () so that ARGS.output_dir exists, otherwise we get an IOError
- the zip was not including files in a container directory
2012-03-16 14:49:16 +00:00
Luca Bonavita
cddca9f606 == Python API docs ==
Committing a patch similar to revision 44887 with fixes to my own bugs
(sorry Campbell, and thanks for reviewing :)

Fixes
------
- examples/ svn directory not removed anymore (in-source builds possible again)
- fixed "include references somehow stopped working"
+ using shutils.makearchive() to zip the file

New command line options
------------------------

-l: Log the output of the api dump and sphinx|latex warnings and errors
    If given, save logs in:
    * OUTPUT_DIR/.bpy.log
    * OUTPUT_DIR/.sphinx-build.log
    * OUTPUT_DIR/.sphinx-build_pdf.log
    * OUTPUT_DIR/.latex_make.log

    (using only one log directive instead of -l for bpy and -L for sphinx)

-P: builds the pdf

-R: pack the files in a dir ready for online deployment
    (including the zip and the pdf eventually)

Example usage:
./blender.bin -b -P doc/python_api/sphinx_doc_gen.py -- -p bmesh* -o ./<OUTPUTDIR> -B -P -R -l
2012-03-16 10:49:39 +00:00
Campbell Barton
d772b51b56 revert r44887, changes were OK but caused too many problems, better do this as a smaller patch.
sphinx_doc_gen.sh broke building docs - 
- examples/ svn directory was being removed since it assumed an out-of-source build.
- include references somehow stopped working (didnt find why).

also fixed an unrelated error with building docs in object_utils.py
2012-03-15 03:50:52 +00:00
Luca Bonavita
5788de8408 == Python API docs ==
New command line options:

-l: logs bpy dumping problems in OUTPUT_DIR/.bpy.log

-L: logs sphinx|latex problems in:
    * OUTPUT_DIR/.sphinx-build.log      (sphinx building html problems)
    * OUTPUT_DIR/.sphinx-build_pdf.log  (sphinx building latex problems)
    * OUTPUT_DIR/.latex_make.log        (latex make problems)

-P: builds the pdf

-R: pack the files in a dir ready for online deployment
    (including the zip and the pdf eventually)


Example usage:
./cmake/bin/blender -b -P ./blender/doc/python_api/sphinx_doc_gen.py -- -p bmesh* -l -o ./python_api -B -P -R -L
2012-03-15 00:12:31 +00:00
Campbell Barton
f15c15e992 bmesh py api: finished todo - editable select_history
eg:
  bm.select_history = vert, face, edge

  bm.select_history.add(edge)
2012-03-14 04:46:12 +00:00
Campbell Barton
2fbb5ce833 bmesh py api: more comprehensive intro page, also fix some spelling errors. 2012-03-13 06:22:43 +00:00
Brecht Van Lommel
74b7bc1228 Fix #30524: documentation example code for bge.types.KX_MeshProxy did not work,
using fix suggested by Ryan King.
2012-03-12 13:04:06 +00:00
Campbell Barton
4dc35836ad code cleanup: remove unused variable assignents and added bmesh submodule links, doc correction reported by dfelinto. 2012-03-09 21:23:15 +00:00
Luca Bonavita
e4253fa2b8 == Python API docs ==
- Enhanced the -T option:

  - we can now choose among custom themes (now 'blender-org' and later 'naiad')
    and Sphinx internal themes (use -h option to see which ones)

  - choosing a custom theme will copy the theme dir to the output dir

- Added two new command line options:

  -N: Add the theme name to the html dir name
      For example, if we choose the theme 'haiku'
      with using -N will create html files in sphinx-out_haiku/
      Useful to test separate themes without overwriting the smae folder each time
      
  -B: Builds the html docs running sphinx-build
      This is useful to avoid runing sphinx with a separate shell command

- Fixed the URL in undocumented_message()
2012-03-08 18:36:23 +00:00
Campbell Barton
ee84084f99 style cleanup: pep8 + picky edits 2012-03-08 05:36:05 +00:00
Luca Bonavita
4aadffa80e == Python API docs ==
(sphinx_doc_gen.py)

- file reorganization to use more functions (easier to read)

- adapting to work after a recent commit that made some of the members of bpy.app.*
  output bytes instead of strings (see [#30154])

- a couple of new command line optionsto avoid editing the script:
    -T: let you choose the sphinx theme: the theme dir get copied in the destination dir
    -b: choose if we want the bpy module page or not

    Current command line arguments optional arguments:
      -h, --help            show this help message and exit
      -o OUTPUT_DIR, --output OUTPUT_DIR
                            Path of the API docs (default=<script dir>)
      -T SPHINX_THEME, --sphinxtheme SPHINX_THEME
                            Sphinx theme (default='default')
      -f, --fullrebuild     Rewrite all rst files in sphinx-in/ (default=False)
      -t, --testdump        Dumps a small part of the API (default=False)
      -b, --bpy             Write the rst file of the bpy module (default=False)

(rst/info_best_practice.rst)

- fixed a typo
2012-03-07 17:36:38 +00:00
Luca Bonavita
0fe519f14a == Python API docs ==
Adding two new command line options (-f = full rebuild, -t = testing) so that we don't have to edit the file each time
2012-03-05 14:12:38 +00:00
Dalai Felinto
1f928833f3 option for the Armature Actuator to change the influence of a bone constraint.
Also adds DampedTrackTo to the list of supported constraints in the BGE

Test file:
http://www.pasteall.org/blend/11715

Patch developed as part of a project to NF-UBC Nereus Program.
Development time 'sponsored' by the project.
www.nereusprogram.org
2012-03-03 02:47:01 +00:00
Luca Bonavita
8856a9cbcd == Python API docs ==
- Works in macOSX now (hackish)
  (TODO: not check for OSX explicitly but handle exception if it fails)

- We can now generate rst files outside out of the source (was annoying)
  - Moved some vars at module level
  - Managing the command line args with argparse.
    Example usage:
    ./cmake/bin/blender -b -P ./blender/doc/python_api/sphinx_doc_gen.py -- -o ./python_api
2012-03-02 14:39:18 +00:00
Campbell Barton
d2cab3e8b0 move bmesh wiki docs into bmesh header and update doxygen.
also have doxygen ignore *.py files and fix some warnings.
2012-02-27 20:27:19 +00:00
Campbell Barton
edb04d1461 bmesh docs now written in sphinx doc generator.
* http://www.blender.org/documentation/blender_python_api_2_62_0/bmesh.types.html
* http://www.blender.org/documentation/blender_python_api_2_62_0/bmesh.utils.html
2012-02-24 09:53:29 +00:00
Campbell Barton
5af9e8d5ca remove section in gotcha's doc about matrix col/row order since this has been changed. 2012-02-17 20:41:41 +00:00
Campbell Barton
caf92365a5 autogenerated rna api changelog (no rebuilds needed) 2012-02-15 17:41:48 +00:00