Skip to content

Commit 5551472

Browse files
authored
Merge pull request #29 from frenchdog/feature/BIFROST-11395/update_for_bifrost_2_13_release
BIFROST-11395 - Update to Bifrost 2.13.0.0
2 parents dbeb0bf + 597ced2 commit 5551472

File tree

371 files changed

+33349
-16043
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+33349
-16043
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
.DS_Store
22
__pycache__
33

4+
# clangd
5+
.cache
6+
47
# Visual Studio Code
58
.vscode
69
# jetbrains solutions
710
.idea
11+
12+
# Compilation database
13+
compile_commands.json

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
## [1.3.3] - 2025-03-26 (Bifrost 2.13)
2+
3+
### Build
4+
- BIFROST-11259 - update to Open USD 24.11
5+
6+
### Feature
7+
- BIFROST-11322 - Add Lookdev workflow
8+
- New runtime commands to:
9+
- create_maya_usd_material_library_cmd
10+
- create_lookdev_stage_from_layers_cmd
11+
- open_maya_usd_material_library_cmd
12+
- usd_attribute_quick_look_from_selection_cmd
13+
- prim_selection_to_string_array_compound_cmd
14+
- remove_prim_selection_from_string_to_array_compound_cmd
15+
- select_prims_from_selected_node_cmd
16+
- New compounds:
17+
- apply_look_v2 (for 'iterate_on_model_variants' case)
18+
- apply_usd_material_bindings
19+
- resolve_bindings
20+
- create_lookdev_workflow_stage
21+
- usd_collection_schema
22+
- usd_string_paths_to_array
23+
- New UI dialogs to create or open mayaUsdProxyShape from a USD file:
24+
25+
### Bugfix
26+
- BIFROST-10481 - Fix PointInstancer prototype ordering when using the _define_usd_point_instancer_
27+
- BIFROST-10481 - The default material option is now disable by default in the _define_usd_point_instancer_
28+
- BIFROST-11306 - Fix the model exporter for mayaUSD plugin >= 0.30
29+
130
## [1.3.1] - 2024-10-29 (Bifrost 2.12)
231

332
### Build

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ if( NOT BIFUSD_TEST_RESOURCES_LOCATION )
185185
set( BIFUSD_TEST_RESOURCES_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/test")
186186
endif()
187187
enable_testing()
188+
option(BIFUSD_TEST_GRAPHS "Enable test_graphs.py" ON)
188189
add_subdirectory(utils/test)
189190
add_subdirectory(test)
190191

cmake/bifusd/compiler_Clang.cmake

+47-1
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,51 @@ set(CMAKE_CXX_FLAGS_DEBUG_INIT "${cxx_flags_debug}")
190190
set(cxx_flags -fPIC)
191191

192192
if (BIFUSD_ENABLE_ADDRESS_SANITIZER)
193-
list(APPEND cxx_flags -fsanitize=address)
193+
list(APPEND cxx_flags
194+
-fsanitize=address
195+
-fno-omit-frame-pointer
196+
)
197+
endif()
198+
199+
# Compile using the Undefined Behavior Sanitizer. See:
200+
#
201+
# http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
202+
# http://developers.redhat.com/blog/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/
203+
#
204+
# We are using the same set of flags as using by LLVM when running its own sets
205+
# of checks under UBSan.
206+
if (BIFUSD_ENABLE_UNDEFINED_SANITIZER)
207+
list(APPEND cxx_flags
208+
# All of the checks other than unsigned-integer-overflow
209+
-fsanitize=undefined
210+
211+
# Exclude:
212+
#
213+
# vptr: Use of an object whose vptr indicates that it is of the wrong
214+
# dynamic type, or that its lifetime has not begun or has
215+
# ended. Incompatible with -fno-rtti. Link must be performed by
216+
# clang++, not clang, to make sure C++-specific parts of the runtime
217+
# library and C++ standard libraries are present.
218+
#
219+
# function: Indirect call of a function through a function pointer of
220+
# the wrong type (Linux, C++ and x86/x86_64 only).
221+
#
222+
# object-size: XCode 7.1 version of libc++ contains UB that the
223+
# sanitizer correctly identifies. These are fixed or being fixed in
224+
# the LLVM libc++ development branch. Disable this particular check
225+
# until we get a version of libc++ which supports this.
226+
#
227+
# bool: The bool sanitizer is OFF due to some code in USD that triggers it.
228+
#
229+
# See: http://lists.llvm.org/pipermail/cfe-dev/2013-August/031194.html
230+
# https://llvm.org/bugs/show_bug.cgi?id=19302
231+
# https://llvm.org/bugs/show_bug.cgi?id=24574
232+
-fno-sanitize=bool,vptr,function,object-size
233+
234+
# Helps to get more precise diagnostics for undefined behavior.
235+
-fno-omit-frame-pointer
236+
237+
# exit after the first detected undefined behavior.
238+
-fno-sanitize-recover=undefined,integer
239+
)
194240
endif()

cmake/bifusd/utils.cmake

+20
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ set(bifusd_utils_included true)
2222

2323
option(BIFUSD_USE_DEBUGGER "Launch unit tests using the platform-specific debugger." OFF)
2424
option(BIFUSD_ENABLE_ADDRESS_SANITIZER "Enable AddressSanitizer compiler instrumentations." OFF)
25+
option(BIFUSD_ENABLE_UNDEFINED_SANITIZER "Enable UndefinedBehaviorSanitizer compiler instrumentations." OFF)
2526

2627
# Export the given list of variables from the local scope to the parent scope.
2728
#
@@ -2740,6 +2741,25 @@ function(bifusd_configure_unittest unittest_target)
27402741
set(test_command $<TARGET_FILE:${unittest_target}>)
27412742
endif()
27422743

2744+
# Adjust LD_PRELOAD and DYLD_INSERT_LIBRARIES based on BIFUSD_ASAN_LIBRARY
2745+
# Pass BIFUSD_ASAN_LIBRARY to the test command as an environment variable so that
2746+
# it is part of the python environment when python is launched.
2747+
# For not python tests, it is just an extra env var
2748+
if( BIFUSD_ENABLE_ADDRESS_SANITIZER OR BIFUSD_ENABLE_UNDEFINED_SANITIZER)
2749+
bifusd_append_option(ENV_VARS "BIFUSD_ASAN_LIBRARY=${BIFUSD_ASAN_LIBRARY}")
2750+
if( BIFUSD_EXTRA_SANITIZER_ENV_VARS )
2751+
bifusd_append_option(ENV_VARS "${BIFUSD_EXTRA_SANITIZER_ENV_VARS}")
2752+
endif()
2753+
if (BIFUSD_ASAN_LIBRARY)
2754+
bifusd_append_option(ENV_VARS "BIFUSD_ASAN_LIBRARY=${BIFUSD_ASAN_LIBRARY}")
2755+
if (BIFUSD_IS_LINUX)
2756+
bifusd_append_option(ENV_VARS "LD_PRELOAD=${BIFUSD_ASAN_LIBRARY}")
2757+
elseif (BIFUSD_IS_OSX)
2758+
bifusd_append_option(ENV_VARS "DYLD_INSERT_LIBRARIES=${BIFUSD_ASAN_LIBRARY}")
2759+
endif()
2760+
endif()
2761+
endif()
2762+
27432763
if ( BIFUSD_USE_DEBUGGER )
27442764
if ( BIFUSD_IS_WINDOWS )
27452765
# Open the source files in Visual Studio, except when they are targets.

cmake/setup.cmake

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#-
22
#*****************************************************************************
3-
# Copyright 2024 Autodesk, Inc.
3+
# Copyright 2025 Autodesk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -21,31 +21,38 @@
2121

2222
set(BIFROST_USD_PACK_INSTALL_RES_DIR "${BIFUSD_INSTALL_COMMON_DIR}/resources")
2323
set(BIFROST_USD_PACK_INSTALL_RES_JSON_DIR "${BIFROST_USD_PACK_INSTALL_RES_DIR}/json")
24+
set(BIFROST_USD_PACK_INSTALL_RES_COMP_DIR "${BIFROST_USD_PACK_INSTALL_RES_DIR}/compound")
2425
set(BIFROST_USD_PACK_INSTALL_RES_ICONS_DIR "${BIFROST_USD_PACK_INSTALL_RES_DIR}/icons")
2526
set(BIFROST_USD_PACK_INSTALL_RES_DOCS_DIR "${BIFROST_USD_PACK_INSTALL_RES_DIR}/docs")
2627
set(BIFROST_USD_PACK_INSTALL_RES_CONFIG_DIR "${BIFROST_USD_PACK_INSTALL_RES_DIR}/config")
2728
set(BIFROST_USD_PACK_INSTALL_RES_PROC_DIR "${BIFROST_USD_PACK_INSTALL_RES_DIR}/procedural")
2829

2930
# TODO: is "usd_pack" or the name of the config file defined somewhere?
30-
set(BIFROST_USD_PACK_INSTALL_CONFIG_FILE "usd_pack/usd_pack_config.json")
31+
set(BIFROST_USD_PACK_CONFIG_FILE_MAIN "usd_pack/usd_pack_config.json")
32+
set(BIFROST_USD_PACK_CONFIG_FILE_LIBS "usd_pack/usd_pack_config_shared_libs.json")
33+
set(BIFROST_USD_PACK_CONFIG_FILE_COMP "usd_pack/usd_pack_config_compound.json")
3134

3235
set(BIFROST_USD_PACK_SHARED_LIB_DIR ${BIFUSD_INSTALL_LIB_DIR})
3336
if( BIFUSD_IS_WINDOWS)
3437
set(BIFROST_USD_PACK_SHARED_LIB_DIR ${BIFUSD_INSTALL_BIN_DIR})
3538
endif()
3639

3740
file(RELATIVE_PATH BIFROST_USD_CONFIG_JSON "/${BIFUSD_INSTALL_ROOT_DIR}" "/${BIFROST_USD_PACK_INSTALL_RES_JSON_DIR}")
41+
file(RELATIVE_PATH BIFROST_USD_CONFIG_COMP "/${BIFUSD_INSTALL_ROOT_DIR}" "/${BIFROST_USD_PACK_INSTALL_RES_COMP_DIR}")
3842
file(RELATIVE_PATH BIFROST_USD_CONFIG_SHARED_LIB "/${BIFUSD_INSTALL_ROOT_DIR}" "/${BIFROST_USD_PACK_SHARED_LIB_DIR}")
3943

4044
#==============================================================================
4145
# Build resource outputs
4246

4347
set(BIFROST_USD_OUTPUT_JSON_DIR "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_INSTALL_RES_JSON_DIR}")
48+
set(BIFROST_USD_OUTPUT_COMP_DIR "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_INSTALL_RES_COMP_DIR}")
4449
set(BIFROST_USD_OUTPUT_ICONS_DIR "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_INSTALL_RES_ICONS_DIR}")
4550
set(BIFROST_USD_OUTPUT_DOCS_DIR "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_INSTALL_RES_DOCS_DIR}")
4651
set(BIFROST_USD_OUTPUT_PROC_DIR "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_INSTALL_RES_PROC_DIR}")
4752

48-
set(BIFROST_USD_OUTPUT_LIB_CONFIG_FILE "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_INSTALL_CONFIG_FILE}")
53+
set(BIFROST_USD_OUTPUT_MAIN_CONFIG_FILE "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_CONFIG_FILE_MAIN}")
54+
set(BIFROST_USD_OUTPUT_LIBS_CONFIG_FILE "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_CONFIG_FILE_LIBS}")
55+
set(BIFROST_USD_OUTPUT_COMP_CONFIG_FILE "${PROJECT_BINARY_DIR}/${BIFROST_USD_PACK_CONFIG_FILE_COMP}")
4956

5057
#==============================================================================
5158
# External dependencies
@@ -99,6 +106,8 @@ set_target_properties( ${BIFUSD_PACKAGE_NAME}_config_info PROPERTIES
99106
BIFROST_USD_PACK_ALL_JSON_FILES ""
100107
BIFROST_USD_PACK_ALL_JSON_FILES_DIR "${BIFROST_USD_OUTPUT_JSON_DIR}"
101108
BIFROST_USD_PACK_INSTALL_RES_JSON_DIR "${BIFROST_USD_PACK_INSTALL_RES_JSON_DIR}"
102-
BIFROST_USD_LIB_CONFIG_FILE "${BIFROST_USD_OUTPUT_LIB_CONFIG_FILE}"
109+
BIFROST_USD_MAIN_CONFIG_FILE "${BIFROST_USD_OUTPUT_MAIN_CONFIG_FILE}"
110+
BIFROST_USD_LIBS_CONFIG_FILE "${BIFROST_USD_OUTPUT_LIBS_CONFIG_FILE}"
111+
BIFROST_USD_COMP_CONFIG_FILE "${BIFROST_USD_OUTPUT_COMP_CONFIG_FILE}"
103112
BIFROST_USD_CONFIG_SHARED_LIB "${BIFUSD_INSTALL_ROOT_DIR}/${BIFROST_USD_CONFIG_SHARED_LIB}"
104113
)

cmake/utils.cmake

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#-
22
#*****************************************************************************
3-
# Copyright 2023 Autodesk, Inc.
3+
# Copyright 2024 Autodesk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -59,6 +59,22 @@ function(configure_bifusd_unittest unittest_src_file test_module_name)
5959
"AMINO_ALWAYS_PRINT_ERRORS=1"
6060
${ENV_VARS})
6161

62+
if(BIFUSD_ENABLE_UNDEFINED_SANITIZER)
63+
list(APPEND env_vars "UBSAN_OPTIONS=print_stacktrace=1")
64+
endif()
65+
66+
list(APPEND env_vars ${BIFUSD_EXTRA_SANITIZER_ENV_VARS})
67+
68+
# The google tests are causing some issues with Clang address sanitizer when linking with USD libraries.
69+
# The sanitizer will detect some container overflows in USD libs just be creating
70+
# an executable with the following empty google test "TEST(TEST_EMPTY, empty_test) {}"!
71+
#
72+
# See this ticket related to sanitizer errors in OpenUSD:
73+
# https://github.com/PixarAnimationStudios/OpenUSD/issues/3088
74+
if(BIFUSD_ENABLE_ADDRESS_SANITIZER)
75+
list(APPEND env_vars "ASAN_OPTIONS=detect_container_overflow=0")
76+
endif()
77+
6278
bifusd_configure_unittest(${unittest_target}
6379
SRC_FILES ${unittest_src_file}
6480
${EXTRA_SRC_FILES}

cmake/version.info

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(BIFROST_USD_PACK_MAJOR_VERSION 1)
22
set(BIFROST_USD_PACK_MINOR_VERSION 3)
3-
set(BIFROST_USD_PACK_PATCH_LEVEL 1)
3+
set(BIFROST_USD_PACK_PATCH_LEVEL 3)

compound-dev.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"AminoConfigurations": [
3+
{
4+
"libraryName": "bifrostUsdPackCompounds",
5+
"libraryVersion": "",
6+
"vendorName": "Autodesk",
7+
"libraryDependencies": [],
8+
"jsonLibs": [
9+
{
10+
"path": "src/compounds"
11+
},
12+
{
13+
"path": "src/graphs"
14+
}
15+
]
16+
}
17+
],
18+
"include": "examples/packs/bifrost_config.json",
19+
"include": "test/usd_pack_test_config.json"
20+
}

examples/maya_plugin/plug-ins/bifrostUSDExamples.py.in

+8-1
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,16 @@ def initializePlugin(plugin):
4242
# Add runtime commands
4343
import bifrost_usd.runtime_cmds as rtc
4444

45+
rtc.create_maya_usd_material_library_cmd()
46+
rtc.create_new_stage_cmd()
4547
rtc.create_stage_from_sublayers_cmd()
48+
rtc.create_lookdev_stage_from_layers_cmd()
4649
rtc.open_bifrost_usd_graph_editor_cmd()
47-
rtc.create_new_stage_cmd()
50+
rtc.open_maya_usd_material_library_cmd()
51+
rtc.usd_attribute_quick_look_from_selection_cmd()
52+
rtc.prim_selection_to_string_array_compound_cmd()
53+
rtc.remove_prim_selection_from_string_to_array_compound_cmd()
54+
rtc.select_prims_from_selected_node_cmd()
4855

4956
import bifrost_usd.component_creator.runtime_cmds as cc_rtc
5057

0 commit comments

Comments
 (0)