diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-12-15 04:15:57 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-12-15 04:15:57 (GMT) |
commit | 60a4561da5b0592f20910e8a9ea4fcdbb1b1a2f7 (patch) | |
tree | 5cbfa7ded50ba911516aa876dc128ec5967b0555 /src/primitives.cc | |
parent | f12237a9c4b39349da673456e7e309562ed0f75a (diff) |
fix bug in polyhedron() primitive keyword 'faces' vs 'triangles'
Diffstat (limited to 'src/primitives.cc')
-rw-r--r-- | src/primitives.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/primitives.cc b/src/primitives.cc index 0d557a2..a76637d 100644 --- a/src/primitives.cc +++ b/src/primitives.cc @@ -235,8 +235,11 @@ AbstractNode *PrimitiveModule::instantiate(const Context *ctx, const ModuleInsta if (type == POLYHEDRON) { node->points = c.lookup_variable("points"); - node->faces = c.lookup_variable("triangles"); node->faces = c.lookup_variable("faces"); + if (node->faces.type() == Value::UNDEFINED) { + // backwards compatable + node->faces = c.lookup_variable("triangles"); + } } if (type == SQUARE) { |