MeshGui: [skip ci] expose highlightSegments() to Python
This commit is contained in:
@@ -38,5 +38,12 @@
|
||||
<UserDocu>Clear the selection</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="highlightSegments">
|
||||
<Documentation>
|
||||
<UserDocu>Highlights the segments of a mesh with a given list of colors.
|
||||
The number of elements of this list must be equal to the number of mesh segments.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
|
||||
@@ -124,7 +124,19 @@ PyObject* ViewProviderMeshPy::clearSelection(PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* ViewProviderMeshPy::highlightSegments(PyObject *args)
|
||||
{
|
||||
PyObject* list;
|
||||
if (!PyArg_ParseTuple(args, "O", &list))
|
||||
return 0;
|
||||
|
||||
App::PropertyColorList colors;
|
||||
colors.setPyObject(list);
|
||||
|
||||
ViewProviderMesh* vp = getViewProviderMeshPtr();
|
||||
vp->highlightSegments(colors.getValues());
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject *ViewProviderMeshPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user