Skip to content

Commit

Permalink
Merge pull request #56 from JamieKenyonFoundry/dev_win_ip
Browse files Browse the repository at this point in the history
Alembic support
  • Loading branch information
pixar-oss committed Sep 21, 2016
2 parents b13421e + e39a3cf commit f1a2e20
Show file tree
Hide file tree
Showing 69 changed files with 1,325 additions and 984 deletions.
4 changes: 2 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ These plugins are not built by default and must be enabled via the instructions

##### Alembic Plugin

Enable the [Alembic](https://https://github.com/alembic/alembic) plugin in the build
Enable the [Alembic](https://github.com/alembic/alembic) plugin in the build
by specifying the cmake flag ```PXR_BUILD_ALEMBIC_PLUGIN=TRUE``` when invoking cmake.
This plugin is compatible with Alembic 1.5.2. The additional dependencies that must be supplied when invoking cmake are:

| Dependency Name | Description | Version |
| ------------------ |----------------------------------------------------------------------- | ------- |
| ALEMBIC_LOCATION | The location of [Alembic](https://https://github.com/alembic/alembic) | 1.5.2 |
| ALEMBIC_LOCATION | The location of [Alembic](https://github.com/alembic/alembic) | 1.5.2 |
| HDF5_LOCATION | The location of [HDF5](https://www.hdfgroup.org/HDF5/) | 1.8.11 |

For further information see the documentation on the Alembic plugin [here](http://openusd.org/docs/Alembic-USD-Plugin.html).
Expand Down
3 changes: 2 additions & 1 deletion cmake/defaults/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ option(PXR_BUILD_IMAGING "Build imaging components" ON)
option(PXR_BUILD_USD_IMAGING "Build USD imaging components" ON)
option(PXR_BUILD_KATANA_PLUGIN "Build usd katana plugin" ON)
option(PXR_BUILD_MAYA_PLUGIN "Build usd maya plugin" ON)
option(PXR_BUILD_ALEMBIC_PLUGIN "Build the Alembic plugin for USD" OFF)
option(PXR_BUILD_ALEMBIC_PLUGIN "Build the Alembic plugin for USD" ON)
option(PXR_MAYA_TBB_BUG_WORKAROUND "Turn on linker flag (-Wl,-Bsymbolic) to work around a Maya TBB bug" OFF)
option(PXR_HYBRID_BUILD_MODE "Build USD in release with symbols and optimisations disabled" ON)

set(PXR_INSTALL_LOCATION ""
CACHE
Expand Down
14 changes: 14 additions & 0 deletions cmake/macros/Public.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,16 @@ function(pxr_plugin PLUGIN_NAME)
)
endif()

if(sl_CPPFILES)
pxr_add_filename_property(${PLUGIN_NAME} "${sl_CPPFILES}")
endif()
if(sl_PRIVATE_CLASSES)
pxr_add_filename_property(${PLUGIN_NAME} "${sl_PRIVATE_CLASSES}")
endif()
if(sl_PUBLIC_CLASSES)
pxr_add_filename_property(${PLUGIN_NAME} "${sl_PUBLIC_CLASSES}")
endif()

# Plugins do not have a lib* prefix like usual shared libraries
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")

Expand Down Expand Up @@ -626,11 +636,15 @@ function(pxr_plugin PLUGIN_NAME)
PREFIX ${PXR_PREFIX}
)

string(TOUPPER ${PLUGIN_NAME} ucLibName)

set_target_properties(${PLUGIN_NAME}
PROPERTIES
PUBLIC_HEADER
"${sl_PUBLIC_HEADERS};${${PLUGIN_NAME}_PUBLIC_HEADERS}"
INTERFACE_INCLUDE_DIRECTORIES ""
DEFINE_SYMBOL
"${ucLibName}_EXPORTS"
)

# Install and include headers from the build directory.
Expand Down
2 changes: 2 additions & 0 deletions cmake/modules/FindDoubleConversion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ set(LIBRARY_PATHS
/usr/local/lib
/lib
/lib64
${DOUBLE_CONVERSION_DIR}/lib
)

find_path(DOUBLE_CONVERSION_INCLUDE_DIR
double-conversion/double-conversion.h
PATHS ${DOUBLE_CONVERSION_DIR}/include
)

find_library(DOUBLE_CONVERSION_LIBRARY
Expand Down
26 changes: 18 additions & 8 deletions cmake/modules/FindMaya.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,21 @@ endif()
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(Maya
REQUIRED_VARS
MAYA_EXECUTABLE
MAYA_INCLUDE_DIRS
MAYA_LIBRARIES
VERSION_VAR
MAYA_API_VERSION
)
if (${PXR_MAYA_API_ONLY} AND NOT ${PXR_MAYA_API_ONLY})
find_package_handle_standard_args(Maya
REQUIRED_VARS
MAYA_EXECUTABLE
MAYA_INCLUDE_DIRS
MAYA_LIBRARIES
VERSION_VAR
MAYA_API_VERSION
)
else()
find_package_handle_standard_args(Maya
REQUIRED_VARS
MAYA_INCLUDE_DIRS
MAYA_LIBRARIES
VERSION_VAR
MAYA_API_VERSION
)
endif()
1 change: 1 addition & 0 deletions cmake/modules/FindOpenEXR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ endif()
foreach(OPENEXR_LIB
Half
Iex
IexMath
Imath
IlmImf
IlmThread
Expand Down
8 changes: 3 additions & 5 deletions extras/usd/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
set(PXR_PREFIX examples)
set(PXR_INSTALL_SUBDIR share/usd/examples)

if(UNIX)
add_subdirectory(usdObj)
add_subdirectory(usdSchemaExamples)
add_subdirectory(usdMakeFileVariantModelAsset)
endif()
add_subdirectory(usdObj)
add_subdirectory(usdSchemaExamples)
add_subdirectory(usdMakeFileVariantModelAsset)
6 changes: 4 additions & 2 deletions extras/usd/examples/usdObj/fileFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#ifndef USDOBJ_FILE_FORMAT_H
#define USDOBJ_FILE_FORMAT_H

#include "Python.h"
#include "Python.h"
#include "pxr/base/arch/api.h"
#include "pxr/usd/sdf/fileFormat.h"
#include "pxr/base/tf/staticTokens.h"
#include <iosfwd>
Expand All @@ -35,7 +36,8 @@
((Version, "1.0")) \
((Target, "usd"))

TF_DECLARE_PUBLIC_TOKENS(UsdObjFileFormatTokens, USDOBJ_FILE_FORMAT_TOKENS);
TF_DECLARE_PUBLIC_TOKENS(UsdObjFileFormatTokens, ARCH_EXPORT,
USDOBJ_FILE_FORMAT_TOKENS);

TF_DECLARE_WEAK_AND_REF_PTRS(UsdObjFileFormat);
TF_DECLARE_WEAK_AND_REF_PTRS(SdfLayerBase);
Expand Down
8 changes: 5 additions & 3 deletions extras/usd/examples/usdSchemaExamples/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
/// \file usdSchemaExamples/tokens.h

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//
//
// This is an automatically generated file (by usdGenSchema.py).
// Do not hand-edit!
//
//
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

#include "pxr/base/arch/api.h"
#include "pxr/base/tf/staticTokens.h"

/// \hideinitializer
Expand Down Expand Up @@ -70,6 +71,7 @@
/// \li <b>paramsVelocity</b> - UsdSchemaExamplesParamsAPI
/// \li <b>paramsVolume</b> - UsdSchemaExamplesParamsAPI
/// \li <b>target</b> - UsdSchemaExamplesSimple
TF_DECLARE_PUBLIC_TOKENS(UsdSchemaExamplesTokens, USDSCHEMAEXAMPLES_TOKENS);
TF_DECLARE_PUBLIC_TOKENS(UsdSchemaExamplesTokens, ARCH_EXPORT,
USDSCHEMAEXAMPLES_TOKENS);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def _AddShadingToBall(stage):
with shadingVariant.GetVariantEditContext():
whichBall = variantName.split('_')[-1]
texPath = os.path.join(texDir, 'ball%s.tex' % whichBall)
texPath = texPath.replace('\\', '/')
# in the current variant, modify the color
_SetParameters(ballTextureNode, [
('filename', Sdf.ValueTypeNames.String, texPath),
Expand Down
Loading

0 comments on commit f1a2e20

Please sign in to comment.