Merge branch 'master' into blender2.8
authorGaia Clary <gaia.clary@machinimatrix.org>
Tue, 4 Dec 2018 18:48:21 +0000 (19:48 +0100)
committerGaia Clary <gaia.clary@machinimatrix.org>
Tue, 4 Dec 2018 18:48:21 +0000 (19:48 +0100)
intern/ghost/intern/GHOST_ContextCGL.mm
source/blender/collada/CMakeLists.txt
source/blender/collada/DocumentImporter.cpp
source/blender/collada/DocumentImporter.h

index 46993a1cd1db5b9bffb07d3bbc131a578adab1d3..d95eba339f7f316117f9aa70e7a0a6371dd5c0e5 100644 (file)
@@ -143,7 +143,7 @@ GHOST_TSuccess GHOST_ContextCGL::getSwapInterval(int &intervalOut)
 
                NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
-               [m_openGLContext setValues:&interval forParameter:NSOpenGLCPSwapInterval];
+               [m_openGLContext getValues:&interval forParameter:NSOpenGLCPSwapInterval];
 
                [pool drain];
 
index f860dfac08b30750a86d25a351dd6be1e6a53d7f..95edcff0555af548dae5afdf3abd83b0a8747d44 100644 (file)
 
 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
index 8eb9e5c969ea03be0a0636a7f690ef14d6ba0149..3df47b71598856f67e56e54017b2f7b05309eccb 100644 (file)
@@ -1148,6 +1148,19 @@ bool DocumentImporter::writeAnimationList(const COLLADAFW::AnimationList *animat
        return anim_importer.write_animation_list(animationList);
 }
 
+#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 == Fetching_Controller_data)
+               return true;
+
+       return true;
+       //return animation_clip_importer.write_animation_clip(animationClip); // TODO: implement import of AnimationClips
+}
+#endif
+
 /** When this method is called, the writer must write the skin controller data.
  * \return The writer should return true, if writing succeeded, false otherwise.*/
 bool DocumentImporter::writeSkinControllerData(const COLLADAFW::SkinControllerData *skin)
index 26ded417aa66545ce985cf205efec6642e083aca..374c184d4bcfbcd6c681573c9e90c9a71f2af6eb 100644 (file)
@@ -49,8 +49,6 @@
 #include "MeshImporter.h"
 #include "ImportSettings.h"
 
-
-
 struct bContext;
 
 /** Importer class. */
@@ -107,6 +105,11 @@ public:
 
        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 DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip);
+#endif
+
        bool writeGeometry(const COLLADAFW::Geometry*);
 
        bool writeMaterial(const COLLADAFW::Material*);