-
Notifications
You must be signed in to change notification settings - Fork 202
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
MAYA-104984 MAYA-104641 - Material export via registry #574
Merged
Merged
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bcc1a7d
MAYA-104984 MAYA-104641 - Material export via registry
JGamache-autodesk 1163289
MAYA-104984 - Prevent running draw test if no VP2
JGamache-autodesk 7aff920
MAYA-104984 - Skip draw test in batch
JGamache-autodesk d86a66e
MAYA-104984 - Reworked following review comments
JGamache-autodesk 6118519
Merge branch 'dev' into t_gamaj/MAYA-104984/use_registry_export
JGamache-autodesk 975a571
MAYA-104984 - Added test labels
JGamache-autodesk 2ae96bc
MAYA-104984 - Remove unnecessary copies
JGamache-autodesk 215727f
MAYA-104984 - First batch of reworks
JGamache-autodesk c3afce8
Merge branch 'dev' into t_gamaj/MAYA-104984/use_registry_export
JGamache-autodesk cc5286c
MAYA-104984 - Fix incomplete plugInfo.json
JGamache-autodesk e926c70
MAYA-104984 - Fix over-deregistration.
JGamache-autodesk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# | ||
# Copyright 2020 Autodesk | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
set(TARGET_NAME mayaUsdPreviewSurface) | ||
JGamache-autodesk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
set(install_destination | ||
${CMAKE_INSTALL_PREFIX}/lib/usd | ||
) | ||
|
||
set(resources_install_path | ||
${CMAKE_INSTALL_PREFIX}/lib/usd/${TARGET_NAME}/resources | ||
) | ||
|
||
set(library_install_path | ||
${CMAKE_INSTALL_PREFIX}/lib | ||
) | ||
|
||
add_library(${TARGET_NAME} SHARED) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# sources | ||
# ----------------------------------------------------------------------------- | ||
target_sources(${TARGET_NAME} | ||
PRIVATE | ||
usdPreviewSurface.cpp | ||
usdPreviewSurfaceShadingNodeOverride.cpp | ||
usdPreviewSurfaceWriter.cpp | ||
) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# compiler configuration | ||
# ----------------------------------------------------------------------------- | ||
target_compile_definitions(${TARGET_NAME} | ||
PRIVATE | ||
PXRUSDPREVIEWSURFACE_EXPORTS | ||
$<$<BOOL:${IS_MACOSX}>:OSMac_> | ||
) | ||
|
||
mayaUsd_compile_config(${TARGET_NAME}) | ||
|
||
mayaUsd_promoteHeaderList( | ||
HEADERS | ||
usdPreviewSurface.h | ||
usdPreviewSurfaceShadingNodeOverride.h | ||
BASEDIR | ||
${TARGET_NAME} | ||
) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# include directories | ||
# ----------------------------------------------------------------------------- | ||
target_include_directories(${TARGET_NAME} | ||
PRIVATE | ||
${MAYA_INCLUDE_DIRS} | ||
${CMAKE_BINARY_DIR} | ||
) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# link libraries | ||
# ----------------------------------------------------------------------------- | ||
target_link_libraries(${TARGET_NAME} | ||
PRIVATE | ||
arch | ||
gf | ||
plug | ||
sdf | ||
tf | ||
vt | ||
usdShade | ||
${MAYA_LIBRARIES} | ||
mayaUsd | ||
mayaUsd_Schemas | ||
JGamache-autodesk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# run-time search paths | ||
# ----------------------------------------------------------------------------- | ||
if(IS_MACOSX OR IS_LINUX) | ||
mayaUsd_init_rpath(rpath "lib") | ||
mayaUsd_add_rpath(rpath "${CMAKE_INSTALL_PREFIX}/lib") | ||
if(DEFINED MAYAUSD_TO_USD_RELATIVE_PATH) | ||
mayaUsd_add_rpath(rpath "../${MAYAUSD_TO_USD_RELATIVE_PATH}/lib") | ||
elseif(DEFINED PXR_USD_LOCATION) | ||
mayaUsd_add_rpath(rpath "${PXR_USD_LOCATION}/lib") | ||
endif() | ||
if(IS_LINUX AND DEFINED MAYAUSD_TO_USD_RELATIVE_PATH) | ||
mayaUsd_add_rpath(rpath "../${MAYAUSD_TO_USD_RELATIVE_PATH}/lib64") | ||
endif() | ||
if(IS_MACOSX AND DEFINED MAYAUSD_TO_USD_RELATIVE_PATH) | ||
mayaUsd_add_rpath(rpath "../../../Maya.app/Contents/MacOS") | ||
endif() | ||
mayaUsd_install_rpath(rpath ${TARGET_NAME}) | ||
endif() | ||
|
||
#------------------------------------------------------------------------------ | ||
# install | ||
#------------------------------------------------------------------------------ | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/plugInfo.json" | ||
"${CMAKE_CURRENT_BINARY_DIR}/plugInfo.json" | ||
) | ||
|
||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plugInfo.json | ||
DESTINATION ${resources_install_path} | ||
) | ||
|
||
#install top level plugInfo.json that includes the configured plugInfo.json | ||
install(CODE | ||
"file(WRITE \"${CMAKE_CURRENT_BINARY_DIR}/lib/usd/plugInfo.json\" \"{\n \\\"Includes\\\": [ \\\"*/resources/\\\" ]\n}\")" | ||
) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib/usd/plugInfo.json | ||
DESTINATION ${install_destination} | ||
) | ||
JGamache-autodesk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
install( | ||
TARGETS ${TARGET_NAME} | ||
LIBRARY | ||
DESTINATION ${library_install_path} | ||
ARCHIVE | ||
DESTINATION ${library_install_path} | ||
RUNTIME | ||
DESTINATION ${library_install_path} | ||
) | ||
|
||
if(IS_WINDOWS) | ||
install(FILES $<TARGET_PDB_FILE:${TARGET_NAME}> | ||
DESTINATION ${library_install_path} OPTIONAL | ||
) | ||
endif() | ||
|
||
install( | ||
FILES AEpxrUsdPreviewSurfaceTemplate.mel | ||
DESTINATION plugin/adsk/scripts | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// Copyright 2018 Pixar | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
#ifndef PXRUSDPREVIEWSURFACE_API_H | ||
#define PXRUSDPREVIEWSURFACE_API_H | ||
|
||
#include <pxr/base/arch/export.h> | ||
|
||
#if defined(PXR_STATIC) | ||
# define PXRUSDPREVIEWSURFACE_API | ||
# define PXRUSDPREVIEWSURFACE_API_TEMPLATE_CLASS(...) | ||
# define PXRUSDPREVIEWSURFACE_API_TEMPLATE_STRUCT(...) | ||
# define PXRUSDPREVIEWSURFACE_LOCAL | ||
#else | ||
# if defined(PXRUSDPREVIEWSURFACE_EXPORTS) | ||
# define PXRUSDPREVIEWSURFACE_API ARCH_EXPORT | ||
# define PXRUSDPREVIEWSURFACE_API_TEMPLATE_CLASS(...) ARCH_EXPORT_TEMPLATE(class, __VA_ARGS__) | ||
# define PXRUSDPREVIEWSURFACE_API_TEMPLATE_STRUCT(...) ARCH_EXPORT_TEMPLATE(struct, __VA_ARGS__) | ||
# else | ||
# define PXRUSDPREVIEWSURFACE_API ARCH_IMPORT | ||
# define PXRUSDPREVIEWSURFACE_API_TEMPLATE_CLASS(...) ARCH_IMPORT_TEMPLATE(class, __VA_ARGS__) | ||
# define PXRUSDPREVIEWSURFACE_API_TEMPLATE_STRUCT(...) ARCH_IMPORT_TEMPLATE(struct, __VA_ARGS__) | ||
# endif | ||
# define PXRUSDPREVIEWSURFACE_LOCAL ARCH_HIDDEN | ||
#endif | ||
|
||
#endif |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved from pxr plugin.