svn merge ^/trunk/blender -r43918:43934
authorCampbell Barton <ideasman42@gmail.com>
Mon, 6 Feb 2012 22:21:41 +0000 (22:21 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 6 Feb 2012 22:21:41 +0000 (22:21 +0000)
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_node/node_edit.c

index 8a58687f61cc1ec7896d4883bb2daed772235247..5faa6a8776bb91c5e9cc12258a2510a928ecfd54 100644 (file)
@@ -4843,8 +4843,8 @@ static void lib_link_scene(FileData *fd, Main *main)
                        (void)marker;
 #endif
 
-                       if(sce->ed)
-                               seq_update_muting(sce->ed);
+                       seq_update_muting(sce->ed);
+                       seq_update_sound_bounds_all(sce);
                        
                        if(sce->nodetree) {
                                lib_link_ntree(fd, &sce->id, sce->nodetree);
index 216bb8d0e082071228b9ae27f6db17302d069a81..79d767be63cb04d989583355195e77110931475c 100644 (file)
@@ -439,22 +439,28 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
 void draw_markers_time(const bContext *C, int flag)
 {
        ListBase *markers= ED_context_get_markers(C);
-       View2D *v2d= UI_view2d_fromcontext(C);
+       View2D *v2d;
        TimeMarker *marker;
-       
+       Scene *scene;
+
        if (markers == NULL)
                return;
-       
+
+       scene = CTX_data_scene(C);
+       v2d = UI_view2d_fromcontext(C);
+
        /* unselected markers are drawn at the first time */
        for (marker= markers->first; marker; marker= marker->next) {
-               if ((marker->flag & SELECT) == 0) 
-                       draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
+               if ((marker->flag & SELECT) == 0) {
+                       draw_marker(v2d, marker, scene->r.cfra, flag);
+               }
        }
        
        /* selected markers are drawn later */
        for (marker= markers->first; marker; marker= marker->next) {
-               if (marker->flag & SELECT) 
-                       draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag);
+               if (marker->flag & SELECT) {
+                       draw_marker(v2d, marker, scene->r.cfra, flag);
+               }
        }
 }
 
@@ -550,7 +556,8 @@ static int ed_marker_add(bContext *C, wmOperator *UNUSED(op))
        if (markers == NULL)
                return OPERATOR_CANCELLED;
        
-       /* two markers can't be at the same place */
+       /* prefer not having 2 markers at the same place,
+        * though the user can move them to overlap once added */
        for (marker= markers->first; marker; marker= marker->next) {
                if (marker->frame == frame) 
                        return OPERATOR_CANCELLED;
index 40cf0213203fb3f7104019e92fe991afd03870b3..0521ecbf0d093cdc744622cfb956ab910b4e951d 100644 (file)
@@ -103,7 +103,8 @@ static int eyedropper_cancel(bContext *C, wmOperator *op)
 static void eyedropper_sample(bContext *C, Eyedropper *eye, int mx, int my)
 {
        if(RNA_property_type(eye->prop) == PROP_FLOAT) {
-               const int color_manage = CTX_data_scene(C)->r.color_mgt_flag & R_COLOR_MANAGEMENT;
+               Scene *scene = CTX_data_scene(C);
+               const int color_manage = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
                float col[4];
        
                RNA_property_float_get_array(&eye->ptr, eye->prop, col);
index 5abdafbfffc7fd39f4f467124f39aa20f469b76c..97da05e3f764941ba0c9c6cd386672885467c502 100644 (file)
@@ -593,6 +593,7 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
 {
        wmWindowManager *wm= CTX_wm_manager(C);
        wmWindow *window= CTX_wm_window(C);
+       Scene *scene = CTX_data_scene(C);
        SpaceClip *sc= (SpaceClip *)sa->spacedata.first;
        ARegion *ar_main= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
        ARegion *ar_preview= clip_has_preview_region(C, sa);
@@ -634,7 +635,7 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
                ED_area_tag_redraw(sa);
        }
 
-       BKE_movieclip_user_set_frame(&sc->user, CTX_data_scene(C)->r.cfra);
+       BKE_movieclip_user_set_frame(&sc->user, scene->r.cfra);
 }
 
 /********************* main region ********************/
index ea58b4aa7375933d392ddafdf01a82b75bbf29a5..e1fe3788d05eda2f5302fab71182b5d1683db671 100644 (file)
@@ -594,7 +594,7 @@ static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
        /* retrieve state */
        sima= CTX_wm_space_image(C);
        ar= CTX_wm_region(C);
-       scene= (Scene*)CTX_data_scene(C);
+       scene= CTX_data_scene(C);
        obedit= CTX_data_edit_object(C);
 
        ima= ED_space_image(sima);
@@ -1445,7 +1445,7 @@ static int image_new_exec(bContext *C, wmOperator *op)
 
        /* retrieve state */
        sima= CTX_wm_space_image(C);
-       scene= (Scene*)CTX_data_scene(C);
+       scene= CTX_data_scene(C);
        obedit= CTX_data_edit_object(C);
 
        RNA_string_get(op->ptr, "name", name);
index 3d97972c82951266f36c643907b73d4e78e9d4bf..4d74322fc56d379c0eafd1796dfffb71ff936359 100644 (file)
@@ -580,7 +580,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
        ima= ED_space_image(sima);
 
        if(sima->iuser.flag & IMA_ANIM_ALWAYS)
-               BKE_image_user_calc_frame(&sima->iuser, CTX_data_scene(C)->r.cfra, 0);
+               BKE_image_user_calc_frame(&sima->iuser, scene->r.cfra, 0);
        
        /* check if we have to set the image from the editmesh */
        if(ima && (ima->source==IMA_SRC_VIEWER || sima->pin));
index fe734e53651cf0c514766ba3cc2452c0535dcbde..906b5d01e326cbe3da346eb9f69c365b64447cd2 100644 (file)
@@ -1341,9 +1341,10 @@ typedef struct ImageSampleInfo {
 
 static void sample_draw(const bContext *C, ARegion *ar, void *arg_info)
 {
+       Scene *scene = CTX_data_scene(C);
        ImageSampleInfo *info= arg_info;
 
-       ED_image_draw_info(ar, (CTX_data_scene(C)->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels,
+       ED_image_draw_info(ar, (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels,
                           info->x, info->y, info->col, info->colf,
                           NULL, NULL /* zbuf - unused for nodes */
                           );