Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-08-12 18:11:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-12 18:11:53 +0400
commit45ba3d31c04a8ea3020f5ae24827d2a40ada5f7f (patch)
tree0f2d16615f778fb64d58ab784eb2ad0a38627988 /source/blender/blenkernel/BKE_unit.h
parentfcf883ecf9b90ca859c3fe692dffe4eb37e5e75d (diff)
when units are enabled use them for 3d viewport grid drawing, display the dimension for the smallest grid cell.
still need to make this work with grid snapping.
Diffstat (limited to 'source/blender/blenkernel/BKE_unit.h')
-rw-r--r--source/blender/blenkernel/BKE_unit.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h
index 91b1702ca82..c64c5aa50a1 100644
--- a/source/blender/blenkernel/BKE_unit.h
+++ b/source/blender/blenkernel/BKE_unit.h
@@ -37,7 +37,26 @@ void bUnit_AsString(char *str, double value, int prec, int system, int type, int
int bUnit_ReplaceString(char *str, char *str_orig, char *str_prev, double scale_pref, int system, int type);
/* the size of the unit used for this value (used for calculating the ckickstep) */
-double bUnit_Size(double value, int system, int type);
+double bUnit_ClosestScalar(double value, int system, int type);
+
+/* loop over scales, coudl add names later */
+//double bUnit_Iter(void **unit, char **name, int system, int type);
+
+void bUnit_GetSystem(void **usys_pt, int *len, int system, int type);
+char* bUnit_GetName(void *usys_pt, int index);
+char* bUnit_GetNamePlural(void *usys_pt, int index);
+double bUnit_GetScaler(void *usys_pt, int index);
+
+/* aligned with PropertyUnit */
+#define B_UNIT_NONE 0
+#define B_UNIT_LENGTH 1
+#define B_UNIT_AREA 2
+#define B_UNIT_VOLUME 3
+#define B_UNIT_MASS 4
+#define B_UNIT_ROTATION 5
+#define B_UNIT_TIME 6
+#define B_UNIT_VELOCITY 7
+#define B_UNIT_ACCELERATION 8
#ifdef __cplusplus
}