44 int total_number_of_drawings = 0;
47 for (
const int i : trans_data_contrainers.
index_range()) {
57 const int current_frame = scene->
r.
cfra;
58 std::optional<int> start_frame = target_layer.
start_frame_at(current_frame);
59 if (start_frame.has_value() && (start_frame.value() != current_frame)) {
60 grease_pencil.insert_duplicate_frame(
61 target_layer, *target_layer.
start_frame_at(current_frame), current_frame,
false);
67 all_drawings.
append(drawings);
68 total_number_of_drawings += drawings.
size();
76 for (
const int i : trans_data_contrainers.
index_range()) {
88 std::array<IndexMask, 3> selection_per_attribute;
91 *
object, info.drawing, info.layer_index, curves_transform_data->
memory);
93 *
object, info.drawing, info.layer_index, curves_transform_data->
memory);
95 for (
const int attribute_i : selection_attribute_names.
index_range()) {
96 const StringRef &selection_name = selection_attribute_names[attribute_i];
102 selection_per_attribute[attribute_i], editable_points, curves_transform_data->
memory);
106 curves.curve_type_counts(),
109 curves_transform_data->
memory);
112 points_by_curve, bezier_curves[layer_offset], curves_transform_data->
memory);
119 selection_per_attribute[1], selection_per_attribute[0], memory);
121 selection_per_attribute[2], selection_per_attribute[0], memory);
128 selected_left, selected_right, bezier_points, handle_types_left, handle_types_right);
129 curves.tag_topology_changed();
130 info.drawing.tag_topology_changed();
134 {&bezier_points, &selection_per_attribute[0]});
138 selection_per_attribute[1] = evaluate_expression(
139 builder.
merge({&selection_per_attribute[1], &selected_bezier_points}),
140 curves_transform_data->
memory);
141 selection_per_attribute[2] = evaluate_expression(
142 builder.
merge({&selection_per_attribute[2], &selected_bezier_points}),
143 curves_transform_data->
memory);
146 if (use_proportional_edit) {
148 editable_points, bezier_points, curves_transform_data->
memory);
150 points_to_transform_per_attribute[layer_offset].append(editable_points);
152 if (selection_attribute_names.
size() > 1) {
153 points_to_transform_per_attribute[layer_offset].append(editable_bezier_points);
154 points_to_transform_per_attribute[layer_offset].append(editable_bezier_points);
158 for (
const int selection_i : selection_attribute_names.
index_range()) {
159 points_to_transform_per_attribute[layer_offset].append(
160 selection_per_attribute[selection_i]);
161 tc.
data_len += points_to_transform_per_attribute[layer_offset][selection_i].
size();
182 for (
const int i : trans_data_contrainers.
index_range()) {
201 std::optional<MutableSpan<float>> value_attribute;
204 value_attribute = opacities;
206 else if (is_scale_thickness) {
208 value_attribute = radii;
211 const IndexMask affected_strokes = use_proportional_edit || use_individual_origins ?
223 layer_space_to_world_space,
226 points_to_transform_per_attribute[layer_offset],
229 bezier_curves[layer_offset],
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)