diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-06 22:11:00 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-06 22:11:00 (GMT) |
commit | 29adaed02441832ce54d0f232f5ecb43eb28355d (patch) | |
tree | efc2c6e7d174c856e3fab68336af61cb7a096a70 /src/context.cc | |
parent | ac01975b02055c6e66bb8c9d97f0d9bc876913b5 (diff) |
Deprecated dxf_linear_extrude(), dxf_rotate_extrude() and the file parameters to linear_extrude() and rotate_extrude()
Diffstat (limited to 'src/context.cc')
-rw-r--r-- | src/context.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/context.cc b/src/context.cc index 9722428..0100234 100644 --- a/src/context.cc +++ b/src/context.cc @@ -28,6 +28,7 @@ #include "expression.h" #include "function.h" #include "module.h" +#include "builtin.h" #include "printutils.h" #include <QFileInfo> #include <QDir> @@ -147,8 +148,16 @@ Value Context::evaluate_function(const std::string &name, AbstractNode *Context::evaluate_module(const ModuleInstantiation &inst) const { - if (this->modules_p && this->modules_p->find(inst.modname) != this->modules_p->end()) - return this->modules_p->find(inst.modname)->second->evaluate(this, &inst); + if (this->modules_p && this->modules_p->find(inst.modname) != this->modules_p->end()) { + AbstractModule *m = this->modules_p->find(inst.modname)->second; + if (m == builtin_modules["dxf_linear_extrude"]) { + PRINTF("DEPRECATED: The dxf_linear_extrude() module will be removed in future releases. Use a linear_extrude() instead."); + } + if (m == builtin_modules["dxf_rotate_extrude"]) { + PRINTF("DEPRECATED: The dxf_rotate_extrude() module will be removed in future releases. Use a rotate_extrude() instead."); + } + return m->evaluate(this, &inst); + } if (this->usedlibs_p) { BOOST_FOREACH(const ModuleContainer::value_type &m, *this->usedlibs_p) { if (m.second->modules.find(inst.modname) != m.second->modules.end()) { |