Commit ac39444a authored by Sylvain Thery's avatar Sylvain Thery Committed by Pierre Kraemer

schnapps python record

parent f4411e8d
...@@ -129,6 +129,9 @@ void Surface_Distance_Plugin::computeDistance( ...@@ -129,6 +129,9 @@ void Surface_Distance_Plugin::computeDistance(
// Algo::Geometry::computeDistance<PFP2>(map1, position1, distance1, map2, position2); // Algo::Geometry::computeDistance<PFP2>(map1, position1, distance1, map2, position2);
// Algo::Geometry::computeDistance<PFP2>(map2, position2, distance2, map1, position1); // Algo::Geometry::computeDistance<PFP2>(map2, position2, distance2, map1, position1);
this->pythonRecording("computeDistance", "", mapName1, positionAttributeName1, distanceAttributeName1,
mapName2, positionAttributeName2, distanceAttributeName2);
mh1->notifyAttributeModification(distance1); mh1->notifyAttributeModification(distance1);
mh2->notifyAttributeModification(distance2); mh2->notifyAttributeModification(distance2);
} }
......
...@@ -30,14 +30,8 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName) ...@@ -30,14 +30,8 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName)
QFileInfo fi(fileName); QFileInfo fi(fileName);
if(fi.exists()) if(fi.exists())
{ {
// RECORDING
//QTextStream* rec = m_schnapps->pythonStreamRecorder();
//if (rec)
// *rec << fi.baseName() << " = " << this->getName() << ".importFromFile(\"" << fileName << "\");" << endl;
pythonRecording("importFromFile", fi.baseName(), fileName); pythonRecording("importFromFile", fi.baseName(), fileName);
MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2); MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2);
if(mhg) if(mhg)
{ {
......
...@@ -107,7 +107,7 @@ public slots: ...@@ -107,7 +107,7 @@ public slots:
void changeVerticesScaleFactor(const QString&view, const QString& map, float f); void changeVerticesScaleFactor(const QString&view, const QString& map, float f);
void changeRenderEdges(const QString& view, const QString& map, bool b); void changeRenderEdges(const QString& view, const QString& map, bool b);
void changeRenderFaces(const QString& view, const QString& map, bool b); void changeRenderFaces(const QString& view, const QString& map, bool b);
void changeFacesStyle(const QString& view, const QString& map, MapParameters::FaceShadingStyle style); void changeFacesStyle(const QString& view, const QString& map, int);
void changeRenderBoundary(const QString& view, const QString& map, bool b); void changeRenderBoundary(const QString& view, const QString& map, bool b);
void changeFaceColor(const QString& view, const QString& map, float r, float g, float b); void changeFaceColor(const QString& view, const QString& map, float r, float g, float b);
void changeEdgeColor(const QString& view, const QString& map, float r, float g, float b); void changeEdgeColor(const QString& view, const QString& map, float r, float g, float b);
......
...@@ -313,8 +313,9 @@ void Surface_Render_Plugin::changeRenderFaces(const QString& view, const QString ...@@ -313,8 +313,9 @@ void Surface_Render_Plugin::changeRenderFaces(const QString& view, const QString
} }
} }
void Surface_Render_Plugin::changeFacesStyle(const QString& view, const QString& map, MapParameters::FaceShadingStyle style) void Surface_Render_Plugin::changeFacesStyle(const QString& view, const QString& map, int iStyle)
{ {
MapParameters::FaceShadingStyle style = MapParameters::FaceShadingStyle(iStyle);
DEBUG_SLOT(); DEBUG_SLOT();
View* v = m_schnapps->getView(view); View* v = m_schnapps->getView(view);
MapHandlerGen* m = m_schnapps->getMap(map); MapHandlerGen* m = m_schnapps->getMap(map);
......
...@@ -76,8 +76,8 @@ void Surface_Render_DockTab::colorSelected(const QColor& col) ...@@ -76,8 +76,8 @@ void Surface_Render_DockTab::colorSelected(const QColor& col)
{ {
m_plugin->h_viewParameterSet[view][map].diffuseColor = rgbCol; m_plugin->h_viewParameterSet[view][map].diffuseColor = rgbCol;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeFaceColor", "", view->getName(), map->getName(), rgbCol[0], rgbCol[1], rgbCol[2]);
} }
m_plugin->pythonRecording("changeFaceColor", "", view->getName(), map->getName(), rgbCol[0], rgbCol[1], rgbCol[2]);
} }
if (m_currentColorDial == 2) if (m_currentColorDial == 2)
...@@ -94,8 +94,8 @@ void Surface_Render_DockTab::colorSelected(const QColor& col) ...@@ -94,8 +94,8 @@ void Surface_Render_DockTab::colorSelected(const QColor& col)
{ {
m_plugin->h_viewParameterSet[view][map].simpleColor = rgbCol; m_plugin->h_viewParameterSet[view][map].simpleColor = rgbCol;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeEdgeColor", "", view->getName(), map->getName(), rgbCol[0], rgbCol[1], rgbCol[2]);
} }
m_plugin->pythonRecording("changeEdgeColor", "", view->getName(), map->getName(), rgbCol[0], rgbCol[1], rgbCol[2]);
} }
if (m_currentColorDial == 3) if (m_currentColorDial == 3)
...@@ -112,8 +112,8 @@ void Surface_Render_DockTab::colorSelected(const QColor& col) ...@@ -112,8 +112,8 @@ void Surface_Render_DockTab::colorSelected(const QColor& col)
{ {
m_plugin->h_viewParameterSet[view][map].vertexColor = rgbCol; m_plugin->h_viewParameterSet[view][map].vertexColor = rgbCol;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeVertexColor", "", view->getName(), map->getName(), rgbCol[0], rgbCol[1], rgbCol[2]);
} }
m_plugin->pythonRecording("changVertexColor", "", view->getName(), map->getName(), rgbCol[0], rgbCol[1], rgbCol[2]);
} }
} }
...@@ -131,8 +131,8 @@ void Surface_Render_DockTab::positionVBOChanged(int index) ...@@ -131,8 +131,8 @@ void Surface_Render_DockTab::positionVBOChanged(int index)
{ {
m_plugin->h_viewParameterSet[view][map].positionVBO = map->getVBO(combo_positionVBO->currentText()); m_plugin->h_viewParameterSet[view][map].positionVBO = map->getVBO(combo_positionVBO->currentText());
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changePositionVBO", "", view->getName(), map->getName(), combo_positionVBO->currentText());
} }
m_plugin->pythonRecording("changePositionVBO", "", view->getName(), map->getName(), combo_positionVBO->currentText());
} }
} }
...@@ -146,8 +146,8 @@ void Surface_Render_DockTab::normalVBOChanged(int index) ...@@ -146,8 +146,8 @@ void Surface_Render_DockTab::normalVBOChanged(int index)
{ {
m_plugin->h_viewParameterSet[view][map].normalVBO = map->getVBO(combo_normalVBO->currentText()); m_plugin->h_viewParameterSet[view][map].normalVBO = map->getVBO(combo_normalVBO->currentText());
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeNormalVBO", "", view->getName(), map->getName(), combo_normalVBO->currentText());
} }
m_plugin->pythonRecording("changeNormalVBO","", view->getName(), map->getName(), combo_normalVBO->currentText());
} }
} }
...@@ -161,8 +161,8 @@ void Surface_Render_DockTab::renderVerticesChanged(bool b) ...@@ -161,8 +161,8 @@ void Surface_Render_DockTab::renderVerticesChanged(bool b)
{ {
m_plugin->h_viewParameterSet[view][map].renderVertices = b; m_plugin->h_viewParameterSet[view][map].renderVertices = b;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeRenderVertices", "", view->getName(), map->getName(), b);
} }
m_plugin->pythonRecording("changeRenderVertices", "", view->getName(), map->getName(), b);
} }
} }
...@@ -176,8 +176,8 @@ void Surface_Render_DockTab::verticesScaleFactorChanged(int i) ...@@ -176,8 +176,8 @@ void Surface_Render_DockTab::verticesScaleFactorChanged(int i)
{ {
m_plugin->h_viewParameterSet[view][map].verticesScaleFactor = i / 50.0; m_plugin->h_viewParameterSet[view][map].verticesScaleFactor = i / 50.0;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeVerticesScaleFactor", "", view->getName(), map->getName(), i / 50.0);
} }
m_plugin->pythonRecording("changeVerticesScaleFactor", "", view->getName(), map->getName(), i / 50.0);
} }
} }
...@@ -191,8 +191,8 @@ void Surface_Render_DockTab::renderEdgesChanged(bool b) ...@@ -191,8 +191,8 @@ void Surface_Render_DockTab::renderEdgesChanged(bool b)
{ {
m_plugin->h_viewParameterSet[view][map].renderEdges = b; m_plugin->h_viewParameterSet[view][map].renderEdges = b;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeRenderEdges", "", view->getName(), map->getName(), b);
} }
m_plugin->pythonRecording("changeRenderEdges", "", view->getName(), map->getName(), b);
} }
} }
...@@ -206,8 +206,8 @@ void Surface_Render_DockTab::renderFacesChanged(bool b) ...@@ -206,8 +206,8 @@ void Surface_Render_DockTab::renderFacesChanged(bool b)
{ {
m_plugin->h_viewParameterSet[view][map].renderFaces = b; m_plugin->h_viewParameterSet[view][map].renderFaces = b;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeRenderFaces", "", view->getName(), map->getName(), b);
} }
m_plugin->pythonRecording("changeRenderFaces", "", view->getName(), map->getName(), b);
} }
} }
...@@ -224,8 +224,8 @@ void Surface_Render_DockTab::faceStyleChanged(QAbstractButton* b) ...@@ -224,8 +224,8 @@ void Surface_Render_DockTab::faceStyleChanged(QAbstractButton* b)
else if (radio_phongShading->isChecked()) else if (radio_phongShading->isChecked())
m_plugin->h_viewParameterSet[view][map].faceStyle = MapParameters::PHONG; m_plugin->h_viewParameterSet[view][map].faceStyle = MapParameters::PHONG;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeFacesStyle", "", view->getName(), map->getName(), m_plugin->h_viewParameterSet[view][map].faceStyle);
} }
m_plugin->pythonRecording("changeFacesStyle", "", view->getName(), map->getName(), m_plugin->h_viewParameterSet[view][map].faceStyle);
} }
} }
...@@ -239,6 +239,7 @@ void Surface_Render_DockTab::renderBoundaryChanged(bool b) ...@@ -239,6 +239,7 @@ void Surface_Render_DockTab::renderBoundaryChanged(bool b)
{ {
m_plugin->h_viewParameterSet[view][map].renderBoundary = b; m_plugin->h_viewParameterSet[view][map].renderBoundary = b;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeRenderBoundary", "", view->getName(), map->getName(), b);
} }
} }
} }
......
...@@ -194,8 +194,8 @@ void Surface_RenderScalar_Plugin::changePositionVBO(const QString& view, const Q ...@@ -194,8 +194,8 @@ void Surface_RenderScalar_Plugin::changePositionVBO(const QString& view, const Q
h_viewParameterSet[v][m].positionVBO = vbuf; h_viewParameterSet[v][m].positionVBO = vbuf;
if(v->isSelectedView()) if(v->isSelectedView())
{ {
if(v->isLinkedToMap(m)) v->updateGL(); if (v->isLinkedToMap(m)) v->updateGL();
if(m->isSelectedMap()) m_dockTab->updateMapParameters(); if (m->isSelectedMap()) m_dockTab->updateMapParameters();
} }
} }
} }
...@@ -209,7 +209,7 @@ void Surface_RenderScalar_Plugin::changeScalarVBO(const QString& view, const QSt ...@@ -209,7 +209,7 @@ void Surface_RenderScalar_Plugin::changeScalarVBO(const QString& view, const QSt
MapParameters& p = h_viewParameterSet[v][m]; MapParameters& p = h_viewParameterSet[v][m];
Utils::VBO* vbuf = m->getVBO(vbo); Utils::VBO* vbuf = m->getVBO(vbo);
p.positionVBO = vbuf; p.scalarVBO = vbuf;
if(vbuf) if(vbuf)
{ {
......
...@@ -37,6 +37,7 @@ void Surface_RenderScalar_DockTab::positionVBOChanged(int index) ...@@ -37,6 +37,7 @@ void Surface_RenderScalar_DockTab::positionVBOChanged(int index)
{ {
m_plugin->h_viewParameterSet[view][map].positionVBO = map->getVBO(combo_positionVBO->currentText()); m_plugin->h_viewParameterSet[view][map].positionVBO = map->getVBO(combo_positionVBO->currentText());
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changePositionVBO", "", view->getName(), map->getName(), combo_positionVBO->currentText());
} }
} }
} }
...@@ -59,6 +60,7 @@ void Surface_RenderScalar_DockTab::selectedScalarVBOChanged() ...@@ -59,6 +60,7 @@ void Surface_RenderScalar_DockTab::selectedScalarVBOChanged()
if(vbo) if(vbo)
{ {
m_plugin->pythonRecording("changeScalarVBO", "", view->getName(), map->getName(), selectedItems[0]->text());
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(map); MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(map);
const VertexAttribute<PFP2::REAL, PFP2::MAP>& attr = mh->getAttribute<PFP2::REAL, VERTEX>(QString::fromStdString(vbo->name())); const VertexAttribute<PFP2::REAL, PFP2::MAP>& attr = mh->getAttribute<PFP2::REAL, VERTEX>(QString::fromStdString(vbo->name()));
p.scalarMin = std::numeric_limits<float>::max(); p.scalarMin = std::numeric_limits<float>::max();
...@@ -87,6 +89,7 @@ void Surface_RenderScalar_DockTab::colorMapChanged(int index) ...@@ -87,6 +89,7 @@ void Surface_RenderScalar_DockTab::colorMapChanged(int index)
{ {
m_plugin->h_viewParameterSet[view][map].colorMap = index; m_plugin->h_viewParameterSet[view][map].colorMap = index;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeColorMap", "", view->getName(), map->getName(), index);
} }
} }
} }
...@@ -101,6 +104,7 @@ void Surface_RenderScalar_DockTab::expansionChanged(int i) ...@@ -101,6 +104,7 @@ void Surface_RenderScalar_DockTab::expansionChanged(int i)
{ {
m_plugin->h_viewParameterSet[view][map].expansion = i; m_plugin->h_viewParameterSet[view][map].expansion = i;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeExpansion", "", view->getName(), map->getName(), i);
} }
} }
} }
...@@ -166,15 +170,15 @@ void Surface_RenderScalar_DockTab::updateMapParameters() ...@@ -166,15 +170,15 @@ void Surface_RenderScalar_DockTab::updateMapParameters()
if(dataSize == 3) if(dataSize == 3)
{ {
combo_positionVBO->addItem(QString::fromStdString(vbo->name())); combo_positionVBO->addItem(QString::fromStdString(vbo->name()));
if(vbo == p.positionVBO) if (vbo == p.positionVBO)
combo_positionVBO->setCurrentIndex(i); combo_positionVBO->setCurrentIndex(i);
++i; ++i;
} }
else if(dataSize == 1) else if(dataSize == 1)
{ {
list_scalarVBO->addItem(QString::fromStdString(vbo->name())); list_scalarVBO->addItem(QString::fromStdString(vbo->name()));
if(vbo == p.scalarVBO) if (vbo == p.scalarVBO)
list_scalarVBO->item(j)->setSelected(true); list_scalarVBO->item(j)->setSelected(true);
++j; ++j;
} }
} }
......
...@@ -95,16 +95,16 @@ private slots: ...@@ -95,16 +95,16 @@ private slots:
public slots: public slots:
// slots for Python calls // slots for Python calls
// void changeDrawDarts(const QString& view, const QString& map, bool b); void changeDrawDarts(const QString& view, const QString& map, bool b);
// void changeDartsColor(const QString& view, const QString& map, QColor c); void changeDrawPhi1(const QString& view, const QString& map, bool b);
// void changeDrawPhi1(const QString& view, const QString& map, bool b); void changeDrawPhi2(const QString& view, const QString& map, bool b);
// void changePhi1Color(const QString& view, const QString& map, QColor c); void changeDartsColor(const QString& view, const QString& map, const QString& color);
// void changeDrawPhi2(const QString& view, const QString& map, bool b); void changePhi1Color(const QString& view, const QString& map, const QString& color);
// void changePhi2Color(const QString& view, const QString& map, QColor c); void changePhi2Color(const QString& view, const QString& map, const QString& color);
// void changePositionAttribute(const QString& map, const QString& attrName); void changePositionAttribute(const QString& map, const QString& attrName);
// void changeEdgesScaleFactor(const QString& map, int i); void changeEdgesScaleFactor(const QString& map, float s);
// void changeFacesScaleFactor(const QString& map, int i); void changeFacesScaleFactor(const QString& map, float s);
//signals: //signals:
// void dartSelected(Dart d); // void dartSelected(Dart d);
......
...@@ -121,22 +121,153 @@ void Surface_RenderTopo_Plugin::attributeAdded(unsigned int orbit, const QString ...@@ -121,22 +121,153 @@ void Surface_RenderTopo_Plugin::attributeAdded(unsigned int orbit, const QString
//void Surface_RenderTopo_Plugin::changePositionAttribute(View* view, MapHandlerGen* map, VertexAttribute<PFP2::VEC3, PFP2::MAP> attribute, bool fromUI) void Surface_RenderTopo_Plugin::changePositionAttribute(const QString& map, const QString& attrName)
//{ {
//// map->updateTopoRender MapHandlerGen* m = m_schnapps->getMap(map);
if (m)
{
MapParam& p = h_parameterSet[m];
p.posAttName = attrName;
p.needUpdate = true;
if (m == m_schnapps->getSelectedMap())
{
int index = m_dockTab->combo_positionAttribute->findText(attrName);
if (index > 0)
m_dockTab->combo_positionAttribute->setCurrentIndex(index);
}
}
}
// ParameterSet* params = h_viewParams[view]; void Surface_RenderTopo_Plugin::changeEdgesScaleFactor(const QString& map, float s)
// PerMapParameterSet* perMap = params->perMap[map->getName()]; {
// perMap->positionAttribute = attribute; MapHandlerGen* m = m_schnapps->getMap(map);
// perMap->updateRender(); if (m)
{
MapParam& p = h_parameterSet[m];
p.edgesScaleFactor = s;
p.needUpdate = true;
if (m == m_schnapps->getSelectedMap())
{
m_dockTab->slider_edgesScaleFactor->setValue(int(100.0f*s));
}
}
}
void Surface_RenderTopo_Plugin::changeFacesScaleFactor(const QString& map, float s)
{
MapHandlerGen* m = m_schnapps->getMap(map);
if (m)
{
MapParam& p = h_parameterSet[m];
p.facesScaleFactor = s;
p.needUpdate = true;
if (m == m_schnapps->getSelectedMap())
{
m_dockTab->slider_facesScaleFactor->setValue(int(100.0f*s));
}
}
}
void Surface_RenderTopo_Plugin::changeDrawDarts(const QString& view, const QString& map, bool b)
{
View* v = m_schnapps->getView(view);
MapHandlerGen* m = m_schnapps->getMap(map);
if (v && m)
{
ViewMapParam& p = h_viewParameterSet[v][m];
p.drawDarts = b;
if (m == m_schnapps->getSelectedMap())
{
m_dockTab->check_drawDarts->setChecked(b);
}
}
}
void Surface_RenderTopo_Plugin::changeDrawPhi1(const QString& view, const QString& map, bool b)
{
View* v = m_schnapps->getView(view);
MapHandlerGen* m = m_schnapps->getMap(map);
if (v && m)
{
ViewMapParam& p = h_viewParameterSet[v][m];
p.drawPhi1 = b;
if (m == m_schnapps->getSelectedMap())
{
m_dockTab->check_drawPhi1->setChecked(b);
}
}
}
void Surface_RenderTopo_Plugin::changeDrawPhi2(const QString& view, const QString& map, bool b)
{
View* v = m_schnapps->getView(view);
MapHandlerGen* m = m_schnapps->getMap(map);
if (v && m)
{
ViewMapParam& p = h_viewParameterSet[v][m];
p.drawPhi2 = b;
if (m == m_schnapps->getSelectedMap())
{
m_dockTab->check_drawPhi2->setChecked(b);
}
}
}
void Surface_RenderTopo_Plugin::changeDartsColor(const QString& view, const QString& map, const QString& color)
{
View* v = m_schnapps->getView(view);
MapHandlerGen* m = m_schnapps->getMap(map);
if (v && m)
{
ViewMapParam& p = h_viewParameterSet[v][m];
p.dartsColor = QColor(color);
if (m == m_schnapps->getSelectedMap())
{
int index = m_dockTab->combo_dartsColor->findText(color);
if (index > 0)
m_dockTab->combo_dartsColor->setCurrentIndex(index);
}
}
}
void Surface_RenderTopo_Plugin::changePhi1Color(const QString& view, const QString& map, const QString& color)
{
View* v = m_schnapps->getView(view);
MapHandlerGen* m = m_schnapps->getMap(map);
if (v && m)
{
ViewMapParam& p = h_viewParameterSet[v][m];
p.phi1Color = QColor(color);
if (m == m_schnapps->getSelectedMap())
{
int index = m_dockTab->combo_phi1Color->findText(color);
if (index > 0)
m_dockTab->combo_phi1Color->setCurrentIndex(index);
}
}
}
void Surface_RenderTopo_Plugin::changePhi2Color(const QString& view, const QString& map, const QString& color)
{
View* v = m_schnapps->getView(view);
MapHandlerGen* m = m_schnapps->getMap(map);
if (v && m)
{
ViewMapParam& p = h_viewParameterSet[v][m];
p.phi2Color = QColor(color);
if (m == m_schnapps->getSelectedMap())
{
int index = m_dockTab->combo_phi2Color->findText(color);
if (index > 0)
m_dockTab->combo_phi2Color->setCurrentIndex(index);
}
}
}
// if(view->isCurrentView())
// {
// if(!fromUI)
// m_dockTab->refreshUI(params);
// view->updateGL();
// }
//}
//void Surface_RenderTopo_Plugin::changeDrawDarts(View* view, MapHandlerGen* map, bool b, bool fromUI) //void Surface_RenderTopo_Plugin::changeDrawDarts(View* view, MapHandlerGen* map, bool b, bool fromUI)
//{ //{
...@@ -219,35 +350,6 @@ void Surface_RenderTopo_Plugin::attributeAdded(unsigned int orbit, const QString ...@@ -219,35 +350,6 @@ void Surface_RenderTopo_Plugin::attributeAdded(unsigned int orbit, const QString
// } // }
//} //}
//void Surface_RenderTopo_Plugin::changeEdgesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI)
//{
// ParameterSet* params = h_viewParams[view];
// PerMapParameterSet* perMap = params->perMap[map->getName()];
// perMap->edgesScaleFactor = i / 100.0;
// perMap->updateRender();
// if(view->isCurrentView())
// {
// if(!fromUI)
// m_dockTab->refreshUI(params);
// view->updateGL();
// }
//}
//void Surface_RenderTopo_Plugin::changeFacesScaleFactor(View* view, MapHandlerGen* map, int i, bool fromUI)
//{
// ParameterSet* params = h_viewParams[view];
// PerMapParameterSet* perMap = params->perMap[map->getName()];
// perMap->facesScaleFactor = i / 100.0;
// perMap->updateRender();
// if(view->isCurrentView())
// {
// if(!fromUI)
// m_dockTab->refreshUI(params);
// view->updateGL();
// }
//}
#if CGOGN_QT_DESIRED_VERSION == 5 #if CGOGN_QT_DESIRED_VERSION == 5
......
...@@ -40,17 +40,11 @@ void Surface_RenderTopo_DockTab::positionAttributeChanged(int index) ...@@ -40,17 +40,11 @@ void Surface_RenderTopo_DockTab::positionAttributeChanged(int index)
MapHandlerGen* map = m_schnapps->getSelectedMap(); MapHandlerGen* map = m_schnapps->getSelectedMap();
if(view && map) if(view && map)
{ {
// if(index == 0)
// ;
// else
// m_plugin->h_viewParameterSet[view][map].positionAttribute = map->getAttribute<PFP2::VEC3, VERTEX>(combo_positionAttribute->currentText());
// QString pos = this->combo_positionAttribute->currentText();
QString& pos = m_plugin->h_parameterSet[map].posAttName; QString& pos = m_plugin->h_parameterSet[map].posAttName;
pos = this->combo_positionAttribute->currentText(); pos = this->combo_positionAttribute->currentText();
map->updateTopoRender(pos); map->updateTopoRender(pos);
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changePositionAttribute", "", map->getName(), pos);
} }
} }
} }
...@@ -65,6 +59,7 @@ void Surface_RenderTopo_DockTab::drawDartsChanged(bool b) ...@@ -65,6 +59,7 @@ void Surface_RenderTopo_DockTab::drawDartsChanged(bool b)
{ {
m_plugin->h_viewParameterSet[view][map].drawDarts = b; m_plugin->h_viewParameterSet[view][map].drawDarts = b;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeDrawDarts", "", view->getName(), map->getName(), b);
} }
} }
} }
...@@ -79,6 +74,7 @@ void Surface_RenderTopo_DockTab::dartsColorChanged(int i) ...@@ -79,6 +74,7 @@ void Surface_RenderTopo_DockTab::dartsColorChanged(int i)
{ {
m_plugin->h_viewParameterSet[view][map].dartsColor = combo_dartsColor->color(); m_plugin->h_viewParameterSet[view][map].dartsColor = combo_dartsColor->color();
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeDartsColor", "", view->getName(), map->getName(), combo_dartsColor->currentText());
} }
} }
} }
...@@ -93,6 +89,7 @@ void Surface_RenderTopo_DockTab::drawPhi1Changed(bool b) ...@@ -93,6 +89,7 @@ void Surface_RenderTopo_DockTab::drawPhi1Changed(bool b)
{ {
m_plugin->h_viewParameterSet[view][map].drawPhi1 = b; m_plugin->h_viewParameterSet[view][map].drawPhi1 = b;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeDrawPhi1", "", view->getName(), map->getName(), b);
} }
} }
} }
...@@ -107,6 +104,7 @@ void Surface_RenderTopo_DockTab::phi1ColorChanged(int i) ...@@ -107,6 +104,7 @@ void Surface_RenderTopo_DockTab::phi1ColorChanged(int i)
{ {
m_plugin->h_viewParameterSet[view][map].phi1Color = combo_phi1Color->color(); m_plugin->h_viewParameterSet[view][map].phi1Color = combo_phi1Color->color();
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changePhi1Color", "", view->getName(), map->getName(), combo_phi1Color->currentText());
} }
} }
} }
...@@ -121,6 +119,7 @@ void Surface_RenderTopo_DockTab::drawPhi2Changed(bool b) ...@@ -121,6 +119,7 @@ void Surface_RenderTopo_DockTab::drawPhi2Changed(bool b)
{ {
m_plugin->h_viewParameterSet[view][map].drawPhi2 = b; m_plugin->h_viewParameterSet[view][map].drawPhi2 = b;
view->updateGL(); view->updateGL();
m_plugin->pythonRecording("changeDrawPhi2", "", view->getName(), map->getName(), b);
} }
} }
} }
...@@ -135,6 +134,7 @@ void Surface_RenderTopo_DockTab::phi2ColorChanged(int i) ...@@ -135,6 +134,7 @@ void Surface_RenderTopo_DockTab::phi2ColorChanged(int i)
{ {
m_plugin->h_viewParameterSet[view][map].phi2Color = combo_phi2Color->color(); m_plugin->h_viewParameterSet[view