[Bf-blender-cvs] [99b2398] alembic_basic_io: Move cachefile datablock into its own files.

Kévin Dietrich noreply at git.blender.org
Thu Jun 9 14:12:01 CEST 2016


Commit: 99b2398885ccb8ff11cbb0d739ade6af174b16d3
Author: Kévin Dietrich
Date:   Thu Jun 9 14:04:12 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB99b2398885ccb8ff11cbb0d739ade6af174b16d3

Move cachefile datablock into its own files.

===================================================================

M	source/blender/CMakeLists.txt
M	source/blender/alembic/intern/alembic_capi.cc
M	source/blender/blenkernel/intern/constraint.c
M	source/blender/blenkernel/intern/library.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/io/io_cache.c
A	source/blender/makesdna/DNA_cachefile_types.h
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesdna/intern/makesdna.c
M	source/blender/makesrna/intern/CMakeLists.txt
M	source/blender/makesrna/intern/makesrna.c
A	source/blender/makesrna/intern/rna_cachefile.c
M	source/blender/makesrna/intern/rna_internal.h
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/intern/MOD_meshsequencecache.c

===================================================================

diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index 94d64bb..6f2b78e 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -31,6 +31,7 @@ set(SRC_DNA_INC
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_armature_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_boid_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_brush_types.h
+	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_cachefile_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_camera_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_cloth_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_color_types.h
diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc
index 9e75472..019ca4c 100644
--- a/source/blender/alembic/intern/alembic_capi.cc
+++ b/source/blender/alembic/intern/alembic_capi.cc
@@ -37,6 +37,7 @@
 extern "C" {
 #include "MEM_guardedalloc.h"
 
+#include "DNA_cachefile_types.h"
 #include "DNA_modifier_types.h"
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 6e4e3cd..f762ca7 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -46,6 +46,7 @@
 #include "BLT_translation.h"
 
 #include "DNA_armature_types.h"
+#include "DNA_cachefile_types.h"
 #include "DNA_constraint_types.h"
 #include "DNA_modifier_types.h"
 #include "DNA_object_types.h"
@@ -86,6 +87,10 @@
 #  include "BPY_extern.h"
 #endif
 
+#ifdef WITH_ALEMBIC
+#	include "ABC_alembic.h"
+#endif
+
 /* ---------------------------------------------------------------------------- */
 /* Useful macros for testing various common flag combinations */
 
@@ -4335,10 +4340,6 @@ static bConstraintTypeInfo CTI_OBJECTSOLVER = {
 
 /* ----------- Transform Cache ------------- */
 
-#ifdef WITH_ALEMBIC
-#include "ABC_alembic.h"
-#endif
-
 static void transformcache_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
 {
 	bTransformCacheConstraint *data = con->data;
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 03c32ce..43b3653 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -45,6 +45,7 @@
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
 #include "DNA_brush_types.h"
+#include "DNA_cachefile_types.h"
 #include "DNA_camera_types.h"
 #include "DNA_group_types.h"
 #include "DNA_gpencil_types.h"
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 772ded7..0e07676 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -59,6 +59,7 @@
 #include "DNA_actuator_types.h"
 #include "DNA_brush_types.h"
 #include "DNA_camera_types.h"
+#include "DNA_cachefile_types.h"
 #include "DNA_cloth_types.h"
 #include "DNA_controller_types.h"
 #include "DNA_constraint_types.h"
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 7fcf38e..81d25c7 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -97,6 +97,7 @@
 #include "DNA_armature_types.h"
 #include "DNA_actuator_types.h"
 #include "DNA_brush_types.h"
+#include "DNA_cachefile_types.h"
 #include "DNA_camera_types.h"
 #include "DNA_cloth_types.h"
 #include "DNA_constraint_types.h"
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index fc8744c..b87a296 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -32,6 +32,7 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "DNA_cachefile_types.h"
 #include "DNA_node_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
diff --git a/source/blender/editors/io/io_cache.c b/source/blender/editors/io/io_cache.c
index bdb3c4d..f0460a0 100644
--- a/source/blender/editors/io/io_cache.c
+++ b/source/blender/editors/io/io_cache.c
@@ -24,7 +24,7 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "DNA_modifier_types.h"
+#include "DNA_cachefile_types.h"
 #include "DNA_space_types.h"
 
 #include "BLI_path_util.h"
diff --git a/source/blender/makesdna/DNA_cachefile_types.h b/source/blender/makesdna/DNA_cachefile_types.h
new file mode 100644
index 0000000..21a772b
--- /dev/null
+++ b/source/blender/makesdna/DNA_cachefile_types.h
@@ -0,0 +1,49 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2016 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Kevin Dietrich.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file DNA_cachefile_types.h
+ *  \ingroup DNA
+ */
+
+#ifndef __DNA_CACHEFILE_TYPES_H__
+#define __DNA_CACHEFILE_TYPES_H__
+
+#include "DNA_ID.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct CacheFile {
+	ID id;
+
+	char filepath[1024];
+} CacheFile;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* __DNA_CACHEFILE_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index f5f54ed..f5a4a6a 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -1546,14 +1546,6 @@ enum {
 	MOD_NORMALEDIT_MIX_MUL  = 3,
 };
 
-#include "DNA_ID.h"
-
-typedef struct CacheFile {
-	ID id;
-
-	char filepath[1024];
-} CacheFile;
-
 typedef struct MeshSeqCacheModifierData {
 	ModifierData modifier;
 
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index fc94a8d..e82e1b1 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -129,6 +129,7 @@ static const char *includefiles[] = {
 	"DNA_rigidbody_types.h",
 	"DNA_freestyle_types.h",
 	"DNA_linestyle_types.h",
+    "DNA_cachefile_types.h",
 	/* see comment above before editing! */
 
 	/* empty string to indicate end of includefiles */
@@ -1317,4 +1318,5 @@ int main(int argc, char **argv)
 #include "DNA_rigidbody_types.h"
 #include "DNA_freestyle_types.h"
 #include "DNA_linestyle_types.h"
+#include "DNA_cachefile_types.h"
 /* end of list */
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index b1bbaea..1d0db76 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -38,6 +38,7 @@ set(DEFSRC
 	rna_armature.c
 	rna_boid.c
 	rna_brush.c
+	rna_cachefile.c
 	rna_camera.c
 	rna_cloth.c
 	rna_color.c
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 535847c..26535fb 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -3297,6 +3297,7 @@ static RNAProcessItem PROCESS_ITEMS[] = {
 	{"rna_armature.c", "rna_armature_api.c", RNA_def_armature},
 	{"rna_boid.c", NULL, RNA_def_boid},
 	{"rna_brush.c", NULL, RNA_def_brush},
+    {"rna_cachefile.c", NULL, RNA_def_cachefile},
 	{"rna_camera.c", "rna_camera_api.c", RNA_def_camera},
 	{"rna_cloth.c", NULL, RNA_def_cloth},
 	{"rna_color.c", NULL, RNA_def_color},
diff --git a/source/blender/makesrna/intern/rna_cachefile.c b/source/blender/makesrna/intern/rna_cachefile.c
new file mode 100644
index 0000000..41290d3
--- /dev/null
+++ b/source/blender/makesrna/intern/rna_cachefile.c
@@ -0,0 +1,53 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2016 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Kevin Dietrich.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "DNA_cachefile_types.h"
+
+#include "RNA_define.h"
+#include "RNA_access.h"
+
+#include "rna_internal.h"
+
+#ifdef RNA_RUNTIME
+#else
+
+static void rna_def_cachefile(BlenderRNA *brna)
+{
+	StructRNA *srna = RNA_def_struct(brna, "CacheFile", "ID");
+	RNA_def_struct_sdna(srna, "CacheFile");
+	RNA_def_struct_ui_text(srna, "CacheFile", "");
+	RNA_def_struct_ui_icon(srna, ICON_FILE);
+
+	PropertyRNA *prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+	RNA_def_property_ui_text(prop, "File Path", "Path to external displacements file");
+	RNA_def_property_update(prop, 0, NULL);
+}
+
+void RNA_def_cachefile(BlenderRNA *brna)
+{
+	rna_def_cachefile(brna);
+}
+
+#endif
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 4f5f2c5..364aa9b 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -133,6 +133,7 @@ void RN

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list