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
Dialogs to view the Appearance and Material properties of an object
These inspectors are intended to be used when debugging Appearance and
Material issues in a model.
The Appearance inspector displays the appearance properties of an
object. This will be more useful once PR 13792 is merged which migrates
parts to use ShapeAppearance instead of DiffuseColor. This shows each
of the appearance properties per face for the object.
The Material inspector shows the material, models, and properties
assigned to a model. It displays useful debugging information such as
the UUID and file paths associated with eacch of the items. This is
useful when finding and resolving model conflicts.
The material inspector now gives the option of copying the information
to the clipboard.
Several group commands are active but require an active document to work. This PR overrides the method isActive() to
disable the commands if no active document exists.
The affected commands are:
* Std_ViewGroup
* Std_LinkActions
* PartDesign_CompDatums
* PartDesign_CompSketches
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.
The problem is caused by conflicting values of the anonymous enum of ViewProviderSubShapeBinder. The solution is to set a higher value than the highest value of EditMode
The use of static_cast here could cause undefined behaviour because at this point it's not guaranteed that findBodyOf()
really returns a PartDesign::Body
* Allow adding subfeatures to MultiTransform if there is no active Body
Previously the active Body would be checked and used to add new
subfeatures.
This would either do nothing, when no Body was active,
causing confusion for users becaues than can edit other features without
an active Body.
Or it would add the subfeature to the wrong Body if another Body than the
one of the MultiTransform was active.
Now the Body of the MultiTransform is checked and used.
# Conflicts:
# src/Mod/PartDesign/Gui/TaskMultiTransformParameters.cpp
* Change getTopTransformedObject() to protected
This needs to be called from the MultiTransform.
* Fix typo
The reason of the crash is a static_cast of an unknown type that causes undefined behaviour. The feature AdditiveLoft has the
property Section of type PropertyLinkSubList but the function does a static_cast to PropertyLinkList.
The solution is to use a dynamic_cast that returns null if the cast fails.
Reference selection in the GUI was accidentially changed to only
allow specific types of objects, preventing e.g. selection of a DatumPlane
for mirroring.
This restores the previous functionality.