Material: Continued Material enahncements
Continues the work of the material subsystem improvements. Several important items are included in this merge. In terms of new capabilities, this merge adds List and MultiLineString as valid property types, complete with editing dialogs. This will help with backwards compatibility for external workbenches, such as Render. Stability has been a big focus. New unit tests help to verify features work as expected. Bugs have been fixed and crashes avoided. Material cards have had a renaming to their tree structure. For example, 'StandardMeterials' is redundant, so this was renamed to 'Standard'. The cards themselves are more compliant fully passing the yamllint tests. More soon.
This commit is contained in:
committed by
Chris Hennes
parent
c81bd982b5
commit
332bf7ed08
@@ -360,22 +360,22 @@ static PyObject* _pyObjectFromVariant(const QVariant& value)
|
||||
if (value.userType() == qMetaTypeId<Base::Quantity>()) {
|
||||
return new Base::QuantityPy(new Base::Quantity(value.value<Base::Quantity>()));
|
||||
}
|
||||
else if (value.userType() == QMetaType::Double) {
|
||||
if (value.userType() == QMetaType::Double) {
|
||||
return PyFloat_FromDouble(value.toDouble());
|
||||
}
|
||||
else if (value.userType() == QMetaType::Float) {
|
||||
if (value.userType() == QMetaType::Float) {
|
||||
return PyFloat_FromDouble(value.toFloat());
|
||||
}
|
||||
else if (value.userType() == QMetaType::Int) {
|
||||
if (value.userType() == QMetaType::Int) {
|
||||
return PyLong_FromLong(value.toInt());
|
||||
}
|
||||
else if (value.userType() == QMetaType::Long) {
|
||||
if (value.userType() == QMetaType::Long) {
|
||||
return PyLong_FromLong(value.toInt());
|
||||
}
|
||||
else if (value.userType() == QMetaType::Bool) {
|
||||
if (value.userType() == QMetaType::Bool) {
|
||||
return Py::new_reference_to(Py::Boolean(value.toBool()));
|
||||
}
|
||||
else if (value.userType() == QMetaType::QString) {
|
||||
if (value.userType() == QMetaType::QString) {
|
||||
return PyUnicode_FromString(value.toString().toStdString().c_str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user