App: use Python number protocol in Expression

This adds support to do mul/div with matrix and vector, as well as
Python formated string with operator %.
This commit is contained in:
Zheng, Lei
2019-08-25 16:16:32 +08:00
committed by wmayer
parent 1efadc928e
commit 8cbdc3ad5d
9 changed files with 641 additions and 504 deletions

View File

@@ -705,7 +705,7 @@ void Sheet::updateProperty(CellAddress key)
Base::PyGILStateLocker lock;
auto py_expr = freecad_dynamic_cast<PyObjectExpression>(output.get());
if(py_expr)
setObjectProperty(key, py_expr->getPyObject());
setObjectProperty(key, py_expr->getPyValue());
else
setObjectProperty(key, Py::Object());
}