Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alembic support #56

Merged
merged 21 commits into from Sep 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cc8b06e
The PxrUsdIn node type in KATANA didn't have the fileInput hint set, …
Sep 12, 2016
7b7cd41
Merge branch 'dev_win_ip' of https://github.com/PixarAnimationStudios…
Sep 12, 2016
a7dd231
Initial implementation of symbolic link resolution.
Sep 14, 2016
921e4ae
Compile usdAbc plugin.
Sep 14, 2016
f4944bb
Cleanup unncessary files.
Sep 14, 2016
15b76bc
Fix crash in incorrect use of boost::regex.
Sep 15, 2016
3a800b9
usdAbc now runs on Windows.
Sep 15, 2016
bf98489
Allow build system to find OPENEXR's IexMath library.
Sep 15, 2016
d45c9da
Fix typo in BUILDING instructions.
Sep 16, 2016
c6ecf0b
Allow Double Conversion location to be specified to CMake.
Sep 16, 2016
6b4bf84
Explicitly add the OpenGL headers to Glf.
Sep 16, 2016
dfa906c
Allow Maya to be compiled without having Maya installed. Still need t…
Sep 19, 2016
7c587b5
Scope the flipping of backward to forward slash in to Ar_DefaultResol…
Sep 19, 2016
819b6cb
Fixed recursive issue with Tf_MakeDirsRec() on Windows.
Sep 19, 2016
02d68c8
Implemented TfReadLink on Windows.
Sep 20, 2016
688f671
Added ArchExpandEnvironmentVariables() so we can expand environment v…
Sep 20, 2016
81b89e9
Re-enable and fix-up a whole bunch of tests.
Sep 20, 2016
0392753
Disable a few more tests for the time being.
Sep 20, 2016
95c7e43
Adding dllexport to some functions missed by the tests.
Sep 21, 2016
875835e
Allow source files in plugins to have a __FILENAME__ property for the…
Sep 21, 2016
e39a3cf
usdObj and usdSchemaExamples now compile on Windows.
Sep 21, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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})
Copy link
Member

Choose a reason for hiding this comment

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

Is this test for ${A} AND NOT ${A} a cmake-ism or a typo?

Choose a reason for hiding this comment

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

As I understand its the difference between

#define A

and

#define A 1

So it tests the variable exists and its not been set to true.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, gotcha :) So much cmake to learn.

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