Skip to content

Commit

Permalink
tgupdate: merge tg/simple_features/filterTypes base into tg/simple_fe…
Browse files Browse the repository at this point in the history
…atures/filterTypes
  • Loading branch information
pmolodo committed Jun 20, 2018
2 parents 84bd6ae + de53d39 commit c9e8d68
Show file tree
Hide file tree
Showing 262 changed files with 22,342 additions and 4,508 deletions.
34 changes: 34 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -413,3 +413,37 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You can contact the author at :
- LZ4 homepage : http://www.lz4.org
- LZ4 source repository : https://github.com/lz4/lz4

============================================================
stb
============================================================

stb_image - v2.19 - public domain image loader - http://nothings.org/stb
no warranty implied; use at your own risk

stb_image_resize - v0.95 - public domain image resizing
by Jorge L Rodriguez (@VinoBS) - 2014
http://github.com/nothings/stb

stb_image_write - v1.09 - public domain - http://nothings.org/stb/stb_image_write.h
writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015
no warranty implied; use at your own risk

ALTERNATIVE B - Public Domain (www.unlicense.org)
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
software, either in source code form or as a compiled binary, for any purpose,
commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this
software dedicate any and all copyright interest in the software to the public
domain. We make this dedication for the benefit of the public at large and to
the detriment of our heirs and successors. We intend this dedication to be an
overt act of relinquishment in perpetuity of all present and future rights to
this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

32 changes: 32 additions & 0 deletions build_scripts/build_usd.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,17 @@ def InstallAlembic(context, force, buildArgs):

ALEMBIC = Dependency("Alembic", InstallAlembic, "include/Alembic/Abc/Base.h")

############################################################
# MaterialX

MATERIALX_URL = "https://github.com/materialx/MaterialX/archive/v1.35.5.zip"

def InstallMaterialX(context, force, buildArgs):
with CurrentWorkingDirectory(DownloadURL(MATERIALX_URL, context, force)):
RunCMake(context, force, buildArgs)

MATERIALX = Dependency("MaterialX", InstallMaterialX, "include/MaterialXCore/Library.h")

############################################################
# USD

Expand Down Expand Up @@ -961,6 +972,11 @@ def InstallUSD(context, force, buildArgs):
else:
extraArgs.append('-DPXR_BUILD_ALEMBIC_PLUGIN=OFF')

if context.buildMaterialX:
extraArgs.append('-DPXR_BUILD_MATERIALX_PLUGIN=ON')
else:
extraArgs.append('-DPXR_BUILD_MATERIALX_PLUGIN=OFF')

if context.buildMaya:
if context.mayaLocation:
extraArgs.append('-DMAYA_LOCATION="{mayaLocation}"'
Expand Down Expand Up @@ -1158,6 +1174,14 @@ def InstallUSD(context, force, buildArgs):
subgroup.add_argument("--no-hdf5", dest="enable_hdf5", action="store_false",
help="Disable HDF5 support in the Alembic plugin (default)")

group = parser.add_argument_group(title="MaterialX Plugin Options")
subgroup = group.add_mutually_exclusive_group()
subgroup.add_argument("--materialx", dest="build_materialx", action="store_true",
default=False,
help="Build MaterialX plugin for USD")
subgroup.add_argument("--no-materialx", dest="build_materialx", action="store_false",
help="Do not build MaterialX plugin for USD (default)")

group = parser.add_argument_group(title="Maya Plugin Options")
subgroup = group.add_mutually_exclusive_group()
subgroup.add_argument("--maya", dest="build_maya", action="store_true",
Expand Down Expand Up @@ -1281,6 +1305,9 @@ def __init__(self, args):
self.buildAlembic = args.build_alembic
self.enableHDF5 = self.buildAlembic and args.enable_hdf5

# - MaterialX Plugin
self.buildMaterialX = args.build_materialx

# - Maya Plugin
self.buildMaya = args.build_maya
self.mayaLocation = (os.path.abspath(args.maya_location)
Expand Down Expand Up @@ -1339,6 +1366,9 @@ def ForceBuildDependency(self, dep):
requiredDependencies += [HDF5]
requiredDependencies += [OPENEXR, ALEMBIC]

if context.buildMaterialX:
requiredDependencies += [MATERIALX]

if context.buildImaging:
if context.enablePtex:
requiredDependencies += [PTEX]
Expand Down Expand Up @@ -1470,6 +1500,7 @@ def ForceBuildDependency(self, dep):
Tests {buildTests}
Alembic Plugin {buildAlembic}
HDF5 support: {enableHDF5}
MaterialX Plugin {buildMaterialX}
Maya Plugin {buildMaya}
Katana Plugin {buildKatana}
Houdini Plugin {buildHoudini}
Expand Down Expand Up @@ -1513,6 +1544,7 @@ def FormatBuildArguments(buildArgs):
buildDocs=("On" if context.buildDocs else "Off"),
buildTests=("On" if context.buildTests else "Off"),
buildAlembic=("On" if context.buildAlembic else "Off"),
buildMaterialX=("On" if context.buildMaterialX else "Off"),
enableHDF5=("On" if context.enableHDF5 else "Off"),
buildMaya=("On" if context.buildMaya else "Off"),
buildKatana=("On" if context.buildKatana else "Off"),
Expand Down
1 change: 1 addition & 0 deletions cmake/defaults/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ option(PXR_BUILD_KATANA_PLUGIN "Build usd katana plugin" OFF)
option(PXR_BUILD_MAYA_PLUGIN "Build usd maya plugin" OFF)
option(PXR_BUILD_ALEMBIC_PLUGIN "Build the Alembic plugin for USD" OFF)
option(PXR_BUILD_HOUDINI_PLUGIN "Build the Houdini plugin for USD" OFF)
option(PXR_BUILD_MATERIALX_PLUGIN "Build the MaterialX plugin for USD" OFF)
option(PXR_BUILD_DOCUMENTATION "Generate doxygen documentation" OFF)
option(PXR_ENABLE_GL_SUPPORT "Enable OpenGL based components" ON)
option(PXR_ENABLE_PYTHON_SUPPORT "Enable Python based components for USD" ON)
Expand Down
4 changes: 4 additions & 0 deletions cmake/defaults/Packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ if (PXR_BUILD_ALEMBIC_PLUGIN)
endif()
endif()

if (PXR_BUILD_MATERIALX_PLUGIN)
find_package(MaterialX REQUIRED)
endif()

# ----------------------------------------------

set(BUILD_SHARED_LIBS "${build_shared_libs}")
8 changes: 4 additions & 4 deletions cmake/macros/Private.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,18 @@ function(_install_resource_files NAME pluginInstallPrefix pluginToLibraryPath)
"Failed to parse resource path ${resourceFile}")
endif()

get_filename_component(dirPath ${resourceDestFile} PATH)
get_filename_component(destFileName ${resourceDestFile} NAME)

# plugInfo.json go through an initial template substitution step files
# install it from the binary (gen) directory specified by the full
# path. Otherwise, use the original relative path which is relative to
# the source directory.
if (${resourceFile} STREQUAL "plugInfo.json")
if (${destFileName} STREQUAL "plugInfo.json")
_plugInfo_subst(${NAME} "${pluginToLibraryPath}" ${resourceFile})
set(resourceFile "${CMAKE_CURRENT_BINARY_DIR}/${resourceFile}")
endif()

get_filename_component(dirPath ${resourceDestFile} PATH)
get_filename_component(destFileName ${resourceDestFile} NAME)

install(
FILES ${resourceFile}
DESTINATION ${resourcesPath}/${dirPath}
Expand Down
113 changes: 113 additions & 0 deletions cmake/modules/FindMaterialX.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#
# Copyright 2018 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#
# - Find MaterialX Development Kit
#
# Finds an installed MaterialX Development Kit
#
# Variables that will be defined:
# MATERIALX_FOUND Defined if MaterialX has been detected
# MATERIALX_BASE_DIR Path to the root of the MaterialX installation
# MATERIALX_INCLUDE_DIRS Path to the MaterialX include directories
# MATERIALX_LIB_DIRS Path to the MaterialX libraray directories
# MATERIALX_STDLIB_DIR Path to the MaterialX standard library directory
# MATERIALX_LIBRARIES List of MaterialX libraries

#
# In:
# MATERIALX_ROOT
#
# Out:
# MATERIALX_FOUND
# MATERIALX_INCLUDE_DIRS
# MATERIALX_LIB_DIRS
# MATERIALX_LIBRARIES

find_path(MATERIALX_BASE_DIR
NAMES
include/MaterialXCore/Library.h
HINTS
"${MATERIALX_ROOT}"
"$ENV{MATERIALX_ROOT}"
)

find_path(MATERIALX_INCLUDE_DIRS
MaterialXCore/Library.h
HINTS
"${MATERIALX_ROOT}"
"$ENV{MATERIALX_ROOT}"
"${MATERIALX_BASE_DIR}"
PATH_SUFFIXES
include
DOC
"MaterialX Header Path"
)

find_path(MATERIALX_LIB_DIRS
libMaterialXCore.a
HINTS
"${MATERIALX_ROOT}"
"$ENV{MATERIALX_ROOT}"
"${MATERIALX_BASE_DIR}"
PATH_SUFFIXES
lib
DOC
"MaterialX Library Path"
)

find_path(MATERIALX_STDLIB_DIR
mx_stdlib_defs.mtlx
HINTS
"${MATERIALX_ROOT}"
"$ENV{MATERIALX_ROOT}"
"${MATERIALX_BASE_DIR}"
PATH_SUFFIXES
documents/Libraries
DOC
"MaterialX Standard Libraries Path"
)

foreach(MATERIALX_LIB
Core
Format)
find_library(MATERIALX_${MATERIALX_LIB}_LIBRARY
MaterialX${MATERIALX_LIB}
HINTS
"${MATERIALX_LIB_DIRS}"
DOC
"MaterialX's ${MATERIALX_LIB} library path"
NO_CMAKE_SYSTEM_PATH
)

if (MATERIALX_${MATERIALX_LIB}_LIBRARY)
list(APPEND MATERIALX_LIBRARIES ${MATERIALX_${MATERIALX_LIB}_LIBRARY})
endif ()
endforeach()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MaterialX
REQUIRED_VARS
MATERIALX_BASE_DIR
MATERIALX_INCLUDE_DIRS
MATERIALX_LIB_DIRS
)
1 change: 1 addition & 0 deletions extras/usd/examples/usdObj/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "stream.h"

#include "pxr/base/tf/enum.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/registryManager.h"

#include <map>
Expand Down
1 change: 1 addition & 0 deletions extras/usd/examples/usdObj/streamIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "pxr/pxr.h"
#include "streamIO.h"
#include "stream.h"
#include "pxr/base/tf/stringUtils.h"

#include <boost/lexical_cast.hpp>
#include <boost/iterator.hpp>
Expand Down
9 changes: 6 additions & 3 deletions pxr/base/lib/arch/stackTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ ArchGetAppLaunchTime()
*/
void
ArchSetFatalStackLogging( bool flag )
{
_shouldLogStackToDb = flag;
{
_shouldLogStackToDb = flag;
}

/*
Expand Down Expand Up @@ -863,7 +863,10 @@ _FinishLoggingFatalStackTrace(const char *progname, const char *stackTrace,
void
ArchLogSessionInfo(const char *crashStackTrace)
{
_InvokeSessionLogger(ArchGetProgramNameForErrors(), crashStackTrace);
if (_shouldLogStackToDb)
{
_InvokeSessionLogger(ArchGetProgramNameForErrors(), crashStackTrace);
}
}

void
Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "pxr/base/gf/transform.h"
#include "pxr/base/gf/vec3d.h"

#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"

Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec.template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"

{% if IS_FLOATING_POINT(SCL) -%}
Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"

// Include headers for other vec types to support wrapping conversions and
Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec2f.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"

// Include headers for other vec types to support wrapping conversions and
Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec2h.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"

// Include headers for other vec types to support wrapping conversions and
Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec2i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"


Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"

// Include headers for other vec types to support wrapping conversions and
Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec3f.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"

// Include headers for other vec types to support wrapping conversions and
Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec3h.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"

// Include headers for other vec types to support wrapping conversions and
Expand Down
1 change: 1 addition & 0 deletions pxr/base/lib/gf/wrapVec3i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/wrapTypeHelpers.h"


Expand Down
Loading

0 comments on commit c9e8d68

Please sign in to comment.