Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Materials: Unable to open an older material that is not part of a library #13302

Closed
2 tasks done
davesrocketshop opened this issue Apr 4, 2024 · 2 comments · Fixed by #13339
Closed
2 tasks done

Materials: Unable to open an older material that is not part of a library #13302

davesrocketshop opened this issue Apr 4, 2024 · 2 comments · Fixed by #13339
Labels
Bug This issue or PR is related to a bug Materials Materials related

Comments

@davesrocketshop
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Previous versions of FreeCAD could open a material by specifying its path. The current version finds a library based on the path and marks the material as not found if it's not in a library.

Full version info

OS: Windows 11 build 22631
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.36461 (Git)
Build type: Release
Branch: issue13019
Hash: 60f0ba3e5922a257be63d54aed10d3a89bbf0ae3
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/Canada (en_CA)
Installed mods: 
  * CfdOF 1.25.9
  * MaterialTest
  * Render 2024.1.23
  * Rocket 3.3.0

Subproject(s) affected?

Other (specify in description)

Anything else?

https://forum.freecad.org/viewtopic.php?p=751729

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Roy-043 Roy-043 added the Materials Materials related label Apr 4, 2024
@hassansaleh31
Copy link

Not sure if this is the same issue but I'm getting the following error on Ubuntu 22.04.4 LTS using the latest daily build

libyaml-cpp.so.0.7: cannot open shared object file: No such file or directory
Unknown command 'Std_SetAppearance'
Unknown command 'Std_SetMaterial'
libyaml-cpp.so.0.7: cannot open shared object file: No such file or directory

@davesrocketshop
Copy link
Contributor Author

Not sure if this is the same issue but I'm getting the following error on Ubuntu 22.04.4 LTS using the latest daily build

libyaml-cpp.so.0.7: cannot open shared object file: No such file or directory
Unknown command 'Std_SetAppearance'
Unknown command 'Std_SetMaterial'
libyaml-cpp.so.0.7: cannot open shared object file: No such file or directory

Not related. The command issue has a fix that should be merged soon. Not sure the libyaml error, but if it's a debug build that's also related to a fixed bug that should be available soon

@maxwxyz maxwxyz added the Bug This issue or PR is related to a bug label Apr 6, 2024
davesrocketshop added a commit to davesrocketshop/FreeCAD that referenced this issue Apr 6, 2024
Provides compatibility loading older files outside the context of
a library.

Older material files were loaded by specifying a path. The new
material system used the path to associated the material with a
library, which may not be appropriate for legacy files. This change
allows the use of materials outside of a library.

Additionally, legacy files often have name/value pairs not part of the
standard list of properties. Since these were unable to be mapped to
a model property they were ignored. Materials now maintain a legacy
map to hold properties not associated with a property model. These
properties are considered transient and will not be saved. It is not
intended for this feature to be used as a generic container for
properties not mapped to an appropriate model.

Fixes FreeCAD#13302
yorikvanhavre pushed a commit that referenced this issue Apr 15, 2024
Provides compatibility loading older files outside the context of
a library.

Older material files were loaded by specifying a path. The new
material system used the path to associated the material with a
library, which may not be appropriate for legacy files. This change
allows the use of materials outside of a library.

Additionally, legacy files often have name/value pairs not part of the
standard list of properties. Since these were unable to be mapped to
a model property they were ignored. Materials now maintain a legacy
map to hold properties not associated with a property model. These
properties are considered transient and will not be saved. It is not
intended for this feature to be used as a generic container for
properties not mapped to an appropriate model.

Fixes #13302
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This issue or PR is related to a bug Materials Materials related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants