[Bf-blender-cvs] [291a259] temp_merge_gooseberry_hair: Properly register the `mathutils.interpolate` submodule.

Lukas Tönne noreply at git.blender.org
Mon Jan 19 20:51:32 CET 2015


Commit: 291a259eaa48b2aaf8543e90ba8299070e5ecb7e
Author: Lukas Tönne
Date:   Wed Dec 31 09:58:47 2014 +0100
Branches: temp_merge_gooseberry_hair
https://developer.blender.org/rB291a259eaa48b2aaf8543e90ba8299070e5ecb7e

Properly register the `mathutils.interpolate` submodule.

===================================================================

M	source/blender/python/mathutils/mathutils.c

===================================================================

diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 2349987..70a0a99 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -513,6 +513,12 @@ PyMODINIT_FUNC PyInit_mathutils(void)
 	
 	/* submodule */
 	PyModule_AddObject(mod, "geometry",       (submodule = PyInit_mathutils_geometry()));
+	/* XXX, python doesnt do imports with this usefully yet
+	 * 'from mathutils.geometry import PolyFill'
+	 * ...fails without this. */
+	PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule);
+	Py_INCREF(submodule);
+
 	PyModule_AddObject(mod, "interpolate",    (submodule = PyInit_mathutils_interpolate()));
 	/* XXX, python doesnt do imports with this usefully yet
 	 * 'from mathutils.geometry import PolyFill'




More information about the Bf-blender-cvs mailing list