App: extend Expression syntax
* Support sub-object reference syntax using the following syntax,
Part.<<Box.>>.Placement
or, with sub-object label referencing
Part.<<$Cube.>>.Placement
* Extend indexing support, including range based indexing, e.g.
A1[B2+1][C3][D4:-1]
* Add new constants, None, True, true, False, false.
This commit is contained in:
@@ -692,7 +692,11 @@ void Sheet::updateProperty(CellAddress key)
|
||||
auto number = freecad_dynamic_cast<NumberExpression>(output.get());
|
||||
if(number) {
|
||||
long l;
|
||||
if (!number->getUnit().isEmpty())
|
||||
auto constant = freecad_dynamic_cast<ConstantExpression>(output.get());
|
||||
if(constant && !constant->isNumber()) {
|
||||
Base::PyGILStateLocker lock;
|
||||
setObjectProperty(key, constant->getPyValue());
|
||||
} else if (!number->getUnit().isEmpty())
|
||||
setQuantityProperty(key, number->getValue(), number->getUnit());
|
||||
else if(number->isInteger(&l))
|
||||
setIntegerProperty(key,l);
|
||||
|
||||
Reference in New Issue
Block a user