Skip to content

Commit ea10a15

Browse files
committed
Add FindModelForComponent
1 parent 44186cf commit ea10a15

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

CathodeLib/Scripts/CATHODE/Models.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,16 @@ public CS2.Component FindModelComponentForSubmesh(CS2.Component.LOD.Submesh subm
615615
return null;
616616
}
617617
/// <summary>
618+
/// Find a model for a component
619+
/// </summary>
620+
public CS2 FindModelForComponent(CS2.Component component)
621+
{
622+
for (int i = 0; i < Entries.Count; i++)
623+
if (Entries[i].Components.Contains(component))
624+
return Entries[i];
625+
return null;
626+
}
627+
/// <summary>
618628
/// Find a LOD that contains a given submesh
619629
/// </summary>
620630
public CS2.Component.LOD FindModelLODForSubmesh(CS2.Component.LOD.Submesh submesh)

0 commit comments

Comments
 (0)