Commit d75c2a27 authored by Hossain Mahmud's avatar Hossain Mahmud
Browse files

all properties of volExp except TransferFunc and xyzProps::abc

parent bb7ea319
...@@ -332,12 +332,14 @@ namespace campvis { ...@@ -332,12 +332,14 @@ namespace campvis {
PropertyCollectionLua *_pcLua = new PropertyCollectionLua(); PropertyCollectionLua *_pcLua = new PropertyCollectionLua();
std::string pipeScript = "pipeline = pipelines[\"" + _selectedPipeline->getName()+"\"]\n\n"; std::string pipeScript = "pipeline = pipelines[\"" + _selectedPipeline->getName()+"\"]\n\n";
for (int i = 0; i < _selectedPipeline->getProcessors().size(); i++) { for (int i = 1; i < _selectedPipeline->getProcessors().size(); i++) {
pipeScript += "proc = pipeline:getProcessor(" + StringUtils::toString(i) + ")\n"; pipeScript += "proc = pipeline:getProcessor(" + StringUtils::toString(i) + ")\n";
AbstractProcessor *proc = _selectedPipeline->getProcessor(i); AbstractProcessor *proc = _selectedPipeline->getProcessor(i);
_pcLua->updatePropCollection(proc, &_selectedPipeline->getDataContainer()); _pcLua->updatePropCollection(proc, &_selectedPipeline->getDataContainer());
pipeScript += _pcLua->getLuaScript(""); std::string res = _pcLua->getLuaScript("");
pipeScript += res;
std::cout << "\n\n" + pipeScript + "\n\n";
} }
if (pipeScript != "pipeline = pipelines[\"" + _selectedPipeline->getName()+"\"]\n\n") { if (pipeScript != "pipeline = pipelines[\"" + _selectedPipeline->getName()+"\"]\n\n") {
std::ofstream file; std::ofstream file;
......
...@@ -37,7 +37,7 @@ namespace campvis { ...@@ -37,7 +37,7 @@ namespace campvis {
std::string BoolPropertyLua::getLuaScript(std::string prefix) { std::string BoolPropertyLua::getLuaScript(std::string prefix) {
std::string ret = ""; std::string ret = "";
ret += "getNestedProperty(\"" + prefix +_property->getName() + "\"):setValue(" ret += "getNestedProperty(\"" + prefix +_property->getName() + "\"):setValue("
+ StringUtils::toString( static_cast<BoolProperty*>(_property)->getValue() ) + ")"; + (static_cast<BoolProperty*>(_property)->getValue() == 1? "true" : "false") + ")";
return ret; return ret;
} }
} }
\ No newline at end of file
...@@ -59,6 +59,7 @@ namespace campvis { ...@@ -59,6 +59,7 @@ namespace campvis {
// create widgets for the new PropertyCollection // create widgets for the new PropertyCollection
if (propertyCollection != 0) { if (propertyCollection != 0) {
_luaMap.clear();
for (std::vector<AbstractProperty*>::const_iterator it = propertyCollection->getProperties().begin(); it != propertyCollection->getProperties().end(); ++it) { for (std::vector<AbstractProperty*>::const_iterator it = propertyCollection->getProperties().begin(); it != propertyCollection->getProperties().end(); ++it) {
addProperty(*it); addProperty(*it);
} }
......
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