From a8fc44299b04129573ed63af5649a9c5d3d83a13 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Wed, 17 Jan 2018 07:45:05 -0700 Subject: [PATCH 1/2] external_libs: Add openjpeg to the mavc lib folders for cycles standalone. --- build_files/build_environment/cmake/openjpeg.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build_files/build_environment/cmake/openjpeg.cmake b/build_files/build_environment/cmake/openjpeg.cmake index 16ac387ff54..37f9e6de32b 100644 --- a/build_files/build_environment/cmake/openjpeg.cmake +++ b/build_files/build_environment/cmake/openjpeg.cmake @@ -49,6 +49,13 @@ if(MSVC) CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF INSTALL_DIR ${LIBDIR}/openjpeg_msvc ) + if(BUILD_MODE STREQUAL Release) + ExternalProject_Add_Step(external_openjpeg_msvc after_install + COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib && + ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include + DEPENDEES install + ) + endif() endif() set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT}) From 5d4ffb42a327b08542e3556e7a98f1bc14d21c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 17 Jan 2018 17:14:31 +0100 Subject: [PATCH 2/2] Delete Invalid Drivers: more lenient poll function This function is faster and also allows for deletion of invalid drivers in nested data blocks (for example in shape keys). Thanks @sergey! --- source/blender/editors/space_graph/graph_edit.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 69feae6ee24..43a83929eb0 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -2803,6 +2803,20 @@ static int graph_driver_delete_invalid_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +static int graph_driver_delete_invalid_poll(bContext *C) +{ + bAnimContext ac; + ScrArea *sa = CTX_wm_area(C); + + /* firstly, check if in Graph Editor */ + if ((sa == NULL) || (sa->spacetype != SPACE_IPO)) + return 0; + + /* try to init Anim-Context stuff ourselves and check */ + return ANIM_animdata_get_context(C, &ac) != 0; +} + + void GRAPH_OT_driver_delete_invalid(wmOperatorType *ot) { /* identifiers */ @@ -2812,7 +2826,7 @@ void GRAPH_OT_driver_delete_invalid(wmOperatorType *ot) /* api callbacks */ ot->exec = graph_driver_delete_invalid_exec; - ot->poll = graphop_visible_keyframes_poll; + ot->poll = graph_driver_delete_invalid_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;