Commit: 450e5472985dd6dd6574a553f7d2547700aea2f6 Author: Pablo Dobarro Date: Sun Jun 16 23:01:16 2019 +0200 Branches: sculpt-mode-features https://developer.blender.org/rB450e5472985dd6dd6574a553f7d2547700aea2f6
Merge branch 'master' into sculpt-mode-features =================================================================== =================================================================== diff --cc build_files/cmake/macros.cmake index 098792d4be6,5b995763111..d645b87e836 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@@ -218,42 -233,42 +233,41 @@@ endmacro( # only MSVC uses SOURCE_GROUP function(blender_add_lib__impl - name - sources - includes - includes_sys - library_deps - ) - - # message(STATUS "Configuring library ${name}") + name + sources + includes + includes_sys + library_deps + ) - # include_directories(${includes}) - # include_directories(SYSTEM ${includes_sys}) - blender_include_dirs("${includes}") - blender_include_dirs_sys("${includes_sys}") + # message(STATUS "Configuring library ${name}") - add_library(${name} ${sources}) + # include_directories(${includes}) + # include_directories(SYSTEM ${includes_sys}) + blender_include_dirs("${includes}") + blender_include_dirs_sys("${includes_sys}") - if (NOT "${library_deps}" STREQUAL "") - target_link_libraries(${name} "${library_deps}") - endif() + add_library(${name} ${sources}) - # works fine without having the includes - # listed is helpful for IDE's (QtCreator/MSVC) - blender_source_group("${sources}") + if (NOT "${library_deps}" STREQUAL "") + target_link_libraries(${name} INTERFACE "${library_deps}") + endif() - #if enabled, set the FOLDER property for visual studio projects - if(WINDOWS_USE_VISUAL_STUDIO_FOLDERS) - get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) - string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir}) - set_target_properties(${name} PROPERTIES FOLDER ${FolderDir}) - endif() + # works fine without having the includes + # listed is helpful for IDE's (QtCreator/MSVC) + blender_source_group("${sources}") - list_assert_duplicates("${sources}") - list_assert_duplicates("${includes}") - # Not for system includes because they can resolve to the same path - # list_assert_duplicates("${includes_sys}") + #if enabled, set the FOLDER property for visual studio projects + if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS) + get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) + string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir}) + set_target_properties(${name} PROPERTIES FOLDER ${FolderDir}) + endif() + list_assert_duplicates("${sources}") + list_assert_duplicates("${includes}") + # Not for system includes because they can resolve to the same path + # list_assert_duplicates("${includes_sys}") - endfunction() @@@ -1477,24 -1214,47 +1491,47 @@@ macro(openmp_delayloa endmacro() macro(WINDOWS_SIGN_TARGET target) - if(WITH_WINDOWS_CODESIGN) - if(!SIGNTOOL_EXE) - error("Codesigning is enabled, but signtool is not found") - else() - if(WINDOWS_CODESIGN_PFX_PASSWORD) - set(CODESIGNPASSWORD /p ${WINDOWS_CODESIGN_PFX_PASSWORD}) - else() - if($ENV{PFXPASSWORD}) - set(CODESIGNPASSWORD /p $ENV{PFXPASSWORD}) - else() - message(FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.") - endif() - endif() - add_custom_command(TARGET ${target} - POST_BUILD - COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}> - VERBATIM - ) - endif() - endif() + if(WITH_WINDOWS_CODESIGN) + if(!SIGNTOOL_EXE) + error("Codesigning is enabled, but signtool is not found") + else() + if(WINDOWS_CODESIGN_PFX_PASSWORD) + set(CODESIGNPASSWORD /p ${WINDOWS_CODESIGN_PFX_PASSWORD}) + else() + if($ENV{PFXPASSWORD}) + set(CODESIGNPASSWORD /p $ENV{PFXPASSWORD}) + else() + message(FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.") + endif() + endif() + add_custom_command(TARGET ${target} + POST_BUILD + COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}> + VERBATIM + ) + endif() + endif() endmacro() + + macro(blender_precompile_headers target cpp header) + if (MSVC) + # get the name for the pch output file + get_filename_component( pchbase ${cpp} NAME_WE ) + set( pchfinal "${CMAKE_CURRENT_BINARY_DIR}/${pchbase}.pch" ) + + # mark the cpp as the one outputting the pch + set_property(SOURCE ${cpp} APPEND PROPERTY OBJECT_OUTPUTS "${pchfinal}") + + # get all sources for the target + get_target_property(sources ${target} SOURCES) + + # make all sources depend on the pch to enforce the build order + foreach(src ${sources}) + set_property(SOURCE ${src} APPEND PROPERTY OBJECT_DEPENDS "${pchfinal}") + endforeach() + + target_sources(${target} PRIVATE ${cpp} ${header}) + set_target_properties(${target} PROPERTIES COMPILE_FLAGS "/Yu${header} /Fp${pchfinal} /FI${header}") + set_source_files_properties(${cpp} PROPERTIES COMPILE_FLAGS "/Yc${header} /Fp${pchfinal}") + endif() + endmacro() diff --cc release/scripts/presets/keyconfig/keymap_data/blender_default.py index 63b9875c116,dd6c33934df..983f90161ab --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@@ -5521,38 -5562,19 +5562,51 @@@ def km_3d_view_tool_sculpt_box_mask(par ) +def km_3d_view_tool_sculpt_mesh_filter(params): + return ( + "3D View Tool: Sculpt, Mesh Filter", + {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, + {"items": [ + ("sculpt.mesh_filter", {"type": params.tool_tweak, "value": 'ANY'}, + None) + ]}, + ) + +def km_3d_view_tool_sculpt_color_filter(params): + return ( + "3D View Tool: Sculpt, Color Filter", + {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, + {"items": [ + ("sculpt.color_filter", {"type": params.tool_tweak, "value": 'ANY'}, + None) + ]}, + ) + + +def km_3d_view_tool_sculpt_mask_filter(params): + return ( + "3D View Tool: Sculpt, Mask Filter", + {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, + {"items": [ + ("sculpt.mask_filter", {"type": params.tool_mouse, "value": 'PRESS'}, + None) + ]}, + ) + + + def km_3d_view_tool_sculpt_lasso_mask(params): + return ( + "3D View Tool: Sculpt, Lasso Mask", + {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, + {"items": [ + ("paint.mask_lasso_gesture", {"type": params.tool_tweak, "value": 'ANY'}, + {"properties": [("value", 1.0)]}), + ("paint.mask_lasso_gesture", {"type": params.tool_tweak, "value": 'ANY', "ctrl": True}, + {"properties": [("value", 0.0)]}), + ]}, + ) + + def km_3d_view_tool_paint_weight_sample_weight(params): return ( "3D View Tool: Paint Weight, Sample Weight", @@@ -5972,9 -6011,7 +6043,10 @@@ def generate_keymaps(params=None) km_3d_view_tool_edit_curve_extrude_cursor(params), km_3d_view_tool_sculpt_box_hide(params), km_3d_view_tool_sculpt_box_mask(params), + km_3d_view_tool_sculpt_mesh_filter(params), + km_3d_view_tool_sculpt_color_filter(params), + km_3d_view_tool_sculpt_mask_filter(params), + km_3d_view_tool_sculpt_lasso_mask(params), km_3d_view_tool_paint_weight_sample_weight(params), km_3d_view_tool_paint_weight_sample_vertex_group(params), km_3d_view_tool_paint_weight_gradient(params), diff --cc release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 5ce53e3990d,5fcf117ecf1..d596791df95 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@@ -971,81 -971,17 +971,92 @@@ class _defs_sculpt keymap=(), ) + @ToolDef.from_fn + def mask_lasso(): + return dict( + idname="builtin.lasso_mask", + label="Lasso Mask", + icon="ops.sculpt.lasso_mask", + widget=None, + keymap=(), + ) + + @ToolDef.from_fn + def mask_filter(): + def draw_settings(context, layout, tool): + props = tool.operator_properties("sculpt.mask_filter") + sub = layout.row() + sub.use_property_split = False + sub.prop(props, "type", expand=False) + sub.prop(props, "iterations") + sub.prop(props, "dirty_only") + + return dict( + idname="builtin.mask_filter", + label="Mask Filter", + icon="ops.sculpt.mask_filter", + widget=None, + keymap= (), + draw_settings=draw_settings, + ) + + @ToolDef.from_fn + def mesh_filter(): + def draw_settings(context, layout, tool): + props = tool.operator_properties("sculpt.mesh_filter") + sub = layout.row() + sub.use_property_split = False + sub.prop(props, "type", expand=False) + sub.prop(props, "strength") + + return dict( + idname="builtin.mesh_filter", + label="Mesh Filter", + icon="ops.sculpt.mesh_filter", + widget=None, + keymap= (), + draw_settings=draw_settings, + ) + + @ToolDef.from_fn + def color_filter(): + def draw_settings(context, layout, tool): + props = tool.operator_properties("sculpt.color_filter") + sub = layout.row() + sub.use_property_split = False + sub.prop(props, "type", expand=False) + sub.prop(props, "strength") + + return dict( + idname="builtin.color_filter", + label="Color Filter", + icon="ops.sculpt.color_filter", + widget=None, + keymap= (), + draw_settings=draw_settings, + ) + + @ToolDef.from @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs