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

python recording

parent db28963b
......@@ -40,6 +40,7 @@ void Surface_Deformation_DockTab::positionAttributeChanged(int index)
{
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(map);
m_plugin->h_parameterSet[map].positionAttribute = mh->getAttribute<PFP2::VEC3, VERTEX>(combo_positionAttribute->currentText());
m_plugin->pythonRecording("changePositionVBO", "", map->getName(), combo_positionAttribute->currentText());
}
}
}
......@@ -54,6 +55,8 @@ void Surface_Deformation_DockTab::handleSelectorChanged(int index)
{
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(map);
m_plugin->h_parameterSet[map].handleSelector = mh->getCellSelector<VERTEX>(combo_handleSelector->currentText());
m_plugin->pythonRecording("changeHandleSelector", "", map->getName(), combo_handleSelector->currentText());
}
}
}
......@@ -67,6 +70,7 @@ void Surface_Deformation_DockTab::freeSelectorChanged(int index)
{
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(map);
m_plugin->h_parameterSet[map].freeSelector = mh->getCellSelector<VERTEX>(combo_freeSelector->currentText());
m_plugin->pythonRecording("changeFreeSelector", "", map->getName(), combo_freeSelector->currentText());
}
}
}
......
......@@ -267,6 +267,9 @@ MapHandlerGen* Surface_Radiance_Plugin::importFromFile(const QString& fileName)
mapParams.radiancePerVertexShader = new Utils::ShaderRadiancePerVertex(Utils::SphericalHarmonics<PFP2::REAL, PFP2::VEC3>::get_resolution());
registerShader(mapParams.radiancePerVertexShader);
}
this->pythonRecording("importFile", mhg->getName(), fi.baseName());
return mhg;
}
else
......@@ -564,6 +567,8 @@ void Surface_Radiance_Plugin::exportPLY(
}
out.close() ;
this->pythonRecording("exportPLY", "", mapName, positionAttributeName, normalAttributeName, filename);
}
......
......@@ -37,6 +37,7 @@ void Surface_Radiance_DockTab::positionVBOChanged(int index)
m_plugin->h_mapParameterSet[map].positionVBO = map->getVBO(combo_positionVBO->currentText());
foreach (View* v, map->getLinkedViews())
v->updateGL();
m_plugin->pythonRecording("changePositionVBO", "", map->getName(), combo_positionVBO->currentText());
}
}
}
......@@ -51,6 +52,7 @@ void Surface_Radiance_DockTab::normalVBOChanged(int index)
m_plugin->h_mapParameterSet[map].normalVBO = map->getVBO(combo_normalVBO->currentText());
foreach (View* v, map->getLinkedViews())
v->updateGL();
m_plugin->pythonRecording("changeNormalVBO", "", map->getName(), combo_normalVBO->currentText());
}
}
}
......@@ -78,6 +80,13 @@ void Surface_Radiance_DockTab::decimateClicked()
slider_decimationGoal->value() / 100.0f,
checkbox_halfCollapse->checkState() == Qt::Checked
);
m_plugin->pythonRecording("decimate", "",
m_schnapps->getSelectedMap()->getName(),
combo_positionVBO->currentText(),
combo_normalVBO->currentText(),
slider_decimationGoal->value() / 100.0f,
checkbox_halfCollapse->checkState() == Qt::Checked);
}
......
......@@ -440,10 +440,6 @@ void SCHNApps::disablePlugin(const QString& pluginName)
{
if (m_plugins.contains(pluginName))
{
// RECORDING
if (m_pyRecording)
*m_pyRecording << "schnapps.disablePlugin(\"" << pluginName << "\");" << endl;
Plugin* plugin = m_plugins[pluginName];
// remove plugin dock tabs
......@@ -473,6 +469,12 @@ void SCHNApps::disablePlugin(const QString& pluginName)
emit(pluginDisabled(plugin));
delete plugin;
// RECORDING
if (m_pyRecording)
*m_pyRecording << "schnapps.disablePlugin(\"" << pluginName << "\");" << endl;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment