Page MenuHome

GP: Refactor coordinates to float

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

Diff Detail

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.


Colud you calc mval_i outside of the loop?


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.


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

Antonio Vazquez (antoniov) requested changes to this revision.Dec 5 2018, 8:36 PM
This revision now requires changes to proceed.Dec 5 2018, 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.Dec 7 2018, 8:24 AM

Fixed issue with cursor, was customdata cast as int

This revision was automatically updated to reflect the committed changes.