Commit Graph

13 Commits

Author SHA1 Message Date
Benjamin Bræstrup Sayoc
6c61769d8c Material: Use QStringLiteral 2025-02-10 18:32:45 +01:00
Roy-043
488d931a69 Material: rename Materials_Edit command
For consistency it should be Material_Edit.
2025-02-03 18:14:18 +01:00
Johannes Thyssen Tishman
dc03238349 Materials: Check if m_uuid is empty before adding to recents 2024-12-08 15:42:04 -05:00
marioalexis
6f8afd85e6 Material: Propagate changes to MaterialTreeWidget even if UUID does not change 2024-11-10 12:33:28 -03:00
David Carter
03e60ccc6e Materials: Catch correct error
When the UUID is set to a non-existent material, it was Catching
Materials::ModelNotFound instead of Materials::MaterialNotFound
2024-07-15 11:11:18 -05:00
David Carter
e04d29b950 Reduce Linter warnings 2024-07-04 11:49:45 -04:00
David Carter
276d189254 Materials: Material selector doesn't have minimum size set
Add properties for setting a minimum size with reasonable defaults.
Notify the user when the tree is expanded or contracted to allow
for container resizing.
2024-06-17 11:30:01 -04:00
David Carter
6c149cdf95 Materials: Tree Widget selection change
Remove notification when a foldder is selected
rather than a material
2024-06-03 10:52:54 -05:00
David Carter
8b5a3b1124 Material: Appearance Updates 2
Improves the use of the ShapeAppearance property for the Part workbench.

    removes DiffuseColor property
        adds Python compatibility using custom attributes
        transitions DiffuseColor to ShapeAppearance on open
    Improved UI elements for setting object appearance, and appearance per face
    Lays the foundation for future texture support
2024-06-01 19:57:16 -05:00
David Carter
f9eb6c2c68 Material: Material Preferences
Updates the material preferences including selecting a default material

Preferences adds some options for what gets displayed in the Materials editor.
The option to use the legacy editor is removed in favour of the new
editor.

A new preference page has been added that allows the user to select a
default material. This will then be assigned to any newly created object. In
support of this, a new widget PrefsMaterialTreeWidget has been added as an
extension of the MaterialTreeWidget to automatically save and restore the
selected material.
2024-05-13 11:14:55 -05:00
David Carter
3f825e7ac3 Material: MaterialTreeWidget usability enhancements
Improves the MaterialTreeWidget beyond minimum viable product.

- Filters can now be filter lists to allow a variety of filtering
	options.
- User preferences allow the inclusion/exclusion of favorites and
	recents.
- Widget state such as expansion, tree expansions, etc are saved and
	restored.
- show current appearancee material when editing.
- implements a python interface

#fixes 13421: always opens full tree
2024-04-22 11:11:39 -05:00
wmayer
d5cfdb1f1e Material: fixes several issues
* fix warning -Wunused-variable
* fix warning -Wreorder-ctor
* fix warning -Wunused-but-set-variable
* fix uic warning for DlgDisplayProperties.ui
* rename the target MateriaTestLib ALL (note the typo and the already existing MaterialTestLib ALL) to MaterialTest ALL
  drop the hard dependency to the Part module: The document is checked for a property ShapeMaterial of type Materials::PropertyMaterial.
  An alternative could be to cast to GeoFeature and use the methods getMaterialAppearance() and setMaterialAppearance()
2024-04-05 10:08:06 +02:00
David Carter
495a96a0f5 Material: Material appearance
Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
2024-04-04 07:39:58 -05:00