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