Commit Graph

956 Commits

Author SHA1 Message Date
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
Campbell Barton
f4d65b0d6e Docs: update API docs, adding reference to bl_rna_get_subclass. 2020-05-11 15:48:51 +10:00
Aaron Carlisle
904249b4f3 Doxygen: Fix warnings in Doxyfile 2020-05-08 19:53:32 -04:00
Nathan Letwory
b9ec9afce1
Bump master to 2.90 alpha for bcon1 2020-04-15 16:01:35 +03: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
Campbell Barton
3d3a91103b Doc: remove MeshTessFace reference 2020-03-24 16:26:07 +11:00
Bastien Montagne
db4d264e70 fix API doc generation after new volume entry in context... 2020-03-20 10:48:30 +01:00
Aaron Carlisle
817c38f715 PyAPI Docs: Update aud example
Fixes T74641
2020-03-19 16:21:17 -04:00
Aaron Carlisle
7177862313 API Docs: Point to manual for Operator Cheat Sheet 2020-03-06 12:50:19 -05:00
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
Aaron Carlisle
ae223ff52b Addons: deprecate 'wiki_url'
When running with debug enabled ('-d' argument),
warnings are printed for add-ons which are not yet updated.

Reminder to name things based on what they do,
not the technologies they use :)
2020-03-05 11:45:22 +11:00
Aaron Carlisle
dc257318d0 PyAPI Doc: Add missing Imbuf documentantion
The documentation existed but it was never added to the script.
2020-02-25 23:17:01 -05:00
Ian Karanja
73e404697b Fix small typo in BGL API docs
Differential Revision: https://developer.blender.org/D6681
2020-02-14 17:59:00 +01:00
be8879718e Documentation: add note on altering data from frame change handlers
Blender can crash while rendering, when scene data is changed from within
a `frame_change_pre` or `frame_change_post` callback function. This results
in bug reports like T60094, T67627, and T73530. Until this is properly
resolved, this limitation should be documented.

No functional changes.
2020-02-11 11:00:12 +01:00
Campbell Barton
7d6c08beb8 Doc: simplify T72883 fix
Code example made it seem setting the active object was more complex
than a single assignment.
2020-02-11 11:27:01 +11:00
Aaron Carlisle
189e96ba68 Fix T72883: Correct Context Usage 2020-02-10 14:08:34 -05:00
Bastien Montagne
379ee3e527 PY API doc generation: Add option for multi-tasking sphinx. 2020-02-10 12:38:03 +01:00
mano-wii
2ab5ca81a5 Fix T68413: gpu module example in docs produces unexpected results 2020-01-27 10:29:00 -03:00
Campbell Barton
12b183ba55 Docs: update reference to PYTHONPATH 2020-01-25 20:15:38 +11:00
Bastien Montagne
efe119cd39 Merge branch 'blender-v2.82-release' 2020-01-13 15:58:42 +01:00
Bastien Montagne
dfa3f51e52 Fix (unreported) broken PY API doc gen after recent GP changes.
As usual... Adding/removing members from context requires updates of the
API building script.
2020-01-13 15:58:05 +01:00
Nathan Letwory
c91ebcd7ab
Docs: roll version to 2.83 for master 2020-01-10 15:21:08 +02:00
Bastien Montagne
50b478e328 Fix Py API doc generation after Mantaflow merge. 2019-12-23 15:19:03 +01:00
Sebastián Barschkis
043cac5d20 Mantaflow [Part 12]: Updated docs
Updated diff with latest changes from fluid-mantaflow branch

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D5620
2019-12-16 16:39:50 +01:00
Bastien Montagne
eb798de101 Clean/Fix remaining cases of props assignments in resgistrable structs def.
We still had a few deprecated assignements of `bpy.props.xxx` to class
members in our API documentation and one of our py tests. Annotations
are to be used now.

Also remove the section about `register_module` utils, this has been
removed in 2.8.

Fix T71877: Python API overview sample code warning: class MyMaterialProps contains a property which should be an annotation!
Fix T71876: Python API overview references old bpy.utils.register_module function
2019-11-27 12:19:10 +01:00
Bastien Montagne
dc9b05df22 Fix API docs build after recent changes in BMesh operators.
Note: not sure what 'type' to give for that new
`BMO_OP_SLOT_SUBTYPE_PTR_STRUCT`, name sounds generic so used
`bpy_struct` for now... :/
2019-11-25 12:33:51 +01:00
Campbell Barton
d61f2cac18 Merge branch 'blender-v2.81-release' 2019-11-16 02:42:33 +11:00
Campbell Barton
69b587eb3e Merge branch 'blender-v2.81-release' 2019-11-16 02:42:27 +11:00
Campbell Barton
0384cc6f78 API Docs: don't show functions in 'bpy.app.handlers'
This shows the function and it's memory location,
it's not useful for docs so remove it.
2019-11-16 02:41:17 +11:00
Campbell Barton
4ca87085e0 API Docs: only document built-in types
Some types were documented in bpy.types aren't accessible there.

For now, disable documenting types from add-ons and some types from
bl_operators, bl_ui... since these are mostly for internal use.
2019-11-16 02:39:51 +11:00
Antonio Vazquez
f5b09ae034 Merge branch 'blender-v2.81-release' 2019-11-01 14:31:35 +01:00
Campbell Barton
61bf51acb5 Cleanup: pep8 for examples 2019-11-01 10:53:47 +11:00
Campbell Barton
976a2ce58b Merge branch 'blender-v2.81-release' 2019-10-23 15:03:37 +11:00
Campbell Barton
b9dd87f0cb Doxygen: update configuration
Quiet warnings when generating docs.
2019-10-23 15:02:52 +11:00
Bastien Montagne
519891c669 Merge branch 'blender-v2.81-release' 2019-10-14 18:48:16 +02:00
Bastien Montagne
879d269e87 Py API doc generator: more tweaks to adapt to new release process.
Now we also create a 'version' symlink for master.
2019-10-14 18:46:50 +02:00
Bastien Montagne
2cdc187142 Merge branch 'blender-v2.81-release' 2019-10-14 17:40:06 +02:00
Bastien Montagne
15539f7b6d Py API doc generator: tweak to handle new release process.
We need to handle beta stage in a specific way, since it's no longer
master, but not yet 'real' rc/release stage...

For now, only point to version dir of the API doc, but no need to create
any symlink (that way, 'current' remain pointing to 2.80 release, while
'2.81' is no longer a symlink to 'master', but its own actual doc).
2019-10-14 17:39:17 +02:00
3842519a38 Revert "Merge branch 'master' into blender-v2.81-release"
This reverts commit 20b2acf336cb8f6965fd39728a746922d1b8ae42, reversing
changes made to f185cc0ca55c8c817903d53bf5c107f3efd4e0db.

Merges should only go form the release branch to master. For backporting
commits, use cherry-pick.
2019-10-11 21:31:58 +02:00
67b1a15b3f Version bump to 2.82 alpha, master is now open for new features and changes 2019-10-11 12:23:15 +02:00
Bastien Montagne
cb5ed2e5f4 Manpage gen script: fix for python < 3.7, and missing Blender build info.
Python3.7 is still fairly recent, not all distro use it as system python
yet, fallback to code compatible up to py3.5.

Also, often distro builds of Blender do not have the buildinfo, in that
case fallback to `SOURCE_DATE_EPOCH` envvar, and as last resort to
current time, as in orig patch D5756 (we still use blender builddate
when available).

Issues raised in recent own rBcd5c70630318.
2019-09-19 15:57:33 +02:00
Bastien Montagne
741d7d60ed Cleanup: Manpage: use 'https' blender.org URL instead of 'http' one. 2019-09-18 23:04:23 +02:00
Bastien Montagne
cd5c706303 Blender manpage generator: use blender build date instead of current time.
It makes much more sense to use the build timestamp of the Blender
binary used to generate that manpage, than the current time.

As a bonus, when Blender building makes use of the SOURCE_DATE_EPOCH envvar
(through CMake, since previous commit), this also propagate automatically
to that man page.

Inspired by D5756 by Bernhard M. Wiedemann (@bmwiedemann), thanks.
2019-09-18 23:04:23 +02:00
Campbell Barton
7137d1470a Docs: update link 2019-09-13 07:46:25 +10:00
Campbell Barton
c8c3e7d284 Cleanup: trailing space, remove tabs, pep8 2019-09-10 06:17:59 +10:00
Aaron Carlisle
5e77fb2482 API Docs: Correct Hotkey
Here we can link to the manual and keep the hotkey updated in the manual 
rather than the API docs.

Fixes T68371
2019-08-07 17:20:40 -04:00
604fdb6e85 Spelling fixes in comments and descriptions, patch by luzpaz
Differential Revision: https://developer.blender.org/D3744
2019-07-31 14:27:35 +02:00
2b8bc1a22e Doxygen: update version number to 2.81 2019-07-29 19:10:48 +02:00
Campbell Barton
419f137c64 Doxygen: update version number 2019-07-25 13:08:44 +10:00
Aaron Carlisle
52cf94eeb5 API Docs: Change handling of Blender Version 2019-07-08 20:53:15 -04:00
Aaron Carlisle
75d48c6efd API Docs: Hide Home Icon in Seach Area 2019-07-08 20:53:15 -04:00
Aaron Carlisle
9a0a952f72 API Docs: Fix file name 2019-07-08 11:45:25 -04:00
Aaron Carlisle
313097c267 API Docs: Fix Links 2019-07-06 19:46:05 -04:00
Aaron Carlisle
e1fbab12dc API Docs: Update Changlog for 2.80 2019-07-06 17:01:11 -04:00
Aaron Carlisle
8933a3bbd0 API Docs: Fix Update changelog script to python3 2019-07-06 17:01:11 -04:00
Aaron Carlisle
1f2f5f660b API Docs: Use Opensearch 2019-07-06 17:01:11 -04:00
Aaron Carlisle
f702830a79 API Docs: Theme: Prevent Super Long Enums 2019-07-06 17:01:10 -04:00
Aaron Carlisle
6fad70d551 Cleanup: API Doc Gen: move copying static dir to own function 2019-07-06 17:01:10 -04:00
Jeroen Bakker
669d50f803 Fix T66405: Python API documentation
removed glVertex from the Python bgl api documentation as they are
deprecated.
2019-07-04 09:19:48 +02:00
Aaron Carlisle
d2788510fb API Docs: Update Build Dependencies 2019-07-03 22:47:44 -04:00
Aaron Carlisle
66a69fa220 API Docs: Theme Options
- Limit Nav depth to 1
- Turn off stick nav
- Add canonical_url
2019-07-03 22:46:52 -04:00
Bastien Montagne
74ffcad90e PyAPI Doc: Fix presets menu example. 2019-06-26 15:35:34 +02:00
Bastien Montagne
0e327968a9 PyAPI Doc: Minor updates to UIList examples... 2019-06-26 15:06:18 +02:00
Campbell Barton
52b4afacb2 Fix errors raised at generating Python API docs
D5121 by @Nutti
2019-06-24 20:07:20 +10:00
Campbell Barton
0c538fc923 Cleanup: spelling, grammar, and other corrections
D5084 by @nBurn with edits
2019-06-21 10:18:53 +10:00
Jacques Lucke
3a7af37e28 Python API Docs: fix some examples 2019-06-06 17:13:02 +02:00
Bastien Montagne
33e8db94b1 Fix (unreported) missing updates in scripts/docs after scene.update() removal.
This should really have been done together with API changes, simple
usage of grep does the trick to catch most places needing updates.
2019-06-04 14:39:51 +02:00
Campbell Barton
351e68e0a4 Docs: update quick-start
Resolves T64146
2019-06-04 13:12:59 +10:00
Dalai Felinto
c01e43d024 Update Python GPU example to latest depsgraph API 2019-05-31 11:31:04 -03:00
Bastien Montagne
1885d234b0 Fix (unreported) API doc generation script after removal of some ObjectBase ietms from context. 2019-05-27 16:06:40 +02:00
Dalai Felinto
caf52e3779 Update "Overriding Context" API example 2019-05-24 19:21:30 -03:00
49593a2c38 Fix T64528: error in RenderEngine API docs example 2019-05-23 10:33:11 +02:00
Sybren A. Stüvel
8022bd7059 Depsgraph examples: don't assign to names of built-in Python objects
`object` is the superclass of all objects. Old-style code could still be
using `class SomeClass(object)` and assigning something else to `object`
could have unexpected results.

This is now also documented in the
[Python style guide](https://wiki.blender.org/wiki/Style_Guide/Python)
on the wiki.

Differential Revision: https://developer.blender.org/D4922

Reviewed by: sergey
2019-05-23 10:29:49 +02:00
6864d0b6f1 API Docs: fix mistake in example code 2019-05-17 10:43:31 +02:00
32b5f24c2a API Docs: add example use cases for mesh functions, fix wrong description 2019-05-17 10:34:20 +02:00
Sergey Sharybin
5186cfbea4 Depsgraph: State behavior details more explicitly 2019-05-17 10:24:45 +02:00
Sergey Sharybin
2ee762344f Cycles: Fix missing viewport updates after recent changes
We can not access ensured-to-be-evaluated dependency graph from the
render API: some of it is running from within evaluation which makes
it possible for engines to access list of evaluated IDs.

Solved by passing dependency graph to viewport functions, similar to
the final render functions.
2019-05-16 17:24:16 +02:00
Sergey Sharybin
32d5d127cb Tweak API to support adding evaluated meshes to main database
One of the usecases is to create mesh from an object is a manner similar to
how Apply Modifiers does it, and have it in the bmain so it can be referenced
by other objects.

This usecase is something what went unnoticed in the previous API changes, so
here is a followup.

Summary of changes:

* bpy.meshes.new_from_object() behaves almost the same as before this change.
  The difference now is that it now ensures all referenced data-blocks are
	original (for example, materials referenced by the mesh).

* object.to_mesh() now creates free-standing Mesh data-block which is outside
  of any bmain. The object owns it, which guarantees the memory never leaks.

  It is possible to force free memory by calling object.to_mesh_clear().

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4875
2019-05-16 16:42:16 +02:00
Sergey Sharybin
e693918d40 Dependency graph API changes
Main goal here is to make it obvious and predictable about
what is going on.

Summary of changes.

- Access to dependency graph is now only possible to a fully evaluated
  graph. This is now done via context.evaluated_depsgraph_get().

  The call will ensure both relations and datablocks are updated.

  This way we don't allow access to some known bad state of the graph,
  and also making explicit that getting update dependency graph is not
  cheap.

- Access to evaluated ID is now possible via id.evaluated_get().

  It was already possible to get evaluated ID via dependency graph,
  but that was a bit confusing why access to original is done via ID
  and to evaluated via depsgraph.

  If datablock is not covered by dependency graph it will be returned
  as-is.

- Similarly, request for original from an ID which is not evaluated
  will return ID as-is.

- Removed scene.update().

  This is very expensive to update all the view layers.

- Added depsgraph.update().

  Now when temporary changes to objects are to be done, this is to
  happen on original object and then dependency graph is to be
  updated.

- Changed object.to_mesh() to behave the following way:

   * When is used for original object modifiers are ignored.

     For meshes this acts similar to mesh-copy, not very useful but
     allows to keep code paths similar (i.e. for exporter which has
     Apply Modifiers option it's only matter choosing between original
     and evaluated object, the to_mesh() part can stay the same).

     For curves this gives a mesh which is constructed from displist
     without taking own modifiers and modifiers of bevel/taper objects
     into account.

     For metaballs this gives empty mesh.
     Polygonization of metaball is not possible from a single object.

   * When is used for evaluated object modifiers are always applied.

     In fact, no evaluation is happening, the mesh is either copied
     as-is, or constructed from current state of curve cache.

  Arguments to apply modifiers and calculate original coordinates (ORCO,
  aka undeformed coordinates) are removed. The ORCO is to be calculated
  as part of dependency graph evaluation.

File used to regression-test (a packed Python script into .blend):

{F7033464}

Patch to make addons tests to pass:

{F7033466}

NOTE: I've included changes to FBX exporter, and those are addressing
report T63689.

NOTE: All the enabled-by-default addons are to be ported still, but
first want to have agreement on this part of changes.

NOTE: Also need to work on documentation for Python API, but, again,
better be done after having agreement on this work.

Reviewers: brecht, campbellbarton, mont29

Differential Revision: https://developer.blender.org/D4834
2019-05-16 11:49:21 +02:00
Campbell Barton
928becec60 UV Sculpt: improve tool-system integration
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).

Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.

- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
  select different brushes.
- Make UV sculpt use paint paint tool slots
  (using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
  S/P/G keys to switch tools.
2019-05-01 20:32:38 +10:00
Campbell Barton
53e3fcdce4 Cleanup: use 2 space indentation for shell scripts
Already used by install_deps.sh
2019-04-17 06:08:01 +02:00
Jacques Lucke
3c7a538c9b Fix T60891: bgl docs still include deprecated opengl functions
In a separate step, all new functions should be added.
However, the best way to do this, is not clear yet.
A list of functions, that have to be added is available
in D4280.

Differential Revision: https://developer.blender.org/D4280
2019-04-04 16:14:59 +02:00
99c98aa306 Python API: tweak RenderEngine example to be a bit more efficient.
Suggested by Germano Cavalcante.
2019-03-27 16:25:19 +01:00
337eb8c1de Python API: add more detailed example for RenderEngine. 2019-03-26 19:57:51 +01:00
Campbell Barton
dd1132416e Docs: update examples for 2.8x
Use fields for properties
2019-03-22 00:07:06 +11:00
Campbell Barton
e7fd6c8f30 Cleanup: comment blocks 2019-03-19 15:17:46 +11:00
Bastien Montagne
94f55d14c3 Fix (unreported) broken Py API doc after adding gpencil to buttons_context... 2019-03-18 14:42:44 +01:00
Campbell Barton
ad9addbf46 Cleanup: unused imports 2019-03-17 21:00:56 +11:00
Bastien Montagne
8ba1c3072c API Doc: Gotcha: add section about 'exceptions to the rules' known crashing cases.
As exposed in T62406, we can have some rare cases of crashes due to
memory re-allocation happening outside of expected scenarii.

Ideally this should be re-designed, but at least keep track of those
known exceptions to general rules...
2019-03-12 14:12:46 +01:00
Campbell Barton
a71891085d Context: add pose_object
Needed for UI scripts to detect mixed weight paint + pose mode.
2019-03-12 10:22:53 +11:00
Bastien Montagne
49c100e56c API doc: info_gotcha: extend description of issues related to memory changes.
* Added a TL;DR first paragraph summarizing that one shall not keep any
reference to Blender data when modifying its container.

* Added some info about fact that adding items to some data containers
(like Collection) can also invalidate existing items (due to array
re-allocation).

* Added a Do/Don't example which shows a crash after adding some items
to a collection.

Related to T61297.
2019-02-18 14:36:16 +01:00
Bastien Montagne
9299073d57 Cleanup: API doc 'info_gotcha': typos. 2019-02-18 14:36:16 +01:00
Campbell Barton
7d792976e1 doxygen: update doxygen & add balembic group 2019-02-18 11:23:40 +11:00
Campbell Barton
1085c2cc44 Doxygen: don't warn on undocumented params
We don't attempt to have docs for all args, so don't warn about this.
2019-02-06 15:02:07 +11:00
Campbell Barton
f339b2fd41 Doxygen: update doxyfile 2019-02-06 15:01:04 +11:00
Campbell Barton
40f2afcf1d Cleanup: remove contributors for Python files
Following removal from C source code.

See: 8c68ed6df16d8893
2019-02-05 09:17:00 +11:00
2987782d6d Docs: update manpage and html with app description matching website. 2018-12-28 17:36:59 +01:00