Console: rename PascalCase named methods to camelCase

This commit is contained in:
bofdahof
2025-03-30 00:50:27 +10:00
committed by Kacper Donat
parent 1dbc0638c3
commit ba2c2ca5ad
497 changed files with 2423 additions and 2425 deletions

View File

@@ -85,7 +85,7 @@ PyMOD_INIT_FUNC(Materials)
#endif
PyObject* module = Materials::initModule();
Base::Console().Log("Loading Material module... done\n");
Base::Console().log("Loading Material module... done\n");
Base::Interpreter().addType(&Materials::Array2DPy::Type, module, "Array2D");
Base::Interpreter().addType(&Materials::Array3DPy::Type, module, "Array3D");

View File

@@ -68,8 +68,8 @@ void Library::validate(const Library& remote) const
throw InvalidLibrary("Library names don't match");
}
if (getIconPath() != remote.getIconPath()) {
Base::Console().Log("Icon path 1 '%s'\n", getIconPath().toStdString().c_str());
Base::Console().Log("Icon path 2 '%s'\n", remote.getIconPath().toStdString().c_str());
Base::Console().log("Icon path 1 '%s'\n", getIconPath().toStdString().c_str());
Base::Console().log("Icon path 2 '%s'\n", remote.getIconPath().toStdString().c_str());
throw InvalidLibrary("Library icon paths don't match");
}

View File

@@ -1041,7 +1041,7 @@ MaterialConfigLoader::getMaterialFromPath(const std::shared_ptr<MaterialLibraryL
QMap<QString, QString> fcmat;
if (!readFile(path, fcmat)) {
Base::Console().Log("Error reading '%s'\n", path.toStdString().c_str());
Base::Console().log("Error reading '%s'\n", path.toStdString().c_str());
throw MaterialReadError();
}

View File

@@ -167,7 +167,7 @@ void MaterialLibraryLocal::createFolder(const QString& path)
QDir fileDir(filePath);
if (!fileDir.exists()) {
if (!fileDir.mkpath(filePath)) {
Base::Console().Error("Unable to create directory path '%s'\n",
Base::Console().error("Unable to create directory path '%s'\n",
filePath.toStdString().c_str());
}
}
@@ -181,7 +181,7 @@ void MaterialLibraryLocal::renameFolder(const QString& oldPath, const QString& n
QDir fileDir(filePath);
if (fileDir.exists()) {
if (!fileDir.rename(filePath, newFilePath)) {
Base::Console().Error("Unable to rename directory path '%s'\n",
Base::Console().error("Unable to rename directory path '%s'\n",
filePath.toStdString().c_str());
}
}
@@ -257,7 +257,7 @@ void MaterialLibraryLocal::deleteFile(MaterialManager& manager, const QString& p
manager.remove(material->getUUID());
}
catch (const MaterialNotFound&) {
Base::Console().Log("Unable to remove file from materials list\n");
Base::Console().log("Unable to remove file from materials list\n");
}
_materialPathMap->erase(rPath);
}
@@ -300,14 +300,14 @@ MaterialLibraryLocal::saveMaterial(const std::shared_ptr<Material>& material,
QDir fileDir(info.path());
if (!fileDir.exists()) {
if (!fileDir.mkpath(info.path())) {
Base::Console().Error("Unable to create directory path '%s'\n",
Base::Console().error("Unable to create directory path '%s'\n",
info.path().toStdString().c_str());
}
}
if (info.exists()) {
if (!overwrite) {
Base::Console().Error("File already exists '%s'\n", info.path().toStdString().c_str());
Base::Console().error("File already exists '%s'\n", info.path().toStdString().c_str());
throw MaterialExists();
}
}

View File

@@ -252,7 +252,7 @@ void MaterialYamlEntry::addToTree(
}
catch (const Base::ValueError& e) {
// Units mismatch
Base::Console().Log("Units mismatch in material '%s':'%s' = '%s', "
Base::Console().log("Units mismatch in material '%s':'%s' = '%s', "
"setting to default property units '%s'\n",
name.toStdString().c_str(),
propertyName,
@@ -267,14 +267,14 @@ void MaterialYamlEntry::addToTree(
}
}
catch (const YAML::BadConversion& e) {
Base::Console().Log("Exception %s <%s:%s> - ignored\n",
Base::Console().log("Exception %s <%s:%s> - ignored\n",
e.what(),
name.toStdString().c_str(),
propertyName.c_str());
}
}
else if (propertyName != "UUID") {
Base::Console().Log("\tProperty '%s' is not described by any model. Ignored\n",
Base::Console().log("\tProperty '%s' is not described by any model. Ignored\n",
propertyName.c_str());
}
}
@@ -334,14 +334,14 @@ void MaterialYamlEntry::addToTree(
}
}
catch (const YAML::BadConversion& e) {
Base::Console().Log("Exception %s <%s:%s> - ignored\n",
Base::Console().log("Exception %s <%s:%s> - ignored\n",
e.what(),
name.toStdString().c_str(),
propertyName.c_str());
}
}
else if (propertyName != "UUID") {
Base::Console().Log("\tProperty '%s' is not described by any model. Ignored\n",
Base::Console().log("\tProperty '%s' is not described by any model. Ignored\n",
propertyName.c_str());
}
}
@@ -393,8 +393,8 @@ MaterialLoader::getMaterialFromYAML(const std::shared_ptr<MaterialLibraryLocal>&
yamlroot);
}
catch (YAML::Exception const& e) {
Base::Console().Error("YAML parsing error: '%s'\n", path.toStdString().c_str());
Base::Console().Error("\t'%s'\n", e.what());
Base::Console().error("YAML parsing error: '%s'\n", path.toStdString().c_str());
Base::Console().error("\t'%s'\n", e.what());
showYaml(yamlroot);
}
@@ -427,7 +427,7 @@ MaterialLoader::getMaterialFromPath(const std::shared_ptr<MaterialLibraryLocal>&
Base::FileInfo info(pathName);
Base::ifstream fin(info);
if (!fin) {
Base::Console().Error("YAML file open error: '%s'\n", pathName.c_str());
Base::Console().error("YAML file open error: '%s'\n", pathName.c_str());
return model;
}
@@ -438,8 +438,8 @@ MaterialLoader::getMaterialFromPath(const std::shared_ptr<MaterialLibraryLocal>&
model = getMaterialFromYAML(materialLibrary, yamlroot, path);
}
catch (YAML::Exception const& e) {
Base::Console().Error("YAML parsing error: '%s'\n", pathName.c_str());
Base::Console().Error("\t'%s'\n", e.what());
Base::Console().error("YAML parsing error: '%s'\n", pathName.c_str());
Base::Console().error("\t'%s'\n", e.what());
showYaml(yamlroot);
}
@@ -453,7 +453,7 @@ void MaterialLoader::showYaml(const YAML::Node& yaml)
out << yaml;
std::string logData = out.str();
Base::Console().Log("%s\n", logData.c_str());
Base::Console().log("%s\n", logData.c_str());
}
@@ -473,7 +473,7 @@ void MaterialLoader::dereference(
parent = materialMap->at(parentUUID);
}
catch (std::out_of_range&) {
Base::Console().Log(
Base::Console().log(
"Unable to apply inheritance for material '%s', parent '%s' not found.\n",
material->getName().toStdString().c_str(),
parentUUID.toStdString().c_str());

View File

@@ -103,7 +103,7 @@ void MaterialManager::OnChange(ParameterGrp::SubjectType& rCaller, ParameterGrp:
{
const ParameterGrp& rGrp = static_cast<ParameterGrp&>(rCaller);
if (strcmp(Reason, "UseExternal") == 0) {
Base::Console().Log("Use external changed\n");
Base::Console().log("Use external changed\n");
_useExternal = rGrp.GetBool("UseExternal", false);
// _dbManager->refresh();
}

View File

@@ -559,7 +559,7 @@ MaterialManagerLocal::getConfiguredLibraries()
if (!materialDir.exists()) {
// Try creating the user dir if it doesn't exist
if (!materialDir.mkpath(resourceDir)) {
Base::Console().Log("Unable to create user library '%s'\n",
Base::Console().log("Unable to create user library '%s'\n",
resourceDir.toStdString().c_str());
}
}

View File

@@ -255,8 +255,8 @@ PyObject* MaterialManagerPy::save(PyObject* args, PyObject* kwds)
return nullptr;
}
Base::Console().Log("library name %s\n", libraryName);
Base::Console().Log("path %s\n", path);
Base::Console().log("library name %s\n", libraryName);
Base::Console().log("path %s\n", path);
MaterialPy* material;
if (QLatin1String(obj->ob_type->tp_name) == QLatin1String("Materials.Material")) {

View File

@@ -431,11 +431,11 @@ void Array2D::validateColumn(int column) const
void Array2D::validate(const Array2D& other) const
{
if (rows() != other.rows()) {
Base::Console().Log("Local row count %d, remote %d\n", rows(), other.rows());
Base::Console().log("Local row count %d, remote %d\n", rows(), other.rows());
throw InvalidProperty("Material property value row counts don't match");
}
if (columns() != other.columns()) {
Base::Console().Log("Local column count %d, remote %d\n", columns(), other.columns());
Base::Console().log("Local column count %d, remote %d\n", columns(), other.columns());
throw InvalidProperty("Material property value column counts don't match");
}
try {
@@ -534,11 +534,11 @@ QVariant Array2D::getValue(int row, int column) const
void Array2D::dumpRow(const std::shared_ptr<QList<QVariant>>& row)
{
Base::Console().Log("row: ");
Base::Console().log("row: ");
for (auto& column : *row) {
Base::Console().Log("'%s' ", column.toString().toStdString().c_str());
Base::Console().log("'%s' ", column.toString().toStdString().c_str());
}
Base::Console().Log("\n");
Base::Console().log("\n");
}
void Array2D::dump() const

View File

@@ -322,7 +322,7 @@ void MaterialProperty::setValue(const QString& value)
setQuantity(Base::Quantity::parse(value.toStdString()));
}
catch (const Base::ParserError& e) {
Base::Console().Log("MaterialProperty::setValue Error '%s' - '%s'\n",
Base::Console().log("MaterialProperty::setValue Error '%s' - '%s'\n",
e.what(),
value.toStdString().c_str());
// Save as a string
@@ -730,7 +730,7 @@ void Material::addPhysical(const QString& uuid)
_physical[propertyName] = std::make_shared<MaterialProperty>(property, uuid);
}
catch (const UnknownValueType&) {
Base::Console().Error("Property '%s' has unknown type '%s'. Ignoring\n",
Base::Console().error("Property '%s' has unknown type '%s'. Ignoring\n",
property.getName().toStdString().c_str(),
property.getPropertyType().toStdString().c_str());
}
@@ -772,7 +772,7 @@ void Material::removePhysical(const QString& uuid)
setEditStateAlter();
}
catch (ModelNotFound const&) {
Base::Console().Log("Physical model not found '%s'\n", uuid.toStdString().c_str());
Base::Console().log("Physical model not found '%s'\n", uuid.toStdString().c_str());
}
}
@@ -808,7 +808,7 @@ void Material::addAppearance(const QString& uuid)
}
}
catch (ModelNotFound const&) {
Base::Console().Log("Appearance model not found '%s'\n", uuid.toStdString().c_str());
Base::Console().log("Appearance model not found '%s'\n", uuid.toStdString().c_str());
}
}
@@ -1426,7 +1426,7 @@ void Material::saveModels(QTextStream& stream, bool saveInherited) const
}
}
catch (const PropertyNotFound&) {
Base::Console().Log("Material::saveModels Property not found '%s'\n",
Base::Console().log("Material::saveModels Property not found '%s'\n",
propertyName.toStdString().c_str());
}
@@ -1757,7 +1757,7 @@ App::Material Material::getMaterialAppearance() const
if (hasAppearanceProperty(QStringLiteral("TextureImage"))) {
auto property = getAppearanceProperty(QStringLiteral("TextureImage"));
if (!property->isNull()) {
Base::Console().Log("Has 'TextureImage'\n");
Base::Console().log("Has 'TextureImage'\n");
material.image = property->getString().toStdString();
}
@@ -1766,7 +1766,7 @@ App::Material Material::getMaterialAppearance() const
else if (hasAppearanceProperty(QStringLiteral("TexturePath"))) {
auto property = getAppearanceProperty(QStringLiteral("TexturePath"));
if (!property->isNull()) {
Base::Console().Log("Has 'TexturePath'\n");
Base::Console().log("Has 'TexturePath'\n");
material.imagePath = property->getString().toStdString();
}
@@ -1823,8 +1823,8 @@ void Material::validate(const std::shared_ptr<Material>& other) const
}
if (_tags.size() != other->_tags.size()) {
Base::Console().Log("Local tags count %d\n", _tags.size());
Base::Console().Log("Remote tags count %d\n", other->_tags.size());
Base::Console().log("Local tags count %d\n", _tags.size());
Base::Console().log("Remote tags count %d\n", other->_tags.size());
throw InvalidMaterial("Material tags counts don't match");
}
if (!other->_tags.contains(_tags)) {
@@ -1832,8 +1832,8 @@ void Material::validate(const std::shared_ptr<Material>& other) const
}
if (_physicalUuids.size() != other->_physicalUuids.size()) {
Base::Console().Log("Local physical model count %d\n", _physicalUuids.size());
Base::Console().Log("Remote physical model count %d\n", other->_physicalUuids.size());
Base::Console().log("Local physical model count %d\n", _physicalUuids.size());
Base::Console().log("Remote physical model count %d\n", other->_physicalUuids.size());
throw InvalidMaterial("Material physical model counts don't match");
}
if (!other->_physicalUuids.contains(_physicalUuids)) {
@@ -1841,8 +1841,8 @@ void Material::validate(const std::shared_ptr<Material>& other) const
}
if (_physicalUuids.size() != other->_physicalUuids.size()) {
Base::Console().Log("Local appearance model count %d\n", _physicalUuids.size());
Base::Console().Log("Remote appearance model count %d\n", other->_physicalUuids.size());
Base::Console().log("Local appearance model count %d\n", _physicalUuids.size());
Base::Console().log("Remote appearance model count %d\n", other->_physicalUuids.size());
throw InvalidMaterial("Material appearance model counts don't match");
}
if (!other->_physicalUuids.contains(_physicalUuids)) {
@@ -1850,8 +1850,8 @@ void Material::validate(const std::shared_ptr<Material>& other) const
}
if (_allUuids.size() != other->_allUuids.size()) {
Base::Console().Log("Local model count %d\n", _allUuids.size());
Base::Console().Log("Remote model count %d\n", other->_allUuids.size());
Base::Console().log("Local model count %d\n", _allUuids.size());
Base::Console().log("Remote model count %d\n", other->_allUuids.size());
throw InvalidMaterial("Material model counts don't match");
}
if (!other->_allUuids.contains(_allUuids)) {

View File

@@ -113,8 +113,8 @@ void ModelProperty::validate(const ModelProperty& other) const
throw InvalidProperty("Model names don't match");
}
if (getDisplayName() != other.getDisplayName()) {
Base::Console().Log("Local display name '%s'\n", getDisplayName().toStdString().c_str());
Base::Console().Log("Remote display name '%s'\n",
Base::Console().log("Local display name '%s'\n", getDisplayName().toStdString().c_str());
Base::Console().log("Remote display name '%s'\n",
other.getDisplayName().toStdString().c_str());
throw InvalidProperty("Model display names don't match");
}
@@ -135,8 +135,8 @@ void ModelProperty::validate(const ModelProperty& other) const
}
if (_columns.size() != other._columns.size()) {
Base::Console().Log("Local property column count %d\n", _columns.size());
Base::Console().Log("Remote property column count %d\n", other._columns.size());
Base::Console().log("Local property column count %d\n", _columns.size());
Base::Console().log("Remote property column count %d\n", other._columns.size());
throw InvalidProperty("Model property column counts don't match");
}
for (size_t i = 0; i < _columns.size(); i++) {
@@ -243,8 +243,8 @@ void Model::validate(const std::shared_ptr<Model>& other) const
// Need to compare properties
if (_properties.size() != other->_properties.size()) {
// Base::Console().Log("Local property count %d\n", _properties.size());
// Base::Console().Log("Remote property count %d\n", other->_properties.size());
// Base::Console().log("Local property count %d\n", _properties.size());
// Base::Console().log("Remote property count %d\n", other->_properties.size());
throw InvalidModel("Model property counts don't match");
}
for (auto& property : _properties) {

View File

@@ -138,7 +138,7 @@ void ModelLoader::showYaml(const YAML::Node& yaml) const
out << yaml;
std::string logData = out.str();
Base::Console().Log("%s\n", logData.c_str());
Base::Console().log("%s\n", logData.c_str());
}
void ModelLoader::dereference(const QString& uuid,
@@ -198,7 +198,7 @@ void ModelLoader::dereference(std::shared_ptr<ModelEntry> model,
dereference(model->getUUID(), model, child, inheritances);
}
catch (const std::out_of_range&) {
Base::Console().Log("Unable to find '%s' in model map\n",
Base::Console().log("Unable to find '%s' in model map\n",
nodeName.toStdString().c_str());
}
}
@@ -333,7 +333,7 @@ void ModelLoader::loadLibrary(std::shared_ptr<ModelLibraryLocal> library)
// showYaml(model->getModel());
}
catch (InvalidModel const&) {
Base::Console().Log("Invalid model '%s'\n", pathname.toStdString().c_str());
Base::Console().log("Invalid model '%s'\n", pathname.toStdString().c_str());
}
}
}

View File

@@ -95,7 +95,7 @@ void ModelManager::OnChange(ParameterGrp::SubjectType& rCaller, ParameterGrp::Me
{
const ParameterGrp& rGrp = static_cast<ParameterGrp&>(rCaller);
if (strcmp(Reason, "UseExternal") == 0) {
Base::Console().Log("Use external changed\n");
Base::Console().log("Use external changed\n");
_useExternal = rGrp.GetBool("UseExternal", false);
// _dbManager->refresh();
}

View File

@@ -94,7 +94,7 @@ PyMOD_INIT_FUNC(MatGui)
PyObject* matGuiModule = MatGui::initModule();
Base::Console().Log("Loading GUI of Material module... done\n");
Base::Console().log("Loading GUI of Material module... done\n");
MatGui::Workbench ::init();
auto manip = std::make_shared<MatGui::WorkbenchManipulator>();

View File

@@ -58,7 +58,7 @@ Array2D::Array2D(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {

View File

@@ -54,7 +54,7 @@ Array3D::Array3D(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {

View File

@@ -391,7 +391,7 @@ QVariant Array3DModel::data(const QModelIndex& index, int role) const
catch (const Materials::InvalidIndex&) {
}
catch (const std::exception& e) {
Base::Console().Error("The error message is: %s\n", e.what());
Base::Console().error("The error message is: %s\n", e.what());
}
try {
@@ -442,7 +442,7 @@ bool Array3DModel::setData(const QModelIndex& index, const QVariant& value, int
_value->setValue(index.row(), index.column(), value.value<Base::Quantity>());
}
catch (const Materials::InvalidIndex&) {
Base::Console().Error("Array3DModel::setData - InvalidIndex");
Base::Console().error("Array3DModel::setData - InvalidIndex");
}
Q_EMIT dataChanged(index, index);

View File

@@ -421,7 +421,7 @@ void DlgDisplayPropertiesImp::onChangeModeActivated(const QString& s)
void DlgDisplayPropertiesImp::onChangePlotActivated(const QString& s)
{
Base::Console().Log("Plot = %s\n", (const char*)s.toLatin1());
Base::Console().log("Plot = %s\n", (const char*)s.toLatin1());
}
/**

View File

@@ -205,7 +205,7 @@ void DlgInspectMaterial::update(std::vector<Gui::ViewProvider*>& views)
void DlgInspectMaterial::updateMaterialTree(const Materials::Material& material)
{
Base::Console().Log("Material '%s'\n", material.getName().toStdString().c_str());
Base::Console().log("Material '%s'\n", material.getName().toStdString().c_str());
auto tree = ui->treeMaterials;
auto model = qobject_cast<QStandardItemModel*>(tree->model());

View File

@@ -122,7 +122,7 @@ ImageEdit::ImageEdit(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {
@@ -141,7 +141,7 @@ ImageEdit::ImageEdit(const QString& propertyName,
}
}
else {
Base::Console().Log("No value loaded\n");
Base::Console().log("No value loaded\n");
showPixmap();
}

View File

@@ -57,14 +57,14 @@ ListEdit::ListEdit(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {
_value = _property->getList();
}
else {
Base::Console().Log("No value loaded\n");
Base::Console().log("No value loaded\n");
}
setupListView();

View File

@@ -151,7 +151,7 @@ void MaterialDelegate::setValue(QAbstractItemModel* model,
catch (const Base::ValueError& e) {
// Units mismatch
auto quantity = value.value<Base::Quantity>();
Base::Console().Log("Units mismatch '%s' = '%s', "
Base::Console().log("Units mismatch '%s' = '%s', "
"setting to default property units '%s'\n",
propertyName.toStdString().c_str(),
quantity.getUserString().c_str(),

View File

@@ -274,7 +274,7 @@ void MaterialTreeWidget::updateMaterial(const QString& uuid)
material = std::make_shared<Materials::Material>(*getMaterialManager().getMaterial(uuid));
}
catch (Materials::MaterialNotFound const&) {
Base::Console().Log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
Base::Console().log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
}
m_materialDisplay = material->getName();

View File

@@ -144,7 +144,7 @@ public:
}
void setIncludeEmptyLibraries(bool value)
{
Base::Console().Log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
Base::Console().log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
_filterOptions.setIncludeEmptyLibraries(value);
}
@@ -287,4 +287,4 @@ protected:
} // namespace MatGui
#endif // MATGUI_MATERIALTREEWIDGET_H
#endif // MATGUI_MATERIALTREEWIDGET_H

View File

@@ -394,7 +394,7 @@ void MaterialsEditor::onPhysicalAdd(bool checked)
updateMaterial();
}
else {
Base::Console().Log("No model selected\n");
Base::Console().log("No model selected\n");
}
}
@@ -440,7 +440,7 @@ void MaterialsEditor::onAppearanceAdd(bool checked)
updateMaterial();
}
else {
Base::Console().Log("No model selected\n");
Base::Console().log("No model selected\n");
}
}
@@ -590,7 +590,7 @@ void MaterialsEditor::saveMaterial()
void MaterialsEditor::accept()
{
if (_material->isOldFormat()) {
Base::Console().Log("*** Old Format File ***\n");
Base::Console().log("*** Old Format File ***\n");
oldFormatError();
return;
@@ -914,7 +914,7 @@ bool MaterialsEditor::updateTexturePreview() const
try {
auto property = _material->getAppearanceProperty(QStringLiteral("TextureImage"));
if (!property->isNull()) {
// Base::Console().Log("Has 'TextureImage'\n");
// Base::Console().log("Has 'TextureImage'\n");
auto propertyValue = property->getString();
if (!propertyValue.isEmpty()) {
QByteArray by = QByteArray::fromBase64(propertyValue.toUtf8());
@@ -931,10 +931,10 @@ bool MaterialsEditor::updateTexturePreview() const
try {
auto property = _material->getAppearanceProperty(QStringLiteral("TexturePath"));
if (!property->isNull()) {
// Base::Console().Log("Has 'TexturePath'\n");
// Base::Console().log("Has 'TexturePath'\n");
auto filePath = property->getString();
if (!image.load(filePath)) {
Base::Console().Log("Unable to load image '%s'\n",
Base::Console().log("Unable to load image '%s'\n",
filePath.toStdString().c_str());
// return; // ???
}
@@ -950,7 +950,7 @@ bool MaterialsEditor::updateTexturePreview() const
auto property = _material->getAppearanceProperty(QStringLiteral("TextureScaling"));
if (!property->isNull()) {
// scaling = property->getFloat();
// Base::Console().Log("Has 'TextureScaling' = %g\n", scaling);
// Base::Console().log("Has 'TextureScaling' = %g\n", scaling);
}
}
catch (const Materials::PropertyNotFound&) {
@@ -1262,7 +1262,7 @@ void MaterialsEditor::onSelectMaterial(const QItemSelection& selected,
_material = std::make_shared<Materials::Material>(*getMaterialManager().getMaterial(uuid));
}
catch (Materials::ModelNotFound const&) {
Base::Console().Log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
Base::Console().log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
_material = std::make_shared<Materials::Material>();
}

View File

@@ -218,7 +218,7 @@ private:
}
void setIncludeEmptyLibraries(bool value)
{
Base::Console().Log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
Base::Console().log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
_filterOptions.setIncludeEmptyLibraries(value);
}

View File

@@ -54,14 +54,14 @@ TextEdit::TextEdit(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {
_value = _property->getString();
}
else {
Base::Console().Log("No value loaded\n");
Base::Console().log("No value loaded\n");
_value = QString();
}