Blender Git Commits

Blender Git "temp-pyapi-units" branch commits.

June 17, 2014, 13:19 (GMT)
remove unused includes, simplify alloc/free
June 17, 2014, 13:03 (GMT)
Fix loss of precision when converting string to value.
June 17, 2014, 13:02 (GMT)
Revert to static size for our buffers.

64 should be more than enough, never could get strings longer than ~21 chars so far.
June 17, 2014, 12:55 (GMT)
Add more tests to bpyunits.

Only LENGTH type for now.

This showed two limits to current BKE's units code:
* When converting string to value, we use too few precision for units' values (6 digits),
not good esp. when mixing big and small units (like e.g. miles and inches). Will fix that
in next commit.
* When converting values to string, 'precision' parameter ignores order of magnitude of the value,
which leads to invalid results with big numbers (e.g. 1000000mi gives 1000000.004mi with prec of 3).
June 17, 2014, 10:09 (GMT)
Fix doc strings.
June 17, 2014, 09:53 (GMT)
Deduplicate some code for struct-seq initialization
June 17, 2014, 08:41 (GMT)
Make units a real submodule.
June 17, 2014, 04:48 (GMT)
Minor cleanup/changes to api & docstrings
June 17, 2014, 04:17 (GMT)
Merge branch 'master' into temp-pyapi-units
June 16, 2014, 18:17 (GMT)
Some minor tweaking on temps buffers...
June 16, 2014, 14:57 (GMT)
Modifications from Campbell's review, thanks! :)
June 16, 2014, 07:25 (GMT)
First step toward a basic units py API (exposes all supported unti systems & types, and str_to_value/value_to_str functions).

Also adds a skeletton of unittest file for it!

Reviewers: campbellbarton

CC: carter2422

Differential Revision:
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021