mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Implements misc fixes for the particle editor and particlesList inspector field
- Clicking the [...] button from the Particle Emitter tab now opens to the Particle tab *and* properly selects the particle data to be edited - Selecting an emitter object in the map and opening the particle editor now selects the Particle Data to be edited - Selecting a new Particle Data for a particles slot on a Particle Emitter in the editor now correctly updates the values and updates the field display - Made it so if clicking [...] button on the ParticleEmitterData or other similar fields for objects, it will now open to the Particle editor instead of the Datablock editor
This commit is contained in:
parent
12dddd07b5
commit
defbaea2fe
7 changed files with 145 additions and 45 deletions
|
|
@ -111,6 +111,19 @@ function DatablockEditorPlugin::onExitMission( %this )
|
|||
|
||||
function DatablockEditorPlugin::openDatablock( %this, %datablock )
|
||||
{
|
||||
//We want to do a special-case catch here for any datablock types that have their own unique editor.
|
||||
//The main culprit is the particle editor, but this could be expanded later
|
||||
if(%datablock.isMemberOfClass("ParticleData") ||
|
||||
%datablock.isMemberOfClass("ParticleEmitterData") ||
|
||||
%datablock.isMemberOfClass("ExplosionData") ||
|
||||
%datablock.isMemberOfClass("RibbonData") ||
|
||||
%datablock.isMemberOfClass("afxZodiacData") ||
|
||||
%datablock.isMemberOfClass("afxChoreographerData"))
|
||||
{
|
||||
EditorGui.setEditor( ParticleEditorPlugin );
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGui.setEditor( DatablockEditorPlugin );
|
||||
%this.selectDatablock( %datablock );
|
||||
DatablockEditorTreeTabBook.selectedPage = 0;
|
||||
|
|
@ -631,6 +644,21 @@ function DatablockEditorPlugin::deleteDatablock( %this )
|
|||
//---------------------------------------------------------------------------------------------
|
||||
function DatablockEditorPlugin::createNewDatablockOfType(%this, %class, %inheritFrom)
|
||||
{
|
||||
//We want to do a special-case catch here for any datablock types that have their own unique editor.
|
||||
//The main culprit is the particle editor, but this could be expanded later
|
||||
if(%class.isMemberOfClass("ParticleData") ||
|
||||
%class.isMemberOfClass("ParticleEmitterData") ||
|
||||
%class.isMemberOfClass("ExplosionData") ||
|
||||
%class.isMemberOfClass("RibbonData") ||
|
||||
%class.isMemberOfClass("afxZodiacData") ||
|
||||
%class.isMemberOfClass("afxChoreographerData"))
|
||||
{
|
||||
EditorGui.setEditor( ParticleEditorPlugin );
|
||||
|
||||
ParticleEditorPlugin::createNewDatablockOfType(%class, %inheritFrom);
|
||||
return;
|
||||
}
|
||||
|
||||
$DATABLOCK_EDITOR_NEWDB_CLASS = %class;
|
||||
$DATABLOCK_EDITOR_NEWDB_INHERITFROM = %inheritFrom;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue