Change background opacity of pose editor
When one pose consists of multiple frames, each frame will be hardly see when the opacity is 0.25, this commit change the opacity to 0.5 in pose editor, however, leave it as 0.25 in main modeling interface.master
parent
ff65a24f32
commit
ef82f2cc6f
|
@ -11,8 +11,8 @@
|
|||
#include "snapshot.h"
|
||||
#include "snapshotxml.h"
|
||||
|
||||
const float PoseDocument::m_nodeRadius = 0.01;
|
||||
const float PoseDocument::m_groundPlaneHalfThickness = 0.01 / 4;
|
||||
const float PoseDocument::m_nodeRadius = 0.005;
|
||||
const float PoseDocument::m_groundPlaneHalfThickness = 0.005 / 4;
|
||||
const bool PoseDocument::m_hideRootAndVirtual = true;
|
||||
const float PoseDocument::m_outcomeScaleFactor = 0.5;
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ PoseEditWidget::PoseEditWidget(const Document *document, QWidget *parent) :
|
|||
|
||||
SkeletonGraphicsWidget *graphicsWidget = new SkeletonGraphicsWidget(m_poseDocument);
|
||||
graphicsWidget->setNodePositionModifyOnly(true);
|
||||
graphicsWidget->setBackgroundBlur(0.5);
|
||||
m_poseGraphicsWidget = graphicsWidget;
|
||||
|
||||
initShortCuts(this, graphicsWidget);
|
||||
|
|
|
@ -46,7 +46,8 @@ SkeletonGraphicsWidget::SkeletonGraphicsWidget(const SkeletonDocument *document)
|
|||
m_modelWidget(nullptr),
|
||||
m_inTempDragMode(false),
|
||||
m_modeBeforeEnterTempDragMode(SkeletonDocumentEditMode::Select),
|
||||
m_nodePositionModifyOnly(false)
|
||||
m_nodePositionModifyOnly(false),
|
||||
m_turnaroundOpacity(0.25)
|
||||
{
|
||||
setRenderHint(QPainter::Antialiasing, false);
|
||||
setBackgroundBrush(QBrush(QWidget::palette().color(QWidget::backgroundRole()), Qt::SolidPattern));
|
||||
|
@ -98,7 +99,7 @@ void SkeletonGraphicsWidget::setModelWidget(ModelWidget *modelWidget)
|
|||
|
||||
void SkeletonGraphicsWidget::enableBackgroundBlur()
|
||||
{
|
||||
m_backgroundItem->setOpacity(0.25);
|
||||
m_backgroundItem->setOpacity(m_turnaroundOpacity);
|
||||
}
|
||||
|
||||
void SkeletonGraphicsWidget::disableBackgroundBlur()
|
||||
|
@ -106,6 +107,12 @@ void SkeletonGraphicsWidget::disableBackgroundBlur()
|
|||
m_backgroundItem->setOpacity(1);
|
||||
}
|
||||
|
||||
void SkeletonGraphicsWidget::setBackgroundBlur(float turnaroundOpacity)
|
||||
{
|
||||
m_turnaroundOpacity = turnaroundOpacity;
|
||||
m_backgroundItem->setOpacity(m_turnaroundOpacity);
|
||||
}
|
||||
|
||||
void SkeletonGraphicsWidget::showContextMenu(const QPoint &pos)
|
||||
{
|
||||
if (SkeletonDocumentEditMode::Add == m_document->editMode) {
|
||||
|
|
|
@ -468,6 +468,7 @@ public slots:
|
|||
void addSelectEdge(QUuid edgeId);
|
||||
void enableBackgroundBlur();
|
||||
void disableBackgroundBlur();
|
||||
void setBackgroundBlur(float turnaroundOpacity);
|
||||
void ikMove(QUuid endEffectorId, QVector3D target);
|
||||
void ikMoveReady();
|
||||
void setSelectedNodesBoneMark(BoneMark boneMark);
|
||||
|
@ -563,6 +564,7 @@ private: //need initalize
|
|||
bool m_inTempDragMode;
|
||||
SkeletonDocumentEditMode m_modeBeforeEnterTempDragMode;
|
||||
bool m_nodePositionModifyOnly;
|
||||
float m_turnaroundOpacity;
|
||||
private:
|
||||
QVector3D m_ikMoveTarget;
|
||||
QUuid m_ikMoveEndEffectorId;
|
||||
|
|
Loading…
Reference in New Issue