I've been writing Free software since before RMS wrote the GPL, so when something bugs me enough, I can usually dig into the source code and (sometimes) fix it.
It bothered me that when I set the material for a Body under the Appearance submenu, it reverted to "Default" when the project was saved and reloaded, even though the color of the body did not revert. This turned into a somewhat larger patch than I intended, but it made it possible to also read the list of predefined materials from a file at startup, rather than having them compiled-in (but that part is very hacky and not at all merge-ready).
But now I'm up to a bug. When the user manually changes the color properties of a body, the Material changes to "User Defined", but the selector in the GUI still lists the old value, and it doesn't change until the pane is closed and reopened. Can someone who knows Qt help me fix that?
Self-introduction and a WIP patch to make the chosen display material persist across save/load cycles
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Self-introduction and a WIP patch to make the chosen display material persist across save/load cycles
- Attachments
-
- material-patch.txt
- (34.02 KiB) Downloaded 15 times
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Self-introduction and a WIP patch to make the chosen display material persist across save/load cycles
It's better if you link to a git branch rather than just posting a patch
Re: Self-introduction and a WIP patch to make the chosen display material persist across save/load cycles
I set up a git repo at https://www.afal.party/git/FreeCAD.git where you can check out the display-material branch.