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
4fe94f6a
Commit
4fe94f6a
authored
18 years ago
by
Shon Ferguson
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a few errors in niflib.cpp by adding a GetName function to NiObjectNET.
parent
f8d80e68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
niflib.cpp
+3
-3
3 additions, 3 deletions
niflib.cpp
obj/NiObjectNET.cpp
+9
-0
9 additions, 0 deletions
obj/NiObjectNET.cpp
obj/NiObjectNET.h
+3
-0
3 additions, 0 deletions
obj/NiObjectNET.h
with
15 additions
and
3 deletions
niflib.cpp
+
3
−
3
View file @
4fe94f6a
...
@@ -729,7 +729,7 @@ void MapParentNodeNames( map<string,NiAVObjectRef> & name_map, NiAVObjectRef par
...
@@ -729,7 +729,7 @@ void MapParentNodeNames( map<string,NiAVObjectRef> & name_map, NiAVObjectRef par
//}
//}
//Add the par node to the map, and then call this function for each of its children
//Add the par node to the map, and then call this function for each of its children
name_map
[
par
->
n
ame
]
=
par
;
name_map
[
par
->
GetN
ame
()
]
=
par
;
//TODO: Implement functions to get and set children
//TODO: Implement functions to get and set children
list
<
NiAVObjectRef
>
links
;
// = par->GetAttr("Children")->asLinkList();;
list
<
NiAVObjectRef
>
links
;
// = par->GetAttr("Children")->asLinkList();;
...
@@ -761,7 +761,7 @@ void ReassignTreeCrossRefs( map<string,NiAVObjectRef> & name_map, NiAVObjectRef
...
@@ -761,7 +761,7 @@ void ReassignTreeCrossRefs( map<string,NiAVObjectRef> & name_map, NiAVObjectRef
//existing nodes by changing their data or attatched properties
//existing nodes by changing their data or attatched properties
void
MergeSceneGraph
(
map
<
string
,
NiAVObjectRef
>
&
name_map
,
const
NiAVObjectRef
&
root
,
NiAVObjectRef
par
)
{
void
MergeSceneGraph
(
map
<
string
,
NiAVObjectRef
>
&
name_map
,
const
NiAVObjectRef
&
root
,
NiAVObjectRef
par
)
{
//Check if this block's name exists in the block map
//Check if this block's name exists in the block map
string
name
=
par
->
n
ame
;
string
name
=
par
->
GetN
ame
()
;
if
(
name_map
.
find
(
name
)
!=
name_map
.
end
()
)
{
if
(
name_map
.
find
(
name
)
!=
name_map
.
end
()
)
{
//This block already exists in the original file, so continue on to its children
//This block already exists in the original file, so continue on to its children
...
@@ -809,7 +809,7 @@ void MergeSceneGraph( map<string,NiAVObjectRef> & name_map, const NiAVObjectRef
...
@@ -809,7 +809,7 @@ void MergeSceneGraph( map<string,NiAVObjectRef> & name_map, const NiAVObjectRef
//par_par->GetAttr("Children")->RemoveLinks( par );
//par_par->GetAttr("Children")->RemoveLinks( par );
//Get the block to attatch to
//Get the block to attatch to
NiObjectRef
attatch
=
DynamicCast
<
NiObject
>
(
name_map
[
par_par
->
n
ame
]);
NiObjectRef
attatch
=
DynamicCast
<
NiObject
>
(
name_map
[
par_par
->
GetN
ame
()
]);
//TODO: Implement children
//TODO: Implement children
////Add this block as new child
////Add this block as new child
...
...
This diff is collapsed.
Click to expand it.
obj/NiObjectNET.cpp
+
9
−
0
View file @
4fe94f6a
...
@@ -27,3 +27,12 @@ string NiObjectNET::asString( bool verbose ) const {
...
@@ -27,3 +27,12 @@ string NiObjectNET::asString( bool verbose ) const {
void
NiObjectNET
::
FixLinks
(
const
vector
<
NiObjectRef
>
&
objects
,
list
<
uint
>
link_stack
,
unsigned
int
version
)
{
void
NiObjectNET
::
FixLinks
(
const
vector
<
NiObjectRef
>
&
objects
,
list
<
uint
>
link_stack
,
unsigned
int
version
)
{
NI_OBJECT_N_E_T_FIXLINKS
NI_OBJECT_N_E_T_FIXLINKS
}
}
string
NiObjectNET
::
GetName
()
{
return
name
;
}
void
NiObjectNET
::
SetName
(
string
&
new_name
)
{
name
=
new_name
;
}
This diff is collapsed.
Click to expand it.
obj/NiObjectNET.h
+
3
−
0
View file @
4fe94f6a
...
@@ -24,6 +24,9 @@ public:
...
@@ -24,6 +24,9 @@ public:
virtual
void
Write
(
ostream
&
out
,
map
<
NiObjectRef
,
uint
>
link_map
,
unsigned
int
version
)
const
;
virtual
void
Write
(
ostream
&
out
,
map
<
NiObjectRef
,
uint
>
link_map
,
unsigned
int
version
)
const
;
virtual
string
asString
(
bool
verbose
=
false
)
const
;
virtual
string
asString
(
bool
verbose
=
false
)
const
;
virtual
void
FixLinks
(
const
vector
<
NiObjectRef
>
&
objects
,
list
<
uint
>
link_stack
,
unsigned
int
version
);
virtual
void
FixLinks
(
const
vector
<
NiObjectRef
>
&
objects
,
list
<
uint
>
link_stack
,
unsigned
int
version
);
string
GetName
();
void
SetName
(
string
&
new_name
);
//TODO: pointer to extra data type... find out what that is. AExtraData right now. Need functions to add/remove.
//TODO: pointer to extra data type... find out what that is. AExtraData right now. Need functions to add/remove.
//TODO: pointer to first NiTimeController type. Need functions to add/remove.
//TODO: pointer to first NiTimeController type. Need functions to add/remove.
private:
private:
...
...
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