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.show_transparent = True\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"
|
||||
" mesh.materials.append(material)\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_lightmapped = bpy.props.BoolProperty(name='Retro: Lightmapped')\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";
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ struct MaterialSet : BigDNA
|
|||
} flags;
|
||||
Value<atUint32> groupIdx;
|
||||
Value<atUint32> unk1;
|
||||
DNAMP1::MaterialSet::Material::VAFlags vaFlags;
|
||||
VAFlags vaFlags;
|
||||
Value<atUint32> unk2;
|
||||
Value<atUint32> unk3;
|
||||
Value<atUint32> unk4;
|
||||
|
|
|
@ -34,8 +34,7 @@ struct SpecMP1 : SpecBase
|
|||
m_cookPath(project.getProjectCookedPath(SpecEntMP1), _S("MP1")),
|
||||
m_pakRouter(*this, m_workPath, m_cookPath) {}
|
||||
|
||||
void buildPaks(HECL::Database::Project& project,
|
||||
NOD::DiscBase::IPartition::Node& root,
|
||||
void buildPaks(NOD::DiscBase::IPartition::Node& root,
|
||||
const std::vector<HECL::SystemString>& args,
|
||||
ExtractReport& rep)
|
||||
{
|
||||
|
@ -91,7 +90,7 @@ struct SpecMP1 : SpecBase
|
|||
}
|
||||
|
||||
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 */
|
||||
NOD::DiscBase::IPartition::Node& root = partition->getFSTRoot();
|
||||
buildPaks(m_project, root, args, rep);
|
||||
buildPaks(root, args, rep);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -200,7 +199,7 @@ struct SpecMP1 : SpecBase
|
|||
NOD::DiscBase::IPartition::Node::DirectoryIterator mp1It = root.find("MP1");
|
||||
if (mp1It == root.end())
|
||||
return false;
|
||||
buildPaks(m_project, *mp1It, mp1args, rep);
|
||||
buildPaks(*mp1It, mp1args, rep);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue