Commit Graph

103 Commits

Author SHA1 Message Date
Campbell Barton
8841ed84c9 Add missing context member for doc gen 2014-05-08 13:55:05 +10:00
Campbell Barton
a15be34389 Code cleanup: unused python vars & imports
Use frosted rather then pyflakes
2014-04-25 05:36:16 +10:00
Campbell Barton
4848f9029a Patch D133: Python wrapper for BLI_kdtree (adds mathutils.kdtree)
Originally by Dan Eicher, with my own fixes and adjustments (see patch page for details).

For details there are unit tests and api example usage.

	doc/python_api/sphinx-in-tmp/menu_id.png
2014-01-06 20:32:34 +11:00
Campbell Barton
75212f4677 BMesh Py API: add bmesh.geometry.intersect_face_point()
patch originally by mont29 with some edits.
2013-12-06 21:15:56 +11:00
Campbell Barton
f85ccedb93 Python API Docs: update for using git buildinfo and change upload URL 2013-11-29 10:00:57 +11:00
Campbell Barton
39593b9b11 sphinx docgen wasn't including example scripts for python methods of RNA types. 2013-10-15 05:55:51 +00:00
Campbell Barton
b6631b8be7 fixes for python api docs.
also move foreach_get/set examples into their own py example files (prefer not to have example code built into blenders binary).
2013-09-18 05:20:43 +00:00
Campbell Barton
93e3107806 select loose wasn't working very usefully if you only wanted to select loose verts, now select loose verts/edges/faces depending on the selection mode. 2013-04-29 16:59:53 +00:00
Campbell Barton
9a269f3a1f update sphinx docgen
was missing context property attributes - context.mode for example. add RNA properties into context docs.

also minor updates
- exclude freestyle if its not enabled.
- add missing context member.
2013-04-29 16:20:49 +00:00
Bastien Montagne
eaf1e7a888 Py API doc generation: add bpy.app.translations module, and fix a few errors found while building the doc. Thanks to Campbell for review. 2013-04-19 13:00:21 +00:00
Campbell Barton
eb495b2a8a use lowercase name for freestyle module (as with all other blender modules). 2013-04-07 11:22:54 +00:00
Tamito Kajiyama
4c42f5c8a9 Missing updates in the doc/ and intern/ folders during the merger in revision 55847. 2013-04-07 06:56:49 +00:00
Campbell Barton
a8ebc1b2de edits to document uploading script so the latest release docs can always be found at:
http://www.blender.org/documentation/blender_python_api

Easier for linking wiki docs.
2013-02-20 14:22:36 +00:00
Mitchell Stokes
372cf93309 BGE: Splitting up the bge.types docs so they are not all on the same page. This should make them much easier to browse. 2013-02-10 06:13:26 +00:00
Campbell Barton
ec97183876 add python api docstring for 'bpy.types.Operator.bl_property' 2013-02-05 05:09:19 +00:00
Campbell Barton
769ab3eed8 code cleanup:
- cycles ui used 'cscene' for scene.cycles and scene.cycles_curves
- style cleanup
2013-01-15 23:17:45 +00:00
Campbell Barton
e9c7aaaa3c patch [#33609] Syntax highlighting for OSL in Text Editor
from Patrick Boelens (senshi). with modifications to split it into its own function.

also added C style multi-line comment support /* ... */

I've left out the part of this patch that sets the language in the space, since I think this might be better stored in the text block.

For now it simply uses OSL syntax highlighting when the extension is '.osl'.
2012-12-29 18:25:03 +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
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
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
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
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
7614428c09 style cleanup: pep8 2012-10-08 10:03:01 +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
4c5925503e fix for building docs 2012-07-30 10:44:57 +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
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
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
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
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
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
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
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
387ce06732 Disable PDF doc since its giving errors with latex indentation.
upload the zipped version of HTML docs instead.
2012-02-10 15:00:55 +00:00
Campbell Barton
4c93e0ada3 include mathutils.noise in sphinx docs 2011-12-04 06:55:32 +00:00
Campbell Barton
1c6dc61d17 blacklist language property for sphinx docs, encoding was messing up PDF generation. 2011-11-24 22:24:07 +00:00
Campbell Barton
1cfbde0eb4 pass encoding to uses of decode() incase the default isnt utf-8. ignore decode errors in some cases.
This should fix an error with generated qtcreator projects.

also replace decoded bytes for unicode escape sequences in the VIEW3D_MT_edit_text_chars menu.
2011-11-17 04:05:54 +00:00