Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding an NDR plugin for arnold shaders. (#57)
- Registering all the arnold shaders and setting up a filename metadata. - Registering a filename metadata for prims. - Updating Readme with the NDR plugin. - Updating Readme regarding points support. - Updating building docs with the NDR plugin. - Fixing typos in the building docs. - Generating the arnold_usd header for either the procedural, render delegate or ndr plugin and making all these three depend on it. resolves #13
- Loading branch information
1 parent
142afc2
commit 9722136
Showing
14 changed files
with
1,050 additions
and
16 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Copyright 2019 Autodesk, Inc. | ||
# | ||
# 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. | ||
import os | ||
from utils import system, build_tools | ||
|
||
Import('env') | ||
local_env = env.Clone() | ||
|
||
from utils import configure | ||
|
||
src_dir = os.path.join(env['ROOT_DIR'], 'ndr') | ||
source_files = [ | ||
'discovery.cpp', | ||
'parser.cpp', | ||
'utils.cpp', | ||
] | ||
|
||
if system.os != 'windows': | ||
local_env.Append(CXXFLAGS = Split('-fPIC')) | ||
|
||
local_env.Append(CPPDEFINES=['NDRARNOLD_EXPORTS']) | ||
local_env.Append(CPPPATH = [os.path.join(env['ROOT_DIR'], env['BUILD_BASE_DIR'], 'ndr')]) | ||
local_env.Append(LIBS = ['ai']) | ||
|
||
if local_env['USD_BUILD_MODE'] == 'monolithic': | ||
usd_deps = [ | ||
local_env['USD_MONOLITHIC_LIBRARY'], | ||
'tbb', | ||
] | ||
else: | ||
usd_libs = [ | ||
'arch', | ||
'tf', | ||
'gf', | ||
'vt', | ||
'ndr', | ||
'sdr', | ||
'sdf', | ||
'usd', | ||
] | ||
|
||
usd_deps = ['tbb'] | ||
usd_libs, usd_sources = build_tools.link_usd_libraries(local_env, usd_libs) | ||
usd_deps = usd_deps + usd_libs | ||
source_files = source_files + usd_sources | ||
|
||
local_env.Append(LIBS = usd_deps) | ||
if local_env['USD_HAS_PYTHON_SUPPORT']: | ||
local_env.Append(LIBS = [local_env['PYTHON_LIB_NAME'], local_env['BOOST_LIB_NAME'] % 'python']) | ||
|
||
NDRPLUGIN = local_env.SharedLibrary('ndrArnold', source_files, SHLIBPREFIX='') | ||
Return('NDRPLUGIN') |
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,48 @@ | ||
// Copyright 2019 Luma Pictures | ||
// | ||
// 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. | ||
// | ||
// Modifications Copyright 2019 Autodesk, Inc. | ||
// | ||
// 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. | ||
#pragma once | ||
|
||
#include "pxr/base/arch/export.h" | ||
|
||
#if defined(PXR_STATIC) | ||
#define NDRARNOLD_API | ||
#define NDRARNOLD_API_TEMPLATE_CLASS(...) | ||
#define NDRARNOLD_API_TEMPLATE_STRUCT(...) | ||
#define NDRARNOLD_LOCAL | ||
#else | ||
#if defined(NDRARNOLD_EXPORTS) | ||
#define NDRARNOLD_API ARCH_EXPORT | ||
#define NDRARNOLD_API_TEMPLATE_CLASS(...) ARCH_EXPORT_TEMPLATE(class, __VA_ARGS__) | ||
#define NDRARNOLD_API_TEMPLATE_STRUCT(...) ARCH_EXPORT_TEMPLATE(struct, __VA_ARGS__) | ||
#else | ||
#define NDRARNOLD_API ARCH_IMPORT | ||
#define NDRARNOLD_API_TEMPLATE_CLASS(...) ARCH_IMPORT_TEMPLATE(class, __VA_ARGS__) | ||
#define NDRARNOLD_API_TEMPLATE_STRUCT(...) ARCH_IMPORT_TEMPLATE(struct, __VA_ARGS__) | ||
#endif | ||
#define NDRARNOLD_LOCAL ARCH_HIDDEN | ||
#endif |
Oops, something went wrong.