1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Fix generating custom skinning index list for gfbmdl

This commit is contained in:
KillzXGaming 2019-12-20 17:23:50 -05:00
parent c2ac556a13
commit 1eab95f3c4
5 changed files with 31 additions and 5 deletions

View File

@ -70,7 +70,7 @@ namespace FirstPlugin
#endregion
public Type[] Types
{
{
get
{
List<Type> types = new List<Type>();
@ -104,7 +104,7 @@ namespace FirstPlugin
for (int i = 0; i < anim.Triggers.Value.TriggersLength; i++)
AnimationData.LoadTriggerGroup(anim.Triggers.Value.Triggers(i).Value);
}
}
}
public void Unload()
{

View File

@ -384,7 +384,7 @@ namespace FirstPlugin
{
//Reset bone as rigid
var node = (GFLXBone)Model.Skeleton.bones[i];
/* node.Bone.RigidCheck = new BoneRigidData() { Unknown1 = 0 };
node.Bone.RigidCheck = new BoneRigidData() { Unknown1 = 0 };
if (node.Bone.BoneType == 1)
node.Bone.BoneType = 0;
@ -396,7 +396,7 @@ namespace FirstPlugin
node.Bone.BoneType = 1;
node.Bone.RigidCheck = null;
}
}*/
}
if (Model.GenericMeshes.Any(x => x.Text == node.Text))
{

View File

@ -201,11 +201,30 @@ namespace FirstPlugin
}
}
public class GFLXMaterialAnimController
{
public Dictionary<string, bool> SwitchParams = new Dictionary<string, bool>();
public Dictionary<string, float> ValueParams = new Dictionary<string, float>();
public Dictionary<string, OpenTK.Vector3> ColorParams = new Dictionary<string, OpenTK.Vector3>();
public bool IsVisible { get; set; } = true;
public void ResetAnims()
{
ColorParams.Clear();
SwitchParams.Clear();
ValueParams.Clear();
IsVisible = true;
}
}
public class GFLXMaterialData : STGenericMaterial, IContextMenuNode
{
private Material Material;
public GFLXModel ParentModel;
public GFLXMaterialAnimController AnimController = new GFLXMaterialAnimController();
public Dictionary<string, GFLXSwitchParam> SwitchParams = new Dictionary<string, GFLXSwitchParam>();
public Dictionary<string, GFLXValueParam> ValueParams = new Dictionary<string, GFLXValueParam>();
public Dictionary<string, GFLXColorParam> ColorParams = new Dictionary<string, GFLXColorParam>();

View File

@ -6,6 +6,11 @@ bin/pokemon/pm0000_00/
bin/pokemon/pm0000_00/tex/
bin/pokemon/pm0000_00/anm/
bin/pokemon/pm0000_00/mdl/
bin/pokemon_data/
bin/graphics/mask_texture/pattern_01/
bin/app/pokecamp/cooking/common_model/anm/
bin/app/pokecamp/cooking/common_model/mdl/
bin/app/pokecamp/cooking/common_model/
bin/chara/data/pc/p2/p1_base_app01/anm/
pm0000_00.gfbpokecfg
pm0000_00.gfbmdl

View File

@ -203,7 +203,9 @@ namespace Toolbox.Library.Forms
if (meshesCB.SelectedIndex >= 0)
{
uvViewport1.ActiveObjects.Clear();
uvViewport1.ActiveObjects.Add(Objects[meshesCB.SelectedIndex]);
if (Objects.Count > meshesCB.SelectedIndex)
uvViewport1.ActiveObjects.Add(Objects[meshesCB.SelectedIndex]);
ActiveMaterial = Materials[meshesCB.SelectedIndex];