There is a new `bpy.app.timers` api.
For more details, look in the Python API documentation.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D3994
The HTML title did not make it clear that these are docs for the API rather
than a general Blender documentation. Some of the page titles were also too
long and redundant.
Maybe it's still early to set the new drawing api for python.
But joining these two modules is an initial step.
```
>>> gpu.
matrix
select
types
```
```
>>> gpu.types.GPU
Batch(
OffScreen(
VertBuf(
VertFormat(
```
The creation of a new offscreen object is now done by the `GPUOffscreen.__new__` method.
Reviewers: campbellbarton, dfelinto
Reviewed By: campbellbarton, dfelinto
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3667
Initial support for Python/Manipulator integration
from 'custom-manipulators' branch.
Supports:
- Registering custom manipulators & manipulator-groups.
- Modifying RNA properties, custom values via get/set callbacks,
or invoking an operator.
- Drawing shape presets for Python defined manipulators (arrow, circle, face-maps)
Limitations:
- Only float properties supported.
- Drawing only supported via shape presets.
(we'll likely want a way to define custom geometry or draw directly).
- When to refresh, recalculate manipulators will likely need
integration with notifier system.
Development will be continued in the 2.8 branch
- for rc/release: /api/2.79c/, zip file named blender_python_reference_2.79c_release.zip
- for dev: /api/master/, zip file named blender_python_reference_2_79_4.zip
This was originally supported, however relative links to examples & templates made it fail.
Now files in the source tree are copied to the build-dir, with ".." replaced with "__"
to avoid having to mirror Blender's source-layout in the Sphinx build-dir.
Also skip uploading the built docs when an SSH user-name isn't passed to sphinx_doc_gen.sh
instead of aborting (so people w/o SSH access to our servers can use the shell-script).
This expose the capability of handling offscreen drawing. The initial
support lays the barebones for addons to work with framebuffer objects
and implement 3d viewport offscreen drawing. This can be used by script
writers to make fisheye lens preview, head mounted display support, ...
The complete documentation is here: http://www.blender.org/api/blender_python_api_2_76_1/gpu.offscreen.html
Review and many changes by Campbell Barton (thank you :)
https://developer.blender.org/D1533
Originally D966 by @lukastoenne, with own additions
- trees can be initialized from Object's, BMesh,
or passed in as vert+polygon arrays.
- original indices of ngons/faces are used. (instead of tessellated indices).
- ray_cast, find_nearest methods
- find overlapping faces between 2 trees
The error was "ValueError: Function <function normal_at_I0D at 0x7f2aad1feb70>
has keyword-only arguments or annotations, use getfullargspec() API which can
support them", and was first seen in eeeb845d33e81afbc8ed127e6ab4ae7b18472a54
This patch adds the submodule app to bge. apps contains constants similar to bpy.app, particularly version (tuple of three ints like 2.75.1).
It was requested in T43918 and set as TODO.
The patch also adds rst doc for the module.
Reviewers: moguri, kupoman, lordloki, panzergame, campbellbarton
Reviewed By: lordloki, panzergame, campbellbarton
Subscribers: marcino15
Projects: #game_logic, #game_python, #game_engine
Differential Revision: https://developer.blender.org/D1348
- check for class/static methods assumed nonzero args.
- subclass references and set-flag items are now sorted.
- use 'order' for Py operator mix-ins,
so operator settings don't show in random order.
Python types defined in C can now start their docstring with a
`.. class:: TypeName(args)` line, to document their constructor.
In that case the documentation writer is responsible for indenting the
remainder of the docstring by 3 spaces, matching the generated
documentation.
Freestyle sections of the API docs were empty due to Freestyle module reorganization
in commit rB6498b96ce7081db039354228213d72e8c70bd3aa.
Module __all__ property was added to submodules so as to properly exclude irrelevant
documentation elements such as mathutils.Vector.
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
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.
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'.
- 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.
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
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())
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+.
- add examples for custom-data access
- group BMesh types logically in docs
- added missing docstrings
needed to add grouping functionality to sphinx for this.
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
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
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
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
- 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()
(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
- 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
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.