parent
8e7d1ceb05
commit
dd371387a4
|
@ -72,6 +72,10 @@ Keyboard
|
|||
+----------------------+--------------------------------------------------------------------------+
|
||||
| F | Bring the part widget of current hovered part to visible area |
|
||||
+----------------------+--------------------------------------------------------------------------+
|
||||
| W | Toggle render wireframe |
|
||||
+----------------------+--------------------------------------------------------------------------+
|
||||
| O | Toggle render flat shading |
|
||||
+----------------------+--------------------------------------------------------------------------+
|
||||
|
||||
Mouse
|
||||
======
|
||||
|
|
|
@ -856,6 +856,10 @@ DocumentWindow::DocumentWindow() :
|
|||
connect(graphicsWidget, &SkeletonGraphicsWidget::shortcutToggleWireframe, [=]() {
|
||||
m_modelRenderWidget->toggleWireframe();
|
||||
});
|
||||
|
||||
connect(graphicsWidget, &SkeletonGraphicsWidget::shortcutToggleFlatShading, [=]() {
|
||||
Preferences::instance().setFlatShading(!Preferences::instance().flatShading());
|
||||
});
|
||||
|
||||
connect(graphicsWidget, &SkeletonGraphicsWidget::zoomRenderedModelBy, m_modelRenderWidget, &ModelWidget::zoom);
|
||||
|
||||
|
|
|
@ -48,4 +48,5 @@ void initShortCuts(QWidget *widget, SkeletonGraphicsWidget *graphicsWidget)
|
|||
defineKey(Qt::Key_W, &SkeletonGraphicsWidget::shortcutToggleWireframe);
|
||||
defineKey(Qt::Key_F, &SkeletonGraphicsWidget::shortcutCheckPartComponent);
|
||||
defineKey(Qt::Key_C, &SkeletonGraphicsWidget::shortcutChamferedOrNotSelectedPart);
|
||||
defineKey(Qt::Key_O, &SkeletonGraphicsWidget::shortcutToggleFlatShading);
|
||||
}
|
||||
|
|
|
@ -417,6 +417,7 @@ signals:
|
|||
void shortcutToggleWireframe();
|
||||
void partComponentChecked(QUuid partId);
|
||||
void showOrHideAllComponents();
|
||||
void shortcutToggleFlatShading();
|
||||
public:
|
||||
SkeletonGraphicsWidget(const SkeletonDocument *document);
|
||||
std::map<QUuid, std::pair<SkeletonGraphicsNodeItem *, SkeletonGraphicsNodeItem *>> nodeItemMap;
|
||||
|
|
Loading…
Reference in New Issue