From cc96203fd07b2630e748b295a031357948dfb412 Mon Sep 17 00:00:00 2001
From: Shon Ferguson <shonferg@users.sourceforge.net>
Date: Sun, 25 Jun 2006 00:37:33 +0000
Subject: [PATCH] Added a simple function to get the controller data from
 NiControllerSequence.

---
 obj/NiControllerSequence.cpp | 5 ++++-
 obj/NiControllerSequence.h   | 8 +++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/obj/NiControllerSequence.cpp b/obj/NiControllerSequence.cpp
index cc2e79d3..97810102 100644
--- a/obj/NiControllerSequence.cpp
+++ b/obj/NiControllerSequence.cpp
@@ -130,7 +130,7 @@ void NiControllerSequence::AddInterpolator( const Ref<NiSingleInterpolatorContro
 	controlledBlocks.push_back( cl );
 }
 
-void NiControllerSequence::ClearChildren() {
+void NiControllerSequence::ClearControllerData() {
 	
 	throw runtime_error("The AddInterpolator function cannot be implemented until prolems in the XML are solved.");
 
@@ -138,4 +138,7 @@ void NiControllerSequence::ClearChildren() {
 	controlledBlocks.clear();
 }
 
+vector<ControllerLink> NiControllerSequence::GetControllerData() const {
+	return controlledBlocks;
+}
 
diff --git a/obj/NiControllerSequence.h b/obj/NiControllerSequence.h
index 026042e0..e9bd23a0 100644
--- a/obj/NiControllerSequence.h
+++ b/obj/NiControllerSequence.h
@@ -66,7 +66,13 @@ public:
 	/*! Removes all controllers and interpolators from this Kf file root object.
 	 * \sa NiControllerSequence::AddController, NiControllersequence::AddInterpolator
 	 */
-	void ClearChildren();
+	void ClearControllerData();
+
+	/*! Retrieves the data for the controllers or interpolators which are attached to this controller sequence.
+	 * \return A vector containing the data for all controllers.
+	 * \sa NiControllerSequence::AddController, NiControllersequence::AddInterpolator, ClearKfChildren
+	 */
+	vector<ControllerLink> GetControllerData() const;
 
 protected:
 	NiControllerManager * NiControllerSequence::Parent() const;
-- 
GitLab