Commit Graph

1222 Commits

Author SHA1 Message Date
Aaron Carlisle c88c331384 PyDoc: Update Sphinx and pin dependencies
Sphinx has rather loose dependency requirements which can cause issues if we aren't careful.
As a solution they recommend that you pin sphinx dependency versions
2021-06-22 16:30:07 -04:00
Campbell Barton 7141eb75ef Docs: update oxygen configuration to v1.9.1 2021-06-10 16:34:58 +10:00
Ray Molenkamp b282a065f1 Docs: Add preprocessor define for doxygen
Doxygen by default leaves out any functions inside
#ifdef blocks that it thinks are disabled.

This change adds a DOXYGEN symbol, so you can
still get the functions included in the
documentation even if the #ifdef would
have normally excluded them.

before

#if defined(_WIN32)

after

#if defined(_WIN32) || defined(DOXYGEN)

Patch provided by Campbell Barton on chat.
2021-06-09 18:44:39 -06:00
Campbell Barton f29a738e23 PyAPI: use keyword only arguments
Use keyword only arguments for the following functions.

- addon_utils.module_bl_info 2nd arg `info_basis`.
- addon_utils.modules 1st `module_cache`, 2nd arg `refresh`.
- addon_utils.modules_refresh 1st arg `module_cache`.
- bl_app_template_utils.activate 1nd arg `template_id`.
- bl_app_template_utils.import_from_id 2nd arg `ignore_not_found`.
- bl_app_template_utils.import_from_path 2nd arg `ignore_not_found`.
- bl_keymap_utils.keymap_from_toolbar.generate 2nd & 3rd args `use_fallback_keys` & `use_reset`.
- bl_keymap_utils.platform_helpers.keyconfig_data_oskey_from_ctrl 2nd arg `filter_fn`.
- bl_ui_utils.bug_report_url.url_prefill_from_blender 1st arg `addon_info`.
- bmesh.types.BMFace.copy 1st & 2nd args `verts`, `edges`.
- bmesh.types.BMesh.calc_volume 1st arg `signed`.
- bmesh.types.BMesh.from_mesh 2nd..4th args `face_normals`, `use_shape_key`, `shape_key_index`.
- bmesh.types.BMesh.from_object 3rd & 4th args `cage`, `face_normals`.
- bmesh.types.BMesh.transform 2nd arg `filter`.
- bmesh.types.BMesh.update_edit_mesh 2nd & 3rd args `loop_triangles`, `destructive`.
- bmesh.types.{BMVertSeq,BMEdgeSeq,BMFaceSeq}.sort 1st & 2nd arg `key`, `reverse`.
- bmesh.utils.face_split 4th..6th args `coords`, `use_exist`, `example`.
- bpy.data.libraries.load 2nd..4th args `link`, `relative`, `assets_only`.
- bpy.data.user_map 1st..3rd args `subset`, `key_types, `value_types`.
- bpy.msgbus.subscribe_rna 5th arg `options`.
- bpy.path.abspath 2nd & 3rd args `start` & `library`.
- bpy.path.clean_name 2nd arg `replace`.
- bpy.path.ensure_ext 3rd arg `case_sensitive`.
- bpy.path.module_names 2nd arg `recursive`.
- bpy.path.relpath 2nd arg `start`.
- bpy.types.EditBone.transform 2nd & 3rd arg `scale`, `roll`.
- bpy.types.Operator.as_keywords 1st arg `ignore`.
- bpy.types.Struct.{keyframe_insert,keyframe_delete} 2nd..5th args `index`, `frame`, `group`, `options`.
- bpy.types.WindowManager.popup_menu 2nd & 3rd arg `title`, `icon`.
- bpy.types.WindowManager.popup_menu_pie 3rd & 4th arg `title`, `icon`.
- bpy.utils.app_template_paths 1st arg `subdir`.
- bpy.utils.app_template_paths 1st arg `subdir`.
- bpy.utils.blend_paths 1st..3rd args `absolute`, `packed`, `local`.
- bpy.utils.execfile 2nd arg `mod`.
- bpy.utils.keyconfig_set 2nd arg `report`.
- bpy.utils.load_scripts 1st & 2nd `reload_scripts` & `refresh_scripts`.
- bpy.utils.preset_find 3rd & 4th args `display_name`, `ext`.
- bpy.utils.resource_path 2nd & 3rd arg `major`, `minor`.
- bpy.utils.script_paths 1st..4th args `subdir`, `user_pref`, `check_all`, `use_user`.
- bpy.utils.smpte_from_frame 2nd & 3rd args `fps`, `fps_base`.
- bpy.utils.smpte_from_seconds 2nd & 3rd args `fps`, `fps_base`.
- bpy.utils.system_resource 2nd arg `subdir`.
- bpy.utils.time_from_frame 2nd & 3rd args `fps`, `fps_base`.
- bpy.utils.time_to_frame 2nd & 3rd args `fps`, `fps_base`.
- bpy.utils.units.to_string 4th..6th `precision`, `split_unit`, `compatible_unit`.
- bpy.utils.units.to_value 4th arg `str_ref_unit`.
- bpy.utils.user_resource 2nd & 3rd args `subdir`, `create`
- bpy_extras.view3d_utils.location_3d_to_region_2d 4th arg `default`.
- bpy_extras.view3d_utils.region_2d_to_origin_3d 4th arg `clamp`.
- gpu.offscreen.unbind 1st arg `restore`.
- gpu_extras.batch.batch_for_shader 4th arg `indices`.
- gpu_extras.batch.presets.draw_circle_2d 4th arg `segments`.
- gpu_extras.presets.draw_circle_2d 4th arg `segments`.
- imbuf.types.ImBuf.resize 2nd arg `resize`.
- imbuf.write 2nd arg `filepath`.
- mathutils.kdtree.KDTree.find 2nd arg `filter`.
- nodeitems_utils.NodeCategory 3rd & 4th arg `descriptions`, `items`.
- nodeitems_utils.NodeItem 2nd..4th args `label`, `settings`, `poll`.
- nodeitems_utils.NodeItemCustom 1st & 2nd arg `poll`, `draw`.
- rna_prop_ui.draw 5th arg `use_edit`.
- rna_prop_ui.rna_idprop_ui_get 2nd arg `create`.
- rna_prop_ui.rna_idprop_ui_prop_clear 3rd arg `remove`.
- rna_prop_ui.rna_idprop_ui_prop_get 3rd arg `create`.
- rna_xml.xml2rna 2nd arg `root_rna`.
- rna_xml.xml_file_write 4th arg `skip_typemap`.
2021-06-09 03:05:44 +10:00
Aaron Carlisle e6a69f7653 Docs: Capitalize first word of sentence 2021-05-30 11:09:01 -04:00
Aaron Carlisle f5d14e36e8 PyDoc: Use em dash instead of comma for enum items 2021-05-29 12:16:13 -04:00
Campbell Barton 3bee77bb7c Cleanup: use static set syntax 2021-05-28 16:58:50 +10:00
Alexander Gavrilov a86e815dd8 Mathutils: add a Matrix.LocRotScale constructor for combining channels.
Combining location, rotation and scale channels into a matrix is
a standard task, so while it is easily accomplished by constructing
and multiplying 3 matrices, having a standard utility allows for
more clear code.

The new constructor builds a 4x4 matrix from separate location,
rotation and scale values. Rotation can be represented as a 3x3
Matrix, Quaternion or Euler value, while the other two inputs
are vectors. Unneeded inputs can be replaced with None.

Differential Revision: https://developer.blender.org/D11264
2021-05-17 19:12:40 +03:00
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 43369ca80e
Files without doc-strings were not included.
2021-05-17 18:02:56 +10:00
Germano Cavalcante 3c978a73d1 Docs: PyAPI: Replace use of the bgl module in the RenderEngine example
The bgl module will be discontinued.

This example is seen at:
https://docs.blender.org/api/current/bpy.types.RenderEngine.html uses it.

Differential Revision: https://developer.blender.org/D11262
2021-05-14 18:29:23 -03: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
Aaron Carlisle 37e16e3589 Docs: PyAPI: Fix css selector failing on some pages 2021-05-01 01:54:05 -04:00
Aaron Carlisle d540a858d8 Merge branch 'blender-v2.93-release' 2021-05-01 01:53:34 -04:00
Aaron Carlisle f11a3c36e3 Docs: PyAPI: Fix css selector failing on some pages 2021-05-01 01:28:31 -04:00
Germano Cavalcante c3a980436d Documentation: Replace the bgl API in the gpu module exemples 2021-04-30 10:50:50 -03:00
Aaron Carlisle 14f59a0349 Merge branch 'blender-v2.93-release' 2021-04-28 18:27:47 -04:00
Aaron Carlisle 48bbeaf383 Docs: PyAPI: Improve website responsiveness on narrow displays
- Allow long enums to break early
- Allow long titles to wrap
- Colloapse hlist to few collumns if needed

This fixes a few of the bigger issues, some more tweaks are still needed 
in some places
2021-04-28 18:25:47 -04:00
Aaron Carlisle a71d8ecb69 Docs: PyAPI: More specific css selector for long enums
Fixes T87008
2021-04-28 17:57:58 -04:00
Campbell Barton 7ccd19fc12 PyAPI: update docs to include poll_message_set reference
Part of D9738
2021-04-20 12:29:04 +10:00
Dalai Felinto 6e39da7948 Blender 3.0 version bump
Blender 3.0 is now in bcon1 (alpha).

There are likely a few places in Blender and the automated building pipeline
that may fail since we are switching our versioning number system.

For example, at the moment the splash and the status bar are showing
3.00.0, and it should show 3.1.0.

I suspect the Python API, version used to report a bug, buildname, are
all wrong too. These will be handled later.
2021-04-15 15:42:41 +02:00
Campbell Barton d3cb1d845b Fix error extracting date in manpage generator
Error from recent cleanup 0e3bc2e321
2021-04-11 16:02:00 +10:00
Campbell Barton 0e3bc2e321 Cleanup: further cleanup to man page generator
- Raw strings (since backslashes were used for un-escaped characters).
- Parse the version string, avoiding color management errors being
  included.
2021-04-11 12:00:44 +10:00
Campbell Barton f337310b43 Cleanup: minor improvements & type hints for man-page generator
- Use main() function.
- Use argparse for parsing arguments.
- Keep under 120 column width.
- Use type hints (passes `mypy --strict`).
2021-04-10 17:54:42 +10:00
Aaron Carlisle 074b0b6da0 Py API Docs: Update sphinx and theme versions 2021-04-05 17:28:36 -04: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
Campbell Barton 544b3ab1de Cleanup: clang-format, trailing space
Minor manual tweak to prevent wrapping an array into columns.
2021-03-22 14:25:42 +11:00
Jörg Müller 12c08ceee3 Audaspace: add support for CoreAudio on macOS
This adds CoreAudio as audio backend on macOS.
CoreAudio is the standard audio API on macOS.

Ref T86590
2021-03-16 23:21:45 +01:00
Jörg Müller bc57985306 Audaspace: add support for WASAPI on Windows
This adds WASAPI as audio backend on Windows.
WASAPI is the modern standard audio API on
Windows introduced with Windows Vista.

Ref T86590
2021-03-16 23:21:45 +01:00
Jörg Müller d33339ebf4 Audaspace: add support for PulseAudio on Linux
This adds PulseAudio as audio backend on Linux.
PulseAudio is the main audio engine used on most,
if not all, Linux distributions today.

Ref T86590
2021-03-16 23:21:45 +01: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
Aaron Carlisle fbb0017c90 PyAPI Docs: Update Sphinx to 3.5.1 2021-02-25 17:51:48 -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
Omar Emara f2c0bbed1c Python: Add to_curve method to the object API
This patch adds a to_curve method to the Object ID. This method is
analogous to the to_mesh method. The method can operate on curve and
text objects. For text objects, the text is converted into a 3D Curve ID
and that curve is returned. For curve objects, if apply_modifiers is
true, the spline deform modifiers will be applied and a Curve ID with
the result will be returned, otherwise a copy of the curve will be
returned.

The goal of this addition is to allow the developer to access the splines
of text objects and to get the result of modifier applications which was
otherwise not possible.

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D10354
2021-02-20 18:05:13 +02: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 f75f447ce8 Merge branch 'blender-v2.92-release' 2021-02-18 22:54:22 -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
Aaron Carlisle 97072e0135 Py Doc: Fix rst syntax errors 2021-02-12 13:14:43 -05:00
Aaron Carlisle 95cba37190 Py Doc: Delete old deployment scripts
Now, the API docs are deployed via the new devops pipeline developed by 
James.
2021-02-12 13:14:43 -05:00
Aaron Carlisle 432b758ae3 Py Doc: Update Sphinx and theme versions 2021-02-12 13:14:43 -05:00
Ankit Meel 27e2c5ab78 Tests, docs: Use sanitizer options from environment too.
Don't overwrite environment variables that may
contain options like suppression files, symboliser etc.
It's similar to rBa181b156399a13fa429159112e30c8005d5e8a59
and rBA589d13408a60cbec34a8bc3cc798c586043743ae .
For Blender Add-ons repo, see the equivalent in D9816.

Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D9815
2021-01-29 14:13:26 +05:30
Dalai Felinto 8ad305382e Blender 2.93 bcon1 - alpha
Bump the version number for the new release cycle.
2021-01-13 17:33:27 +01:00
Aaron Carlisle 5530d6f86f PyAPI Docs: Terminal instructions for Windows incorrect
Fixes T84498
2021-01-07 15:58:47 -05:00
Aaron Carlisle 27426c05b1 PyAPI Docs: Link to user docs instead of describing in API doc 2021-01-06 19:52:13 -05:00
Aaron Carlisle b138c8f5b3 PyAPI Docs: Update Indirect Data Access docs
Fixes T84432
2021-01-06 19:34:21 -05:00
Aaron Carlisle a9c607e60e PyAPI Docs: Fix wrong modifier path usage
Fixes T84430
2021-01-06 18:54:56 -05:00
Aaron Carlisle 133bdac306 PyAPI Docs: Clarify quick start guide tips
Some of the text here was outdated with 2.8x.
See T84427
2021-01-06 18:45:34 -05:00
Campbell Barton a0db43cd7b Fix T84388: Invalid operator reference in the quick-start 2021-01-05 15:51:50 +11:00
Aaron Carlisle 1e8f266591 API Docs: CSS: Fix long enum list
This commit makes some adjustments to a previous fix which broke with 
new versions of sphinx/theme.

Fixes T76453
2021-01-02 20:04:25 -05:00
Julian Eisel c25e031049 Asset System: "Mark Asset" & "Clear Asset" operators and UI integration
This makes it possible to turn data-blocks into assets and back into normal
data-blocks. A core design decision made for the asset system is that not every
data-block should be an asset, because not every data-block is made for reuse.
Users have to explicitly mark data-blocks as assets.

Exposes "Mark Asset" and "Clear Asset" in Outliner context menus (currently ID
Data submenu) and button context menus. We are still not too happy with the
names, they may change.

This uses the new context members to pass data-blocks to operators, added in
af008f5532 and 0c1d476923.

Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.

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

Reviewed by: Brecht Van Lommel
2020-12-15 17:03:00 +01:00
Campbell Barton 78080337f8 PyDoc: expanded documentation for bpy_struct.is_property_set
This patch expands on the `is_property_set` doc-string,
detailing the purpose of the `ghost` argument added in
d3bcbe10c2.

Reviewed By: sybren

Ref D9780
2020-12-08 20:52:31 +11:00
Campbell Barton 28169cea3d PyDoc: avoid blank lines at the beginning of code-examples 2020-12-08 20:49:28 +11:00
Aaron Carlisle 538f41e949 Doxygen: Increase lookup cache
I could not measure any major speedup/memory usage but this resolves a 
message while running doxygen.
2020-12-05 20:17:32 -05:00
Aaron Carlisle eb4eb07065 Doxygen: Disable HTMLHELP
This feature is intended to generate Microsoft Compiled HTML Help files 
which is not something we use/need.
This also fixes an error in generation because the executable cannot be 
found.
2020-12-05 20:17:32 -05:00
Campbell Barton 07db110add Fix T82493: PyDoc generation throws exception on exit
Since add-ons now unregister on exit
(as of fa566157a5)
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
Dalai Felinto f2d454c829 Bump version to 2.92 alpha 2020-10-21 18:09:44 +02: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 4fa4245464 PyDocs: GPU Module: Examples: convert all gl_FragColor variables to FragColor
Based on D6425 by @robbott

Differential Revision: https://developer.blender.org/D6425
2020-10-14 11:18:36 -04:00
Aaron Carlisle cf778a9e42 Pydoc: BGL: update links 2020-10-11 20:14:16 -04:00
Aaron Carlisle df3d124e91 Pydoc: Fix bpy.utils submodule showing in main toctree 2020-10-11 18:38:55 -04:00
Aaron Carlisle 72335d5e89 Pydoc: Move builtin GPU shader information to code
This fixes a compile warning for sphinx.
This commit includes some reformating of the information.
2020-10-11 18:21:28 -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 c95ab2c6f0 Pydoc: Remove old note about new module in 2.65 2020-10-11 16:46:21 -04:00
Aaron Carlisle fbcb26fb33 Pydoc: Add submodule heading to submodule lists 2020-10-11 16:09:42 -04:00
Aaron Carlisle f735491b9f PyDoc: Set max width to 1000px
While not full width this gives a nice trade off between improved screen 
use space and readibility.
The old value was 80 so this gives 25% more screen space.

See T73223
2020-10-08 21:37:28 -04:00
Campbell Barton decb3b10aa Cleanup: operator execution types didn't read well on one line 2020-10-09 12:14:22 +11: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
Campbell Barton 05d637280c Fix recent update to sphinx_doc_gen.sh
2f1a0f6f0e copied Makefile syntax into a
shell script. Use sphinx-builds 'auto' command to set the number of
jobs to run.
2020-10-08 11:08:36 +11:00
Aaron Carlisle c4a281e801 PyDoc: Use explicit class names to refence class
This fixes the link and makes it more clear which class the note is 
talking about
2020-10-07 17:25:19 -04: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 2f1a0f6f0e PyDoc: Multithread sphinx-build
Compile times went from over 5min to under 2 on my laptop.
2020-10-07 10:25:46 -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
Campbell Barton 28ebe827e6 Cleanup: trailing space 2020-10-02 11:59:16 +10:00
Aaron Carlisle b150071ece Cleanup: Python API Docs: Text formating 2020-09-28 20:11:06 -04: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 e893430a63. 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
Bastien Montagne 211d213160 API doc: Gotcha's: Add section about abusing RNA properties callbacks.
Especially with new undo/redo it is even less recommended to perform
complex operations in those callbacks, they should remain as fast and
localized as possible.

Also updated the section about undo/redo a bit.
2020-09-14 11:02:52 +02:00
Aaron Carlisle 950d857505 Merge branch 'blender-v2.90-release' 2020-08-24 10:40:12 -04:00
Aaron Carlisle 9498eb2692 API Docs: Update Changelog from 2.83 2020-08-24 10:38:17 -04:00
Brecht Van Lommel 6238eabcd4 Merge branch 'blender-v2.90-release' 2020-08-12 18:50:40 +02:00
Brecht Van Lommel 54c2c14921 CMake: clarify that the modules are licensed BSD 3-Clause
Many of these are derived from similar modules in the CMake project, which
have this license.

Fixes T79715
2020-08-12 18:49:16 +02:00
Philipp Oeser 42f4233871 Merge branch 'blender-v2.90-release' 2020-08-05 14:10:08 +02:00
Philipp Oeser 229fe01a15 PyDoc: use glClearColor before glClear in gpu docs
ref T79491

Maniphest Tasks: T79491

Differential Revision: https://developer.blender.org/D8471
2020-08-05 14:09:00 +02:00
Sybren A. Stüvel e8869d9c71 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 19:02:44 +02: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 953c232db3
2020-07-27 13:01:28 -04:00
Nathan Letwory 5a1a4f4dd2
master is now 2.91.0 alpha. 2020-07-22 16:48:29 +03:00
Campbell Barton a197b81090 Docs: include 'bl_math' module 2020-07-22 14:36:30 +10:00
Campbell Barton 20446f07f6 Docs: reference bl_rna_get_subclass_py instead of bl_rna_get_subclass
bl_rna_get_subclass only works for Nodes at the moment.
2020-07-06 23:07:18 +10:00
Aaron Carlisle b7b57e7155 PyDoc: Update Python Package Requirements 2020-06-26 13:24:53 -04: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
Tobias Heinke 23f8ab4250 API docs: intro overhaul
- Update terminology, spelling, formatting.
- Rename screen to workspace.
- Update for 2.8 UI changes.
2020-06-23 23:13:10 +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
Aaron Carlisle 2e52b3206c PyDoc: Fix warnings from out of bounds include statement 2020-06-02 18:21:42 -04:00
Bastien Montagne 8d670546f9 Merge branch 'blender-v2.83-release' 2020-06-01 12:12:57 +02:00
Bastien Montagne 31cf87a29e Fix py api doc gen script after recent versionning changes. 2020-06-01 12:10:56 +02: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
Aaron Carlisle 0700521833 Py Docs: Update Sphinx and Theme Dependencies
`sphinx_rtd_theme==0.5.0rc1` probably should not be used for 2.83 but it 
would be nice to test
2020-05-24 19:23:28 -04: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
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
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
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
Sybren A. Stüvel 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
Brecht Van Lommel 3842519a38 Revert "Merge branch 'master' into blender-v2.81-release"
This reverts commit 20b2acf336, reversing
changes made to f185cc0ca5.

Merges should only go form the release branch to master. For backporting
commits, use cherry-pick.
2019-10-11 21:31:58 +02:00
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 6864d0b6f1 API Docs: fix mistake in example code 2019-05-17 10:43:31 +02:00
Brecht Van Lommel 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
Brecht Van Lommel 99c98aa306 Python API: tweak RenderEngine example to be a bit more efficient.
Suggested by Germano Cavalcante.
2019-03-27 16:25:19 +01:00
Brecht Van Lommel 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: 8c68ed6df1
2019-02-05 09:17:00 +11:00
Brecht Van Lommel 2987782d6d Docs: update manpage and html with app description matching website. 2018-12-28 17:36:59 +01:00
Campbell Barton 63fcbfc3a7 RNA: naming, user-preferences -> preferences 2018-12-21 12:55:02 +11:00
Campbell Barton b322ce0847 Context: add objects_in_mode(_unique_data)
Needed for Python to easily support multi-object edit/pose modes.
2018-12-17 17:55:18 +11:00
Campbell Barton 7fac1bfc20 Context: remove active_gpencil_brush
We don't have this for other painting modes,
no need for a special case here.
2018-12-17 17:17:43 +11:00
Campbell Barton d6225c9caa Merge branch 'master' into blender2.8 2018-12-14 08:14:52 +11:00
Campbell Barton e961c1244c Fix typo in context docs. 2018-12-14 08:13:55 +11:00
Campbell Barton f81aeac2bc Docs: rename group -> collection 2018-11-30 09:10:40 +11:00
Campbell Barton 2a8f6946fe Docs: update quickstart for 2.8 2018-11-30 08:53:36 +11:00
Campbell Barton 6af997710b Merge branch 'master' into blender2.8 2018-11-30 08:39:59 +11:00
Campbell Barton 8ac2d85d2f Cleanup: trailing space 2018-11-30 08:38:25 +11:00
Campbell Barton 0ed4cadf5a Docs: use float in bpy.app.timer examples
Makes it clear seconds are not integers,
also avoids conversion to float.
2018-11-28 06:09:42 +11:00
Jacques Lucke dcb86689b0 Python API Docs: Examples for new timer api 2018-11-27 11:31:48 +01:00
Jacques Lucke 884638494d Python API: Fix partial build
`gpu_extras` was always visible
2018-11-27 10:56:37 +01:00
Jacques Lucke c1adf938e6 Timer: Generic BLI_timer with Python wrapper
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
2018-11-26 20:25:15 +01:00
Brecht Van Lommel d203234dd0 Python API Docs: better titles.
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.
2018-11-21 19:31:20 +01:00
Campbell Barton 3c8c976086 Cleanup: gpu docs 2018-11-20 07:38:20 +11:00
Jacques Lucke 422992a135 Py API Docs: use new bind context manager in gpu examples 2018-11-19 14:32:51 +01:00
Jacques Lucke 78207eac9b Py API Docs: New custom shader example 2018-11-14 18:41:33 +01:00
Jacques Lucke 9caa587519 Py API Docs: Remove older GPUOffScreen example
I think this example does not belong into the api docs and certainly not in the place where it was until now.
Maybe this can become a template in Blender but personally I don't see much value in it as an "official example" because it is hard to see what is going on exactly.
There are a few other examples that show how to use the GPUOffScreen object now.
2018-11-13 16:43:17 +01:00
Jacques Lucke 3aa30406dd Py API Docs: New Example for off screen rendering 2018-11-13 16:38:12 +01:00
Jacques Lucke 15a5cc6ca0 Py API Docs: another use case for offscreen rendering 2018-11-12 17:54:51 +01:00
Jacques Lucke 406452ec5d Py API Docs: Another example for offscreen rendering 2018-11-12 17:17:59 +01:00
Jacques Lucke ded780f13e Py API Docs: fix typos/wording
found by Omar Ahmad
2018-11-12 13:48:31 +01:00
Jacques Lucke 492dbae4d1 Py API Docs: Restructure gpu module introduction 2018-11-12 12:14:18 +01:00
Jacques Lucke a4bfccc439 Py API Docs: More gpu module documentation 2018-11-09 19:20:55 +01:00
Dalai Felinto 49a7bcafd9 gpu.offscreen, fix pydoc, example and rename modelviewmatrix > viewmatrix
Technically this is only the view matrix, not model view matrix.
And view layer was missing from the pydoc.
2018-11-09 13:54:38 -02:00
Campbell Barton f12d2adc87 RNA: Object.select_set use boolean, only select
- Was setting active state, making it necessary to backup/restore
  active object in cases where this isn't needed.
  Existing scripts are explicitly setting the active object when needed.

- Use a boolean select arg (toggle selection wasn't used anywhere).

- Add an optional view layer argument since scripts should be able to
  operate outside the user context.
2018-11-08 08:54:55 +11:00
Jacques Lucke b82eac8986 Py API Docs: improve 2D image example 2018-11-07 16:14:11 +01:00
Jacques Lucke 9a38526be0 Py API Docs: show gpu_extras module 2018-11-07 15:45:28 +01:00
Bastien Montagne 7b38df41ae Fix/cleanup RNA viewlayer API.
RNA's ViewLayer would present 'first level' of layer collection as a
list (collection property), when it is actually now only a single item,
same as the scene's master collection.

Note: did not try to update view_layer python tests, those are already
fully broken for quiet some time I guess (they still assume
view_layer.collections to be mutable e.g.)...
2018-11-06 17:20:49 +01:00
Bastien Montagne a22167b9a2 Fix/Updated Object API example.
Was still 2.7x code... ;)
2018-11-05 20:42:00 +01:00
Jacques Lucke a8e9959e07 API Docs: gpu api introduction + examples 2018-11-05 19:28:28 +01:00
Campbell Barton ca8fee62ab Update gpu offscreen PyAPI example 2018-10-26 12:13:03 +11:00
Bastien Montagne af58646467 Fix py API docgen script for new context members. 2018-10-19 20:13:50 +02:00
Brecht Van Lommel e65784a051 Python API: add loop triangles access, remove tessfaces.
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.

Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.

Details on porting code to loop triangles is in the release notes.

Differential Revision: https://developer.blender.org/D3539
2018-10-10 17:43:44 +02:00