[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47631] trunk/blender/source/blender/ editors: code cleanup: name mask and grease pencil dope sheet editor functions more consistantly
Campbell Barton
ideasman42 at gmail.com
Fri Jun 8 23:48:18 CEST 2012
Revision: 47631
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47631
Author: campbellbarton
Date: 2012-06-08 21:48:04 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
code cleanup: name mask and grease pencil dope sheet editor functions more consistantly
Modified Paths:
--------------
trunk/blender/source/blender/editors/gpencil/editaction_gpencil.c
trunk/blender/source/blender/editors/include/ED_gpencil.h
trunk/blender/source/blender/editors/include/ED_mask.h
trunk/blender/source/blender/editors/mask/mask_editaction.c
trunk/blender/source/blender/editors/space_action/action_edit.c
trunk/blender/source/blender/editors/space_action/action_select.c
Modified: trunk/blender/source/blender/editors/gpencil/editaction_gpencil.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/editaction_gpencil.c 2012-06-08 21:04:48 UTC (rev 47630)
+++ trunk/blender/source/blender/editors/gpencil/editaction_gpencil.c 2012-06-08 21:48:04 UTC (rev 47631)
@@ -62,7 +62,7 @@
/* Generics - Loopers */
/* Loops over the gp-frames for a gp-layer, and applies the given callback */
-short gplayer_frames_looper(bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
+short ED_gplayer_frames_looper(bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
{
bGPDframe *gpf;
@@ -85,7 +85,7 @@
/* Data Conversion Tools */
/* make a listing all the gp-frames in a layer as cfraelems */
-void gplayer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, short onlysel)
+void ED_gplayer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, short onlysel)
{
bGPDframe *gpf;
CfraElem *ce;
@@ -111,7 +111,7 @@
/* Selection Tools */
/* check if one of the frames in this layer is selected */
-short is_gplayer_frame_selected(bGPDlayer *gpl)
+short ED_gplayer_frame_select_check(bGPDlayer *gpl)
{
bGPDframe *gpf;
@@ -149,7 +149,7 @@
}
/* set all/none/invert select (like above, but with SELECT_* modes) */
-void select_gpencil_frames(bGPDlayer *gpl, short select_mode)
+void ED_gpencil_select_frames(bGPDlayer *gpl, short select_mode)
{
bGPDframe *gpf;
@@ -164,18 +164,18 @@
}
/* set all/none/invert select */
-void set_gplayer_frame_selection(bGPDlayer *gpl, short mode)
+void ED_gplayer_frame_select_set(bGPDlayer *gpl, short mode)
{
/* error checking */
if (gpl == NULL)
return;
/* now call the standard function */
- select_gpencil_frames(gpl, mode);
+ ED_gpencil_select_frames(gpl, mode);
}
/* select the frame in this layer that occurs on this frame (there should only be one at most) */
-void select_gpencil_frame(bGPDlayer *gpl, int selx, short select_mode)
+void ED_gpencil_select_frame(bGPDlayer *gpl, int selx, short select_mode)
{
bGPDframe *gpf;
@@ -193,7 +193,7 @@
}
/* select the frames in this layer that occur within the bounds specified */
-void borderselect_gplayer_frames(bGPDlayer *gpl, float min, float max, short select_mode)
+void ED_gplayer_frames_select_border(bGPDlayer *gpl, float min, float max, short select_mode)
{
bGPDframe *gpf;
@@ -211,7 +211,7 @@
/* Frame Editing Tools */
/* Delete selected frames */
-void delete_gplayer_frames(bGPDlayer *gpl)
+void ED_gplayer_frames_delete(bGPDlayer *gpl)
{
bGPDframe *gpf, *gpfn;
@@ -229,7 +229,7 @@
}
/* Duplicate selected frames from given gp-layer */
-void duplicate_gplayer_frames(bGPDlayer *gpl)
+void ED_gplayer_frames_duplicate(bGPDlayer *gpl)
{
bGPDframe *gpf, *gpfn;
@@ -502,19 +502,19 @@
{
switch (mode) {
case 1: /* snap to nearest frame */
- gplayer_frames_looper(gpl, scene, snap_gpf_nearest);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_nearest);
break;
case 2: /* snap to current frame */
- gplayer_frames_looper(gpl, scene, snap_gpf_cframe);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_cframe);
break;
case 3: /* snap to nearest marker */
- gplayer_frames_looper(gpl, scene, snap_gpf_nearmarker);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_nearmarker);
break;
case 4: /* snap to nearest second */
- gplayer_frames_looper(gpl, scene, snap_gpf_nearestsec);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_nearestsec);
break;
default: /* just in case */
- gplayer_frames_looper(gpl, scene, snap_gpf_nearest);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_nearest);
break;
}
}
@@ -604,21 +604,21 @@
{
switch (mode) {
case 1: /* mirror over current frame */
- gplayer_frames_looper(gpl, scene, mirror_gpf_cframe);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_cframe);
break;
case 2: /* mirror over frame 0 */
- gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);
break;
case 3: /* mirror over value 0 */
- gplayer_frames_looper(gpl, scene, mirror_gpf_xaxis);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_xaxis);
break;
case 4: /* mirror over marker */
mirror_gpf_marker(NULL, NULL);
- gplayer_frames_looper(gpl, scene, mirror_gpf_marker);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_marker);
mirror_gpf_marker(NULL, NULL);
break;
default: /* just in case */
- gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);
break;
}
}
Modified: trunk/blender/source/blender/editors/include/ED_gpencil.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_gpencil.h 2012-06-08 21:04:48 UTC (rev 47630)
+++ trunk/blender/source/blender/editors/include/ED_gpencil.h 2012-06-08 21:48:04 UTC (rev 47631)
@@ -83,25 +83,27 @@
void gpencil_panel_standard(const struct bContext *C, struct Panel *pa);
/* ----------- Grease-Pencil AnimEdit API ------------------ */
-short gplayer_frames_looper(struct bGPDlayer *gpl, struct Scene *scene,
- short (*gpf_cb)(struct bGPDframe *, struct Scene *));
-void gplayer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, short onlysel);
+short ED_gplayer_frames_looper(struct bGPDlayer *gpl, struct Scene *scene,
+ short (*gpf_cb)(struct bGPDframe *, struct Scene *));
+void ED_gplayer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, short onlysel);
-short is_gplayer_frame_selected(struct bGPDlayer *gpl);
-void set_gplayer_frame_selection(struct bGPDlayer *gpl, short mode);
-void select_gpencil_frames(struct bGPDlayer *gpl, short select_mode);
-void select_gpencil_frame(struct bGPDlayer *gpl, int selx, short select_mode);
-void borderselect_gplayer_frames(struct bGPDlayer *gpl, float min, float max, short select_mode);
+short ED_gplayer_frame_select_check(struct bGPDlayer *gpl);
+void ED_gplayer_frame_select_set(struct bGPDlayer *gpl, short mode);
+void ED_gplayer_frames_select_border(struct bGPDlayer *gpl, float min, float max, short select_mode);
+void ED_gpencil_select_frames(struct bGPDlayer *gpl, short select_mode);
+void ED_gpencil_select_frame(struct bGPDlayer *gpl, int selx, short select_mode);
-void delete_gplayer_frames(struct bGPDlayer *gpl);
-void duplicate_gplayer_frames(struct bGPDlayer *gpl);
+void ED_gplayer_frames_delete(struct bGPDlayer *gpl);
+void ED_gplayer_frames_duplicate(struct bGPDlayer *gpl);
+#if 0
void free_gpcopybuf(void);
void copy_gpdata(void);
void paste_gpdata(void);
void snap_gplayer_frames(struct bGPDlayer *gpl, short mode);
void mirror_gplayer_frames(struct bGPDlayer *gpl, short mode);
+#endif
/* ------------ Grease-Pencil Undo System ------------------ */
int ED_gpencil_session_active(void);
Modified: trunk/blender/source/blender/editors/include/ED_mask.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_mask.h 2012-06-08 21:04:48 UTC (rev 47630)
+++ trunk/blender/source/blender/editors/include/ED_mask.h 2012-06-08 21:48:04 UTC (rev 47631)
@@ -49,24 +49,26 @@
int ED_mask_layer_shape_auto_key_select(struct Mask *mask, const int frame);
/* ----------- Mask AnimEdit API ------------------ */
-short masklayer_frames_looper(struct MaskLayer *masklay, struct Scene *scene,
- short (*masklay_shape_cb)(struct MaskLayerShape *, struct Scene *));
-void masklayer_make_cfra_list(struct MaskLayer *masklay, ListBase *elems, short onlysel);
+short ED_masklayer_frames_looper(struct MaskLayer *masklay, struct Scene *scene,
+ short (*masklay_shape_cb)(struct MaskLayerShape *, struct Scene *));
+void ED_masklayer_make_cfra_list(struct MaskLayer *masklay, ListBase *elems, short onlysel);
-short is_masklayer_frame_selected(struct MaskLayer *masklay);
-void set_masklayer_frame_selection(struct MaskLayer *masklay, short mode);
-void select_mask_frames(struct MaskLayer *masklay, short select_mode);
-void select_mask_frame(struct MaskLayer *masklay, int selx, short select_mode);
-void borderselect_masklayer_frames(struct MaskLayer *masklay, float min, float max, short select_mode);
+short ED_masklayer_frame_select_check(struct MaskLayer *masklay);
+void ED_masklayer_frame_select_set(struct MaskLayer *masklay, short mode);
+void ED_masklayer_frames_select_border(struct MaskLayer *masklay, float min, float max, short select_mode);
+void ED_mask_select_frames(struct MaskLayer *masklay, short select_mode);
+void ED_mask_select_frame(struct MaskLayer *masklay, int selx, short select_mode);
-void delete_masklayer_frames(struct MaskLayer *masklay);
-void duplicate_masklayer_frames(struct MaskLayer *masklay);
+void ED_masklayer_frames_delete(struct MaskLayer *masklay);
+void ED_masklayer_frames_duplicate(struct MaskLayer *masklay);
-//void free_gpcopybuf(void);
-//void copy_gpdata(void);
-//void paste_gpdata(void);
+#if 0
+void free_gpcopybuf(void);
+void copy_gpdata(void);
+void paste_gpdata(void);
-void snap_masklayer_frames(struct MaskLayer *masklay, short mode);
-void mirror_masklayer_frames(struct MaskLayer *masklay, short mode);
+ void snap_masklayer_frames(struct MaskLayer *masklay, short mode);
+ void mirror_masklayer_frames(struct MaskLayer *masklay, short mode);
+#endif
#endif /* __ED_MASK_H__ */
Modified: trunk/blender/source/blender/editors/mask/mask_editaction.c
===================================================================
--- trunk/blender/source/blender/editors/mask/mask_editaction.c 2012-06-08 21:04:48 UTC (rev 47630)
+++ trunk/blender/source/blender/editors/mask/mask_editaction.c 2012-06-08 21:48:04 UTC (rev 47631)
@@ -59,7 +59,7 @@
/* Generics - Loopers */
/* Loops over the gp-frames for a gp-layer, and applies the given callback */
-short masklayer_frames_looper(MaskLayer *masklay, Scene *scene, short (*masklay_shape_cb)(MaskLayerShape *, Scene *))
+short ED_masklayer_frames_looper(MaskLayer *masklay, Scene *scene, short (*masklay_shape_cb)(MaskLayerShape *, Scene *))
{
MaskLayerShape *masklay_shape;
@@ -82,7 +82,7 @@
/* Data Conversion Tools */
/* make a listing all the gp-frames in a layer as cfraelems */
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list