Fix: Grease Pencil: Pen tool moving incorrect handle when extruding from curve start
Previously, if a user extruded a curve with the Pen tool and held down the `Ctrl` modifier key, the right handle would always be moved independently. This should not happen when extruding a curve from the beginning. This pull request adds a check that will determine if the left handle is currently selected when extruding a curve. This is the case, when extruding a curve from the beginning. Then, the left handle will be moved independently, instead of the right handle. Pull Request: https://projects.blender.org/blender/blender/pulls/145235
This commit is contained in:
committed by
Falk David
parent
566e390d7c
commit
8d9754bfaa
@@ -312,16 +312,23 @@ struct PenToolOperation {
|
||||
return;
|
||||
}
|
||||
|
||||
const bool is_left = !right_selected[point_i];
|
||||
if (this->move_handle) {
|
||||
const float2 pos_right = this->layer_to_screen(layer_to_object, handles_right[point_i]);
|
||||
handles_right[point_i] = this->screen_to_layer(
|
||||
layer_to_world, pos_right + offset, depth_point);
|
||||
if (is_left) {
|
||||
const float2 pos_left = this->layer_to_screen(layer_to_object, handles_left[point_i]);
|
||||
handles_left[point_i] = this->screen_to_layer(
|
||||
layer_to_world, pos_left + offset, depth_point);
|
||||
}
|
||||
else {
|
||||
const float2 pos_right = this->layer_to_screen(layer_to_object, handles_right[point_i]);
|
||||
handles_right[point_i] = this->screen_to_layer(
|
||||
layer_to_world, pos_right + offset, depth_point);
|
||||
}
|
||||
handle_types_left[point_i] = BEZIER_HANDLE_FREE;
|
||||
handle_types_right[point_i] = BEZIER_HANDLE_FREE;
|
||||
return;
|
||||
}
|
||||
|
||||
const bool is_left = !right_selected[point_i];
|
||||
const float2 center_point = this->layer_to_screen(layer_to_object, depth_point);
|
||||
offset = this->mouse_co - this->center_of_mass_co;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user