Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package alembic for openSUSE:Factory checked in at 2024-12-09 21:12:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/alembic (Old) and /work/SRC/openSUSE:Factory/.alembic.new.29675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alembic" Mon Dec 9 21:12:59 2024 rev:15 rq:1229417 version:1.8.8 Changes: -------- --- /work/SRC/openSUSE:Factory/alembic/alembic.changes 2024-02-21 17:56:04.290555088 +0100 +++ /work/SRC/openSUSE:Factory/.alembic.new.29675/alembic.changes 2024-12-09 21:14:03.715217378 +0100 @@ -1,0 +2,15 @@ +Sat Dec 7 14:57:55 UTC 2024 - Andrea Manzini <andrea.manz...@suse.com> + +- update to 1.8.8: + * Support variable order curves in the python bindings. (Issue 458) + * Support mingw64 by adding a missing include. (Issue 459) + +- update to 1.8.7: + * Protect from potential buffer overrun because of malformed dimensions. (Issue 453) + * Fix a typo in the python bindings but leave the misspelled member + (kkVisibilityVisible) to maintain compatibility. (Issue 440) + * Add unicode filename support for Windows (PR450) + * Make some of the extra python scripts including the PyAlembic and Maya + * unit tests python 3 compatible. (PR438) + +------------------------------------------------------------------- Old: ---- alembic-1.8.6.tar.gz New: ---- alembic-1.8.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alembic.spec ++++++ --- /var/tmp/diff_new_pack.ywtfqs/_old 2024-12-09 21:14:04.211238131 +0100 +++ /var/tmp/diff_new_pack.ywtfqs/_new 2024-12-09 21:14:04.215238299 +0100 @@ -19,7 +19,7 @@ %define libname libAlembic1_8 Name: alembic -Version: 1.8.6 +Version: 1.8.8 Release: 0 Summary: Computer graphics interchange framework License: BSD-3-Clause ++++++ alembic-1.8.6.tar.gz -> alembic-1.8.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/.github/workflows/main.yml new/alembic-1.8.8/.github/workflows/main.yml --- old/alembic-1.8.6/.github/workflows/main.yml 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/.github/workflows/main.yml 2024-12-02 18:31:02.000000000 +0100 @@ -12,9 +12,8 @@ # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - linux: - name: 'Linux CentOS 7 VFX CY${{ matrix.vfx-cy }} + name: 'Linux VFX CY${{ matrix.vfx-cy }} <${{ matrix.compiler-desc }}, config=${{ matrix.build-type }}, cxx=${{ matrix.cxx-standard }}>' @@ -23,68 +22,39 @@ container: # DockerHub: https://hub.docker.com/u/aswf # Source: https://github.com/AcademySoftwareFoundation/aswf-docker - image: aswf/ci-ocio:${{ matrix.vfx-cy }} + image: aswf/ci-ocio:${{ matrix.vfx-cy }} strategy: matrix: - build: [1,2,3,4,5,6,7,8] + build: [1,2,3,4] include: - build: 1 build-type: Release - cxx-standard: 14 - cxx-compiler: g++ - cc-compiler: gcc - compiler-desc: GCC 6.3.1 - vfx-cy: 2020 - - build: 2 - build-type: Release - cxx-standard: 11 - cxx-compiler: g++ - cc-compiler: gcc - compiler-desc: GCC 6.3.1 - vfx-cy: 2020 - - build: 3 - build-type: Release - cxx-standard: 14 - cxx-compiler: clang++ - cc-compiler: clang - compiler-desc: Clang 7 - vfx-cy: 2020 - - build: 4 - build-type: Release - cxx-standard: 11 - cxx-compiler: clang++ - cc-compiler: clang - compiler-desc: Clang 7 - vfx-cy: 2020 - - build: 5 - build-type: Release cxx-standard: 17 cxx-compiler: g++ cc-compiler: gcc - compiler-desc: gcc9.3.1 - vfx-cy: 2022 - - build: 6 + compiler-desc: gcc11.2.1 + vfx-cy: 2024 + - build: 2 build-type: Release cxx-standard: 17 cxx-compiler: clang++ cc-compiler: clang - compiler-desc: clang10.4 - vfx-cy: 2022 - - build: 7 + compiler-desc: clang15.0 + vfx-cy: 2024 + - build: 3 build-type: Debug cxx-standard: 17 cxx-compiler: g++ cc-compiler: gcc - compiler-desc: gcc9.3.1 - vfx-cy: 2022 - - build: 8 + compiler-desc: gcc11.2.1 + vfx-cy: 2024 + - build: 4 build-type: Debug cxx-standard: 17 cxx-compiler: clang++ cc-compiler: clang - compiler-desc: clang10.4 - vfx-cy: 2022 - + compiler-desc: clang15.0 + vfx-cy: 2024 env: CXX: ${{ matrix.cxx-compiler }} CC: ${{ matrix.cc-compiler }} @@ -99,8 +69,85 @@ run: | cmake ../. \ -DCMAKE_INSTALL_PREFIX=../_install \ - -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \ - -DCMAKE_CXX_FLAGS=${{ matrix.cxx-flags }} + -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} + working-directory: _build + - name: Build + run: | + cmake --build . \ + --target install \ + --config ${{ matrix.build-type }} \ + -- -j4 + working-directory: _build + - name: Test + run: | + ctest -T Test \ + --timeout 7200 \ + --output-on-failure \ + -VV + working-directory: _build + + # -------------------------------------------------------------------- + + macos: + name: 'macOS VFXP-${{matrix.vfx-cy }} macos-${{ matrix.osver }} + <AppleClang + arch=${{ matrix.arch-type }}, + config=${{ matrix.build-type }}, + shared=${{ matrix.build-shared }}, + cxx=${{ matrix.cxx-standard }}' + runs-on: macos-${{ matrix.osver }} + strategy: + matrix: + build: [1, 2, 3, 4] + include: + # -------------------------------------------------------------------- + # MacOS 14 + # -------------------------------------------------------------------- + # Release + - build: 1 + arch-type: "x86_64" + build-type: Release + build-shared: 'ON' + cxx-standard: 17 + osver: 14 + + # Debug + - build: 2 + arch-type: "x86_64" + build-type: Debug + build-shared: 'ON' + cxx-standard: 17 + osver: 14 + + # Release + - build: 3 + arch-type: "x86_64;arm64" + build-type: Release + build-shared: 'ON' + cxx-standard: 17 + osver: 14 + + # Debug + - build: 4 + arch-type: "x86_64;arm64" + build-type: Debug + build-shared: 'ON' + cxx-standard: 17 + osver: 14 + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Create build directories + run: | + mkdir _install + mkdir _build + - name: Configure + run: | + brew install imath + cmake ../. \ + -DCMAKE_INSTALL_PREFIX=../_install \ + -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} working-directory: _build - name: Build run: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/CMakeLists.txt new/alembic-1.8.8/CMakeLists.txt --- old/alembic-1.8.6/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -35,7 +35,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.13) -PROJECT(Alembic VERSION 1.8.6) +PROJECT(Alembic VERSION 1.8.8) MESSAGE(STATUS "CMAKE SYSTEM NAME: ${CMAKE_SYSTEM_NAME}") @@ -48,6 +48,8 @@ SET(CMAKE_VERBOSE_MAKEFILE TRUE) ENDIF() +INCLUDE(GNUInstallDirs) + #-****************************************************************************** # OPTIONS (set with -D<option>=<value>) #-****************************************************************************** @@ -74,12 +76,8 @@ # Set static/dynamic build options SET(LIB_TYPE STATIC) -SET(RUNTIME_INSTALL_DIR lib) -SET(LIBRARY_INSTALL_DIR lib) -SET(ARCHIVE_INSTALL_DIR lib) IF (ALEMBIC_SHARED_LIBS) SET(LIB_TYPE SHARED) - SET(ARCHIVE_INSTALL_DIR lib) IF (WIN32) ADD_DEFINITIONS(-DALEMBIC_DLL) ENDIF() @@ -99,10 +97,6 @@ SET(DARWIN FALSE) IF ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") SET(DARWIN TRUE) - # suppress rpath warning - IF (POLICY CMP0042) - CMAKE_POLICY(SET CMP0042 OLD) - ENDIF() ENDIF() SET(LINUX FALSE) @@ -184,7 +178,7 @@ IF (UNIX AND NOT WINDOWS) FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) IF (CMAKE_UNAME) - EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR) + EXECUTE_PROCESS(COMMAND uname -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR) SET(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE INTERNAL "processor type (i386 and x86_64)") IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/NEWS.txt new/alembic-1.8.8/NEWS.txt --- old/alembic-1.8.6/NEWS.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/NEWS.txt 2024-12-02 18:31:02.000000000 +0100 @@ -1,3 +1,29 @@ +2024-12-02, Alembic 1.8.8 + +Thanks to your feedback and submitted issues we have a few bug fixes. + +Support variable order curves in the python bindings. (Issue 458) + +Support mingw64 by adding a missing include. (Issue 459) + +2024-10-05, Alembic 1.8.7 + +Thanks to your feedback, pull requests, and submitted issues we have A +few bugs and build enhancements. + +Combine CMake feedback from several PRs and issues. (PR457) + +Protect from potential buffer overrun because of malformed dimensions. +(Issue 453) + +Fix a typo in the python bindings but leave the misspelled member +(kkVisibilityVisible) to maintain compatibility. (Issue 440) + +Add unicode filename support for Windows (PR450) + +Make some of the extra python scripts including the PyAlembic and Maya +unit tests python 3 compatible. (PR438) + 2023-09-25, Alembic 1.8.6 Thanks to your feedback pull requests and submitted issues we @@ -5,7 +31,7 @@ CMake: -Introduce CPacke to top level CMake. (PR 425) +Introduce CPack to top level CMake. (PR 425) AbcCoreOgawa: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/cmake/AlembicArnold.cmake new/alembic-1.8.8/cmake/AlembicArnold.cmake --- old/alembic-1.8.6/cmake/AlembicArnold.cmake 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/cmake/AlembicArnold.cmake 2024-12-02 18:31:02.000000000 +0100 @@ -86,7 +86,7 @@ IF( ${WINDOWS} ) SET( ARNOLD_COMPILE_FLAGS "/c /nologo /MT /TP /DWIN32" ) - SET( ARNOLD_LINK_FLAGS "/nologo /dll /LIBPATH:\"%RMANTREE%\lib\" libai.lib" ) + SET( ARNOLD_LINK_FLAGS "/nologo /dll /LIBPATH:\"%RMANTREE%\\lib\" libai.lib" ) ELSEIF( ${DARWIN} ) SET( ARNOLD_COMPILE_FLAGS "-c" ) SET( ARNOLD_LINK_FLAGS "-bundle -undefined dynamic_lookup" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/examples/AbcClients/WFObjConvert/CMakeLists.txt new/alembic-1.8.8/examples/AbcClients/WFObjConvert/CMakeLists.txt --- old/alembic-1.8.6/examples/AbcClients/WFObjConvert/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/examples/AbcClients/WFObjConvert/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -65,12 +65,12 @@ ENDIF() INSTALL(TARGETS AbcWFObjConvert - LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} - RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR} - ARCHIVE DESTINATION ${ARCHIVE_INSTALL_DIR}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) INSTALL(FILES ${PUBLIC_H_FILES} - DESTINATION include/Alembic/AbcClients/WFObjConvert + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcClients/WFObjConvert PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) IF (USE_TESTS AND USE_HDF5) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/Abc/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/Abc/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/Abc/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/Abc/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -84,7 +84,7 @@ SourceName.h TypedArraySample.h TypedPropertyTraits.h - DESTINATION include/Alembic/Abc + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/Abc ) IF (USE_TESTS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCollection/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcCollection/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcCollection/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCollection/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -44,7 +44,7 @@ SchemaInfoDeclarations.h OCollections.h ICollections.h - DESTINATION include/Alembic/AbcCollection + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcCollection ) IF (USE_TESTS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreAbstract/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcCoreAbstract/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcCoreAbstract/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreAbstract/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -82,7 +82,7 @@ CompoundPropertyReader.h ObjectReader.h ArchiveReader.h - DESTINATION include/Alembic/AbcCoreAbstract + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcCoreAbstract ) IF (USE_TESTS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreFactory/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcCoreFactory/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcCoreFactory/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreFactory/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -39,4 +39,4 @@ SET(CXX_FILES "${CXX_FILES}" PARENT_SCOPE) INSTALL(FILES All.h IFactory.h - DESTINATION include/Alembic/AbcCoreFactory) \ No newline at end of file + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcCoreFactory) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreHDF5/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcCoreHDF5/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcCoreHDF5/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreHDF5/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -63,7 +63,7 @@ SET(CXX_FILES "${CXX_FILES}" PARENT_SCOPE) INSTALL(FILES All.h ReadWrite.h - DESTINATION include/Alembic/AbcCoreHDF5) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcCoreHDF5) IF (USE_TESTS) ADD_SUBDIRECTORY(Tests) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreLayer/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcCoreLayer/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcCoreLayer/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreLayer/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -43,7 +43,7 @@ SET(CXX_FILES "${CXX_FILES}" PARENT_SCOPE) INSTALL(FILES Read.h Util.h Foundation.h - DESTINATION include/Alembic/AbcCoreLayer) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcCoreLayer) IF (USE_TESTS) ADD_SUBDIRECTORY(Tests) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -57,7 +57,7 @@ SET(CXX_FILES "${CXX_FILES}" PARENT_SCOPE) INSTALL(FILES All.h ReadWrite.h - DESTINATION include/Alembic/AbcCoreOgawa) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcCoreOgawa) IF (USE_TESTS) ADD_SUBDIRECTORY(Tests) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp --- old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp 2024-12-02 18:31:02.000000000 +0100 @@ -59,18 +59,24 @@ const AbcA::DataType &iDataType, Util::Dimensions & oDim ) { + if ( iData->getSize() < 16 ) + { + oDim = Util::Dimensions( 0 ); + } // find it based on of the size of the data - if ( iDims->getSize() == 0 ) + else if ( iDims->getSize() == 0 ) { - if ( iData->getSize() == 0 ) - { - oDim = Util::Dimensions( 0 ); - } - else + std::size_t numItems = + ( iData->getSize() - 16 ) / iDataType.getNumBytes(); + + // for misshaped data bump up our dimensions by 1 so we have + // more allocated for the partial read + if (( iData->getSize() - 16 ) % iDataType.getNumBytes() != 0) { - oDim = Util::Dimensions( ( iData->getSize() - 16 ) / - iDataType.getNumBytes() ); + numItems += 1; } + + oDim = Util::Dimensions( numItems ); } // we need to read our dimensions else @@ -92,6 +98,26 @@ { oDim[i] = dims[i]; } + + // we have less data than what the dimensions suggest + // we should, so calculate them based on what we have + if ( iDataType.getPod() != Alembic::Util::kStringPOD && + iDataType.getPod() != Alembic::Util::kWstringPOD && + (iDataType.getNumBytes() * oDim.numPoints() > + iData->getSize() - 16) ) + { + std::size_t numItems = + ( iData->getSize() - 16 ) / iDataType.getNumBytes(); + + // for misshaped data bump up our dimensions by 1 so we have + // more allocated for the partial read + if (( iData->getSize() - 16 ) % iDataType.getNumBytes() != 0) + { + numItems += 1; + } + + oDim = Util::Dimensions( numItems ); + } } } @@ -1313,7 +1339,7 @@ Ogawa::IDataPtr iData, size_t iThreadId, const AbcA::DataType &iDataType, - Util::PlainOldDataType iAsPod ) + Util::PlainOldDataType iAsPod) { Alembic::Util::PlainOldDataType curPod = iDataType.getPod(); ABCA_ASSERT( ( iAsPod == curPod ) || ( @@ -1408,6 +1434,7 @@ { // - 16 to skip key std::size_t numBytes = dataSize - 16; + iData->read( numBytes, iIntoLocation, 16, iThreadId ); char * buf = static_cast< char * >( iIntoLocation ); @@ -1446,7 +1473,6 @@ ReadData( const_cast<void*>( oSample->getData() ), iData, iThreadId, iDataType, iDataType.getPod() ); - } //-***************************************************************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/ReadUtil.h new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/ReadUtil.h --- old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/ReadUtil.h 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/ReadUtil.h 2024-12-02 18:31:02.000000000 +0100 @@ -62,7 +62,7 @@ Ogawa::IDataPtr iData, size_t iThreadId, const AbcA::DataType &iDataType, - Util::PlainOldDataType iAsPod ); + Util::PlainOldDataType iAsPod); //-***************************************************************************** void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/SprImpl.cpp new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/SprImpl.cpp --- old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/SprImpl.cpp 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/SprImpl.cpp 2024-12-02 18:31:02.000000000 +0100 @@ -111,13 +111,15 @@ Ogawa::IDataPtr data = m_group->getData( index, id ); AbcA::DataType dt = m_header->header.getDataType(); + std::size_t numBytes = dt.getNumBytes(); + // Check to make sure the Ogawa data size matches our expected scalar // property size, the + 16 is to account for the data key. if ( dt.getPod() < Util::kStringPOD && data && - data->getSize() != dt.getNumBytes() + 16 ) + data->getSize() != numBytes + 16 ) { ABCA_THROW( "ScalarPropertyReader::getSample size is not correct " - "expected: " << dt.getNumBytes() << " got: " << + "expected: " << numBytes << " got: " << data->getSize() - 16 ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -110,4 +110,6 @@ file(COPY fuzzer_issue53205.abc DESTINATION .) file(COPY fuzzer_issue53406.abc DESTINATION .) file(COPY fuzzer_Taotao_Gu_3513.abc DESTINATION .) -file(COPY fuzzer_Taotao_Gu_3699.abc DESTINATION .) \ No newline at end of file +file(COPY fuzzer_Taotao_Gu_3699.abc DESTINATION .) +file(COPY zdi-23700-poc0.abc DESTINATION .) +file(COPY zdi-23700-poc1.abc DESTINATION .) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp --- old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp 2024-12-02 18:31:02.000000000 +0100 @@ -106,6 +106,126 @@ } } +// catch and ignore exceptions +void walkPropsThrow(ABCA::CompoundPropertyReaderPtr parent) +{ + for (std::size_t i = 0; i < parent->getNumProperties(); ++i) + { + ABCA::CompoundPropertyReaderPtr childCompound; + try + { + childCompound = parent->getCompoundProperty(i); + if (childCompound) + { + ABCA::MetaData md = childCompound->getMetaData(); + md.serialize(); + } + } + catch(const std::exception& e) + { + } + + if (childCompound) + { + walkPropsThrow(childCompound); + } + + ABCA::ScalarPropertyReaderPtr childScalar; + try + { + childScalar = parent->getScalarProperty(i); + if (childScalar) + { + ABCA::MetaData md = childScalar->getMetaData(); + md.serialize(); + } + } + catch(const std::exception& e) + { + } + + if (childScalar) + { + if (childScalar->getDataType().getPod() == + Alembic::AbcCoreAbstract::kStringPOD) + { + sampStrVec.resize(childScalar->getDataType().getExtent()); + } + else if (childScalar->getDataType().getPod() == + Alembic::AbcCoreAbstract::kWstringPOD) + { + sampWStrVec.resize(childScalar->getDataType().getExtent()); + } + + for (std::size_t i = 0; i < childScalar->getNumSamples(); ++i) + { + if (childScalar->getDataType().getPod() == + Alembic::AbcCoreAbstract::kStringPOD) + { + try + { + childScalar->getSample(i, &sampStrVec.front()); + } + catch(const std::exception& e) + { + } + + } + else if (childScalar->getDataType().getPod() == + Alembic::AbcCoreAbstract::kWstringPOD) + { + try + { + childScalar->getSample(i, &sampWStrVec.front()); + } + catch(const std::exception& e) + { + } + } + else + { + try + { + childScalar->getSample(i, samp); + } + catch(const std::exception& e) + { + } + } + } + } + + ABCA::ArrayPropertyReaderPtr childArray; + try + { + childArray = parent->getArrayProperty(i); + if (childArray) + { + ABCA::MetaData md = childArray->getMetaData(); + md.serialize(); + } + } + catch(const std::exception& e) + { + } + + if (childArray) + { + ABCA::ArraySamplePtr samp; + for (std::size_t i = 0; i < childArray->getNumSamples(); ++i) + { + try + { + childArray->getSample(i, samp); + } + catch(const std::exception& e) + { + } + } + } + } +} + void walkObj(ABCA::ObjectReaderPtr parent) { walkProps(parent->getProperties()); @@ -116,6 +236,45 @@ } } +// this variant we catch the throws to make sure we check other issues +void walkObjThrow(ABCA::ObjectReaderPtr parent) +{ + ABCA::CompoundPropertyReaderPtr props; + try + { + props = parent->getProperties(); + ABCA::MetaData md = props->getMetaData(); + md.serialize(); + + } + catch(const std::exception& e) + { + } + + if (props) + { + walkPropsThrow(props); + } + + for(std::size_t i = 0; i < parent->getNumChildren(); ++i) + { + ABCA::ObjectReaderPtr child; + try + { + child = parent->getChild(i); + } + catch(const std::exception& e) + { + continue; + } + + if (child) + { + walkObjThrow(child); + } + } +} + void walkJustObj(ABCA::ObjectReaderPtr parent) { for(std::size_t i = 0; i < parent->getNumChildren(); ++i) @@ -125,6 +284,25 @@ } } +void walkArchiveNoThrow(const char * iName, bool iUseMMap) +{ + Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); + + ABCA::ArchiveReaderPtr ar; + try + { + ar = r(iName); + } + catch(const std::exception& e) + { + } + + if (ar) + { + walkObjThrow(ar->getTop()); + } +} + void testIssue254(bool iUseMMap) { Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); @@ -745,6 +923,47 @@ TESTING_ASSERT(0); } +void test_walkAllNoThrow(bool iUseMMap) +{ + + walkArchiveNoThrow("issue254.abc", iUseMMap); + walkArchiveNoThrow("issue255.abc", iUseMMap); + walkArchiveNoThrow("issue256.abc", iUseMMap); + walkArchiveNoThrow("issue257.abc", iUseMMap); + walkArchiveNoThrow("issue258.abc", iUseMMap); + walkArchiveNoThrow("issue269.abc", iUseMMap); + walkArchiveNoThrow("issue270.abc", iUseMMap); + walkArchiveNoThrow("issue271.abc", iUseMMap); + walkArchiveNoThrow("issue272.abc", iUseMMap); + walkArchiveNoThrow("issue282.abc", iUseMMap); + walkArchiveNoThrow("issue283.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue24846.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue24853.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue24598.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25051.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25081.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25166.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25175.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25185.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25192.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25204.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25236.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25351.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25502.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue25695.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue26125.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue33685.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue49213.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue52703.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue52939.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue53205.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_issue53406.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_Taotao_Gu_3513.abc", iUseMMap); + walkArchiveNoThrow("fuzzer_Taotao_Gu_3699.abc", iUseMMap); + walkArchiveNoThrow("zdi-23700-poc0.abc", iUseMMap); + walkArchiveNoThrow("zdi-23700-poc1.abc", iUseMMap); +} + int main ( int argc, char *argv[] ) { testIssue254(true); @@ -848,5 +1067,8 @@ testFuzzerTaoTaoGu3699(true); testFuzzerTaoTaoGu3699(false); + + test_walkAllNoThrow(true); + test_walkAllNoThrow(false); return 0; } Binary files old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/Tests/zdi-23700-poc0.abc and new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/Tests/zdi-23700-poc0.abc differ Binary files old/alembic-1.8.6/lib/Alembic/AbcCoreOgawa/Tests/zdi-23700-poc1.abc and new/alembic-1.8.8/lib/Alembic/AbcCoreOgawa/Tests/zdi-23700-poc1.abc differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcGeom/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcGeom/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcGeom/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcGeom/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -99,7 +99,7 @@ XformSample.h IXform.h OXform.h - DESTINATION include/Alembic/AbcGeom + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcGeom ) IF (USE_TESTS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcGeom/Tests/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcGeom/Tests/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcGeom/Tests/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcGeom/Tests/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -127,4 +127,4 @@ ADD_EXECUTABLE(playground PlayGround.cpp) TARGET_LINK_LIBRARIES(playground Alembic) -file(COPY fuzzer_issue25695.abc DESTINATION .) \ No newline at end of file +file(COPY fuzzer_issue25695.abc DESTINATION .) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/AbcMaterial/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/AbcMaterial/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/AbcMaterial/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/AbcMaterial/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -49,7 +49,7 @@ IMaterial.h MaterialFlatten.h MaterialAssignment.h - DESTINATION include/Alembic/AbcMaterial + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/AbcMaterial ) IF (USE_TESTS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -84,12 +84,11 @@ ${ZLIB_LIBRARY} ) -SET( ALEMBIC_LIB_INSTALL_DIR lib CACHE STRING "Where to install the Alembic libs") INSTALL(TARGETS Alembic EXPORT AlembicTargets - LIBRARY DESTINATION ${ALEMBIC_LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${ALEMBIC_LIB_INSTALL_DIR} - RUNTIME DESTINATION ${ALEMBIC_LIB_INSTALL_DIR}) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) #-****************************************************************************** # PACKAGE EXPORTS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/Ogawa/IStreams.cpp new/alembic-1.8.8/lib/Alembic/Ogawa/IStreams.cpp --- old/alembic-1.8.6/lib/Alembic/Ogawa/IStreams.cpp 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/Ogawa/IStreams.cpp 2024-12-02 18:31:02.000000000 +0100 @@ -157,7 +157,7 @@ #ifdef _WIN32 typedef int FileDescriptor; - static FileDescriptor openFile(const char * iFileName, + static FileDescriptor openFile(const wchar_t * wFileName, Alembic::Util::int32_t iFlag) { FileDescriptor fid = -1; @@ -165,7 +165,7 @@ // One way to prevent writing over a file opened for reading would be to // pass in _SH_DENYWR instead of _SH_DENYNO. If we can find a posix // equivalent we may have an interesting solution for that problem. - _sopen_s(&fid, iFileName, iFlag | _O_RANDOM, _SH_DENYNO, _S_IREAD); + _wsopen_s(&fid, wFileName, iFlag | _O_RANDOM, _SH_DENYNO, _S_IREAD); return fid; } @@ -311,7 +311,29 @@ FileIStreamReader(const std::string& iFileName, std::size_t iNumStreams) : nstreams(iNumStreams) { + +#ifdef _WIN32 + // to wchar_t + // get the size of the UTF8 string + int wLength = MultiByteToWideChar(CP_UTF8, 0, iFileName.c_str(), -1, NULL, 0); + + // allocate buffer + wchar_t* wFileName = (wchar_t*)malloc(wLength * sizeof(wchar_t)); + if (!wFileName) + throw std::runtime_error("Unable to allocate buffer for conversion"); + + // convert to UTF8 + if (MultiByteToWideChar(CP_UTF8, 0, iFileName.c_str(), -1, wFileName, wLength) <= 0) + throw std::runtime_error("Unable to convert to wchar_t file name"); + + // open file for read using the UTF8 string + fid = openFile(wFileName, O_RDONLY); + + // free conversion buffer + free(wFileName); +#else fid = openFile(iFileName.c_str(), O_RDONLY); +#endif fileLen = 0; if (getFileLength(fid, fileLen) < 0) { @@ -444,9 +466,28 @@ static FileHandle openFile(const std::string& iFileName) { + // to wchar_t + // get the size of the UTF8 string + int wLength = MultiByteToWideChar(CP_UTF8, 0, iFileName.c_str(), -1, NULL, 0); + + // allocate buffer + wchar_t* wFileName = (wchar_t*)malloc(wLength * sizeof(wchar_t)); + if (!wFileName) + throw std::runtime_error("Unable to allocate buffer for conversion"); + + // convert to UTF8 + if (MultiByteToWideChar(CP_UTF8, 0, iFileName.c_str(), -1, wFileName, wLength) <= 0) + throw std::runtime_error("Unable to convert to wchar_t file name"); + + // open file for read using the UTF8 string // Use both FILE_SHARE_READ and FILE_SHARE_WRITE as the share mode. // Without FILE_SHARE_WRITE, this will fail when trying to open a file that is already open for writing. - return CreateFileA(iFileName.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + FileHandle fh = CreateFileW(wFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + + // free conversion buffer + free(wFileName); + + return fh; } static void closeFile(FileHandle iFile) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/Ogawa/OStream.cpp new/alembic-1.8.8/lib/Alembic/Ogawa/OStream.cpp --- old/alembic-1.8.6/lib/Alembic/Ogawa/OStream.cpp 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/Ogawa/OStream.cpp 2024-12-02 18:31:02.000000000 +0100 @@ -37,6 +37,11 @@ #include <fstream> #include <stdexcept> +// for mingw support +#if defined _WIN32 || defined _WIN64 + #include <Windows.h> +#endif + namespace Alembic { namespace Ogawa { namespace ALEMBIC_VERSION_NS { @@ -47,8 +52,28 @@ PrivateData(const std::string & iFileName) : stream(NULL), fileName(iFileName), startPos(0), curPos(0), maxPos(0) { +#ifdef _WIN32 + // to wchar_t + // get the size of the UTF8 string + int wLength = MultiByteToWideChar(CP_UTF8, 0, fileName.c_str(), -1, NULL, 0); + + // allocate buffer + wchar_t* wFileName = (wchar_t*)malloc(wLength * sizeof(wchar_t)); + if (!wFileName) + throw std::runtime_error("Unable to convert to wchar_t file name"); + + // convert to UTF8 + MultiByteToWideChar(CP_UTF8, 0, fileName.c_str(), -1, wFileName, wLength); + + // open stream with UTF8 string + std::ofstream * filestream = new std::ofstream(wFileName, std::ios_base::trunc | std::ios_base::binary); + + // free conversion buffer + free(wFileName); +#else std::ofstream * filestream = new std::ofstream(fileName.c_str(), std::ios_base::trunc | std::ios_base::binary); +#endif if (filestream->is_open()) { stream = filestream; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/Alembic/Util/CMakeLists.txt new/alembic-1.8.8/lib/Alembic/Util/CMakeLists.txt --- old/alembic-1.8.6/lib/Alembic/Util/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/Alembic/Util/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -56,7 +56,7 @@ SpookyV2.h TokenMap.h All.h - DESTINATION include/Alembic/Util) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Alembic/Util) IF (USE_TESTS) ADD_SUBDIRECTORY(Tests) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/lib/python/abcutils/Path.py new/alembic-1.8.8/lib/python/abcutils/Path.py --- old/alembic-1.8.6/lib/python/abcutils/Path.py 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/lib/python/abcutils/Path.py 2024-12-02 18:31:02.000000000 +0100 @@ -146,10 +146,10 @@ try: key = int( key ) except ValueError: - raise ValueError, "You must use an integer to refer to a path element." + raise ValueError("You must use an integer to refer to a path element.") if key > abs( self._maxindex ): - raise IndexError, "Maximum index is +/- %s." % self._maxindex + raise IndexError("Maximum index is +/- %s." % self._maxindex) self._plist[key] = value self._path = str( self[:] ) @@ -158,27 +158,27 @@ try: n = int( n ) except ValueError: - raise ValueError, "You must use an integer to refer to a path element." + raise ValueError("You must use an integer to refer to a path element.") try: del( self._plist[n] ) t = Path( self[:] ) self.__reinit__( t ) except IndexError: - raise IndexError, "Maximum index is +/- %s" & self._maxindex + raise IndexError("Maximum index is +/- %s" & self._maxindex) def rindex( self, val ): if val in self: return len( self._plist ) - \ list( reversed( self._plist ) ).index( val ) - 1 else: - raise ValueError, "%s is not in path." % val + raise ValueError("%s is not in path." % val) def index( self, val ): if val in self: return self._plist.index( val ) else: - raise ValueError, "%s is not in path." % val + raise ValueError("%s is not in path." % val) def common( self, other, cmn=None ): cmn = Path( cmn ) @@ -345,7 +345,7 @@ break #pass else: - print "QOI??? %s" % full + print ("QOI??? %s" % full) return dirs, links @@ -354,18 +354,18 @@ try: arg = Path( sys.argv[1] ) except IndexError: - print "Please supply a directory to analyze." + print ("Please supply a directory to analyze.") return 1 dirs, links = mapFSTree( Path( os.getcwd() ), arg ) print - print "Directories traversed to get to %s\n" % arg - for d in sorted( list( dirs ) ): print d + print ("Directories traversed to get to %s\n" % arg) + for d in sorted( list( dirs ) ): print (d) print - print "Symlinks in traversed directories for %s\n" % arg - for k in links: print "%s: %s" % ( k, links[k] ) + print ("Symlinks in traversed directories for %s\n" % arg) + for k in links: print ("%s: %s" % ( k, links[k] )) print return 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/maya/Tests/RunTests.py new/alembic-1.8.8/maya/Tests/RunTests.py --- old/alembic-1.8.6/maya/Tests/RunTests.py 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/maya/Tests/RunTests.py 2024-12-02 18:31:02.000000000 +0100 @@ -68,11 +68,11 @@ MayaCmds.loadPlugin(sys.argv[1]) -print 'LOADED', sys.argv[1] +print ('LOADED', sys.argv[1]) MayaCmds.loadPlugin(sys.argv[2]) -print 'LOADED', sys.argv[2] +print ('LOADED', sys.argv[2]) if not os.path.exists(sys.argv[3]): raise RuntimeError (sys.argv[3] + ' does not exist') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/maya/Tests/util.py new/alembic-1.8.8/maya/Tests/util.py --- old/alembic-1.8.6/maya/Tests/util.py 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/maya/Tests/util.py 2024-12-02 18:31:02.000000000 +0100 @@ -272,112 +272,112 @@ fn2 = OpenMaya.MFnCamera( obj2 ) if fn1.filmFit() != fn2.filmFit(): - print "differ in filmFit" + print ("differ in filmFit") return False if not floatDiff(fn1.filmFitOffset(), fn2.filmFitOffset(), 4): - print "differ in filmFitOffset" + print ("differ in filmFitOffset") return False if fn1.isOrtho() != fn2.isOrtho(): - print "differ in isOrtho" + print ("differ in isOrtho") return False if not floatDiff(fn1.orthoWidth(), fn2.orthoWidth(), 4): - print "differ in orthoWidth" + print ("differ in orthoWidth") return False if not floatDiff(fn1.focalLength(), fn2.focalLength(), 4): - print "differ in focalLength" + print ("differ in focalLength") return False if not floatDiff(fn1.lensSqueezeRatio(), fn2.lensSqueezeRatio(), 4): - print "differ in lensSqueezeRatio" + print ("differ in lensSqueezeRatio") return False if not floatDiff(fn1.cameraScale(), fn2.cameraScale(), 4): - print "differ in cameraScale" + print ("differ in cameraScale") return False if not floatDiff(fn1.horizontalFilmAperture(), fn2.horizontalFilmAperture(), 4): - print "differ in horizontalFilmAperture" + print ("differ in horizontalFilmAperture") return False if not floatDiff(fn1.verticalFilmAperture(), fn2.verticalFilmAperture(), 4): - print "differ in verticalFilmAperture" + print ("differ in verticalFilmAperture") return False if not floatDiff(fn1.horizontalFilmOffset(), fn2.horizontalFilmOffset(), 4): - print "differ in horizontalFilmOffset" + print ("differ in horizontalFilmOffset") return False if not floatDiff(fn1.verticalFilmOffset(), fn2.verticalFilmOffset(), 4): - print "differ in verticalFilmOffset" + print ("differ in verticalFilmOffset") return False if not floatDiff(fn1.overscan(), fn2.overscan(), 4): - print "differ in overscan" + print ("differ in overscan") return False if not floatDiff(fn1.nearClippingPlane(), fn2.nearClippingPlane(), 4): - print "differ in nearClippingPlane" + print ("differ in nearClippingPlane") return False if not floatDiff(fn1.farClippingPlane(), fn2.farClippingPlane(), 4): - print "differ in farClippingPlane" + print ("differ in farClippingPlane") return False if not floatDiff(fn1.preScale(), fn2.preScale(), 4): - print "differ in preScale" + print ("differ in preScale") return False if not floatDiff(fn1.postScale(), fn2.postScale(), 4): - print "differ in postScale" + print ("differ in postScale") return False if not floatDiff(fn1.filmTranslateH(), fn2.filmTranslateH(), 4): - print "differ in filmTranslateH" + print ("differ in filmTranslateH") return False if not floatDiff(fn1.filmTranslateV(), fn2.filmTranslateV(), 4): - print "differ in filmTranslateV" + print ("differ in filmTranslateV") return False if not floatDiff(fn1.horizontalRollPivot(), fn2.horizontalRollPivot(), 4): - print "differ in horizontalRollPivot" + print ("differ in horizontalRollPivot") return False if not floatDiff(fn1.verticalRollPivot(), fn2.verticalRollPivot(), 4): - print "differ in verticalRollPivot" + print ("differ in verticalRollPivot") return False if fn1.filmRollOrder() != fn2.filmRollOrder(): - print "differ in filmRollOrder" + print ("differ in filmRollOrder") return False if not floatDiff(fn1.filmRollValue(), fn2.filmRollValue(), 4): - print "differ in filmRollValue" + print ("differ in filmRollValue") return False if not floatDiff(fn1.fStop(), fn2.fStop(), 4): - print "differ in fStop" + print ("differ in fStop") return False if not floatDiff(fn1.focusDistance(), fn2.focusDistance(), 4,): - print "differ in focusDistance" + print ("differ in focusDistance") return False if not floatDiff(fn1.shutterAngle(), fn2.shutterAngle(), 4): - print "differ in shutterAngle" + print ("differ in shutterAngle") return False if fn1.usePivotAsLocalSpace() != fn2.usePivotAsLocalSpace(): - print "differ in usePivotAsLocalSpace" + print ("differ in usePivotAsLocalSpace") return False if fn1.tumblePivot() != fn2.tumblePivot(): - print "differ in tumblePivot" + print ("differ in tumblePivot") return False return True @@ -387,35 +387,35 @@ # basic error checking obj1 = getObjFromName(nodeName1) if not obj1.hasFn(OpenMaya.MFn.kNurbsCurve): - print nodeName1, "not a curve." + print (nodeName1, "not a curve.") return False obj2 = getObjFromName(nodeName2) if not obj2.hasFn(OpenMaya.MFn.kNurbsCurve): - print nodeName2, "not a curve." + print (nodeName2, "not a curve.") return False fn1 = OpenMaya.MFnNurbsCurve(obj1) fn2 = OpenMaya.MFnNurbsCurve(obj2) if fn1.degree() != fn2.degree(): - print nodeName1, nodeName2, "degrees differ." + print (nodeName1, nodeName2, "degrees differ.") return False if fn1.numCVs() != fn2.numCVs(): - print nodeName1, nodeName2, "numCVs differ." + print (nodeName1, nodeName2, "numCVs differ.") return False if fn1.numSpans() != fn2.numSpans(): - print nodeName1, nodeName2, "spans differ." + print (nodeName1, nodeName2, "spans differ.") return False if fn1.numKnots() != fn2.numKnots(): - print nodeName1, nodeName2, "numKnots differ." + print (nodeName1, nodeName2, "numKnots differ.") return False if fn1.form() != fn2.form(): - print nodeName1, nodeName2, "form differ." + print (nodeName1, nodeName2, "form differ.") return False cv1 = OpenMaya.MPointArray() @@ -424,7 +424,7 @@ fn2.getCVs(cv2) if not comparePointArray(cv1, cv2): - print nodeName1, nodeName2, "points differ." + print (nodeName1, nodeName2, "points differ.") return False # we do not need to compare knots, since they aren't stored in Alembic diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/python/CMakeLists.txt new/alembic-1.8.8/python/CMakeLists.txt --- old/alembic-1.8.6/python/CMakeLists.txt 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/python/CMakeLists.txt 2024-12-02 18:31:02.000000000 +0100 @@ -34,4 +34,3 @@ ##-***************************************************************************** ADD_SUBDIRECTORY(PyAlembic) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/python/PyAlembic/PyAbcGeomTypes.cpp new/alembic-1.8.8/python/PyAlembic/PyAbcGeomTypes.cpp --- old/alembic-1.8.6/python/PyAlembic/PyAbcGeomTypes.cpp 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/python/PyAlembic/PyAbcGeomTypes.cpp 2024-12-02 18:31:02.000000000 +0100 @@ -94,6 +94,7 @@ enum_<AbcG::CurveType>( "CurveType" ) .value( "kCubic", AbcG::kCubic ) .value( "kLinear", AbcG::kLinear ) + .value( "kVariableOrder", AbcG::kVariableOrder ) ; // BasisType diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/python/PyAlembic/PyOCurves.cpp new/alembic-1.8.8/python/PyAlembic/PyOCurves.cpp --- old/alembic-1.8.6/python/PyAlembic/PyOCurves.cpp 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/python/PyAlembic/PyOCurves.cpp 2024-12-02 18:31:02.000000000 +0100 @@ -85,14 +85,20 @@ const AbcG::OFloatGeomParam::Sample, const AbcG::OV2fGeomParam::Sample, const AbcG::ON3fGeomParam::Sample, - const AbcG::BasisType>( + const AbcG::BasisType, + const Abc::FloatArraySample, + const Abc::UcharArraySample, + const Abc::FloatArraySample>( ( arg( "iPos" ), arg( "iNVertices" ), arg( "iType" ) = AbcG::kCubic, arg( "iWrap" ) = AbcG::kNonPeriodic, arg( "iWidth" ) = AbcG::OFloatGeomParam::Sample(), arg( "iUVs" ) = AbcG::OV2fGeomParam::Sample(), arg( "iNormals" ) = AbcG::ON3fGeomParam::Sample(), - arg( "iBasis" ) = AbcG::kBezierBasis ) ) + arg( "iBasis" ) = AbcG::kBezierBasis, + arg( "iPosWeight" ) = Abc::FloatArraySample(), + arg( "iOrders" ) = Abc::UcharArraySample(), + arg( "iKnots" ) = Abc::FloatArraySample() ) ) [with_custodian_and_ward<1,2, with_custodian_and_ward<1,3> >()] ) .def( "getWidths", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/python/PyAlembic/PyVisibility.cpp new/alembic-1.8.8/python/PyAlembic/PyVisibility.cpp --- old/alembic-1.8.6/python/PyAlembic/PyVisibility.cpp 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/python/PyAlembic/PyVisibility.cpp 2024-12-02 18:31:02.000000000 +0100 @@ -46,6 +46,8 @@ enum_<AbcG::ObjectVisibility>( "ObjectVisibility" ) .value( "kVisibilityDeferred", AbcG::kVisibilityDeferred ) .value( "kVisibilityHidden", AbcG::kVisibilityHidden ) + .value( "kVisibilityVisible", AbcG::kVisibilityVisible ) + // typo kept for historical reasons, consider removing .value( "kkVisibilityVisible", AbcG::kVisibilityVisible ) ; @@ -55,7 +57,7 @@ ( Abc::OObject&, AbcU::uint32_t ) = &AbcG::CreateVisibilityProperty; AbcG::OVisibilityProperty ( *CreateVisibilityPropertyByTimeSamplingPtr ) - ( Abc::OObject&, AbcA::TimeSamplingPtr ) = + ( Abc::OObject&, AbcA::TimeSamplingPtr ) = &AbcG::CreateVisibilityProperty; def( "CreateVisibilityProperty", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/python/PyAlembic/Tests/PyAbcEcho.py new/alembic-1.8.8/python/PyAlembic/Tests/PyAbcEcho.py --- old/alembic-1.8.6/python/PyAlembic/Tests/PyAbcEcho.py 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/python/PyAlembic/Tests/PyAbcEcho.py 2024-12-02 18:31:02.000000000 +0100 @@ -43,36 +43,36 @@ indent = " " * iIndent for i, s in enumerate( iProp.arraySamples ): - print "%ssample %d:" % ( indent, i ) + print ("%ssample %d:" % ( indent, i )) if s is None: - print indent, "********** Got nothing **********" + print (indent, "********** Got nothing **********") else: - print indent, + print (indent,) for j in s: - print j, + print (j,) print def visitScalarSamples( iProp, iIndent ): indent = " " * iIndent for i, s in enumerate( iProp.scalarSamples ): - print "%ssample %d:" % ( indent, i ) + print ("%ssample %d:" % ( indent, i )) if s is None: - print indent, "********** Got nothing **********" + print (indent, "********** Got nothing **********") else: - print "%s%s" % ( indent, s ) + print ("%s%s" % ( indent, s )) def visitArraySamples( iProp, iIndent ): indent = " " * iIndent for i, s in enumerate( iProp.samples ): - print "%ssample %d:" % ( indent, i ) + print ("%ssample %d:" % ( indent, i )) if s is None: - print indent, "********** Got nothing **********" + print (indent, "********** Got nothing **********") else: - print indent, + print (indent,) for j in s: - print j, + print (j,) print def visitCompoundProperty( iProp, iIndent ): @@ -81,7 +81,7 @@ name = "name=%s" % iProp.getName() interp = "schema=%s" % iProp.getMetaData().get( "schema" ) - print "%s%s %s; %s" % ( indent, ptype, name, interp ) + print ("%s%s %s; %s" % ( indent, ptype, name, interp )) visitProperties( iProp, iIndent+2 ) @@ -93,7 +93,7 @@ dtype = "datatype=%s" % iProp.getDataType() numsamps = "numsamps=%s" %iProp.getNumSamples() - print "%s%s %s; %s; %s; %s" % ( indent, ptype, name, md, dtype, numsamps ) + print ("%s%s %s; %s; %s; %s" % ( indent, ptype, name, md, dtype, numsamps )) if iProp.isScalar(): if iProp.getDataType().getExtent() == 1: @@ -124,7 +124,7 @@ if path != "/": iIndent += 2 - print "%s%s %s" % ( indent, ptype, name ) + print ("%s%s %s" % ( indent, ptype, name )) visitProperties( iObj.getProperties(), iIndent ) @@ -134,19 +134,19 @@ def visitArchive( iArg ): iArchive = IArchive( iArg ) - print "AbcEcho for %s" % GetLibraryVersion() + print ("AbcEcho for %s" % GetLibraryVersion()) info = GetArchiveInfo ( iArchive ) if len( info['appName'] ) > 0: - print " file written by : %s" % info['appName'] - print " using Alembic : %s" % info['libraryVersionString'] - print " written on : %s" % info['whenWritten'] - print " user description by: %s" % info['userDescription'] + print (" file written by : %s" % info['appName']) + print (" using Alembic : %s" % info['libraryVersionString']) + print (" written on : %s" % info['whenWritten']) + print (" user description by: %s" % info['userDescription']) print else: - print iArg - print " (file doesn't have any ArchiveInfo)" + print (iArg) + print (" (file doesn't have any ArchiveInfo)") print visitObject( iArchive.getTop() ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/python/PyAlembic/Tests/curvesData.py new/alembic-1.8.8/python/PyAlembic/Tests/curvesData.py --- old/alembic-1.8.6/python/PyAlembic/Tests/curvesData.py 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/python/PyAlembic/Tests/curvesData.py 2024-12-02 18:31:02.000000000 +0100 @@ -41,7 +41,7 @@ array = iTPTraits.arrayType( len( iList ) ) for i in range( len( iList ) ): array[i] = iList[i] - return array + return array numVerts = setArray( Int32TPTraits, 8, 4 ) @@ -91,3 +91,22 @@ # second curve 0.25, 0.5, 0.75, 1.0 ) + +orders_array = setArray( Uint8TPTraits, 4, 2 ) + +weights = setArray( Float32TPTraits, + # first curve + 1.0, 0.8, 0.6, 0.4, 0.4, 0.6, 0.8, 1.0, + + # second curve + 1.0, 1.0, 1.0, 1.0 +) + +knots_array = setArray( + Float32TPTraits, + # first curve 8 vertices 4 order so 12 knots + 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, + + # second curve 4 vertices 2 order so 6 knots + 0.1, 0.1, 0.2, 0.4, 0.6, 0.6 +) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.6/python/PyAlembic/Tests/testCurves.py new/alembic-1.8.8/python/PyAlembic/Tests/testCurves.py --- old/alembic-1.8.6/python/PyAlembic/Tests/testCurves.py 2023-09-25 22:52:30.000000000 +0200 +++ new/alembic-1.8.8/python/PyAlembic/Tests/testCurves.py 2024-12-02 18:31:02.000000000 +0100 @@ -43,8 +43,9 @@ kVertexScope = GeometryScope.kVertexScope kCubic = CurveType.kCubic +kVariableOrder = CurveType.kVariableOrder kNonPeriodic = CurvePeriodicity.kNonPeriodic - +kBezierBasis = BasisType.kBezierBasis class CurvesTest(unittest.TestCase): @@ -93,6 +94,24 @@ for i in range(0,5): self.doSample( myCurves ) + def testCurvesExport2(self): + 'write some variable order curves' + + myCurves = OCurves( OArchive( 'curves2.abc' ).getTop(), + 'variable' ) + + curves = myCurves.getSchema() + + widthSamp = OFloatGeomParamSample( widths, kVertexScope ) + uvSamp = OV2fGeomParamSample( uvs, kVertexScope ) + + curvesSamp = OCurvesSchemaSample( verts, numVerts, kVariableOrder, + kNonPeriodic, widthSamp, uvSamp, ON3fGeomParamSample(), + kBezierBasis, weights, orders_array, knots_array ) + curvesSamp.setKnots(knots_array) + + curves.set( curvesSamp ) + def testCurvesImport(self): """read an iarchive with a curve in it""" @@ -105,13 +124,39 @@ self.assertEqual(curvesSamp.getSelfBounds().min(), V3d( -1.0, -1.0, -1.0 )) self.assertEqual(curvesSamp.getSelfBounds().max(), V3d( 1.0, 1.0, 1.0 )) + positions = curvesSamp.getPositions() + + self.assertEqual(len( positions ), 12) + + for i in range( len( positions ) ): + self.assertEqual(positions[i], verts[i]) + + widthSamp = curves.getWidthsParam().getExpandedValue() + + self.assertEqual(len( widthSamp.getVals() ), 12) + self.assertTrue(IFloatGeomParam.matches( curves.getWidthsParam().getHeader())) + self.assertEqual(widthSamp.getScope(), kVertexScope) + + def testCurvesImport2(self): + 'read an iarchive with variable order curves' + + + myCurves = ICurves( IArchive( 'curves2.abc' ).getTop(), + 'variable' ) + curves = myCurves.getSchema() + + curvesSamp = curves.getValue() + + self.assertEqual(curvesSamp.getSelfBounds().min(), V3d( -1.0, -1.0, -1.0 )) + self.assertEqual(curvesSamp.getSelfBounds().max(), V3d( 1.0, 1.0, 1.0 )) + knots = curvesSamp.getKnots() - for ii in range(4): - self.assertEqual(knots[ii], ii) + for ii in range(len(knots_array)): + self.assertEqual(knots[ii], knots_array[ii]) orders = curvesSamp.getOrders() - for ii in range(3): - self.assertEqual(orders[ii], ii) + for ii in range(2): + self.assertEqual(orders[ii], orders_array[ii]) positions = curvesSamp.getPositions() @@ -120,8 +165,12 @@ for i in range( len( positions ) ): self.assertEqual(positions[i], verts[i]) + pos_weights = curvesSamp.getPositionWeights() + for i in range( len( pos_weights ) ): + self.assertEqual(pos_weights[i], weights[i]) + widthSamp = curves.getWidthsParam().getExpandedValue() self.assertEqual(len( widthSamp.getVals() ), 12) self.assertTrue(IFloatGeomParam.matches( curves.getWidthsParam().getHeader())) - self.assertEqual(widthSamp.getScope(), kVertexScope) + self.assertEqual(widthSamp.getScope(), kVertexScope) \ No newline at end of file ++++++ fuzztest.patch ++++++ --- /var/tmp/diff_new_pack.ywtfqs/_old 2024-12-09 21:14:04.487249679 +0100 +++ /var/tmp/diff_new_pack.ywtfqs/_new 2024-12-09 21:14:04.491249846 +0100 @@ -1,7 +1,8 @@ -diff -Nur alembic-1.8.1/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp new/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp ---- alembic-1.8.1/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp 2021-05-15 21:42:08.000000000 +0200 -+++ new/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp 2021-05-20 18:27:55.945186656 +0200 -@@ -696,7 +696,8 @@ +Index: alembic-1.8.8/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp +=================================================================== +--- alembic-1.8.8.orig/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp ++++ alembic-1.8.8/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp +@@ -1024,7 +1024,8 @@ int main ( int argc, char *argv[] ) testFuzzer25185(false); testFuzzer25192(true);