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 12:16:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-12 12:16:10 +0400
commit8641833b57606a2ac21f7c83b53ea5fc55664815 (patch)
treed43e30a03c328d33aa9df021fda3fa47583ee0ce /source/blender/blenkernel/intern/unit.c
parent63b276efbfa814e813692b1a8d6cb0ddda08bf93 (diff)
Set the clickstep for unit buttons to each click moves 1 unit.
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r--source/blender/blenkernel/intern/unit.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index eaa90a87691..5ecc8ddf5b8 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -347,3 +347,19 @@ int bUnit_ReplaceString(char *str, char *str_orig, char *str_prev, double scale_
// printf("replace %s\n", str);
return change;
}
+
+
+double bUnit_Size(double value, int system, int type)
+{
+ bUnitCollection *usys = unit_get_system(system, type);
+ bUnitDef *unit;
+
+ if(usys==NULL)
+ return -1;
+
+ unit= unit_best_fit(value, usys, NULL);
+ if(unit==NULL)
+ return -1;
+
+ return unit->mul;
+}