Commit Graph

1053 Commits

Author SHA1 Message Date
luzpaz
dea26253a0 cleanup: fix typos in comments and docs
Followup to https://developer.blender.org/D10288

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D10346
2021-11-16 18:45:10 -05:00
Philipp Oeser
7da714f387 Merge branch 'blender-v3.0-release' 2021-11-16 10:57:26 +01:00
Diptangshu Dey
da14a482f2 Fix T90866: Python operator templates are not accessible from menus
Python Operator templates made accessible from respective menus
(required to also use F3 search for quick access)
Also fixed Modal Draw Operator id_name (had duplicate name from other template)

Maniphest Tasks: T90866

Differential Revision: https://developer.blender.org/D13182
2021-11-16 10:45:23 +01:00
Hans Goudey
42df2a7b57 Cleanup: Grammar in comments 2021-11-07 23:20:29 -06:00
289843119d Python doc generator: add missing selected_ids context key
Add the context key I introduced in rB03c0581c6ed to the Python API docs
generator.

No functional changes to Blender.
2021-10-28 11:24:27 +02:00
4adde62f60 Python doc generator: add missing selected_ids context key
Add the context key I introduced in rB03c0581c6ed to the Python API docs
generator.

No functional changes to Blender.
2021-10-28 10:32:13 +02:00
2501d00268 Python doc generator: raise explanatory error when context key is missing
When a new key is added to the context, it also needs to be added to the
`sphinx_doc_gen.py` file for generating the Python API documentation.
When this isn't done, the script would raise a generic `KeyError`. Now
it explains what needs to be updated to solve the problem.

No functional changes to Blender.
2021-10-28 10:32:13 +02:00
Brecht Van Lommel
e4a5fd4298 Fix broken Python API doc generation after addition of selected_ids 2021-10-27 22:16:36 +02:00
Brecht Van Lommel
b02c8a40ff Fix broken Python API doc generation after addition of selected_ids 2021-10-27 21:31:08 +02:00
Dalai Felinto
dab3591588 Blender 3.1 bcon1 - alpha
Bump the version number for the new release cycle.
2021-10-27 18:40:49 +02:00
Dalai Felinto
f0a37dc31c Revert "Blender 3.1 bcon1 - alpha"
This reverts commit 7b9e3534cfd1dd4bf3aefb98407f2e42a6efac4a.

This was supposed to go to master, not the 3.0 branch.
2021-10-27 18:40:02 +02:00
Dalai Felinto
7b9e3534cf Blender 3.1 bcon1 - alpha
Bump the version number for the new release cycle.
2021-10-27 18:38:22 +02:00
Philipp Oeser
25c173ffd1 Tracking: support editing all selected tracks
This patch adds a "selected_movieclip_tracks" context member and enables
editing properties of multiple selected tracks via the usual Alt-click
editing (as well as the "Copy To Selected" operator). Both use
UI_context_copy_to_selected_list() to gather a list of other selected
items [which are now taken via said new context member]. Strictly
speaking, this could be done without the context member as well [just
gathering other selected tracks in UI_context_copy_to_selected_list()
without relying on a context member], but this might come in handy in
other places (e.g. Addons).

note: some could be desired for markers (e.g. editing pattern/search
areas of all selected track markers, but since this is burried in a
uiTemplate, this is a bit more work for another patch).

Differential Revision: https://developer.blender.org/D12923
2021-10-20 11:36:33 +02:00
Aaron Carlisle
138fdf78ba PyAPI Docs: Fix example not using keyword parameter
Fixes T92238
2021-10-15 17:55:31 -04:00
Julian Eisel
c4dca65228 Asset Browser: Support dragging assets into catalogs
With this it is possible to select any number of assets in the Asset
Browser and drag them into catalogs. The assets will be moved to that
catalog then. However, this will only work in the "Current File" asset
library, since that is the only library that allows changing assets,
which is what's done here.

While dragging assets over the tree row, a tooltip is shown explaining
what's going to happen.

In preparation to this, the new UI tree-view API was already extended
with custom drop support, see 4ee2d9df428d.

----

Changes here to the `wmDrag` code were needed to support dragging multiple
assets. Some of it is considered temporary because a) a proper #AssetHandle
design should replace some ugly parts of this patch and b) the multi-item
support in `wmDrag` isn't that great yet. The entire API will have to be
written anyway (see D4071).

Maniphest Tasks: T91573

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

Reviewed by: Sybren Stüvel
2021-10-03 23:58:20 +02:00
Alexander Gavrilov
f9acf21063 Python API Docs: add an example of Bone.convert_local_to_pose usage.
The use case for this method is quite obscure and difficult to
understand without an example. Despite how big looks, this is
actually the simplest example that makes sense.
2021-10-01 15:47:30 +03:00
Jorge Bernal
970c928f27 Py API Docs: Fix audio docs example
After new AUD API changes from 2.8x what "buffer" function used to do
has now become "cache" function (it caches a sound into RAM). Therefore,
the basic aud example should call this new "cache" function instead of
"buffer" function.

Thanks to Michael-Z-Freeman for pointing out.
2021-09-18 19:28:55 +02:00
Aaron Carlisle
202dc3631e PyDocs: Update theme to latest version 2021-09-14 23:16:38 -04:00
Julian Eisel
f62eb8ac16 BPY-Docs: Add missing file context members documentation
Context members of the file space would not be shown in the context API
docs.
2021-09-01 16:28:44 +02:00
Campbell Barton
aabe6e3b45 Context: add "active_nla_track" & "active_nla_strip" context members
Selection was already accessible but not active.

Add utility functions:

- ANIM_nla_context_track to access the active track,
  following the convention of ANIM_nla_context_strip.

- ANIM_nla_context_*_ptr versions of these functions,
  needed to for creating context members to access the ID pointer.

Part of fix for T90723.
2021-08-31 12:06:47 +10:00
Aaron Carlisle
d374ff5b8f PyDoc: Fix compilation after recent contex_member addition
Fixes missing change needed for rB0a8f53a7b847d9c8bdcefc025de70fd2608012b7
2021-08-30 18:17:11 -04:00
Germano Cavalcante
9ad56627cf Docs: retitle 'GPU Shader Module' to 'GPU Module'
We already have a module for GPU Shader (`gpu.shader`).

So, remove the name "Shader" from the title to avoid confusion.
2021-08-30 09:21:38 -03:00
Aaron Carlisle
86622467c5 DocPy: Update Dependancies
Updates sphinx and the theme to the latest version along with any of their dependencies.

Note that we will be sticking to sphinx 4.1.1 until sphinx 4.2 for the same reasons listed in:
https://developer.blender.org/rBM8334
2021-08-20 13:46:38 -04:00
nutti
69fdcea978 Docs: add API docs for gpu.capabilities
Adds Python API documentations for gpu.capabilities module.

Ref D12226
2021-08-17 15:04:35 +10:00
nutti
d60e28093f Docs: add API docs for gpu.platform
Adds Python API documentations for gpu.platform module.

Ref D12222
2021-08-17 14:45:40 +10:00
Campbell Barton
61040a36aa PyDoc: fix for renamed context member
Missing change from 9cff9f9f5df034ca27848875c25471dd952c34c4.
2021-08-10 17:28:09 +10:00
Rob Ranieri
8e3dea27ec Docs: Blend-File: Fix typo
Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D12162
2021-08-09 15:36:42 -04:00
Aaron Carlisle
438d645a36 PyDoc: Update GPU Example of draw_view3d
This function was changed in rBc8004ab4078c98c54a70113c12bbb186403e90cf but didnt update the example.

Part of T84227
2021-08-04 20:25:50 -04:00
Aaron Carlisle
3fb47956c0 Man Page: Fix spelling 2021-07-22 20:13:14 -04:00
Julian Eisel
807bb450a0 Fix API doc generation after recent context additions 2021-07-20 22:07:41 +02:00
Campbell Barton
432bfbf7a3 Cleanup: pep8 2021-07-06 12:05:27 +10:00
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 43369ca80e62aa80b951823d1c78abef58852014
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