Added matt's empty drawsize property to python.
This commit is contained in:
@@ -3517,6 +3517,8 @@ static PyObject *Object_getAttr( BPy_Object * obj, char *name )
|
|||||||
return Object_getDupliRot( obj );
|
return Object_getDupliRot( obj );
|
||||||
if( StringEqual( name, "enableDupNoSpeed" ) )
|
if( StringEqual( name, "enableDupNoSpeed" ) )
|
||||||
return Object_getDupliNoSpeed( obj );
|
return Object_getDupliNoSpeed( obj );
|
||||||
|
if( StringEqual( name, "drawSize" ) )
|
||||||
|
return ( PyFloat_FromDouble( object->empty_drawsize ) );
|
||||||
|
|
||||||
/* not an attribute, search the methods table */
|
/* not an attribute, search the methods table */
|
||||||
return Py_FindMethod( BPy_Object_methods, ( PyObject * ) obj, name );
|
return Py_FindMethod( BPy_Object_methods, ( PyObject * ) obj, name );
|
||||||
@@ -3799,6 +3801,8 @@ static int Object_setAttr( BPy_Object * obj, char *name, PyObject * value )
|
|||||||
else if( StringEqual( name, "DupObjects" ) )
|
else if( StringEqual( name, "DupObjects" ) )
|
||||||
return EXPP_ReturnIntError( PyExc_AttributeError,
|
return EXPP_ReturnIntError( PyExc_AttributeError,
|
||||||
"DupObjects is not writable" );
|
"DupObjects is not writable" );
|
||||||
|
else if( StringEqual( name, "drawSize" ) )
|
||||||
|
return ( !PyArg_Parse( value, "f", &( object->empty_drawsize ) ) );
|
||||||
else { /* if it turns out here, it's not an attribute*/
|
else { /* if it turns out here, it's not an attribute*/
|
||||||
Py_DECREF(valtuple);
|
Py_DECREF(valtuple);
|
||||||
return EXPP_ReturnIntError( PyExc_KeyError, "attribute not found" );
|
return EXPP_ReturnIntError( PyExc_KeyError, "attribute not found" );
|
||||||
|
|||||||
@@ -316,6 +316,8 @@ class Object:
|
|||||||
@type DupOn: int
|
@type DupOn: int
|
||||||
@ivar DupOff: The DupliFrame removal of every Nth frame for this object. (Use with L{enableDupFrames<enableDupFrames>})
|
@ivar DupOff: The DupliFrame removal of every Nth frame for this object. (Use with L{enableDupFrames<enableDupFrames>})
|
||||||
@type DupOff: int
|
@type DupOff: int
|
||||||
|
@ivar drawSize: The drawsize for empty objects. 1.0. is default.
|
||||||
|
@type drawSize: float
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def buildParts():
|
def buildParts():
|
||||||
|
|||||||
Reference in New Issue
Block a user