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:
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r--source/blender/blenkernel/intern/mask.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index c8c4fea7ab1..04fec1e57c4 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -268,6 +268,8 @@ IDTypeInfo IDType_ID_MSK = {
.blend_read_data = mask_blend_read_data,
.blend_read_lib = mask_blend_read_lib,
.blend_read_expand = mask_blend_read_expand,
+
+ .blend_read_undo_preserve = NULL,
};
static struct {
@@ -523,8 +525,8 @@ void BKE_mask_point_direction_switch(MaskSplinePoint *point)
copy_v2_v2(point->bezt.vec[0], point->bezt.vec[2]);
copy_v2_v2(point->bezt.vec[2], co_tmp);
/* in this case the flags are unlikely to be different but swap anyway */
- SWAP(char, point->bezt.f1, point->bezt.f3);
- SWAP(char, point->bezt.h1, point->bezt.h2);
+ SWAP(uint8_t, point->bezt.f1, point->bezt.f3);
+ SWAP(uint8_t, point->bezt.h1, point->bezt.h2);
/* swap UW's */
if (tot_uw > 1) {
@@ -1053,34 +1055,6 @@ Mask *BKE_mask_new(Main *bmain, const char *name)
return mask;
}
-/* TODO(sergey): Use generic BKE_libblock_copy_nolib() instead. */
-/* TODO(bastien): Use new super cool & generic BKE_id_copy_ex() instead! */
-Mask *BKE_mask_copy_nolib(Mask *mask)
-{
- Mask *mask_new;
-
- mask_new = MEM_dupallocN(mask);
-
- /*take care here! - we may want to copy anim data */
- mask_new->adt = NULL;
-
- BLI_listbase_clear(&mask_new->masklayers);
-
- BKE_mask_layer_copy_list(&mask_new->masklayers, &mask->masklayers);
-
- /* enable fake user by default */
- id_fake_user_set(&mask->id);
-
- return mask_new;
-}
-
-Mask *BKE_mask_copy(Main *bmain, const Mask *mask)
-{
- Mask *mask_copy;
- BKE_id_copy(bmain, &mask->id, (ID **)&mask_copy);
- return mask_copy;
-}
-
void BKE_mask_point_free(MaskSplinePoint *point)
{
if (point->uw) {
@@ -1223,12 +1197,6 @@ void BKE_mask_layer_free_list(ListBase *masklayers)
}
}
-/** Free (or release) any data used by this mask (does not free the mask itself). */
-void BKE_mask_free(Mask *mask)
-{
- mask_free_data(&mask->id);
-}
-
void BKE_mask_coord_from_frame(float r_co[2], const float co[2], const float frame_size[2])
{
if (frame_size[0] == frame_size[1]) {