~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/gameengine/Ketsji/KX_ArmatureSensor.cpp

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
                                                        /* this constraint is not valid, can't use it */
87
87
                                                        break;
88
88
                                                m_constraint = pcon;
89
 
                                                break;  
 
89
                                                break;
90
90
                                        }
91
91
                                }
92
92
                                break;
193
193
        { NULL }        //Sentinel
194
194
};
195
195
 
196
 
PyObject* KX_ArmatureSensor::pyattr_get_constraint(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
 
196
PyObject *KX_ArmatureSensor::pyattr_get_constraint(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
197
197
{
198
198
        KX_ArmatureSensor* sensor = static_cast<KX_ArmatureSensor*>(self);
199
199
        if (sensor->m_gameobj->GetGameObjectType() == SCA_IObject::OBJ_ARMATURE) {
200
200
                BL_ArmatureObject* armobj = (BL_ArmatureObject*)sensor->m_gameobj;
201
201
                BL_ArmatureConstraint* constraint = armobj->GetConstraint(sensor->m_posechannel, sensor->m_constraintname);
202
 
                if (constraint) 
 
202
                if (constraint)
203
203
                        return constraint->GetProxy();
204
204
        }
205
205
        Py_RETURN_NONE;