Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2005-05-17 11:17:52 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2005-05-17 11:17:52 +0400
commit859959b49c8122b1e37027cf5009fecd23f5d8c8 (patch)
tree0dbe86f455743795604d88b3b9a351d0d6d1d98e /source/blender/python
parent7f4ff24462217328a6d0d0b193621949ed5e085a (diff)
BPython:
- fixing bug reported by Paolo Colombo: space handler slinks set for a 3d view were not set when the area got maximized; - Blender.Object: added object.isSB() method to know if an object is a soft body (has ob->soft != NULL). Used in fixfromarmature.py. Scripts: - updates: batch_name_edit (Campbell), fixfromarmature (JMS); - additions: X3D exporter by Bart; Envelope Suite by Jonas Petersen; BVH 2 Armature by Jean-Baptiste Perin; Camera Changer by Regis Montoya (3R); Interactive Console by Campbell (ideasman). - tiny updates in other scripts.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/api2_2x/Object.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index d07633a5185..53a3b3fe98e 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -211,6 +211,7 @@ static PyObject *Object_setPISurfaceDamp( BPy_Object * self, PyObject * args );
static PyObject *Object_getPIDeflection( BPy_Object * self );
static PyObject *Object_setPIDeflection( BPy_Object * self, PyObject * args );
+static PyObject *Object_isSB( BPy_Object * self );
static PyObject *Object_getSBMass( BPy_Object * self );
static PyObject *Object_setSBMass( BPy_Object * self, PyObject * args );
static PyObject *Object_getSBGravity( BPy_Object * self );
@@ -348,6 +349,8 @@ automatic when the script finishes."},
/* Softbody */
+ {"isSB", ( PyCFunction ) Object_isSB, METH_NOARGS,
+ "True if object is a soft body"},
{"getSBMass", ( PyCFunction ) Object_getSBMass, METH_NOARGS,
"Returns SB Mass"},
{"setSBMass", ( PyCFunction ) Object_setSBMass, METH_VARARGS,
@@ -3225,6 +3228,13 @@ PyObject *Object_setPIDeflection( BPy_Object * self, PyObject * args )
/* SOFTBODY FUNCTIONS */
+PyObject *Object_isSB(BPy_Object *self)
+{
+ if (self->object->soft)
+ return EXPP_incr_ret_True();
+ else return EXPP_incr_ret_False();
+}
+
PyObject *Object_getSBMass( BPy_Object * self )
{
PyObject *attr;
@@ -3678,7 +3688,7 @@ PyObject *Object_setSBDefaultGoal( BPy_Object * self, PyObject * args )
PyObject *Object_getSBEnable( BPy_Object * self )
{
- short flag = self->object->softflag;
+ /*short flag = self->object->softflag;*/
PyObject *attr = NULL;
if(!self->object->soft){
@@ -3726,7 +3736,7 @@ PyObject *Object_setSBEnable( BPy_Object * self, PyObject * args )
PyObject *Object_getSBPostDef( BPy_Object * self )
{
- short flag = self->object->softflag;
+ /*short flag = self->object->softflag;*/
PyObject *attr = NULL;
if(!self->object->soft){
@@ -3769,7 +3779,7 @@ PyObject *Object_setSBPostDef( BPy_Object * self, PyObject * args )
}
PyObject *Object_getSBUseGoal( BPy_Object * self )
{
- short flag = self->object->softflag;
+ /*short flag = self->object->softflag;*/
PyObject *attr = NULL;
if(!self->object->soft){
@@ -3812,7 +3822,7 @@ PyObject *Object_setSBUseGoal( BPy_Object * self, PyObject * args )
PyObject *Object_getSBUseEdges( BPy_Object * self )
{
- short flag = self->object->softflag;
+ /*short flag = self->object->softflag;*/
PyObject *attr = NULL;
if(!self->object->soft){
@@ -3855,7 +3865,7 @@ PyObject *Object_setSBUseEdges( BPy_Object * self, PyObject * args )
PyObject *Object_getSBStiffQuads( BPy_Object * self )
{
- short flag = self->object->softflag;
+ /*short flag = self->object->softflag;*/
PyObject *attr = NULL;
if(!self->object->soft){