Editors::cEditor class

Main class for editors.

A single instance of this class exists during the whole game, and is used for all editors (except the Adventure editor, that one uses App::cScenarioMode); you can access it with the Editor macro.

Base classes

class App::IGameMode
An interface that represents a mode in the game, that can receive mouse/keyboard input and update every frame.
class Graphics::IRenderable
This interface defines an object that can be rendered, and whose render method is called on every game loop.
class UI::IHintConditioner
class INameableEntity
class App::IMessageListener
An interface that can receive messages sent through the app.
class DefaultRefCounted
The default implementation of a reference counted class.

Public functions

void SetEditorModel(EditorModel* pEditorModel)
Changes the current editor model, updating the creation with the parts and paints of the new editor model.
auto GetEditorModel() const -> EditorModel*
Get current editor model, which is the creation with the parts and paints.
void CommitEditHistory(bool arg1, EditorStateEditHistory* pStateHistory = nullptr)
Adds an edit history (undo/redo) entry based on the current model of the editor.
void Undo(bool, bool)
void Redo()
auto IsMode(Mode mode) const -> bool
Returns true if the editor is currently in the given mode.
auto IsActive() const -> bool
Returns true if the editor is currently active.
auto GetCamera() -> EditorCamera*
auto sub_581F70(EditorRigblock* part, void* activeHandle, int value) -> bool
void RemovePart(EditorRigblock* part)

Public variables

int vftable_1C
IGameModeManagerPtr mpGameModeMgr
The App::IGameModeManager that holds this editor.
PropertyListPtr mpPropList
The App::PropertyList that contains the configuration of the current editor.
Math::Point mCursor
The current position of the cursor in the editor.
int mMouseFlags
MouseState mMouseState
bool field_38
int field_3C
int field_40
int field_44
int field_48
int field_4C
int field_50
int field_54
int field_58
int field_5C
int field_60
int field_64
float field_68
float mCreatureIdleActivationTime
Time to wait before starting animated creature (in milliseconds).
float field_70
bool field_74
EditorUI* mpEditorUI
EditorPlayMode* mpPlayMode
ILightingWorldPtr mpLightingWorld
THe light to be used by the editor.
IModelWorldPtr mpPedestalModelWorld
The model world that contains the pedestal and test environment model.
IModelWorldPtr field_88
IModelWorldPtr mpBackgroundModelWorld
The model world that contains the background model.
int field_90
IEffectWorldPtr mpEffectWorld
EditorModel* mpEditorModel
int field_9C
ModelPtr mpPedestalModel
The model to be used for the pedestal in the editor. It belongs to mpPedestalModelWorld.
ModelPtr mpTestEnvironmentModel
The model to be used for the test environment in the editor. It belongs mpPedestalModelWorld.
ModelPtr mpBackgroundModel
The model to be used for the background in the editor. It belongs to mpBackgroundModelWorld.
ModelPtr mpAccBackgroundModel
A background model used in accessories editors. It belongs to mpBackgroundModelWorld.
string16 field_B0
int field_C0
int field_C4
int field_C8
EditorRigblockPtr mpActivePart
Rigblock that is being hovered, and where actions like mouse wheel scaling will be applied.
EditorRigblockPtr mpMovingPart
EditorRigblockPtr mpSelectedPart
DefaultRefCountedPtr field_D8
DefaultRefCountedPtr field_DC
bool field_E0
EditorBaseHandle* mpActiveHandle
bool mbMouseIsInSkin
Is the mouse over the skin of the creature?
bool field_E9
int field_EC
int field_F0
int field_F4
char _padding_F8
bool field_140
bool field_141
bool field_142
bool field_143
bool field_144
ObjectPtr field_148
int field_14C
intrusive_ptr<Object> field_150
int field_154
int field_158
just guesses, apparently it calls DefaultRefCounted.Unuse()
int field_15C
vector<intrusive_ptr<EditorStateEditHistory>> mStateEditHistory
vector<cEditorResourcePtr> mEditHistory
int mEditHistoryIndex
uint32_t mEditorName
The ID of the .prop configuration file of the current editor.
bool mbTransitionHideUI
bool mbTransitionCenterCamera
uint32_t mTransitionAnimationID
int field_198
uint32_t mTransitionEffectID
int field_1A0
int field_1A4
int field_1A8
int field_1AC
map<uint32_t, uint32_t> mDefaultEditors
Maps a creation format extension to its default editor. For example, 'crt' is mapped to 'CreatureEditorExtraLarge'.
EditorRequestPtr mEditorRequest
ResourceKey mParentAssetKey
string16 field_1DC
int field_1EC
int field_1F0
int field_1F4
uint32_t mCameraThumbnailID
Thumbnail camera, when editor asset is saved, this is the camera used to generate the thumbnail.
uint32_t mCameraPaletteID
Palette camera, this is the camera that will be used to take thumbnails and display 3d swatches in the editor.
ResourceKey mCurrencyIconName
Key to png icon for editor currency.
char16_t mCurrencyChar
Unicode character for editor currency.
bool field_20D
bool mbBackgroundMusic
Whether a background music is played or not.
uint32_t mBackgroundMusicPatchID
The key to the sound patch to play for the background music.
uint32_t mTutorialPartModeID
Instance ID for part mode tutorial.
uint32_t mTutorialPlayModeID
Instance ID for play mode tutorial.
uint32_t mTutorialPaintModeID
Instance ID for paint mode tutorial.
int field_220
int field_224
int field_228
int field_22C
int field_230
int field_234
int field_238
int field_23C
int field_240
int field_244
int field_248
int field_24C
int field_250
int field_254
int field_258
int field_25C
int field_260
int field_264
int field_268
int field_26C
int field_270
int field_274
uint32_t mPlayModeEntryEffectID
uint32_t mPlayModeExitEffectID
uint32_t mSkyBoxEffectID
The ID for the sky box effect.
int field_284
float field_288
int field_28C
int field_290
IShadowManagerPtr mpShadowManager
Graphics::ShadowMapInfo* mpShadowMapInfo
int field_29C
int field_2A0
int field_2A4
uint32_t mSaveExtension
The save extension key which will be parsed both into a key and a three letter extension.
uint32_t mSaveDirectory
The save directory key.
bool mIsActive
char field_2B1
bool mbShowVertebrae
char field_2B3
char field_2B4
bool mbDisableCreatureAnimIK
float mBoundSize
The width of the space that the model skin is constrained to.
float mFeetBoundSize
The width of the space that the feet are constrained to.
float mMinHeight
The base of the cylinder.
float mfMaxHeight
The height of te cylinder.
float mMinPlayableWidth
Minimum width a model has to be to be playable.
float mMinPlayableDepth
Minimum depth a model has to be to be playable.
float mMinPlayableHeight
Minimum height a model has to be to be playable.
float mMinimumLeglessCreatureHeight
The minimum height a legless creature is allowed to be on load.
uint32_t mViewableComplexityFlags
Which complexity limits to show in meter, possible values in the ComplexityFlags enum.
int mComplexityLimit
Maximum complexity of blocks allowed in this editor.
int mBoneComplexityLimit
Maximum bone complexity of blocks allowed in this editor.
int mMaxBakedBlocks
Maximum number of baked blocks allowed in this editor.
int field_2E8
float mMaxGeomScore
Maximum geometric score (from vertices/indices) allowed in this editor.
bool mbCellPinningToRigBlocks
bool mbUseSkin
bool mbUseSpine
bool mbInitSpine
bool field_2F4
bool mbAllowAsymmetry
bool mbOnlyEditFromPalette
bool mbMoveModelToGround
bool mbMoveModelToCenterOfMass
bool mbUseBoundsForDelete
Has the editor use the bounds as a deletion option.
bool editorTranslateModelOnSave
uint32_t mSporepediaConfigID
The ID for the sporepedia config to launch from the editor.
uint32_t mSporepediaCanSwitchConfigID
The ID for the sporepedia config to launch from the editor when you can switch editors.
uint32_t mModelTranslationOptions
Translation flags.
int field_308
int field_30C
bool mbPreserveLineage
Whether to save the parent key to newly saved assets.
float field_314
uint32_t field_318
Mode mMode
vector<uint32_t> mEnabledManipulators
vector<uint32_t> mModelTypes
The list of model types that this editor supports, ie. VehicleMilitaryAir, VehicleEconomicLand, BuildingIndustry, BuildingHouse, etc.
int field_348
int mnDefaultBrainLevel
int field_350
int field_354
EditorNamePanelPtr mpEditorNamePanel
int field_35C
int field_360
int field_364
int field_368
vector<int> field_36C
DefaultRefCountedPtr field_380
bool field_384
bool field_385
int field_388
int field_38C
int field_390
bool field_394
bool field_395
bool field_396
bool field_397
bool field_398
bool field_399
bool field_39A
vector<int> field_39C
float field_3B0
int field_3B4
PaletteMainPtr mpPartsPalette
PaletteUIPtr mpPartsPaletteUI
PaletteMainPtr mpPaintPalette
PaletteUIPtr mpPaintPaletteUI
bool field_3C8
bool field_3C9
App::cViewer* field_3CC
App::cViewer* field_3D0
App::cViewer* field_3D4
App::cViewer* field_3D8
App::cViewer* field_3DC
bool field_3E0
bool field_3E1
int field_3E4
int field_3E8
int field_3EC
int field_3F0
int field_3F4
int field_3F8
int field_3FC
int field_400
int field_404
int field_408
int field_40C
int field_410
int field_414
int field_418
int field_41C
int field_420
int field_424
int field_428
int field_42C
bool field_430
StdEditorLimitsPtr mpEditorLimits
int field_438
int field_43C
int field_440
int field_444
int field_448
int field_44C
int field_450
map<int, int> field_454
bool field_470
bool mbShowBoneLengthHandles
Tells the editor whether or not to show the bone length handle.
bool field_472
float field_474
float mfMouseWheelTimeout
The amount of idle time it takes for a mouse wheel operation to register finished.
float mfMouseWheelDistanceThreshold
The distance the mouse has to travel for a mouse wheel operation to register finished.
float field_480
float field_484
float mAnimationInterruptDistance
The distance the mouse has to travel to interrupt a reactive animation.
int field_48C
int field_490
int field_494
int field_498
int field_49C
int field_4A0
int field_4A4
int field_4A8
int mRenderingQuality
bool field_4B0
bool field_4B1
bool field_4B2
bool field_4B3
bool field_4B4
bool field_4B5
bool field_4B6
bool mbModelForceSaveOver
bool mbModelCopyConsequence
bool mbModelSaveLastChild
int field_4BC
int field_4C0
int field_4C4
bool field_4C8
bool field_4C9
int field_4CC
float field_4D0
int field_4D4
int field_4D8
int field_4DC
int field_4E0
int field_4E4
vector<int> field_508
vector<int> field_51C
vector<int> field_530
vector<int> field_544
vector<int> field_558
vector<int> field_56C
int field_580
int field_584
vector<int> field_588
uint32_t mDaisType
Used by audio system to play different footsteps based on type of material used in the dais construction.
float mfDaisRadius
Used by audio system to determine if foot is on dais or floor.
int field_5A4
Clock field_5A8
int field_5C0
int field_5C4
int field_5C8
int field_5CC
int field_5D0
int field_5D4
int field_5D8
int field_5DC
int field_5E0
int field_5E4
int field_5E8
int field_5EC
int field_5F0
int field_5F4
int field_5F8
int field_5FC

Function documentation

void Editors::cEditor::SetEditorModel(EditorModel* pEditorModel)

Changes the current editor model, updating the creation with the parts and paints of the new editor model.


void Editors::cEditor::CommitEditHistory(bool arg1, EditorStateEditHistory* pStateHistory = nullptr)

Adds an edit history (undo/redo) entry based on the current model of the editor.


bool Editors::cEditor::IsMode(Mode mode) const

Returns true if the editor is currently in the given mode.

mode Either build, paint or play mode.

Variable documentation

int Editors::cEditor::field_158

just guesses, apparently it calls DefaultRefCounted.Unuse()