Skip to content

Commit

Permalink
Updated reference skeletons
Browse files Browse the repository at this point in the history
  • Loading branch information
ousnius committed Oct 30, 2016
1 parent 9557a80 commit 4cf6768
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 72 deletions.
Binary file removed res/GameObjectBlank.nif
Binary file not shown.
Binary file removed res/SkeletonBlank.nif
Binary file not shown.
Binary file modified res/SkeletonBlank_fo4.nif
Binary file not shown.
Binary file added res/SkeletonBlank_sk.nif
Binary file not shown.
Binary file modified res/SkeletonBlank_sse.nif
Binary file not shown.
Binary file added res/skeleton_female_sk.nif
Binary file not shown.
Binary file modified res/skeleton_female_sse.nif
Binary file not shown.
Binary file removed res/skeleton_female_vanilla.nif
Binary file not shown.
Binary file removed res/skeleton_female_xpms.nif
Binary file not shown.
Binary file removed res/skeleton_female_xpmse.nif
Binary file not shown.
Binary file modified res/skeleton_fo4.nif
Binary file not shown.
Binary file added res/skeleton_male_sk.nif
Binary file not shown.
Binary file added res/skeleton_male_sse.nif
Binary file not shown.
12 changes: 6 additions & 6 deletions src/program/BodySlideApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,17 +1043,17 @@ bool BodySlideApp::ShowSetup() {
switch (targ) {
case FO3:
dataDir = dirFallout3->GetDirName();
Config.SetValue("Anim/DefaultSkeletonReference", "res\\skeleton_female_fo3nv.nif");
Config.SetValue("Anim/SkeletonRootName", "Bip");
Config.SetValue("Anim/DefaultSkeletonReference", "res\\skeleton_fo3nv.nif");
Config.SetValue("Anim/SkeletonRootName", "Bip01");
break;
case FONV:
dataDir = dirFalloutNV->GetDirName();
Config.SetValue("Anim/DefaultSkeletonReference", "res\\skeleton_female_fo3nv.nif");
Config.SetValue("Anim/SkeletonRootName", "Bip");
Config.SetValue("Anim/DefaultSkeletonReference", "res\\skeleton_fo3nv.nif");
Config.SetValue("Anim/SkeletonRootName", "Bip01");
break;
case SKYRIM:
dataDir = dirSkyrim->GetDirName();
Config.SetValue("Anim/DefaultSkeletonReference", "res\\skeleton_female_xpmse.nif");
Config.SetValue("Anim/DefaultSkeletonReference", "res\\skeleton_female_sk.nif");
Config.SetValue("Anim/SkeletonRootName", "NPC Root [Root]");
break;
case FO4:
Expand Down Expand Up @@ -2859,7 +2859,7 @@ void BodySlideFrame::OnChooseTargetGame(wxCommandEvent& event) {
choiceSkeletonRoot->SetStringSelection("Bip01");
break;
case SKYRIM:
fpSkeletonFile->SetPath("res\\skeleton_female_xpmse.nif");
fpSkeletonFile->SetPath("res\\skeleton_female_sk.nif");
choiceSkeletonRoot->SetStringSelection("NPC Root [Root]");
break;
case SKYRIMSE:
Expand Down
108 changes: 42 additions & 66 deletions src/program/OutfitProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,24 +466,15 @@ int OutfitProject::AddShapeFromObjFile(const string& fileName, const string& sha


int OutfitProject::CreateNifShapeFromData(const string& shapeName, vector<Vector3>& v, vector<Triangle>& t, vector<Vector2>& uv, vector<Vector3>* norms) {
bool staticMode = Config["StaticMeshMode"] == "True";

string blankSkel;
string defaultName;
if (!staticMode) {
defaultName = "New Outfit";
string defaultName = "New Outfit";

if (owner->targetGame <= SKYRIM)
blankSkel = "res\\SkeletonBlank.nif";
else if (owner->targetGame == FO4)
blankSkel = "res\\SkeletonBlank_fo4.nif";
else if (owner->targetGame == SKYRIMSE)
blankSkel = "res\\SkeletonBlank_sse.nif";
}
else {
blankSkel = "res\\GameObjectBlank.nif";
defaultName = "New Object";
}
if (owner->targetGame <= SKYRIM)
blankSkel = "res\\SkeletonBlank_sk.nif";
else if (owner->targetGame == FO4)
blankSkel = "res\\SkeletonBlank_fo4.nif";
else if (owner->targetGame == SKYRIMSE)
blankSkel = "res\\SkeletonBlank_sse.nif";

NifFile blank;
blank.Load(blankSkel);
Expand All @@ -505,21 +496,18 @@ int OutfitProject::CreateNifShapeFromData(const string& shapeName, vector<Vector
}

int shapeID = blank.GetHeader().AddBlock(nifShapeData, "NiTriShapeData");
int dismemberID = 0xFFFFFFFF;

if (!staticMode) {
NiSkinData* nifSkinData = new NiSkinData(workNif.GetHeader());
int skinID = blank.GetHeader().AddBlock(nifSkinData, "NiSkinData");
NiSkinData* nifSkinData = new NiSkinData(workNif.GetHeader());
int skinID = blank.GetHeader().AddBlock(nifSkinData, "NiSkinData");

NiSkinPartition* nifSkinPartition = new NiSkinPartition(workNif.GetHeader());
int partID = blank.GetHeader().AddBlock(nifSkinPartition, "NiSkinPartition");
NiSkinPartition* nifSkinPartition = new NiSkinPartition(workNif.GetHeader());
int partID = blank.GetHeader().AddBlock(nifSkinPartition, "NiSkinPartition");

BSDismemberSkinInstance* nifDismemberInst = new BSDismemberSkinInstance(workNif.GetHeader());
dismemberID = blank.GetHeader().AddBlock(nifDismemberInst, "BSDismemberSkinInstance");
nifDismemberInst->SetDataRef(skinID);
nifDismemberInst->SetSkinPartitionRef(partID);
nifDismemberInst->SetSkeletonRootRef(0);
}
BSDismemberSkinInstance* nifDismemberInst = new BSDismemberSkinInstance(workNif.GetHeader());
int dismemberID = blank.GetHeader().AddBlock(nifDismemberInst, "BSDismemberSkinInstance");
nifDismemberInst->SetDataRef(skinID);
nifDismemberInst->SetSkinPartitionRef(partID);
nifDismemberInst->SetSkeletonRootRef(0);

BSShaderTextureSet* nifTexset = new BSShaderTextureSet(workNif.GetHeader());

Expand Down Expand Up @@ -558,33 +546,24 @@ int OutfitProject::CreateNifShapeFromData(const string& shapeName, vector<Vector
else if (owner->targetGame == FO4) {
BSTriShape* triShapeBase;
string wetShaderName = "template/OutfitTemplate_Wet.bgsm";
if (staticMode) {
triShapeBase = new BSTriShape(workNif.GetHeader());
triShapeBase->Create(&v, &t, &uv, norms);
blank.GetHeader().AddBlock(triShapeBase, "BSTriShape");
wetShaderName.clear();
}
else {
BSSubIndexTriShape* nifBSTriShape = new BSSubIndexTriShape(workNif.GetHeader());
nifBSTriShape->Create(&v, &t, &uv, norms);
blank.GetHeader().AddBlock(nifBSTriShape, "BSSubIndexTriShape");

BSSkinInstance* nifBSSkinInstance = new BSSkinInstance(workNif.GetHeader());
int skinID = blank.GetHeader().AddBlock(nifBSSkinInstance, "BSSkin::Instance");
nifBSSkinInstance->SetTargetRef(workNif.GetRootNodeID());

BSSkinBoneData* nifBoneData = new BSSkinBoneData(workNif.GetHeader());
int boneID = blank.GetHeader().AddBlock(nifBoneData, "BSSkin::BoneData");
nifBSSkinInstance->SetDataRef(boneID);
nifBSTriShape->SetSkinInstanceRef(skinID);
triShapeBase = nifBSTriShape;
}
BSSubIndexTriShape* nifBSTriShape = new BSSubIndexTriShape(workNif.GetHeader());
nifBSTriShape->Create(&v, &t, &uv, norms);
blank.GetHeader().AddBlock(nifBSTriShape, "BSSubIndexTriShape");

BSSkinInstance* nifBSSkinInstance = new BSSkinInstance(workNif.GetHeader());
int skinID = blank.GetHeader().AddBlock(nifBSSkinInstance, "BSSkin::Instance");
nifBSSkinInstance->SetTargetRef(workNif.GetRootNodeID());

BSSkinBoneData* nifBoneData = new BSSkinBoneData(workNif.GetHeader());
int boneID = blank.GetHeader().AddBlock(nifBoneData, "BSSkin::BoneData");
nifBSSkinInstance->SetDataRef(boneID);
nifBSTriShape->SetSkinInstanceRef(skinID);
triShapeBase = nifBSTriShape;

BSShaderTextureSet* nifTexset = new BSShaderTextureSet(workNif.GetHeader());

int shaderID;
BSLightingShaderProperty* nifShader = new BSLightingShaderProperty(workNif.GetHeader());
shaderID = blank.GetHeader().AddBlock(nifShader, "BSLightingShaderProperty");
int shaderID = blank.GetHeader().AddBlock(nifShader, "BSLightingShaderProperty");
nifShader->textureSetRef = blank.GetHeader().AddBlock(nifTexset, "BSShaderTextureSet");
nifShader->SetWetMaterialName(wetShaderName);

Expand All @@ -596,27 +575,24 @@ int OutfitProject::CreateNifShapeFromData(const string& shapeName, vector<Vector
triShape->Create(&v, &t, &uv, norms);
blank.GetHeader().AddBlock(triShape, "BSTriShape");

if (!staticMode) {
NiSkinData* nifSkinData = new NiSkinData(workNif.GetHeader());
int skinID = blank.GetHeader().AddBlock(nifSkinData, "NiSkinData");
NiSkinData* nifSkinData = new NiSkinData(workNif.GetHeader());
int skinID = blank.GetHeader().AddBlock(nifSkinData, "NiSkinData");

NiSkinPartition* nifSkinPartition = new NiSkinPartition(workNif.GetHeader());
int partID = blank.GetHeader().AddBlock(nifSkinPartition, "NiSkinPartition");
NiSkinPartition* nifSkinPartition = new NiSkinPartition(workNif.GetHeader());
int partID = blank.GetHeader().AddBlock(nifSkinPartition, "NiSkinPartition");

BSDismemberSkinInstance* nifDismemberInst = new BSDismemberSkinInstance(workNif.GetHeader());
int dismemberID = blank.GetHeader().AddBlock(nifDismemberInst, "BSDismemberSkinInstance");
nifDismemberInst->SetDataRef(skinID);
nifDismemberInst->SetSkinPartitionRef(partID);
nifDismemberInst->SetSkeletonRootRef(0);
triShape->SetSkinInstanceRef(dismemberID);
triShape->SetSkinned(true);
}
BSDismemberSkinInstance* nifDismemberInst = new BSDismemberSkinInstance(workNif.GetHeader());
int dismemberID = blank.GetHeader().AddBlock(nifDismemberInst, "BSDismemberSkinInstance");
nifDismemberInst->SetDataRef(skinID);
nifDismemberInst->SetSkinPartitionRef(partID);
nifDismemberInst->SetSkeletonRootRef(0);
triShape->SetSkinInstanceRef(dismemberID);
triShape->SetSkinned(true);

BSShaderTextureSet* nifTexset = new BSShaderTextureSet(workNif.GetHeader());

int shaderID;
BSLightingShaderProperty* nifShader = new BSLightingShaderProperty(workNif.GetHeader());
shaderID = blank.GetHeader().AddBlock(nifShader, "BSLightingShaderProperty");
int shaderID = blank.GetHeader().AddBlock(nifShader, "BSLightingShaderProperty");
nifShader->textureSetRef = blank.GetHeader().AddBlock(nifTexset, "BSShaderTextureSet");

triShape->SetName(shapeName);
Expand Down

0 comments on commit 4cf6768

Please sign in to comment.