Merge branch 'master' into sculpt-dev

This commit is contained in:
Pablo Dobarro 2020-12-21 16:19:03 +01:00
commit 6fa6a8851f
29 changed files with 121 additions and 43 deletions

View File

@ -610,6 +610,11 @@ if(WIN32)
endif()
if(UNIX)
# See WITH_WINDOWS_SCCACHE for Windows.
option(WITH_COMPILER_CCACHE "Use ccache to improve rebuild times (Works with Ninja, Makefiles and Xcode)" OFF)
endif()
# The following only works with the Ninja generator in CMake >= 3.0.
if("${CMAKE_GENERATOR}" MATCHES "Ninja")
option(WITH_NINJA_POOL_JOBS

View File

@ -41,6 +41,7 @@ Convenience Targets
* developer: Enable faster builds, error checking and tests, recommended for developers.
* config: Run cmake configuration tool to set build options.
* ninja: Use ninja build tool for faster builds.
* ccache: Use ccache for faster rebuilds.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
@ -241,6 +242,10 @@ ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring ccache, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-DWITH_COMPILER_CCACHE=YES $(CMAKE_CONFIG_ARGS)
endif
# -----------------------------------------------------------------------------
# build tool
@ -340,6 +345,7 @@ headless: all
bpy: all
developer: all
ninja: all
ccache: all
# -----------------------------------------------------------------------------
# Build dependencies

View File

@ -2086,7 +2086,7 @@ compile_OIIO() {
cmake_d="$cmake_d -D USE_OPENCV=OFF"
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF"
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=OFF"
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=ON"
cmake_d="$cmake_d -D TXT2MAN="
#cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
#cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"
@ -4072,7 +4072,7 @@ install_DEB() {
else
check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX
if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then
install_packages_DEB libopenimageio-dev
install_packages_DEB libopenimageio-dev openimageio-tools
clean_OIIO
else
compile_OIIO
@ -4714,13 +4714,13 @@ install_RPM() {
INFO "Forced OpenImageIO building, as requested..."
compile_OIIO
else
#check_package_version_ge_lt_RPM OpenImageIO-devel $OIIO_VERSION_MIN $OIIO_VERSION_MAX
#if [ $? -eq 0 -a $_with_built_openexr == false ]; then
# install_packages_RPM OpenImageIO-devel
# clean_OIIO
#else
check_package_version_ge_lt_RPM OpenImageIO-devel $OIIO_VERSION_MIN $OIIO_VERSION_MAX
if [ $? -eq 0 -a $_with_built_openexr == false ]; then
install_packages_RPM OpenImageIO-devel OpenImageIO-utils
clean_OIIO
else
compile_OIIO
#fi
fi
fi

View File

@ -470,3 +470,17 @@ set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
if(WITH_COMPILER_CCACHE)
if(NOT CMAKE_GENERATOR STREQUAL "Xcode")
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
# Makefiles and ninja
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
else()
message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE")
set(WITH_COMPILER_CCACHE OFF)
endif()
endif()
endif()

View File

@ -154,3 +154,32 @@ if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
string(APPEND CMAKE_CXX_FLAGS " -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
add_definitions("-DMACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()
if(WITH_COMPILER_CCACHE)
if(CMAKE_GENERATOR STREQUAL "Xcode")
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
get_filename_component(ccompiler "${CMAKE_C_COMPILER}" NAME)
get_filename_component(cxxcompiler "${CMAKE_CXX_COMPILER}" NAME)
# Ccache can figure out which compiler to use if it's invoked from
# a symlink with the name of the compiler.
# https://ccache.dev/manual/4.1.html#_run_modes
set(_fake_compiler_dir "${CMAKE_BINARY_DIR}/ccache")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${_fake_compiler_dir})
set(_fake_C_COMPILER "${_fake_compiler_dir}/${ccompiler}")
set(_fake_CXX_COMPILER "${_fake_compiler_dir}/${cxxcompiler}")
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CCACHE_PROGRAM}" ${_fake_C_COMPILER})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CCACHE_PROGRAM}" ${_fake_CXX_COMPILER})
set(CMAKE_XCODE_ATTRIBUTE_CC ${_fake_C_COMPILER} CACHE STRING "" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_CXX ${_fake_CXX_COMPILER} CACHE STRING "" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_LD ${_fake_C_COMPILER} CACHE STRING "" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS ${_fake_CXX_COMPILER} CACHE STRING "" FORCE)
unset(_fake_compiler_dir)
unset(_fake_C_COMPILER)
unset(_fake_CXX_COMPILER)
else()
message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE")
set(WITH_COMPILER_CCACHE OFF)
endif()
endif()
endif()

View File

@ -684,3 +684,15 @@ set(PLATFORM_LINKFLAGS
if(WITH_INSTALL_PORTABLE)
string(APPEND CMAKE_EXE_LINKER_FLAGS " -no-pie")
endif()
if(WITH_COMPILER_CCACHE)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
# Makefiles and ninja
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
else()
message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE")
set(WITH_COMPILER_CCACHE OFF)
endif()
endif()

View File

@ -1443,6 +1443,7 @@ class CYCLES_LIGHT_PT_nodes(CyclesButtonsPanel, Panel):
class CYCLES_LIGHT_PT_spot(CyclesButtonsPanel, Panel):
bl_label = "Spot Shape"
bl_parent_id = "CYCLES_LIGHT_PT_light"
bl_context = "data"
@classmethod
@ -1454,7 +1455,6 @@ class CYCLES_LIGHT_PT_spot(CyclesButtonsPanel, Panel):
layout = self.layout
light = context.light
layout.use_property_split = True
layout.use_property_decorate = False
col = layout.column()
col.prop(light, "spot_size", text="Size")

View File

@ -558,6 +558,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
"msgid": ((("msgctxt",), _ctxt_to_ctxt),
),
"message": (),
"heading": (),
}
context_kw_set = {}

View File

@ -504,6 +504,7 @@ MO_FILE_NAME = DOMAIN + ".mo"
# Where to search for py files that may contain ui strings (relative to one of the 'resource_path' of Blender).
CUSTOM_PY_UI_FILES = [
os.path.join("scripts", "startup", "bl_ui"),
os.path.join("scripts", "startup", "bl_operators"),
os.path.join("scripts", "modules", "rna_prop_ui.py"),
]

View File

@ -38,6 +38,7 @@ class SpellChecker:
"boolean", "booleans",
"chamfer",
"couldn", # couldn't
"customizable",
"decrement",
"derivate",
"deterministically",

View File

@ -181,23 +181,20 @@ class MeshMirrorUV(Operator):
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
if total_duplicates and total_no_active_UV:
self.report({'WARNING'}, "%d %s with no active UV layer. "
"%d duplicates found in %d %s, mirror may be incomplete."
self.report({'WARNING'},
"%d mesh(es) with no active UV layer, "
"%d duplicates found in %d mesh(es), mirror may be incomplete"
% (total_no_active_UV,
"mesh" if total_no_active_UV == 1 else "meshes",
total_duplicates,
meshes_with_duplicates,
"mesh" if meshes_with_duplicates == 1 else "meshes"))
meshes_with_duplicates))
elif total_no_active_UV:
self.report({'WARNING'}, "%d %s with no active UV layer."
% (total_no_active_UV,
"mesh" if total_no_active_UV == 1 else "meshes"))
self.report({'WARNING'},
"%d mesh(es) with no active UV layer"
% (total_no_active_UV,))
elif total_duplicates:
self.report({'WARNING'}, "%d duplicates found in %d %s,"
" mirror may be incomplete."
% (total_duplicates,
meshes_with_duplicates,
"mesh" if meshes_with_duplicates == 1 else "meshes"))
self.report({'WARNING'},
"%d duplicates found in %d mesh(es), mirror may be incomplete"
% (total_duplicates, meshes_with_duplicates))
return {'FINISHED'}

View File

@ -566,7 +566,7 @@ class JoinUVs(Operator):
uv_other = mesh_other.uv_layers.active
if not uv_other:
self.report({'ERROR'}, "Could not add "
"a new UV map tp object "
"a new UV map to object "
"'%s' (Mesh '%s')\n"
% (obj_other.name,
mesh_other.name,

View File

@ -254,7 +254,7 @@ class ExecutePreset(Operator):
ext = splitext(filepath)[1].lower()
if ext not in {".py", ".xml"}:
self.report({'ERROR'}, "unknown filetype: %r" % ext)
self.report({'ERROR'}, "Unknown file type: %r" % ext)
return {'CANCELLED'}
if hasattr(preset_class, "reset_cb"):

View File

@ -242,7 +242,7 @@ class SequencerFadesAdd(Operator):
sequence.invalidate_cache('COMPOSITE')
sequence_string = "sequence" if len(faded_sequences) == 1 else "sequences"
self.report({'INFO'}, "Added fade animation to %d %s." % (len(faded_sequences), sequence_string))
self.report({'INFO'}, "Added fade animation to %d %s" % (len(faded_sequences), sequence_string))
return {'FINISHED'}
def calculate_fade_duration(self, context, sequence):

View File

@ -1625,7 +1625,7 @@ class WM_OT_operator_cheat_sheet(Operator):
textblock = bpy.data.texts.new("OperatorList.txt")
textblock.write('# %d Operators\n\n' % tot)
textblock.write('\n'.join(op_strings))
self.report({'INFO'}, "See OperatorList.txt textblock")
self.report({'INFO'}, "See OperatorList.txt text block")
return {'FINISHED'}
@ -1717,7 +1717,7 @@ class WM_OT_tool_set_by_id(Operator):
tool_settings.workspace_tool_type = 'FALLBACK'
return {'FINISHED'}
else:
self.report({'WARNING'}, "Tool %r not found for space %r." % (self.name, space_type))
self.report({'WARNING'}, "Tool %r not found for space %r" % (self.name, space_type))
return {'CANCELLED'}

View File

@ -86,8 +86,9 @@ class HAIR_UL_attributes(UIList):
domain = attribute.bl_rna.properties['domain'].enum_items[attribute.domain]
split = layout.split(factor=0.5)
split.emboss = 'NONE'
row = split.row()
row.prop(attribute, "name", text="", emboss=False)
row.prop(attribute, "name", text="")
sub = split.split()
sub.alignment = 'RIGHT'
sub.active = False

View File

@ -87,7 +87,8 @@ class POINTCLOUD_UL_attributes(UIList):
data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
split = layout.split(factor=0.75)
split.prop(attribute, "name", text="", emboss=False)
split.emboss = 'NONE'
split.prop(attribute, "name", text="")
sub = split.row()
sub.alignment = 'RIGHT'
sub.active = False

View File

@ -88,6 +88,7 @@ class VOLUME_UL_grids(UIList):
name = grid.name
data_type = grid.bl_rna.properties['data_type'].enum_items[grid.data_type]
layout.emboss = 'NONE'
layout.label(text=name)
row = layout.row()
row.alignment = 'RIGHT'

View File

@ -589,7 +589,7 @@ class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
active_asset = asset_utils.SpaceAssetInfo.get_active_asset(context)
if not active_file or not active_asset:
layout.label(text="No asset selected.", icon='INFO')
layout.label(text="No asset selected", icon='INFO')
return
# If the active file is an ID, use its name directly so renaming is possible from right here.

View File

@ -286,6 +286,12 @@ static void seq_convert_transform_crop_2(const Scene *scene,
char name_esc[(sizeof(seq->name) - 2) * 2], *path;
BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
path = BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform.scale_x", name_esc);
seq_convert_transform_animation_2(scene, path, scale_to_fit_factor);
MEM_freeN(path);
path = BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform.scale_y", name_esc);
seq_convert_transform_animation_2(scene, path, scale_to_fit_factor);
MEM_freeN(path);
path = BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].crop.min_x", name_esc);
seq_convert_transform_animation_2(scene, path, 1 / scale_to_fit_factor);
MEM_freeN(path);

View File

@ -2200,7 +2200,7 @@ int UI_icon_from_library(const ID *id)
return ICON_LIBRARY_DATA_OVERRIDE;
}
if (ID_IS_ASSET(id)) {
return ICON_MAT_SPHERE_SKY;
return ICON_ASSET_MANAGER;
}
return ICON_NONE;

View File

@ -736,17 +736,19 @@ const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(const bContext *
RNA_enum_items_add_value(&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_ACTIVE);
}
if (BKE_object_pose_armature_get(ob)) {
if (selection_mask & (1 << WT_VGROUP_BONE_SELECT)) {
RNA_enum_items_add_value(
&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_BONE_SELECT);
if (ob) {
if (BKE_object_pose_armature_get(ob)) {
if (selection_mask & (1 << WT_VGROUP_BONE_SELECT)) {
RNA_enum_items_add_value(
&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_BONE_SELECT);
}
}
}
if (BKE_modifiers_is_deformed_by_armature(ob)) {
if (selection_mask & (1 << WT_VGROUP_BONE_DEFORM)) {
RNA_enum_items_add_value(
&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_BONE_DEFORM);
if (BKE_modifiers_is_deformed_by_armature(ob)) {
if (selection_mask & (1 << WT_VGROUP_BONE_DEFORM)) {
RNA_enum_items_add_value(
&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_BONE_DEFORM);
}
}
}

View File

@ -1039,7 +1039,7 @@ static void file_draw_invalid_library_hint(const SpaceFile *sfile, const ARegion
UI_icon_draw(sx, sy - UI_UNIT_Y, ICON_INFO);
const char *suggestion = TIP_(
"Set up the library or edit libraries in the Preferences, File Paths section.");
"Set up the library or edit libraries in the Preferences, File Paths section");
file_draw_string_multiline(
sx + UI_UNIT_X, sy, suggestion, width - UI_UNIT_X, line_height, text_col, NULL, NULL);
}

View File

@ -375,7 +375,7 @@ typedef struct ThemeSpace {
/** Two uses, for uvs with modifier applied on mesh and uvs during painting. */
unsigned char uv_shadow[4];
/** Outliner - filter match. */
/** Search filter match, used for property search and in the outliner. */
unsigned char match[4];
/** Outliner - selected item. */
unsigned char selected_highlight[4];

View File

@ -97,7 +97,8 @@ static void do_math_operation(const FloatReadAttribute &input_a,
static void attribute_math_calc(GeometryComponent &component, const GeoNodeExecParams &params)
{
const bNode &node = params.node();
const int operation = node.custom1;
const NodeAttributeMath *node_storage = (const NodeAttributeMath *)node.storage;
const int operation = node_storage->operation;
/* The result type of this node is always float. */
const CustomDataType result_type = CD_PROP_FLOAT;