Sketcher: Python interface to contraints' activated state

This commit is contained in:
Abdullah Tahiri
2019-06-22 06:42:21 +02:00
committed by abdullahtahiriyo
parent 0b84325e5f
commit 6a1863fe52
2 changed files with 13 additions and 2 deletions

View File

@@ -44,13 +44,13 @@
<Documentation>
<UserDocu>Position of second geometry index the Constraint refers to</UserDocu>
</Documentation>
<Parameter Name="SeondPos" Type="Long"/>
<Parameter Name="SecondPos" Type="Long"/>
</Attribute>
<Attribute Name="Third" ReadOnly="false">
<Documentation>
<UserDocu>Third geometry index the Constraint refers to</UserDocu>
</Documentation>
<Parameter Name="Second" Type="Long"/>
<Parameter Name="Third" Type="Long"/>
</Attribute>
<Attribute Name="ThirdPos" ReadOnly="false">
<Documentation>
@@ -82,5 +82,11 @@
</Documentation>
<Parameter Name="InVirtualSpace" Type="Boolean"/>
</Attribute>
<Attribute Name="IsActive" ReadOnly="true">
<Documentation>
<UserDocu>Returns whether the constraint active (enforced) or not</UserDocu>
</Documentation>
<Parameter Name="IsActive" Type="Boolean"/>
</Attribute>
</PythonExport>
</GenerateModel>

View File

@@ -707,6 +707,11 @@ Py::Boolean ConstraintPy::getInVirtualSpace(void) const
return Py::Boolean(this->getConstraintPtr()->isInVirtualSpace);
}
Py::Boolean ConstraintPy::getIsActive(void) const
{
return Py::Boolean(this->getConstraintPtr()->isActive);
}
PyObject *ConstraintPy::getCustomAttributes(const char* /*attr*/) const
{
return 0;