diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-12-26 10:00:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-12-26 10:00:32 +0300 |
commit | 46924d32f4b34fedb6b1b9afe26ad5df4d73eff0 (patch) | |
tree | ef32e54f8913037beb06fe32c0d02b8438990f8b /source/blender/python/api2_2x/Object.c | |
parent | 0aebc13199f7d552e4dde880c2fc35fe06bd2f50 (diff) |
Camera.c refactor, moved to getsetattrs. deprecated get/set functions. and added access to all camera settings.
cam.type now uses 'ortho' and 'persp' rather then 0 and 1
group.c and object.c, minor cleanup
Diffstat (limited to 'source/blender/python/api2_2x/Object.c')
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index d7373edbf49..eb0c2911096 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -3898,31 +3898,31 @@ static PyObject *getFloatAttr( BPy_Object *self, void *type ) param = self->object->soft->mediafrict; break; case EXPP_OBJ_ATTR_SB_RKLIMIT: - param = self->object->soft->rklimit; + param = object->soft->rklimit; break; case EXPP_OBJ_ATTR_SB_PHYSICSSPEED: - param = self->object->soft->physics_speed; + param = object->soft->physics_speed; break; case EXPP_OBJ_ATTR_SB_GOALSPRING: - param = self->object->soft->goalspring; + param = object->soft->goalspring; break; case EXPP_OBJ_ATTR_SB_GOALFRICT: - param = self->object->soft->goalfrict; + param = object->soft->goalfrict; break; case EXPP_OBJ_ATTR_SB_MINGOAL: - param = self->object->soft->mingoal; + param = object->soft->mingoal; break; case EXPP_OBJ_ATTR_SB_MAXGOAL: - param = self->object->soft->maxgoal; + param = object->soft->maxgoal; break; case EXPP_OBJ_ATTR_SB_DEFGOAL: - param = self->object->soft->defgoal; + param = object->soft->defgoal; break; case EXPP_OBJ_ATTR_SB_INSPRING: - param = self->object->soft->inspring; + param = object->soft->inspring; break; case EXPP_OBJ_ATTR_SB_INFRICT: - param = self->object->soft->infrict; + param = object->soft->infrict; break; default: return EXPP_ReturnPyObjError( PyExc_RuntimeError, @@ -4439,10 +4439,8 @@ static int Object_setIpo( BPy_Object * self, PyObject * value ) /* assign new Ipo and increment user count, or set to NULL if deleting */ self->object->ipo = ipo; - if ( ipo ) { - id = &ipo->id; - id->us++; - } + if ( ipo ) + id_us_plus(&ipo->id); return 0; } |