summaryrefslogtreecommitdiff
blob: ab1704864a0297773a1b9ee6f1788bc5e6be4753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Opencollada 1.65 and later added a pure virtual function writeAnimationClip
so the compiler is unable to create a DocumentImporter implementation.
These patches are backported from blender 2.80-r1 which fix the issue.

See https://developer.blender.org/rB10c50d7dbf7578b35b3bf19a1948f556f9eb203b
and https://developer.blender.org/rB3552731551ef1845b493ffebf78be5a42527e9f2

Thanks to Dennis Schridde for finding them.

--- blender-2.79b/source/blender/collada/CMakeLists.txt.orig	2020-07-23 18:00:09.421620416 +0200
+++ blender-2.79b/source/blender/collada/CMakeLists.txt	2020-07-23 18:00:13.868584964 +0200
@@ -25,6 +25,18 @@
 
 remove_strict_flags()
 
+FIND_FILE(_opencollada_with_animation_clip
+      NAMES
+        COLLADAFWAnimationClip.h
+      PATHS
+        ${OPENCOLLADA_INCLUDE_DIRS}
+      NO_DEFAULT_PATH
+    )
+
+IF(_opencollada_with_animation_clip)
+   add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP)
+ENDIF()
+
 set(INC
 	.
 	../blenkernel
--- blender-2.79b/source/blender/collada/DocumentImporter.h.orig	2018-03-23 16:10:23.000000000 +0100
+++ blender-2.79b/source/blender/collada/DocumentImporter.h	2020-07-23 18:00:13.897584733 +0200
@@ -108,6 +108,11 @@
 
 	bool writeAnimationList(const COLLADAFW::AnimationList*);
 
+#if OPENCOLLADA_WITH_ANIMATION_CLIP
+	// Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp)
+	bool writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip);
+#endif
+
 	bool writeGeometry(const COLLADAFW::Geometry*);
 
 	bool writeMaterial(const COLLADAFW::Material*);
--- blender-2.79b/source/blender/collada/DocumentImporter.cpp.orig	2018-03-23 16:22:25.000000000 +0100
+++ blender-2.79b/source/blender/collada/DocumentImporter.cpp	2020-07-23 18:00:13.896584741 +0200
@@ -1349,6 +1349,19 @@
 
+#if OPENCOLLADA_WITH_ANIMATION_CLIP
+// Since opencollada 1.6.68
+// called on post-process stage after writeVisualScenes
+bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip)
+{
+	if (mImportStage != General)
+		return true;
+
+	return true;
+	//return animation_clip_importer.write_animation_clip(animationClip); // TODO: implement import of AnimationClips
+}
+#endif
+
 // this is called on postprocess, before writeVisualScenes
 bool DocumentImporter::writeController(const COLLADAFW::Controller *controller)
 {
 	if (mImportStage != General)
 		return true;
--- blender-2.79b/source/blender/collada/CMakeLists.txt.orig	2020-07-23 18:00:45.035336449 +0200
+++ blender-2.79b/source/blender/collada/CMakeLists.txt	2020-07-23 18:00:52.459277244 +0200
@@ -24,8 +24,7 @@
 # ***** END GPL LICENSE BLOCK *****
 
 remove_strict_flags()
-
-FIND_FILE(_opencollada_with_animation_clip
+FIND_FILE(OPENCOLLADA_ANIMATION_CLIP
       NAMES
         COLLADAFWAnimationClip.h
       PATHS
@@ -33,8 +32,11 @@
       NO_DEFAULT_PATH
     )
 
-IF(_opencollada_with_animation_clip)
-   add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP)
+IF(OPENCOLLADA_ANIMATION_CLIP)
+   message(STATUS "Found opencollada: ${OPENCOLLADA_ANIMATION_CLIP} ")
+   add_definitions(-DWITH_OPENCOLLADA_ANIMATION_CLIP)
+ELSE()
+   message(STATUS "opencollada: Build without animation clip support")
 ENDIF()
 
 set(INC
--- blender-2.79b/source/blender/collada/DocumentImporter.h.orig	2020-07-23 18:00:13.897584733 +0200
+++ blender-2.79b/source/blender/collada/DocumentImporter.h	2020-07-23 18:00:52.487277021 +0200
@@ -108,7 +108,7 @@
 
 	bool writeAnimationList(const COLLADAFW::AnimationList*);
 
-#if OPENCOLLADA_WITH_ANIMATION_CLIP
+#if WITH_OPENCOLLADA_ANIMATION_CLIP
 	// Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp)
 	bool writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip);
 #endif
--- blender-2.79b/source/blender/collada/DocumentImporter.cpp.orig	2020-07-23 18:00:13.896584741 +0200
+++ blender-2.79b/source/blender/collada/DocumentImporter.cpp	2020-07-23 18:00:52.486277028 +0200
@@ -1349,5 +1349,5 @@
 
-#if OPENCOLLADA_WITH_ANIMATION_CLIP
+#if WITH_OPENCOLLADA_ANIMATION_CLIP
 // Since opencollada 1.6.68
 // called on post-process stage after writeVisualScenes
 bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip)