mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
DBEditor callback fix for asset fields
This commit is contained in:
parent
32ddf5f791
commit
6355740f6c
|
|
@ -989,24 +989,23 @@ function AssetBrowser::changeAsset(%this)
|
|||
{
|
||||
%inspectorObject = %this.fieldTargetObject;
|
||||
%targetObject = %inspectorObject.getInspectObject();
|
||||
|
||||
%inspectorObject.setObjectField(%this.fieldTargetName, %this.selectedAsset);
|
||||
}
|
||||
|
||||
//alright, we've selectd an asset for a field, so time to set it!
|
||||
if(%this.fieldTargetName $= "")
|
||||
%cmd = %targetObject @ ".apply(\""@ %this.selectedAsset @ "\");";
|
||||
else
|
||||
%cmd = %targetObject @ "." @ %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";";
|
||||
//echo("Changing asset via the " @ %cmd @ " command");
|
||||
eval(%cmd);
|
||||
{
|
||||
//alright, we've selectd an asset for a field, so time to set it!
|
||||
if(%this.fieldTargetName $= "")
|
||||
%cmd = %targetObject @ ".apply(\""@ %this.selectedAsset @ "\");";
|
||||
else
|
||||
%cmd = %targetObject @ "." @ %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";";
|
||||
//echo("Changing asset via the " @ %cmd @ " command");
|
||||
eval(%cmd);
|
||||
}
|
||||
|
||||
//Force update our object with the field change
|
||||
%targetObject.inspectPostApply();
|
||||
|
||||
if(isObject(%inspectorObject))
|
||||
{
|
||||
%inspectorObject.refresh();
|
||||
}
|
||||
|
||||
//Flag us as dirty for editing purposes
|
||||
EWorldEditor.setSceneAsDirty();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue