Commit Graph

91 Commits

Author SHA1 Message Date
wmayer
20745f3301 Gui: [skip ci] add options to set one-pass and backface-pass rendering 2020-04-06 19:50:58 +02:00
wmayer
efa4cb66a2 Gui: allow to dump only the visible part of the scene graph
Gui.ActiveDocument.ActiveView.dump("scene.iv", True)
The second parameter is optional and by default False
2020-01-16 13:28:01 +01:00
wmayer
c5c3b41c8f Gui: add virtual method containsViewProvider to MDIView and re-implement it in some sub-classes
Improve Document::setActiveView to not always switch to the first 3D view but check the currently active view before
2019-12-29 15:00:35 +01:00
wmayer
5390266ac7 fixes #0004125: MDIViews not accessible correctly 2019-09-15 18:15:44 +02:00
Zheng, Lei
0c6b1a5d69 Gui: Application/Document/MainWindow changes following App namespace
Application:

* signalNewDocument, check the extra argument, isMainDoc, the decide
  whether to create view of the new document. This is so that external
  linked document can be opened in background without crowding the tab
  list.

* slotDeleteDocument, calls Document::beforeDelete()

* slotActiveDocument, creates view if none, because external document
  is now opened without view.

* onLastWindowClosed(), switch to next active document, and creates view
  if none.

* send(Has)MsgToFocusView(), new API to send message to the active view
  in focus. This is to solve the ambiguity of things like pressing
  delete key, copy, paste handling when the active new is not in focus.
  For example, when spread sheet view is active, delete/copy/paste
  handling should be different when the focus on the spread sheet view
  or focus on tree view.

* tryClose(), delegate to MainWindow for close confirmation

* reopen(), new API to reload a partial document in full

Document/DocumentP:

* _CoinMap, new internal map for quick access view provider from its
  root node.

* slotNewObject, modified to support view provider override from
  App::FeaturePython, through new API
  DocumentObject::getViewProviderNameOverride().

* slotDeletedObject/slotTransactionRemove, improve handling of geo group
  children rebuild

* slotSkipRecompute, add special handling of document with skip
  recompute. Some command cannot work when skip recompute is active.
  For example, sketcher command will check if recompute is successful
  on many commands, and will undo if not. New 'PartialCompute' flag is
  added to allow recompute only the editing object and all its
  dependencies if 'SkipRecompute' is active.

* slotTouchedObject, new signal handling of manually touched object.

* setModified(), do nothing if already modified. This is a critical
  performance improvement, because marking tab window as modified turns
  out to be a relatively expensive operation, and will cause massive
  slow down if calling it on every property change.

* getViewProviderByPathFromHead/getViewProvidersByPath(), new APIs to
  obtain view provider(s) from coin SoPath.

* save/saveAll/saveCopy, modified to support external document saving.

* Save/RestoreDocFile(), save and restore tree item recursive expansion
  status.

* slotFinishRestoreObject(), handle new signal
  signalFinishRestoreObject(), unifies postprocessing in restore and
  import operation.

* createView/setActiveView(), add support of delayed view creations

* canClose(), delegate to MainWindows to ask for confirmation

* undo/redo(), support grouped transaction undo/redo. Transactions may
  be grouped by the same transaction ID if they are triggered by a
  single operation but involves objects from multiple documents.

* toggleInSceneGraph(), new API to add or remove root node from or to
  scenegraph without deleting the view object.

MainWindow:

* Update command status using a single shot timer instead of periodical
  one.

* Improve message display is status bar. Give error and warning message
  higher priority (using QStatusBar::showMessage()) than normal status
  message (using actionLabel), reversed from original implementation.

* confirmSave(), new API to check for modification, and ask user to save
  the document before closing. The confirmation dialog allows user to
  apply the answer to all document for convenience.

* saveAll(), new API to save all document with correct ordering in case
  of external linking.

* createMimeDataFromSelection/insertFromMimeData(), support copy paste
  object with external linking. A new dialog DlgObjectSelection is used
  to let user select exactly which object to export.

CommandDoc/CommandWindow:

* Related changes to object delete, document import, export, and save.
2019-08-17 15:08:33 +02:00
Zheng, Lei
c9ba972d26 Gui: add support of selection context
The patch implements context-aware selection and rendering in 3D view.

Please check [here](https://git.io/fjiY5) for more details, including
the following 'Render Caching' section.

The patch also includes modification of View3DInventorViewer to support
always-on-top selection rendering using the secondary selection context
and the new coin node SoFCPathAnnotation.

Another small change in SoQtQuarterAdaptor for more responsive frame
rate display. The original implementation reports skewed frame rate
in the presence of long idle period.
2019-08-17 14:52:10 +02:00
wmayer
7539b8314e make print preview working for > Qt 5.9 2019-07-11 00:06:38 +02:00
wmayer
69cb43eebd disable ESC button support in View3DInventor::keyEvent() for Qt5 because changing MDI view mode causes rendering artifacts 2019-06-05 15:44:23 +02:00
luz.paz
06d583b425 Misc typos and whitespace fixes
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*`
2019-03-31 11:42:36 +02:00
wmayer
2c42c57560 fixes 0003222: Invert zoom setting is not respected in paper/page mode 2019-01-14 11:08:17 +01:00
wmayer
11c0c9adde harmonize functions to set camera orientations 2019-01-12 22:59:44 +01:00
wmayer
0e1cfea354 fixes 0003657: automatic rotation disabled by default 2018-10-28 20:45:02 +01:00
wmayer
013e8108c0 add option to drag at cursor instead of view center 2018-07-25 22:36:35 +02:00
wmayer
01454584fc fix inconsistent default parameters, fix warnings 2018-05-31 13:47:31 +02:00
wmayer
e266c6320a respect settings of locatation navicube when creating a new view 2018-05-30 09:45:44 +02:00
wmayer
9a3021818b implement option to change corner of navi cube 2018-05-26 18:51:53 +02:00
wmayer
3b4ab88844 + option to disable navi cube
+ handle destruction of GL context in 3d viewer class
+ fix for OpenGL error message: 'Texture is not valid in the current context. Texture has not been destroyed'
2018-05-26 15:33:45 +02:00
wmayer
a9b1356bc7 code reduction w.r.t offscreen rendering 2018-01-07 17:12:50 +01:00
wmayer
2cd338ba03 improve whitespaces 2017-11-24 15:43:28 +01:00
wmayer
ed817b0e05 make retrieving view direction numerically more stable, change orientation of bottom view 2017-11-13 21:53:10 +01:00
wmayer
5604e64f54 Various fixes:
+ disable VBO rendering in split views
+ activate multi-sampling in split view for manual alignment
+ share GL widget in case a document has multiple views to make VBO rendering work correctly
2017-09-23 11:14:41 +02:00
wmayer
ffa10bbf0c Qt5: workaround for undocking of mdi view
fix minor issues reported by clang static analyzer
2017-05-03 22:01:46 +02:00
wmayer
df1da3f8d8 Qt5 port: workaround to keep multi-sampling when undocking mdi window 2017-05-01 18:53:58 +02:00
wmayer
fb7094bf31 use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
81d325eb0b Qt5OpenGL: add missing header for macOS/Linux builds 2017-03-21 20:37:03 +01:00
wmayer
e07b97ec90 Qt5OpenGL: add missing header for macOS/Linux builds 2017-03-21 20:37:03 +01:00
wmayer
dbc33d406d Qt5OpenGL: fix to make the 3d viewer fit into the mdi area after re-docking it 2017-03-21 20:37:03 +01:00
wmayer
764f9ce7e5 Qt5OpenGL: use OpenGL debug logger to locate problems, fix a couple of errors 2017-03-21 20:37:03 +01:00
wmayer
79f961ee9c Qt5OpenGL: fix transparency issue with framebuffer objects with old OpenGL API 2017-03-21 20:37:03 +01:00
wmayer
34f277e7bb Qt5OpenGL: make off-screen renderer working 2017-03-21 20:37:03 +01:00
wmayer
67f05c98fa Qt5OpenGL: fix creating thumbnals, pdf, print preview and snapshot 2017-03-21 20:37:03 +01:00
wmayer
d88b00bcdb Qt5OpenGL: do not use pixel buffer for the moment 2017-03-21 20:37:03 +01:00
wmayer
9e42badfaf move QuarterWidget to QOpenGLWidget 2017-03-21 20:37:03 +01:00
wmayer
4a0720dd00 cleanup experimental code, improve whitespaces 2017-02-12 14:41:55 +01:00
Jean-Marie Verdun
44af3629db Accelerate 3D rendering with VBO support
*First step to move Part rendering using VBO instead of direct rendering
*Update comments inside the code
*Assume VBO is available if OpenGL > 3.0 is detected
*Add initial Color support to VBO rendering !
*Initial full feature VBO rendering implementation
*Modify some include issue for linux build
*Try to fix linux include header
*Reupdate header include for linux support
*Fix compilation on linux
*Fix linux and MacoOS build
*Fix glGetString definition
*Fix Windows build
*Add VBO support as an option into the Preference menu
*Fix crash while running FreeCAD test bench with new VBO rendering infrastructure (in both cases)
*Improve performances
*Compute material index only when a VBO update is required (improve frame rate by 10%)
*Clean the code
*Fix Travis compilation warning
*Try to fix Windows compilation issue
*Update include for Windows
2017-02-12 14:41:55 +01:00
wmayer
b19a4246ab fix typos 2016-12-19 14:07:35 +01:00
wmayer
1e6dcabefc fix -Wextra in FreeCADGui 2016-09-21 20:54:52 +02:00
DeepSOIC
8415bc32b6 Gui: Selection: pick radius support 2016-08-10 18:46:45 +02:00
wmayer
b014f86a88 + fix drag and drop of Quarter viewer 2016-05-25 14:13:57 +02:00
jriegel
e5f3fe18f6 make SoFCUnifiedSelection work with nested children in 3DView 2016-04-12 18:11:45 +02:00
Yorik van Havre
9e1ec2ac31 Turned Zoom At Cursor option True by default - fixes #2371 2016-02-26 13:51:39 -03:00
Mateusz Skowroński
f48f0f69be Qt::WFlags is obsolete in Qt5. Replace it with Qt::WindowFlags.
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:58 +01:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Mateusz Skowroński
83bcbebe5f Add missing QMimeData.h includes.
This change is Qt4/Qt5 neutral.
2015-12-24 13:36:46 +01:00
wmayer
787fc283b5 + fixes #0002297: 'Export to PDF...' from drawing view does not show an error if existing file can not be overwritten 2015-10-17 00:31:30 +02:00
wmayer
d19ada810f + split file extension from descriptive text of file format to avoid that invalid translation breaks file dialog
+ add method to make image view unclosable for user
+ fix possible crash in MeshAlgorithm::GetMeshBorder
+ fix possible crash in MeshAlgorithm::ConnectLines
2015-10-06 17:28:52 +02:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
Yorik van Havre
e122ea8bf7 Added SaveCopy command
This command saves a copy of the current document under a new name,
without modifying the document itself.

Available in menu File -> Save a Copy or from python with
FreeCAD.ActiveDocument.saveCopy(filename)
2015-09-02 13:38:14 -03:00
wmayer
9fbe818ad0 + remove method View3DInventor::dumpSelection 2015-08-26 18:58:59 +02:00
wmayer
7c83638b40 + for VRML and OpenInventor export only selection, fix whitespaces 2015-05-17 13:53:22 +02:00