265 Commits

Author SHA1 Message Date
Campbell Barton
7e552b356d Merge branch 'blender-v2.93-release' 2021-05-17 18:04:22 +10:00
Campbell Barton
e3a76feeef Fix PyAPI doc generation error in 43369ca80e62aa80b951823d1c78abef58852014
Files without doc-strings were not included.
2021-05-17 18:02:56 +10:00
Campbell Barton
44db4e50b2 PyAPI: remove context.active_base
All other access to the Base structure from Python was removed,
it seems this was left in by accident.

Ref T85675
2021-05-12 22:02:18 +10:00
Campbell Barton
43369ca80e PyDoc: quiet warning with literalinclude including blank lines
Files that only contain a doc-string still included the last blank line,
since this normally contains code examples.

There are some cases where only a docstring exists
which made sphinx report warnings.
2021-03-31 17:47:31 +11:00
Campbell Barton
d5f2043ab3 PyDoc: fix indentation with multi-line property descriptions
New lines were written without indentation,
causing invalid RST to be generated.
2021-03-31 17:43:30 +11:00
Germano Cavalcante
6c6b1c015c GPU Python: Implement gpu.texture.from_image
It can be useful to replace `image.bindcode` and `image.gl_load`.

Used for example in https://docs.blender.org/api/current/gpu.html#d-image

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D10458
2021-03-01 17:38:57 -03:00
Aaron Carlisle
b1b9671c93 Cleanup: commented/out of date rpdb2 import 2021-02-25 18:27:57 -05:00
Germano Cavalcante
cccdd6626d PyAPI Docs: Add 'gpu.state' module
Also exclude `gpu.shader` from quick tests.
2021-02-25 09:16:48 -03:00
Campbell Barton
c47990f41c PyAPI: expose imbuf.types.ImBuf, include in API docs
Without this, the ImBuf type wasn't part of documentation.
2021-02-25 12:04:23 +11:00
Aaron Carlisle
cb3e092d45 Merge branch 'blender-v2.92-release' 2021-02-19 02:00:56 -05:00
Aaron Carlisle
241273d362 API Docs: Fix generation failing with unused context members
Instead of raising an expection a warnign is generated instead. This 
fixes the issue where `['hair', 'pointcloud']` are disabled for release 
builds. In the future a better solution would be to generate the context 
map dynamically but this would require refactoring of the API: D9988
2021-02-19 01:58:16 -05:00
Aaron Carlisle
7266d8e32a PyAPI Docs: Fix deprecation warning with new theme version 2021-02-18 23:55:23 -05:00
Aaron Carlisle
e6acc4db72 Instead of raising an expection a warnign is generated instead.
This fixes the issue where `['hair', 'pointcloud']` are disabled for 
release builds.
In the future a better solution would be to generate the context map 
dynamically but this would require refactoring of the API: D9988

Fixes T80364

Differential revision: https://developer.blender.org/D10468
2021-02-18 22:51:24 -05:00
Campbell Barton
28169cea3d PyDoc: avoid blank lines at the beginning of code-examples 2020-12-08 20:49:28 +11:00
Campbell Barton
07db110add Fix T82493: PyDoc generation throws exception on exit
Since add-ons now unregister on exit
(as of fa566157a5c351775d082b05b180c630665b4afc)
clearing functions in `bpy.app.handlers` caused an error on exit.

Resolve by restoring handlers before exiting.
2020-11-20 18:59:59 +11:00
Campbell Barton
5d92fd8a90 Correct last commit 2020-10-16 20:51:58 +11:00
Campbell Barton
b002fdc4bf PyDoc: update to account for new context member 2020-10-16 20:29:55 +11:00
Aaron Carlisle
df3d124e91 Pydoc: Fix bpy.utils submodule showing in main toctree 2020-10-11 18:38:55 -04:00
Aaron Carlisle
e8a2931299 Pydoc: Cleanup: Rename function
The new name makes more sense as the file is called index and we are not 
writing the contents of all rst files
2020-10-11 17:02:41 -04:00
Aaron Carlisle
a38c2dcfe6 Pydoc: Add index and genindex to main index 2020-10-11 16:54:52 -04:00
Aaron Carlisle
fbcb26fb33 Pydoc: Add submodule heading to submodule lists 2020-10-11 16:09:42 -04:00
Campbell Barton
05710171cb PyDoc: resolve duplicate module warnings
Remove submodule listings from the module docstring,
as this information already exists in the generator.
2020-10-09 12:11:00 +11:00
Aaron Carlisle
fb20efae59 PyDoc: fix most of the sphinx-build warnings
Use `.. currentmodule::` instead of `.. module::` for `bpy.types` and
`bpy.ops`. This change fixes most of the errors.

Ref D9139
2020-10-08 16:27:42 +11:00
Campbell Barton
0b4aeffda9 PyDoc: support building without sphinx_rtd_theme
This is no longer bundled with sphinx, support building without it.
2020-10-08 12:32:50 +11:00
Aaron Carlisle
d88da4db67 PyDoc: Render in text class name using class link syntax 2020-10-07 17:00:57 -04:00
Aaron Carlisle
021b94f27c PyDoc: Fix sphinx warnign from missing newline 2020-10-07 15:51:29 -04:00
Aaron Carlisle
e748abda92 PyDoc: Remove workaround for slow sphinx builds
Tesing with newer versions of sphinx to directory `sphinx-build` is 
executed has no affect on the build time. Testing even gave a 2-3% speed 
boost.
2020-10-07 10:25:46 -04:00
Aaron Carlisle
7951312d4b API Doc Gen: Do not ignore objects file
This is used by the Blender manual or other sphinx website that would 
like to link to Blender's API documentation.
2020-10-05 16:26:40 -04:00
Campbell Barton
41d2d6da0c Cleanup: pep8 (indentation, spacing, long lines) 2020-10-02 11:59:16 +10:00
Campbell Barton
bab9de2a52 Cleanup: pep8, blank lines 2020-10-02 11:59:16 +10:00
Aaron Carlisle
4d7b664e1a API Docs: Minor text improvements 2020-09-28 20:11:06 -04:00
Max Schlecht
aead4b3cab API Docs: Fix xref urls
Fully revert D7913 "Fix T77276: Generating Python API docs raises many warnings"

{D7913} broke xrefs/links to other types and permalinks in the docs. This makes the python api docs for 2.90 and 2.91 completely unusable.
It got partially reverted in commit e893430a6306ded059270e7df9d78180cdc0d9e3. That didn't fix those two issues though, so it should be fully reverted.

As you can see here, i'm not able to click `bpy_struct.id_data`, because no <a> tag got generated in the html.
{F8889934}

Here you can see a working, but wrong permalink, generated by clicking the little chain. (It should be `bpy.types.MeshVertices`, not `bpy.types.MeshVertices.MeshVertices`)
{F8889938}

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D8913
2020-09-24 23:14:15 -04:00
Aaron Carlisle
e893430a63 Partly revert "Fix T77276: Generating Python API docs raises many warnings"
This commit reverts the "noindex" part of the original commit.
using noindex made it imposible to link to a specific property.

The original warnings do not pose an issue so until a proper solution is 
found I am reverting this commit.

This reverts commit 953c232db31f1a76f99ceb43119681ce0df1ab17
2020-07-27 13:01:28 -04:00
Campbell Barton
a197b81090 Docs: include 'bl_math' module 2020-07-22 14:36:30 +10:00
Aaron Carlisle
b0449cac66 API Docs: Small edits to recent commit
- Revert string formatting change
- Add missing text edit
2020-06-23 17:10:07 -04:00
Campbell Barton
bab2b02507 Cleanup: style, raw multi-line string sphinx updater 2020-06-23 23:32:47 +10:00
Campbell Barton
6d639a606c Docs: quiet deprecation warning, add missing context members 2020-06-23 23:32:36 +10:00
Campbell Barton
502e6bd839 Fix doc generation for enum & attr's with multi-line descriptions 2020-06-18 16:26:16 +10:00
Aaron Carlisle
953c232db3 Fix T77276: Generating Python API docs raises many warnings 2020-06-04 22:31:54 +10:00
Brecht Van Lommel
c93a88413d Merge branch 'blender-v2.83-release' 2020-05-29 18:05:04 +02:00
Brecht Van Lommel
a86b5df005 Blender: change bugfix release versioning from a/b/c to .1/.2/.3
The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.

User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".

Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility

This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.

Fixes T76058.

Differential Revision: https://developer.blender.org/D7748
2020-05-29 17:48:26 +02:00
Campbell Barton
9947b1fda6 Merge branch 'blender-v2.83-release' 2020-05-12 12:53:48 +10:00
Aaron Carlisle
5852f97dc2 API Docs: Fix broken url markup 2020-05-11 21:35:33 -04:00
Campbell Barton
0e41305344 Cleanup: reference 'bpy.types.bpy_struct' directly
Previously there wasn't a way to access this directly from bpy.types.
2020-05-11 16:56:09 +10:00
Campbell Barton
364780bce5 Docs: list inherited C/Python API functions 2020-05-11 16:43:49 +10:00
Campbell Barton
63849aac95 Fix duplicate property references in generated API docs 2020-05-11 16:41:06 +10:00
Campbell Barton
e3673fd869 Fix building docs with sphinx 3.x 2020-05-11 16:09:56 +10:00
Bastien Montagne
5d3c7d1218 usual PY API doc gen fix after adding a new member to Context... 2020-04-06 12:16:07 +02:00
Bastien Montagne
db4d264e70 fix API doc generation after new volume entry in context... 2020-03-20 10:48:30 +01:00
Sybren A. Stüvel
2d5773d11a Documentation: added bpy.msgbus description and examples
The `bpy.msgbus` namespace was not included in the documentation generation.
I've added it, and ported Campbell's examples from P563.
2020-03-06 14:29:03 +01:00