Page MenuHome

Increase maximum allowed amount of points for Splines in both U and V directions
ClosedPublic

Authored by Simon Repp (simonrepp) on Jan 14 2014, 3:07 PM.

Details

Summary

Increase the maximum allowed amount of points in a spline from currently 32,767 (short) to 2,147,483,647 (int).
Change variables that get assigned the value from pntsu/pntsv to int type all over the codebase.
Change function parameters that previously passed the count as short to int type as well.

(because https://developer.blender.org/T38191)

Diff Detail

Event Timeline

Note: I did a global search for mentions of pntsu and pntsv all over the codebase, and for every occurence where the value was passed to a variable or function checked if the type was int (For the large majority of occurences that was already the case). Let me know if you think I might have overlooked something there!

I had some trouble getting it to build afterwards due to padding and pointer alignment issues, please pay special attention if this has been solved correctly, because my solution was really more imitation and guesswork rather than originating from a deep understanding of the problem. :)

Looks good to me, but will wait for Sergey's opinion.

Sorry for the delay, was fighting own bugs.

Overall patch seems good, it's good to use int instead of short. Didn't apply patch or test other usages of ponts{u,v} tho, will do it later tonight. Extra eyes doesn't hurt :)

Accepting the revision.

@Brecht Van Lommel (brecht), what do i do to push someone's patch?

@Sergey Sharybin (sergey) One possibility would be to download the raw diff file, create a local branch for the patch and get the changes in with git apply path/to/the/raw.diff, then merge that into master, etc.; For the efficient way using arc you'll have to wait for @Brecht Van Lommel (brecht)'s advice, not familiar with that yet :)

You can do arc patch to get the patch applied locally. However it will not include the author (that only works if it was submitted with arc diff), so you can do git commit --amend --author="...". Then you can merge it to master and push.

@Simon Repp (simonrepp), this i knew yes :) Just thought there's a some arc wodo to preserve author of the commit. @Brecht Van Lommel (brecht) explained this already.

In the middle of other pach and investigation, will push the patch right after finish current work :)