Merge pull request #504 from aws-lumberyard-dev/Atom/guthadam/ATOM-15439
ATOM-15439 Implement basic local socket and server for IPC in material editor and other tools
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include <Atom/Document/MaterialDocumentModule.h>
|
||||
#include <Document/MaterialDocumentSystemComponent.h>
|
||||
|
||||
#include <AzFramework/TargetManagement/TargetManagementComponent.h>
|
||||
#include <AzToolsFramework/UI/PropertyEditor/PropertyManagerComponent.h>
|
||||
#include <AzToolsFramework/Asset/AssetSystemComponent.h>
|
||||
|
||||
@@ -32,7 +31,6 @@ namespace MaterialEditor
|
||||
return AZ::ComponentTypeList{
|
||||
azrtti_typeid<AzToolsFramework::AssetSystem::AssetSystemComponent>(),
|
||||
azrtti_typeid<MaterialDocumentSystemComponent>(),
|
||||
azrtti_typeid<AzFramework::TargetManagementComponent>(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
-16
@@ -109,7 +109,6 @@ namespace MaterialEditor
|
||||
|
||||
void MaterialDocumentSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
|
||||
{
|
||||
required.push_back(AZ_CRC("TargetManagerService", 0x6d5708bc));
|
||||
required.push_back(AZ_CRC("AssetProcessorToolsConnection", 0x734669bc));
|
||||
required.push_back(AZ_CRC("AssetDatabaseService", 0x3abf5601));
|
||||
required.push_back(AZ_CRC("PropertyManagerService", 0x63a3d7ad));
|
||||
@@ -135,31 +134,16 @@ namespace MaterialEditor
|
||||
m_documentMap.clear();
|
||||
MaterialDocumentSystemRequestBus::Handler::BusConnect();
|
||||
MaterialDocumentNotificationBus::Handler::BusConnect();
|
||||
AzFramework::TmMsgBus::Handler::BusConnect(AZ_CRC("OpenInMaterialEditor", 0x9f92aac8));
|
||||
}
|
||||
|
||||
void MaterialDocumentSystemComponent::Deactivate()
|
||||
{
|
||||
AZ::TickBus::Handler::BusDisconnect();
|
||||
AzFramework::TmMsgBus::Handler::BusDisconnect();
|
||||
MaterialDocumentNotificationBus::Handler::BusDisconnect();
|
||||
MaterialDocumentSystemRequestBus::Handler::BusDisconnect();
|
||||
m_documentMap.clear();
|
||||
}
|
||||
|
||||
void MaterialDocumentSystemComponent::OnReceivedMsg(AzFramework::TmMsgPtr msg)
|
||||
{
|
||||
if (msg->GetId() == AZ_CRC("OpenInMaterialEditor", 0x9f92aac8))
|
||||
{
|
||||
const char* documentPath = reinterpret_cast<const char*>(msg->GetCustomBlob());
|
||||
MaterialDocumentSystemRequestBus::Broadcast(&MaterialDocumentSystemRequestBus::Events::OpenDocument, documentPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ_Assert(false, "We received a message of an unrecognized class type!");
|
||||
}
|
||||
}
|
||||
|
||||
AZ::Uuid MaterialDocumentSystemComponent::CreateDocument()
|
||||
{
|
||||
auto document = AZStd::make_unique<MaterialDocument>();
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <AzCore/std/smart_ptr/shared_ptr.h>
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
#include <AzFramework/TargetManagement/TargetManagementAPI.h>
|
||||
|
||||
#include <Atom/Document/MaterialDocumentNotificationBus.h>
|
||||
#include <Atom/Document/MaterialDocumentSystemRequestBus.h>
|
||||
@@ -35,7 +34,6 @@ namespace MaterialEditor
|
||||
class MaterialDocumentSystemComponent
|
||||
: public AZ::Component
|
||||
, private AZ::TickBus::Handler
|
||||
, private AzFramework::TmMsgBus::Handler
|
||||
, private MaterialDocumentNotificationBus::Handler
|
||||
, private MaterialDocumentSystemRequestBus::Handler
|
||||
{
|
||||
@@ -72,11 +70,6 @@ namespace MaterialEditor
|
||||
void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// AzFramework::TmMsgBus::Handler overrides...
|
||||
void OnReceivedMsg(AzFramework::TmMsgPtr msg) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// MaterialDocumentSystemRequestBus::Handler overrides...
|
||||
AZ::Uuid CreateDocument() override;
|
||||
|
||||
Reference in New Issue
Block a user