From 33c62430acae6c9fc6e88397b825cbe194a29dc9 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 17:07:02 +0500 Subject: [PATCH 01/18] cmake - fix missing `project` Fixes warning ``` CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as project(ProjectName) near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first line. ``` --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75e9b5b..fa0611f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ ##-***************************************************************************** CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) +project(AlembicDocs) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) From cc54f36c11809356f1a29e1981752cba50b7ca5b Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 17:08:17 +0500 Subject: [PATCH 02/18] cmake - update min required cmake to match alembic/alembic Fixes cmake warning ``` CMake Deprecation Warning at CMakeLists.txt:36 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument value. Or, use the ... syntax to tell CMake that the project requires at least but has been updated to work with policies introduced by or earlier. ``` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa0611f..a9e5a17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) +CMAKE_MINIMUM_REQUIRED( VERSION 3.13 ) project(AlembicDocs) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) From 89fa658cc8070c2d5282d3221baa957c10a53aa2 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 17:12:49 +0500 Subject: [PATCH 03/18] examples.rst - use Python 3 --- sphinx/python/examples.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/python/examples.rst b/sphinx/python/examples.rst index b44eafe..ea576c9 100644 --- a/sphinx/python/examples.rst +++ b/sphinx/python/examples.rst @@ -238,7 +238,7 @@ Reading an Archive Read an Alembic archive, also referred to as an :py:class:`.IArchive`. :: >>> iarch = IArchive('polyMesh1.abc') - >>> print "Reading", iarch.getName() + >>> print("Reading", iarch.getName()) Reading polyMesh1.abc @@ -339,7 +339,7 @@ adapted from the previous example and we're only bothering to match against the md = obj.getMetaData() if IPolyMesh.matches(md) or ISubD.matches(md): if obj.getName() == name: - print "Found it!", obj.getFullName() + print("Found it!", obj.getFullName()) return for childObject in obj.children: visitObject(childObject, name) From 3408665a5c13c678e3f9503c715531f88821b590 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 17:13:00 +0500 Subject: [PATCH 04/18] conf.py.in - use Python 3 --- sphinx/conf.py.in | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sphinx/conf.py.in b/sphinx/conf.py.in index 3a33e54..747ad0a 100644 --- a/sphinx/conf.py.in +++ b/sphinx/conf.py.in @@ -65,8 +65,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Alembic' -copyright = u'2012-2016, Sony Pictures Imageworks Inc. and Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.' +project = 'Alembic' +copyright = '2012-2016, Sony Pictures Imageworks Inc. and Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -123,7 +123,7 @@ try: html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] except ImportError as err: - print "Error importing theme, use `easy_install sphinx_rtd_theme`" + print("Error importing theme, use `easy_install sphinx_rtd_theme`") sys.exit(1) # The name for this set of Sphinx documents. If None, it defaults to @@ -203,8 +203,8 @@ htmlhelp_basename = 'AlembicDoc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'Alembic.tex', u'Alembic Documentation', - u'Lucasfilm LTD.', 'manual'), + ('index', 'Alembic.tex', 'Alembic Documentation', + 'Lucasfilm LTD.', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -236,18 +236,18 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'alembic', u'Alembic Documentation', - [u'Lucasfilm LTD.'], 1) + ('index', 'alembic', 'Alembic Documentation', + ['Lucasfilm LTD.'], 1) ] # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. -epub_title = u'Alembic' -epub_author = u'Lucasfilm LTD.' -epub_publisher = u'Lucasfilm LTD.' -epub_copyright = u'2012-2016, Lucasfilm LTD.' +epub_title = 'Alembic' +epub_author = 'Lucasfilm LTD.' +epub_publisher = 'Lucasfilm LTD.' +epub_copyright = '2012-2016, Lucasfilm LTD.' # The language of the text. It defaults to the language option # or en if the language is not set. From c655521d9d8b6d89bc808c03a620d15f9dad0fe8 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 17:23:31 +0500 Subject: [PATCH 05/18] cmake - use FindPython instead of FindPythonInterp To fix warning ``` CMake Warning (dev) at CMakeLists.txt:44 (find_package): Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed. Run "cmake --help-policy CMP0148" for policy details. Use the cmake_policy command to set the policy and suppress this warning. ``` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9e5a17..d29ca3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) if (NOT DOXYGEN_EXECUTABLE) find_package( Doxygen REQUIRED ) endif() -find_package( PythonInterp REQUIRED ) +find_package( Python REQUIRED COMPONENTS Interpreter ) find_package( Alembic REQUIRED ) CONFIGURE_FILE ( From badefa5b9648c17d956a28f75e722aacb32125cf Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 17:28:03 +0500 Subject: [PATCH 06/18] Document requirements, use `pip` --- README.md | 7 ++++--- requirements.txt | 3 +++ sphinx/conf.py.in | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 5871782..d3d8e8a 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,11 @@ The documentation [website](http://docs.alembic.io) for Requires -------- -:: - - sphinx 1.4 (pip install sphinx) - - breathe 4.1.0 (pip install breathe) +- `doxygen` available from PATH +- `alembic` and `imath` installed as Python modules +- [`alembic`](https://github.com/alembic/alembic/) installed and available from PATH +- Python dependencies - can be installed with `pip install -r requirements.txt` Building -------- diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..992b598 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +sphinx +breathe +sphinx_rtd_theme diff --git a/sphinx/conf.py.in b/sphinx/conf.py.in index 747ad0a..0fc6a60 100644 --- a/sphinx/conf.py.in +++ b/sphinx/conf.py.in @@ -123,7 +123,7 @@ try: html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] except ImportError as err: - print("Error importing theme, use `easy_install sphinx_rtd_theme`") + print("Error importing theme, use `pip install sphinx_rtd_theme`") sys.exit(1) # The name for this set of Sphinx documents. If None, it defaults to From d3e865cd5de35b173a57181a7132799a5d46719e Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 17:29:10 +0500 Subject: [PATCH 07/18] Replace `sphinx.ext.pngmath` with `sphinx.ext.imgmath` It was removed in https://www.sphinx-doc.org/en/master/changes/1.8.html --- sphinx/conf.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/conf.py.in b/sphinx/conf.py.in index 0fc6a60..967ba71 100644 --- a/sphinx/conf.py.in +++ b/sphinx/conf.py.in @@ -24,7 +24,7 @@ import alembic # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', - 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', + 'sphinx.ext.coverage', 'sphinx.ext.imgmath', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.autosummary', 'breathe'] def get_header_files(path): From a9ccede3abd2b4cb6352a0b2c8837929c69fffc1 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 17:32:09 +0500 Subject: [PATCH 08/18] Remove deprecated `get_html_theme_path` call Resolves warning: ``` WARNING: Calling get_html_theme_path is deprecated. If you are calling it to define html_theme_path, you are safe to remove that code. ``` --- sphinx/conf.py.in | 1 - 1 file changed, 1 deletion(-) diff --git a/sphinx/conf.py.in b/sphinx/conf.py.in index 967ba71..3d834fc 100644 --- a/sphinx/conf.py.in +++ b/sphinx/conf.py.in @@ -120,7 +120,6 @@ pygments_style = 'sphinx' try: import sphinx_rtd_theme html_theme = "sphinx_rtd_theme" - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] except ImportError as err: print("Error importing theme, use `pip install sphinx_rtd_theme`") From b15cb0b76202b0cf78932ba8cc6952fd715db09b Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 18:00:17 +0500 Subject: [PATCH 09/18] conf.py - remove non-existent `_static` file Fixes warning: ``` WARNING: html_static_path entry '_static' does not exist ``` --- sphinx/conf.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/conf.py.in b/sphinx/conf.py.in index 3d834fc..7b55758 100644 --- a/sphinx/conf.py.in +++ b/sphinx/conf.py.in @@ -144,7 +144,7 @@ html_logo = "alembic.png" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. From f8eb10c91f43a0446c8c6ccae6cfc2a876596c70 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 18:13:29 +0500 Subject: [PATCH 10/18] conf.py - fix substitution definitions syntax Fixes warning: ``` :1: WARNING: Substitution definition "version" empty or invalid. .. |version| replace: 1.8.9 [docutils] ``` --- sphinx/conf.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/conf.py.in b/sphinx/conf.py.in index 7b55758..1366608 100644 --- a/sphinx/conf.py.in +++ b/sphinx/conf.py.in @@ -279,5 +279,5 @@ epub_copyright = '2012-2016, Lucasfilm LTD.' # Allow duplicate toc entries. #epub_tocdup = True -rst_epilog = ".. |version| replace: %s" % version +rst_epilog = '.. |version| replace:: %s' % version From 013ab7aa55bce00ffed835fdf5c729f089c2adae Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 18:42:45 +0500 Subject: [PATCH 11/18] abcm.rst - escape `_`, so sphinx will stop confusing with a reference Fixes warnings: ``` L:\Projects\Github\alembic-docs\sphinx\reference\abcm.rst:15: ERROR: Unknown target name: "coshader". [docutils] L:\Projects\Github\alembic-docs\sphinx\python\abcm.rst:15: ERROR: Unknown target name: "coshader". [docutils] ``` --- sphinx/python/abcm.rst | 2 +- sphinx/reference/abcm.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/python/abcm.rst b/sphinx/python/abcm.rst index acfeed9..e2d54d8 100644 --- a/sphinx/python/abcm.rst +++ b/sphinx/python/abcm.rst @@ -14,7 +14,7 @@ include a document of conventions for interchange via a reserved "abc" target va shader type: a string representing a shader classification by name and agreed-upon convention. Examples include "surface," "displacement" and "light." This could also -express things like "coshader_taco" in which the value text following the "coshader_" +express things like "coshader_taco" in which the value text following the "coshader\_" prefix is used as a coshader instance name. shader name: a string identifying a shader object within a specified target and shader diff --git a/sphinx/reference/abcm.rst b/sphinx/reference/abcm.rst index 7ef85ab..f56de79 100644 --- a/sphinx/reference/abcm.rst +++ b/sphinx/reference/abcm.rst @@ -14,7 +14,7 @@ include a document of conventions for interchange via a reserved "abc" target va shader type: a string representing a shader classification by name and agreed-upon convention. Examples include "surface," "displacement" and "light." This could also -express things like "coshader_taco" in which the value text following the "coshader_" +express things like "coshader_taco" in which the value text following the "coshader\_" prefix is used as a coshader instance name. shader name: a string identifying a shader object within a specified target and shader From 3a50a84773e531ca91879f73ac9084b1c1632771 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 18:56:43 +0500 Subject: [PATCH 12/18] Add documents to index toctree to fix sphinx warnings Fixes warnings: ``` L:\Projects\Github\alembic-docs\sphinx\python\examples.rst: WARNING: document isn't included in any toctree [toc.not_included] L:\Projects\Github\alembic-docs\sphinx\reference\index.rst: WARNING: document isn't included in any toctree [toc.not_included] ``` --- sphinx/index.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sphinx/index.rst b/sphinx/index.rst index dd3e160..7b5274b 100644 --- a/sphinx/index.rst +++ b/sphinx/index.rst @@ -16,6 +16,12 @@ that result from an arbitrarily complex animation and simulation process, but wi attempt to store a representation of the network of computations (rigs, basically) which were required to produce the final, animated vertex positions and animated transforms. +.. toctree:: + :maxdepth: 2 + :hidden: + + python/examples + reference/index Get Alembic ----------- From 773ebcf0de861e18d1e62075d1d5bf3b7749e3d9 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 18:44:01 +0500 Subject: [PATCH 13/18] examples.rst - add import statements To make snippets reproducable without wildcard imports. --- sphinx/python/examples.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sphinx/python/examples.rst b/sphinx/python/examples.rst index ea576c9..5a7ca0f 100644 --- a/sphinx/python/examples.rst +++ b/sphinx/python/examples.rst @@ -79,6 +79,7 @@ Our sample output Archive will contain a single animated Transform with a single as its child. Because we're creating an :py:class:`.OArchive`, this will create (or clobber) the archive file with this filename: :: + >>> from alembic.Abc import OArchive >>> oarch = OArchive('polyMesh1.abc') @@ -103,6 +104,7 @@ An :py:class:`.OPolyMesh` is-an OObject that has-an :py:class:`.OPolyMeshSchema`. An OPolyMeshSchema is-an :py:class:`.OCompoundProperty`. In this case, we're parenting the PolyMesh under the Archive's top node and naming it "meshy". :: + >>> from alembic.AbcGeom import OPolyMesh >>> meshObj = OPolyMesh(oarch.getTop(), "meshy") >>> mesh = meshyObj.getSchema() @@ -174,16 +176,19 @@ The typed GeomParams have an inner Sample class that is used for setting and get according to the type of data they will contain, for example the :py:class:`.OV2fGeomParamSample` is used to store V2f data, such as UVs. Continuing our example: :: + >>> from alembic.AbcGeom import OPolyMeshSchemaSample >>> uvsamp = OV2fGeomParamSample(uvs, kFacevaryingScope) Normals have their own type. :: + >>> from alembic.AbcGeom import ON3fGeomParamSample >>> nsamp = ON3fGeomParamSample(normals, kFacevaryingScope) Create a :py:class:`.OPolyMeshSchemaSample` Sample. We're creating the Sample inline here, but we could create a static sample and leave it around, only modifying the parts that have changed. The first sample should contain at least all of the required data for a PolyMesh. :: + >>> from alembic.AbcGeom import OPolyMeshSchemaSample >>> mesh_samp = OPolyMeshSchemaSample(verts, indices, counts, uvsamp, nsamp) Make up some bounding box data and set it on the sample. :: @@ -237,6 +242,7 @@ Reading an Archive Read an Alembic archive, also referred to as an :py:class:`.IArchive`. :: + >>> from alembic.Abc import IArchive >>> iarch = IArchive('polyMesh1.abc') >>> print("Reading", iarch.getName()) Reading polyMesh1.abc @@ -263,6 +269,7 @@ called *ABC*. So, in our example: :: All scene data is parented under this top node. :: + >>> from alembic.AbcGeom import IPolyMesh >>> meshObj = IPolyMesh(top, "meshy") >>> mesh = meshObj.getSchema() >>> N = mesh.getNormalsParam() @@ -273,6 +280,7 @@ All scene data is parented under this top node. :: If you don't know the object type of the input data, you can check the Object MetaData and match it to a specific type. :: + >>> from alembic.AbcGeom import IPolyMesh, IPolyMeshSchema >>> obj = top.children[0] >>> if IPolyMeshSchema.matches(obj): >>> ... meshObj = IPolyMesh(obj, KWrapExisting) @@ -335,6 +343,9 @@ adapted from the previous example and we're only bothering to match against the :: + from alembic.Abc import IArchive + from alembic.AbcGeom import IPolyMesh, ISubD + def visitObject(obj, name): md = obj.getMetaData() if IPolyMesh.matches(md) or ISubD.matches(md): @@ -357,6 +368,10 @@ name, we're going to call a new function, :py:func:`getBounds()`. :: + import imath + from alembic.Abc import IArchive + from alembic.AbcGeom import IPolyMesh, ISubD, IXform + gBounds = imath.Box3d() gBounds.makeEmpty() kWrapExisting = alembic.Abc.WrapExistingFlag.kWrapExisting @@ -408,6 +423,15 @@ workflows. Here we need an :py:class:`.OCompoundProperty` to use as the parent o :: + from alembic.Abc import OArchive + from alembic.AbcGeom import ( + OPolyMesh, + OPolyMeshSchemaSample, + ODoubleProperty, + OP3fGeomParamSample, + OInt32GeomParamSample + ) + archive = OArchive("crazyPolyMesh1.abc") meshObj = OPolyMesh(archive.getTop(), "crazy") From bc84d5bef18e6de7aa2742c18624cd173beca10e Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 23:45:31 +0500 Subject: [PATCH 14/18] FindAlembic - delegate `Alembic_FOUND` handling to cmake 1) Used `find_package_handle_standard_args` to handle required variables automatically. It also handles `REQUIRED` keyword in `find_package` which previously had no effect, though it was used in cmake. 2) Simplified if statements a bit - `-NOTFOUND` variables evaluate to `FALSE` in cmake automatically. --- cmake/FindAlembic.cmake | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/cmake/FindAlembic.cmake b/cmake/FindAlembic.cmake index 6aa6d12..5272a17 100644 --- a/cmake/FindAlembic.cmake +++ b/cmake/FindAlembic.cmake @@ -105,20 +105,22 @@ FIND_LIBRARY(ALEMBIC_LIB Alembic DOC "The Alembic library" ) -SET( ALEMBIC_FOUND TRUE ) - -IF (${ALEMBIC_INCLUDE_PATH} STREQUAL "ALEMBIC_INCLUDE_PATH-NOTFOUND") - MESSAGE( STATUS "Alembic include path not found" ) - SET(ALEMBIC_FOUND FALSE) -ELSE() +IF(ALEMBIC_INCLUDE_PATH) GET_FILENAME_COMPONENT(ALEMBIC_INCLUDE_PATH ${ALEMBIC_INCLUDE_PATH} DIRECTORY) - MESSAGE(STATUS "ALEMBIC_INCLUDE_PATH ${ALEMBIC_INCLUDE_PATH}") + MESSAGE(STATUS "Alembic include path is found at '${ALEMBIC_INCLUDE_PATH}'") +ELSE() + MESSAGE(STATUS "Alembic include path not found" ) ENDIF() -IF (${ALEMBIC_LIB} STREQUAL "ALEMBIC_LIB-NOTFOUND") - MESSAGE( STATUS "Alembic library not found" ) - SET( ALEMBIC_FOUND FALSE ) - SET( ALEMBIC_LIB NOTFOUND ) +IF(ALEMBIC_LIB) + MESSAGE(STATUS "Alembic library is found at '${ALEMBIC_LIB}'") ELSE() - MESSAGE(STATUS "ALEMBIC_LIB ${ALEMBIC_LIB}") + MESSAGE(STATUS "Alembic library not found" ) ENDIF() + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args( + Alembic + REQUIRED_VARS ALEMBIC_INCLUDE_PATH ALEMBIC_LIB +) From 4614f09f4e1be2dec590513f08b00a95396ac113 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 23:46:05 +0500 Subject: [PATCH 15/18] FindAlembic - document used variables --- cmake/FindAlembic.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/FindAlembic.cmake b/cmake/FindAlembic.cmake index 5272a17..ac2607b 100644 --- a/cmake/FindAlembic.cmake +++ b/cmake/FindAlembic.cmake @@ -32,6 +32,16 @@ ## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## ##-***************************************************************************** +# +# +# Module resulting variables: +# - `Alembic_FOUND` - `TRUE` if Alembic was found +# - `ALEMBIC_INCLUDE_PATH` - include directory path +# - `ALEMBIC_LIB` - path to library +# +# Other variables: +# - `ALEMBIC_ROOT` - installation root folder. Can be provided to hint search paths. +# Also can be provided as an environment variable. IF (NOT ALEMBIC_ROOT AND NOT $ENV{ALEMBIC_ROOT} STREQUAL "") SET(ALEMBIC_ROOT $ENV{ALEMBIC_ROOT}) From 618e9df54e1975fa9be9b0a7600d3a008bbbc925 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 16 Nov 2025 23:57:15 +0500 Subject: [PATCH 16/18] cmake - fix warning providing `ALEMBIC_ROOT` in cmake 3.27+ Fixes warning below: ``` CMake Warning (dev) at CMakeLists.txt:51 (find_package): Policy CMP0144 is not set: find_package uses upper-case _ROOT variables. Run "cmake --help-policy CMP0144" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMake variable ALEMBIC_ROOT is set to: L:\Software\usr\alembic For compatibility, find_package is ignoring the variable, but code in a .cmake module might still use it. This warning is for project developers. Use -Wno-dev to suppress it. ``` --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d29ca3d..ab06b1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,12 @@ if (NOT DOXYGEN_EXECUTABLE) find_package( Doxygen REQUIRED ) endif() find_package( Python REQUIRED COMPONENTS Interpreter ) + +# Allow uppercase `ALEMBIC_ROOT` to be passed without warnings. +# cmake 3.27+ +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif() find_package( Alembic REQUIRED ) CONFIGURE_FILE ( From 937b7da8a75d9cd21b9bf9bbc9636cadba44dae5 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 17 Nov 2025 00:00:26 +0500 Subject: [PATCH 17/18] conf.py - avoid non-existent paths sneaking in Found when there was an issue with `FindAlembic` not handling `REQUIRED`, but I guess it wouldn't hurt to have this check always. --- sphinx/conf.py.in | 1 + 1 file changed, 1 insertion(+) diff --git a/sphinx/conf.py.in b/sphinx/conf.py.in index 1366608..74b1f80 100644 --- a/sphinx/conf.py.in +++ b/sphinx/conf.py.in @@ -29,6 +29,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', def get_header_files(path): h_files = [] + assert os.path.exists(path), path for (path, dirs, files) in os.walk(path): h_files.extend([f for f in files if f.endswith(".h")]) return h_files From 3dca9cf263e89eb07e433da0fcc879c5e5fac072 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 17 Nov 2025 00:16:30 +0500 Subject: [PATCH 18/18] breathe - fix issues with `ALEMBIC_EXPORT` macro --- sphinx/conf.py.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sphinx/conf.py.in b/sphinx/conf.py.in index 74b1f80..8cfd8da 100644 --- a/sphinx/conf.py.in +++ b/sphinx/conf.py.in @@ -34,6 +34,12 @@ def get_header_files(path): h_files.extend([f for f in files if f.endswith(".h")]) return h_files +breathe_doxygen_config_options = { + # Expand export macro to nothing for doxygen to succeed. + "MACRO_EXPANSION": "YES", + "PREDEFINED": "ALEMBIC_EXPORT=", +} + breathe_projects_source = { "Abc": ("@ALEMBIC_INCLUDE_PATH@/Abc", get_header_files("@ALEMBIC_INCLUDE_PATH@/Abc")),