add listener in action space for mask changes so dopesheet redraws + other minor...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 8 Jun 2012 14:46:17 +0000 (14:46 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 8 Jun 2012 14:46:17 +0000 (14:46 +0000)
source/blender/editors/include/ED_gpencil.h
source/blender/editors/space_action/space_action.c
source/blender/makesrna/intern/rna_mask.c

index ad686588f179dd51eac1a3933d3f4128eb25ff8f..80f7fb9d1ed0cc2080f6c595b423d0d85ccceca9 100644 (file)
@@ -94,7 +94,7 @@ 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);
 
 void delete_gplayer_frames(struct bGPDlayer *gpl);
-void duplicate_gplayer_frames(struct bGPDlayer *gpd);
+void duplicate_gplayer_frames(struct bGPDlayer *gpl);
 
 void free_gpcopybuf(void);
 void copy_gpdata(void);
index ae4020aaaba1f0f1ee01e8f8d16bbe992bf39275..c8660179945fd6dada876ca87af3382fb64df5e0 100644 (file)
@@ -361,7 +361,7 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn)
                case NC_SCREEN:
                        if (wmn->data == ND_GPENCIL) {
                                /* only handle this event in GPencil mode for performance considerations */
-                               if (saction->mode == SACTCONT_GPENCIL)  
+                               if (saction->mode == SACTCONT_GPENCIL)
                                        ED_area_tag_redraw(sa);
                        }
                        break;
@@ -405,6 +405,18 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn)
                                        break;
                        }
                        break;
+               case NC_MASK:
+                       if (saction->mode == SACTCONT_MASK) {
+                               switch (wmn->data) {
+                                       case ND_DATA:
+                                               ED_area_tag_refresh(sa);
+                                               break;
+                                       default: /* just redrawing the view will do */
+                                               ED_area_tag_redraw(sa);
+                                               break;
+                               }
+                       }
+                       break;
                case NC_NODE:
                        if (wmn->action == NA_SELECTED) {
                                /* selection changed, so force refresh to flush (needs flag set to do syncing) */
index 42c893eca16d08a6d37e555ddac4e9eb1b99c73a..64f1663a52471643faeb0247af6af8df9e7c9513 100644 (file)
@@ -582,6 +582,12 @@ static void rna_def_mask_layer(BlenderRNA *brna)
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
        RNA_def_property_update(prop, NC_MASK | NA_EDITED, NULL);
 
+       /* select (for dopesheet)*/
+       prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", MASK_LAYERFLAG_SELECT);
+       RNA_def_property_ui_text(prop, "Select", "Layer is selected for editing in the DopeSheet");
+//     RNA_def_property_update(prop, NC_SCREEN | ND_MASK, NULL);
+
        /* render settings */
        prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "alpha");