Fix #147432: Grease Pencil: Pen tool Assert when Resolution attribute exists
The problem was that the Pen Tool would not set the `Resolution` attribute and so when the `Resolution` attribute didn't exist, the newly added curve would default to a value of 0, which would then lead to an Assert. This problem would also effect `Curves` Objects. Pull Request: https://projects.blender.org/blender/blender/pulls/147673
This commit is contained in:
committed by
Falk David
parent
7026911502
commit
0e44c5d851
@@ -813,6 +813,8 @@ static void add_single_point_and_curve(const PenToolOperation &ptd,
|
|||||||
curves.handle_types_left_for_write().last() = ptd.extrude_handle;
|
curves.handle_types_left_for_write().last() = ptd.extrude_handle;
|
||||||
curves.handle_types_right_for_write().last() = ptd.extrude_handle;
|
curves.handle_types_right_for_write().last() = ptd.extrude_handle;
|
||||||
curves.update_curve_types();
|
curves.update_curve_types();
|
||||||
|
curves.resolution_for_write().last() = 12;
|
||||||
|
curve_attributes_to_skip.add("resolution");
|
||||||
|
|
||||||
const int material_index = ptd.vc.obact->actcol - 1;
|
const int material_index = ptd.vc.obact->actcol - 1;
|
||||||
if (material_index != -1) {
|
if (material_index != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user