diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-10-19 17:17:04 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-10-19 17:17:04 +0300 |
commit | 1c5722ba071ac08042f2e3150495b865a0ffa95a (patch) | |
tree | 0e42ee74d5a9dbc3343a1da895dd406f10e4812a /source/blender/editors/space_outliner/outliner_draw.c | |
parent | 0a6cf3ed0c64a0e4e58ecd40a491d0e6c93532f2 (diff) |
Fix T91197: marking assets from Python may crash
When using `asset_mark` function from a Python script and afterwards
updating the preview image, a crash might happen. The preview image is
generated by the `asset_mark` function. This may happen on a background
thread, introducing potential synchronization issues.
This patch fixes this by separating the preview generation
`ID.asset_generate_preview` from the mark as asset `ID.asset_mark`.
Note: this separation of "mark as asset" and "generate preview" also
applies to the `ED_asset_mark_id()` C function; if it is desired to have
previews rendered after marking as asset, a call to
`ED_asset_generate_preview()` is now also required.
Reviewed By: sybren
Maniphest Tasks: T91197
Differential Revision: https://developer.blender.org/D12922
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
0 files changed, 0 insertions, 0 deletions