Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2022-08-12 17:21:11 +0300
committerBastien Montagne <bastien@blender.org>2022-08-12 17:23:12 +0300
commitfd57f520acb119036edc61bf991e0b34c7026fe5 (patch)
tree65728be2d5979f4a22a6dc44c5cd5e888227607f /doc/python_api/examples/bpy.props.py
parent62eb21e3ce87451a86b8ad78b6980cd8c9013f89 (diff)
Py API doc: Add warning that py-defined property accessor callbacks may be called in threaded context.
At least Depsgraph evaluation and liboverride diffing do process IDs in parallel, so python code in py-defined properties should not access any data outside of their owner ID. Ref. T100203.
Diffstat (limited to 'doc/python_api/examples/bpy.props.py')
-rw-r--r--doc/python_api/examples/bpy.props.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/python_api/examples/bpy.props.py b/doc/python_api/examples/bpy.props.py
index d19b57b13a5..a2a51addc65 100644
--- a/doc/python_api/examples/bpy.props.py
+++ b/doc/python_api/examples/bpy.props.py
@@ -7,6 +7,15 @@ Custom properties can be added to any subclass of an :class:`ID`,
These properties can be animated, accessed by the user interface and python
like Blender's existing properties.
+
+.. warning::
+
+ Access to these properties might happen in threaded context, on a per-data-block level.
+ This has to be carefully considered when using accessors or update callbacks.
+
+ Typically, these callbacks should not affect any other data that the one owned by their data-block.
+ When accessing external non-Blender data, thread safety mechanisms should be considered.
+
"""
import bpy