GPencil: Fix unreported random rotation for single point with texture
When using ``Path`` alignment, if the stroke has one point the texture rotates randomly when move the viewport. This was because with one point is impossible to calculate a path. Now, if the stroke has only one point, the texture for this stroke is aligned to Object.
This commit is contained in:
parent
c369382977
commit
3c02e648f3
|
@ -442,6 +442,10 @@ void stroke_vertex()
|
|||
if (is_dot) {
|
||||
# ifdef GP_MATERIAL_BUFFER_LEN
|
||||
int alignement = GP_FLAG(m) & GP_STROKE_ALIGNMENT;
|
||||
/* For one point strokes use object aligment. */
|
||||
if (ma.x == -1 && ma2.x == -1 && alignement == GP_STROKE_ALIGNMENT_STROKE) {
|
||||
alignement = GP_STROKE_ALIGNMENT_OBJECT;
|
||||
}
|
||||
# endif
|
||||
|
||||
vec2 x_axis;
|
||||
|
|
Loading…
Reference in New Issue