forked from bartvdbraak/blender
Python API
---------- Bugfix #18044: missing return statements in getter for displacement modifier caused incorrect values to be returned.
This commit is contained in:
parent
e7c0666d96
commit
ba6972eb4d
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user