Skip to content

Commit

Permalink
Merge pull request #58 from EpicGames/release_1.3.0
Browse files Browse the repository at this point in the history
Update for 1.3.0 release
  • Loading branch information
marijavik authored Aug 15, 2024
2 parents 47a3a04 + 9839c8f commit 6c46445
Show file tree
Hide file tree
Showing 60 changed files with 24,367 additions and 779 deletions.
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).


## [1.3.0] - 2024-08-15

### Added
- support for Maya 2024
- support for Python 3.11
- added source code comments to python wrappers

### Fixed
- `CalculateMeshLowerLODsCommand` was rewritten to address edge cases discovered with eyelashes and to handle some common cases of invalid UV data.
- `RotateCommand` to rotate blend shape target deltas as well.
- `SetBlendShapeTargetDeltasCommand` to allow setting vertex indices as well.
- Swig generated classes are now wrapped instead of being monkey-patched to invoke constructors and destructors (which allows building with newer Swig versions - 4.0.x and 4.1.x).

### Changed
- CMake files to add test cases that execute the example scripts and allow generating bundled archives with CPack.
- Binaries for embeddedRL4 plugin to be .so files.


## [1.2.0] - 2023-06-30

### Added
- assets (gui.ma, Ada.dna, additional_assemble_script.py) which support MHC 2.x.x releases (UE 5.2 and 5.3)


## [1.1.0] - 2023-04-20

### Added
Expand All @@ -26,4 +51,4 @@ All notable changes to this project will be documented in this file. This projec
- option to pass list of indices to remove in remove commands.

### Removed
- removed method `assemble_rig` from DNAViewer API.
- removed method `assemble_rig` from DNAViewer API.
18 changes: 18 additions & 0 deletions dnacalib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,25 @@ project(dnacalib)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMakeModulesExtra")

enable_testing()

add_subdirectory(DNACalib)
add_subdirectory(SPyUS)
add_subdirectory(PyDNA)
add_subdirectory(PyDNACalib)

################################################
# Package build artifacts
set(CPACK_GENERATOR "ZIP")
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
string(CONCAT CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}"
"-${CMAKE_PROJECT_VERSION}"
"-${CMAKE_SYSTEM_NAME}"
"-${CMAKE_SYSTEM_PROCESSOR}"
"-${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}"
"-${CMAKE_BUILD_TYPE}"
"-${PYTHON3_EXACT_VERSION}"
"-SHARED")
include(CPack)
38 changes: 31 additions & 7 deletions dnacalib/CMakeModulesExtra/install/InstallLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,35 @@
set(INSTALL_LIBRARY_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}")

macro(install_library target_name)
# component_name is an optional argument, and will default to the given target_name
set(COMPONENT_NAME ${target_name})
set(extra_args ${ARGN})
list(LENGTH extra_args num_extra_args)
if(${num_extra_args} GREATER 0)
list(GET extra_args 0 COMPONENT_NAME)
endif()

include(GNUInstallDirs)
set(REPRESENTATIVE_TARGET_NAME ${target_name})
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})

# Set install destinations and associate installed target files with an export
install(TARGETS ${REPRESENTATIVE_TARGET_NAME}
EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${COMPONENT_NAME}
RUNTIME
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${COMPONENT_NAME}
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${COMPONENT_NAME}
NAMELINK_COMPONENT ${COMPONENT_NAME}
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${COMPONENT_NAME}
PUBLIC_HEADER
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT ${COMPONENT_NAME}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

# Write build-tree targets
Expand All @@ -37,7 +56,8 @@ macro(install_library target_name)
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION ${INSTALL_CONFIGDIR})
DESTINATION ${INSTALL_CONFIGDIR}
COMPONENT ${COMPONENT_NAME})

include(CMakePackageConfigHelpers)

Expand Down Expand Up @@ -68,13 +88,17 @@ macro(install_library target_name)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.install.cmake"
DESTINATION ${INSTALL_CONFIGDIR}
RENAME "${PROJECT_NAME}Config.cmake")
RENAME "${PROJECT_NAME}Config.cmake"
COMPONENT ${COMPONENT_NAME})

# Install package version file
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION ${INSTALL_CONFIGDIR})
DESTINATION ${INSTALL_CONFIGDIR}
COMPONENT ${COMPONENT_NAME})

# Install include files
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(DIRECTORY include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT ${COMPONENT_NAME})
endmacro()
2 changes: 2 additions & 0 deletions dnacalib/DNACalib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ set(SOURCES
src/dnacalib/TypeDefs.h

src/dnacalib/commands/CalculateMeshLowerLODsCommand.cpp
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.cpp
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h
src/dnacalib/commands/ClearBlendShapesCommand.cpp
src/dnacalib/commands/CommandSequence.cpp
src/dnacalib/commands/PruneBlendShapeTargetsCommand.cpp
Expand Down
2 changes: 2 additions & 0 deletions dnacalib/DNACalib/cmake/DNACDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ set(SOURCES
src/dnacalib/CommandImplBase.h
src/dnacalib/TypeDefs.h
src/dnacalib/commands/CalculateMeshLowerLODsCommand.cpp
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.cpp
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h
src/dnacalib/commands/ClearBlendShapesCommand.cpp
src/dnacalib/commands/CommandSequence.cpp
src/dnacalib/commands/PruneBlendShapeTargetsCommand.cpp
Expand Down
37 changes: 24 additions & 13 deletions dnacalib/DNACalib/include/dna/types/ArrayView.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,19 @@ struct ArrayViewTraits<const T> {
using difference_type = std::ptrdiff_t;
};

template<typename T, typename U>
struct IsCompatible {
static constexpr bool value = std::is_same<typename std::remove_cv<T>::type, typename std::remove_cv<U>::type>::value &&
(std::is_const<typename std::remove_reference<T>::type>::value ||
!std::is_const<typename std::remove_reference<U>::type>::value);
};

/**
@brief A view over a continuous sequence of objects.
@tparam T element type
Provides a view over a continuous sequence of objects owned by some other object.
Contains a count of elements and a pointer to a location where they are stored.
ArrayView does not own the mmemory it points to - it does not perform any allocation
ArrayView does not own the memory it points to - it does not perform any allocation
and deallocation. It can be constructed given a pointer and element count, or a container
type argument. The class provides helper methods for creating subviews over the objects,
and methods for by-value comparison with containers. ConstArrayView represents an immutable view.
Expand Down Expand Up @@ -76,23 +83,23 @@ class ArrayView {
sz{size} {
}

ArrayView(std::nullptr_t /*unused*/, size_type /*unused*/) : ArrayView{nullptr, {}} {
}

template<typename U>
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
ArrayView(ArrayView<U>& src) : ArrayView{src.data(), src.size()} {
}

template<typename U>
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
ArrayView(const ArrayView<U>& src) : ArrayView{src.data(), src.size()} {
}

template<typename U>
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
ArrayView(ArrayView<U>&& src) : ArrayView{src.data(), src.size()} {
}

template<typename U, typename std::enable_if<!std::is_rvalue_reference<U &&>::value, int>::type = 0>
explicit ArrayView(U&& src) : ArrayView{src.data(), src.size()} {
template<typename U,
typename std::enable_if<!std::is_rvalue_reference<U &&>::value &&
IsCompatible<T, typename std::remove_reference<U>::type::value_type>::value,
int>::type = 0>
ArrayView(U&& src) : ArrayView{src.data(), static_cast<size_type>(src.size())} {
}

size_type size() const {
Expand Down Expand Up @@ -193,7 +200,8 @@ bool operator!=(const ArrayView<T>& lhs, const ArrayView<U>& rhs) {
}

template<typename T, typename TContainer>
bool operator==(const ArrayView<T>& lhs, const TContainer& rhs) {
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator==(const ArrayView<T>& lhs,
const TContainer& rhs) {
if (lhs.size() != rhs.size()) {
return false;
}
Expand All @@ -207,17 +215,20 @@ bool operator==(const ArrayView<T>& lhs, const TContainer& rhs) {
}

template<typename T, typename TContainer>
bool operator!=(const ArrayView<T>& lhs, const TContainer& rhs) {
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator!=(const ArrayView<T>& lhs,
const TContainer& rhs) {
return !(lhs == rhs);
}

template<typename T, typename TContainer>
bool operator==(const TContainer& lhs, const ArrayView<T>& rhs) {
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator==(const TContainer& lhs,
const ArrayView<T>& rhs) {
return (rhs == lhs);
}

template<typename T, typename TContainer>
bool operator!=(const TContainer& lhs, const ArrayView<T>& rhs) {
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator!=(const TContainer& lhs,
const ArrayView<T>& rhs) {
return !(lhs == rhs);
}

Expand Down
8 changes: 0 additions & 8 deletions dnacalib/DNACalib/include/dna/types/StringView.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,4 @@ class StringView : public trust::ConstArrayView<char> {

};

inline bool operator==(const StringView& lhs, const StringView& rhs) {
return (static_cast<const StringView::Base&>(lhs) == static_cast<const StringView::Base&>(rhs));
}

inline bool operator!=(const StringView& lhs, const StringView& rhs) {
return !(lhs == rhs);
}

} // namespace dna
2 changes: 1 addition & 1 deletion dnacalib/DNACalib/src/dna/filters/JointFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void JointFilter::apply(RawBehavior& dest) {
}
}
// Collect row indices of removed output indices to be used for joint delta removal
Set<std::size_t> rowsToDelete{memRes};
UnorderedSet<std::size_t> rowsToDelete{memRes};
// Remove output indices belonging to the deletable joint
extd::filter(jointGroup.outputIndices, [this, &rowsToDelete](std::uint16_t outputIndex, std::size_t rowIndex) {
const auto jointIndex = static_cast<std::uint16_t>(outputIndex / jointAttributeCount);
Expand Down
Loading

0 comments on commit 6c46445

Please sign in to comment.