Merge branch 'blender-v5.0-release'
This commit is contained in:
@@ -35,6 +35,14 @@ CCL_NAMESPACE_BEGIN
|
|||||||
# define bvh_throttle_printf(...)
|
# define bvh_throttle_printf(...)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
/* This flag didn't exist until Xcode 26.0, so we ensure that it is defined for
|
||||||
|
* forward-compatibility.
|
||||||
|
*/
|
||||||
|
# ifndef MAC_OS_VERSION_26_0
|
||||||
|
# define MTLAccelerationStructureUsagePreferFastIntersection \
|
||||||
|
MTLAccelerationStructureUsage(1 << 4)
|
||||||
|
# endif
|
||||||
|
|
||||||
/* Limit the number of concurrent BVH builds so that we don't approach unsafe GPU working set
|
/* Limit the number of concurrent BVH builds so that we don't approach unsafe GPU working set
|
||||||
* sizes. */
|
* sizes. */
|
||||||
struct BVHMetalBuildThrottler {
|
struct BVHMetalBuildThrottler {
|
||||||
@@ -292,11 +300,9 @@ bool BVHMetal::build_BLAS_mesh(Progress &progress,
|
|||||||
accelDesc.usage |= (MTLAccelerationStructureUsageRefit |
|
accelDesc.usage |= (MTLAccelerationStructureUsageRefit |
|
||||||
MTLAccelerationStructureUsagePreferFastBuild);
|
MTLAccelerationStructureUsagePreferFastBuild);
|
||||||
}
|
}
|
||||||
# if defined(MAC_OS_VERSION_26_0)
|
|
||||||
else if (@available(macos 26.0, *)) {
|
else if (@available(macos 26.0, *)) {
|
||||||
accelDesc.usage |= MTLAccelerationStructureUsagePreferFastIntersection;
|
accelDesc.usage |= MTLAccelerationStructureUsagePreferFastIntersection;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
MTLAccelerationStructureSizes accelSizes = [mtl_device
|
MTLAccelerationStructureSizes accelSizes = [mtl_device
|
||||||
accelerationStructureSizesWithDescriptor:accelDesc];
|
accelerationStructureSizesWithDescriptor:accelDesc];
|
||||||
@@ -638,11 +644,9 @@ bool BVHMetal::build_BLAS_hair(Progress &progress,
|
|||||||
accelDesc.usage |= (MTLAccelerationStructureUsageRefit |
|
accelDesc.usage |= (MTLAccelerationStructureUsageRefit |
|
||||||
MTLAccelerationStructureUsagePreferFastBuild);
|
MTLAccelerationStructureUsagePreferFastBuild);
|
||||||
}
|
}
|
||||||
# if defined(MAC_OS_VERSION_26_0)
|
|
||||||
else if (@available(macos 26.0, *)) {
|
else if (@available(macos 26.0, *)) {
|
||||||
accelDesc.usage |= MTLAccelerationStructureUsagePreferFastIntersection;
|
accelDesc.usage |= MTLAccelerationStructureUsagePreferFastIntersection;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
MTLAccelerationStructureSizes accelSizes = [mtl_device
|
MTLAccelerationStructureSizes accelSizes = [mtl_device
|
||||||
accelerationStructureSizesWithDescriptor:accelDesc];
|
accelerationStructureSizesWithDescriptor:accelDesc];
|
||||||
@@ -874,11 +878,9 @@ bool BVHMetal::build_BLAS_pointcloud(Progress &progress,
|
|||||||
accelDesc.usage |= (MTLAccelerationStructureUsageRefit |
|
accelDesc.usage |= (MTLAccelerationStructureUsageRefit |
|
||||||
MTLAccelerationStructureUsagePreferFastBuild);
|
MTLAccelerationStructureUsagePreferFastBuild);
|
||||||
}
|
}
|
||||||
# if defined(MAC_OS_VERSION_26_0)
|
|
||||||
else if (@available(macos 26.0, *)) {
|
else if (@available(macos 26.0, *)) {
|
||||||
accelDesc.usage |= MTLAccelerationStructureUsagePreferFastIntersection;
|
accelDesc.usage |= MTLAccelerationStructureUsagePreferFastIntersection;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
MTLAccelerationStructureSizes accelSizes = [mtl_device
|
MTLAccelerationStructureSizes accelSizes = [mtl_device
|
||||||
accelerationStructureSizesWithDescriptor:accelDesc];
|
accelerationStructureSizesWithDescriptor:accelDesc];
|
||||||
@@ -1352,11 +1354,9 @@ bool BVHMetal::build_TLAS(Progress &progress,
|
|||||||
accelDesc.usage |= (MTLAccelerationStructureUsageRefit |
|
accelDesc.usage |= (MTLAccelerationStructureUsageRefit |
|
||||||
MTLAccelerationStructureUsagePreferFastBuild);
|
MTLAccelerationStructureUsagePreferFastBuild);
|
||||||
}
|
}
|
||||||
# if defined(MAC_OS_VERSION_26_0)
|
|
||||||
else if (@available(macos 26.0, *)) {
|
else if (@available(macos 26.0, *)) {
|
||||||
accelDesc.usage |= MTLAccelerationStructureUsagePreferFastIntersection;
|
accelDesc.usage |= MTLAccelerationStructureUsagePreferFastIntersection;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
MTLAccelerationStructureSizes accelSizes = [mtl_device
|
MTLAccelerationStructureSizes accelSizes = [mtl_device
|
||||||
accelerationStructureSizesWithDescriptor:accelDesc];
|
accelerationStructureSizesWithDescriptor:accelDesc];
|
||||||
|
|||||||
@@ -886,24 +886,23 @@ class TransformsToDeltasAnim(Operator):
|
|||||||
# no conflict yet
|
# no conflict yet
|
||||||
existingFCurves[dpath] = [fcu.array_index]
|
existingFCurves[dpath] = [fcu.array_index]
|
||||||
|
|
||||||
# if F-Curve uses standard transform path
|
# Move the 'standard' to the 'delta' data paths.
|
||||||
# just append "delta_" to this path
|
|
||||||
for fcu in channelbag.fcurves:
|
for fcu in channelbag.fcurves:
|
||||||
if fcu.data_path == "location":
|
standard_path = fcu.data_path
|
||||||
fcu.data_path = "delta_location"
|
array_index = fcu.array_index
|
||||||
obj.location.zero()
|
try:
|
||||||
elif fcu.data_path == "rotation_euler":
|
delta_path = STANDARD_TO_DELTA_PATHS[standard_path]
|
||||||
fcu.data_path = "delta_rotation_euler"
|
except KeyError:
|
||||||
obj.rotation_euler.zero()
|
# Not a standard transform path.
|
||||||
elif fcu.data_path == "rotation_quaternion":
|
continue
|
||||||
fcu.data_path = "delta_rotation_quaternion"
|
|
||||||
obj.rotation_quaternion.identity()
|
# Just change the F-Curve's data path. The array index should remain the same.
|
||||||
# XXX: currently not implemented
|
fcu.data_path = delta_path
|
||||||
# ~ elif fcu.data_path == "rotation_axis_angle":
|
|
||||||
# ~ fcu.data_path = "delta_rotation_axis_angle"
|
# Reset the now-no-longer-animated property to its default value.
|
||||||
elif fcu.data_path == "scale":
|
default_array = obj.bl_rna.properties[standard_path].default_array
|
||||||
fcu.data_path = "delta_scale"
|
property_array = getattr(obj, standard_path)
|
||||||
obj.scale = 1.0, 1.0, 1.0
|
property_array[array_index] = default_array[array_index]
|
||||||
|
|
||||||
# hack: force animsys flush by changing frame, so that deltas get run
|
# hack: force animsys flush by changing frame, so that deltas get run
|
||||||
context.scene.frame_set(context.scene.frame_current)
|
context.scene.frame_set(context.scene.frame_current)
|
||||||
|
|||||||
@@ -752,6 +752,17 @@ static bool armature_bone_select_poll(bContext *C)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool is_editmode = armature->edbo != nullptr;
|
||||||
|
if (!is_editmode) {
|
||||||
|
Object *active_object = blender::ed::object::context_active_object(C);
|
||||||
|
if (!active_object || active_object->type != OB_ARMATURE || active_object->data != armature) {
|
||||||
|
/* There has to be an active object in order to hide a pose bone that points to the correct
|
||||||
|
* armature. With pinning, the active object may not be an armature. */
|
||||||
|
CTX_wm_operator_poll_msg_set(C, "The active object does not match the armature");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (armature->runtime.active_collection == nullptr) {
|
if (armature->runtime.active_collection == nullptr) {
|
||||||
CTX_wm_operator_poll_msg_set(C, "No active bone collection");
|
CTX_wm_operator_poll_msg_set(C, "No active bone collection");
|
||||||
return false;
|
return false;
|
||||||
@@ -778,9 +789,17 @@ static void bone_collection_select(bContext *C,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Object *active_object = blender::ed::object::context_active_object(C);
|
||||||
|
if (!active_object || active_object->type != OB_ARMATURE || active_object->data != armature) {
|
||||||
|
/* This is covered by the poll function. */
|
||||||
|
BLI_assert_unreachable();
|
||||||
|
return;
|
||||||
|
}
|
||||||
LISTBASE_FOREACH (BoneCollectionMember *, member, &bcoll->bones) {
|
LISTBASE_FOREACH (BoneCollectionMember *, member, &bcoll->bones) {
|
||||||
Bone *bone = member->bone;
|
Bone *bone = member->bone;
|
||||||
if (!blender::animrig::bone_is_visible(armature, bone)) {
|
bPoseChannel *pose_bone = BKE_pose_channel_find_name(active_object->pose, bone->name);
|
||||||
|
BLI_assert_msg(pose_bone != nullptr, "The pose bones and armature bones are out of sync");
|
||||||
|
if (!blender::animrig::bone_is_visible(armature, pose_bone)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (bone->flag & BONE_UNSELECTABLE) {
|
if (bone->flag & BONE_UNSELECTABLE) {
|
||||||
@@ -788,12 +807,13 @@ static void bone_collection_select(bContext *C,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (select) {
|
if (select) {
|
||||||
bone->flag |= BONE_SELECTED;
|
pose_bone->flag |= POSE_SELECTED;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bone->flag &= ~BONE_SELECTED;
|
pose_bone->flag &= ~POSE_SELECTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DEG_id_tag_update(&active_object->id, ID_RECALC_SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEG_id_tag_update(&armature->id, ID_RECALC_SELECT);
|
DEG_id_tag_update(&armature->id, ID_RECALC_SELECT);
|
||||||
|
|||||||
@@ -33,21 +33,6 @@ static const EnumPropertyItem prop_direction_items[] = {
|
|||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef RNA_RUNTIME
|
|
||||||
|
|
||||||
# include "DNA_material_types.h"
|
|
||||||
|
|
||||||
static const EnumPropertyItem prop_smooth_direction_items[] = {
|
|
||||||
{0, "SMOOTH", ICON_ADD, "Smooth", "Smooth the surface"},
|
|
||||||
{BRUSH_DIR_IN,
|
|
||||||
"ENHANCE_DETAILS",
|
|
||||||
ICON_REMOVE,
|
|
||||||
"Enhance Details",
|
|
||||||
"Enhance the surface detail"},
|
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const EnumPropertyItem sculpt_stroke_method_items[] = {
|
static const EnumPropertyItem sculpt_stroke_method_items[] = {
|
||||||
{0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
|
{0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
|
||||||
{BRUSH_DRAG_DOT, "DRAG_DOT", 0, "Drag Dot", "Allows a single dot to be carefully positioned"},
|
{BRUSH_DRAG_DOT, "DRAG_DOT", 0, "Drag Dot", "Allows a single dot to be carefully positioned"},
|
||||||
@@ -379,6 +364,8 @@ static EnumPropertyItem rna_enum_gpencil_brush_modes_items[] = {
|
|||||||
|
|
||||||
#ifdef RNA_RUNTIME
|
#ifdef RNA_RUNTIME
|
||||||
|
|
||||||
|
# include "DNA_material_types.h"
|
||||||
|
|
||||||
# include "RNA_access.hh"
|
# include "RNA_access.hh"
|
||||||
|
|
||||||
# include "BKE_brush.hh"
|
# include "BKE_brush.hh"
|
||||||
@@ -784,34 +771,84 @@ static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C,
|
|||||||
PaintMode mode = BKE_paintmode_get_active_from_context(C);
|
PaintMode mode = BKE_paintmode_get_active_from_context(C);
|
||||||
|
|
||||||
/* sculpt mode */
|
/* sculpt mode */
|
||||||
|
static const EnumPropertyItem prop_smooth_direction_items[] = {
|
||||||
|
{0,
|
||||||
|
"SMOOTH",
|
||||||
|
ICON_ADD,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Smooth"),
|
||||||
|
N_("Smooth the surface")},
|
||||||
|
{BRUSH_DIR_IN,
|
||||||
|
"ENHANCE_DETAILS",
|
||||||
|
ICON_REMOVE,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Enhance Details"),
|
||||||
|
N_("Enhance the surface detail")},
|
||||||
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
|
};
|
||||||
|
|
||||||
static const EnumPropertyItem prop_pinch_magnify_items[] = {
|
static const EnumPropertyItem prop_pinch_magnify_items[] = {
|
||||||
{BRUSH_DIR_IN, "MAGNIFY", ICON_ADD, "Magnify", "Subtract effect of brush"},
|
{BRUSH_DIR_IN,
|
||||||
{0, "PINCH", ICON_REMOVE, "Pinch", "Add effect of brush"},
|
"MAGNIFY",
|
||||||
|
ICON_ADD,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Magnify"),
|
||||||
|
N_("Subtract effect of brush")},
|
||||||
|
{0,
|
||||||
|
"PINCH",
|
||||||
|
ICON_REMOVE,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Pinch"),
|
||||||
|
N_("Add effect of brush")},
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const EnumPropertyItem prop_inflate_deflate_items[] = {
|
static const EnumPropertyItem prop_inflate_deflate_items[] = {
|
||||||
{0, "INFLATE", ICON_ADD, "Inflate", "Add effect of brush"},
|
{0,
|
||||||
{BRUSH_DIR_IN, "DEFLATE", ICON_REMOVE, "Deflate", "Subtract effect of brush"},
|
"INFLATE",
|
||||||
|
ICON_ADD,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Inflate"),
|
||||||
|
N_("Add effect of brush")},
|
||||||
|
{BRUSH_DIR_IN,
|
||||||
|
"DEFLATE",
|
||||||
|
ICON_REMOVE,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Deflate"),
|
||||||
|
N_("Subtract effect of brush")},
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* texture paint mode */
|
/* texture paint mode */
|
||||||
static const EnumPropertyItem prop_soften_sharpen_items[] = {
|
static const EnumPropertyItem prop_soften_sharpen_items[] = {
|
||||||
{BRUSH_DIR_IN, "SHARPEN", ICON_ADD, "Sharpen", "Sharpen effect of brush"},
|
{BRUSH_DIR_IN,
|
||||||
{0, "SOFTEN", ICON_REMOVE, "Soften", "Blur effect of brush"},
|
"SHARPEN",
|
||||||
|
ICON_ADD,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Sharpen"),
|
||||||
|
N_("Sharpen effect of brush")},
|
||||||
|
{0,
|
||||||
|
"SOFTEN",
|
||||||
|
ICON_REMOVE,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Soften"),
|
||||||
|
N_("Blur effect of brush")},
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* gpencil sculpt */
|
/* gpencil sculpt */
|
||||||
static const EnumPropertyItem prop_pinch_items[] = {
|
static const EnumPropertyItem prop_pinch_items[] = {
|
||||||
{0, "ADD", ICON_ADD, "Pinch", "Add effect of brush"},
|
{0, "ADD", ICON_ADD, CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Pinch"), N_("Add effect of brush")},
|
||||||
{BRUSH_DIR_IN, "SUBTRACT", ICON_REMOVE, "Inflate", "Subtract effect of brush"},
|
{BRUSH_DIR_IN,
|
||||||
|
"SUBTRACT",
|
||||||
|
ICON_REMOVE,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Inflate"),
|
||||||
|
N_("Subtract effect of brush")},
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
static const EnumPropertyItem prop_twist_items[] = {
|
static const EnumPropertyItem prop_twist_items[] = {
|
||||||
{0, "ADD", ICON_ADD, "Counter-Clockwise", "Add effect of brush"},
|
{0,
|
||||||
{BRUSH_DIR_IN, "SUBTRACT", ICON_REMOVE, "Clockwise", "Subtract effect of brush"},
|
"ADD",
|
||||||
|
ICON_ADD,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Counter-Clockwise"),
|
||||||
|
N_("Add effect of brush")},
|
||||||
|
{BRUSH_DIR_IN,
|
||||||
|
"SUBTRACT",
|
||||||
|
ICON_REMOVE,
|
||||||
|
CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Clockwise"),
|
||||||
|
N_("Subtract effect of brush")},
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2563,6 +2600,7 @@ static void rna_def_brush(BlenderRNA *brna)
|
|||||||
RNA_def_property_enum_items(prop, prop_direction_items);
|
RNA_def_property_enum_items(prop, prop_direction_items);
|
||||||
RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_Brush_direction_itemf");
|
RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_Brush_direction_itemf");
|
||||||
RNA_def_property_ui_text(prop, "Direction", "");
|
RNA_def_property_ui_text(prop, "Direction", "");
|
||||||
|
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_BRUSH);
|
||||||
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "stroke_method", PROP_ENUM, PROP_NONE);
|
prop = RNA_def_property(srna, "stroke_method", PROP_ENUM, PROP_NONE);
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include "BKE_attribute.h"
|
#include "BKE_attribute.h"
|
||||||
|
|
||||||
|
#include "BLT_translation.hh"
|
||||||
|
|
||||||
#include "WM_types.hh"
|
#include "WM_types.hh"
|
||||||
|
|
||||||
const EnumPropertyItem rna_enum_curves_type_items[] = {
|
const EnumPropertyItem rna_enum_curves_type_items[] = {
|
||||||
@@ -55,19 +57,20 @@ const EnumPropertyItem rna_enum_curve_normal_mode_items[] = {
|
|||||||
{NORMAL_MODE_MINIMUM_TWIST,
|
{NORMAL_MODE_MINIMUM_TWIST,
|
||||||
"MINIMUM_TWIST",
|
"MINIMUM_TWIST",
|
||||||
ICON_NONE,
|
ICON_NONE,
|
||||||
"Minimum Twist",
|
N_("Minimum Twist"),
|
||||||
"Calculate normals with the smallest twist around the curve tangent across the whole curve"},
|
N_("Calculate normals with the smallest twist around the curve tangent across the whole "
|
||||||
|
"curve")},
|
||||||
{NORMAL_MODE_Z_UP,
|
{NORMAL_MODE_Z_UP,
|
||||||
"Z_UP",
|
"Z_UP",
|
||||||
ICON_NONE,
|
ICON_NONE,
|
||||||
"Z Up",
|
N_("Z Up"),
|
||||||
"Calculate normals perpendicular to the Z axis and the curve tangent. If a series of points "
|
N_("Calculate normals perpendicular to the Z axis and the curve tangent. If a series of "
|
||||||
"is vertical, the X axis is used."},
|
"points is vertical, the X axis is used.")},
|
||||||
{NORMAL_MODE_FREE,
|
{NORMAL_MODE_FREE,
|
||||||
"FREE",
|
"FREE",
|
||||||
ICON_NONE,
|
ICON_NONE,
|
||||||
"Free",
|
N_("Free"),
|
||||||
"Use the stored custom normal attribute as the final normals"},
|
N_("Use the stored custom normal attribute as the final normals")},
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -532,30 +532,38 @@ const EnumPropertyItem rna_enum_node_compositor_extension_items[] = {
|
|||||||
{CMP_NODE_EXTENSION_MODE_CLIP,
|
{CMP_NODE_EXTENSION_MODE_CLIP,
|
||||||
"CLIP",
|
"CLIP",
|
||||||
0,
|
0,
|
||||||
"Clip",
|
N_("Clip"),
|
||||||
"Areas outside of the image are filled with zero"},
|
N_("Areas outside of the image are filled with zero")},
|
||||||
{CMP_NODE_EXTENSION_MODE_EXTEND,
|
{CMP_NODE_EXTENSION_MODE_EXTEND,
|
||||||
"EXTEND",
|
"EXTEND",
|
||||||
0,
|
0,
|
||||||
"Extend",
|
N_("Extend"),
|
||||||
"Areas outside of the image are filled with the closest boundary pixel in the image"},
|
N_("Areas outside of the image are filled with the closest boundary pixel in the image")},
|
||||||
{CMP_NODE_EXTENSION_MODE_REPEAT,
|
{CMP_NODE_EXTENSION_MODE_REPEAT,
|
||||||
"REPEAT",
|
"REPEAT",
|
||||||
0,
|
0,
|
||||||
"Repeat",
|
N_("Repeat"),
|
||||||
"Areas outside of the image are filled with repetitions of the image"},
|
N_("Areas outside of the image are filled with repetitions of the image")},
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|
||||||
const EnumPropertyItem rna_enum_node_compositor_interpolation_items[] = {
|
const EnumPropertyItem rna_enum_node_compositor_interpolation_items[] = {
|
||||||
{CMP_NODE_INTERPOLATION_NEAREST, "NEAREST", 0, "Nearest", "Use Nearest interpolation"},
|
{CMP_NODE_INTERPOLATION_NEAREST, "NEAREST", 0, N_("Nearest"), N_("Use Nearest interpolation")},
|
||||||
{CMP_NODE_INTERPOLATION_BILINEAR, "BILINEAR", 0, "Bilinear", "Use Bilinear interpolation"},
|
{CMP_NODE_INTERPOLATION_BILINEAR,
|
||||||
{CMP_NODE_INTERPOLATION_BICUBIC, "BICUBIC", 0, "Bicubic", "Use Cubic B-Spline interpolation"},
|
"BILINEAR",
|
||||||
|
0,
|
||||||
|
N_("Bilinear"),
|
||||||
|
N_("Use Bilinear interpolation")},
|
||||||
|
{CMP_NODE_INTERPOLATION_BICUBIC,
|
||||||
|
"BICUBIC",
|
||||||
|
0,
|
||||||
|
N_("Bicubic"),
|
||||||
|
N_("Use Cubic B-Spline interpolation")},
|
||||||
{CMP_NODE_INTERPOLATION_ANISOTROPIC,
|
{CMP_NODE_INTERPOLATION_ANISOTROPIC,
|
||||||
"ANISOTROPIC",
|
"ANISOTROPIC",
|
||||||
0,
|
0,
|
||||||
"Anisotropic",
|
N_("Anisotropic"),
|
||||||
"Use Anisotropic interpolation"},
|
N_("Use Anisotropic interpolation")},
|
||||||
{0, nullptr, 0, nullptr, nullptr},
|
{0, nullptr, 0, nullptr, nullptr},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ class SocketDeclaration : public ItemDeclaration {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/** Some input sockets can have non-trivial values in the case when they are unlinked. */
|
/** Some input sockets can have non-trivial values in the case when they are unlinked. */
|
||||||
NodeDefaultInputType default_input_type;
|
NodeDefaultInputType default_input_type = NodeDefaultInputType::NODE_DEFAULT_INPUT_VALUE;
|
||||||
/**
|
/**
|
||||||
* Property that stores the name of the socket so that it can be modified directly from the
|
* Property that stores the name of the socket so that it can be modified directly from the
|
||||||
* node without going to the side-bar.
|
* node without going to the side-bar.
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.add_item("Item", [](LinkSearchOpParams ¶ms) {
|
params.add_item(IFACE_("Item"), [](LinkSearchOpParams ¶ms) {
|
||||||
bNode &node = params.add_node("NodeCombineBundle");
|
bNode &node = params.add_node("NodeCombineBundle");
|
||||||
const auto *item =
|
const auto *item =
|
||||||
socket_items::add_item_with_socket_type_and_name<CombineBundleItemsAccessor>(
|
socket_items::add_item_with_socket_type_and_name<CombineBundleItemsAccessor>(
|
||||||
@@ -168,7 +168,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
|||||||
if (other_socket.type != SOCK_BUNDLE) {
|
if (other_socket.type != SOCK_BUNDLE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.add_item("Bundle", [](LinkSearchOpParams ¶ms) {
|
params.add_item(IFACE_("Bundle"), [](LinkSearchOpParams ¶ms) {
|
||||||
bNode &node = params.add_node("NodeCombineBundle");
|
bNode &node = params.add_node("NodeCombineBundle");
|
||||||
params.connect_available_socket(node, "Bundle");
|
params.connect_available_socket(node, "Bundle");
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
|||||||
{
|
{
|
||||||
const bNodeSocket &other_socket = params.other_socket();
|
const bNodeSocket &other_socket = params.other_socket();
|
||||||
if (other_socket.in_out == SOCK_IN) {
|
if (other_socket.in_out == SOCK_IN) {
|
||||||
params.add_item("Item", [](LinkSearchOpParams ¶ms) {
|
params.add_item(IFACE_("Item"), [](LinkSearchOpParams ¶ms) {
|
||||||
bNode &node = params.add_node("NodeEvaluateClosure");
|
bNode &node = params.add_node("NodeEvaluateClosure");
|
||||||
const auto *item =
|
const auto *item =
|
||||||
socket_items::add_item_with_socket_type_and_name<EvaluateClosureOutputItemsAccessor>(
|
socket_items::add_item_with_socket_type_and_name<EvaluateClosureOutputItemsAccessor>(
|
||||||
@@ -172,7 +172,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (other_socket.type == SOCK_CLOSURE) {
|
if (other_socket.type == SOCK_CLOSURE) {
|
||||||
params.add_item("Closure", [](LinkSearchOpParams ¶ms) {
|
params.add_item(IFACE_("Closure"), [](LinkSearchOpParams ¶ms) {
|
||||||
bNode &node = params.add_node("NodeEvaluateClosure");
|
bNode &node = params.add_node("NodeEvaluateClosure");
|
||||||
params.connect_available_socket(node, "Closure");
|
params.connect_available_socket(node, "Closure");
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
|||||||
params.node_tree().type))
|
params.node_tree().type))
|
||||||
{
|
{
|
||||||
params.add_item(
|
params.add_item(
|
||||||
"Item",
|
IFACE_("Item"),
|
||||||
[](LinkSearchOpParams ¶ms) {
|
[](LinkSearchOpParams ¶ms) {
|
||||||
bNode &node = params.add_node("NodeEvaluateClosure");
|
bNode &node = params.add_node("NodeEvaluateClosure");
|
||||||
const auto *item =
|
const auto *item =
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.add_item("Item", [](LinkSearchOpParams ¶ms) {
|
params.add_item(IFACE_("Item"), [](LinkSearchOpParams ¶ms) {
|
||||||
bNode &node = params.add_node("NodeSeparateBundle");
|
bNode &node = params.add_node("NodeSeparateBundle");
|
||||||
const auto *item =
|
const auto *item =
|
||||||
socket_items::add_item_with_socket_type_and_name<SeparateBundleItemsAccessor>(
|
socket_items::add_item_with_socket_type_and_name<SeparateBundleItemsAccessor>(
|
||||||
@@ -214,7 +214,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
|||||||
if (other_socket.type != SOCK_BUNDLE) {
|
if (other_socket.type != SOCK_BUNDLE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.add_item("Bundle", [](LinkSearchOpParams ¶ms) {
|
params.add_item(IFACE_("Bundle"), [](LinkSearchOpParams ¶ms) {
|
||||||
bNode &node = params.add_node("NodeSeparateBundle");
|
bNode &node = params.add_node("NodeSeparateBundle");
|
||||||
params.connect_available_socket(node, "Bundle");
|
params.connect_available_socket(node, "Bundle");
|
||||||
|
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
|||||||
{
|
{
|
||||||
const bNodeSocket &other_socket = params.other_socket();
|
const bNodeSocket &other_socket = params.other_socket();
|
||||||
if (other_socket.in_out == SOCK_OUT) {
|
if (other_socket.in_out == SOCK_OUT) {
|
||||||
params.add_item("Value", [](LinkSearchOpParams ¶ms) {
|
params.add_item(IFACE_("Value"), [](LinkSearchOpParams ¶ms) {
|
||||||
bNode &node = params.add_node("GeometryNodeViewer");
|
bNode &node = params.add_node("GeometryNodeViewer");
|
||||||
const auto *item = socket_items::add_item_with_socket_type_and_name<GeoViewerItemsAccessor>(
|
const auto *item = socket_items::add_item_with_socket_type_and_name<GeoViewerItemsAccessor>(
|
||||||
params.node_tree, node, params.socket.typeinfo->type, params.socket.name);
|
params.node_tree, node, params.socket.typeinfo->type, params.socket.name);
|
||||||
|
|||||||
@@ -260,12 +260,18 @@ def main():
|
|||||||
elif test_dir_name.startswith('displacement'):
|
elif test_dir_name.startswith('displacement'):
|
||||||
# metal shadow and wireframe difference. To be fixed.
|
# metal shadow and wireframe difference. To be fixed.
|
||||||
report.set_fail_threshold(0.07)
|
report.set_fail_threshold(0.07)
|
||||||
|
elif test_dir_name.startswith('bsdf'):
|
||||||
|
# metallic thinfilm tests
|
||||||
|
report.set_fail_threshold(0.03)
|
||||||
|
elif test_dir_name.startswith('principled_bsdf'):
|
||||||
|
# principled bsdf transmission test
|
||||||
|
report.set_fail_threshold(0.02)
|
||||||
|
|
||||||
# Noise pattern changes depending on platform. Mostly caused by transparency.
|
# Noise pattern changes depending on platform. Mostly caused by transparency.
|
||||||
# TODO(fclem): See if we can just increase number of samples per file.
|
# TODO(fclem): See if we can just increase number of samples per file.
|
||||||
if test_dir_name.startswith('render_layer'):
|
if test_dir_name.startswith('render_layer'):
|
||||||
# shadow pass, rlayer flag
|
# shadow pass, rlayer flag
|
||||||
report.set_fail_threshold(0.075)
|
report.set_fail_threshold(0.08)
|
||||||
elif test_dir_name.startswith('hair'):
|
elif test_dir_name.startswith('hair'):
|
||||||
# hair close up
|
# hair close up
|
||||||
report.set_fail_threshold(0.0275)
|
report.set_fail_threshold(0.0275)
|
||||||
@@ -278,6 +284,9 @@ def main():
|
|||||||
elif test_dir_name.startswith('light_linking'):
|
elif test_dir_name.startswith('light_linking'):
|
||||||
# Noise difference in transparent material
|
# Noise difference in transparent material
|
||||||
report.set_fail_threshold(0.05)
|
report.set_fail_threshold(0.05)
|
||||||
|
elif test_dir_name.startswith('light'):
|
||||||
|
# Noise difference in background
|
||||||
|
report.set_fail_threshold(0.02)
|
||||||
|
|
||||||
ok = report.run(args.testdir, args.blender, get_arguments, batch=args.batch)
|
ok = report.run(args.testdir, args.blender, get_arguments, batch=args.batch)
|
||||||
sys.exit(not ok)
|
sys.exit(not ok)
|
||||||
|
|||||||
Reference in New Issue
Block a user