basic infrastructure

This commit is contained in:
Stefan Tröger
2013-04-25 11:58:21 +02:00
committed by Stefan Tröger
parent 638cfcc2cf
commit 474fbbcb3e
42 changed files with 488 additions and 3460 deletions

View File

@@ -2,6 +2,7 @@
#include "PreCompiled.h"
#include "Mod/Assembly/App/ConstraintGroup.h"
#include "Mod/Assembly/App/ConstraintPy.h"
// inclusion of the generated files (generated out of ConstraintGroupPy.xml)
#include "ConstraintGroupPy.h"
@@ -15,11 +16,19 @@ std::string ConstraintGroupPy::representation(void) const
return std::string("<ConstraintGroup object>");
}
PyObject* ConstraintGroupPy::addConstraint(PyObject * args)
{
PyObject *pcObj;
if (!PyArg_ParseTuple(args, "O", &pcObj))
return 0;
if (PyObject_TypeCheck(pcObj, &(Assembly::ConstraintPy::Type))) {
Base::Console().Message("Add constraint\n");
Assembly::Constraint *c = static_cast<Assembly::ConstraintPy*>(pcObj)->getConstraintPtr();
this->getConstraintGroupPtr()->addConstraint(c);
}
Py_Return;
}
PyObject *ConstraintGroupPy::getCustomAttributes(const char* /*attr*/) const
{