Skip to content
Snippets Groups Projects
Commit 831bdd63 authored by Tazpn's avatar Tazpn
Browse files

nif.xml: Update defaults and add NiGeometry Accessors

parent 8e46bf6b
No related branches found
No related tags found
No related merge requests found
......@@ -153,6 +153,18 @@ public:
*/
NIFLIB_API bool IsSkin();
// Active Material.
// \return The current value.
NIFLIB_API int GetActiveMaterial() const;
// Active Material.
// \param[in] value The new value.
NIFLIB_API void SetActiveMaterial( int value );
// Shader.
// \return The current value.
NIFLIB_API bool HasShader() const;
//--END CUSTOM CODE--//
protected:
/*! Data index (NiTriShapeData/NiTriStripData). */
......
......@@ -24,7 +24,7 @@ using namespace Niflib;
//Definition of TYPE constant
const Type NiGeometry::TYPE("NiGeometry", &NiAVObject::TYPE );
NiGeometry::NiGeometry() : data(NULL), skinInstance(NULL), numMaterials((unsigned int)0), activeMaterial((int)-1), hasShader(false), unknownInteger((int)0), unknownByte((byte)255), dirtyFlag(false) {
NiGeometry::NiGeometry() : data(NULL), skinInstance(NULL), numMaterials((unsigned int)0), activeMaterial((int)0), hasShader(false), unknownInteger((int)0), unknownByte((byte)255), dirtyFlag(false) {
//--BEGIN CONSTRUCTOR CUSTOM CODE--//
//--END CUSTOM CODE--//
}
......@@ -541,4 +541,17 @@ void NiGeometry::SetBoneWeights( unsigned int bone_index, const vector<SkinWeigh
skinData->SetBoneWeights( bone_index, n, center, radius );
}
int NiGeometry::GetActiveMaterial() const {
return activeMaterial;
}
void NiGeometry::SetActiveMaterial( int value ) {
activeMaterial = value;
}
bool NiGeometry::HasShader() const {
return hasShader;
}
//--END CUSTOM CODE--//
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment