Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Niflib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Niflib
Commits
9b75b5aa
Commit
9b75b5aa
authored
13 years ago
by
Alecu100
Browse files
Options
Downloads
Patches
Plain Diff
fixed a bug in the complex shape because of which normals weren't imported into maya
parent
c37e0f6a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/ComplexShape.h
+1
-4
1 addition, 4 deletions
include/ComplexShape.h
src/ComplexShape.cpp
+32
-2
32 additions, 2 deletions
src/ComplexShape.cpp
with
33 additions
and
6 deletions
include/ComplexShape.h
+
1
−
4
View file @
9b75b5aa
...
...
@@ -5,11 +5,9 @@ All rights reserved. Please see niflib.h for license. */
#define _COMPLEX_SHAPE_H_
#include
"Ref.h"
#include
"obj/BSDismemberSkinInstance.h"
#include
"obj/NiSkinPartition.h"
#include
"nif_math.h"
#include
"nif_basic_types.h"
#include
"
gen/BodyPartList
.h"
#include
"
../include/obj/BSDismemberSkinInstance
.h"
#include
<vector>
namespace
Niflib
{
...
...
@@ -21,7 +19,6 @@ class NiProperty;
class
NiNode
;
class
NiAVObject
;
class
NiTriBasedGeom
;
class
BSDismemberSkinInstance
;
class
NiSkinPartition
;
/*! Marks empty data indices */
...
...
This diff is collapsed.
Click to expand it.
src/ComplexShape.cpp
+
32
−
2
View file @
9b75b5aa
...
...
@@ -15,9 +15,16 @@ All rights reserved. Please see niflib.h for license. */
#include
"../include/obj/NiSkinData.h"
#include
"../include/obj/NiTextureProperty.h"
#include
"../include/gen/SkinWeight.h"
#include
"../include/obj/NiSkinPartition.h"
#include
"../include/gen/BodyPartList.h"
#include
"../include/obj/BSShaderTextureSet.h"
#include
"../include/obj/BSLightingShaderProperty.h"
#include
<stdlib.h>
using
namespace
Niflib
;
//Wrape these in the Niflib namespace so they don't polute the Class View
...
...
@@ -379,13 +386,32 @@ void ComplexShape::Merge( NiAVObject * root ) {
if
(
niProp
!=
NULL
)
{
niTexProp
=
DynamicCast
<
NiTextureProperty
>
(
niProp
);
}
BSShaderTextureSetRef
bsTexProp
=
NULL
;
niProp
=
(
*
geom
)
->
GetPropertyByType
(
BSShaderTextureSet
::
TYPE
);
if
(
niProp
!=
NULL
)
{
bsTexProp
=
DynamicCast
<
BSShaderTextureSet
>
(
niProp
);
}
niProp
=
(
*
geom
)
->
getBsProperties
()[
0
];
if
(
niProp
!=
NULL
&&
niProp
->
GetType
().
IsSameType
(
BSLightingShaderProperty
::
TYPE
))
{
BSLightingShaderPropertyRef
bs_shader
=
DynamicCast
<
BSLightingShaderProperty
>
(
niProp
);
if
(
bs_shader
->
getTextureSet
()
!=
NULL
)
{
bsTexProp
=
bs_shader
->
getTextureSet
();
}
}
niProp
=
(
*
geom
)
->
getBsProperties
()[
1
];
if
(
niProp
!=
NULL
&&
niProp
->
GetType
().
IsSameType
(
BSLightingShaderProperty
::
TYPE
))
{
BSLightingShaderPropertyRef
bs_shader
=
DynamicCast
<
BSLightingShaderProperty
>
(
niProp
);
if
(
bs_shader
->
getTextureSet
()
!=
NULL
)
{
bsTexProp
=
bs_shader
->
getTextureSet
();
}
}
//Create a list of UV sets to check
//pair.first = Texture Type
//pair.second = UV Set ID
vector
<
pair
<
TexType
,
unsigned
int
>
>
uvSets
;
if
(
shapeUVs
.
size
()
!=
0
&&
(
niTexingProp
!=
NULL
||
niTexProp
!=
NULL
)
)
{
if
(
shapeUVs
.
size
()
!=
0
&&
(
niTexingProp
!=
NULL
||
niTexProp
!=
NULL
||
bsTexProp
!=
NULL
)
)
{
if
(
niTexingProp
!=
NULL
)
{
//Add the UV set to the list for every type of texture slot that uses it
for
(
int
tex
=
0
;
tex
<
8
;
++
tex
)
{
...
...
@@ -396,7 +422,7 @@ void ComplexShape::Merge( NiAVObject * root ) {
uvSets
.
push_back
(
pair
<
TexType
,
unsigned
int
>
(
TexType
(
tex
),
td
.
uvSet
)
);
}
}
}
else
if
(
niTexProp
!=
NULL
)
{
}
else
if
(
niTexProp
!=
NULL
||
bsTexProp
!=
NULL
)
{
//Add the base UV set to the list and just use zero.
uvSets
.
push_back
(
pair
<
TexType
,
unsigned
int
>
(
BASE_MAP
,
0
)
);
}
...
...
@@ -619,6 +645,10 @@ void ComplexShape::Merge( NiAVObject * root ) {
}
}
}
for
(
int
x
=
0
;
x
<
current_body_parts_faces
.
size
();
x
++
)
{
dismemberPartitionsFaces
.
push_back
(
current_body_parts_faces
[
x
]);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment