[LYN-3457] Removed the LensFlareEditor.
This commit is contained in:
@@ -36,7 +36,6 @@ void RegisterReflectedVarHandlers()
|
||||
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew LocalStringPropertyHandler());
|
||||
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew LightAnimationPropertyHandler());
|
||||
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew UserPopupWidgetHandler());
|
||||
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew LensFlareHandler());
|
||||
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew ColorCurveHandler());
|
||||
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew FloatCurveHandler());
|
||||
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew MotionPropertyWidgetHandler());
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
// Editor
|
||||
#include "GenericSelectItemDialog.h"
|
||||
#include "QtViewPaneManager.h"
|
||||
#include "LensFlareEditor/LensFlareEditor.h"
|
||||
|
||||
|
||||
UserPropertyEditor::UserPropertyEditor(QWidget *pParent /*= nullptr*/)
|
||||
@@ -147,79 +146,6 @@ bool UserPopupWidgetHandler::ReadValuesIntoGUI(size_t index, UserPropertyEditor*
|
||||
|
||||
#include <Controls/ReflectedPropertyControl/moc_PropertyMiscCtrl.cpp>
|
||||
|
||||
LensFlarePropertyWidget::LensFlarePropertyWidget(QWidget *pParent /*= nullptr*/)
|
||||
:QWidget(pParent)
|
||||
{
|
||||
m_valueEdit = new QLineEdit;
|
||||
|
||||
QToolButton *mainButton = new QToolButton;
|
||||
mainButton->setText("D");
|
||||
connect(mainButton, &QToolButton::clicked, this, &LensFlarePropertyWidget::OnEditClicked);
|
||||
connect(m_valueEdit, &QLineEdit::editingFinished, m_valueEdit, [this] () {emit ValueChanged(m_valueEdit->text());});
|
||||
|
||||
QHBoxLayout *mainLayout = new QHBoxLayout(this);
|
||||
mainLayout->addWidget(m_valueEdit, 1);
|
||||
mainLayout->addWidget(mainButton);
|
||||
mainLayout->setContentsMargins(1, 1, 1, 1);
|
||||
}
|
||||
|
||||
void LensFlarePropertyWidget::SetValue(const QString &value)
|
||||
{
|
||||
m_valueEdit->setText(value);
|
||||
}
|
||||
|
||||
QString LensFlarePropertyWidget::GetValue() const
|
||||
{
|
||||
return m_valueEdit->text();
|
||||
}
|
||||
|
||||
void LensFlarePropertyWidget::OnEditClicked()
|
||||
{
|
||||
const QtViewPane *lensFlarePane = GetIEditor()->OpenView(CLensFlareEditor::s_pLensFlareEditorClassName);
|
||||
if (!lensFlarePane)
|
||||
return;
|
||||
|
||||
CLensFlareEditor *editor = FindViewPane<CLensFlareEditor>(QtUtil::ToQString(CLensFlareEditor::s_pLensFlareEditorClassName));
|
||||
if (editor)
|
||||
QTimer::singleShot(0, editor, SLOT(OnUpdateTreeCtrl()));
|
||||
}
|
||||
|
||||
QWidget* LensFlareHandler::CreateGUI(QWidget *pParent)
|
||||
{
|
||||
LensFlarePropertyWidget* newCtrl = aznew LensFlarePropertyWidget(pParent);
|
||||
connect(newCtrl, &LensFlarePropertyWidget::ValueChanged, newCtrl, [newCtrl]()
|
||||
{
|
||||
EBUS_EVENT(AzToolsFramework::PropertyEditorGUIMessages::Bus, RequestWrite, newCtrl);
|
||||
});
|
||||
|
||||
return newCtrl;
|
||||
}
|
||||
|
||||
void LensFlareHandler::ConsumeAttribute(LensFlarePropertyWidget* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName)
|
||||
{
|
||||
Q_UNUSED(GUI); Q_UNUSED(attrib); Q_UNUSED(attrValue); Q_UNUSED(debugName);
|
||||
}
|
||||
|
||||
void LensFlareHandler::WriteGUIValuesIntoProperty(size_t index, LensFlarePropertyWidget* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
Q_UNUSED(node);
|
||||
CReflectedVarGenericProperty val = instance;
|
||||
val.m_value = GUI->GetValue().toUtf8().data();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
bool LensFlareHandler::ReadValuesIntoGUI(size_t index, LensFlarePropertyWidget* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
Q_UNUSED(node);
|
||||
CReflectedVarGenericProperty val = instance;
|
||||
GUI->SetValue(val.m_value.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QWidget* FloatCurveHandler::CreateGUI(QWidget *pParent)
|
||||
{
|
||||
CSplineCtrl *cSpline = new CSplineCtrl(pParent);
|
||||
|
||||
@@ -70,39 +70,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
|
||||
class LensFlarePropertyWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AZ_CLASS_ALLOCATOR(LensFlarePropertyWidget, AZ::SystemAllocator, 0);
|
||||
LensFlarePropertyWidget(QWidget *pParent = nullptr);
|
||||
|
||||
void SetValue(const QString &value);
|
||||
QString GetValue() const;
|
||||
|
||||
void OnEditClicked();
|
||||
|
||||
signals:
|
||||
void ValueChanged(const QString &value);
|
||||
|
||||
private:
|
||||
QLineEdit *m_valueEdit;
|
||||
};
|
||||
|
||||
class LensFlareHandler : public QObject, public AzToolsFramework::PropertyHandler < CReflectedVarGenericProperty, LensFlarePropertyWidget>
|
||||
{
|
||||
public:
|
||||
AZ_CLASS_ALLOCATOR(LensFlareHandler, AZ::SystemAllocator, 0);
|
||||
bool IsDefaultHandler() const override { return false; }
|
||||
QWidget* CreateGUI(QWidget *pParent) override;
|
||||
|
||||
AZ::u32 GetHandlerName(void) const override { return AZ_CRC("ePropertyFlare", 0x5ce803df); }
|
||||
void ConsumeAttribute(LensFlarePropertyWidget* GUI, AZ::u32 attrib, AzToolsFramework::PropertyAttributeReader* attrValue, const char* debugName) override;
|
||||
void WriteGUIValuesIntoProperty(size_t index, LensFlarePropertyWidget* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node) override;
|
||||
bool ReadValuesIntoGUI(size_t index, LensFlarePropertyWidget* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node) override;
|
||||
};
|
||||
|
||||
class FloatCurveHandler : public QObject, public AzToolsFramework::PropertyHandler < CReflectedVarSpline, CSplineCtrl>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -279,7 +279,6 @@ void ReflectedPropertyItem::SetVariable(IVariable *var)
|
||||
case ePropertyLocalString:
|
||||
case ePropertyLightAnimation:
|
||||
case ePropertyParticleName:
|
||||
case ePropertyFlare:
|
||||
m_reflectedVarAdapter = new ReflectedVarGenericPropertyAdapter(desc.m_type);
|
||||
break;
|
||||
case ePropertyTexture:
|
||||
|
||||
@@ -308,8 +308,6 @@ AZ::u32 CReflectedVarGenericProperty::handler()
|
||||
return AZ_CRC("ePropertyLightAnimation", 0x277097da);
|
||||
case ePropertyParticleName:
|
||||
return AZ_CRC("ePropertyParticleName", 0xf44c7133);
|
||||
case ePropertyFlare:
|
||||
return AZ_CRC("ePropertyFlare", 0x5ce803df);
|
||||
default:
|
||||
AZ_Assert(false, "No property handlers defined for the property type");
|
||||
return AZ_CRC("Default", 0xe35e00df);
|
||||
|
||||
Reference in New Issue
Block a user