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:
authorEmanuel Claesson <emanuel.claesson@gmail.com>2013-11-25 07:55:26 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-25 15:21:45 +0400
commit3ca4387bc80b17d945d3ced2f55fd2ae6d962b1b (patch)
tree18e50d21863c51a95067176513d225fc0ee802a7 /source/blender/blenkernel
parent20769605593e6f850d30169175a01757f3e0fbb6 (diff)
UI: remove unnecessary confirmation popups
This makes a number of operators no longer ask for confirmation, rather it will show an info message after performing the operation. Ref T37422 for decision. In particular, these were changed: * Delete objects, bones, keyframes, masks, mask curves, motion tracks, markers. * Clear and delete keyframes in the 3D view. * Align bone to parents. * Separate bones from armature. * Group/ungroup metastrips in sequencer. * Copy/paste objects to/from buffer. Reviewed By: brecht, dingto Differential Revision: http://developer.blender.org/D35
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_gpencil.h4
-rw-r--r--source/blender/blenkernel/BKE_mask.h2
-rw-r--r--source/blender/blenkernel/intern/gpencil.c18
-rw-r--r--source/blender/blenkernel/intern/mask.c6
4 files changed, 21 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 3cb20ead39e..86c111653d1 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -38,7 +38,7 @@ struct bGPDframe;
/* ------------ Grease-Pencil API ------------------ */
-void free_gpencil_strokes(struct bGPDframe *gpf);
+bool free_gpencil_strokes(struct bGPDframe *gpf);
void free_gpencil_frames(struct bGPDlayer *gpl);
void free_gpencil_layers(struct ListBase *list);
void BKE_gpencil_free(struct bGPdata *gpd);
@@ -59,7 +59,7 @@ void gpencil_frame_delete_laststroke(struct bGPDlayer *gpl, struct bGPDframe *gp
struct bGPDframe *BKE_gpencil_layer_find_frame(struct bGPDlayer *gpl, int cframe);
struct bGPDframe *gpencil_layer_getframe(struct bGPDlayer *gpl, int cframe, short addnew);
-void gpencil_layer_delframe(struct bGPDlayer *gpl, struct bGPDframe *gpf);
+bool gpencil_layer_delframe(struct bGPDlayer *gpl, struct bGPDframe *gpf);
struct bGPDlayer *gpencil_layer_getactive(struct bGPdata *gpd);
void gpencil_layer_setactive(struct bGPdata *gpd, struct bGPDlayer *active);
void gpencil_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl);
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index d73249041e8..9e7fcb4b2a7 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -158,7 +158,7 @@ struct MaskLayerShape *BKE_mask_layer_shape_alloc(struct MaskLayer *masklay, con
void BKE_mask_layer_shape_free(struct MaskLayerShape *masklay_shape);
struct MaskLayerShape *BKE_mask_layer_shape_verify_frame(struct MaskLayer *masklay, const int frame);
struct MaskLayerShape *BKE_mask_layer_shape_duplicate(struct MaskLayerShape *masklay_shape);
-void BKE_mask_layer_shape_unlink(struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape);
+bool BKE_mask_layer_shape_unlink(struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape);
void BKE_mask_layer_shape_sort(struct MaskLayer *masklay);
bool BKE_mask_layer_shape_spline_from_index(struct MaskLayer *masklay, int index,
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 42e146301a2..689d0a2cd47 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -58,12 +58,14 @@
/* --------- Memory Management ------------ */
/* Free strokes belonging to a gp-frame */
-void free_gpencil_strokes(bGPDframe *gpf)
+bool free_gpencil_strokes(bGPDframe *gpf)
{
bGPDstroke *gps, *gpsn;
+ bool modified = gpf->strokes.first != NULL;
/* error checking */
- if (gpf == NULL) return;
+ if (gpf == NULL)
+ return false;
/* free strokes */
for (gps = gpf->strokes.first; gps; gps = gpsn) {
@@ -73,6 +75,8 @@ void free_gpencil_strokes(bGPDframe *gpf)
if (gps->points) MEM_freeN(gps->points);
BLI_freelinkN(&gpf->strokes, gps);
}
+
+ return modified;
}
/* Free all of a gp-layer's frames */
@@ -467,16 +471,20 @@ bGPDframe *gpencil_layer_getframe(bGPDlayer *gpl, int cframe, short addnew)
}
/* delete the given frame from a layer */
-void gpencil_layer_delframe(bGPDlayer *gpl, bGPDframe *gpf)
+bool gpencil_layer_delframe(bGPDlayer *gpl, bGPDframe *gpf)
{
+ bool modified = false;
+
/* error checking */
if (ELEM(NULL, gpl, gpf))
- return;
+ return false;
/* free the frame and its data */
- free_gpencil_strokes(gpf);
+ modified = free_gpencil_strokes(gpf);
BLI_freelinkN(&gpl->frames, gpf);
gpl->actframe = NULL;
+
+ return modified;
}
/* get the active gp-layer for editing */
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index b20b4294f84..214c49bcc83 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -1813,11 +1813,15 @@ MaskLayerShape *BKE_mask_layer_shape_duplicate(MaskLayerShape *masklay_shape)
return masklay_shape_copy;
}
-void BKE_mask_layer_shape_unlink(MaskLayer *masklay, MaskLayerShape *masklay_shape)
+bool BKE_mask_layer_shape_unlink(MaskLayer *masklay, MaskLayerShape *masklay_shape)
{
+ bool modified = masklay_shape != NULL;
+
BLI_remlink(&masklay->splines_shapes, masklay_shape);
BKE_mask_layer_shape_free(masklay_shape);
+
+ return modified;
}
static int mask_layer_shape_sort_cb(void *masklay_shape_a_ptr, void *masklay_shape_b_ptr)