Merging r46725 through r46963 from trunk into soc-2011-tomato
[blender.git] / source / blender / makesrna / intern / rna_space.c
index 5f92071..da8a683 100644 (file)
@@ -891,6 +891,9 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), Scene *sce
                else
                        saction->action = NULL;
        }
+       
+       /* recalculate extents of channel list */
+       saction->flag |= SACTION_TEMP_NEEDCHANSYNC;
 }
 
 /* Space Graph Editor */
@@ -2267,6 +2270,12 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
                                 "(Action and Shape Key Editors only)");
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL);
        
+       prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWGCOLORS);
+       RNA_def_property_ui_text(prop, "Show Group Colors",
+                                "Draw groups and channels with colours matching their corresponding groups");
+       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL);
+       
        /* editing */
        prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
@@ -2372,6 +2381,12 @@ static void rna_def_space_graph(BlenderRNA *brna)
                                 "(disable for better performance)");
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
        
+       prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWGCOLORS);
+       RNA_def_property_ui_text(prop, "Show Group Colors",
+                                "Draw groups and channels with colours matching their corresponding groups");
+       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
+       
        /* editing */
        prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
@@ -2980,6 +2995,22 @@ static void rna_def_space_clip(BlenderRNA *brna)
                {0, NULL, 0, NULL, NULL}
        };
 
+       static EnumPropertyItem gpencil_source_items[] = {
+               {SC_GPENCIL_SRC_CLIP, "CLIP", 0, "Clip", "Show grease pencil datablock which belongs to movie clip"},
+               {SC_GPENCIL_SRC_TRACK, "TRACK", 0, "Track", "Show grease pencil datablock which belongs to active track"},
+               {0, NULL, 0, NULL, NULL}
+       };
+
+       static EnumPropertyItem pivot_items[] = {
+               {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
+                            "Pivot around bounding box center of selected object(s)"},
+               {V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION,
+                           "Individual Origins", "Pivot around each object's own origin"},
+               {V3D_CENTROID, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point",
+                              "Pivot around the median point of selected objects"},
+               {0, NULL, 0, NULL, NULL}
+       };
+
        srna = RNA_def_struct(brna, "SpaceClipEditor", "Space");
        RNA_def_struct_sdna(srna, "SpaceClip");
        RNA_def_struct_ui_text(srna, "Space Clip Editor", "Clip editor space data");
@@ -3166,6 +3197,20 @@ static void rna_def_space_clip(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
 
+       /* grease pencil source */
+       prop = RNA_def_property(srna, "grease_pencil_source", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "gpencil_src");
+       RNA_def_property_enum_items(prop, gpencil_source_items);
+       RNA_def_property_ui_text(prop, "Grease Pencil Source", "Where the grease pencil comes from");
+       RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
+
+       /* pivot point */
+       prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "around");
+       RNA_def_property_enum_items(prop, pivot_items);
+       RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
+       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL);
+
        /* ** dopesheet ** */
 
        /* dopesheet sort */