From 3408a0a838b7ca52b3c36a483ebbf1e9b24666cb Mon Sep 17 00:00:00 2001 From: acgessler Date: Wed, 2 Oct 2013 01:39:59 +0200 Subject: [PATCH] Blender: iterative loading code for the linked list of scene objects, fixes #28 but is preliminary as it touches code that is normally machine-generated. --- code/BlenderDNA.h | 28 +++++++++------ code/BlenderDNA.inl | 80 ++++++++++++++++++++++++++++--------------- code/BlenderScene.cpp | 43 ++++++++++++++++++----- 3 files changed, 105 insertions(+), 46 deletions(-) diff --git a/code/BlenderDNA.h b/code/BlenderDNA.h index 2eeaee97a..b4733f385 100644 --- a/code/BlenderDNA.h +++ b/code/BlenderDNA.h @@ -278,19 +278,23 @@ public: // -------------------------------------------------------- // field parsing for pointer or dynamic array types // (boost::shared_ptr or boost::shared_array) + // The return value indicates whether the data was already cached. template class TOUT, typename T> - void ReadFieldPtr(TOUT& out, const char* name, - const FileDatabase& db) const; + bool ReadFieldPtr(TOUT& out, const char* name, + const FileDatabase& db, + bool non_recursive = false) const; // -------------------------------------------------------- // field parsing for static arrays of pointer or dynamic // array types (boost::shared_ptr[] or boost::shared_array[]) + // The return value indicates whether the data was already cached. template class TOUT, typename T, size_t N> - void ReadFieldPtr(TOUT (&out)[N], const char* name, + bool ReadFieldPtr(TOUT (&out)[N], const char* name, const FileDatabase& db) const; // -------------------------------------------------------- // field parsing for `normal` values + // The return value indicates whether the data was already cached. template void ReadField(T& out, const char* name, const FileDatabase& db) const; @@ -299,17 +303,18 @@ private: // -------------------------------------------------------- template