Material: Expanded Python API (#13829)

Expands the Python API to allow for material creation. With test cases.
This commit is contained in:
David Carter
2024-05-06 16:34:51 +00:00
committed by GitHub
parent b12b95b908
commit 3de35c9818
8 changed files with 358 additions and 46 deletions

View File

@@ -50,6 +50,10 @@ bool LibraryBase::operator==(const LibraryBase& library) const
QString LibraryBase::getLocalPath(const QString& path) const
{
QString filePath = getDirectoryPath();
if (!(filePath.endsWith(QLatin1String("/")) || filePath.endsWith(QLatin1String("\\")))) {
filePath += QLatin1String("/");
}
QString cleanPath = QDir::cleanPath(path);
QString prefix = QString::fromStdString("/") + getName();
if (cleanPath.startsWith(prefix)) {