mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
fix datablock display to sync to selected instance.
tie in frame selector frontend
This commit is contained in:
parent
82435693dd
commit
3c7b16306d
|
|
@ -74,7 +74,8 @@ function ActionEditNodeDetails::doit(%this)
|
|||
%pos = getwords(%this.newTransformData,0,2);
|
||||
%tan = getwords(%this.newTransformData,3,5);
|
||||
%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.syncNodeDetails();
|
||||
DecalEditorGui.selectDecal( %this.instanceId );
|
||||
|
|
|
|||
|
|
@ -677,7 +677,7 @@ $guiContent = new GuiDecalEditorCtrl(DecalEditorGui) {
|
|||
|
||||
new GuiContainer(DecalEditorDetailContainer){
|
||||
Position = "0 202";
|
||||
Extent = "202 79";
|
||||
Extent = "202 100";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
isContainer = "1";
|
||||
|
|
@ -753,6 +753,24 @@ $guiContent = new GuiDecalEditorCtrl(DecalEditorGui) {
|
|||
Extent = "128 18";
|
||||
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 );
|
||||
DecalEditorTreeView.selectItem( %item );
|
||||
DecalEditorGui.syncNodeDetails();
|
||||
|
||||
%dbListID = DecalDataList.findItemText(%lookupName);
|
||||
DecalDataList.setCurSel( %dbListID );
|
||||
}
|
||||
|
||||
function DecalEditorGui::onCreateInstance( %this, %decalId, %lookupName )
|
||||
|
|
@ -363,6 +366,7 @@ function DecalEditorGui::syncNodeDetails( %this )
|
|||
DecalEditorDetailContainer-->nodePosition.setText(getWords(%transformData, 0, 2));
|
||||
DecalEditorDetailContainer-->nodeTangent.setText(getWords(%transformData, 3, 5));
|
||||
DecalEditorDetailContainer-->nodeSize.setText(getWord(%transformData, 6));
|
||||
DecalEditorDetailContainer-->frame.setText(DecalEditorGui.getDecalFrame(DecalEditorGui.selDecalInstanceId));
|
||||
}
|
||||
|
||||
function DecalEditorGui::paletteSync( %this, %mode )
|
||||
|
|
@ -386,7 +390,8 @@ function DecalDataList::onSelect( %this, %id, %text )
|
|||
$Tools::materialEditorList = %data.getId();
|
||||
|
||||
//Canvas.pushDialog( DecalEditDlg );
|
||||
DecalInspector.inspect( %data );
|
||||
DecalInspector.inspect( %data );
|
||||
DecalEditorDetailContainer-->frame.setText(%obj.frame);
|
||||
DecalEditorGui.updateDecalPreview( %data.materialAsset );
|
||||
}
|
||||
|
||||
|
|
@ -560,7 +565,9 @@ function DecalInspector::onInspectorFieldModified( %this, %object, %fieldName, %
|
|||
DecalEditorGui.updateDecalPreview( %newValue );
|
||||
|
||||
// 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)
|
||||
%this.setDirty(%object);
|
||||
|
|
|
|||
Loading…
Reference in a new issue