Commit Graph

1187 Commits

Author SHA1 Message Date
Falk David
423203c0fb Fix: PyDocs: Missing tool_settings in context_type_map
This has to be added now, because `sequencer_context_dir` specifically
lists `tool_settings` as a member. This was changed in
1122a05cb6.
2025-08-25 12:45:01 +02:00
Falk David
916f249f7c Fix: PyDocs: Missing sequencer_scene in context_type_map 2025-08-25 12:25:38 +02:00
Campbell Barton
e964f078b5 PyDoc: correct use of back ticks for literal text 2025-08-22 15:10:29 +10:00
Campbell Barton
990f0863e8 PyDoc: include buffer access in examples, cleanup
Note that buffer access is possible, also minor mathutils test cleanup.
2025-08-16 17:39:35 +10:00
clankill3r
ac962c02f6 Fix: PyDocs: typo fix in example
by -> be

Pull Request: https://projects.blender.org/blender/blender/pulls/144448
2025-08-12 17:20:04 +02:00
Campbell Barton
eb2cc80cd0 PyAPI: move bpy_types.py to a private module
Use an underscore prefix as this module should not be accessed directly.
2025-08-10 13:45:40 +10:00
Aaron Carlisle
b05c7e96b7 PyDocs: Update Sphinx / Theme 2025-08-09 19:06:34 -04:00
Aaron Carlisle
9188ce10e7 Cleanup: Format 2025-08-09 19:01:39 -04:00
Aaron Carlisle
86cd240c57 PyDocs: Add Macro example
- Adds a doc string for the Macro class
- Adds a basic example

Fixes #blender-manual/issues/51387
2025-08-09 18:43:14 -04:00
Campbell Barton
53cae68ee8 Cleanup: hyphenate the term data-blocks in strings/doc-strings 2025-08-08 08:47:13 +10:00
Campbell Barton
08cf60c66e PyDoc: generate a list of types that support custom properties
Methods for `bpy_struct` such as `get()` & `items()` noted that only
some types support custom-properties.

Since these docs were written many more types support custom properties.
Replace the inline list with a link to a generated list since there are
now too many to include inline.

Resolves #141450.
2025-08-07 14:37:38 +10:00
Campbell Barton
6d899a6726 Cleanup: naming & reduce declaration scope in the PyAPI for lib loading
Use terms source/destination instead of from/to.
2025-08-02 02:10:59 +00:00
Campbell Barton
3de916ca25 RNA: support for marking properties as deprecated
Deprecation meta-data support for RNA properties.

- Properties may have a deprecated note and version.
- Warnings shown when these are accessed from Python.
- A note is included in the generated documentation.

Support for marking functions as deprecated can be added in the future.

Ref !139487
2025-07-29 22:09:59 +10:00
Campbell Barton
895189dd19 PyDocs: always quote enum values in docs
While this was an intentional change in [0],
it seemed like an error to removing quoting (based on #141853).

Restore the quotes while keeping the string literals.

[0]: 0fb80f698a
2025-07-27 19:36:13 +10:00
Campbell Barton
f7fb02dcf9 Cleanup: use dash for bullet points in generated docs
Follow the user manual style guide.
2025-07-27 16:56:21 +10:00
Campbell Barton
d2a48cc12f Fix #141733: bmesh.ops API docs not showing function names
Formatting changes in [0] broke doc-string extraction.

[0]: a5eb65bac8
2025-07-11 14:44:09 +10:00
Campbell Barton
084ded1c07 Merge branch 'blender-v4.5-release' 2025-06-30 17:21:10 +10:00
Campbell Barton
0fb80f698a PyDoc: use string literals for enum values
Use literals since their literal values need to be used in code.
2025-06-30 17:12:04 +10:00
Campbell Barton
ae452ba698 Merge branch 'blender-v4.5-release' 2025-06-18 15:19:28 +10:00
Campbell Barton
4dba0113fd Fix #140396: bmesh.ops.dissolve_edges fails to dissolve vertices
Add an optional init function which operators

An alternative to [0] which missed Python API support (causing #140451).
While that could be resolved, tracking which "slots" have been set
would have to be flagged on every map/hash insertion which seems
excessive and is prone to bmesh operators failing if the flag is ever
missed. Prefer a simpler init function so dissolve edges doesn't have
a zero threshold.

Also support multi-line comment blocks in the generated API docs.

[0]: bd3a66a416
2025-06-18 04:42:42 +00:00
Brecht Van Lommel
789db82dfd Merge branch 'blender-v4.5-release' 2025-06-17 20:09:12 +02:00
Brecht Van Lommel
984ae99624 Fix: Python API doc build fails after previous pointcloud fix
This is now always in context, not just for experimental features.

Ref #140516
2025-06-17 20:06:51 +02:00
Bastien Montagne
e28a714245 Merge branch 'blender-v4.5-release' 2025-06-16 16:31:38 +02:00
Alberto-Luaces
e7191f8390 Python API: update animation example in quickstart docs for slots
Update the Animation example in the Python API: Quickstart documentation
to use slotted Actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/140334
2025-06-16 15:59:48 +02:00
Clément Foucault
decd88f67e Python: Remove deprecated BGL API
The API was in a deprecation state for many years now.
This API was not compatible with Metal nor Vulkan.

This also remove `Image.bindcode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/140370
2025-06-16 12:50:50 +02:00
John Kiril Swenson
a37c5e7d6c Fix: API doc build error after adding asset to context
Introduced by 3f9c943243.
2025-06-12 15:36:42 -05:00
Steve-Paws
d8e88572dd Fix: PyDocs: Syntax error in PointerProperty assignment
syntax error on `info_overview` PyAPI docs page for
property assignment

Pull Request: https://projects.blender.org/blender/blender/pulls/140090
2025-06-10 08:09:06 +02:00
Andrej730
6e70b755ce Fix: PyAPI Docs: Document more msgbus limitations
Added the following notes to documentation:
- `msgbus` interaction with undo system that particularly makes
 it not completely reliable, since users they easily skip it's effect.
- Details on when and how often message bus updates are triggered.

Pull Request: https://projects.blender.org/blender/blender/pulls/138557
2025-06-06 10:58:23 +02:00
Campbell Barton
db22e6cb8b PyDocs: quiet context member warning without experimental features 2025-06-06 10:48:25 +10:00
Bastien Montagne
aca960500e Fix PyAPI doc generation: add back a 'context' entry removed by mistake.
Reverts part of 6fbef14f4b.
2025-06-05 13:42:06 +02:00
Campbell Barton
6fbef14f4b PyDoc: quiet wanings/prints when building docs 2025-06-05 05:31:51 +00:00
Campbell Barton
2d86699209 PyDoc: improve BMesh operator docs
- Place doc-strings before arguments (avoid over long lines).
- Enable clang-format for BMesh operator definitions.
- Remove invalid comments (likely left in from copy-paste).
- Use double back-ticks for RST.
- Use full sentences.

No functional changes.
2025-06-05 15:31:36 +10:00
Campbell Barton
6a1fa176ef Cleanup: spelling in comments & duplicate terms (check_spelling.py)
Also minor clarification in doc-string.
2025-06-04 01:51:29 +00:00
Hans Goudey
77b14f2dcb Cleanup: Grammar: Fallback vs. fall back
The former is a noun or adjective, the latter is a verb.
2025-06-02 17:13:56 -04:00
Jesse Yurkovich
0fa8c0f62a Docs: Grammar and wording cleanups for FileHandler examples
Cleanup grammar and simplify the wording used in the FileHandler
Python API examples.

Pull Request: https://projects.blender.org/blender/blender/pulls/139366
2025-06-02 19:21:38 +02:00
Jacques Lucke
a010c1c8b8 Python Docs: remove example for using timers with separate threads
This appears to be unreliable.

Resolves #139602.
2025-05-30 09:15:40 +02:00
Jeroen Bakker
a06c7fddbb Fix #139565: Update GPU polyline examples
Update GPU line examples to use polyline shaders.

Pull Request: https://projects.blender.org/blender/blender/pulls/139587
2025-05-30 09:10:51 +02:00
Hans Goudey
91803e130f Cleanup: Grammar: Fix uses of "for e.g."
e.g. stands for "exempli gratia" in Latin which means "for example".
The best way to make sure it makes sense when writing is to just expand
it to "for example". In these cases where the text was "for e.g.", that
leaves us with "for for example" which makes no sense. This commit fixes
all 110 cases, mostly just just replacing the words with "for example",
but also restructuring the text a bit more in a few cases, mostly by
moving "e.g." to the beginning of a list in parentheses.

Pull Request: https://projects.blender.org/blender/blender/pulls/139596
2025-05-29 21:21:18 +02:00
Jeroen Bakker
c56a855b9f Fix #139565: PyGPU: Add builtin point shaders
This PR adds builtin shaders for drawing points. Using `FLAT_COLOR`,
`SMOOTH_COLOR`, `UNIFORM_COLOR` can lead to undesired behavior
on Metal and Vulkan backends. To ensure future compatibility this PR
adds `POINT_FLAT_COLOR` and `POINT_UNIFORM_COLOR`.

The point size can be set using `gpu.state.point_size_set`.

Pull Request: https://projects.blender.org/blender/blender/pulls/139583
2025-05-29 14:36:32 +02:00
Campbell Barton
72f24fcbab Cleanup: resolve pylint warnings 2025-05-23 14:03:20 +10:00
Sybren A. Stüvel
58d0b0e4b4 Py Docs: Gotcha chapter on threading
Update the Python API documentation about crashes with multi-threaded
code.

- Move the "threading gotcha" into a file of its own. That way it's
  immediately clear from looking at the Gotcha table of contents that
  threading is not supported.
- Simplify the example code, so that it doesn't access `bpy`.
  Apparently the problem is much wider than just multi-threaded access
  to `bpy`, and involves _all_ Python threads, regardless of what they
  do / access.
- Add some more explanation and move some text from the bottom to the
  top, so that the first-read part (when reading top to bottom) has
  most of the information.

Pull Request: https://projects.blender.org/blender/blender/pulls/139279
2025-05-22 16:23:23 +02:00
Clément Foucault
f55e97a83a Documentation: Python: Add notice about MSL compatibility
See #139185
2025-05-22 11:47:06 +02:00
Andrej730
670fc012e5 Fix: PyDocs: bpy.ops document behavior on error reports
When submitting #135854 I've assumed that `RuntimeError` is
connected particularly to `{'CANCELLED'}` return status. Turned
out error is raised regardless of what return status is and it's
only based on the presence of error reports during operator
execution. Submitting a clarification for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/138558
2025-05-08 06:58:34 +02:00
Campbell Barton
fd6ac498b0 Cleanup: spelling in comments, strings (make check_spelling_*)
Also replace some triple-quoted non-doc-string strings with commented
blocks in examples.
2025-05-06 00:18:39 +00:00
Jesse Yurkovich
0a3e4b0fd4 Fix #138365: Define and use 'use_filter_orderby_invert' for UIList example
The property in question was undefined since the first commit[1]

[1] b7e2cd5948

Pull Request: https://projects.blender.org/blender/blender/pulls/138373
2025-05-05 19:40:59 +02:00
Sergey Sharybin
9477fa4eb0 Migrate existing files to Git LFS
The files that were binary and were committed prior to the
Git LFS configuration in the main repository.

override restrictions

Pull Request: https://projects.blender.org/blender/blender/pulls/138452
2025-05-05 17:18:42 +02:00
Campbell Barton
4f04f6f8af Docs: add warning regarding operators that use the file selector 2025-04-25 16:24:24 +10:00
Andrej730
e09d59f9de Fix duplicated dirpath in fileselect_add docs (0314f9318c)
Ref: !137985
2025-04-25 16:04:18 +10:00
Campbell Barton
575600d540 Docs: correct use of FILE_PATH for directories
Also correct own error in recent doc-update regarding the expected
return value for fileselect_add.
2025-04-25 10:27:30 +10:00
Andrej730
e9c0029316 Docs: add the WindowManager.fileselect_add check_existing property
Ref: !137416
2025-04-25 10:20:08 +10:00