Skip to content

Commit

Permalink
Merge branch 'release/0.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumeblanc committed Jun 28, 2018
2 parents 71f622e + 5c5c242 commit f35614e
Show file tree
Hide file tree
Showing 216 changed files with 20,196 additions and 10,411 deletions.
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
BasedOnStyle: Google
...

23 changes: 20 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ matrix:
- os: linux
compiler: clang
env:
- env_build_fbx=0
- env_build_fbx=0
- os: linux
compiler: clang
env:
Expand All @@ -84,6 +84,17 @@ matrix:
env:
- env_build_fbx=0
- env_build_tests=0
- os: linux
compiler: clang
env:
- env_build_data=0
- env_build_fbx=0
- env_build_samples=0
- env_build_tests=0
- os: linux
compiler: clang
env:
- env_build_data=0
- os: linux
compiler: clang
env:
Expand Down Expand Up @@ -142,6 +153,10 @@ before_install:

install:
- echo install-----------------------------------------------------------------
# Download and install mesa dev
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev;
fi
# Download and install fbx sdk
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
mkdir fbx;
Expand Down Expand Up @@ -181,6 +196,7 @@ before_script:
- if [[ -z $env_src_root ]]; then export env_src_root=".."; fi
- if [[ -z $env_build_cpp11 ]]; then export env_build_cpp11=0; fi
- if [[ -z $env_build_fbx ]]; then export env_build_fbx=1; fi
- if [[ -z $env_build_data ]]; then export env_build_data=1; fi
- if [[ -z $env_build_howtos ]]; then export env_build_howtos=1; fi
- if [[ -z $env_build_samples ]]; then export env_build_samples=1; fi
- if [[ -z $env_build_simd_ref ]]; then export env_build_simd_ref=0; fi
Expand All @@ -190,6 +206,7 @@ before_script:
- if [[ -z $env_cmake_c_compiler ]]; then export env_cmake_c_compiler=$CC; fi
- if [[ -z $env_cmake_generator ]]; then export env_cmake_generator="Unix Makefiles"; fi
- if [[ $env_cmake_generator == "Unix Makefiles" ]]; then export env_cmake_generator_specific="-j2"; fi
- if [[ $env_cmake_generator == "Unix Makefiles" ]]; then export env_ctest_generator_specific="-j16"; fi
- if [[ $EMSCRIPTEN ]]; then env_cmake_toolchain="-DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake"; fi

# Display cmake version
Expand All @@ -201,11 +218,11 @@ script:
- mkdir build
- cd build
- echo $env_cmake_toolchain
- cmake -G "$env_cmake_generator" $env_cmake_toolchain -DCMAKE_CXX_COMPILER=$env_cmake_cxx_compiler -DCMAKE_C_COMPILER=$env_cmake_c_compiler -DCMAKE_BUILD_TYPE=$env_cmake_configuration -Dozz_build_cpp11=$env_build_cpp11 -Dozz_build_fbx=$env_build_fbx -Dozz_build_howtos=$env_build_howtos -Dozz_build_samples=$env_build_samples -Dozz_build_simd_ref=$env_build_simd_ref -Dozz_build_tests=$env_build_tests $env_src_root
- cmake -G "$env_cmake_generator" $env_cmake_toolchain -DCMAKE_CXX_COMPILER=$env_cmake_cxx_compiler -DCMAKE_C_COMPILER=$env_cmake_c_compiler -DCMAKE_BUILD_TYPE=$env_cmake_configuration -Dozz_build_cpp11=$env_build_cpp11 -Dozz_build_fbx=$env_build_fbx -Dozz_build_data=$env_build_data -Dozz_build_howtos=$env_build_howtos -Dozz_build_samples=$env_build_samples -Dozz_build_simd_ref=$env_build_simd_ref -Dozz_build_tests=$env_build_tests $env_src_root
# Build
- cmake --build ./ --config $env_cmake_configuration --use-stderr -- $env_cmake_generator_specific
# Test
- ctest --build-config $env_cmake_configuration --output-on-failure -- $env_cmake_generator_specific
- ctest --build-config $env_cmake_configuration --output-on-failure -- $env_ctest_generator_specific

after_success:
- echo after_success-----------------------------------------------------------
Expand Down
24 changes: 24 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
Release version 0.10.0
----------------------

* Library
- [animation] Adds user-channel feature #4. ozz now offers tracks of float, float2, float3, float4 and quaternion for both raw/offline and runtime. A track can be used to store animated user-data, aka data that aren't joint transformations. Runtime jobs allow to query a track value for any time t (ozz::animation::TrackSamplingJob), or to find all rising and falling edges that happened during a period of time (ozz::animation::TrackTriggeringJob). Utilities allow to optimize a raw track (ozz::animation::offline::TrackOptimizer) and build a runtime track (ozz::animation::offline::TrackOptimizer). fbx2ozz comes with the ability to import tracks from fbx node properties.
- [animation] Changed ozz::animation::SamplingJob::time (in interval [0,duration]) to a ratio (in unit interval [0,1]). This is a breaking change, aiming to unify sampling of animations and tracks. To conform with this change, sampling time should simply be divided by animation duration. ozz::sample:AnimationController has been updated accordingly. Offline animations and tools aren't impacted.
- [base] Changes non-intrusive serialization mechanism to use a specialize template struct "Extern" instead of function overloading.

* Tools
- Merged \*2skel and \*2anim in a single tool (\*2ozz, fbx2ozz for fbx importer) where all options are specified as a json config file. List of options with default values are available in [src/animation/offline/tools/reference.json](src/animation/offline/tools/reference.json) file. Consequently, ozz_animation_offline_skel_tools and ozz_animation_offline_anim_tools are also merged into a single ozz_animation_tools library.
- Adds options to import user-channel tracks (from node properties for fbx) using json "animations[].tracks[].properties[]" definition.
- Adds an option while importing skeletons to choose scene node types that must be considered as skeleton joints, ie not restricting to scene joints only. This is useful for the baked sample for example, which animates mesh nodes.

* Build pipeline
- ozz optionnaly supports c++11 compiler.
- Adds ozz_build_data option (OFF by default), to avoid building data on every code change. Building data takes time indeed, and isn't required on every change. It should be turned ON when output format changes to update all data again.
- Removes fused source files from the depot. Fused files are generated during build to ${PROJECT_BINARY_DIR}/src_fused/ folder. To generate fused source files without building the whole project, then build BUILD_FUSE_ALL target with "cmake --build . --target BUILD_FUSE_ALL" command.
- Adds support for Visual Studio 15 2017, drops Visual Studio 11 2012.

* Samples
- [user_channel] Adds new user-channel sample, demonstrating usage of user-channel tracks API and import pipeline usage.
- [sample_fbx2mesh] Remaps joint indices to the smaller range of skeleton joints that are actually used by the skinning. It's now required to index skeleton matrices using ozz::sample::framework:Mesh::joint_remaps when build skinning matrices.
- [multithread] Switched from OpenMP to c++11 std::async API to implement a parallel-for loop over all computation tasks.

Release version 0.9.1
---------------------

Expand Down
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.1)

# Defines the project's name
project(ozz)

# Current version
set(OZZ_VERSION_MAJOR 0)
set(OZZ_VERSION_MINOR 9)
set(OZZ_VERSION_PATCH 1)
set(OZZ_VERSION_MINOR 10)
set(OZZ_VERSION_PATCH 0)
set(OZZ_VERSION ${OZZ_VERSION_MAJOR}.${OZZ_VERSION_MINOR}.${OZZ_VERSION_PATCH})

# Add project build options
option(ozz_build_fbx "Build Fbx pipeline (Requires Fbx SDK)" ON)
option(ozz_build_data "Build data on code change" OFF)
option(ozz_build_samples "Build samples" ON)
option(ozz_build_howtos "Build howtos" ON)
option(ozz_build_tests "Build unit tests" OFF)
option(ozz_build_simd_ref "Forces SIMD math reference implementation" OFF)
option(ozz_build_simd_ref "Force SIMD math reference implementation" OFF)
option(ozz_build_cpp11 "Enable c++11" OFF)
option(ozz_build_msvc_rt_dll "Select msvc DLL runtime library" ON)

# Outputs selected options (can be modified by the command line)
message("-- ---------------------------------------------------------")
message("-- Selected options:")
message("-- - ozz_build_fbx: " ${ozz_build_fbx})
message("-- - ozz_build_data: " ${ozz_build_data})
message("-- - ozz_build_samples: " ${ozz_build_samples})
message("-- - ozz_build_howtos: " ${ozz_build_howtos})
message("-- - ozz_build_tests: " ${ozz_build_tests})
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Documentation and samples are available from [ozz-animation website](http://guil
Supported platforms
-------------------

Ozz is tested on Linux, Mac OS and Windows. The run-time code (ozz_base, ozz_animation, ozz_geometry) depends only on the standard CRT and has no OS specific code, portability to any other plateform shouldn't be an issue.
Ozz is tested on Linux, Mac OS and Windows. The run-time code (ozz_base, ozz_animation, ozz_geometry) depends only on c++03, the standard CRT and has no OS specific code, portability to any other plateform shouldn't be an issue.

Samples, tools and tests depend on external libraries (glfw, Fbx SDK, gtest, ...), which could limit portability.
Samples, tools and tests depend on external libraries (glfw, Fbx SDK, jsoncpp, gtest, ...), which could limit portability.

Build status
------------
Expand Down
30 changes: 17 additions & 13 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
version: '{build}'

image: Visual Studio 2017
environment:
matrix:
# Comilers matrix
- env_cmake_generator: "Visual Studio 11 2012"
env_cmake_configuration: Debug
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2012_win.exe"
- env_cmake_generator: "Visual Studio 12 2013"
env_cmake_configuration: Debug
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2013_win.exe"
Expand All @@ -21,28 +18,34 @@ environment:
- env_cmake_generator: "Visual Studio 14 2015 Win64"
env_cmake_configuration: Release
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2015_win.exe"
- env_cmake_generator: "Visual Studio 14 2015 Win64"
- env_cmake_generator: "Visual Studio 15 2017"
env_cmake_configuration: Debug
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2015_win.exe"
- env_cmake_generator: "Visual Studio 15 2017 Win64"
env_cmake_configuration: Debug
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2015_win.exe"
- env_cmake_generator: "Visual Studio 15 2017"
env_cmake_configuration: Release
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2015_win.exe"
- env_cmake_generator: "Visual Studio 14 2015 Win64"
- env_cmake_generator: "Visual Studio 15 2017 Win64"
env_cmake_configuration: Release
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2015_win.exe"
env_build_msvc_rt_dll: "1"
- env_cmake_generator: "Visual Studio 14 2015 Win64"
- env_cmake_generator: "Visual Studio 15 2017 Win64"
env_cmake_configuration: Release
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2015_win.exe"
env_build_msvc_rt_dll: "0"

# No fbx sdk
- env_cmake_generator: "Visual Studio 14 2015"
- env_cmake_generator: "Visual Studio 15 2017"
env_cmake_configuration: Release

# Use ozz as a sub project (should set msvc rt dll for ozz as this is the default in cmake)
- env_cmake_generator: "Visual Studio 14 2015 Win64"
- env_cmake_generator: "Visual Studio 15 2017 Win64"
env_cmake_configuration: Release
env_src_root: "../test/sub/"
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2015_win.exe"
- env_cmake_generator: "Visual Studio 14 2015 Win64"
- env_cmake_generator: "Visual Studio 15 2017 Win64"
env_cmake_configuration: Debug
env_src_root: "../test/sub/"
env_fbxsdk_path: "http://download.autodesk.com/us/fbx/2017/2017.1/fbx20171_fbxsdk_vs2015_win.exe"
Expand All @@ -57,21 +60,22 @@ install:
Start-Process -FilePath "fbxsdk.exe" /S -Wait
cd ..
}
# Fixe up env_src_root if it isn't defined
# Fixes up env_src_root if it isn't defined
- ps: >-
if (!$Env:env_src_root) {
$Env:env_src_root=".."
}
# Fixe up env_src_root if it isn't defined
# Fixes up env_build_msvc_rt_dll if it isn't defined
- ps: >-
if (!$Env:env_build_msvc_rt_dll) {
$Env:env_build_msvc_rt_dll="1"
}
build_script:
- cmake --version
- mkdir build
- cd build
- cmake -G "%env_cmake_generator%" -Dozz_build_tests=1 -Dozz_build_msvc_rt_dll=%env_build_msvc_rt_dll% -DCMAKE_BUILD_TYPE=%env_cmake_configuration% %env_src_root%
- cmake -G "%env_cmake_generator%" -Dozz_build_tests=1 -Dozz_build_data=1 -Dozz_build_msvc_rt_dll=%env_build_msvc_rt_dll% -DCMAKE_BUILD_TYPE=%env_cmake_configuration% %env_src_root%
- cmake --build ./ --config %env_cmake_configuration%

test_script:
Expand Down
20 changes: 8 additions & 12 deletions build-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import shutil
import sys
import os
import os.path
import re
import platform
from functools import partial
Expand Down Expand Up @@ -100,6 +101,8 @@ def Configure():

if (enable_testing) :
options += ['-D', 'ozz_build_tests=1']
else:
options += ['-D', 'ozz_build_tests=0']

global generator
if(generator != 'default'):
Expand Down Expand Up @@ -159,9 +162,9 @@ def Build(_build_dir = build_dir):
return True

def Test():
# Configure Test process.
# Configure Test process, parallelize a lot of tests in order to stress their dependencies
print("Running unit tests.")
options = ['ctest' ,'--output-on-failure', '-j' + str(multiprocessing.cpu_count()), '--build-config', config]
options = ['ctest' ,'--output-on-failure', '-j' + str(multiprocessing.cpu_count() * 4), '--build-config', config]
config_process = subprocess.Popen(options, cwd=build_dir)
config_process.wait()
if(config_process.returncode != 0):
Expand Down Expand Up @@ -284,12 +287,7 @@ def SelecGenerator():

def DetectTesting():
global enable_testing
try:
test_file = open(ctest_cache_file)
except:
enable_testing = False
return
enable_testing = True
enable_testing = os.path.isfile(ctest_cache_file)

def EnableTesting():
global enable_testing
Expand All @@ -304,9 +302,7 @@ def EnableTesting():
if (enable_testing != wanted):
enable_testing = wanted
print("Testing state has changed.")
clean = raw_input("Do you want to clean build directory to apply the change? (y/n): ") == "y"
if clean:
return CleanBuildDir()

return True

def ClearScreen():
Expand Down Expand Up @@ -382,7 +378,7 @@ def main():
else:
print("\nExecution failed.\n")
break
except Exception, e:
except Exception as e:
print("\nAn error occured during script execution: %s\n") % e

raw_input("Press enter to continue...")
Expand Down
7 changes: 4 additions & 3 deletions build-utils/cmake/clang_format.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
find_program(CLANG_FORMAT "clang-format")

if(CLANG_FORMAT)

message("clang-format found, adding target to the build process.")
file(GLOB_RECURSE
all_source_files
"include/*.h"
Expand All @@ -16,6 +16,7 @@ if(CLANG_FORMAT)
add_custom_target(
BUILD_CLANG_FORMAT
COMMAND ${CLANG_FORMAT} -i -style=google ${all_source_files}
COMMENT ${all_source_files} )

VERBATIM)
else()
message("Optional program clang-format not found.")
endif()
13 changes: 5 additions & 8 deletions build-utils/cmake/compiler_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ set(cxx_all_flags
#--------------------------------------
# Cross compiler compilation flags

if(ozz_build_cpp11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()

# Simd math force ref
if(ozz_build_simd_ref)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS OZZ_BUILD_SIMD_REF)
Expand Down Expand Up @@ -68,14 +73,6 @@ if(MSVC)
# Modify default GCC compilation flags
else()

#---------------------------
# For the common build flags

# Enable c++11
if(ozz_build_cpp11)
set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:-std=c++11>")
endif()

# Set the warning level to Wall
set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS "-Wall")

Expand Down
4 changes: 2 additions & 2 deletions build-utils/cmake/fuse_target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
function(fuse_target _target_name)

set(output_file_name "${_target_name}.cc")
set(output_file "${PROJECT_SOURCE_DIR}/src_fused/${output_file_name}")
set(output_file "${PROJECT_BINARY_DIR}/src_fused/${output_file_name}")

# Get all target sources.
get_property(target_source_files TARGET ${_target_name} PROPERTY SOURCES)
Expand All @@ -19,7 +19,7 @@ function(fuse_target _target_name)
set_target_properties(BUILD_FUSE_${_target_name} PROPERTIES FOLDER "ozz/fuse")

if (NOT TARGET BUILD_FUSE_ALL)
add_custom_target(BUILD_FUSE_ALL ALL})
add_custom_target(BUILD_FUSE_ALL ALL)
endif()

add_dependencies(BUILD_FUSE_ALL BUILD_FUSE_${_target_name})
Expand Down
24 changes: 14 additions & 10 deletions build-utils/cmake/modules/FindFbx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,20 @@ function(FindFbxLibrariesGeneric _FBX_ROOT_DIR _OUT_FBX_LIBRARIES _OUT_FBX_LIBRA
# - Linux: \lib\<compiler_version>\<build_mode>

# Figures out matching compiler/os directory.
if(MSVC10)
set(FBX_CP_PATH "vs2010")
elseif(MSVC11)
set(FBX_CP_PATH "vs2012")
elseif(MSVC12)
set(FBX_CP_PATH "vs2013")
elseif(MSVC14)
set(FBX_CP_PATH "vs2015")
elseif(MSVC15)
set(FBX_CP_PATH "vs2017")

if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
set(FBX_CP_PATH "vs2015")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
set(FBX_CP_PATH "vs2013")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
set(FBX_CP_PATH "vs2012")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
set(FBX_CP_PATH "vs2010")
else()
message ("Unsupported MSVC compiler version ${CMAKE_CXX_COMPILER_VERSION}.")
return()
endif()
elseif(APPLE)
set(FBX_CP_PATH "*")
else()
Expand Down
4 changes: 4 additions & 0 deletions extern/glfw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ if(WIN32)
lib/win32/win32_thread.c
lib/win32/win32_time.c
lib/win32/win32_window.c)
if(MSYS OR MINGW)
# Disables warnings in glfw.
set_source_files_properties(${specific_file_list} PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas")
endif()
endif()

# Samples requires X11 package on linux.
Expand Down
Loading

1 comment on commit f35614e

@kylawl
Copy link
Contributor

@kylawl kylawl commented on f35614e Jun 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic, thanks for all the hard work!

Please sign in to comment.