This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.
The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).
Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".
The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
This PR introduces a new get_param function. For its default values it checks a dictionary largely filled by reading the preferences UI files. The goal is to have all defaults in one place to avoid inconsistencies. The dictionary is created once and then stored in a global variable.
Once merged this function will be implemented in Draft and Arch. The get_param function in utils.py will become obsolete.
Related issue: #10176
=========================================================
issue #11183
Feature request.
Instead of repeating over and over again the same message, indicate the number of consecutive repetitions in a single message.
=====================================================================
Issue #11183
- The message is not useful for the user in terms of content.
- The user can do nothing about it, but move on.
Continues the work of the material subsystem improvements.
This merge covers the continued development of the material editor. The
primary improvements are the addition of new data types, a new
appearance preview UI, and changes in the array data types.
New data types were added to support more advanced workflows, such as
the Render Workbench.The Image datatype allows the material to embed
the image in the card instead of pointing to an image in an external
file. Multi-buyte strings span multiple lines as the name implies.
It preserves formatting accross those lines. Also several list types
are now supported, with the primary difference being the editors.
List is a list of strings, FileList is a list of file path names, and
ImageList is a list of embedded images.
For the appearance preview, the UI now uses the same Coin library as
is used in the documents, meaning the preview will look exactly the
same as the material will be shown in the documents.
The array data types are now more complete. The default value wasn't
being used as originially envisioned and was tehrefore removed. For
3D arrays, the Python API was implemented.
There were a lot of code clean ups. This involved removing logging
statements used for debugging during development, reduction of lint
warnings, and code refactoring.
The editor can automatically convert from previous format files to the
current format. This has been extended to material files generated by
the Render WB. Old format files are displayed in the editor with a
warning icon. Selecting one will require saving the file in the new
format before it can be used.
* Add unit system to Project Information and store with document.
* Remove the project unit system
* Restore correct document activation signalling to fix test fail
* Remove commented out dead lines
* Restore ignore option for project unit schemas
* Whitespace fix
* Refresh after changing units
* Remove field label
* Property editor changes applied to unit system
* remove unecessary casts
clean unused code
revert example py code
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Gui: Create group box for animation preferences
* Gui: Add spinning animation checkbox
* Gui: Implement isAnimating() for NavigationAnimator
* Gui: No need to enable animations in DemoMode
The spin animation is played regardless of the user preference and does not need to be enabled before starting the spin animation
* Gui: Change comment