Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c52a70ab2a4..f1d9223b3c5 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1346,6 +1346,24 @@ static void test_pointer_array(FileData *fd, void **mat)
void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd);
void IDP_LibLinkProperty(IDProperty *prop, int switch_endian, FileData *fd);
+static void IDP_DirectLinkIDPArray(IDProperty *prop, int switch_endian, FileData *fd)
+{
+ IDProperty **array;
+ int i;
+
+ /*since we didn't save the extra buffer, set totallen to len.*/
+ prop->totallen = prop->len;
+ prop->data.pointer = newdataadr(fd, prop->data.pointer);
+
+ if (switch_endian) {
+ test_pointer_array(fd, prop->data.pointer);
+ array= (IDProperty**) prop->data.pointer;
+
+ for(i=0; i<prop->len; i++)
+ IDP_DirectLinkProperty(array[i], switch_endian, fd);
+ }
+}
+
static void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, FileData *fd)
{
IDProperty **array;
@@ -1407,6 +1425,9 @@ void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
case IDP_ARRAY:
IDP_DirectLinkArray(prop, switch_endian, fd);
break;
+ case IDP_IDPARRAY:
+ IDP_DirectLinkIDPArray(prop, switch_endian, fd);
+ break;
case IDP_DOUBLE:
/*erg, stupid doubles. since I'm storing them
in the same field as int val; val2 in the