diff options
author | Ken Hughes <khughes@pacific.edu> | 2008-12-15 08:30:09 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2008-12-15 08:30:09 +0300 |
commit | ba6972eb4db3f4b1cf5e2f6132efab90d9357a9b (patch) | |
tree | 094c0383ea8e6dc95d6c57f997ec840b0601948b | |
parent | e7c0666d9678b76e03ffe773bb9c2fc4b86f0a79 (diff) |
Python API
----------
Bugfix #18044: missing return statements in getter for displacement modifier
caused incorrect values to be returned.
-rw-r--r-- | source/blender/python/api2_2x/Modifier.c | 6 | ||||
-rw-r--r-- | source/blender/python/api2_2x/doc/Modifier.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Modifier.c b/source/blender/python/api2_2x/Modifier.c index 3bef0eead09..dde21b13722 100644 --- a/source/blender/python/api2_2x/Modifier.c +++ b/source/blender/python/api2_2x/Modifier.c @@ -909,18 +909,18 @@ static PyObject *displace_getter( BPy_Modifier * self, int type ) switch( type ) { case EXPP_MOD_TEXTURE: - if (md->texture) Texture_CreatePyObject( md->texture ); + if (md->texture) return Texture_CreatePyObject( md->texture ); else Py_RETURN_NONE; case EXPP_MOD_STRENGTH: return PyFloat_FromDouble( (double)md->strength ); case EXPP_MOD_DIRECTION: - PyInt_FromLong( md->direction ); + return PyInt_FromLong( md->direction ); case EXPP_MOD_VERTGROUP: return PyString_FromString( md->defgrp_name ) ; case EXPP_MOD_MID_LEVEL: return PyFloat_FromDouble( (double)md->midlevel ); case EXPP_MOD_MAPPING: - PyInt_FromLong( md->texmapping ); + return PyInt_FromLong( md->texmapping ); case EXPP_MOD_OBJECT: return Object_CreatePyObject( md->map_object ); case EXPP_MOD_UVLAYER: diff --git a/source/blender/python/api2_2x/doc/Modifier.py b/source/blender/python/api2_2x/doc/Modifier.py index 47f72e566b2..03b868d3605 100644 --- a/source/blender/python/api2_2x/doc/Modifier.py +++ b/source/blender/python/api2_2x/doc/Modifier.py @@ -129,7 +129,7 @@ Example:: - UVLAYER - Used for Displace only - MID_LEVEL - Used for Displace only (float [0.0, 1.0], default: 0.5) - STRENGTH - Used for Displace only (float [-1000.0, 1000.0, default: 1.0) - - TEXTURE - Used for Displace only (string) + - TEXTURE - Used for Displace only (Texture object) - MAPPING - Used for Displace only - DIRECTION - Used for Displace only |