Merged changes in the trunk up to revision 26439.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 30 Jan 2010 17:44:57 +0000 (17:44 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 30 Jan 2010 17:44:57 +0000 (17:44 +0000)
1  2 
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/python/intern/bpy_interface.c

index abcde145512e9de3bca6fe57e88a82d883675fca,209535b1350d67052ef126637bb571ed98efc378..4394893ff69b11c6fa551770a1fbad70dedb8ba8
@@@ -2886,9 -2886,6 +2886,9 @@@ static int screen_render_exec(bContext 
        }
        RE_test_break_cb(re, NULL, (int (*)(void *)) blender_test_break);
        
 +      /* inform Freestyle of the context */
 +      FRS_set_context(C);
 +
        if(RNA_boolean_get(op->ptr, "animation"))
                RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->r.frame_step, op->reports);
        else
@@@ -3175,9 -3172,6 +3175,9 @@@ static int screen_render_invoke(bContex
        /* handle UI stuff */
        WM_cursor_wait(1);
        
 +      /* inform Freestyle of the context */
 +      FRS_set_context(C);
 +
        /* flush multires changes (for sculpt) */
        multires_force_update(CTX_data_active_object(C));
        
@@@ -3403,7 -3397,7 +3403,7 @@@ static int screen_opengl_render_init(bC
        
        rr= RE_AcquireResultWrite(oglrender->re);
        if(rr->rectf==NULL)
-               rr->rectf= MEM_mallocN(sizeof(float)*4*sizex*sizex, "32 bits rects");
+               rr->rectf= MEM_mallocN(sizeof(float)*4*sizex*sizey, "32 bits rects");
        RE_ReleaseResult(oglrender->re);
        
        return 1;
index 591322644aac0e826a56f71b357343fcccc803ef,ad061532045f696c71d03cef7a3a40d45d852053..6685386c36c3d0da1d60122e3f544f0733fe5422
@@@ -162,6 -162,8 +162,8 @@@ static void view3d_boxview_clip(ScrAre
                        if(rv3d->viewlock & RV3D_BOXCLIP) {
                                rv3d->rflag |= RV3D_CLIPPING;
                                memcpy(rv3d->clip, clip, sizeof(clip));
+                               if(rv3d->clipbb) MEM_freeN(rv3d->clipbb);
+                               rv3d->clipbb= MEM_dupallocN(bb);
                        }
                }
        }
@@@ -227,6 -229,34 +229,34 @@@ void view3d_boxview_copy(ScrArea *sa, A
        view3d_boxview_clip(sa);
  }
  
+ void ED_view3d_quadview_update(ScrArea *sa, ARegion *ar)
+ {
+       RegionView3D *rv3d= ar->regiondata;
+       short viewlock;
+       /* this function copies flags from the first of the 3 other quadview
+          regions to the 2 other, so it assumes this is the region whose
+          properties are always being edited, weak */
+       viewlock= rv3d->viewlock;
+       if((viewlock & RV3D_LOCKED)==0)
+               viewlock= 0;
+       else if((viewlock & RV3D_BOXVIEW)==0)
+               viewlock &= ~RV3D_BOXCLIP;
+       for(; ar; ar= ar->prev) {
+               if(ar->alignment==RGN_ALIGN_QSPLIT) {
+                       rv3d= ar->regiondata;
+                       rv3d->viewlock= viewlock;
+               }
+       }
+       if(rv3d->viewlock & RV3D_BOXVIEW)
+               view3d_boxview_copy(sa, sa->regionbase.last);
+       ED_area_tag_redraw(sa);
+ }
  /* ************************** init for view ops **********************************/
  
  typedef struct ViewOpsData {
@@@ -742,7 -772,7 +772,7 @@@ void VIEW3D_OT_rotate(wmOperatorType *o
        /* api callbacks */
        ot->invoke= viewrotate_invoke;
        ot->modal= viewrotate_modal;
 -      ot->poll= ED_operator_view3d_rotate;
 +      ot->poll= ED_operator_view3d_active;
  
        /* flags */
        ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
@@@ -1981,7 -2011,7 +2011,7 @@@ void VIEW3D_OT_view_orbit(wmOperatorTyp
  
        /* api callbacks */
        ot->exec= vieworbit_exec;
 -      ot->poll= ED_operator_view3d_rotate;
 +      ot->poll= ED_operator_view3d_active;
  
        /* flags */
        ot->flag= 0;
index af062e66cb7e1b7c92f23cca678ce1c7a69e0c87,e5204c0b8b5b75f9278d7146dceb2093a73cf1b9..142b5f0788a7e1d41a55d1f0ae3e2f848536bdb6
@@@ -69,8 -69,6 +69,8 @@@
  
  #include "BPY_extern.h"
  
 +#include "BPy_Freestyle.h"
 +
  #include "../generic/bpy_internal_import.h" // our own imports
  /* external util modules */
  
@@@ -194,7 -192,6 +194,7 @@@ static void bpy_init_modules( void 
        Mathutils_Init();
        BGL_Init();
        IDProp_Init_Types();
 +      Freestyle_Init();
  
  
        mod = PyModule_New("_bpy");
                sprintf(tmpstr, "%d.%02d (sub %d)", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION);
                PyModule_AddStringConstant(mod, "_VERSION_STR",  tmpstr);
                PyModule_AddStringConstant(mod, "_BINPATH",  bprogname);
+               PyModule_AddIntConstant(mod, "_DEBUG",  G.f & G_DEBUG ? 1:0);
        }
  
        /* add our own modules dir, this is a python package */