mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-02 03:53:50 +00:00
Merge pull request #1246 from BeamNG/fix_obj_editor_lod
Fix GuiTreeViewCtrl::getParentItem incorrent use in ShapeEditor script files.
This commit is contained in:
commit
67e9119101
2 changed files with 8 additions and 8 deletions
|
|
@ -1132,7 +1132,7 @@ function ShapeEdNodes::onDeleteNode( %this )
|
|||
function ShapeEdNodeTreeView::getChildIndexByName( %this, %name )
|
||||
{
|
||||
%id = %this.findItemByName( %name );
|
||||
%parentId = %this.getParent( %id );
|
||||
%parentId = %this.getParentItem( %id );
|
||||
%childId = %this.getChild( %parentId );
|
||||
if ( %childId <= 0 )
|
||||
return 0; // bad!
|
||||
|
|
@ -2399,7 +2399,7 @@ function ShapeEdDetailTree::onDefineIcons(%this)
|
|||
// a mesh)
|
||||
function ShapeEdDetailTree::isDetailItem( %this, %id )
|
||||
{
|
||||
return ( %this.getParent( %id ) == 1 );
|
||||
return ( %this.getParentItem( %id ) == 1 );
|
||||
}
|
||||
|
||||
// Get the detail level index from the ID of an item in the details tree view
|
||||
|
|
@ -2409,7 +2409,7 @@ function ShapeEdDetailTree::getDetailLevelFromItem( %this, %id )
|
|||
%detSize = %this.getItemValue( %id );
|
||||
|
||||
else
|
||||
%detSize = %this.getItemValue( %this.getParent( %id ) );
|
||||
%detSize = %this.getItemValue( %this.getParentItem( %id ) );
|
||||
return ShapeEditor.shape.getDetailLevelIndex( %detSize );
|
||||
}
|
||||
|
||||
|
|
@ -2443,7 +2443,7 @@ function ShapeEdDetailTree::removeMeshEntry( %this, %name, %size )
|
|||
if ( ShapeEditor.shape.getDetailLevelIndex( %size ) < 0 )
|
||||
{
|
||||
// Last mesh of a detail level has been removed => remove the detail level
|
||||
%this.removeItem( %this.getParent( %id ) );
|
||||
%this.removeItem( %this.getParentItem( %id ) );
|
||||
ShapeEdDetails.update_onDetailsChanged();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1132,7 +1132,7 @@ function ShapeEdNodes::onDeleteNode( %this )
|
|||
function ShapeEdNodeTreeView::getChildIndexByName( %this, %name )
|
||||
{
|
||||
%id = %this.findItemByName( %name );
|
||||
%parentId = %this.getParent( %id );
|
||||
%parentId = %this.getParentItem( %id );
|
||||
%childId = %this.getChild( %parentId );
|
||||
if ( %childId <= 0 )
|
||||
return 0; // bad!
|
||||
|
|
@ -2399,7 +2399,7 @@ function ShapeEdDetailTree::onDefineIcons(%this)
|
|||
// a mesh)
|
||||
function ShapeEdDetailTree::isDetailItem( %this, %id )
|
||||
{
|
||||
return ( %this.getParent( %id ) == 1 );
|
||||
return ( %this.getParentItem( %id ) == 1 );
|
||||
}
|
||||
|
||||
// Get the detail level index from the ID of an item in the details tree view
|
||||
|
|
@ -2409,7 +2409,7 @@ function ShapeEdDetailTree::getDetailLevelFromItem( %this, %id )
|
|||
%detSize = %this.getItemValue( %id );
|
||||
|
||||
else
|
||||
%detSize = %this.getItemValue( %this.getParent( %id ) );
|
||||
%detSize = %this.getItemValue( %this.getParentItem( %id ) );
|
||||
return ShapeEditor.shape.getDetailLevelIndex( %detSize );
|
||||
}
|
||||
|
||||
|
|
@ -2443,7 +2443,7 @@ function ShapeEdDetailTree::removeMeshEntry( %this, %name, %size )
|
|||
if ( ShapeEditor.shape.getDetailLevelIndex( %size ) < 0 )
|
||||
{
|
||||
// Last mesh of a detail level has been removed => remove the detail level
|
||||
%this.removeItem( %this.getParent( %id ) );
|
||||
%this.removeItem( %this.getParentItem( %id ) );
|
||||
ShapeEdDetails.update_onDetailsChanged();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue