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
23b93679
Commit
23b93679
authored
19 years ago
by
Shon Ferguson
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug in TargetControllerAttr.
Added IsController function.
parent
57908221
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
NIF_Blocks.h
+2
-0
2 additions, 0 deletions
NIF_Blocks.h
nif_attrs.h
+5
-1
5 additions, 1 deletion
nif_attrs.h
niflib.h
+1
-0
1 addition, 0 deletions
niflib.h
with
8 additions
and
1 deletion
NIF_Blocks.h
+
2
−
0
View file @
23b93679
...
@@ -84,6 +84,7 @@ public:
...
@@ -84,6 +84,7 @@ public:
vector
<
attr_ref
>
GetAttrs
();
vector
<
attr_ref
>
GetAttrs
();
int
GetBlockNum
()
{
return
_block_num
;
}
int
GetBlockNum
()
{
return
_block_num
;
}
bool
IsControllable
()
{
return
false
;
}
bool
IsControllable
()
{
return
false
;
}
bool
IsController
()
{
return
false
;
}
string
asString
();
string
asString
();
//Links
//Links
...
@@ -195,6 +196,7 @@ class AController : public ABlock {
...
@@ -195,6 +196,7 @@ class AController : public ABlock {
public:
public:
AController
();
AController
();
void
Init
()
{}
void
Init
()
{}
bool
IsController
()
{
return
true
;
}
~
AController
()
{}
~
AController
()
{}
};
};
...
...
This diff is collapsed.
Click to expand it.
nif_attrs.h
+
5
−
1
View file @
23b93679
...
@@ -1268,7 +1268,7 @@ public:
...
@@ -1268,7 +1268,7 @@ public:
ReadUInt
(
in
);
ReadUInt
(
in
);
}
}
void
WriteAttr
(
ofstream
&
out
,
unsigned
int
version
)
{
void
WriteAttr
(
ofstream
&
out
,
unsigned
int
version
)
{
WriteUInt
(
_owner
->
GetParen
t
()
->
GetBlockNum
(),
out
);
WriteUInt
(
FindTarge
t
()
->
GetBlockNum
(),
out
);
}
}
blk_ref
FindTarget
()
const
{
blk_ref
FindTarget
()
const
{
//Find first ancestor that is controllable
//Find first ancestor that is controllable
...
@@ -1301,6 +1301,8 @@ public:
...
@@ -1301,6 +1301,8 @@ public:
return
out
.
str
();
return
out
.
str
();
}
}
blk_ref
asLink
()
const
{
return
FindTarget
();
}
blk_ref
asLink
()
const
{
return
FindTarget
();
}
void
Set
(
blk_ref
&
)
{
throw
runtime_error
(
"The attribute you tried to set is calculated automatically. You cannot change it directly."
);
}
};
};
class
SkeletonRootAttr
:
public
AAttr
{
class
SkeletonRootAttr
:
public
AAttr
{
...
@@ -1355,6 +1357,8 @@ public:
...
@@ -1355,6 +1357,8 @@ public:
return
out
.
str
();
return
out
.
str
();
}
}
blk_ref
asLink
()
const
{
return
FindRoot
();
}
blk_ref
asLink
()
const
{
return
FindRoot
();
}
void
Set
(
blk_ref
&
)
{
throw
runtime_error
(
"The attribute you tried to set is calculated automatically. You cannot change it directly."
);
}
private
:
private
:
int
original_root
;
int
original_root
;
};
};
...
...
This diff is collapsed.
Click to expand it.
niflib.h
+
1
−
0
View file @
23b93679
...
@@ -455,6 +455,7 @@ public:
...
@@ -455,6 +455,7 @@ public:
virtual
string
asString
()
=
0
;
virtual
string
asString
()
=
0
;
virtual
string
GetBlockType
()
=
0
;
virtual
string
GetBlockType
()
=
0
;
virtual
bool
IsControllable
()
=
0
;
virtual
bool
IsControllable
()
=
0
;
virtual
bool
IsController
()
=
0
;
//Attribute Functions
//Attribute Functions
virtual
attr_ref
GetAttr
(
string
attr_name
)
=
0
;
virtual
attr_ref
GetAttr
(
string
attr_name
)
=
0
;
...
...
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