diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-18 10:52:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-18 10:52:58 +0400 |
commit | ce744677d0fae047b0ea4dea465a1722f06e3f30 (patch) | |
tree | 471499d385eee8df2cbd296119b6a249d156e616 /source/blender | |
parent | a5a2a71ce3efe7a0b456a6dcadd1548391772882 (diff) |
svn merge ^/trunk/blender -c56871 -c56872 -c56873 -c56879 -c56880 -c56881 -c56882 -c56885
Diffstat (limited to 'source/blender')
12 files changed, 72 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 5c25469facc..74bf36adc6e 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -1389,10 +1389,6 @@ float *BKE_key_evaluate_object(Scene *scene, Object *ob, int *r_totelem) cp_cu_key(ob->data, key, actkb, kb, 0, tot, out, tot); } else { - /* do shapekey local drivers */ - float ctime = BKE_scene_frame_get(scene); - - BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS); if (ob->type == OB_MESH) do_mesh_key(scene, ob, key, out, tot); else if (ob->type == OB_LATTICE) do_latt_key(scene, ob, key, out, tot); diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 04ff1b4d3c2..262383fb4fc 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2700,6 +2700,7 @@ void BKE_object_handle_update_ex(Scene *scene, Object *ob, if (ob->recalc & OB_RECALC_DATA) { ID *data_id = (ID *)ob->data; AnimData *adt = BKE_animdata_from_id(data_id); + Key *key; float ctime = BKE_scene_frame_get(scene); if (G.debug & G_DEBUG) @@ -2710,6 +2711,12 @@ void BKE_object_handle_update_ex(Scene *scene, Object *ob, /* XXX: for mesh types, should we push this to derivedmesh instead? */ BKE_animsys_evaluate_animdata(scene, data_id, adt, ctime, ADT_RECALC_DRIVERS); } + + key = BKE_key_from_object(ob); + if (key && key->block.first) { + if (!(ob->shapeflag & OB_SHAPE_LOCK)) + BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS); + } /* includes all keys and modifiers */ switch (ob->type) { diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 7c454445e4f..e82bf2e21c8 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -638,8 +638,27 @@ void ExecutionGroup::setRenderBorder(float xmin, float xmax, float ymin, float y { NodeOperation *operation = this->getOutputNodeOperation(); - if (operation->isOutputOperation(true) && !(operation->isViewerOperation() || operation->isPreviewOperation())) { - BLI_rcti_init(&this->m_viewerBorder, xmin * this->m_width, xmax * this->m_width, - ymin * this->m_height, ymax * this->m_height); + if (operation->isOutputOperation(true)) { + /* Basically, setting border need to happen for only operatoins + * which operates in render resolution buffers (like compositor + * output nodes). + * + * In this cases adding border will lead to mapping coordinates + * from output buffer space to input buffer spaces when executing + * operation. + * + * But nodes like viewer and file output just shall display or + * safe the same exact buffer which goes to their input, no need + * in any kind of coordinates mapping. + */ + + bool operationNeedsBorder = !(operation->isViewerOperation() || + operation->isPreviewOperation() || + operation->isFileOutputOperation()); + + if (operationNeedsBorder) { + BLI_rcti_init(&this->m_viewerBorder, xmin * this->m_width, xmax * this->m_width, + ymin * this->m_height, ymax * this->m_height); + } } } diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h index 26a382929cb..114a00b9e8d 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.h +++ b/source/blender/compositor/intern/COM_NodeOperation.h @@ -247,6 +247,7 @@ public: virtual bool isViewerOperation() { return false; } virtual bool isPreviewOperation() { return false; } + virtual bool isFileOutputOperation() { return false; } inline bool isBreaked() { return this->m_btree->test_break(this->m_btree->tbh); diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h index 69d1ad48ced..ada40bba014 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.h +++ b/source/blender/compositor/operations/COM_OutputFileOperation.h @@ -56,6 +56,8 @@ public: void initExecution(); void deinitExecution(); const CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; } + + bool isFileOutputOperation() { return true; } }; /* extra info for OpenEXR layers */ @@ -90,6 +92,8 @@ public: void initExecution(); void deinitExecution(); const CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; } + + bool isFileOutputOperation() { return true; } }; #endif diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index e46def3be6f..c5211fe9dd7 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7606,6 +7606,14 @@ static int ui_handler_popup(bContext *C, const wmEvent *event, void *userdata) ui_popup_block_free(C, menu); UI_remove_popup_handlers(&CTX_wm_window(C)->modalhandlers, menu); +#ifdef USE_DRAG_TOGGLE + { + wmWindow *win = CTX_wm_window(C); + WM_event_free_ui_handler_all(C, &win->modalhandlers, + ui_handler_region_drag_toggle, ui_handler_region_drag_toggle_remove); + } +#endif + if ((temp.menuretval & UI_RETURN_OK) || (temp.menuretval & UI_RETURN_POPUP_OK)) { if (temp.popup_func) temp.popup_func(C, temp.popup_arg, temp.retvalue); diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index 7761ab0a42d..00304090818 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -153,6 +153,7 @@ static int rigidbody_object_add_exec(bContext *C, wmOperator *op) if (change) { /* send updates */ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); + WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, NULL); /* done */ return OPERATOR_FINISHED; @@ -197,6 +198,7 @@ static int rigidbody_object_remove_exec(bContext *C, wmOperator *op) if (change) { /* send updates */ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); + WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, NULL); /* done */ return OPERATOR_FINISHED; @@ -289,6 +291,7 @@ static int rigidbody_objects_remove_exec(bContext *C, wmOperator *UNUSED(op)) if (change) { /* send updates */ + WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, NULL); /* done */ diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index a30566d5b3f..6969b3bd9f0 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -271,16 +271,16 @@ static Brush *brush_tool_cycle(Main *bmain, Brush *brush_orig, const int tool, c } /* get the next brush with the active tool */ - for (brush = first_brush; - brush != brush_orig; - brush = brush->id.next ? brush->id.next : bmain->brush.first) - { + brush = first_brush; + do { if ((brush->ob_mode & ob_mode) && (brush_tool(brush, tool_offset) == tool)) { return brush; } - } + + brush = brush->id.next ? brush->id.next : bmain->brush.first; + } while (brush != first_brush); return NULL; } diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index d1684e91bea..bb4910413f6 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1381,9 +1381,9 @@ static void seq_draw_sfra_efra(Scene *scene, View2D *v2d) * frame range used is preview range or scene range */ UI_ThemeColorShadeAlpha(TH_BACK, -25, -100); - if (PSFRA < PEFRA) { + if (PSFRA < PEFRA+1) { glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax); - glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); + glRectf((float)(PEFRA+1), v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); } else { glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); @@ -1392,7 +1392,7 @@ static void seq_draw_sfra_efra(Scene *scene, View2D *v2d) UI_ThemeColorShade(TH_BACK, -60); /* thin lines where the actual frames are */ fdrawline((float)PSFRA, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax); - fdrawline((float)PEFRA, v2d->cur.ymin, (float)PEFRA, v2d->cur.ymax); + fdrawline((float)(PEFRA+1), v2d->cur.ymin, (float)(PEFRA+1), v2d->cur.ymax); glDisable(GL_BLEND); } diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index 57b00559a8a..0b0148f69b4 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -340,7 +340,7 @@ int mathutils_deepcopy_args_check(PyObject *args) /* Mathutils Callbacks */ /* for mathutils internal use only, eventually should re-alloc but to start with we only have a few users */ -#define MATHUTILS_TOT_CB 15 +#define MATHUTILS_TOT_CB 16 static Mathutils_Callback *mathutils_callbacks[MATHUTILS_TOT_CB] = {NULL}; unsigned char Mathutils_RegisterCallback(Mathutils_Callback *cb) diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index cfa914091f1..3cb93ab600a 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -159,6 +159,9 @@ void WM_event_remove_ui_handler(ListBase *handlers, void (*remove)(struct bContext *C, void *userdata), void *userdata, const bool postpone); void WM_event_remove_area_handler(struct ListBase *handlers, void *area); +void WM_event_free_ui_handler_all(struct bContext *C, ListBase *handlers, + int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata), + void (*remove)(struct bContext *C, void *userdata)); struct wmEventHandler *WM_event_add_modal_handler(struct bContext *C, struct wmOperator *op); void WM_event_remove_handlers(struct bContext *C, ListBase *handlers); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 89dc6ccc038..03a1785541e 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2476,6 +2476,21 @@ void WM_event_remove_ui_handler(ListBase *handlers, } } +void WM_event_free_ui_handler_all(bContext *C, ListBase *handlers, + wmUIHandlerFunc func, wmUIHandlerRemoveFunc remove) +{ + wmEventHandler *handler, *handler_next; + + for (handler = handlers->first; handler; handler = handler_next) { + handler_next = handler->next; + if (handler->ui_handle == func && handler->ui_remove == remove) { + remove(C, handler->ui_userdata); + BLI_remlink(handlers, handler); + wm_event_free_handler(handler); + } + } +} + wmEventHandler *WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes) { wmEventHandler *handler; |