[Bf-blender-cvs] [78c380d] master: [MSVC] make.bat updates.
Commit: 78c380d3b84d53bf099b49571f0df67bea95bce2 Author: lazydodo Date: Wed Sep 28 19:57:25 2016 -0600 Branches: master https://developer.blender.org/rB78c380d3b84d53bf099b49571f0df67bea95bce2 [MSVC] make.bat updates. - The build folder name used to be depended on the order of the parameters, this is now normalized to "build_windows_[Release/Full/Lite/Headless/Cycles/Bpy]_[x86/x64]_vc[12/14]_[Release/Debug]" regardless of the order of the parameters. -Use CUDA8 for all kernels when building the release convenience target with visual studio 2015 === M make.bat === diff --git a/make.bat b/make.bat index 4f911c3..709febb 100644 --- a/make.bat +++ b/make.bat @@ -18,54 +18,34 @@ if NOT "%1" == "" ( REM Build Types if "%1" == "debug" ( - set BUILD_DIR=%BUILD_DIR%_debug set BUILD_TYPE=Debug - REM Build Configurations ) else if "%1" == "full" ( - set TARGET_SET=1 - set BUILD_DIR=%BUILD_DIR%_full + set TARGET=Full set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^ -C"%BLENDER_DIR%\build_files\cmake\config\blender_full.cmake" ) else if "%1" == "lite" ( - set TARGET_SET=1 - set BUILD_DIR=%BUILD_DIR%_lite + set TARGET=Lite set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^ -C"%BLENDER_DIR%\build_files\cmake\config\blender_lite.cmake" ) else if "%1" == "cycles" ( - set TARGET_SET=1 - set BUILD_DIR=%BUILD_DIR%_cycles + set TARGET=Cycles set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^ -C"%BLENDER_DIR%\build_files\cmake\config\cycles_standalone.cmake" ) else if "%1" == "headless" ( - set TARGET_SET=1 - set BUILD_DIR=%BUILD_DIR%_headless + set TARGET=Headless set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^ -C"%BLENDER_DIR%\build_files\cmake\config\blender_headless.cmake" ) else if "%1" == "bpy" ( - set TARGET_SET=1 - set BUILD_DIR=%BUILD_DIR%_bpy + set TARGET=Bpy set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^ -C"%BLENDER_DIR%\build_files\cmake\config\bpy_module.cmake" ) else if "%1" == "release" ( - set TARGET_SET=1 - if "%CUDA_PATH_V7_5%"=="" ( - echo Cuda 7.5 Not found, aborting! - goto EOF - ) - if "%CUDA_PATH_V8_0%"=="" ( - echo Cuda 8.0 Not found, aborting! - goto EOF - ) - set BUILD_DIR=%BUILD_DIR%_Release - set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^ - -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake" -DCUDA_NVCC_EXECUTABLE:FILEPATH=%CUDA_PATH_V7_5%/bin/nvcc.exe -DCUDA_NVCC8_EXECUTABLE:FILEPATH=%CUDA_PATH_V8_0%/bin/nvcc.exe + set TARGET=Release ) else if "%1" == "x86" ( set BUILD_ARCH=x86 - set BUILD_DIR=%BUILD_DIR%_x86 ) else if "%1" == "x64" ( set BUILD_ARCH=x64 - set BUILD_DIR=%BUILD_DIR%_x64 ) else if "%1" == "2015" ( set BUILD_VS_VER=14 set BUILD_VS_YEAR=2015 @@ -105,10 +85,13 @@ if NOT "%1" == "" ( if "%BUILD_ARCH%"=="" ( if "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( set WINDOWS_ARCH= Win64 + set BUILD_ARCH=x64 ) else if "%PROCESSOR_ARCHITEW6432%" == "AMD64" ( set WINDOWS_ARCH= Win64 + set BUILD_ARCH=x64 ) else ( set WINDOWS_ARCH= + set BUILD_ARCH=x86 ) ) else if "%BUILD_ARCH%"=="x64" ( set WINDOWS_ARCH= Win64 @@ -121,7 +104,30 @@ if "%BUILD_VS_VER%"=="" ( set BUILD_VS_YEAR=2013 ) -set BUILD_DIR=%BUILD_DIR%_vc%BUILD_VS_VER% +set BUILD_DIR=%BUILD_DIR%_%TARGET%_%BUILD_ARCH%_vc%BUILD_VS_VER%_%BUILD_TYPE% + + +if "%target%"=="Release" ( + rem for vc12 check for both cuda 7.5 and 8 + if "%BUILD_VS_VER%"=="12" ( + if "%CUDA_PATH_V7_5%"=="" ( + echo Cuda 7.5 Not found, aborting! + goto EOF + ) + ) + if "%CUDA_PATH_V8_0%"=="" ( + echo Cuda 8.0 Not found, aborting! + goto EOF + ) + if "%BUILD_VS_VER%"=="12" ( + set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^ + -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake"
[Bf-blender-cvs] [f1de438] master: Revert "[Windows/MSVC] Blosc doesn't require debug libraries."
Commit: f1de438bba0fd6b525ea04d094b8a08737144e82 Author: lazydodo Date: Wed Sep 28 17:27:35 2016 -0600 Branches: master https://developer.blender.org/rBf1de438bba0fd6b525ea04d094b8a08737144e82 Revert "[Windows/MSVC] Blosc doesn't require debug libraries." turns out it's a C++ lib now-days and it *DOES* require debug libs. This reverts commit bde5eb8b6303d8d92b7c41d4a3f041bbb73c162d. === M build_files/cmake/platform/platform_win32_msvc.cmake === diff --git a/build_files/cmake/platform/platform_win32_msvc.cmake b/build_files/cmake/platform/platform_win32_msvc.cmake index 961cada..5efda52 100644 --- a/build_files/cmake/platform/platform_win32_msvc.cmake +++ b/build_files/cmake/platform/platform_win32_msvc.cmake @@ -414,7 +414,7 @@ if(WITH_OPENCOLORIO) endif() if(WITH_OPENVDB) - set(BLOSC_LIBRARIES ${LIBDIR}/blosc/lib/libblosc.lib ) + set(BLOSC_LIBRARIES optimized ${LIBDIR}/blosc/lib/libblosc.lib debug ${LIBDIR}/blosc/lib/libblosc_d.lib) set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib) set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include) set(OPENVDB ${LIBDIR}/openvdb) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [26d7d99] master: Fix Windows mouse wheel scroll speed
Commit: 26d7d995dbef20040664372a836d166b0a638ccb Author: lazydodo Date: Wed Sep 28 17:19:16 2016 -0600 Branches: master https://developer.blender.org/rB26d7d995dbef20040664372a836d166b0a638ccb Fix Windows mouse wheel scroll speed In Windows, event dispatching code is throwing out the wheel scroll count value. Despite of how many fast you move the wheel, it only make one-notch scroll event. This patch convert wheel event to multiple 1-notch wheel events. This also correct the handling of smooth scroll mouse wheel (which can report smaller than 1-notch wheel movement) by accumulating the small wheel delta values. Reviewers: djnz, shadowrom, elubie, #platform:_windows, sergey, juicyfruit, brecht Reviewed By: shadowrom, elubie, #platform:_windows, brecht Subscribers: dingto, elubie, brachi, brecht Differential Revision: https://developer.blender.org/D143 === M intern/ghost/intern/GHOST_SystemWin32.cpp M intern/ghost/intern/GHOST_SystemWin32.h === diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 60e7815..e436345 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -712,18 +712,26 @@ GHOST_EventCursor *GHOST_SystemWin32::processCursorEvent(GHOST_TEventType type, } -GHOST_EventWheel *GHOST_SystemWin32::processWheelEvent(GHOST_WindowWin32 *window, WPARAM wParam, LPARAM lParam) +void GHOST_SystemWin32::processWheelEvent(GHOST_WindowWin32 *window, WPARAM wParam, LPARAM lParam) { - // short fwKeys = LOWORD(wParam); // key flags - int zDelta = (short) HIWORD(wParam);// wheel rotation - - // zDelta /= WHEEL_DELTA; - // temporary fix below: microsoft now has added more precision, making the above division not work - zDelta = (zDelta <= 0) ? -1 : 1; + GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem(); - // short xPos = (short) LOWORD(lParam); // horizontal position of pointer - // short yPos = (short) HIWORD(lParam); // vertical position of pointer - return new GHOST_EventWheel(getSystem()->getMilliSeconds(), window, zDelta); + int acc = system->m_wheelDeltaAccum; + int delta = GET_WHEEL_DELTA_WPARAM(wParam); + + if (acc * delta < 0) { + // scroll direction reversed. + acc = 0; + } + acc += delta; + int direction = (acc >= 0) ? 1 : -1; + acc = abs(acc); + + while (acc >= WHEEL_DELTA) { + system->pushEvent(new GHOST_EventWheel(system->getMilliSeconds(), window, direction)); + acc -= WHEEL_DELTA; + } + system->m_wheelDeltaAccum = acc * direction; } @@ -1137,14 +1145,9 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, POINT mouse_pos = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; HWND mouse_hwnd = ChildWindowFromPoint(HWND_DESKTOP, mouse_pos); GHOST_WindowWin32 *mouse_window = (GHOST_WindowWin32 *)::GetWindowLongPtr(mouse_hwnd, GWLP_USERDATA); - if (mouse_window != NULL) { - event = processWheelEvent(mouse_window, wParam, lParam); - } - else { - /* Happens when mouse is not over any of blender's windows. */ - event = processWheelEvent(window, wParam, lParam); - } - + + processWheelEvent(mouse_window ? mouse_window : window , wParam, lParam); + eventHandled = true; #ifdef BROKEN_PEEK_TOUCHPAD PostMessage(hwnd, WM_USER, 0, 0); #endif @@ -1203,6 +1206,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, GHOST_ModifierKeys modifiers; modifiers.clear(); system->storeModifierKeys(modifiers); + system->m_wheelDeltaAccum = 0; event = processWindowEvent(LOWORD(wParam) ? GHOST_kEventWindowActivate : GHOST_kEventWindowDeactivate, window); /* WARNING: Let DefWindowProc handle WM_ACTIVATE, otherwise WM_MOUSEWHEEL * will not be dispatched to OUR active window if we minimize one of OUR windows. */ diff --git
[Bf-blender-cvs] [f6a8145] temp_manipulators_core: Fix some errors in last commit
Commit: f6a814554a94bf0f0904a0e9b67e4fcc4d403c6b Author: Julian Eisel Date: Thu Sep 29 00:55:35 2016 +0200 Branches: temp_manipulators_core https://developer.blender.org/rBf6a814554a94bf0f0904a0e9b67e4fcc4d403c6b Fix some errors in last commit === M source/blender/windowmanager/intern/wm_event_system.c M source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c === diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 03a18fa..d9f387c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2114,10 +2114,12 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers /* handle manipulator highlighting */ if (event->type == MOUSEMOVE && !wm_manipulatormap_get_active_manipulator(mmap)) { /* TODO should check for both, 2D and 3D manipulators and choose the one closest to cursor */ - manipulator = wm_manipulatormap_find_highlighted_3D(mmap, C, event, ); - wm_manipulatormap_set_highlighted_manipulator(mmap, C, manipulator, part); - manipulator = wm_manipulatormap_find_highlighted_manipulator(mmap, C, event, ); - wm_manipulatormap_set_highlighted_manipulator(mmap, C, manipulator, part); + if ((manipulator = wm_manipulatormap_find_highlighted_3D(mmap, C, event, ))) { + wm_manipulatormap_set_highlighted_manipulator(mmap, C, manipulator, part); + } + else if ((manipulator = wm_manipulatormap_find_highlighted_manipulator(mmap, C, event, ))) { + wm_manipulatormap_set_highlighted_manipulator(mmap, C, manipulator, part); + } } /* handle user configurable manipulator-map keymap */ else if (manipulator) { diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c index f5baebc..d79de5c 100644 --- a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c +++ b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c @@ -390,7 +390,7 @@ static void manipulators_prepare_visible_3D(wmManipulatorMap *mmap, ListBase *vi wmManipulator *manipulator; for (wmManipulatorGroup *mgroup = mmap->manipulator_groups.first; mgroup; mgroup = mgroup->next) { - if (mgroup->flag & WM_MANIPULATORGROUPTYPE_3D) { + if (mgroup->type->flag & WM_MANIPULATORGROUPTYPE_3D) { if (!mgroup->type->poll || mgroup->type->poll(C, mgroup->type)) { for (manipulator = mgroup->manipulators.first; manipulator; manipulator = manipulator->next) { if (manipulator->render_3d_intersection && (manipulator->flag & WM_MANIPULATOR_HIDDEN) == 0) { @@ -441,7 +441,7 @@ void WM_manipulatormaps_add_handlers(ARegion *ar, wmManipulatorMap *mmap) { wmEventHandler *handler = MEM_callocN(sizeof(wmEventHandler), "manipulator handler"); - BLI_assert(handler->manipulator_map == ar->manipulator_map); + BLI_assert(mmap == ar->manipulator_map); handler->manipulator_map = mmap; BLI_addtail(>handlers, handler); } @@ -453,7 +453,7 @@ void wm_manipulatormaps_handled_modal_update( const bool modal_running = (handler->op != NULL); /* happens on render */ - if (!handler->op_region) + if (!handler->op_region || !handler->op_region->manipulator_map) return; /* hide operator manipulators */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [2976d3e] custom-manipulators: Make branch compile after latest merge
Commit: 2976d3e12038c26c159505826bc20fb2fe91ab40 Author: Julian Eisel Date: Thu Sep 29 00:53:11 2016 +0200 Branches: custom-manipulators https://developer.blender.org/rB2976d3e12038c26c159505826bc20fb2fe91ab40 Make branch compile after latest merge === M source/blender/blenloader/intern/readfile.c M source/blender/editors/armature/pose_select.c M source/blender/editors/object/object_edit.c M source/blender/editors/space_graph/graph_edit.c M source/blender/editors/space_graph/space_graph.c M source/blender/editors/space_image/space_image.c M source/blender/editors/space_node/node_draw.c M source/blender/editors/space_node/space_node.c M source/blender/editors/space_sequencer/sequencer_draw.c M source/blender/editors/space_sequencer/sequencer_view.c M source/blender/editors/space_sequencer/space_sequencer.c M source/blender/editors/space_view3d/space_view3d.c M source/blender/editors/space_view3d/view3d_draw.c M source/blender/editors/space_view3d/view3d_widgets.c M source/blender/makesdna/DNA_screen_types.h M source/blender/makesrna/intern/rna_wm.c M source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h === diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 42004ff..ae677ca 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6523,7 +6523,6 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype) BLI_listbase_clear(>panels_category); BLI_listbase_clear(>handlers); BLI_listbase_clear(>uiblocks); - BLI_listbase_clear(>manipulator_maps); ar->headerstr = NULL; ar->swinid = 0; ar->type = NULL; diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index a4f7860..eff14cd 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -374,7 +374,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) /* handle facemap widget selection */ if ((ob->mode & OB_MODE_POSE) && has_facemap) { - WM_manipulatormap_select_all(C, (wmManipulatorMap *)ar->manipulator_maps.first, action); + WM_manipulatormap_select_all(C, ar->manipulator_map, action); } WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index d7a6681..c45b9a9 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -2182,9 +2182,9 @@ void OBJECT_OT_game_physics_copy(struct wmOperatorType *ot) static int object_widget_add_exec(bContext *C, wmOperator *UNUSED(op)) { Object *ob = ED_object_active_context((bContext *)C); - wmManipulatorMapType *wmaptype = WM_manipulatormaptype_find(&(const struct wmManipulatorMapType_Params) { - "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, WM_MANIPULATORMAPTYPE_3D}); - wmManipulatorGroupType *wgrouptype = WM_manipulatorgrouptype_append(wmaptype, TRANSFORM_WGT_object); + wmManipulatorMapType *mmaptype = WM_manipulatormaptype_find(&(const struct wmManipulatorMapType_Params) { + "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW}); + wmManipulatorGroupType *wgrouptype = WM_manipulatorgrouptype_append(mmaptype, TRANSFORM_WGT_object); /* assign the objects id name to the widget */ strcpy(wgrouptype->idname, ob->id.name); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 89918b9..971f8a3 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -2842,7 +2842,6 @@ static void graph_widget_backdrop_transform_cancel(struct bContext *C, struct wm static int graph_widget_backdrop_transform_modal(bContext *C, wmOperator *op, const wmEvent *event) { ARegion *ar = CTX_wm_region(C); - wmManipulatorMap *wmap = ar->manipulator_maps.first; BackDropTransformData *data = op->customdata; if (event->type == data->event_type && event->val == KM_PRESS) { @@ -2884,7 +2883,7 @@ static int graph_widget_backdrop_transform_modal(bContext *C, wmOperator *op, co SpaceIpo *sipo = CTX_wm_space_graph(C); /* only end modal if we're not dragging a widget - XXX */ - if (/*!wmap->mmap_context.active_manipulator && */event->val == KM_PRESS) { + if (/*!ar->manipulator_map->mmap_context.active_manipulator && */event->val == KM_PRESS) {
[Bf-blender-cvs] [c5d8a67] custom-manipulators: Merge branch 'temp_manipulators_core' into custom-manipulators
Commit: c5d8a674f943a72f44dfe3f40d7477a6a0549e5f Author: Julian Eisel Date: Thu Sep 29 00:22:20 2016 +0200 Branches: custom-manipulators https://developer.blender.org/rBc5d8a674f943a72f44dfe3f40d7477a6a0549e5f Merge branch 'temp_manipulators_core' into custom-manipulators Conflicts: source/blender/blenkernel/BKE_screen.h source/blender/blenkernel/intern/screen.c source/blender/editors/interface/resources.c source/blender/editors/screen/screen_edit.c source/blender/editors/space_api/spacetypes.c source/blender/makesdna/DNA_userdef_types.h source/blender/makesdna/DNA_view3d_types.h source/blender/windowmanager/CMakeLists.txt source/blender/windowmanager/WM_api.h source/blender/windowmanager/intern/wm_event_system.c source/blender/windowmanager/intern/wm_init_exit.c source/blender/windowmanager/manipulators/WM_manipulator_api.h source/blender/windowmanager/manipulators/WM_manipulator_types.h source/blender/windowmanager/manipulators/intern/wm_manipulator.c source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h source/blender/windowmanager/manipulators/intern/wm_manipulatorgroup.c source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h === === diff --cc source/blender/makesdna/DNA_screen_types.h index c89aaff,9ac1852..9f870d3 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@@ -265,11 -264,11 +265,12 @@@ typedef struct ARegion ListBase ui_lists; /* uiList */ ListBase ui_previews; /* uiPreview */ ListBase handlers; /* wmEventHandler */ + ListBase manipulator_maps; /* wmManipulatorMap */ ListBase panels_category; /* Panel categories runtime */ - + + struct wmManipulatorMap *manipulator_map; /* manipulator map of this region */ struct wmTimer *regiontimer; /* blend in/out */ - + char *headerstr;/* use this string to draw info */ void *regiondata; /* XXX 2.50, need spacedata equivalent? */ } ARegion; diff --cc source/blender/windowmanager/wm.h index 3960290,3dd2941..2c4342c --- a/source/blender/windowmanager/wm.h +++ b/source/blender/windowmanager/wm.h @@@ -33,16 -33,9 +33,18 @@@ struct wmWindow; struct ReportList; +struct wmEvent; +struct wmOperatorType; +struct PointerRNA; +struct PropertyRNA; +struct wmOperator; + +#include "manipulators/wm_manipulator_wmapi.h" /* manipulators wm API */ + +#include "manipulators/wm_manipulator_wmapi.h" + #include "manipulators/wm_manipulator_wmapi.h" + typedef struct wmPaintCursor { struct wmPaintCursor *next, *prev; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [075bf33] custom-manipulators temp_manipulators_core: Regions now use a single manipulator-map again
Commit: 075bf33e0f5494cc55ffde7428e9a6983d1fec75 Author: Julian Eisel Date: Thu Sep 29 00:07:58 2016 +0200 Branches: custom-manipulators temp_manipulators_core https://developer.blender.org/rB075bf33e0f5494cc55ffde7428e9a6983d1fec75 Regions now use a single manipulator-map again Instead of having multiple manipulator-maps for 2D and 3D manipulators, manipulator-group-types should be tagged as being either 2D or 3D. When it comes to drawing these can be drawn separately. Note that more work needs to be done here (added some todo marks), but there are probably going to be quite a few issues when merging into custom_manipulators, so will handle these first. === M source/blender/blenkernel/BKE_screen.h M source/blender/blenkernel/intern/screen.c M source/blender/blenloader/intern/readfile.c M source/blender/editors/screen/screen_edit.c M source/blender/makesdna/DNA_screen_types.h M source/blender/windowmanager/intern/wm_event_system.c M source/blender/windowmanager/intern/wm_init_exit.c M source/blender/windowmanager/manipulators/WM_manipulator_api.h M source/blender/windowmanager/manipulators/WM_manipulator_types.h M source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h M source/blender/windowmanager/manipulators/intern/wm_manipulatorgroup.c M source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c M source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h === diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 3768074..2e42cfc 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -49,6 +49,7 @@ struct bScreen; struct uiLayout; struct uiList; struct wmKeyConfig; +struct wmManipulatorMap; struct wmNotifier; struct wmWindow; struct wmWindowManager; @@ -288,7 +289,7 @@ struct ARegion *BKE_area_region_copy(struct SpaceType *st, struct ARegion *ar); voidBKE_area_region_free(struct SpaceType *st, struct ARegion *ar); voidBKE_screen_area_free(struct ScrArea *sa); /* Manipulator-maps of a region need to be freed with the region. Uses callback to avoid low-level call. */ -void BKE_region_callback_free_manipulatormaps_set(void (*callback)(ListBase *list)); +void BKE_region_callback_free_manipulatormap_set(void (*callback)(struct wmManipulatorMap *)); struct ARegion *BKE_area_find_region_type(struct ScrArea *sa, int type); struct ARegion *BKE_area_find_region_active_win(struct ScrArea *sa); diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index ac59f2e..1482056 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -179,8 +179,8 @@ ARegion *BKE_area_region_copy(SpaceType *st, ARegion *ar) BLI_listbase_clear(>panels_category); BLI_listbase_clear(>panels_category_active); BLI_listbase_clear(>ui_lists); - BLI_listbase_clear(>manipulator_maps); newar->swinid = 0; + newar->manipulator_map = NULL; newar->regiontimer = NULL; /* use optional regiondata callback */ @@ -293,11 +293,11 @@ void BKE_spacedata_id_unref(struct ScrArea *sa, struct SpaceLink *sl, struct ID /** * Avoid bad-level calls to #WM_manipulatormap_delete. */ -static void (*region_free_manipulatormaps_callback)(ListBase *) = NULL; +static void (*region_free_manipulatormap_callback)(struct wmManipulatorMap *) = NULL; -void BKE_region_callback_free_manipulatormaps_set(void (*callback)(ListBase *list)) +void BKE_region_callback_free_manipulatormap_set(void (*callback)(struct wmManipulatorMap *)) { - region_free_manipulatormaps_callback = callback; + region_free_manipulatormap_callback = callback; } /* not region itself */ @@ -350,7 +350,7 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar) } } - region_free_manipulatormaps_callback(>manipulator_maps); + region_free_manipulatormap_callback(ar->manipulator_map); BLI_freelistN(>ui_lists); BLI_freelistN(>ui_previews); BLI_freelistN(>panels_category); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4a6d0b0..1c814d3 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6904,12 +6904,12 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype) BLI_listbase_clear(>panels_category); BLI_listbase_clear(>handlers); BLI_listbase_clear(>uiblocks); - BLI_listbase_clear(>manipulator_maps); ar->headerstr = NULL; ar->swinid = 0; ar->type = NULL; ar->swap = 0; ar->do_draw = 0; +
[Bf-blender-cvs] [6b550a5] fracture_modifier: crash fix for direct text fracture (prefractured) -> bmesh use_toolflags set incorrectly
Commit: 6b550a563ef3a76245f11c5265fcca2431a00646 Author: Martin Felke Date: Wed Sep 28 22:52:10 2016 +0200 Branches: fracture_modifier https://developer.blender.org/rB6b550a563ef3a76245f11c5265fcca2431a00646 crash fix for direct text fracture (prefractured) -> bmesh use_toolflags set incorrectly === M source/blender/modifiers/intern/MOD_fracture.c === diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c index 73fda78..8d71fa9 100644 --- a/source/blender/modifiers/intern/MOD_fracture.c +++ b/source/blender/modifiers/intern/MOD_fracture.c @@ -686,7 +686,8 @@ static DerivedMesh *get_clean_dm(Object *ob, DerivedMesh *dm) DerivedMesh *result = NULL; /* convert to BMesh, remove doubles, limited dissolve and convert back */ - BMesh *bm = DM_to_bmesh(dm, true); + BMesh *bm = BM_mesh_create(_mesh_allocsize_default, &((struct BMeshCreateParams){.use_toolflags = true,})); + DM_to_bmesh_ex(dm, bm, true); BMO_op_callf(bm, (BMO_FLAG_DEFAULTS & ~BMO_FLAG_RESPECT_HIDE), "remove_doubles verts=%av dist=%f", BM_VERTS_OF_MESH, 0.0001, false); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9bac74c] blender2.8: Complement fixup for 4a1feaa5558ed603 (texture shaders)
Commit: 9bac74c27b329545022d40b2969305d47a25213c Author: Dalai Felinto Date: Wed Sep 28 19:02:53 2016 + Branches: blender2.8 https://developer.blender.org/rB9bac74c27b329545022d40b2969305d47a25213c Complement fixup for 4a1feaa5558ed603 (texture shaders) We now multiply the alpha by the image alpha (as per severin suggestion). That still doesn't solve the main question of user preference drawing black. === M source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl M source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl === diff --git a/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl index 69bc616..d0915eb 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl @@ -11,5 +11,6 @@ uniform sampler2D texture_map; void main() { - fragColor = vec4(texture2D(texture_map, texture_coord).rgb, alpha); + fragColor = texture2D(texture_map, texture_coord) + fragColor.a *= alpha; } diff --git a/source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl index 75298bc..bc80501 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl @@ -11,5 +11,6 @@ uniform sampler2DRect texture_map; void main() { - fragColor = vec4(texture2DRect(texture_map, texture_coord).rgb, alpha); + fragColor = texture2DRect(texture_map, texture_coord); + fragColor.a *= alpha; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4c7ff8f] blender2.8: Fix animation transition in region overlay not working since 4a1feaa5
Commit: 4c7ff8fb1e3c59439cdd8181b10f6b6dfc478033 Author: Dalai Felinto Date: Wed Sep 28 18:48:51 2016 + Branches: blender2.8 https://developer.blender.org/rB4c7ff8fb1e3c59439cdd8181b10f6b6dfc478033 Fix animation transition in region overlay not working since 4a1feaa5 We still have stills with the User Preference window, though. === M source/blender/gpu/gawain/immediate.c M source/blender/gpu/gawain/immediate.h M source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl M source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl M source/blender/windowmanager/intern/wm_draw.c M source/blender/windowmanager/intern/wm_stereo.c === diff --git a/source/blender/gpu/gawain/immediate.c b/source/blender/gpu/gawain/immediate.c index 9c3904f..7edc4e2 100644 --- a/source/blender/gpu/gawain/immediate.c +++ b/source/blender/gpu/gawain/immediate.c @@ -622,6 +622,17 @@ void immVertex3fv(unsigned attrib_id, const float data[3]) immEndVertex(); } +void immUniform1f(const char* name, float x) +{ + int loc = glGetUniformLocation(imm.bound_program, name); + +#if TRUST_NO_ONE + assert(loc != -1); +#endif + + glUniform1f(loc, x); +} + void immUniform4f(const char* name, float x, float y, float z, float w) { int loc = glGetUniformLocation(imm.bound_program, name); diff --git a/source/blender/gpu/gawain/immediate.h b/source/blender/gpu/gawain/immediate.h index 84fb076..3fcf856 100644 --- a/source/blender/gpu/gawain/immediate.h +++ b/source/blender/gpu/gawain/immediate.h @@ -66,6 +66,7 @@ void immVertex3fv(unsigned attrib_id, const float data[3]); void immVertex2iv(unsigned attrib_id, const int data[2]); // provide values that don't change for the entire draw call +void immUniform1f(const char* name, float x); void immUniform4f(const char* name, float x, float y, float z, float w); // these set "uniform vec4 color" diff --git a/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl index 6029fd8..69bc616 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl @@ -6,9 +6,10 @@ out vec4 fragColor; #endif +uniform float alpha; uniform sampler2D texture_map; void main() { - fragColor = texture2D(texture_map, texture_coord); + fragColor = vec4(texture2D(texture_map, texture_coord).rgb, alpha); } diff --git a/source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl index d32b8ba..75298bc 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl @@ -6,9 +6,10 @@ out vec4 fragColor; #endif +uniform float alpha; uniform sampler2DRect texture_map; void main() { - fragColor = texture2DRect(texture_map, texture_coord); + fragColor = vec4(texture2DRect(texture_map, texture_coord).rgb, alpha); } diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 4303ce3..e9eaa56 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -455,6 +455,7 @@ void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple, float alpha) glBindTexture(triple->target, triple->bind); + immUniform1f("alpha", alpha); immUniform1i("texture_map", 0); immBegin(GL_QUADS, 4); diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index ea9a09d..e2b6df6 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -282,6 +282,7 @@ static void wm_method_draw_stereo3d_topbottom(wmWindow *win) glBindTexture(triple->target, triple->bind); + immUniform1f("alpha", 1.0f); immUniform1i("texture_map", 0); immBegin(GL_QUADS, 4); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [344a669] master: Fix T49478: triangulate of face hangs Blender.
Commit: 344a669c412a5eb5b71555a18aa85ef7a16b253f Author: Bastien Montagne Date: Wed Sep 28 20:03:59 2016 +0200 Branches: master https://developer.blender.org/rB344a669c412a5eb5b71555a18aa85ef7a16b253f Fix T49478: triangulate of face hangs Blender. Another case of float imprecision leading to endless loop. INcreasing a bit 'noise threashold' seems to work OK. Not a regression, but might be nice to have in 2.78a. === M source/blender/blenlib/intern/polyfill2d_beautify.c === diff --git a/source/blender/blenlib/intern/polyfill2d_beautify.c b/source/blender/blenlib/intern/polyfill2d_beautify.c index 46f9251..896177f 100644 --- a/source/blender/blenlib/intern/polyfill2d_beautify.c +++ b/source/blender/blenlib/intern/polyfill2d_beautify.c @@ -239,8 +239,9 @@ static void polyedge_beauty_cost_update_single( const float cost = polyedge_rotate_beauty_calc(coords, tris, e); /* We can get cases where both choices generate very small negative costs, which leads to infinite loop. * Anyway, costs above that are not worth recomputing, maybe we could even optimize it to a smaller limit? -* See T43578. */ - if (cost < -FLT_EPSILON) { +* Actually, FLT_EPSILON is too small in some cases, 1e-6f seems to work OK hopefully? +* See T43578, T49478. */ + if (cost < -1e-6f) { eheap_table[i] = BLI_heap_insert(eheap, cost, e); } else { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1c17b2d] temp-sybren-poselib: WIP pose library stuff
Commit: 1c17b2dff84f11f800dd7bf6dd521e1a81e9f874 Author: Sybren A. Stüvel Date: Wed Sep 28 17:57:16 2016 +0200 Branches: temp-sybren-poselib https://developer.blender.org/rB1c17b2dff84f11f800dd7bf6dd521e1a81e9f874 WIP pose library stuff === A release/scripts/startup/bl_operators/poselib.py M release/scripts/startup/bl_ui/properties_data_armature.py M source/blender/blenkernel/intern/anim_sys.c M source/blender/editors/armature/pose_lib.c M source/blender/editors/armature/pose_transform.c === diff --git a/release/scripts/startup/bl_operators/poselib.py b/release/scripts/startup/bl_operators/poselib.py new file mode 100644 index 000..7b550df --- /dev/null +++ b/release/scripts/startup/bl_operators/poselib.py @@ -0,0 +1,78 @@ +# # BEGIN GPL LICENSE BLOCK # +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# # END GPL LICENSE BLOCK # + +# + +if "bpy" in locals(): +from importlib import reload +if "anim_utils" in locals(): +reload(anim_utils) +del reload + + +import bpy +from bpy.types import Operator +from bpy.props import ( +IntProperty, +BoolProperty, +EnumProperty, +StringProperty, +) + + +class POSELIB_OT_render_previews(Operator): +"Renders a preview image for each pose in the pose library" + +bl_idname = "poselib.render_previews" +bl_label = "Render pose previews" + +render_method = EnumProperty( +items=[ +('OPENGL', 'OpenGL render', 'Use the OpenGL viewport render'), +('FULL', 'Full render', 'Use the same render engine as the scene'), +], +default='OPENGL' +) + +plib_index = 0 + +@classmethod +def poll(cls, context): +"""Running only makes sense if there are any poses in the library.""" +plib = context.object and context.object.pose_library +return bool(plib and plib.pose_markers) + +def execute(self, context): +plib = context.object.pose_library + +if self.plib_index >= len(plib.pose_markers): +return {'FINISHED'} + +self.render_pose(self.plib_index) +self.plib_index += 1 + +return {'RUNNING_MODAL'} + +def render_pose(self, plib_index): +bpy.ops.poselib.apply_pose(pose_index=plib_index) + +def invoke(self, context, event): +wm = context.window_manager +wm.modal_handler_add(self) +self.plib_index = 0 +return {'RUNNING_MODAL'} diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index 8261f0c..fef384b 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -205,6 +205,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel): col.operator("poselib.pose_move", icon='TRIA_UP', text="").direction = 'UP' col.operator("poselib.pose_move", icon='TRIA_DOWN', text="").direction = 'DOWN' +row.operator("poselib.render_previews") # TODO: this panel will soon be deprecated too class DATA_PT_ghost(ArmatureButtonsPanel, Panel): diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index e3764ad..b41030e 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -59,6 +59,7 @@ #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_context.h" +#include "BKE_deform.h" #include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_nla.h" diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 9309592..a0b483c 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -45,6 +45,7 @@ #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" +#include "BKE_deform.h" #include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" @@ -866,7 +867,8 @@ enum { /* defines for tPoseLib_PreviewData->flag values */ enum { PL_PREVIEW_FIRSTTIME
[Bf-blender-cvs] [0ec87f1] master: Cycles: Cleanup, indentation
Commit: 0ec87f122721b13c747279703b963242bbc23998 Author: Sergey Sharybin Date: Wed Sep 28 17:05:33 2016 +0200 Branches: master https://developer.blender.org/rB0ec87f122721b13c747279703b963242bbc23998 Cycles: Cleanup, indentation === M intern/cycles/kernel/closure/bsdf_microfacet.h === diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h index 9da73f6..7c36f05 100644 --- a/intern/cycles/kernel/closure/bsdf_microfacet.h +++ b/intern/cycles/kernel/closure/bsdf_microfacet.h @@ -267,7 +267,7 @@ ccl_device bool bsdf_microfacet_merge(const ShaderClosure *a, const ShaderClosur (isequal_float3(bsdf_a->T, bsdf_b->T)) && (bsdf_a->ior == bsdf_b->ior) && ((!bsdf_a->extra && !bsdf_b->extra) || -((bsdf_a->extra && bsdf_b->extra) && + ((bsdf_a->extra && bsdf_b->extra) && (isequal_float3(bsdf_a->extra->color, bsdf_b->extra->color; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e1bfb89] master: Cycles: Fix compilation error with minimal feature set
Commit: e1bfb89da25e1e879d046144dfccb12e914c97c0 Author: Sergey Sharybin Date: Wed Sep 28 17:03:42 2016 +0200 Branches: master https://developer.blender.org/rBe1bfb89da25e1e879d046144dfccb12e914c97c0 Cycles: Fix compilation error with minimal feature set === M intern/cycles/kernel/closure/bsdf.h M intern/cycles/kernel/kernel_shader.h === diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h index 1e7fbdb..2ab92ba 100644 --- a/intern/cycles/kernel/closure/bsdf.h +++ b/intern/cycles/kernel/closure/bsdf.h @@ -374,6 +374,8 @@ ccl_device bool bsdf_merge(ShaderClosure *a, ShaderClosure *b) default: return false; } +#else + return false; #endif } diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index c36d940..3e098c9 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -851,11 +851,11 @@ ccl_device void shader_eval_surface(KernelGlobals *kg, ShaderData *sd, ccl_addr_ #ifdef __SVM__ svm_eval_nodes(kg, sd, state, SHADER_TYPE_SURFACE, path_flag); #else - ccl_fetch_array(sd, closure, 0)->weight = make_float3(0.8f, 0.8f, 0.8f); - ccl_fetch_array(sd, closure, 0)->N = ccl_fetch(sd, N); - ccl_fetch_array(sd, closure, 0)->data0 = 0.0f; - ccl_fetch_array(sd, closure, 0)->data1 = 0.0f; - ccl_fetch(sd, flag) |= bsdf_diffuse_setup(ccl_fetch_array(sd, closure, 0)); + DiffuseBsdf *bsdf = (DiffuseBsdf*)bsdf_alloc(sd, + sizeof(DiffuseBsdf), +make_float3(0.8f, 0.8f, 0.8f)); + bsdf->N = ccl_fetch(sd, N); + ccl_fetch(sd, flag) |= bsdf_diffuse_setup(bsdf); #endif } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c5d7602] master: Fix T49471: Vertex Connect randomly broken.
Commit: c5d760292571a213bf7c6eaa4f818a7cea10390d Author: Bastien Montagne Date: Wed Sep 28 16:56:19 2016 +0200 Branches: master https://developer.blender.org/rBc5d760292571a213bf7c6eaa4f818a7cea10390d Fix T49471: Vertex Connect randomly broken. Not sure where this comes from, but code was converting BMEdge* to BMVert* to check oflags, i.e. not accessing correct memory. Regression, to be backported to 2.78a. === M source/blender/bmesh/operators/bmo_connect_pair.c === diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c b/source/blender/bmesh/operators/bmo_connect_pair.c index 05322a5..a73c86f 100644 --- a/source/blender/bmesh/operators/bmo_connect_pair.c +++ b/source/blender/bmesh/operators/bmo_connect_pair.c @@ -48,7 +48,7 @@ * - store a heap of paths which are being scanned (#PathContext.states). * - continuously search the shortest path in the heap. * - never step over the same element twice (tag elements as #ELE_TOUCHED). - * this avoids going into an eternal loop of there are many possible branches (see T45582). + * this avoids going into an eternal loop if there are many possible branches (see T45582). * - when running into a branch, create a new #PathLinkState state and add to the heap. * - when the target is reached, finish - since none of the other paths can be shorter then the one just found. * - if the connection can't be found - fail. @@ -82,13 +82,13 @@ #define ELE_TOUCH_TEST_VERT(v) BMO_vert_flag_test(pc->bm_bmoflag, v, ELE_TOUCHED) -// #define ELE_TOUCH_MARK_VERT(v) BMO_vert_flag_enable(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED) +// #define ELE_TOUCH_MARK_VERT(v) BMO_vert_flag_enable(pc->bm_bmoflag, (BMElemF *)v, ELE_TOUCHED) -// #define ELE_TOUCH_TEST_EDGE(v) BMO_edge_flag_test(pc->bm_bmoflag, v, ELE_TOUCHED) -// #define ELE_TOUCH_MARK_EDGE(v) BMO_edge_flag_enable(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED) +#define ELE_TOUCH_TEST_EDGE(e) BMO_edge_flag_test(pc->bm_bmoflag, e, ELE_TOUCHED) +// #define ELE_TOUCH_MARK_EDGE(e) BMO_edge_flag_enable(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED) -// #define ELE_TOUCH_TEST_FACE(v) BMO_face_flag_test(pc->bm_bmoflag, v, ELE_TOUCHED) -// #define ELE_TOUCH_MARK_FACE(v) BMO_face_flag_enable(pc->bm_bmoflag, (BMElemF *)e, ELE_TOUCHED) +// #define ELE_TOUCH_TEST_FACE(f) BMO_face_flag_test(pc->bm_bmoflag, f, ELE_TOUCHED) +// #define ELE_TOUCH_MARK_FACE(f) BMO_face_flag_enable(pc->bm_bmoflag, (BMElemF *)f, ELE_TOUCHED) // #define DEBUG_PRINT @@ -363,7 +363,7 @@ static PathLinkState *state_step__face_edges( BMElem *ele_next_from = (BMElem *)l_iter->f; if (FACE_WALK_TEST((BMFace *)ele_next_from) && - (ELE_TOUCH_TEST_VERT((BMVert *)ele_next) == false)) + (ELE_TOUCH_TEST_EDGE((BMEdge *)ele_next) == false)) { min_dist_dir_update(mddir, dist_dir); mddir->dist_min[index] = dist_test; @@ -661,7 +661,7 @@ void bmo_connect_vert_pair_exec(BMesh *bm, BMOperator *op) while (!BLI_heap_is_empty(pc.states)) { #ifdef DEBUG_PRINT - printf("\n%s: stepping %d\n", __func__, BLI_heap_size(pc.states)); + printf("\n%s: stepping %u\n", __func__, BLI_heap_size(pc.states)); #endif while (!BLI_heap_is_empty(pc.states)) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [305fec8] master: Fixes for pose library change 601ce6a89c4
Commit: 305fec8358acf0d6ffaebdef6f083416e0560e3c Author: Sybren A. Stüvel Date: Wed Sep 28 15:40:05 2016 +0200 Branches: master https://developer.blender.org/rB305fec8358acf0d6ffaebdef6f083416e0560e3c Fixes for pose library change 601ce6a89c4 Apparently the keying sets system doesn't support subclassing KeyingSetInfo subclasses. I have added a note to the top of the file to indicate this to future developers. === M release/scripts/startup/keyingsets_builtins.py === diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py index e04b55e..97320e5 100644 --- a/release/scripts/startup/keyingsets_builtins.py +++ b/release/scripts/startup/keyingsets_builtins.py @@ -25,6 +25,9 @@ to work correctly. Beware also about changing the order that these are defined here, since this can result in old files referring to the wrong Keying Set as the active one, potentially resulting in lost (i.e. unkeyed) animation. + +Note that these classes cannot be subclassed further; only direct subclasses of KeyingSetInfo +are supported. """ import bpy @@ -524,11 +527,11 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo): ksi.addProp(ks, bone, prop) # All properties that are likely to get animated in a character rig, only selected bones. -class BUILTIN_KSI_WholeCharacterSelected(BUILTIN_KSI_WholeCharacter): +class BUILTIN_KSI_WholeCharacterSelected(KeyingSetInfo): """Insert a keyframe for all properties that are likely to get animated in a character rig """ """(only selected bones)""" bl_idname = ANIM_KS_WHOLE_CHARACTER_SELECTED_ID -bl_label = "Whole Character (Selected bones)" +bl_label = "Whole Character (Selected bones only)" # iterator - all bones regardless of selection def iterator(ksi, context, ks): @@ -536,10 +539,21 @@ class BUILTIN_KSI_WholeCharacterSelected(BUILTIN_KSI_WholeCharacter): bones = context.selected_pose_bones or context.active_object.pose.bones for bone in bones: -if bone.name.startswith(BUILTIN_KSI_WholeCharacterSelected.badBonePrefixes): +if bone.name.startswith(BUILTIN_KSI_WholeCharacter.badBonePrefixes): continue ksi.generate(context, ks, bone) +# Poor man's subclassing. Blender breaks when we actually subclass BUILTIN_KSI_WholeCharacter. +poll = BUILTIN_KSI_WholeCharacter.poll +generate = BUILTIN_KSI_WholeCharacter.generate +addProp = BUILTIN_KSI_WholeCharacter.addProp +doLoc = BUILTIN_KSI_WholeCharacter.doLoc +doRot4d = BUILTIN_KSI_WholeCharacter.doRot4d +doRot3d = BUILTIN_KSI_WholeCharacter.doRot3d +doScale = BUILTIN_KSI_WholeCharacter.doScale +doBBone = BUILTIN_KSI_WholeCharacter.doBBone +doCustomProps = BUILTIN_KSI_WholeCharacter.doCustomProps + ### # Delta Location ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [dea7ef4] master: Curve pinning: Allow pinning object data without animated object
Commit: dea7ef4dd99b949fa76c53a1b10641c3acce5c08 Author: Sergey Sharybin Date: Wed Sep 28 15:18:15 2016 +0200 Branches: master https://developer.blender.org/rBdea7ef4dd99b949fa76c53a1b10641c3acce5c08 Curve pinning: Allow pinning object data without animated object Special case, so now we can pin tricky cases like animated camera DOF without requiring to have animation on the object level. === M source/blender/editors/animation/anim_channels_defines.c M source/blender/editors/animation/anim_filter.c === diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 93a602b..5e13143 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -390,7 +390,10 @@ static bool acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListElem /* select is ok for most "ds*" channels (e.g. dsmat) */ case ACHANNEL_SETTING_SELECT: return true; - + + case ACHANNEL_SETTING_ALWAYS_VISIBLE: + return true; + /* other flags are never supported */ default: return false; @@ -1704,7 +1707,10 @@ static int acf_dscam_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Setting case ACHANNEL_SETTING_SELECT: /* selected */ return ADT_UI_SELECTED; - + + case ACHANNEL_SETTING_ALWAYS_VISIBLE: + return ADT_CURVES_ALWAYS_VISIBLE; + default: /* unsupported */ return 0; } @@ -1725,6 +1731,7 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings set case ACHANNEL_SETTING_SELECT: /* selected */ case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */ case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */ + case ACHANNEL_SETTING_ALWAYS_VISIBLE: if (ca->adt) return GET_ACF_FLAG_PTR(ca->adt->flag, type); return NULL; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 87c7381..7893f26 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -2834,6 +2834,19 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Scene *scene, Base *base return true; } + /* Special case. +* We don't do recursive checks for pin, but we need to deal with tricky +* setup like animated camera lens without animated camera location. +* Without such special handle here we wouldn't be able to bin such +* camera data only animation to the editor. +*/ + if (ob->adt == NULL && ob->data != NULL) { + AnimData *data_adt = BKE_animdata_from_id(ob->data); + if (data_adt != NULL && (data_adt->flag & ADT_CURVES_ALWAYS_VISIBLE)) { + return true; + } + } + /* check selection and object type filters */ if ((ads->filterflag & ADS_FILTER_ONLYSEL) && !((base->flag & SELECT) /*|| (base == sce->basact)*/)) { /* only selected should be shown */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [cbd3827] master: Fix T49460: Particle group instance 'Use Count' value gets reset on file-load.
Commit: cbd3827d839b2ff28ae535f674e63611cb1c2c6c Author: Bastien Montagne Date: Wed Sep 28 15:06:50 2016 +0200 Branches: master https://developer.blender.org/rBcbd3827d839b2ff28ae535f674e63611cb1c2c6c Fix T49460: Particle group instance 'Use Count' value gets reset on file-load. Regression caused rBbcc863993ad, write code was assuming dw->ob was always valid, wich is no more the case right after reading file e.g. Another good example of how bad it is to use 'hidden' dependencies between datablocks. :( And another fix to be backported to 2.78a. :((( === M source/blender/blenloader/intern/writefile.c === diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 49e5255..6678189 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1306,13 +1306,11 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase) dw = part->dupliweights.first; for (; dw; dw = dw->next) { - /* update indices */ - dw->index = 0; - if (part->dup_group) { /* can be NULL if lining fails or set to None */ - go = part->dup_group->gobject.first; - while (go && go->ob != dw->ob) { - go = go->next; - dw->index++; + /* update indices, but only if dw->ob is set (can be NULL after loading e.g.) */ + if (dw->ob != NULL) { + dw->index = 0; + if (part->dup_group) { /* can be NULL if lining fails or set to None */ + for (go = part->dup_group->gobject.first; go && go->ob != dw->ob; go = go->next, dw->index++); } } writestruct(wd, DATA, ParticleDupliWeight, 1, dw); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [601ce6a] master: POSELIB_OT_pose_add: only create keyframes for selected bones.
Commit: 601ce6a89c4f7ecc974f40c85add491a7c295c6f Author: Sybren A. Stüvel Date: Wed Sep 28 13:54:57 2016 +0200 Branches: master https://developer.blender.org/rB601ce6a89c4f7ecc974f40c85add491a7c295c6f POSELIB_OT_pose_add: only create keyframes for selected bones. Previously the pose library used the WholeCharacter key set, which ignores selection and add keys for almost all bones in the rig. This is a very slow operation on complex rigs. With this patch, only selected bones are keyed, defaulting to keying all bones when none are selected. Note that this fixes the FIXME previously mentioned in the source. === M release/scripts/startup/keyingsets_builtins.py M source/blender/editors/armature/pose_lib.c M source/blender/editors/include/ED_keyframing.h === diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py index 0b4fbd5..e04b55e 100644 --- a/release/scripts/startup/keyingsets_builtins.py +++ b/release/scripts/startup/keyingsets_builtins.py @@ -43,6 +43,7 @@ ANIM_KS_SCALING_ID = "Scaling" ANIM_KS_LOC_ROT_SCALE_ID = "LocRotScale" ANIM_KS_AVAILABLE_ID = "Available" ANIM_KS_WHOLE_CHARACTER_ID = "WholeCharacter" +ANIM_KS_WHOLE_CHARACTER_SELECTED_ID = "WholeCharacterSelected" # Location @@ -522,9 +523,24 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo): elif prop_rna.is_animatable: ksi.addProp(ks, bone, prop) +# All properties that are likely to get animated in a character rig, only selected bones. +class BUILTIN_KSI_WholeCharacterSelected(BUILTIN_KSI_WholeCharacter): +"""Insert a keyframe for all properties that are likely to get animated in a character rig """ +"""(only selected bones)""" +bl_idname = ANIM_KS_WHOLE_CHARACTER_SELECTED_ID +bl_label = "Whole Character (Selected bones)" -### +# iterator - all bones regardless of selection +def iterator(ksi, context, ks): +# Use either the selected bones, or all of them if none are selected. +bones = context.selected_pose_bones or context.active_object.pose.bones +for bone in bones: +if bone.name.startswith(BUILTIN_KSI_WholeCharacterSelected.badBonePrefixes): +continue +ksi.generate(context, ks, bone) + +### # Delta Location class BUILTIN_KSI_DeltaLocation(KeyingSetInfo): diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 4af7f3f..9309592 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -461,7 +461,7 @@ static int poselib_add_exec(bContext *C, wmOperator *op) bAction *act = poselib_validate(ob); bPose *pose = (ob) ? ob->pose : NULL; TimeMarker *marker; - KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_WHOLE_CHARACTER_ID); /* this includes custom props :)*/ + KeyingSet *ks; int frame = RNA_int_get(op->ptr, "frame"); char name[64]; @@ -495,8 +495,7 @@ static int poselib_add_exec(bContext *C, wmOperator *op) BLI_uniquename(>markers, marker, DATA_("Pose"), '.', offsetof(TimeMarker, name), sizeof(marker->name)); /* use Keying Set to determine what to store for the pose */ - /* FIXME: in the past, the Keying Set respected selections (LocRotScale), but the current one doesn't -* (WholeCharacter) so perhaps we need either a new Keying Set, or just to add overrides here... */ + ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_WHOLE_CHARACTER_SELECTED_ID); /* this includes custom props :)*/ ANIM_apply_keyingset(C, NULL, act, ks, MODIFYKEY_MODE_INSERT, (float)frame); /* store new 'active' pose number */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 602e203..07cdff6 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -389,6 +389,7 @@ bool ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Objec #define ANIM_KS_LOC_ROT_SCALE_ID"LocRotScale" #define ANIM_KS_AVAILABLE_ID"Available" #define ANIM_KS_WHOLE_CHARACTER_ID "WholeCharacter" +#define ANIM_KS_WHOLE_CHARACTER_SELECTED_ID "WholeCharacterSelected" #ifdef __cplusplus } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a6ebe08] fracture_modifier: windows compile fix
Commit: a6ebe080f708e502f2631fdcb92c6969f7859b2a Author: Martin Felke Date: Wed Sep 28 12:47:22 2016 +0200 Branches: fracture_modifier https://developer.blender.org/rBa6ebe080f708e502f2631fdcb92c6969f7859b2a windows compile fix === M source/blender/blenkernel/intern/rigidbody.c === diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 6c0fbb0..8dd04cc 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -122,7 +122,7 @@ static void calc_dist_angle(RigidBodyShardCon *con, float *dist, float *angle, b rotation_between_quats_to_quat(qdiff, q1, q2); normalize_qt(qdiff); *angle = 2.0f * saacos(qdiff[0]); - if (!finite(*angle)) { + if (!isfinite(*angle)) { *angle = 0.0f; } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0b13b7a] blender-v2.78-release: fix Mac build for Xcode < 8
Commit: 0b13b7adef0b7925466ea1bdc8a478d30cd59cae Author: Mike Erwin Date: Tue Sep 27 16:16:47 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB0b13b7adef0b7925466ea1bdc8a478d30cd59cae fix Mac build for Xcode < 8 We need a long-term fix, but this will get 2.78 out the door. === M intern/ghost/intern/GHOST_SystemCocoa.mm === diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index b0d5ab3..fac500a 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -285,7 +285,17 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) * CocoaAppDelegate * ObjC object to capture applicationShouldTerminate, and send quit event **/ +#if defined(__clang_major__) && __clang_major__ <= 7 +/* FIXME(merwin & Juicyfruit): long-term fix for proper protocol to use + * merwin thinks NSApplicationDelegate is the correct protocol here. Has been around since 10.6 so we should be good... what's the problem? + * https://developer.apple.com/reference/appkit/nsapplicationdelegate?language=objc + */ +@interface CocoaAppDelegate : NSObject { +#else +/* for Xcode 8 */ @interface CocoaAppDelegate : NSObject { +#endif + GHOST_SystemCocoa *systemCocoa; } - (void)setSystemCocoa:(GHOST_SystemCocoa *)sysCocoa; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs