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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-06-17 18:03:40 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-06-17 18:03:40 +0400
commitf94b87bbb89b2350be2f5b26c2afb2372fd9d99c (patch)
treea9f96351ba4b8e1e21f1d64c14e861d948c8358e /source/blender/python/intern/bpy.c
parentab5f4c4dfad3880f60c8555437aeb0c9ba85cd1e (diff)
New python API for units handling.
Exposes all supported unit systems & types, and to_value()/to_string() functions. Reviewed and enhanced by CampbellBarton, many thanks! Differential Revision: https://developer.blender.org/D416
Diffstat (limited to 'source/blender/python/intern/bpy.c')
-rw-r--r--source/blender/python/intern/bpy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index 89104821cb0..5fd19d3ed88 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -49,6 +49,7 @@
#include "bpy_props.h"
#include "bpy_library.h"
#include "bpy_operator.h"
+#include "bpy_utils_units.h"
#include "MEM_guardedalloc.h"
@@ -334,6 +335,7 @@ void BPy_init_modules(void)
/* ops is now a python module that does the conversion from SOME_OT_foo -> some.foo */
PyModule_AddObject(mod, "ops", BPY_operator_module());
PyModule_AddObject(mod, "app", BPY_app_struct());
+ PyModule_AddObject(mod, "_utils_units", BPY_utils_units());
/* bpy context */
RNA_pointer_create(NULL, &RNA_Context, (void *)BPy_GetContext(), &ctx_ptr);