mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
fix datablock display to sync to selected instance.
tie in frame selector frontend
This commit is contained in:
parent
82435693dd
commit
3c7b16306d
3 changed files with 30 additions and 4 deletions
|
|
@ -74,7 +74,8 @@ function ActionEditNodeDetails::doit(%this)
|
||||||
%pos = getwords(%this.newTransformData,0,2);
|
%pos = getwords(%this.newTransformData,0,2);
|
||||||
%tan = getwords(%this.newTransformData,3,5);
|
%tan = getwords(%this.newTransformData,3,5);
|
||||||
%size = getword(%this.newTransformData,6);
|
%size = getword(%this.newTransformData,6);
|
||||||
%uvID = DecalEditorGui.getDecalFrame(%this.instanceId);
|
//%uvID = DecalEditorGui.getDecalFrame(%this.instanceId);
|
||||||
|
%uvID = DecalEditorDetailContainer-->frame.getText();
|
||||||
DecalEditorGui.editDecalDetails( %this.instanceId, %pos, %tan, %size, %uvID );
|
DecalEditorGui.editDecalDetails( %this.instanceId, %pos, %tan, %size, %uvID );
|
||||||
DecalEditorGui.syncNodeDetails();
|
DecalEditorGui.syncNodeDetails();
|
||||||
DecalEditorGui.selectDecal( %this.instanceId );
|
DecalEditorGui.selectDecal( %this.instanceId );
|
||||||
|
|
|
||||||
|
|
@ -677,7 +677,7 @@ $guiContent = new GuiDecalEditorCtrl(DecalEditorGui) {
|
||||||
|
|
||||||
new GuiContainer(DecalEditorDetailContainer){
|
new GuiContainer(DecalEditorDetailContainer){
|
||||||
Position = "0 202";
|
Position = "0 202";
|
||||||
Extent = "202 79";
|
Extent = "202 100";
|
||||||
HorizSizing = "width";
|
HorizSizing = "width";
|
||||||
VertSizing = "bottom";
|
VertSizing = "bottom";
|
||||||
isContainer = "1";
|
isContainer = "1";
|
||||||
|
|
@ -753,6 +753,24 @@ $guiContent = new GuiDecalEditorCtrl(DecalEditorGui) {
|
||||||
Extent = "128 18";
|
Extent = "128 18";
|
||||||
text = "";
|
text = "";
|
||||||
};
|
};
|
||||||
|
new GuiTextCtrl(){
|
||||||
|
Profile = "ToolsGuiTextRightProfile";
|
||||||
|
HorizSizing = "right";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
Position = "3 80";
|
||||||
|
Extent = "47 16";
|
||||||
|
text = "frame";
|
||||||
|
};
|
||||||
|
new GuiTextEditCtrl(){ // instance frame
|
||||||
|
Profile = "ToolsGuiTextEditProfile";
|
||||||
|
internalName = "frame";
|
||||||
|
HorizSizing = "width";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
AltCommand = "DecalEditorGui.editNodeDetails();";
|
||||||
|
Position = "54 80";
|
||||||
|
Extent = "128 18";
|
||||||
|
text = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -291,6 +291,9 @@ function DecalEditorGui::onSelectInstance( %this, %decalId, %lookupName )
|
||||||
%item = DecalEditorTreeView.findItemByName( %name );
|
%item = DecalEditorTreeView.findItemByName( %name );
|
||||||
DecalEditorTreeView.selectItem( %item );
|
DecalEditorTreeView.selectItem( %item );
|
||||||
DecalEditorGui.syncNodeDetails();
|
DecalEditorGui.syncNodeDetails();
|
||||||
|
|
||||||
|
%dbListID = DecalDataList.findItemText(%lookupName);
|
||||||
|
DecalDataList.setCurSel( %dbListID );
|
||||||
}
|
}
|
||||||
|
|
||||||
function DecalEditorGui::onCreateInstance( %this, %decalId, %lookupName )
|
function DecalEditorGui::onCreateInstance( %this, %decalId, %lookupName )
|
||||||
|
|
@ -363,6 +366,7 @@ function DecalEditorGui::syncNodeDetails( %this )
|
||||||
DecalEditorDetailContainer-->nodePosition.setText(getWords(%transformData, 0, 2));
|
DecalEditorDetailContainer-->nodePosition.setText(getWords(%transformData, 0, 2));
|
||||||
DecalEditorDetailContainer-->nodeTangent.setText(getWords(%transformData, 3, 5));
|
DecalEditorDetailContainer-->nodeTangent.setText(getWords(%transformData, 3, 5));
|
||||||
DecalEditorDetailContainer-->nodeSize.setText(getWord(%transformData, 6));
|
DecalEditorDetailContainer-->nodeSize.setText(getWord(%transformData, 6));
|
||||||
|
DecalEditorDetailContainer-->frame.setText(DecalEditorGui.getDecalFrame(DecalEditorGui.selDecalInstanceId));
|
||||||
}
|
}
|
||||||
|
|
||||||
function DecalEditorGui::paletteSync( %this, %mode )
|
function DecalEditorGui::paletteSync( %this, %mode )
|
||||||
|
|
@ -387,6 +391,7 @@ function DecalDataList::onSelect( %this, %id, %text )
|
||||||
|
|
||||||
//Canvas.pushDialog( DecalEditDlg );
|
//Canvas.pushDialog( DecalEditDlg );
|
||||||
DecalInspector.inspect( %data );
|
DecalInspector.inspect( %data );
|
||||||
|
DecalEditorDetailContainer-->frame.setText(%obj.frame);
|
||||||
DecalEditorGui.updateDecalPreview( %data.materialAsset );
|
DecalEditorGui.updateDecalPreview( %data.materialAsset );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -562,6 +567,8 @@ function DecalInspector::onInspectorFieldModified( %this, %object, %fieldName, %
|
||||||
// Same work to do as for the regular WorldEditor Inspector.
|
// Same work to do as for the regular WorldEditor Inspector.
|
||||||
Inspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue );
|
Inspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue );
|
||||||
|
|
||||||
|
warn( "modified "@ DecalEditorGui.selDecalInstanceId); //this is an array id, not an objectid
|
||||||
|
|
||||||
if (%oldValue != %newValue || %oldValue !$= %newValue)
|
if (%oldValue != %newValue || %oldValue !$= %newValue)
|
||||||
%this.setDirty(%object);
|
%this.setDirty(%object);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue