basic infrastructure
This commit is contained in:
committed by
Stefan Tröger
parent
638cfcc2cf
commit
474fbbcb3e
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user