diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-04-29 17:41:02 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-04-29 17:49:52 +0300 |
commit | 5d84d9b0d6ad114109d60cf3d0ddcd9bb1a5de13 (patch) | |
tree | ef4456b94bada69a976a4b0add3c2cd7d4512dc0 /source/blender/editors/render/render_preview.cc | |
parent | 2f49908a5e57a3476e5abf19267988775072c76d (diff) |
Cleanup: Simplify job custom data query API
There were two calls to access job's custom data. One of them
ignored job type, the other one ignored job owner.
Now there is a single function to access job's custom data.
If the job type or owner is not relevant NULL or WM_JOB_TYPE_ANY
can be passes explicitly.
Differential Revision: https://developer.blender.org/D14803
Diffstat (limited to 'source/blender/editors/render/render_preview.cc')
-rw-r--r-- | source/blender/editors/render/render_preview.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc index 78e786a2130..a56f513e98f 100644 --- a/source/blender/editors/render/render_preview.cc +++ b/source/blender/editors/render/render_preview.cc @@ -713,7 +713,8 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r ID *parent = (ID *)parentp; MTex *slot = (MTex *)slotp; SpaceProperties *sbuts = CTX_wm_space_properties(C); - ShaderPreview *sp = static_cast<ShaderPreview *>(WM_jobs_customdata(wm, area)); + ShaderPreview *sp = static_cast<ShaderPreview *>( + WM_jobs_customdata_from_type(wm, area, WM_JOB_TYPE_LOAD_PREVIEW)); rcti newrect; bool ok; int newx = BLI_rcti_size_x(rect); |