Commit Graph

27 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
wmayer
1cf2bacf1f Gui: Add SoPickStyle node to make an object un-selectable if needed 2024-12-09 18:10:15 +01:00
David Carter
d6660f88ed Materials: Selectively apply appearances
Change the appearance only if the appearance hasn't been set explicitly.
A cached material appearance is used to see if the current appearance
matches the last material. It is also compared against an empty
material to see if the saved material value has been initialized.

This solves the problem of material changes overwriting appearance
changes
2024-10-28 21:49:45 -05:00
wmayer
3fd2f64639 Fix several regressions:
+ improve PropertyMaterialList::readString
+ fix transparency handling in ViewProviderPartExt
+ do not register the private member '_diffuseColor' as property because it would be exposed to the
  public where it can be modified
+ fix ViewProviderPartExt::finishRestoring() to correctly restore old project files
+ fix ViewProviderPartExt::setHighlightedFaces() to correctly show face colours if VBO is enabled
+ fix ViewProviderBoolean::updateData()
  fix ViewProviderMultiFuse::updateData()
  fix ViewProviderMultiCommon::updateData()
  fix ViewProviderCompound::updateData()
  fix ViewProviderFillet::updateData()
  fix ViewProviderChamfer::updateData()
  that all set invalid transparency values
+ Filter ShapeAppearance in ViewProviderBody::unifyVisualProperty
  because body features usually have different number of faces than the body itself
+ manually fix some bad looking auto-formatted code
+ clean up code and remove duplicated code
2024-06-11 11:58:32 +02:00
wmayer
330e64fc89 Gui: Move texture handling to view provider extension
It should be avoided to add all stuff to the base class when it's only needed in one sub-class
2024-06-11 11:55:44 +02:00
David Carter
5feb963f9d 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
wmayer
e9bf1e4b88 Gui: expose ViewProviderGeometryObject::getUserDefinedMaterial() to Python 2024-04-25 17:56:58 +02:00
wmayer
2b0a88ca7d Gui: Read material colors from settings 2024-04-19 11:13:59 +02:00
David Carter
ba20441935 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
wmayer
6beace8da6 Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
c87e1cc1c2 clang: fix warnings [-Winconsistent-missing-override] 2022-08-09 17:36:25 +02:00
berniev
75fa455c5d Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
Zheng, Lei
e8fec27b02 Gui: remove SelectionStyle from ViewProviderGeometryObject
The property has been moved to ViewProviderDocumentObject. Forgot to
remove it in ViewProviderGeometryObject.
2019-11-07 17:12:27 +01:00
luz.paz
fb32601746 Fix various (doxy) typos and whitespace issues
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml`
2019-10-03 07:57:13 +02:00
wmayer
cfb04647b2 Do not use a view provider's bounding box node when handling BoundBox selection style because it leads to some inconsistent behaviour.
Instead let SoBoxSelectionRenderAction render the bounding box.
2018-10-26 00:39:15 +02:00
wmayer
5ff6945577 fix compiler warnings with py3 and msvc 2018-04-16 18:24:53 +02:00
wmayer
6a24bc9602 add class ViewProviderDragger
derive ViewProviderGeometryObject from ViewProviderDragger
derive ViewProviderPart from ViewProviderDragger
2017-11-26 15:42:57 +01:00
Zheng, Lei
2707c43e52 Gui: allow bounding box style to be customized 2017-04-01 11:09:03 -03:00
Zheng, Lei
63a6f9c8c5 Gui: added bbox selection style to GeometryObject 2017-03-21 09:29:15 +01:00
blobfish
ae5224d342 Core: Gui: SoFCSysDragger: using SoFCSysDragger in ViewProviderGeometryObject 2016-05-07 23:07:08 +02:00
wmayer
1cdb53ce79 + fixes #0002150: [Ctrl]+[Z] is buffered in a non-intuitive way, does not function in 'edit mode' 2015-09-15 14:30:15 +02:00
wmayer
6e0287ff17 + remove SoFCSelection from ViewProviderGeometryObject 2015-05-20 21:44:27 +02:00
wmayer
9234c7463d + fixes #0001441: entering Transform mode degrades the Placemens rotation to single precision 2014-02-27 14:43:07 +01:00
wmayer
73dd4ab9eb + respect Selectable property in SoFCUnifiedSelection node
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5136 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-15 10:04:21 +00:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00