Merge branch 'blender-v3.3-release'
This commit is contained in:
commit
6c6e59e846
|
@ -6,6 +6,10 @@ It can be useful to perform an action when a property is changed and can be
|
|||
used to update other properties or synchronize with external data.
|
||||
|
||||
All properties define update functions except for CollectionProperty.
|
||||
|
||||
.. warning::
|
||||
Remember that these callbacks may be executed in threaded context.
|
||||
|
||||
"""
|
||||
|
||||
import bpy
|
||||
|
|
|
@ -6,6 +6,10 @@ Getter/setter functions can be used for boolean, int, float, string and enum pro
|
|||
If these callbacks are defined the property will not be stored in the ID properties
|
||||
automatically. Instead, the `get` and `set` functions will be called when the property
|
||||
is respectively read or written from the API.
|
||||
|
||||
.. warning::
|
||||
Remember that these callbacks may be executed in threaded context.
|
||||
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -234,6 +234,10 @@ const struct IDFilterEnumPropertyItem rna_enum_id_type_filter_items[] = {
|
|||
|
||||
# include "WM_api.h"
|
||||
|
||||
# ifdef WITH_PYTHON
|
||||
# include "BPY_extern.h"
|
||||
# endif
|
||||
|
||||
void rna_ID_override_library_property_operation_refname_get(PointerRNA *ptr, char *value)
|
||||
{
|
||||
IDOverrideLibraryPropertyOperation *opop = ptr->data;
|
||||
|
@ -695,7 +699,16 @@ static ID *rna_ID_override_create(ID *id, Main *bmain, bool remap_local_usages)
|
|||
BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, true);
|
||||
}
|
||||
|
||||
ID *local_id = BKE_lib_override_library_create_from_id(bmain, id, remap_local_usages);
|
||||
ID *local_id = NULL;
|
||||
# ifdef WITH_PYTHON
|
||||
BPy_BEGIN_ALLOW_THREADS;
|
||||
# endif
|
||||
|
||||
local_id = BKE_lib_override_library_create_from_id(bmain, id, remap_local_usages);
|
||||
|
||||
# ifdef WITH_PYTHON
|
||||
BPy_END_ALLOW_THREADS;
|
||||
# endif
|
||||
|
||||
if (remap_local_usages) {
|
||||
BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
|
||||
|
@ -717,9 +730,18 @@ static ID *rna_ID_override_hierarchy_create(
|
|||
BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
|
||||
|
||||
ID *id_root_override = NULL;
|
||||
|
||||
# ifdef WITH_PYTHON
|
||||
BPy_BEGIN_ALLOW_THREADS;
|
||||
# endif
|
||||
|
||||
BKE_lib_override_library_create(
|
||||
bmain, scene, view_layer, NULL, id, id, id_instance_hint, &id_root_override, false);
|
||||
|
||||
# ifdef WITH_PYTHON
|
||||
BPy_END_ALLOW_THREADS;
|
||||
# endif
|
||||
|
||||
WM_main_add_notifier(NC_ID | NA_ADDED, NULL);
|
||||
WM_main_add_notifier(NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue