@@ -222,7 +222,7 @@ PyObject* MaterialPy::hasPhysicalModel(PyObject* args)
222
222
}
223
223
224
224
bool hasProperty = getMaterialPtr ()->hasPhysicalModel (QString::fromStdString (uuid));
225
- return hasProperty ? Py_True : Py_False ;
225
+ return PyBool_FromLong ( hasProperty ? 1 : 0 ) ;
226
226
}
227
227
228
228
PyObject* MaterialPy::hasAppearanceModel (PyObject* args)
@@ -233,7 +233,7 @@ PyObject* MaterialPy::hasAppearanceModel(PyObject* args)
233
233
}
234
234
235
235
bool hasProperty = getMaterialPtr ()->hasAppearanceModel (QString::fromStdString (uuid));
236
- return hasProperty ? Py_True : Py_False ;
236
+ return PyBool_FromLong ( hasProperty ? 1 : 0 ) ;
237
237
}
238
238
239
239
PyObject* MaterialPy::isPhysicalModelComplete (PyObject* args)
@@ -244,7 +244,7 @@ PyObject* MaterialPy::isPhysicalModelComplete(PyObject* args)
244
244
}
245
245
246
246
bool isComplete = getMaterialPtr ()->isPhysicalModelComplete (QString::fromStdString (name));
247
- return isComplete ? Py_True : Py_False ;
247
+ return PyBool_FromLong ( isComplete ? 1 : 0 ) ;
248
248
}
249
249
250
250
PyObject* MaterialPy::isAppearanceModelComplete (PyObject* args)
@@ -255,7 +255,7 @@ PyObject* MaterialPy::isAppearanceModelComplete(PyObject* args)
255
255
}
256
256
257
257
bool isComplete = getMaterialPtr ()->isAppearanceModelComplete (QString::fromStdString (name));
258
- return isComplete ? Py_True : Py_False ;
258
+ return PyBool_FromLong ( isComplete ? 1 : 0 ) ;
259
259
}
260
260
261
261
PyObject* MaterialPy::hasPhysicalProperty (PyObject* args)
@@ -266,7 +266,7 @@ PyObject* MaterialPy::hasPhysicalProperty(PyObject* args)
266
266
}
267
267
268
268
bool hasProperty = getMaterialPtr ()->hasPhysicalProperty (QString::fromStdString (name));
269
- return hasProperty ? Py_True : Py_False ;
269
+ return PyBool_FromLong ( hasProperty ? 1 : 0 ) ;
270
270
}
271
271
272
272
PyObject* MaterialPy::hasAppearanceProperty (PyObject* args)
@@ -277,7 +277,7 @@ PyObject* MaterialPy::hasAppearanceProperty(PyObject* args)
277
277
}
278
278
279
279
bool hasProperty = getMaterialPtr ()->hasAppearanceProperty (QString::fromStdString (name));
280
- return hasProperty ? Py_True : Py_False ;
280
+ return PyBool_FromLong ( hasProperty ? 1 : 0 ) ;
281
281
}
282
282
283
283
Py::Dict MaterialPy::getProperties () const
0 commit comments