mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-22 23:12:59 +08:00
List and render DrawableArray (damaged) models for fragments in ModelForm (and VehicleForm)
This commit is contained in:
parent
e0bd87f51c
commit
6268298207
@ -616,6 +616,17 @@ namespace CodeWalker.GameFiles
|
|||||||
assign(PhysicsLODGroup.PhysicsLOD2);
|
assign(PhysicsLODGroup.PhysicsLOD2);
|
||||||
assign(PhysicsLODGroup.PhysicsLOD3);
|
assign(PhysicsLODGroup.PhysicsLOD3);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (DrawableArray?.data_items != null)
|
||||||
|
{
|
||||||
|
foreach (var arrd in DrawableArray.data_items)
|
||||||
|
{
|
||||||
|
assigndr(arrd, null, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AssignChildrenSkeletonsAndBounds()
|
public void AssignChildrenSkeletonsAndBounds()
|
||||||
|
@ -991,6 +991,26 @@ namespace CodeWalker.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fdarr = fdrawable.OwnerFragment?.DrawableArray?.data_items;
|
||||||
|
if (fdarr != null)
|
||||||
|
{
|
||||||
|
var fdnames = fdrawable.OwnerFragment?.DrawableArrayNames?.data_items;
|
||||||
|
for (int i = 0; i < fdarr.Length; i++)
|
||||||
|
{
|
||||||
|
var arrd = fdarr[i];
|
||||||
|
if ((arrd != null) && (arrd.AllModels?.Length > 0))
|
||||||
|
{
|
||||||
|
var dname = ((fdnames != null) && (i < fdnames.Length)) ? fdnames[i]?.Value : arrd.Name;
|
||||||
|
if (string.IsNullOrEmpty(dname)) dname = "(No name)";
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.High, dname + " - High Detail", false);
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.Med, dname + " - Medium Detail", false);
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.Low, dname + " - Low Detail", false);
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.VLow, dname + " - Very Low Detail", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,26 @@ namespace CodeWalker.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fdarr = fdrawable.OwnerFragment?.DrawableArray?.data_items;
|
||||||
|
if (fdarr != null)
|
||||||
|
{
|
||||||
|
var fdnames = fdrawable.OwnerFragment?.DrawableArrayNames?.data_items;
|
||||||
|
for (int i = 0; i < fdarr.Length; i++)
|
||||||
|
{
|
||||||
|
var arrd = fdarr[i];
|
||||||
|
if ((arrd != null) && (arrd.AllModels?.Length > 0))
|
||||||
|
{
|
||||||
|
var dname = ((fdnames != null) && (i < fdnames.Length)) ? fdnames[i]?.Value : arrd.Name;
|
||||||
|
if (string.IsNullOrEmpty(dname)) dname = "(No name)";
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.High, dname + " - High Detail");
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.Med, dname + " - Medium Detail");
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.Low, dname + " - Low Detail");
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.VLow, dname + " - Very Low Detail");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2729,6 +2729,21 @@ namespace CodeWalker.Rendering
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool isselected = SelectionFlagsTestAll || (f.Drawable == SelectedDrawable);
|
||||||
|
if (isselected)
|
||||||
|
{
|
||||||
|
var darr = f.DrawableArray?.data_items;
|
||||||
|
if (darr != null)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < darr.Length; i++)
|
||||||
|
{
|
||||||
|
RenderDrawable(darr[i], arch, ent, txdhash, null, null, animClip);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,6 +659,26 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fdarr = fdrawable.OwnerFragment?.DrawableArray?.data_items;
|
||||||
|
if (fdarr != null)
|
||||||
|
{
|
||||||
|
var fdnames = fdrawable.OwnerFragment?.DrawableArrayNames?.data_items;
|
||||||
|
for (int i = 0; i < fdarr.Length; i++)
|
||||||
|
{
|
||||||
|
var arrd = fdarr[i];
|
||||||
|
if ((arrd != null) && (arrd.AllModels?.Length > 0))
|
||||||
|
{
|
||||||
|
var dname = ((fdnames != null) && (i < fdnames.Length)) ? fdnames[i]?.Value : arrd.Name;
|
||||||
|
if (string.IsNullOrEmpty(dname)) dname = "(No name)";
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.High, dname + " - High Detail", false);
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.Med, dname + " - Medium Detail", false);
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.Low, dname + " - Low Detail", false);
|
||||||
|
AddDrawableModelsTreeNodes(arrd.DrawableModels?.VLow, dname + " - Very Low Detail", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user