mirror of https://github.com/AxioDL/metaforce.git
added multiple material sets to addon
This commit is contained in:
parent
3c5b5fd39a
commit
0da7ab7e01
|
@ -776,7 +776,7 @@ bool ReadCMDLToBlender(HECL::BlenderConnection& conn,
|
||||||
"obj = bpy.data.objects.new(mesh.name, mesh)\n"
|
"obj = bpy.data.objects.new(mesh.name, mesh)\n"
|
||||||
"obj.show_transparent = True\n"
|
"obj.show_transparent = True\n"
|
||||||
"bpy.context.scene.objects.link(obj)\n"
|
"bpy.context.scene.objects.link(obj)\n"
|
||||||
"mesh.cmdl_material_count = %u\n"
|
"mesh.hecl_material_count = %u\n"
|
||||||
"for material in materials:\n"
|
"for material in materials:\n"
|
||||||
" mesh.materials.append(material)\n"
|
" mesh.materials.append(material)\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
@ -19,7 +19,6 @@ void MaterialSet::RegisterMaterialProps(Stream& out)
|
||||||
"bpy.types.Material.retro_samus_reflection_indirect = bpy.props.BoolProperty(name='Retro: Samus Reflection Indirect Texture')\n"
|
"bpy.types.Material.retro_samus_reflection_indirect = bpy.props.BoolProperty(name='Retro: Samus Reflection Indirect Texture')\n"
|
||||||
"bpy.types.Material.retro_lightmapped = bpy.props.BoolProperty(name='Retro: Lightmapped')\n"
|
"bpy.types.Material.retro_lightmapped = bpy.props.BoolProperty(name='Retro: Lightmapped')\n"
|
||||||
"bpy.types.Material.retro_lightmap = bpy.props.StringProperty(name='Retro: Lightmap')\n"
|
"bpy.types.Material.retro_lightmap = bpy.props.StringProperty(name='Retro: Lightmap')\n"
|
||||||
"bpy.types.Mesh.cmdl_material_count = bpy.props.IntProperty(name='CMDL: Material Count')\n"
|
|
||||||
"\n";
|
"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ struct MaterialSet : BigDNA
|
||||||
} flags;
|
} flags;
|
||||||
Value<atUint32> groupIdx;
|
Value<atUint32> groupIdx;
|
||||||
Value<atUint32> unk1;
|
Value<atUint32> unk1;
|
||||||
DNAMP1::MaterialSet::Material::VAFlags vaFlags;
|
VAFlags vaFlags;
|
||||||
Value<atUint32> unk2;
|
Value<atUint32> unk2;
|
||||||
Value<atUint32> unk3;
|
Value<atUint32> unk3;
|
||||||
Value<atUint32> unk4;
|
Value<atUint32> unk4;
|
||||||
|
|
|
@ -34,8 +34,7 @@ struct SpecMP1 : SpecBase
|
||||||
m_cookPath(project.getProjectCookedPath(SpecEntMP1), _S("MP1")),
|
m_cookPath(project.getProjectCookedPath(SpecEntMP1), _S("MP1")),
|
||||||
m_pakRouter(*this, m_workPath, m_cookPath) {}
|
m_pakRouter(*this, m_workPath, m_cookPath) {}
|
||||||
|
|
||||||
void buildPaks(HECL::Database::Project& project,
|
void buildPaks(NOD::DiscBase::IPartition::Node& root,
|
||||||
NOD::DiscBase::IPartition::Node& root,
|
|
||||||
const std::vector<HECL::SystemString>& args,
|
const std::vector<HECL::SystemString>& args,
|
||||||
ExtractReport& rep)
|
ExtractReport& rep)
|
||||||
{
|
{
|
||||||
|
@ -91,7 +90,7 @@ struct SpecMP1 : SpecBase
|
||||||
}
|
}
|
||||||
|
|
||||||
if (good)
|
if (good)
|
||||||
m_paks.emplace_back(project, child);
|
m_paks.emplace_back(m_project, child);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +138,7 @@ struct SpecMP1 : SpecBase
|
||||||
|
|
||||||
/* Iterate PAKs and build level options */
|
/* Iterate PAKs and build level options */
|
||||||
NOD::DiscBase::IPartition::Node& root = partition->getFSTRoot();
|
NOD::DiscBase::IPartition::Node& root = partition->getFSTRoot();
|
||||||
buildPaks(m_project, root, args, rep);
|
buildPaks(root, args, rep);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +199,7 @@ struct SpecMP1 : SpecBase
|
||||||
NOD::DiscBase::IPartition::Node::DirectoryIterator mp1It = root.find("MP1");
|
NOD::DiscBase::IPartition::Node::DirectoryIterator mp1It = root.find("MP1");
|
||||||
if (mp1It == root.end())
|
if (mp1It == root.end())
|
||||||
return false;
|
return false;
|
||||||
buildPaks(m_project, *mp1It, mp1args, rep);
|
buildPaks(*mp1It, mp1args, rep);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue