mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
Load all containers to uv editor if drawables is set to preview al
This commit is contained in:
parent
9e61c677ed
commit
89ce65908c
1 changed files with 16 additions and 11 deletions
|
@ -92,12 +92,16 @@ namespace Toolbox.Library
|
|||
}
|
||||
}
|
||||
|
||||
public DrawableContainer GetActiveContainer()
|
||||
public List<DrawableContainer> GetActiveContainers()
|
||||
{
|
||||
if (drawContainersCB.SelectedIndex - 1 < 0)
|
||||
if (drawContainersCB.SelectedIndex < 0)
|
||||
return null;
|
||||
|
||||
return DrawableContainers[drawContainersCB.SelectedIndex - 1];
|
||||
if (drawContainersCB.SelectedIndex == 0 || DisplayAll)
|
||||
return DrawableContainers;
|
||||
|
||||
return new List<DrawableContainer>()
|
||||
{ DrawableContainers[drawContainersCB.SelectedIndex - 1], };
|
||||
}
|
||||
|
||||
//Reloads drawable containers with the active container selected
|
||||
|
@ -590,10 +594,12 @@ namespace Toolbox.Library
|
|||
if (!Runtime.UseOpenGL)
|
||||
return;
|
||||
|
||||
var container = GetActiveContainer();
|
||||
if (container == null) return;
|
||||
var containers = GetActiveContainers();
|
||||
if (containers.Count == 0) return;
|
||||
|
||||
List<STGenericObject> meshes = new List<STGenericObject>();
|
||||
foreach (var container in containers)
|
||||
{
|
||||
for (int i = 0; i < container.Drawables.Count; i++)
|
||||
{
|
||||
if (container.Drawables[i] is IMeshContainer && container.Drawables[i].Visible)
|
||||
|
@ -602,8 +608,7 @@ namespace Toolbox.Library
|
|||
meshes.Add(((IMeshContainer)container.Drawables[i]).Meshes[m]);
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine($"MeshCount " + meshes.Count);
|
||||
}
|
||||
|
||||
if (meshes.Count > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue