diff options
author | Bastien Montagne <bastien@blender.org> | 2020-10-08 12:36:11 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-10-08 12:40:55 +0300 |
commit | df5fe9718b18aa730662fb7b0fe43bd02b22d0bf (patch) | |
tree | 07eaa53b2339fb2909d9567227897f18e8bf51a9 /source/blender/compositor/operations | |
parent | fdb2240e4d06e9e552d6cd9ce4ec8d1ab2a6a448 (diff) |
Cleanup: Remove `BKE_mask_copy_nolib()` and `BKE_mask_free()`.
Generic ID management code can now do those local temp copy handling, so
no need for duplicated own code for that.
No behavioral changes expected here.
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_MaskOperation.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp index bdc954ac081..9fc7448ce42 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.cpp +++ b/source/blender/compositor/operations/COM_MaskOperation.cpp @@ -23,6 +23,7 @@ #include "BLI_listbase.h" #include "BLI_math.h" +#include "BKE_lib_id.h" #include "BKE_mask.h" MaskOperation::MaskOperation() : NodeOperation() @@ -59,9 +60,8 @@ void MaskOperation::initExecution() const float frame_step = (this->m_frame_shutter * 2.0f) / this->m_rasterMaskHandleTot; float frame_iter = frame; - Mask *mask_temp; - - mask_temp = BKE_mask_copy_nolib(this->m_mask); + Mask *mask_temp = (Mask *)BKE_id_copy_ex( + NULL, &this->m_mask->id, NULL, LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_NO_ANIMDATA); /* trick so we can get unkeyed edits to display */ { @@ -92,8 +92,7 @@ void MaskOperation::initExecution() frame_iter += frame_step; } - BKE_mask_free(mask_temp); - MEM_freeN(mask_temp); + BKE_id_free(NULL, &mask_temp->id); } } } |