Page MenuHome

GP: Refactor coordinates to float
ClosedPublic

Authored by Charlie Jolly (charlie) on Wed, Dec 5, 7:48 PM.

Diff Detail

Repository
rB Blender

Event Timeline

This patch changes the point storage to floats. The changes are limited to GP only. Not touched ED_ or BLI_ functions. This does mean that there are quite a few casts but from my limited testing I've not had any issues so far.

@Antonio Vazquez (antoniov) If you could take a look that would be appreciated. I won't be around until tomorrow to follow up.

source/blender/editors/gpencil/gpencil_paint.c
1365

Colud you calc mval_i outside of the loop?

1389

Same as above (calc outside loop)

The changes look good in general, only review that you calc the integer conversion only once and try to use only one variable definition. Really, this is not an issue running the code, but makes it more clear.

source/blender/editors/gpencil/annotate_paint.c
813

Maybe you could calc mval_i at the begining of the function.

Antonio Vazquez (antoniov) requested changes to this revision.Wed, Dec 5, 8:36 PM
This revision now requires changes to proceed.Wed, Dec 5, 8:36 PM
Charlie Jolly (charlie) marked 3 inline comments as done.

Fix GPU format and address comments

Git issue, lost some changes

@Charlie Jolly (charlie) Commit in 2.8 and then merge to greasepencil-object to keep the branch updated to last version.

This revision is now accepted and ready to land.Fri, Dec 7, 8:24 AM

Fixed issue with cursor, was customdata cast as int

This revision was automatically updated to reflect the committed changes.