[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17786] branches/projection-paint/source/ blender/src/buttons_editing.c: clone button was removed by mistake last commit, also fixed warnings.
Revision: 17786 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17786 Author: campbellbarton Date: 2008-12-11 05:15:33 +0100 (Thu, 11 Dec 2008) Log Message: --- clone button was removed by mistake last commit, also fixed warnings. Modified Paths: -- branches/projection-paint/source/blender/src/buttons_editing.c Modified: branches/projection-paint/source/blender/src/buttons_editing.c === --- branches/projection-paint/source/blender/src/buttons_editing.c 2008-12-11 03:50:50 UTC (rev 17785) +++ branches/projection-paint/source/blender/src/buttons_editing.c 2008-12-11 04:15:33 UTC (rev 17786) @@ -6338,20 +6338,23 @@ ToolSettings *settings= G.scene->toolsettings; Brush *brush= settings->imapaint.brush; ID *id; - int yco, xco, butw; + int yco, xco, butw, but_idx; short *menupoin = sima ? &(G.sima->menunr) : &(G.buts->menunr); + short do_project = settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE ? 0:1; yco= 160; butw = sima ? 80 : 106; uiBlockBeginAlign(block); - uiDefButS(block, ROW, evt_change, "Draw", 0, yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_DRAW, 0, 0, "Draw brush"); - uiDefButS(block, ROW, evt_change, "Soften", butw, yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_SOFTEN, 0, 0, "Soften brush"); - uiDefButS(block, ROW, evt_change, "Smear", butw*2, yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_SMEAR, 0, 0, "Smear brush"); - if (sima) - uiDefButS(block, ROW, evt_change, "Clone", butw*3, yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_CLONE, 0, 0, "Clone brush, use RMB to drag source image"); + but_idx = 0; + uiDefButS(block, ROW, evt_change, "Draw", butw*(but_idx++),yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_DRAW, 0, 0, "Draw brush"); + if (sima || do_project==0) + uiDefButS(block, ROW, evt_change, "Soften", butw*(but_idx++), yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_SOFTEN, 0, 0, "Soften brush"); + uiDefButS(block, ROW, evt_change, "Smear", butw*(but_idx++), yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_SMEAR, 0, 0, "Smear brush"); + if (sima || do_project) + uiDefButS(block, ROW, evt_change, "Clone", butw*(but_idx++), yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_CLONE, 0, 0, "Clone brush, use RMB to drag source image"); uiBlockEndAlign(block); yco -= 30; @@ -6390,9 +6393,9 @@ uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_BACKFACE, B_NOP, "Cull", xco+10+butw/2,yco-45,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Ignore faces pointing away from the view (faster)"); uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_FLAT, B_NOP, "Normal", xco+10,yco-65,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Paint most on faces pointing towards the view"); - uiDefButC(block, NUM, B_NOP, "", xco+10 +(butw/2),yco-65,butw/2,19, &settings->imapaint.normal_angle, 10.0, 90.0, 0, 0, "Paint most on faces pointing towards the view acording to this angle)"); + uiDefButS(block, NUM, B_NOP, "", xco+10 +(butw/2),yco-65,butw/2,19, &settings->imapaint.normal_angle, 10.0, 90.0, 0, 0, "Paint most on faces pointing towards the view acording to this angle)"); - uiDefButC(block, NUM, B_NOP, "Bleed: ", xco+10,yco-85,butw,19, &settings->imapaint.seam_bleed, 0.0, 8.0, 0, 0, "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)"); + uiDefButS(block, NUM, B_NOP, "Bleed: ", xco+10,yco-85,butw,19, &settings->imapaint.seam_bleed, 0.0, 8.0, 0, 0, "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17785] branches/blender2.5/blender/source /blender: View2D: Various Fixes + Header Support
Revision: 17785 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17785 Author: aligorith Date: 2008-12-11 04:50:50 +0100 (Thu, 11 Dec 2008) Log Message: --- View2D: Various Fixes + Header Support Added support for panning headers using View2D of the header regions (only done for TimeLine, as only that one has buttons on it). Currently, this uses some do_versions magic to initialise the View2D rects required, however, I'm not sure if all the information was safely ported over yet (notably height and position of rects due to alignment issues). In the process, I noticed a few bugs with the current View2D code: * UI_view2d_curRect_validate() is now called after UI_view2d_size_update(), as the size of the 'mask' rect is closely related to the size of the 'cur' rect (especially when zooming is locked). * Fixed a bug in UI_view2d_curRect_validate() which meant that if the 'cur' rect was slightly larger than the 'tot' rect, and keeptot was set, the view would flicker between the two closely related positions. Modified Paths: -- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c branches/blender2.5/blender/source/blender/editors/interface/view2d.c branches/blender2.5/blender/source/blender/editors/space_time/space_time.c Modified: branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c === --- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c 2008-12-10 22:13:23 UTC (rev 17784) +++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c 2008-12-11 03:50:50 UTC (rev 17785) @@ -5054,7 +5054,36 @@ ar->alignment= RGN_ALIGN_BOTTOM; else ar->alignment= RGN_ALIGN_TOP; - // TODO: add conversion stuff for header scrolling to v2d of header region + + /* initialise view2d data for header region, to allow panning */ + ar->v2d.keepaspect= 1; + ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM); + ar->v2d.keepofs = V2D_LOCKOFS_Y; + ar->v2d.keeptot = 2; // this keeps the view in place when region size changes... + ar->v2d.align = V2D_ALIGN_NO_NEG_X; + + ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f; + + ar->v2d.mask.xmin= ar->v2d.mask.ymin= 0; + ar->v2d.mask.xmax= sa->winx; + ar->v2d.mask.ymax= HEADERY; + + ar->v2d.cur.xmin= sa->headbutofs; + ar->v2d.cur.xmax= sa->winx + sa->headbutofs; + ar->v2d.tot.xmin= 0.0f; + ar->v2d.tot.xmax= sa->headbutlen; + + if (ar->alignment == RGN_ALIGN_BOTTOM) { + ar->v2d.align = V2D_ALIGN_NO_NEG_Y; + ar->v2d.tot.ymin= ar->v2d.cur.ymin= 0.0f; // what was area->headrct.ymin? + ar->v2d.tot.ymax= ar->v2d.cur.ymax= HEADERY; + } + else { + // XXX what were the extents of the old headers? + ar->v2d.align = V2D_ALIGN_NO_NEG_Y; + ar->v2d.tot.ymin= ar->v2d.cur.ymin= 0.0f; // what was area->headrct.ymin? + ar->v2d.tot.ymax= ar->v2d.cur.ymax= HEADERY; + } } ar= MEM_callocN(sizeof(ARegion), "area region from do_versions"); Modified: branches/blender2.5/blender/source/blender/editors/interface/view2d.c === --- branches/blender2.5/blender/source/blender/editors/interface/view2d.c 2008-12-10 22:13:23 UTC (rev 17784) +++ branches/blender2.5/blender/source/blender/editors/interface/view2d.c 2008-12-11 03:50:50 UTC (rev 17785) @@ -53,8 +53,8 @@ /* Refresh and Validation */ /* Adjust mask size in response to view size changes - * - When drawing a region, this should be called before - * any other drawing using View2D happens. + * - This should only be called in region init() callbacks, which are + * called when the region is resized or area changes... */ // XXX pre2.5 -> this used to be called calc_scrollrcts() void UI_view2d_size_update(View2D *v2d, int winx, int winy) @@ -96,6 +96,9 @@ v2d->mask.ymax= v2d->hor.ymin; } } + + /* make sure that 'cur' rect is in a valid state as a result of these changes */ + UI_view2d_curR
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17784] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/app_blender: renamed app_blender/api. cpp FRS_freestyle.cpp
Revision: 17784 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17784 Author: mxcurioni Date: 2008-12-10 23:13:23 +0100 (Wed, 10 Dec 2008) Log Message: --- renamed app_blender/api.cpp FRS_freestyle.cpp Added Paths: --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp Removed Paths: - branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp Copied: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp (from rev 17783, branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp) === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp (rev 0) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp 2008-12-10 22:13:23 UTC (rev 17784) @@ -0,0 +1,168 @@ +#include "AppView.h" +#include "Controller.h" +#include "AppConfig.h" +#include "AppCanvas.h" + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include "../../FRS_freestyle.h" + +#include "DNA_camera_types.h" +#include "DNA_scene_types.h" + +#include "render_types.h" +#include "renderpipeline.h" + +#include "BLI_blenlib.h" +#include "BIF_renderwin.h" +#include "BPY_extern.h" + +#ifdef __cplusplus +} +#endif + +using namespace std; + +#ifdef __cplusplus +extern "C" { +#endif + + static Config::Path *pathconfig = NULL; + static Controller *controller = NULL; + static AppView *view = NULL; + + char style_module[255] = ""; + int freestyle_flags; + float freestyle_sphere_radius = 1.0; + float freestyle_dkr_epsilon = 0.001; + + float freestyle_viewpoint[3]; + float freestyle_mv[4][4]; + float freestyle_proj[4][4]; + int freestyle_viewport[4]; + + void FRS_initialize(){ + + if( pathconfig == NULL ) + pathconfig = new Config::Path; + + if( controller == NULL ) + controller = new Controller; + + if( view == NULL ) { + view = new AppView; + controller->setView(view); + } + + if( strlen(style_module) == 0 ){ + string path( pathconfig->getProjectDir() + Config::DIR_SEP + "style_modules" + Config::DIR_SEP + "contour.py" ); + strcpy( style_module, path.c_str() ); + } + + } + + + void FRS_init_view(Render* re){ + int width = re->scene->r.xsch; + int height = re->scene->r.ysch; + + freestyle_viewport[0] = freestyle_viewport[1] = 0; + freestyle_viewport[2] = width; + freestyle_viewport[3] = height; + + view->setWidth( width ); + view->setHeight( height ); + } + + void FRS_init_camera(Render* re){ + Object* maincam_obj = re->scene->camera; + Camera *cam = (Camera*) maincam_obj->data; + + view->setHorizontalFov( cam->angle ); + + freestyle_viewpoint[0] = maincam_obj->obmat[3][0]; + freestyle_viewpoint[1] = maincam_obj->obmat[3][1]; + freestyle_viewpoint[2] = maincam_obj->obmat[3][2]; + + freestyle_mv[0][0] = maincam_obj->obmat[0][0]; + freestyle_mv[0][1] = maincam_obj->obmat[1][0]; + freestyle_mv[0][2] = maincam_obj->obmat[2][0]; + freestyle_mv[0][3] = 0.0; + + freestyle_mv[1][0] = maincam_obj->obmat[0][1]; + freestyle_mv[1][1] = maincam_obj->obmat[1][1]; + freestyle_mv[1][2] = maincam_obj->obmat[2][1]; + freestyle_mv[1][3] = 0.0; + + freestyle_mv[2][0] = re->viewmat[2][0]; + freestyle_mv[2][1] = re->viewmat[2][1]; + freestyle_mv[2][2] = re->viewmat[2][2]; + freestyle_mv[2][3] = 0.0; + + freestyle_mv[3][0] = re->viewmat[3][0]; + freestyle_mv[3][1] = re->viewmat[3][1]; + freestyle_mv[3][2] = re->viewmat[3][2]; + freestyle_mv[3][3] = 1.0; + + for( int i = 0; i < 4; i++ ) + for( int j = 0; j < 4; j++ ) + freestyle_proj[i][j] = re->winmat[i][j]; + } + + + void FRS_prepare(Render* re) { + + // init + FRS_initialize(); + FRS_init_view(re); + FRS_init_camera(re); + controller->Clear(); + + // load mesh + if( controller->LoadMesh(re) ) // returns if scene cann
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17783] branches/soc-2008-mxcurioni/source /blender/freestyle: improved Freestyle IO formatting
Revision: 17783 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17783 Author: mxcurioni Date: 2008-12-10 23:06:27 +0100 (Wed, 10 Dec 2008) Log Message: --- improved Freestyle IO formatting Modified Paths: -- branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Canvas.h Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h === --- branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h 2008-12-10 21:51:58 UTC (rev 17782) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h 2008-12-10 22:06:27 UTC (rev 17783) @@ -13,6 +13,7 @@ extern float freestyle_sphere_radius; extern float freestyle_dkr_epsilon; + extern float freestyle_fovyradian; extern float freestyle_viewpoint[3]; extern float freestyle_mv[4][4]; extern float freestyle_proj[4][4]; Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp 2008-12-10 21:51:58 UTC (rev 17782) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp 2008-12-10 22:06:27 UTC (rev 17783) @@ -636,6 +636,7 @@ _Canvas->Draw(); real d = _Chrono.stop(); cout << "Strokes generation : " << d << endl; + cout << "Stroke count : " << _Canvas->stroke_count << endl; resetModified(); } Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp 2008-12-10 21:51:58 UTC (rev 17782) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp 2008-12-10 22:06:27 UTC (rev 17783) @@ -150,16 +150,17 @@ void FRS_render_Blender(Render* re) { if( controller->_ViewMap ) { + cout << "\n=== Rendering Freestyle with Blender's internal renderer ===" << endl; + // build strokes controller->DrawStrokes(); - - cout << "\n=== Rendering Freestyle with Blender's internal renderer ===" << endl; + controller->RenderBlender(re); controller->CloseFile(); } else { cout << "Freestyle cannot be used because the view map is not available" << endl; } - cout << "###" << endl; + cout << "\n###" << endl; } #ifdef __cplusplus Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp 2008-12-10 21:51:58 UTC (rev 17782) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp 2008-12-10 22:06:27 UTC (rev 17783) @@ -18,7 +18,7 @@ ObjectInstanceRen *obi; ObjectRen *obr; - cout << "\nImporting triangular meshes into Blender" << endl; + cout << "\n=== Importing triangular meshes into Blender ===" << endl; // creation of the scene root node _Scene = new NodeGroup; Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp 2008-12-10 21:51:58 UTC (rev 17782) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BlenderStrokeRenderer.cpp 2008-12-10 22:06:27 UTC (rev 17783) @@ -56,7 +56,7 @@ lb = scene->r.layers; scene->r= old_scene->r; scene->r.layers= lb; - set_scene( scene ); // scene.makeCurrent() + set_sc
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17782] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/app_blender: removed AppGLWidget and all related classes
Revision: 17782 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17782 Author: mxcurioni Date: 2008-12-10 22:51:58 +0100 (Wed, 10 Dec 2008) Log Message: --- removed AppGLWidget and all related classes added an AppView class to transfer camera information from Blender to Freestyle removed unused functions Modified Paths: -- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp Added Paths: --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppView.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppView.h Removed Paths: - branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_config.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_constraint.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_frame.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_frame.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_point.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_quaternion.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_quaternion.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_vec.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget_vec.h Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp 2008-12-10 19:22:10 UTC (rev 17781) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.cpp 2008-12-10 21:51:58 UTC (rev 17782) @@ -21,7 +21,7 @@ #include "../rendering/GLBlendEquation.h" -#include "AppGLWidget.h" +#include "AppView.h" #include "../image/Image.h" #include "../system/TimeStamp.h" #include "Controller.h" @@ -40,7 +40,7 @@ _MapsPath = StringUtils::toAscii( Config::Path::getInstance()->getMapsDir() ).c_str(); } -AppCanvas::AppCanvas(AppGLWidget* iViewer) +AppCanvas::AppCanvas(AppView* iViewer) :Canvas() { _pViewer = iViewer; @@ -57,7 +57,7 @@ _pViewer = 0; } -void AppCanvas::setViewer(AppGLWidget *iViewer) +void AppCanvas::setViewer(AppView *iViewer) { _pViewer = iViewer; } @@ -69,7 +69,7 @@ int AppCanvas::height() const { - return _pViewer->height(); + return _pViewer->height();; } BBox AppCanvas::scene3DBBox() const Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.h === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.h 2008-12-10 19:22:10 UTC (rev 17781) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppCanvas.h 2008-12-10 21:51:58 UTC (rev 17782) @@ -2,15 +2,14 @@ #define ARTCANVAS_H #include "../stroke/Canvas.h" +#include "AppView.h" -//class AppGLWidget; class AppCanvas : public Canvas { -private: - mutable AppGLWidget *_pViewer; + public: AppCanvas(); - AppCanvas(AppGLWidget *iViewer); + AppCanvas(AppView *iViewer); AppCanvas(const AppCanvas& iBrother); virtual ~AppCanvas(); @@ -41,10 +40,12 @@ /*! accessors */ virtual int width() const ; virtual int height() const ; - inline const AppGLWidget * viewer() const {return _pViewer;} + AppView *_pViewer; + inline const A
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17781] branches/blender2.5/blender/source /blender/editors:
Revision: 17781 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17781 Author: blendix Date: 2008-12-10 20:22:10 +0100 (Wed, 10 Dec 2008) Log Message: --- UI: * Added context pointer to function callbacks for buttons and blocks. * Added a uiBlockSetHandleFunc, which will be called with the button return value. This seems kind of redundant with uiBlockSetButmFunc, but the latter uses a2 to pass the value. Modified Paths: -- branches/blender2.5/blender/source/blender/editors/include/UI_interface.h branches/blender2.5/blender/source/blender/editors/interface/interface.c branches/blender2.5/blender/source/blender/editors/interface/interface.h branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c branches/blender2.5/blender/source/blender/editors/space_time/time_header.c Modified: branches/blender2.5/blender/source/blender/editors/include/UI_interface.h === --- branches/blender2.5/blender/source/blender/editors/include/UI_interface.h 2008-12-10 18:36:56 UTC (rev 17780) +++ branches/blender2.5/blender/source/blender/editors/include/UI_interface.h 2008-12-10 19:22:10 UTC (rev 17781) @@ -275,7 +275,7 @@ uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip); uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip); -typedef void (*uiIDPoinFuncFP) (char *str, struct ID **idpp); +typedef void (*uiIDPoinFuncFP) (struct bContext *C, char *str, struct ID **idpp); uiBut *uiDefIDPoinBut(struct uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, char *str, short x1, short y1, short x2, short y2, void *idpp, char *tip); @@ -288,7 +288,6 @@ void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip); uiBut *uiDefRNABut(uiBlock *block, int retval, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, short x1, short y1, short x2, short y2); -void uiButSetFunc3(uiBut *but, void (*func)(void *arg1, void *arg2, void *arg3), void *arg1, void *arg2, void *arg3); void uiAutoBlock(struct uiBlock *block, float minx, float miny, @@ -315,14 +314,15 @@ void uiButSetFlag(uiBut *but, int flag); void uiButClearFlag (uiBut *but, int flag); -void uiBlockSetButmFunc (uiBlock *block,void (*butmfunc)(void *arg, int but_a2), void *arg); +void uiBlockSetHandleFunc(uiBlock *block,void (*func)(struct bContext *C, void *arg, int event), void *arg); +void uiBlockSetButmFunc (uiBlock *block,void (*func)(struct bContext *C, void *arg, int but_a2), void *arg); -void uiBlockSetFunc (uiBlock *block,void (*func)(void *arg1, void *arg2), void *arg1, void *arg2); -void uiButSetFunc(uiBut *but,void (*func)(void *arg1, void *arg2), void *arg1, void *arg2); +void uiBlockSetFunc (uiBlock *block,void (*func)(struct bContext *C, void *arg1, void *arg2), void *arg1, void *arg2); +void uiButSetFunc(uiBut *but,void (*func)(struct bContext *C, void *arg1, void *arg2), void *arg1, void *arg2); -void uiButSetCompleteFunc(uiBut *but,void (*func)(char *str, void *arg), void *arg); +void uiButSetCompleteFunc(uiBut *but,void (*func)(struct bContext *C, char *str, void *arg), void *arg); -void uiBlockSetDrawExtraFunc(uiBlock *block, void (*func)(struct ScrArea *sa, uiBlock *block)); +void uiBlockSetDrawExtraFunc(uiBlock *block, void (*func)(struct bContext *C, uiBlock *block)); /* Panels */ Modified: branches/blender2.5/blender/source/blender/editors/interface/interface.c === --- branches/blender2.5/blender/source/blender/editors/interface/interface.c 2008-12-10 18:36:56 UTC (rev 17780) +++ branches/blender2.5/blender/source/blender/editors/interface/interface.c 2008-12-10 19:22:10 UTC (rev 17781) @@ -421,7 +421,6 @@ if(but->func != oldbut->func) return 0; if(but->func_arg1 != oldbut->func_arg1) return 0; if(but->func_arg2 != oldbut->func_arg2) return 0; - if(but->func_arg3 != oldbut->func_arg3) return 0; return 1; } @@ -1942,15 +1941,15 @@ if(block->themecol==TH_AUTO) bu
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17780] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/system/PythonInterpreter.h: when Freestyle would execute style modules, a copy of
Revision: 17780 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17780 Author: mxcurioni Date: 2008-12-10 19:36:56 +0100 (Wed, 10 Dec 2008) Log Message: --- when Freestyle would execute style modules, a copy of the Python script would end up in the text editor and pollute the text editor file list. This is corrected: executed scripts do not leave trails behind. Modified Paths: -- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PythonInterpreter.h Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PythonInterpreter.h === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PythonInterpreter.h 2008-12-10 17:58:18 UTC (rev 17779) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/PythonInterpreter.h 2008-12-10 18:36:56 UTC (rev 17780) @@ -37,8 +37,12 @@ //soc extern "C" { +#include "BKE_main.h" +#include "BKE_global.h" #include "BKE_text.h" +#include "BKE_library.h" #include "BPY_extern.h" +#include "BIF_drawtext.h" } class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter @@ -78,7 +82,11 @@ cout << fn << " (at line " << BPY_Err_getLinenumber() << ")" << endl; return BPY_Err_getLinenumber(); } - + + // cleaning up + unlink_text(text); + free_libblock(&G.main->text, text); + return 0; } @@ -122,6 +130,10 @@ BPY_txt_do_python_Text(text); + // cleaning up + unlink_text(text); + free_libblock(&G.main->text, text); + //PyRun_SimpleString("from Freestyle import *"); _initialized = true; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17779] branches/blender2.5/blender/source /blender/editors: 2.5
Revision: 17779 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17779 Author: ton Date: 2008-12-10 18:58:18 +0100 (Wed, 10 Dec 2008) Log Message: --- 2.5 - Brought back (most of) buttons in TimeLine window. They don't work yet though! Waiting for Brecht to commit callbacks for menus and ui-blocks - Area headers hilite again when mouse is inside. Modified Paths: -- branches/blender2.5/blender/source/blender/editors/include/ED_screen.h branches/blender2.5/blender/source/blender/editors/include/ED_util.h branches/blender2.5/blender/source/blender/editors/screen/area.c branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c branches/blender2.5/blender/source/blender/editors/space_time/space_time.c branches/blender2.5/blender/source/blender/editors/space_time/time_intern.h branches/blender2.5/blender/source/blender/editors/util/ed_util.c Added Paths: --- branches/blender2.5/blender/source/blender/editors/space_time/time_header.c Modified: branches/blender2.5/blender/source/blender/editors/include/ED_screen.h === --- branches/blender2.5/blender/source/blender/editors/include/ED_screen.h 2008-12-10 15:30:43 UTC (rev 17778) +++ branches/blender2.5/blender/source/blender/editors/include/ED_screen.h 2008-12-10 17:58:18 UTC (rev 17779) @@ -41,10 +41,10 @@ /* regions */ void ED_region_do_listen(ARegion *ar, struct wmNotifier *note); -void ED_region_do_draw(struct bContext *C, ARegion *ar); -void ED_region_exit(struct bContext *C, ARegion *ar); -void ED_region_pixelspace(const struct bContext *C, ARegion *ar); -void ED_region_init(struct bContext *C, ARegion *ar); +void ED_region_do_draw(struct bContext *C, struct ARegion *ar); +void ED_region_exit(struct bContext *C, struct ARegion *ar); +void ED_region_pixelspace(const struct bContext *C, struct ARegion *ar); +void ED_region_init(struct bContext *C, struct ARegion *ar); ARegion *ED_region_copy(ARegion *ar); /* spaces */ @@ -54,17 +54,18 @@ /* areas */ void ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *sa); -void ED_area_exit(struct bContext *C, ScrArea *sa); -void ED_area_do_draw(struct bContext *C, ScrArea *sa); +void ED_area_exit(struct bContext *C, struct ScrArea *sa); +void ED_area_do_draw(struct bContext *C, struct ScrArea *sa); +intED_screen_area_active(const struct bContext *C); /* screens */ void ED_screens_initialize(struct wmWindowManager *wm); void ED_screen_draw(struct wmWindow *win); void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win); void ED_screen_do_listen(struct wmWindow *win, struct wmNotifier *note); -bScreen *ED_screen_duplicate(struct wmWindow *win, bScreen *sc); +bScreen *ED_screen_duplicate(struct wmWindow *win, struct bScreen *sc); void ED_screen_set_subwinactive(struct wmWindow *win); -void ED_screen_exit(struct bContext *C, struct wmWindow *window, bScreen *screen); +void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen); void ED_operatortypes_screen(void); void ED_keymap_screen(struct wmWindowManager *wm); Modified: branches/blender2.5/blender/source/blender/editors/include/ED_util.h === --- branches/blender2.5/blender/source/blender/editors/include/ED_util.h 2008-12-10 15:30:43 UTC (rev 17778) +++ branches/blender2.5/blender/source/blender/editors/include/ED_util.h 2008-12-10 17:58:18 UTC (rev 17779) @@ -28,7 +28,14 @@ #ifndef ED_UTIL_H #define ED_UTIL_H +/* ** XXX OLD CRUFT WARNING * */ + +#define XIC 20 +#define YIC 20 + void apply_keyb_grid(float *val, float fac1, float fac2, float fac3, int invert); +int GetButStringLength(char *str); + #endif /* ED_UTIL_H */ Modified: branches/blender2.5/blender/source/blender/editors/screen/area.c === --- branches/blender2.5/blender/source/blender/editors/screen/area.c 2008-12-10 15:30:43 UTC (rev 17778) +++ branches/blender2.5/blender/source/blender/editors/screen/area.c 2008-12-10 17:58:18 UTC (rev 17779) @@ -98,8 +98,7 @@ int height= ar->winrct.ymax-ar->winrct.ymin+1; wmOrtho2(C->window, -0.375, (float)width-0.375, -0.375, (float)height-0.375); - wmLoadIdentity(C->window); - + wmLoadIdentity(C->window); } void ED_region_do_listen(ARegion *ar, wmNotifier *note) Modified: branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c === --- branches/blender2.5/blender/source/blender/editors/screen/screen_ed
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17778] branches/soc-2008-mxcurioni/source /blender: replaced "Shape loading" message with " Importing triangular meshes into Blender"
Revision: 17778 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17778 Author: mxcurioni Date: 2008-12-10 16:30:43 +0100 (Wed, 10 Dec 2008) Log Message: --- replaced "Shape loading" message with "Importing triangular meshes into Blender" handled case when scene is empty made controller's view map as public variable Modified Paths: -- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.h branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/BlenderFileLoader.cpp branches/soc-2008-mxcurioni/source/blender/render/intern/source/rendercore.c Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp 2008-12-10 15:12:46 UTC (rev 1) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.cpp 2008-12-10 15:30:43 UTC (rev 17778) @@ -180,8 +180,12 @@ return 1; } - cout << "Scene loaded\n" << endl; + if( blenderScene->numberOfChildren() < 1) { + cout << "Empty scene" << endl; + return 1; + } + cout << "Scene loaded" << endl; printf("Mesh cleaning: %lf\n", _Chrono.stop()); _SceneNumFaces += loader.numFacesRead(); Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.h === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.h 2008-12-10 15:12:46 UTC (rev 1) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/Controller.h 2008-12-10 15:30:43 UTC (rev 17778) @@ -140,6 +140,10 @@ void resetInterpreter(); +public: + // Viewmap data structure + ViewMap * _ViewMap; + private: // Main Window: @@ -168,8 +172,6 @@ // Winged-Edge structure WingedEdge* _winged_edge; - - ViewMap * _ViewMap; // Silhouette structure: //std::vector _SShapes; Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp 2008-12-10 15:12:46 UTC (rev 1) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/api.cpp 2008-12-10 15:30:43 UTC (rev 17778) @@ -140,7 +140,8 @@ controller->Clear(); // load mesh - controller->LoadMesh(re); + if( controller->LoadMesh(re) ) // returns if scene cannot be loaded or if empty + return; // add style module cout << "Module: " << style_module << endl; @@ -161,37 +162,19 @@ // compute view map controller->ComputeViewMap(); } - - // void FRS_render_GL(Render* re) { - // - // - // // build strokes - // controller->DrawStrokes(); - // - // cout << "Rendering Freestyle with OpenGL" << endl; - // - // // render strokes - // view->workingBuffer = GL_BACK; - // view->draw(); - // - // // display result - // RenderResult rres; - // RE_GetResultImage(re, &rres); - // view->readPixels(0, 0, re->winx, re->winy, AppGLWidget::RGBA, rres.rectf ); - // re->result->renlay = render_get_active_layer(re, re->result); - // re->display_draw(re->result, NULL); - // - // controller->CloseFile(); - // } void FRS_render_Blender(Render* re) { - // build strokes - controller->DrawStrokes(); + if( controller->_ViewMap ) { + // build strokes + controller->DrawStrokes(); - cout << "Rendering Freestyle with Blender's internal renderer" << endl; - controller->RenderBlender(re); - controller->CloseFile(); + cout << "Rendering Freestyle with Blender's internal renderer" << endl; + controller->RenderBlender(re); + controller->CloseFile(); + } else { + cout << "Freestyle cannot be used because the view map is not available" << endl; + } } #ifdef __cplusplus Modified: branches/soc-2008
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17777] branches/blender2.5/blender/source /blender/windowmanager/intern/wm_window.c: 2.5
Revision: 1 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=1 Author: ton Date: 2008-12-10 16:12:46 +0100 (Wed, 10 Dec 2008) Log Message: --- 2.5 Fix: on quit with a ghost event, windows were freed without freeing screens. Modified Paths: -- branches/blender2.5/blender/source/blender/windowmanager/intern/wm_window.c Modified: branches/blender2.5/blender/source/blender/windowmanager/intern/wm_window.c === --- branches/blender2.5/blender/source/blender/windowmanager/intern/wm_window.c 2008-12-10 13:56:54 UTC (rev 17776) +++ branches/blender2.5/blender/source/blender/windowmanager/intern/wm_window.c 2008-12-10 15:12:46 UTC (rev 1) @@ -153,6 +153,8 @@ static void wm_window_close(bContext *C, wmWindow *win) { BLI_remlink(&C->wm->windows, win); + + ED_screen_exit(C, win, win->screen); wm_window_free(C, win); if(C->wm->windows.first==NULL) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17776] branches/blender2.5/blender/source /blender: 2.5
Revision: 17776 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17776 Author: ton Date: 2008-12-10 14:56:54 +0100 (Wed, 10 Dec 2008) Log Message: --- 2.5 Cleanup in area/region management - more intelligence in area management for adding handlers and setting data correct. Space/Region type callbacks only have to do own things. - added option for adding default handlers to areas/regions. (flag in type definition) - ensured that region-types store the minsizes for regions. - added boundbox check for handlers; note that it accepts pointer to boundbox, because handlers don't get reset on area-resizing or view changes. Example: view2d handlers use mask rect. - handlers get now added on correct context levels (example frame change also worked in header) - removed ->refresh() callback. Context refreshing is Listener. - the ->init() is being called on all WM level actions, also after a file read, moving areas, re-opening areas etc. - fixed bug: crash on exit was caused by cleaning up Screen too late. - UI_view2d_size_update() removed from draw callback, is init() - regions now store (winx, winy) subwindow size. Modified Paths: -- branches/blender2.5/blender/source/blender/blenkernel/BKE_screen.h branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c branches/blender2.5/blender/source/blender/editors/include/ED_screen.h branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c branches/blender2.5/blender/source/blender/editors/screen/area.c branches/blender2.5/blender/source/blender/editors/screen/screen_edit.c branches/blender2.5/blender/source/blender/editors/screen/spacetypes.c branches/blender2.5/blender/source/blender/editors/space_outliner/space_outliner.c branches/blender2.5/blender/source/blender/editors/space_time/space_time.c branches/blender2.5/blender/source/blender/editors/space_view3d/space_view3d.c branches/blender2.5/blender/source/blender/makesdna/DNA_screen_types.h branches/blender2.5/blender/source/blender/windowmanager/WM_api.h branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c branches/blender2.5/blender/source/blender/windowmanager/intern/wm_init_exit.c branches/blender2.5/blender/source/blender/windowmanager/intern/wm_window.c branches/blender2.5/blender/source/blender/windowmanager/wm_event_system.h Modified: branches/blender2.5/blender/source/blender/blenkernel/BKE_screen.h === --- branches/blender2.5/blender/source/blender/blenkernel/BKE_screen.h 2008-12-10 12:00:36 UTC (rev 17775) +++ branches/blender2.5/blender/source/blender/blenkernel/BKE_screen.h 2008-12-10 13:56:54 UTC (rev 17776) @@ -52,16 +52,15 @@ int spaceid; /* unique space identifier */ int iconid; /* icon lookup for menus */ - /* calls init too */ + /* initial allocation, after this WM will call init() too */ struct SpaceLink*(*new)(void); /* not free spacelink itself */ void(*free)(struct SpaceLink *); - /* init is to cope with internal contextual changes, adds handlers, -* creates/sets screarea regions */ + /* init is to cope with file load, screen (size) changes, check handlers */ void(*init)(struct wmWindowManager *, struct ScrArea *); - /* refresh is for external bContext changes */ - void(*refresh)(struct bContext *, struct ScrArea *); + /* Listeners can react to bContext changes */ + void(*listener)(struct ARegion *, struct wmNotifier *); /* after a spacedata copy, an init should result in exact same situation */ struct SpaceLink*(*duplicate)(struct SpaceLink *); @@ -76,6 +75,9 @@ /* read and write... */ + /* default keymaps to add */ + int keymapflag; + } SpaceType; /* region types are also defined using spacetypes_init, via a callback */ @@ -85,18 +87,24 @@ int regionid; /* unique identifier within this space */ - void(*init)(const struct bContext *, struct ARegion *); /* add handlers, stuff you only do once or on area/region changes */ - void(*refresh)(const struct bContext *, struct ARegion *); /* refresh to match contextual changes */ - void(*draw)(const struct bContext *, struct ARegion *); /* draw entirely, windowsize changes should be handled here */ + /* add handlers, stuff you only do once or on area/region type/size changes */ + void
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17775] branches/blender2.5/blender/source /blender/makesrna/intern/rna_armature.c: RNA - Wrapped a few more Armature/ Bone settings
Revision: 17775 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17775 Author: aligorith Date: 2008-12-10 13:00:36 +0100 (Wed, 10 Dec 2008) Log Message: --- RNA - Wrapped a few more Armature/Bone settings * I've only got a few more Armature settings to go (path stuff) * Bones have still only got name + layers so far Modified Paths: -- branches/blender2.5/blender/source/blender/makesrna/intern/rna_armature.c Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_armature.c === --- branches/blender2.5/blender/source/blender/makesrna/intern/rna_armature.c 2008-12-10 11:42:26 UTC (rev 17774) +++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_armature.c 2008-12-10 12:00:36 UTC (rev 17775) @@ -33,6 +33,20 @@ #ifdef RNA_RUNTIME + +static void rna_Bone_layer_set(PointerRNA *ptr, int index, int value) +{ + Bone *bone= (Bone*)ptr->data; + + if(value) bone->layer |= (1layer |= (1data; + CLAMP(value, 1, data->ghostef); + data->ghostsf= value; +} + +static void rna_Armature_ghost_end_frame_set(PointerRNA *ptr, int value) +{ + bArmature *data= (bArmature*)ptr->data; + CLAMP(value, data->ghostsf, 30); + data->ghostef= value; +} + #else // err... bones should not be directly edited (only editbones should be...) @@ -55,6 +83,19 @@ srna= RNA_def_struct(brna, "Bone", NULL, "Bone"); + /* strings */ + prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); + RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* must be unique */ + RNA_def_property_ui_text(prop, "Name", ""); + RNA_def_struct_name_property(srna, prop); + + /* flags */ + /* layer */ + prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layer", 1); + RNA_def_property_array(prop, 16); + RNA_def_property_ui_text(prop, "Bone Layers", "Layers bone exists in"); + RNA_def_property_boolean_funcs(prop, NULL, "rna_Bone_layer_set"); } void rna_def_armature(BlenderRNA *brna) @@ -89,7 +130,7 @@ RNA_def_property_ui_text(prop, "Draw Type", ""); prop= RNA_def_property(srna, "ghosttype", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, prop_drawtype_items); + RNA_def_property_enum_items(prop, prop_ghosttype_items); RNA_def_property_ui_text(prop, "Ghost Drawing", "Method of Onion-skinning for active Action"); /* Boolean values */ @@ -98,7 +139,7 @@ RNA_def_property_boolean_sdna(prop, NULL, "layer", 1); RNA_def_property_array(prop, 16); RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility."); - RNA_def_property_boolean_funcs(prop, NULL, "rna_Armature_layer_set"); + RNA_def_property_boolean_funcs(prop, NULL, "rna_Armature_layer_set"); /* layer protection */ prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_NONE); @@ -181,9 +222,37 @@ RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_ACFRA); RNA_def_property_ui_text(prop, "Only show Bone Paths around current frame", "When drawing Armature in Pose Mode, only show section of Bone Paths that falls around current frame"); + prop= RNA_def_property(srna, "paths_calculate_head_positions", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_HEADS); + RNA_def_property_ui_text(prop, "Bone Paths Use Heads", "When calculating Bone Paths, use Head locations instead of Tips"); + /* Number fields */ + /* ghost/onionskining settings */ + prop= RNA_def_property(srna, "ghost_step", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "ghostep"); + RNA_def_property_range(prop, 0, 30); + RNA_def_property_ui_text(prop, "Ghost Step", "Number of frame steps on either side of current frame to show as ghosts (only for 'Around Current Frame' Onion-skining method)."); + prop= RNA_def_property(srna, "ghost_size", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "ghostsize"); + RNA_def_property_range(prop, 0, 30); + RNA_def_property_ui_text(prop, "Ghost Frame Step", "Frame step for Ghosts (not for 'On Keyframes' Onion-skining method)."); + prop= RNA_def_property(srna, "ghost_start_frame", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "ghostsf"); + RNA_def_property_int_funcs(prop, NULL, "rna_Arm
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17774] trunk/blender/source/blender/ blenkernel/intern: fix for [18069] open nurbs curve snaps end to centerpoint
Revision: 17774 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17774 Author: campbellbarton Date: 2008-12-10 12:42:26 +0100 (Wed, 10 Dec 2008) Log Message: --- fix for [18069] open nurbs curve snaps end to centerpoint made nurbs surface curves use the same number of points as nurbs curves. Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/curve.c trunk/blender/source/blender/blenkernel/intern/displist.c Modified: trunk/blender/source/blender/blenkernel/intern/curve.c === --- trunk/blender/source/blender/blenkernel/intern/curve.c 2008-12-10 09:45:48 UTC (rev 17773) +++ trunk/blender/source/blender/blenkernel/intern/curve.c 2008-12-10 11:42:26 UTC (rev 17774) @@ -833,7 +833,6 @@ sum= (float *)MEM_callocN(sizeof(float)*len, "makeNurbcurve1"); resolu= (resolu*SEGMENTSU(nu)); - if((nu->flagu & CU_CYCLIC)==0) resolu++; if(resolu==0) { MEM_freeN(sum); @@ -1685,7 +1684,6 @@ else if((nu->type & 7)==CU_NURBS) { if(nu->pntsv==1) { len= (resolu*SEGMENTSU(nu)); - if((nu->flagu & CU_CYCLIC)==0) len++; bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList3"); BLI_addtail(&(cu->bev), bl); Modified: trunk/blender/source/blender/blenkernel/intern/displist.c === --- trunk/blender/source/blender/blenkernel/intern/displist.c 2008-12-10 09:45:48 UTC (rev 17773) +++ trunk/blender/source/blender/blenkernel/intern/displist.c 2008-12-10 11:42:26 UTC (rev 17774) @@ -887,7 +887,6 @@ } else if((nu->type & 7)==CU_NURBS) { len= (resolu*SEGMENTSU(nu)); - if((nu->flagu & CU_CYCLIC)==0) len++; dl= MEM_callocN(sizeof(DispList), "makeDispListsurf"); dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts"); @@ -1381,7 +1380,7 @@ for (nu=nubase->first; nu; nu=nu->next) { if(forRender || nu->hide==0) { if(nu->pntsv==1) { - len= nu->pntsu*nu->resolu; + len= SEGMENTSU(nu)*nu->resolu; dl= MEM_callocN(sizeof(DispList), "makeDispListsurf"); dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17773] branches/projection-paint: merge from trunk - r17500 to HEAD
Revision: 17773 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17773 Author: campbellbarton Date: 2008-12-10 10:45:48 +0100 (Wed, 10 Dec 2008) Log Message: --- merge from trunk - r17500 to HEAD Modified Paths: -- branches/projection-paint/extern/Makefile branches/projection-paint/intern/SoundSystem/Makefile branches/projection-paint/intern/elbeem/intern/utilities.h branches/projection-paint/projectfiles_vc9/blender/blender.sln branches/projection-paint/projectfiles_vc9/blender/nodes/nodes.vcproj branches/projection-paint/projectfiles_vc9/gameengine/gameplayer/ghost/GP_ghost.vcproj branches/projection-paint/release/Makefile branches/projection-paint/release/scripts/bpymodules/BPyImage.py branches/projection-paint/release/scripts/bpymodules/BPySys.py branches/projection-paint/release/scripts/export_fbx.py branches/projection-paint/source/Makefile branches/projection-paint/source/blender/blenkernel/BKE_node.h branches/projection-paint/source/blender/blenkernel/intern/node.c branches/projection-paint/source/blender/blenlib/intern/storage.c branches/projection-paint/source/blender/imbuf/intern/imageprocess.c branches/projection-paint/source/blender/include/BIF_editparticle.h branches/projection-paint/source/blender/include/BIF_outliner.h branches/projection-paint/source/blender/include/butspace.h branches/projection-paint/source/blender/include/transform.h branches/projection-paint/source/blender/makesdna/DNA_scriptlink_types.h branches/projection-paint/source/blender/nodes/TEX_node.h branches/projection-paint/source/blender/nodes/intern/TEX_util.c branches/projection-paint/source/blender/python/BPY_interface.c branches/projection-paint/source/blender/python/api2_2x/Blender.c branches/projection-paint/source/blender/python/api2_2x/Sys.c branches/projection-paint/source/blender/python/api2_2x/doc/API_related.py branches/projection-paint/source/blender/python/api2_2x/doc/Sys.py branches/projection-paint/source/blender/src/SConscript branches/projection-paint/source/blender/src/buttons_editing.c branches/projection-paint/source/blender/src/buttons_scene.c branches/projection-paint/source/blender/src/drawimage.c branches/projection-paint/source/blender/src/editparticle.c branches/projection-paint/source/blender/src/header_time.c branches/projection-paint/source/blender/src/header_view3d.c branches/projection-paint/source/blender/src/outliner.c branches/projection-paint/source/blender/src/playanim.c branches/projection-paint/source/blender/src/seqeffects.c branches/projection-paint/source/blender/src/space.c branches/projection-paint/source/blender/src/transform.c branches/projection-paint/source/blender/src/transform_constraints.c branches/projection-paint/source/blender/src/transform_generics.c branches/projection-paint/source/creator/creator.c branches/projection-paint/source/gameengine/BlenderRoutines/Makefile branches/projection-paint/source/gameengine/GamePlayer/common/unix/Makefile branches/projection-paint/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp branches/projection-paint/source/gameengine/Ketsji/KX_BulletPhysicsController.h branches/projection-paint/source/gameengine/Ketsji/KX_Camera.cpp branches/projection-paint/source/gameengine/Ketsji/KX_GameObject.cpp branches/projection-paint/source/gameengine/Ketsji/KX_GameObject.h branches/projection-paint/source/gameengine/Ketsji/KX_KetsjiEngine.h branches/projection-paint/source/gameengine/Ketsji/KX_Scene.cpp branches/projection-paint/source/gameengine/PyDoc/KX_GameObject.py branches/projection-paint/source/gameengine/Rasterizer/RAS_FramingManager.h branches/projection-paint/source/gameengine/Rasterizer/RAS_IRasterizer.h branches/projection-paint/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp branches/projection-paint/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h branches/projection-paint/source/gameengine/VideoTexture/Exception.cpp branches/projection-paint/source/gameengine/VideoTexture/Exception.h branches/projection-paint/source/gameengine/VideoTexture/ImageRender.cpp branches/projection-paint/source/gameengine/VideoTexture/ImageRender.h branches/projection-paint/source/gameengine/VideoTexture/ImageViewport.cpp branches/projection-paint/source/gameengine/VideoTexture/ImageViewport.h branches/projection-paint/source/gameengine/VideoTexture/Texture.h branches/projection-paint/source/gameengine/VideoTexture/blendVideoTex.cpp branches/projection-paint/source/nan_compile.mk branches/projection-paint/source/nan_definitions.mk branches/projection-paint/source/nan_link.mk Added Paths: --- branches/projection-paint/config/irix6-config.py
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17772] branches/blender2.5/blender/source /blender/editors: View2D - Bugfixes
Revision: 17772 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17772 Author: aligorith Date: 2008-12-10 10:07:15 +0100 (Wed, 10 Dec 2008) Log Message: --- View2D - Bugfixes Fixed a few typos in View2D code, which included the zoom-locking flags not being checked for correctly by the zoom operators. This commit does NOT fix the problems with the Outliner 'cur' rect expanding/contracting as the view changes size. I still haven't found the cause of this, but it might be related to the off-by-1 errors with UI-widgets that brecht noted in TimeLine header... Modified Paths: -- branches/blender2.5/blender/source/blender/editors/include/UI_view2d.h branches/blender2.5/blender/source/blender/editors/interface/view2d.c branches/blender2.5/blender/source/blender/editors/interface/view2d_ops.c Modified: branches/blender2.5/blender/source/blender/editors/include/UI_view2d.h === --- branches/blender2.5/blender/source/blender/editors/include/UI_view2d.h 2008-12-10 05:41:21 UTC (rev 17771) +++ branches/blender2.5/blender/source/blender/editors/include/UI_view2d.h 2008-12-10 09:07:15 UTC (rev 17772) @@ -89,10 +89,9 @@ /* refresh and validation (of view rects) */ void UI_view2d_size_update(struct View2D *v2d, int winx, int winy); -void UI_view2d_status_enforce(struct View2D *v2d); - -void UI_view2d_totRect_set(struct View2D *v2d, int width, int height); +void UI_view2d_curRect_validate(struct View2D *v2d); void UI_view2d_curRect_reset(struct View2D *v2d); +void UI_view2d_totRect_set(struct View2D *v2d, int width, int height); /* view matrix operations */ void UI_view2d_view_ortho(const struct bContext *C, struct View2D *v2d); Modified: branches/blender2.5/blender/source/blender/editors/interface/view2d.c === --- branches/blender2.5/blender/source/blender/editors/interface/view2d.c 2008-12-10 05:41:21 UTC (rev 17771) +++ branches/blender2.5/blender/source/blender/editors/interface/view2d.c 2008-12-10 09:07:15 UTC (rev 17772) @@ -78,7 +78,7 @@ else if (v2d->scroll & V2D_SCROLL_RIGHT) { /* on right-hand edge of region */ v2d->vert= v2d->mask; - v2d->vert.xmin= v2d->vert.xmax-V2D_SCROLL_WIDTH; + v2d->vert.xmin= v2d->vert.xmax - V2D_SCROLL_WIDTH; v2d->mask.xmax= v2d->vert.xmin; } @@ -92,7 +92,7 @@ else if (v2d->scroll & V2D_SCROLL_TOP) { /* on upper edge of region */ v2d->hor= v2d->mask; - v2d->hor.ymin= v2d->hor.ymax-V2D_SCROLL_HEIGHT; + v2d->hor.ymin= v2d->hor.ymax - V2D_SCROLL_HEIGHT; v2d->mask.ymax= v2d->hor.ymin; } } @@ -102,17 +102,16 @@ * - cur is not allowed to be: larger than max, smaller than min, or outside of tot */ // XXX pre2.5 -> this used to be called test_view2d() -// XXX FIXME - this is an old mess function... let's rewrite! -void UI_view2d_status_enforce(View2D *v2d) +void UI_view2d_curRect_validate(View2D *v2d) { /* cur is not allowed to be larger than max, smaller than min, or outside of tot */ float totwidth, totheight, curwidth, curheight, width, height; - int winx, winy; + float winx, winy; rctf *cur, *tot; /* use mask as size of region that View2D resides in, as it takes into account scrollbars already */ - winx= v2d->mask.xmax - v2d->mask.xmin + 1; - winy= v2d->mask.ymax - v2d->mask.ymin + 1; + winx= (float)(v2d->mask.xmax - v2d->mask.xmin + 1); + winy= (float)(v2d->mask.ymax - v2d->mask.ymin + 1); /* get pointers to rcts for less typing */ cur= &v2d->cur; @@ -122,7 +121,7 @@ * - cur must not fall outside of tot * - axis locks (zoom and offset) must be maintained * - zoom must not be excessive (check either sizes or zoom values) -* - aspect ratio should be respected +* - aspect ratio should be respected (NOTE: this is quite closely realted to zoom too) */ /* Step 1: if keepzoom, adjust the sizes of the rects only @@ -136,9 +135,9 @@ /* if zoom is locked, size on the appropriate axis is reset to mask size */ if (v2d->keepzoom & V2D_LOCKZOOM_X) - width= (float)winy; + width= winx; if (v2d->keepzoom & V2D_LOCKZOOM_Y) - height= (float)winx; + height= winy; /* keepzoom (V2D_KEEPZOOM set), indicates that zoom level on each axis must not exceed limits * NOTE: in general, it is not expected that the lock-