holding pen for refactor
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
+24
-24
@@ -25,58 +25,58 @@ namespace MaterialEditor
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
|
||||
|
||||
//! Signal that a material document was created
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document was created
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentCreated([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document was destroyed
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document was destroyed
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentDestroyed([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document was opened
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document was opened
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentOpened([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document was closed
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document was closed
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentClosed([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document was saved
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document was saved
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentSaved([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document was selected
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document was selected
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentSelected([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document was modified
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document was modified
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentModified([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document dependency was modified
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document dependency was modified
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentDependencyModified([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document was modified externally
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document was modified externally
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentExternallyModified([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material document undo state was updated
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a document undo state was updated
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
virtual void OnDocumentUndoStateChanged([[maybe_unused]] const AZ::Uuid& documentId) {}
|
||||
|
||||
//! Signal that a material property changed
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! Signal that a property changed
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
//! @param property object containing the property value and configuration that was modified
|
||||
virtual void OnDocumentPropertyValueModified([[maybe_unused]] const AZ::Uuid& documentId, [[maybe_unused]] const AtomToolsFramework::DynamicProperty& property) {}
|
||||
|
||||
//! Signal that the property configuration has been changed.
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
//! @param property object containing the property value and configuration that was modified
|
||||
virtual void OnDocumentPropertyConfigModified([[maybe_unused]] const AZ::Uuid& documentId, [[maybe_unused]] const AtomToolsFramework::DynamicProperty& property) {}
|
||||
|
||||
//! Signal that the property group visibility has been changed.
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! @param documentId unique id of document for which the notification is sent
|
||||
//! @param groupId id of the group that changed
|
||||
//! @param visible whether the property group is visible
|
||||
virtual void OnDocumentPropertyGroupVisibilityChanged([[maybe_unused]] const AZ::Uuid& documentId, [[maybe_unused]] const AZ::Name& groupId, [[maybe_unused]] bool visible) {}
|
||||
|
||||
+16
-16
@@ -39,10 +39,10 @@ namespace MaterialEditor
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
|
||||
typedef AZ::Uuid BusIdType;
|
||||
|
||||
//! Get absolute path of material source file
|
||||
//! Get absolute path of document
|
||||
virtual AZStd::string_view GetAbsolutePath() const = 0;
|
||||
|
||||
//! Get relative path of material source file
|
||||
//! Get relative path of document
|
||||
virtual AZStd::string_view GetRelativePath() const = 0;
|
||||
|
||||
//! Get material asset created by MaterialDocument
|
||||
@@ -72,52 +72,52 @@ namespace MaterialEditor
|
||||
//! Modify material property value
|
||||
virtual void SetPropertyValue(const AZ::Name& propertyFullName, const AZStd::any& value) = 0;
|
||||
|
||||
//! Load source material and related data
|
||||
//! @param loadPath Absolute path of material to load
|
||||
//! Load document and related data
|
||||
//! @param loadPath Absolute path of document to load
|
||||
virtual bool Open(AZStd::string_view loadPath) = 0;
|
||||
|
||||
//! Reload document preserving edits
|
||||
virtual bool Rebuild() = 0;
|
||||
|
||||
//! Save material to source file
|
||||
//! Save document to file
|
||||
virtual bool Save() = 0;
|
||||
|
||||
//! Save material to a new source file
|
||||
//! @param savePath Absolute path where material is saved
|
||||
//! Save document copy
|
||||
//! @param savePath Absolute path where document is saved
|
||||
virtual bool SaveAsCopy(AZStd::string_view savePath) = 0;
|
||||
|
||||
//! Save material to a new source file as a child of the open material
|
||||
//! @param savePath Absolute path where material is saved
|
||||
virtual bool SaveAsChild(AZStd::string_view savePath) = 0;
|
||||
|
||||
//! Close material document and reset its data
|
||||
//! Close document and reset its data
|
||||
virtual bool Close() = 0;
|
||||
|
||||
//! Material is loaded
|
||||
//! document is loaded
|
||||
virtual bool IsOpen() const = 0;
|
||||
|
||||
//! Material has changes pending
|
||||
//! document has changes pending
|
||||
virtual bool IsModified() const = 0;
|
||||
|
||||
//! Can the document be saved
|
||||
virtual bool IsSavable() const = 0;
|
||||
|
||||
//! Returns true if there are reversible modifications to the material document
|
||||
//! Returns true if there are reversible modifications to the document
|
||||
virtual bool CanUndo() const = 0;
|
||||
|
||||
//! Returns true if there are changes that were reversed and can be re-applied to the material document
|
||||
//! Returns true if there are changes that were reversed and can be re-applied to the document
|
||||
virtual bool CanRedo() const = 0;
|
||||
|
||||
//! Restores the previous state of the material document
|
||||
//! Restores the previous state of the document
|
||||
virtual bool Undo() = 0;
|
||||
|
||||
//! Restores the next state of the material document
|
||||
//! Restores the next state of the document
|
||||
virtual bool Redo() = 0;
|
||||
|
||||
//! Signal that property editing is about to begin, like beginning to drag a slider control
|
||||
//! Signal that editing is about to begin, like beginning to drag a slider control
|
||||
virtual bool BeginEdit() = 0;
|
||||
|
||||
//! Signal that property editing has completed, like after releasing the mouse button after continuously dragging a slider control
|
||||
//! Signal that editing has completed, like after releasing the mouse button after continuously dragging a slider control
|
||||
virtual bool EndEdit() = 0;
|
||||
};
|
||||
|
||||
|
||||
+20
-20
@@ -23,53 +23,53 @@ namespace MaterialEditor
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
|
||||
//! Create a material document object
|
||||
//! @return Uuid of new material document, or null Uuid if failed
|
||||
//! Create a document object
|
||||
//! @return Uuid of new document, or null Uuid if failed
|
||||
virtual AZ::Uuid CreateDocument() = 0;
|
||||
|
||||
//! Destroy a material document object with the specified id
|
||||
//! Destroy a document object with the specified id
|
||||
//! @return true if Uuid was found and removed, otherwise false
|
||||
virtual bool DestroyDocument(const AZ::Uuid& documentId) = 0;
|
||||
|
||||
//! Open a material document for editing
|
||||
//! @param sourcePath material document to open.
|
||||
//! @return unique id of new material document if successful, otherwise null Uuid
|
||||
//! Open a document for editing
|
||||
//! @param sourcePath document to open.
|
||||
//! @return unique id of new document if successful, otherwise null Uuid
|
||||
virtual AZ::Uuid OpenDocument(AZStd::string_view sourcePath) = 0;
|
||||
|
||||
//! Create a new document by specifying a source and prompting the user for destination path.
|
||||
//! If the source file is a material type then this results in creating a new material based on that type.
|
||||
//! If the source file is a material this results in creating a child material with the source file as its parent.
|
||||
//! @param sourcePath material document to open.
|
||||
//! @param sourcePath document to open.
|
||||
//! @param targetPath location where document is saved.
|
||||
//! @return unique id of new material document if successful, otherwise null Uuid
|
||||
//! @return unique id of new document if successful, otherwise null Uuid
|
||||
virtual AZ::Uuid CreateDocumentFromFile(AZStd::string_view sourcePath, AZStd::string_view targetPath) = 0;
|
||||
|
||||
//! Close the specified material document
|
||||
//! @param documentId unique id of material document to close
|
||||
//! Close the specified document
|
||||
//! @param documentId unique id of document to close
|
||||
virtual bool CloseDocument(const AZ::Uuid& documentId) = 0;
|
||||
|
||||
//! Close all material documents
|
||||
//! Close all documents
|
||||
virtual bool CloseAllDocuments() = 0;
|
||||
|
||||
//! Close all material documents except for documentId
|
||||
//! @param documentId unique id of material document to not close
|
||||
//! Close all documents except for documentId
|
||||
//! @param documentId unique id of document to not close
|
||||
virtual bool CloseAllDocumentsExcept(const AZ::Uuid& documentId) = 0;
|
||||
|
||||
//! Save the specified material document
|
||||
//! @param documentId unique id of material document to save
|
||||
//! Save the specified document
|
||||
//! @param documentId unique id of document to save
|
||||
virtual bool SaveDocument(const AZ::Uuid& documentId) = 0;
|
||||
|
||||
//! Save the specified material document to a different file
|
||||
//! @param documentId unique id of material document to save
|
||||
//! Save the specified document to a different file
|
||||
//! @param documentId unique id of document to save
|
||||
//! @param targetPath location where document is saved.
|
||||
virtual bool SaveDocumentAsCopy(const AZ::Uuid& documentId, AZStd::string_view targetPath) = 0;
|
||||
|
||||
//! Save the specified material document to a different file, referencing the original material as its parent
|
||||
//! @param documentId unique id of material document to save
|
||||
//! Save the specified document to a different file, referencing the original material as its parent
|
||||
//! @param documentId unique id of document to save
|
||||
//! @param targetPath location where document is saved.
|
||||
virtual bool SaveDocumentAsChild(const AZ::Uuid& documentId, AZStd::string_view targetPath) = 0;
|
||||
|
||||
//! Save all material documents
|
||||
//! Save all documents
|
||||
virtual bool SaveAllDocuments() = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user