diff options
author | Marius Kintel <marius@kintel.net> | 2012-07-11 01:42:59 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-07-11 01:42:59 (GMT) |
commit | 5e47342406583c694207637f2e2b5dfb52f6e807 (patch) | |
tree | ff434802fc2568f9ed01b73e3b3d4c3356775949 /src | |
parent | 694382bba9d1645547afc3ece9920e48f8767295 (diff) | |
parent | deaeafea8d950814081bdf77097ac3170ce4660a (diff) |
Merge branch 'master' into value
Conflicts:
src/linearextrude.cc
Diffstat (limited to 'src')
-rw-r--r-- | src/linearextrude.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/linearextrude.cc b/src/linearextrude.cc index b193181..7a006f7 100644 --- a/src/linearextrude.cc +++ b/src/linearextrude.cc @@ -75,6 +75,15 @@ AbstractNode *LinearExtrudeModule::evaluate(const Context *ctx, const ModuleInst node->filename = c.getAbsolutePath(file.toString()); } + // if height not given, and first argument is a number, + // then assume it should be the height. + if (c.lookup_variable("height").type == Value::UNDEFINED && + inst->argnames.size() > 0 && + inst->argnames[0] == "" && + inst->argvalues[0].type == Value::NUMBER) { + height = Value(inst->argvalues[0]); + } + node->layername = layer.isUndefined() ? "" : layer.toString(); node->height = height.toDouble(); node->convexity = (int)convexity.toDouble(); |