Cogs.Core
Public Member Functions | Protected Attributes | List of all members
Cogs::Core::ExportGltfCommand Class Reference
Inheritance diagram for Cogs::Core::ExportGltfCommand:
Cogs::Core::EditorCommand

Public Member Functions

 ExportGltfCommand (EditorState *state, const std::string &path, const std::string &name, bool _exportAsGlb, bool exportAll)
 
virtual void apply () override
 Run the command.
 
virtual void undo () override
 
- Public Member Functions inherited from Cogs::Core::EditorCommand
 EditorCommand (EditorState *state, Context *context)
 
virtual void apply ()=0
 Run the command.
 
virtual void undo ()=0
 
virtual void redo ()
 
virtual bool mergeWith (const EditorCommand *)
 
virtual MeshHandle applyMesh (MeshHandle)
 Workaround for having extendable mesh processing available without linking (e.g command -> RR).
 
virtual void close ()
 Close command, i.e. prevent merging with another command.
 
bool isClosed () const
 
bool merge (const EditorCommand *command)
 Merge into this if not this is closed.
 

Protected Attributes

std::string filePath
 
std::string fileName
 
bool exportAsGlb = false
 
bool exportScene = false
 
- Protected Attributes inherited from Cogs::Core::EditorCommand
EditorStatestate = nullptr
 
Contextcontext = nullptr
 

Additional Inherited Members

- Public Attributes inherited from Cogs::Core::EditorCommand
std::vector< ParsedValueoptions
 Options passed to the command when running in batch mode.
 
bool permanentUndo = false
 True if cannot Redo after Undo.
 

Detailed Description

Definition at line 7 of file ExportGltfCommand.h.

Constructor & Destructor Documentation

◆ ExportGltfCommand()

Cogs::Core::ExportGltfCommand::ExportGltfCommand ( EditorState state,
const std::string &  path,
const std::string &  name,
bool  _exportAsGlb,
bool  exportAll 
)
inline

Definition at line 10 of file ExportGltfCommand.h.

Member Function Documentation

◆ apply()

void Cogs::Core::ExportGltfCommand::apply ( )
overridevirtual

Run the command.

In batch scripts this method is called for all type of commands. In interactive mode this method is not called for model commands (subclasses of ModalEditorCommand)

Implements Cogs::Core::EditorCommand.

Definition at line 36 of file ExportGltfCommand.cpp.

References Cogs::Core::EntityStore::getEntities(), Cogs::Core::EntityStore::getEntityPtr(), and Cogs::Core::Context::store.

◆ undo()

void Cogs::Core::ExportGltfCommand::undo ( )
overridevirtual

Implements Cogs::Core::EditorCommand.

Definition at line 73 of file ExportGltfCommand.cpp.

Member Data Documentation

◆ exportAsGlb

bool Cogs::Core::ExportGltfCommand::exportAsGlb = false
protected

Definition at line 17 of file ExportGltfCommand.h.

◆ exportScene

bool Cogs::Core::ExportGltfCommand::exportScene = false
protected

Definition at line 18 of file ExportGltfCommand.h.

◆ fileName

std::string Cogs::Core::ExportGltfCommand::fileName
protected

Definition at line 16 of file ExportGltfCommand.h.

◆ filePath

std::string Cogs::Core::ExportGltfCommand::filePath
protected

Definition at line 15 of file ExportGltfCommand.h.


The documentation for this class was generated from the following files: