Merge branch 'blender-v4.3-release'
This commit is contained in:
Submodule lib/windows_arm64 updated: 1dbb8a8675...51572d4e3e
@@ -1956,9 +1956,6 @@ static void grease_pencil_do_layer_adjustments(GreasePencil &grease_pencil)
|
||||
using namespace bke::greasepencil;
|
||||
|
||||
const bke::AttributeAccessor layer_attributes = grease_pencil.attributes();
|
||||
if (!layer_attributes.contains("tint_color") && !layer_attributes.contains("radius_offset")) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct LayerDrawingInfo {
|
||||
Drawing *drawing;
|
||||
@@ -2024,6 +2021,7 @@ static void grease_pencil_do_layer_adjustments(GreasePencil &grease_pencil)
|
||||
|
||||
void BKE_grease_pencil_data_update(Depsgraph *depsgraph, Scene *scene, Object *object)
|
||||
{
|
||||
using namespace blender;
|
||||
using namespace blender::bke;
|
||||
/* Free any evaluated data and restore original data. */
|
||||
BKE_object_free_derived_caches(object);
|
||||
@@ -2032,12 +2030,15 @@ void BKE_grease_pencil_data_update(Depsgraph *depsgraph, Scene *scene, Object *o
|
||||
GreasePencil *grease_pencil = static_cast<GreasePencil *>(object->data);
|
||||
/* Store the frame that this grease pencil is evaluated on. */
|
||||
grease_pencil->runtime->eval_frame = int(DEG_get_ctime(depsgraph));
|
||||
GeometrySet geometry_set = GeometrySet::from_grease_pencil(grease_pencil,
|
||||
GeometryOwnershipType::ReadOnly);
|
||||
/* The layer adjustments for tinting and radii offsets are applied before modifier evaluation.
|
||||
* This ensures that the evaluated geometry contains the modifications. In the future, it would
|
||||
* be better to move these into modifiers. For now, these are hardcoded. */
|
||||
grease_pencil_do_layer_adjustments(*grease_pencil);
|
||||
GeometrySet geometry_set = GeometrySet::from_grease_pencil(grease_pencil,
|
||||
GeometryOwnershipType::ReadOnly);
|
||||
const bke::AttributeAccessor layer_attributes = grease_pencil->attributes();
|
||||
if (layer_attributes.contains("tint_color") || layer_attributes.contains("radius_offset")) {
|
||||
grease_pencil_do_layer_adjustments(*geometry_set.get_grease_pencil_for_write());
|
||||
}
|
||||
/* Only add the edit hint component in edit mode for now so users can properly select deformed
|
||||
* drawings. */
|
||||
if (object->mode == OB_MODE_EDIT) {
|
||||
|
||||
@@ -2456,7 +2456,7 @@ Array<TransDataEdgeSlideVert> transform_mesh_edge_slide_data_create(const TransD
|
||||
int best_dir = -1;
|
||||
const BMLoop *l_edge = l_src->next->v == v_dst ? l_src : l_src->prev;
|
||||
const BMLoop *l_other = l_edge->radial_next;
|
||||
while (l_other != l_edge) {
|
||||
do {
|
||||
if (l_other->f == curr_side_other->fdata[0].f) {
|
||||
best_dir = 0;
|
||||
break;
|
||||
@@ -2466,7 +2466,7 @@ Array<TransDataEdgeSlideVert> transform_mesh_edge_slide_data_create(const TransD
|
||||
break;
|
||||
}
|
||||
l_other = (l_other->v == this->v ? l_other->prev : l_other->next)->radial_next;
|
||||
}
|
||||
} while (l_other->f != l_edge->f);
|
||||
|
||||
if (best_dir != -1) {
|
||||
*r_do_isect_curr_dirs = true;
|
||||
@@ -2605,8 +2605,8 @@ Array<TransDataEdgeSlideVert> transform_mesh_edge_slide_data_create(const TransD
|
||||
float3 &dst2 = dst;
|
||||
float3 &dst3 = next.fdata[best_dir].dst;
|
||||
float3 isect0, isect1;
|
||||
if (isect_line_line_epsilon_v3(dst0, dst1, dst2, dst3, isect0, isect1, FLT_EPSILON) ==
|
||||
2)
|
||||
if (isect_line_line_epsilon_v3(dst0, dst1, dst2, dst3, isect0, isect1, FLT_EPSILON) !=
|
||||
0)
|
||||
{
|
||||
curr.fdata[best_dir].dst = math::midpoint(isect0, isect1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user