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

Fix further material issues #13520

Merged
merged 3 commits into from Apr 22, 2024
Merged

Fix further material issues #13520

merged 3 commits into from Apr 22, 2024

Conversation

wwmayer
Copy link
Contributor

@wwmayer wwmayer commented Apr 18, 2024

No description provided.

The ShapeAppearance is a list of materials and thus assigning a color with 'obj.ViewObject.ShapeAppearance.DiffuseColor = color'
is incorrect.
But doing it with 'obj.ViewObject.ShapeAppearance[0].DiffuseColor = color' doesn't work as expected because the
internal notification doesn't work with a list.

So, the only viable way is to revert the changes and do it by assigning the color to the 'ShapeColor' attribute.
@github-actions github-actions bot added Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD WB Arch Related to the Arch Workbench WB CAM Related to the CAM/Path Workbench labels Apr 18, 2024
@wwmayer
Copy link
Contributor Author

wwmayer commented Apr 18, 2024

See https://forum.freecad.org/viewtopic.php?t=86962

#13499 doesn't work as expected because the view provider won't be notified by the assigned colour because it's saved to a tmp. list object.

@luzpaz luzpaz added the Materials Materials related label Apr 18, 2024
@chennes chennes merged commit f47138c into FreeCAD:main Apr 22, 2024
10 checks passed
@wwmayer wwmayer deleted the fix_material branch April 22, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Materials Materials related WB Arch Related to the Arch Workbench WB CAM Related to the CAM/Path Workbench
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants