2.5 - Assorted cleanups
authorJoshua Leung <aligorith@gmail.com>
Thu, 13 Aug 2009 07:28:51 +0000 (07:28 +0000)
committerJoshua Leung <aligorith@gmail.com>
Thu, 13 Aug 2009 07:28:51 +0000 (07:28 +0000)
* Silencing some compiler warnings
* Set paths for Scene rendering settings so that they can be animated (or at least won't produce error warnings)

source/blender/blenkernel/BKE_pointcache.h
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/space_outliner/outliner.c
source/blender/makesrna/intern/rna_scene.c

index 011cde9f297e3e31bf27ded9c14f33dfaee62f4b..b83afb6b28fb7ea651f4b16d5354243709b37348 100644 (file)
@@ -71,6 +71,7 @@ struct Object;
 struct Scene;
 struct SoftBody;
 struct ParticleSystem;
+struct ParticleKey;
 struct ClothModifierData;
 struct PointCache;
 struct ListBase;
index d74c9fbf48becc81925a16e45b87de64e4316cf3..4f463d3daedd191d17acbd018bf3e8ea0b93edc7 100644 (file)
@@ -1193,47 +1193,19 @@ static void borderselect_anim_channels (bAnimContext *ac, rcti *rect, short sele
                
                /* if channel is within border-select region, alter it */
                if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) {
-                       /* only the following types can be selected */
+                       /* set selection flags only */
+                       ANIM_channel_setting_set(ac, ale, ACHANNEL_SETTING_SELECT, selectmode);
+                       
+                       /* type specific actions */
                        switch (ale->type) {
-                               case ANIMTYPE_OBJECT: /* object */
-                               {
-                                       Base *base= (Base *)ale->data;
-                                       Object *ob= base->object;
-                                       
-                                       ACHANNEL_SET_FLAG(base, selectmode, SELECT);
-                                       ACHANNEL_SET_FLAG(ob, selectmode, SELECT);
-                               }
-                                       break;
-                               case ANIMTYPE_GROUP: /* action group */
+                               case ANIMTYPE_GROUP:
                                {
                                        bActionGroup *agrp= (bActionGroup *)ale->data;
                                        
-                                       ACHANNEL_SET_FLAG(agrp, selectmode, AGRP_SELECTED);
+                                       /* always clear active flag after doing this */
                                        agrp->flag &= ~AGRP_ACTIVE;
                                }
                                        break;
-                               case ANIMTYPE_FCURVE: /* F-Curve channel */
-                               {
-                                       FCurve *fcu = (FCurve *)ale->data;
-                                       
-                                       ACHANNEL_SET_FLAG(fcu, selectmode, FCURVE_SELECTED);
-                               }
-                                       break;
-                               case ANIMTYPE_GPLAYER: /* grease-pencil layer */
-                               {
-                                       bGPDlayer *gpl = (bGPDlayer *)ale->data;
-                                       
-                                       ACHANNEL_SET_FLAG(gpl, selectmode, GP_LAYER_SELECT);
-                               }
-                                       break;
-                                       
-                               case ANIMTYPE_NLATRACK: /* nla-track */
-                               {
-                                       NlaTrack *nlt= (NlaTrack *)ale->data;
-                                       
-                                       ACHANNEL_SET_FLAG(nlt, selectmode, NLATRACK_SELECTED);
-                               }
-                                       break;
                        }
                }
                
index 4f5d3f8f73695668540518c8e3c67a11aa03ab10..e4fa095e552a4d8a2fd9414fd16a8d516ed56e1b 100644 (file)
@@ -3663,7 +3663,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
                                }
                                else if(RNA_property_type(prop) == PROP_COLLECTION) {
                                        char buf[128], *name;
-
+                                       
                                        temnext= (TreeElement*)(ld->next->data);
                                        tsenext= TREESTORE(temnext);
                                        
index 97320c0f9d4fe2f408a88305b1de31b526c340d0..f74687a3096f7f3b7764cd48cb3c15ae94c332ec 100644 (file)
@@ -174,6 +174,11 @@ static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
        //ED_update_for_newframe(C);
 }
 
+static char *rna_SceneRenderData_path(PointerRNA *ptr)
+{
+       return BLI_sprintfN("render_data");
+}
+
 static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
 {
        RenderData *rd= (RenderData*)ptr->data;
@@ -1081,6 +1086,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
        srna= RNA_def_struct(brna, "SceneRenderData", NULL);
        RNA_def_struct_sdna(srna, "RenderData");
        RNA_def_struct_nested(brna, srna, "Scene");
+       RNA_def_struct_path_func(srna, "rna_SceneRenderData_path");
        RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
        
        prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);