coding style

felipesanches-svg
Marius Kintel 2012-07-07 16:30:04 -04:00
parent 0d619e5ac1
commit deaeafea8d
1 changed files with 6 additions and 5 deletions

View File

@ -77,11 +77,12 @@ AbstractNode *LinearExtrudeModule::evaluate(const Context *ctx, const ModuleInst
// if height not given, and first argument is a number, // if height not given, and first argument is a number,
// then assume it should be the height. // then assume it should be the height.
if ( c.lookup_variable("height").type == Value::UNDEFINED ) if (c.lookup_variable("height").type == Value::UNDEFINED &&
if ( inst->argnames.size()>0 ) inst->argnames.size() > 0 &&
if ( inst->argnames[0] == "" ) inst->argnames[0] == "" &&
if ( inst->argvalues[0].type == Value::NUMBER ) inst->argvalues[0].type == Value::NUMBER) {
height = Value(inst->argvalues[0]); height = Value(inst->argvalues[0]);
}
node->layername = layer.text; node->layername = layer.text;
node->height = height.num; node->height = height.num;