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

Adds Plane primitive to UsdGeom. #1819

Merged
merged 4 commits into from
Jun 11, 2022

Conversation

crydalch
Copy link
Contributor

@crydalch crydalch commented Mar 28, 2022

Description of Change(s)

Extends UsdGeom with a Plane primitive. This PR is an improvement on PR #773, which is out of date due to changes to the USD repo since Feb 2019. The original PR can't be updated, because that fork and user account are no longer accessible.

Fixes Issue(s)

  • I have submitted a signed Contributor License Agreement

Thanks!

@jilliene
Copy link

jilliene commented Apr 4, 2022

Filed as internal issue #USD-7302

Copy link
Contributor

@sunyab sunyab left a comment

Choose a reason for hiding this comment

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

Thanks for your patience @chrisrydalch! I've added several notes from the team that we'd love to get your eyes on. We're aiming to get this in for the next release.

class Plane "Plane" (
inherits = </Gprim>
doc = """Defines a primitive plane, centered at the origin, and is defined by
a cardinal axis, width, and length. It is also double-sided.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we reword the last sentence to: "The plane is double-sided by default."

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this note was missed?

pxr/usd/usdGeom/schema.usda Outdated Show resolved Hide resolved
pxr/usd/usdGeom/schema.usda Show resolved Hide resolved
pxr/usd/usdGeom/plane.cpp Outdated Show resolved Hide resolved
pxr/usd/usdGeom/plane.cpp Outdated Show resolved Hide resolved
pxr/usdImaging/usdImaging/implicitSurfaceMeshUtils.h Outdated Show resolved Hide resolved
pxr/usdImaging/usdImaging/implicitSurfaceMeshUtils.h Outdated Show resolved Hide resolved
pxr/usdImaging/usdImaging/implicitSurfaceMeshUtils.cpp Outdated Show resolved Hide resolved
Comment on lines 469 to 472
GfVec3f( 0.5f * width, 0.0f,-0.5f * length ),
GfVec3f(-0.5f * width, 0.0f,-0.5f * length ),
GfVec3f(-0.5f * width, 0.0f, 0.5f * length ),
GfVec3f( 0.5f * width, 0.0f, 0.5f * length ) };
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be rotated 180-degrees, i.e. so that the "up" orientation of the corresponding texture coords is consistent for a stage with "Z" upAxis.

pxr/usd/usdGeom/schema.usda Outdated Show resolved Hide resolved
@sunyab sunyab mentioned this pull request May 26, 2022
 * Rotated the plane orientations to be consistent
 * Removed 'st' coordinates, pending clarificaitons
 * Replaced 'height' with 'length'
 * Doc/comment typos and wordings
 * Coding style tweaks
@crydalch crydalch requested a review from sunyab May 27, 2022 20:54
Copy link
Contributor

@sunyab sunyab left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the earlier notes! Just left two last notes/questions for you but otherwise everything else looks great.

class Plane "Plane" (
inherits = </Gprim>
doc = """Defines a primitive plane, centered at the origin, and is defined by
a cardinal axis, width, and length. It is also double-sided.
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this note was missed?

Comment on lines 464 to 477
points = { GfVec3f( 0.0f, 1.0f * length, 1.0f * width ),
GfVec3f( 0.0f, -1.0f * length, 1.0f * width ),
GfVec3f( 0.0f, -1.0f * length,-1.0f * width ),
GfVec3f( 0.0f, 1.0f * length,-1.0f * width ) };
} else if (axis == UsdGeomTokens->y) {
points = { GfVec3f(-1.0f * width, 0.0f, 1.0f * length ),
GfVec3f( 1.0f * width, 0.0f, 1.0f * length ),
GfVec3f( 1.0f * width, 0.0f,-1.0f * length ),
GfVec3f(-1.0f * width, 0.0f,-1.0f * length ) };
} else {
points = { GfVec3f( 1.0f * width, 1.0f * length, 0.0f ),
GfVec3f(-1.0f * width, 1.0f * length, 0.0f ),
GfVec3f(-1.0f * width,-1.0f * length, 0.0f ),
GfVec3f( 1.0f * width,-1.0f * length, 0.0f ) };
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this is correct, it seems like this'll create points for a plane that's 2x the desired width and length?

@crydalch
Copy link
Contributor Author

crydalch commented Jun 3, 2022

@sunyab I've corrected the mistaken doubling of length and width, and restored the documentation note. Sorry again about yet another delay on this PR.

@crydalch crydalch requested a review from sunyab June 3, 2022 03:38
@sunyab
Copy link
Contributor

sunyab commented Jun 7, 2022

@crydalch No problem! I've merged this PR internally and it'll go out with the next push to the dev branch. Thanks for the quick iterations!

@pixar-oss pixar-oss merged commit 088aeed into PixarAnimationStudios:dev Jun 11, 2022
AdamFelt pushed a commit to autodesk-forks/USD that referenced this pull request Oct 11, 2022
This submission adds deep selection capabilities to HdStorm. This allows for selection of all objects within a pick-point or frustum to be selected even if the objects are obscured by other objects drawn on top.

It uses a GPU rendering technique similar to ID based picking except that it accummulates all pick results into a one dimensional "pickBuffer" instead of storing a single selection per pixel like the ID buffer approach does.

It can be enabled by setting a new resolve mode defined as HdxPickTokens->resolveDeep.

A new helper function named TestIntersections (plural) has been added to UsdImagingGlEngine to exercise the new functionality. A new Unit test is included to test the new resolve mode and UsdImagingGLEngine helper function.

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

Minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Code cleanup based on code review.

[hdSt] Don't swizzle the scalar return value from HdGet_displayOpacity().

Contribution: Jason Fielder

(Internal change: 2224434)

[hdSt] Check that a render buffer is multisampled before using its sample count
in setting up the graphics pipeline.

(Internal change: 2224435)

[HdSt] Fixed some unresolved shader symbols for Metal

The Metal Shading Language program linker requires all refereneced
functions to be defined even if not called. This adds definitions for
"integrateLights()" for image shaders and volumes since that symbol
is referenced from the lighting and lighting termal shader code.

Also, moved the definition of the "GetPatchCoord()" out of general
codeGen an into the mesh shaders specificially, since it is needed
only by mesh primitives.

Contribution: Jon Creighton

(Internal change: 2224562)

[HdSt] Updated codeGen of compute shader parameters

This is preparation for moving more shader declarations to
resource layouts.

Contribution: Jon Creighton

(Internal change: 2224574)

[arch] use "aligned_alloc" not "std::aligned_alloc" on linux

std::aligned_alloc is introduced in c++17, but USD only requires c++14

[HdSt] Fixed some compute shader compilation errors

Restored the placement of the compute shader main() to
be last in the generated shader source string so that we
don't need to forward declare the compute() method which
might have const or non-const arguments.

(Internal change: 2224819)

[HdSt] Updated codeGen to use packed types from hgi

We alias the low-level packed types used by Storm codeGen
onto Hgi generated types so that values of these types are
initialized consistently.

Contribution: Jon Creighton

(Internal change: 2224836)

[hdSt] Wait until blit cmds complete after reallocating buffer arrays.

Contribution: Jon Creighton

(Internal change: 2224907)

[HdSt] Use appropriate OSD shader source for GLSL vs MSL

We need to use Metal-specific shader source when targeting
Metal Shading Language. This is a little awkward and we hope
that this can be improved in future releases of OpenSubdiv.

Contribution: Jon Creighton

(Internal change: 2224908)

[HdSt] Updated Storm drawing coordinate plumbing

Updated interstage drawing coordinate plumbing to use resource
layouts. This facilitates using Hgi to manage interstage inputs
and outputs for Metal.

This also changes interstage drawing coord values to be independent
variables. Previously, drawing coord values were managed as members
of interstage struct values, but that will not work for Metal. An
alternative might be to use an interstage interface block, but that
is not robustly supported by cross platform GL drivers.

Since Hgi resource generation is not currently enabled for GL,
we process resource layouts in _GeneratateGLResources() when
compiling with generated GLSL resources. This is organized to
match the existing behavior when generating Hgi resources.

Also, while GLSL provides a way to pass array-valued input
attributes, we instead declare and bind input attributes
distinctly for each item in an array of instance indices which
better matches Metal.

Some of the pre-existing documentation for this is out-of-date,
and we will address that as a follow-up change.

Contribution; Thor Hjalmarsson, David G Yu

(Internal change: 2224924)

[HgiVulkan] Add organizational shader comments to Vulkan shadergen.

Contribution: Jon Creighton

(Internal change: 2225030)

[HdSt] Generate GLSL builtins when using Hgi resource generation.

We may move this into the HgiMetal implementation.

Contribution: Jon Creighton

(Internal change: 2225035)

[HdSt] Updated primvar plumbing to resource layouts

Interstage primvar plumbing still uses GLSL interface blocks,
but these can now be generated using Hgi. Although for now
we continue to generate primvar interface blocks as native
GLSL while we complete the transition to Hgi.

This also fills out the remaing codeGen support for Metal
Tessellation PTVS and PTCS shader stages, but for this
release we are not yet using PTCS shaders.

PTVS shaders have aspects that are similar to both
VS and TES, and we must also take into account differences
in PrimitiveID addressing.

Contribution: Thor Hjalmarsson, David G Yu

(Internal change: 2225042)

[HdSt] Enabled resource layouts for all codeGen resources

This flips the switch to use HdSt_ResourceLayout to coordinate
declarations for all resources. This includes buffers and textures
and also interstage variables and interstage interface blocks and
input attributes.

Textures and other resources that are expressed using resource
layouts can be declared using Hgi resource generation, or they
can be declared using native GLSL resource generation. Currently,
Hgi resource generation is enabled only for Metal, but we intend
to enable this for other Hgi backends eventually.

This change incorporates three other extensions to codeGen to
improve compatibility between GLSL and Metal Shading Language:

- Promotes "bool" resource to be of type "int" in shader declarations
  so that the memory layout of struct members is consistent.

- HdTextureLod_name() accessors to allow sampled access to
  a specific mip level.

- HdGetScalar_name() accessors to allow access to the scalar
  value of name without needing a ".x" swizzle which is not
  supported for scalar data types in Metal, even though is
  is supported by GLSL.

Contribution: Jon Creighton, David G Yu

(Internal change: 2225264)

[HdSt] Metal requires storeOp for AOV attachments

Contribution: Jon Creighton

(Internal change: 2225265)

[HdSt,Glf,UsdShaders] Updated shaders for Metal

Contribution: Jon Creighton

(Internal change: 2225273)

[HgiMetal] Enabled Storm for macOS using HgiMetal

The implementation of Storm for Metal requires support for
built-in fragment shader barycentric coords, e.g. we need
support for the [[barycentric_coord]] fragment function
input attribute. So, this is enabled only for macOS >= 10.15
and only on systems with display driver
support for barycentric coords.

Contribution: Jon Creighton

(Internal change: 2225274)

[HdSt,HgiGL] Fixed two issues affecting Storm on AMD GPUs

1) HgiGL should be filtering out generation of built-in shader
outputs for GL, but the filter search was using the wrong key.

2) HdSt should be emitting location bindings for fragment shader
outputs, but was not.

(Internal change: 2225525)

[UsdImagingGL] Updated the displayName for Storm to be Metal on macOS

This is an interim fix until we have a more complete system in
place for determining the display name for Storm based on Hgi.

(Internal change: 2225526)

Fix UsdShadeConnectableAPI::HasConnectableAPI crash when querying for a Abstract type

- Adds static helper UsdSchemaRegistry::IsAbstract which return true for abstract prim types.

Note since we can not consult built-in API schemas for abstract prim types (these do not have any primDefinition),
we are ignoring these and returning false when querying for HasConnectableAPI, at least for now!

(Internal change: 2225705)

[HdSt] For Metal convert double to float for ext computations

We'll still use double precision for Hgi implementations that
support double precision shading language data types.

(Internal change: 2225828)

[UsdAppUtils] Updated command line args test for Metal

The Storm renderer is named "Metal" on macOS but is still
named "GL" on other platforms.

(Internal change: 2225829)

[usdviewq] Updated to disable line stipple for bbox drawing on Metal

The OpenGL driver on Apple Silicon systems is fully emulated on
top of Metal and issues performance warnings if line stipple is
enabled.

(Internal change: 2225838)

[HgiMetal] Enabled multi draw indirect drawing for Metal

This allows the Metal implementation to take advantage of
parallel encoding of render commands.

(Internal change: 2225839)

[hdSt] Use HgiGet_ texture accessor for non-bindless textures. Fixes issue when
calling HdGet_ for a shadow texture on Metal.

(Internal change: 2225931)

Update CHANGELOG.md for 22.05 release

(Internal change: 2225965)

Update tutorial badge for v22.05

(Internal change: 2226029)

Correct year in CHANGELOG.md for 22.05 release

(Internal change: 2226689)

[HdSt] Fixed missing forward decl guards for transform2d accessors

This avoids shader compilation errors with HgiMetal

(Internal change: 2227394)

Update 22.05 release date.

(Internal change: 2227503)

Bump USD version to anticipated next release 22.08

(Internal change: 2227785)

Remove usage of deprecated function GetConnectedSource which is causing warning messages in katana

(Internal change: 2224512)

Animated volumes in Storm: adding scene index plugin that adds a dependency of a volume on its fields and chains it with a dependency forwarding scene index.

This way, the voulme pulls the new textures when the filePaths of its volume fields change.

Note that this replaces the old mechanism where HdStField::Sync calls HdChangeTracker::MarkAllRprimsDirty - when scene indices or scene index emulation is used.

(Internal change: 2224513)
(Internal change: 2224657)

Introducing HdDependencyForwardingSceneIndex.

(Internal change: 2224515)
(Internal change: 2224584)
(Internal change: 2224658)

Scene index emulation: fixing inconsistencies so that clipping planes work with USDIMAGINGGL_ENGINE_ENABLE_SCENE_INDEX.

Adding clippingPlanes of type VtArray<GfVec4d> to the HdCameraSchema.
This differs from HdCamera where it is called clipPlanes and of type std::vector<GfVec4d>. Thus, we need to convert in the scene index adapter scene delegate and the data source legacy prim.

Adding test case for (animated) clipping planes to usdImagingGL.

(Internal change: 2224516)

Change how XPU Devices are set

CreateRiley now uses xpu:cpuconfig and xpu:gpuconfig to communicate which devices XPU should use.

Note on GPU selection: As off now in rman, only the first GPU is supported regardless of the input type being an array.

(Internal change: 2224729)

Adding support in USD for declaring properties as API schema overrides.

A schema property that is declared as an API schema override does not define
that property in that schema. Instead it behaves as an "over: for a property with
the same name that may be defined by an API schema that is included as a
built-in API schema of the schema declaring the override. This is different than
the behavior when included API schemas define the same property (without
specifying an override) as in that case, the strongest schema's property wins
and completely stomps over the same property from any weaker schema.

API schema overrides can be declared for both API and Typed schemas in the
source schema files through adding customData on the property of
'bool apiSchemaOverride = true'. This will be converted to a list of API schema
override property names stored in the schema prim's customData in the
resulting generatedSchema.usda. When the UsdSchemaRegistry is populated,
any properties declared as API schema overrides will not be immediately
added to the prim definition. Instead they will be composed over the defined
property from the schema's built-in API schemas if a property with that name
is indeed found. If no property with the name exists in the included API schemas,
the override property is ignored.

An examples of where this will be used is UsdLuxLightAPI which will now be able
to declare:
class "LightAPI" (
    prepend apiSchemas = ["CollectionAPI:lightLink", "CollectionAPI:shadowLink"]
) {
    uniform bool collection:lightLink:includeRoot = 1 (
        customData = {
            bool apiSchemaOverride = true
        }
    )
    uniform bool collection:shadowLink:includeRoot = 1 (
        customData = {
            bool apiSchemaOverride = true
        }
    )
}
This means that LightAPI can now override just the default values of the
includeRoot properties defined in its two built-in CollectionAPIs while leaving the
rest of the definition (such as documentation) as defined in the CollectionAPI
schema itself.

Another example is the light:shaderId property defined in LightAPI which all the
concrete Typed light schemas (RectLight, DistantLight, etc.) will be able to
override to defaulting to the USD shader ID for the light, once again, without
stomping over the entire property definition from LightAPI.

Note that this feature is specific to overriding properties from built-in API
schemas and doesn't apply to overriding properties via schema inheritance.
This is because schema properties are already always composed over via
inheritance during schema generation so no specification is necessary.

(Internal change: 2224838)

Clients of HdSceneIndexPluginRegistry: do not add HdSceneIndexPlugin as Base to HdSceneIndexPluginRegistry::Define already does it.

(Internal change: 2224869)

Clients of HdSceneIndexPluginRegistry: do not add HdSceneIndexPlugin as Base to HdSceneIndexPluginRegistry::Define already does it.

(Internal change: 2224870)

testUsdImagingGLUsdLux: avoiding degeneracies.

The box had a degenerate transform and the sphere and sphere light were at exactly the same position with the same radius.

Note that the test uses auto framing for the camera and thus is sensitive to geometry movements changing the bounding box.

(Internal change: 2225336)

Replace all description of .usda as "ASCII" in user doc with
"text", and enhance the FAQ to describe that usda is a UTF-8 encoding.

Doc-only change.

(Internal change: 2225469)

Hydra, usdImaging and Storm: adding cube prim type and schema to Hydra. Adding a implicits data source for usdImaging. Adding scene index to storm to convert the cube into a mesh.

(Internal change: 2225666)
(Internal change: 2225696)
(Internal change: 2225865)

Add Basic UsdImaging support for RenderSettings and MurkFilters

Getting basic Murk working in Usdview. The murk prims are populated
only when they are connected through the outputs:ri:sampleFilters
terminal. Attaching a murk filter or changing parameters works as
expected, however, removing or changing the connected filter
currently needs a stage reload to visually see the appropriate change.

(Internal change: 2225714)

Hydra, usdImaging and Storm: adding cone and cylinder prim type and schema to Hydra. Using implicits data source in the UsdImagingSphereAdapter. Adding conversion from cone and cylinder to mesh to Storm's implicit surface scene index plugin.

(Internal change: 2225900)

Hydra, usdImaging and Storm: adding sphere prim type and schema to Hydra. Using implicits data source in the UsdImagingSphereAdapter. Adding conversion from sphere to mesh to Storm's implicit surface scene index plugin.

(Internal change: 2225909)

usdGenSchema updates:

1. The apiSchemaOverride customData in a schema.usda used for schema
    generation is no longer composed across schema inheritance. Instead a
    schema property's apiSchemaOverride state is just determined by the
    customData on the strongest property definition (with no customData
    opinion meaning it's not an API schema override). We still check the
    property's full property stack to make sure that if a property is defined
    as an API schema override, then all the ancestor classes that defined
    the property must also have defined it as an API schema override.
2. Setting apiName = '' for a schema attribute will also exclude it from the
    list of attributes listed for just the class in its generated
    GetSchemaAttributeNames function.
3. The blurb in generated schema class headers about fallbacks for token
    valued attributes is no longer included if all token valued attributes are
    excluded from the C++ API (via apiName = '' or
    apiSchemaOverride = true).

(Internal change: 2226008)

UsdLux updated with API schema override declarations:

Updated all usdLux properties that override API schema
properties to define them as apiSchemaOverride = true and regenerated
USD schemas.

(Internal change: 2226010)

Add PLUG_THIS_PLUGIN_NAME macro for retrieving the name
of the plugin where this macro is invoked. By default this
macro has the same value as MFB_PACKAGE_NAME that is set
by the build, but this can be overridden in the (rare) case
that the plugin and package names differ.

PLUG_THIS_PLUGIN was modified to use PLUG_THIS_PLUGIN_NAME
for lookups in the plugin registry.

(Internal change: 2226064)

Hydra, usdImaging and Storm: adding capsule prim type and schema to Hydra. Using implicits data source in the UsdImagingCapsuleAdapter. Adding conversion from capsule to mesh to Storm's implicit surface scene index plugin.

Together with the previous changes, this covers all implicit surfaces.

(Internal change: 2226093)

Hydra scene index emulation: passing through values and invalidation for new implicit surface prim types capsule, cube, cone, cylinder and sphere.

(Internal change: 2226094)

hdPrman: adding native support for spheres.

(Internal change: 2226095)
(Internal change: 2226331)

[hdPrman] Don't emit warnings when traversing material nodes with id
"PrimvarPass."

(Internal change: 2226226)

Fix to how we compose reference and payload list ops when layers and
 sublayers have layer offsets (both explicitly authored or implicit through
 time codes per second resolution).

This easiest way to explain this is with an example. The issue from the
 bug this is for is someone has a root layer with two sublayers:
-root.usda-
(
    subLayers = [
        @./sublayer_del_ref_30tcps.usda@,
        @./sublayer_add_ref.usda@
    ]
)

-sublayer_add_ref.usda-
def Xform "World" (
    prepend references = @./mesh.usda@</World>
) {
}

-sublayer_del_ref_30tcps.usda-
(
    timeCodesPerSecond = 30
)
def Xform "World" (
    delete references = @./mesh.usda@</World>
) {
}

The user is expecting the stronger sublayer to remove the reference to
mesh in /World, but because of the 30 tcps specified in the deleting
layer we resolve a layer offset for the reference to convert it into the 24
tcps of the root layer. This resolved layer changes the identity of deleted
reference and since it no longer matches reference added by the weaker
sublayer, it is not actually deleted.

While the automatic scaling from the tcps difference makes this extra
mysterious, this same problem would be caused if there were no tcps
difference but the sublayers were authored with different layer offsets in
the root layer, e.g.
(
    subLayers = [
        @./sublayer_del_ref_.usda@ (scale = 2.0),
        @./sublayer_add_ref.usda@
    ]
)

This fix is pretty simple in that while we still fully resolve the layer offsets
for the reference arc in the exact same way as before, we only use the
layer offset as authored as part of the identity of the reference when
composing the list op. Now in both of the above examples, the reference
 is properly removed regardless of the offsets of the sublayers.

Fixes #1778

(Internal change: 2226344)

Don't crash in debug routines when the shader is empty due to a bug.

(Internal change: 2226382)

[hdSt, usdImagingGL] Clean up some of the remaining uses of env var
HGIGL_ENABLE_MULTI_DRAW_INDIRECT. At this point, this env var is really just a
debug flag.

Its use was removed from any usdImagingGL tests, and there is now only one test
in hdSt, testHdStBasicDrawingImmediate, testing its disabling.

(Internal change: 2226474)

UsdShadeConnectableAPIBehavior: Fix when trying to get a plugin for an incompatible type

Make sure type being queried is usd compatible (Typed or APISchemaBase) before trying to get plugin associated with that type.

(Internal change: 2226659)

Update python wrapping in fs and usdShade to use TfPyBoolBuiltinFuncName
when wrapping __zero__/__bool__.

(Internal change: 2226690)

Hydra implicit surface scene index:
Moving the implicit surface scene index into a new library hdsi.
Making it configurable so that scene index plugins can say which prims need to be converted to a mesh or need to have their transform changed - which is necessary for RenderMan.

(Internal change: 2226698)
(Internal change: 2226805)

hdPrman: adding cone, cylinder, cube and capsule support by using native Riley prims and the implicit surface scene index.

(Internal change: 2226699)

Fixes to primvar sampling in scene index emulation and the usd imaging stage scene index:

UsdImagingDataSourceAttribute::GetContributingSampleTimesForInterval:
- return times relative to shutterInterval
- return sample for the endpoints of the interval instead of crashing if there were no samples on the usd attribute for the given interval (interval is between two far apart samples or before or after the first or last sample, respectively)

HdSceneIndexAdapterSceneDelegate::_SamplePrimvar:
- respect the boolean return value of GetContributingSampleTimesForInterval (when not using the HdLegacyPrimSceneIndex)
- Make sure that the method never returns 0 and thus making clients drop any values. This happened when GetContributingSampleTimesForInterval didn't fill times due to authoredSamples being computed before the fallback sample time 0.0f was added.

(Internal change: 2226759)

Add initial sections for anticipated 22.08 release notes

(Internal change: 2226798)

[hd, hdSt] Remove references to unused env var HD_ENABLE_SMOOTH_NORMALS.

(Internal change: 2226815)

[hdSt, hdx] Update skydome Viewport calculation
to re-use existing function that was previously a private helper
in HdStRenderPass.

(Internal change: 2226855)

Tiny doxygen fix for parameter name.

(Internal change: 2226876)

Add ability to add/remove/change Murk Sample Filters in usdview

Storing the sampleFilterPath indicated in the connection on
the RenderSettings prim in HdPrman's RenderParams, and
dirtying the affected sampleFilters when switching connected
filters. Then having the SampleFilter check against this stored
path to see if the filter should be created/deleted, and changing
the renderSettings to a Bprim so that it will be sure to sync
before the Sprim SampleFilter.

(Internal change: 2226882)

Cleanup post Basic Murk-Sample Filter Support

(Internal change: 2226884)

removes repeated reserve call within HdNoticeBatchingSceneIndex as it is unnecessary and surprisingly expensive

(Internal change: 2226894)

small fix to GfVec Slerp test

Hydra scene indices: moving helper to merge contributing time samples into hd/dataSource.h.

(Internal change: 2227047)

When using scene index emulation, return after calling AddLegacyPrim when
inserting a new Bprim (otherwise it would be created twice).

Hydra implicit surface scene index: rather than implementing HdsiImplicitSurfaceSceneIndex::_PrimsDirtied, adding __dependencies.

In Storm, factoring out the creation of the dependency forwarding scene index to make sure it is always run last.

(Internal change: 2227053)

HdPrman: since the implicit surface scene index is now using __dependencies, we need to add a dependency forwarding scene index to hdPrman.

(Internal change: 2227054)
(Internal change: 2227129)

Remove unused TfPyGetModulePath.

(Internal change: 2227203)

Remove commented-out Objective-C code from a Tf test.

(Internal change: 2227206)

TfPyRun*: comment clarifications.

In particular, point out that TfPyRun{String,File} require the GIL.

(Internal change: 2227207)

tf test: add TfPyLock before TfPyRunString.

(Internal change: 2227214)

Storm dependency scene index plugin: rather than implementing HdSt_DependencySceneIndexPlugin::_PrimsDirtied, making __dependencies depend on volumeFieldBinding.

(Internal change: 2227264)

[ar 2.0] Remove support for Ar 1.0

Ar 1.0 was deprecated in the 21.11 release. This change
removes the ability to switch to Ar 1.0, effectively
ending support. Follow-up changes will remove Ar 1.0
code from the tree.

(Internal change: 2227389)

[hdSt] Don't add fallback/unconnected material param names to the list of a
material network's primvars. Fixes a scenario where an asset had
both a primvar "occlusion" and a UsdPreviewSurface material with an unconnected
"occlusion" input parameter.

(Internal change: 2227467)

Change Usd_Clip to hold a shared pointer to the array of time mappings.
Set up this array in Usd_ClipSet where all the Usd_Clip objects are
allocated. Prevents N^2 memory usage on the number of time mappings in
a clip set.

rmanArgsParser: Do not warn when args file is not in Args dir

- Put this behind a TF_DEBUG for the users to know that no implementation will be provided for such an args file which is not under parent "Args" directory.

(Internal change: 2227851)

Fix rmanArgsParser out of bound crash

(Internal change: 2228044)

Ensure the GIL is locked before destroying Python objects

This avoids issues when a TfErrorMark instantiated in C++
captures Tf.Errors emitted in Python and is subsequently
cleared, destroying the captured TfPyExceptionState objects.

(Internal change: 2228054)

Catchup CHANGELOGs for anticated 22.08 release

(Internal change: 2228100)

Couple of fixes to UsdUtilsUpdateSchemaFromSdrNode

- Do not set any connectivity for non connectable nodes.
- Fix property pruning when only typedSchemaForAttrPruning is set and no apiSchemasForAttrPruning is provided.
- Check early if the output parameters are suppressed and use this information in error handling for namespace prefix override when outputs are present

(Internal change: 2228101)

Fixing startup python script for usdview interpreter in python3

(Internal change: 2228144)

Storm: fixing comment.

(Internal change: 2228168)

Implicit surface scene index: removing unused member.

(Internal change: 2228219)

Fix usdgenschemafromsdr to allow environment variable paths

- Useful when when "sourceAssetNodes" has paths to sdr nodes with envionment variable in them, example "$RMANTREE/lib/defaults/PRManAttributes.args".
- Cleanups.

(Internal change: 2228325)

Allow mtlx networks with mismatched connection types to work.

(Internal change: 2228330)

Some improvements for translating certain kinds of materialX networks.

* Use default st coordinates when nothing is connected to an image node's texcoord.
* Fix assumptions about the expected name of graphs in the materialX document.
* Mtlx image nodes using tex files were fipped vertically.

(Internal change: 2228333)

Hd: introducing HdMapContainerDataSource.

(Internal change: 2228358)

Adding convenience c'tors to HdOverlayContainerDataSource.

(Internal change: 2228359)

[ar 2.0] Remove Ar 1.0 implementation

(Internal change: 2228392)

[HdSt,Hdx] Removed backward compatable resource layout shader source

This is no longer needed now that HdSt_CodeGen can fully
handle backward compatible GLSL resource generation. As before,
we've only added GLSLFX resource layouts for shader snippets
shared between HgiGL and HgiMetal. We'll likely add more as we
continue to enable support for HgiVulkan.

(Internal change: 2228409)

TfPyWrapEnum will now append an underscore to all enum
types and values that match reserved keywords from both
Python 2 and 3. For example, if an enum class "Foo" has
a value named "None" and is wrapped via TfPyWrapEnum,
the corresponding value in Python will be "Foo.None_".
This follows the recommendation in the PEP 8 style
guide for resolving identifier conflicts with keywords.

Previously any such values would result in syntax errors
when used in Python, since reserved keywords cannot be
used as identifiers. This change avoids this problem
without forcing clients to modify their C++ code.

Note that keywords from both Python 2 and 3 receive
this treatment no matter which version of Python is
being used. So the above example will be the case
under either version. This ensures that enum values
stay consistent and client code doesn't have to change
change depending on the version of Python being run.

(Internal change: 2228741)

Fix race condition during prim destruction that
could lead to invalid memory access.

(Internal change: 2228809)

Fix intermittent crashes due to XPU configuration

(Internal change: 2228868)

Update UsdGeom::ComputeProxyPrim to implement non-pruning semantics
when computing the purpose value for the targeted prim.

This is followup to change 2033434.

(Internal change: 2229004)

[hd] Adding Schemas and emulation for RenderSettings and SampleFilters.

(Internal change: 2229022)

[HdPrman] Fixed to support sharpness per crease edge

UsdGeomMesh supports both: sharpness per crease and sharpness
per crease edge, but previously HdPrman was transporting only sharpness
per crease.

(Internal change: 2229069)

HdDataSource::AtmoicStore: changing signature to take const & instead of & for value.

(Internal change: 2229081)

SdrShaderProperty: document and add support for nested pages

- delimited by ":".
- Update rmanArgsParser, rmanOslParser, usdSdrOsl plugin to add ":" delimited instead of Osl default of "." delimited page metadata.

(Internal change: 2229101)
(Internal change: 2229116)

Introducing HdLazyContainerDataSource.

(Internal change: 2229106)
(Internal change: 2229382)

Replacing usage of deprecated UsdGeomImageable primvar methods in pxr with the corresponding UsdGeomPrimvarAPI methods in prep for deleting the deprecated methods.

(Internal change: 2229301)

Updated changelogs for OSL and Args parsers using Sdr's nested page delimiter as ":" instead of "."

(Internal change: 2229325)

Adding HdContainerDataSourceEditor::Overlay.

(Internal change: 2229372)
(Internal change: 2229382)

Add a note about setting USD_DISABLE_AUTO_APPLY_API_SCHEMAS to true
when regenerating schemas using usdgenschemafromsdr. Not doing this
can cause extra properties to be pruned from the "re"-generated schemas.

(Internal change: 2229391)

usdImagingGL/CMakeLists.txt: adding testUsdImagingGLClippingPlanes.

(Internal change: 2229393)

[ar 2.0] Remove Ar 1.0 support from sdf

(Internal change: 2229415)

[ar 2.0] Remove Ar 1.0 support from pcp

(Internal change: 2229416)

[ar 2.0] Remove Ar 1.0 support from usd

(Internal change: 2229418)

[ar 2.0] Remove Ar 1.0 support from usdUtils

(Internal change: 2229420)

Move renderman material property tokens to the primvars namespace.
Keep checking for materials that do not start with "primvar:" for compatibility sake.
Minor changes to rman for handling material properties that start with "primvar"

(Internal change: 2229421)

added root selected check to printTreeWidget.py>ExpandItemRecursively()

Deleting deprecated primvar methods from UsdGeomImageable

(Internal change: 2229688)

Replace boost::shared_ptr and scoped_ptr in usdAbc

(Internal change: 2229779)

Replace boost::shared_ptr in Sdf_FileFormatRegistry

(Internal change: 2229780)

ndr: add the ability to disable NDR plugins

NDR plugins can do expensive filesystem walking that may not be desired
in all situations. Allow specific NDR plugins to be disabled through the
environment by setting PXR_NDR_DISABLE_PLUGINS to a comma-separated list
of plugin names.

(Internal change: 2229885)

Copying behaviour from `lightAdapter` to consider *all* attributes for setting `DirtyParams` in `TrackVariability`

Addressing feedback

Addressing feedback

Implement reverse lookup table in instanceAdapter to improve performance of getting proto prim

Address feedback to improve inserting and removing proto prim cache

Fixed missing material dependency on GeomSubSet

Add support for Multiple Murks-SampleFilters in Usdview

When using multiple murks we need to create a Combiner node
that has an array with all the riley sampleFilter handles listed in
the desired order. This combiner node needs to be added to the
riley shading network that contains all the riley sampleFilter nodes.
This shading network is then used to create or modify the
SampleFilters in riley.

(Internal change: 2229915)
(Internal change: 2230077)

Ensure light collections are dirtied on creation

Added dirty tracking in CollectionCache

Cleaner and simpler collection dirty tracking

Cleaner and more reliable collection dirty

Missing method declarations

Fixed compile error

Removed duplicated method

Fixed another build issue

Update usdRiPxr schemas from updates args files and to include new schemas

- Includes schemas for:
  - PRManAttributes
  - PRManCamera
  - PRManDisplayChannel
  - PRManOptions
  - PRManPrimVars
  - All rman display drivers: deepexr, openexr, pointcloud, tiff, texture,etc.

- All schemas are updated to use ":" delimiter for displayGroup which is the default for sdrNodes (instead of ".").
- All renderman Light API schemas now "canOnly" auto apply to their respective UsdLux concrete schemas.
- Updated autogen README to include mention of setting of RMANTREE environment variable if users try to regenerate the schemas.
- Updated autogen README to include a suggestion to set USD_DISABLE_AUTO_APPLY_API_SCHEMAS to true when regen`ing the schemas.

(Internal change: 2230113)

Adds API for accessing AOV render buffers.

(Internal change: 2230229)

Adds envvar as a temporary solution to disable hider jitter.

(Internal change: 2230255)

Allow any prim type in HdDataSourceLegacyPrim to provide a "primvars" datasource.

(Internal change: 2230301)

Register velocities and acclerations on point instancer primitives as
hydra-accessible primvars.

Update CHANGELOG.md for 22.05a patch release

(Internal change: 2230317)
(Internal change: 2230746)

Add dual quaternion to the Gf package (part 1 of 4)

Add GetZero() and GfDot() to quaternion types (GfQuaternion, GfQuatd,
GfQuatf & GfQuath) in preparation for the implementation of dual
quaternion types.

(Internal change: 2230330)

Add dual quaternion to the Gf package (part 2 of 4)

Add GfDualQuat template and types (GfDualQuatd, GfDualQuatf &
GfDualQuath) to Gf package.

In preparation for the implementation of Dual Quaternion Skinning in
USDSkel.

(Internal change: 2230350)

Add dual quaternion to the Gf package (part 3 of 4)

Add support for GfDualQuat types in pix/base/vt

In preparation for the implementation of Dual Quaternion Skinning in
USDSkel.

(Internal change: 2230364)

Bug Fixing single sampleFilter changes after adding Multiple SampleFilter support

(Internal change: 2230558)

Update to MaterialX v1.38.3

- Use CMake config directly from MaterialX install
- Update for API and library changes in v1.38.3
- Strenghten NodeDef discovery

This is the last update that is not version tagged in the C++ code.
Future updates will be bracketed using MATERIALX_MINOR_VERSION defines
introduced in v1.38.3.

Update to MaterialX v1.38.4

Add support back in for MaterialX v1.38.3

Fix incorrect MaterialX cmake variable.

If no XpuDevices are selected, use the default RenderParams when initializing Riley

(Internal change: 2230627)

Remove unused variable

(Internal change: 2230691)

defines HdGpGenerativeProcedural

This is a base class for procedurals which have read access to the input scene and
can generate (or update) prims beneath a given prim. Also includes a
registry for delivering these procedurals via plug-in.

HdGpGenerativeProceduralResolvingSceneIndex can be instantiated to resolve/evaluate/update
these procedurals when found within the input scene index.

(Internal change: 2230703)

[hdPrman] Convert depth AOV from NDC space (-1, 1) to window space (0, 1) for
consistent behavior with Storm.

(Internal change: 2230731)

Add support for specifying a post-release tag to the
PyPI package version when running the Azure pipeline.

This allows us to create packages with different
version numbers (e.g. 22.05.post1) for patch releases.

(Internal change: 2230738)

removes unnecessary inclusion of base class during plug-in registration

(Internal change: 2230790)

[ar 2.0] Remove Ar 1.0 support from usdMtlx

(Internal change: 2230839)

[ar 2.0] Remove Ar 1.0 support from Hio

(Internal change: 2230843)

[ar 2.0] Remove Ar 1.0 support from sdrOsl

(Internal change: 2230844)

[ar 2.0] Remove Ar 1.0 support from rmanArgsParser

(Internal change: 2230845)

[ar 2.0] Remove Ar 1.0 support from rmanOslParser

(Internal change: 2230846)

[ar 2.0] Remove Ar 1.0 support from usdResolverExample

(Internal change: 2230847)

[ar 2.0] Remove Ar 1.0 support from sdrGlslfx

(Internal change: 2230849)

[ar 2.0] Remove check for PXR_USE_AR_2 that was missed in an earlier change

(Internal change: 2230850)

Corrected documentation errors that inadvertently led
to the declaration of a struct named "For". In turn, this would cause
Doxygen to auto-generate links to this bogus struct any time it saw
the word "For" in documentation text. (Oops.)

The affected doc string should not have been encountered in our doc
build in the first place, as it is only applicable when USD python
support is disabled at build time.

We now define PXR_PYTHON_SUPPORT_ENABLED so that the generated doc
correctly reflects our build configuration. This also happens to fix
our docs because the incorrect doc string is no longer processed.

The error in tf/pyTracing.h has also been corrected for anyone else
who may generate the docs without python support.

(Internal change: 2230926)

Update usdRiPxr disabling canOnly auto apply for Pxr*Lights

- Also includes a couple of args properties update for PxrOptions
- Also includes updates of apiSchema override property names for LightFilter's CollectionAPI filterLink.

(Internal change: 2230994)

[hd] Fix DataSourceLegacyPrim's "mesh" datasource to return "subdivisionScheme" in GetNames()

(Internal change: 2231037)

Update error thresholds for usdImagingGLInstancing tests.

(Internal change: 2231058)

[hdSt] Add API export tags to HdStTextureIdentifier.

Fixes #1758

(Internal change: 2231079)

[hdPrman] Suppress warning when a material has an empty material resource; upgrade to a coding error if there's a type mismatch.

(Internal change: 2231144)

[usdImaging] Add edit processing support for UsdImagingStageSceneIndex.

This change subscribes the scene index to the _OnObjectsChanged notice, and turns the notice into a series of "resync" and "invalidate" operations.  Invalidation operations are dispatched through prim adapters, which are responsible for saying (for that prim type) what hydra properties changed for a given set of USD properties.

(Internal change: 2231145)

Remove unused function

(Internal change: 2231215)

HdPrimvarSchema role tokens: changing capitalization for consistency with how these are used elsewhere in hydra.

(Internal change: 2231235)

USD schema for an abstract "GenerativeProcedural" as the founding member of a usdProc library.

(Internal change: 2231316)

Temporarily disable testUsdImagingGLClippingPlanes until
issue with infinite loop can be resolved.

(Internal change: 2231352)

Storm volumes: making material final to avoid the volume shader being replaced by the default material network that does not work for volumes.

(Internal change: 2231353)

Adding HdDataSourceLocatorSet::Contains.

(Internal change: 2231354)

Implementing UsdImagingGL draw modes through a scene index.

(Internal change: 2231380)
(Internal change: 2231391)

Reenable testUsdImagingGLClippingPlanes and run test in offscreen
mode to fix hang.

(Internal change: 2231390)

Fix compile errors due to default constructors

On some combination of compilers and STL implementations,
(I hit this using clang on Linux with libstdc++ from gcc 9)
hd/command.cpp fails to build with errors like:

usd/pxr/imaging/hd/command.cpp:30:22: error: defaulting this default constructor would delete it after its first declaration
HdCommandDescriptor::HdCommandDescriptor() = default;
                     ^
usd/pxr/imaging/hd/command.h:104:35: note: default constructor of 'HdCommandDescriptor' is implicitly deleted because field 'commandArgs' of const-qualified type 'const pxrInternal_v0_21__pxrReserved__::HdCommandArgDescriptors' (aka 'const vector<pxrInternal_v0_21__pxrReserved__::HdCommandArgDescriptor>') would not be initialized
    const HdCommandArgDescriptors commandArgs;

I believe this error is because commandArgs in HdCommandDescriptor
is a const std::vector member variable and C++ requires that it
have a user-provided constructor in order to generate the
default constructor for HdCommandDescriptor. The STL implementations
where this fails has an inline defaulted (i.e. not user-provided)
std::vector c'tor, which means the compiler is unable to generate
HdCommandDescriptor's default c'tor and errors out.

To fix this, we explicitly define empty constructors for
HdCommandDescriptor and HdCommandArgDescriptors. (Oh, C++).

Originally reported with a proposed fix in #1696.

Fixes #1696

(Internal change: 2231575)

Adds HDGP_INCLUDE_DEFAULT_RESOLVER envvar (defaulting to false) to ease with development and testing of hydra procedurals

(Internal change: 2231623)

[arch] remove ArchTestCrash(bool) declaration

From the looks of things, ArchTestCrash(bool) was the original
signature; then at some point it was changed to
ArchTestCrash(ArchTestCrashMode) and moved to testArchUtil.  However it
seems that the old declaration was left dangling (though implementation
was removed).

Removed invalid TF_VERIFY encountered in cases involving
subroot references and relocates.

(Internal change: 2231953)

Adding TRACE_FUNCTION to implicit surfce scene index.

(Internal change: 2231995)

Apply compile definitions and include directories from
external targets when building object libraries for the
monolithic build.

This fixes an issue with monolithic builds on Windows
using MaterialX v1.38.4 shared libraries. The USD build
now relies on CMake config files published by the
MaterialX build, but because we were ignoring compile
definitions from external targets we weren't picking
up the MATERIALX_BUILD_SHARED_LIBS define that was
needed to ensure symbols were imported/exported
properly.

(Internal change: 2232025)

HdNoticeBatchingSceneIndex: adding TRACE_FUNCTION.

(Internal change: 2232081)

lazily load prim adapters and confirm stage is valid prior to registering for usd change notices
- the lazy loading matches existing UsdImagingSceneDelegate behavior and is desirable beyond fixing the mysterious crash
  that can occur when ctrl-c exiting usdview
- confirming stage validity fixes a less mysterious crash which can happen with natural destruction

(Internal change: 2232092)

usdImaging: Change-processing for implicits.

(Internal change: 2232106)

move _GetInheritedPrimvar from UsdImagingGprimAdapter to UsdImagingPrimAdapter
- Because _GetInheritedPrimvars is already on UsdImagingPrimAdapter, it makes sense for _GetInheritedPrimvar to join it in service on non-gprim adapters which may need it

(Internal change: 2232147)

UsdImagingStageSceneIndex::_AdapterLookup: factoring caching of adapters into separate method.

(Internal change: 2232169)

adds usdProcImaging which initially provides baseline imaging for UsdProcGenerativeProcedural

(Internal change: 2232218)

HdPrman: Handle SdfAssetPath-valued shader parameters

(Internal change: 2232258)

testUsdImagingGLCards: adding test case for fromTexture cardGeometry

(Internal change: 2232317)

Let glslfxConfig parsing accept ints as a valid type.

Previously, it was impossible to consume an int-valued primvar in
a glslfx shader, as the config parsing in HioGlslfxConfig only handled
float, double, and vec thereof.  Now, it also handles ints (and thus
arrays of ints) but we do not bother extending to vec2i, vec3i, etc.

(Internal change: 2232543)

Avoid python3 warning about not properly closing a file.

[Tf] fix TfDenseHashMap test for windows debug builds

the size of vectors changes in debug mode on windows - from
3*sizeof(void*) to 4*sizeof(void*)

end-to-end test for HdGpGenerativeProcedural (usd->imaging->procedural resolution)

(Internal change: 2232761)
(Internal change: 2233440)

Attempt to fix intermittent testWorkThreadLimitsRawTBBMax failures

This test tries to get TBB to use the max number of worker threads
(according to WorkGetPhysicalConcurrencyLimit) by running a large
number of "tasks" through tbb::parallel_for. However, this would
often end up using some number of threads greater than 1 but less
than the physical concurrency limit, causing the test to fail.

We now use a simple_partitioner when calling parallel_for to try
to force TBB to create more chunks of work to saturate the
available worker threads. On a Windows testing machine, running
this test 100 times led to many failures prior to this change
but no failures after this change.

(Internal change: 2232861)

adds HydraGenerativeProceduralAPI to usdHydra and updates docs to indicate restored intent of library

(Internal change: 2233001)

I am modifying functions in /arch so they can substitute in a reason or message
string.

I am also renaming and adjusting the functionality of ArchLogPostMortem() and
related functions for clarity.  ArchSetPostMortem() is now
ArchSetProcessStateLogCommand(), and takes in two arrays of arguments for fatal
and nonfatal cases, similar to ArchSetLogSession(). The nonfatal case can be
invoked through the new ArchLogCurrentProcessState() and is intended to preserve
the old crash handling behavior of taking a stack trace and only outputting
information to the terminal. The fatal case can be invoked through
ArchLogFatalProcessState(), and is intened to be the normal way of handling a
crash. All code with the old ArchLogPostMortem() has been updated accordingly to
use the appropriate new function.

(Internal change: 2233042)

use HydraGenerativeProceduralAPI schema in testUsdImagingGLHdGp now that it's available (from usdHydra)

(Internal change: 2233188)

Update USD library dependencies for building on Apple Silicon

This change allows USD to build and pass tests on Apple Silicon, as long as usdview is not built. The fixes for usdview will follow in a later change.

- boost 1.76 is minimum viable for Apple Silicon and boost python.

- TBB version 2020_U2 corrects compatibility with Apple Silicon and does not emit thousands of deprecation warnings. the previously reported tear down crashes do not occur when running the tests. All tests succeed.

- libpng makes assumptions about arm processors only being on phones, build arguments are available to suppress that mistake.

(Internal change: 2233463)

[pxr] Fix some typos in comments.

(Internal change: 2233519)

Adding detailed doxygen documentation section for the USD API schema property overrides feature.

(Internal change: 2233521)

arch: Malloc hooks were removed in glibc 2.34; disable support when building on
that or newer glibc versions.

Fixes #1830

(Internal change: 2233778)
(Internal change: 2234127)

arch: Add API indicating when the app is crashing

It can be useful for non-crashing threads to know that another thread has
crashed. We now have ArchIsAppCrashing() for this purpose.

Internally we use std::sig_atomic_t to ensure safety with regard to
asynchronous signals. This doesn't guarantee thread safety by itself, but
the only place where the crashing flag is set is protected by a spin lock
that only lets one thread execute at a time, so we end up with a
thread+signal safe mechanism.

(Internal change: 2233779)

Remove "usd_" prefix from monolithic libraries by default.

Change 2190561 added the "usd_" prefix to all library
names by default, which caused the monolithic libraries
to be named "libusd_usd_ms.so" on Linux and macOS and
"usd_usd_ms.dll" on Windows. This changes the default
prefix for the monolithic builds so that the names
revert back to "libusd_ms.so" and "usd_ms.dll". Users
can still use the PXR_LIB_PREFIX option to change
the prefix if desired.

Issue and original proposed fix was from PR #1711

Fixes #1711

(Internal change: 2233803)

UsdImagingStageSceneIndex: property invalidation support for volumes by dirting volume field bindings.

(Internal change: 2233944)

Account for ABI tags in Python shared library filename on macOS

For example, this fixes incorrect discovery when using a
Python built with pymalloc which (prior to Python 3.8) adds
an 'm' to the version number in the library name,
e.g. libpython3.7m.dylib.

Fixes #1724

(Internal change: 2233952)

better detection of python lib / include dirs in build_usd.py

This addresses two issues:

- Building using a venv-installed python
  - The venv-installed pythons would try to pull the libraries from
    the venv-directory, when they only reside at the "original"\
    installed python location

- Building with a python that was moved after building on Linux
  - We experienced issues where the `INCLUDEPY` and `LIBDIR` sysconfig
    vars were baked at build time.  Thus these would no longer be
    reliable if running a python executable that was moved to a
    different location after building.

Note that or python-2.7, `installed_base` doesn't exist, so we fall back
to `base`.  This should be fairly backward-compatible, as we check if
the dir (for include) or file (for lib) doesn't exist, and try alternate
methods if not.

fixes errant conversion of infoFilename and infoVarname tokens within usdHydra

(Internal change: 2234003)

Use std::vector<int> for O(1) query in GetScenePrimPaths and to avoid costly std::map/std::set data structures.

[hdSt/hdx] Add a render setting for the maximum number of lights storm should support.

Currently, storm is hardcoded to 16 lights via a single line in glf/simpleLightingContext.cpp.  Since we don't call into any API that explicitly restricts it to 16 lights, it's better to get rid of that line, and have SimpleLightTask truncate to a settings-provided number in a more clever manner.

Note that if you bump the number of lights past 16, you will encounter both performance issues (since we haven't optimized for this yet) and (possibly) issues with running out of uniform binding points, particularly for app integrations that use the lighting context to build their own lighting buffers instead of just using the hydra lighting buffers.  For now, playing with this setting should be considered experimental.

(Internal change: 2234026)

adds support for "includeDisconnectedNodes" within material network data source to trigger legacy behavior

(Internal change: 2234110)

[hdPrman] MaterialX failures using OSL and MXv1.38.4.

The OSL files were restructured for MaterialX v1.38.4
stdlibOslPath is updated to reflect the new location of
the main include mx_funcs.h.
When using older versions of OSL the generated oslSource
will have issues compiling. OSL is unable to find stdosl.h,
but even including that into oslArgs won't allow the
oslSource to compile since code added to mx_funcs.h is
using vector.x instead of vector[0] which is not supported
in earlier versions of OSL.
Added an early out to avoid crashes when using v1.38.4
with an older OSL version.

(Internal change: 2234179)

[hdx] Fix for GlfSimpleShadowArray::GetShadowMapTexture crash.
Before updating GlfSimpleShadowArray with shadow information in
HdxSimpleLightTask, check if lighting context will use shadows. Similarly, in
HdxShadowTask, confirm there are a non-zero number of shadow maps in
GlfSimpleShadowArray before creating renderpasses.

This avoids a discrepancy between the lighting context/light data and the
simple shadow array data. In the reported bug, there were 17 lights in the
lighting context, with only the last one possessing shadows. Because we only
support up to 16 lights in Storm, the last light is truncated (see
GlfSimpleLightingContext::SetLights). This resulted in a state in which the
lighting context did not think there were any shadows, while the simple shadow
array did.

(Internal change: 2234187)

[hdx] Cleaning up code after change 2234187.

(Internal change: 2234189)

UsdImaging: marking function deprecated.

(Internal change: 2234210)

usd: Replace TfHashMap plus mutex with tbb::concurrent_hash_map for better stage loading/population scaling.

(Internal change: 2234367)

Improved for Roz stats support in hdPrman:

  * A stats Session is now created within hdPrman and passed into the libprman instance on the commandline. (Previously prman would create an instance internally as none was provided). This allows hdPrman to communicate with the session to publish its own stats etc.
  * The session is informed when a render is restarted due to user input, so that various counters and timers can be reset.
  * Meaningful strings for scene entities generated within hdprman are converted to stats::DataLocIds and passed into the riley create calls as riley::userIds. This means that Roz events which refer to a particular scene entity in their payloads now include the entity's userId in their payloads, which can be converted back into a meaningful string by the Listener or hdPrman itself.

(Internal change: 2234734)
(Internal change: 2234904)
(Internal change: 2235103)
(Internal change: 2235180)
(Internal change: 2235473)

usd: Use a robin_map here instead of std::unordered_map.  It is well-suited to
this case and provides >10% speedup on usdc file writing perf metrics.

(Internal change: 2234973)

Reorganize code to workaround compiler warnings from MSVC

These warnings show up when building code against USD and
look like:

warning C4506: no definition for inline function 'pxrInternal_v0_22__pxrReserved__::Vt_DefaultValueHolder pxrInternal_v0_22__pxrReserved__::Vt_DefaultValueFactory<pxrInternal_v0_22__pxrReserved__::GfMatrix4d>::Invoke(void)'

This happens on at least MSVC 2015 and 2017. This post seems
to indicate this is a compiler issue:

https://developercommunity.visualstudio.com/t/c4506-no-definition-for-inline-function-incorrectl/359415

Also cleaned up some old comments.

Fixes #806

(Internal change: 2235193)

Extend test case to verify that the default values
for Gf vector/matrix/quaternion types used by VtValue
are zeroed out.

(Internal change: 2235194)

Remove Maya-specific code for detecting Python from build_usd.py

This code was a remnant from when USD shipped with an optional
Maya plugin. Since that plugin has migrated to Autodesk's
maya-usd repository and USD itself no longer has Maya
dependencies, we can remove this code and reduce the surface
area of the (annoyingly complicated) Python detection code.

Note that the --build-python-info flag can be used to supply
Python information in cases where build_usd.py can't figure
it out itself. The documentation for this flag was updated
to clean it up a bit and remove explicit references to Maya.

(Internal change: 2235203)

implements data source methods for UsdImagingMaterialAdapter

(Internal change: 2235509)

Fixing issues where UsdInherits::GetAllDirectInherits would not correctly
return all inherit paths for some composition scenarios.
Specifically, this fixes the following issues:
1. It would incorrectly return paths from non-inherit arcs if non-inherit arc
    was present under an inherit. An example would be if an inherited
    class prim has a reference to another prim, the reference's path would
    be incorrectly included as an inherit path.
2. It would not return paths from inherit arcs that were included under a
    root level specializes arc.
Both of these issues are fixed with this change.

(Internal change: 2235921)

[hdSt] Transform two channel (grayscale + alpha) PNG images into RGBA format

Updating the textureChannel test in usdImagingGLBasicDrawing.
The previous textureChannels2.png image had the pattern stored
in the alpha channel, it is now swapped so the pattern is in the R
channel to be more consistant with the other test case pngs.

Note that this test case is just taking the first n channels based on
the original number of channels in the image. For the two channel
case this means we are expanding (r, a) to (r, r, r, a) which this
test case turns it into (r, r, 0, 1)

Added a test case to usdImagingGLBasicDrawing that has an 8 bit
two channel transparent grayscale image.

Fixes #1796

(Internal change: 2235970)

usd: Add overload for when `*this` is an rvalue and move out the _layer member.
This lets client code that does `SdfLayerHandle const &layer =
<editTarget>.GetLayer();` always work correctly even if <editTarget> is an
expression that conjures a temporary UsdEditTarget.

(Internal change: 2235990)

Adds Plane primitive to UsdGeom.

Address 5/25 for PR #1819

 * Rotated the plane orientations to be consistent
 * Removed 'st' coordinates, pending clarificaitons
 * Replaced 'height' with 'length'
 * Doc/comment typos and wordings
 * Coding style tweaks

Set the default width and length to 2.0, in line with other gprims.

Fixes incorrect double-sizing of width and length, and doc wording.

[HdPrman] Adding a Filtering Scene Index Plugin
to HdPrman so that when the connected SampleFilters on a
RenderSettings prim change, they are dirtied.

(Internal change: 2236375)

[usdImaging] fix _GetDirtyBitsForPrimvarChange for PrimvarChangeAdd

It was observed that primvars such as widths for UsdGeomPoints would not
update in hdSt from the usdImagingDelegate. If the widths primvar was
not read from disk it would always display with it's default value. The
change here is that with a PrimvarChangeAdd it will set the incoming
dirty bit instead of just DirtyPrimvar

[usdImaging] Remove _GetDirtyBitsForPrimvarChange

Addressing notes. Removes _GetDirtyBitsForPrimvarChange to simplify logic when checking dirty bits.

See https://github.com/PixarAnimationStudios/USD/pull/1807 for more details

vt: Change (Unchecked)Get<T>() to move out instead of return a reference when
called on an rvalue VtValue.  In this case the reference would almost certainly
dangle.

(Internal change: 2236952)

[hdSt] Destroy Hgi resources properly in hdSt texture tests.

(Internal change: 2236976)

Adds multi-use --mute argument that allows for auto-muting matching
layers both before and after stage load.

Also improves the handling of muted layers in the Layer Stack tab:
  * Muted layers no longer emit a bogus warning about not being found.
  * Muted layers now display as a dark grey entry in the layers panel.
       Previously they were not listed at all (not intentionally, but due to
    limitations in the way that layers missing from the layer registry
       were handled).
  * Adds a Mute/Unmute option to the layer panel right-click context menu,
    allowing for interactive muting without using the python interpreter.

(Internal change: 2236983)

First try at RenderPass and DenoisePassAPI prims.

(Internal change: 2237127)
(Internal change: 2237218)

tf: fix use-after-free in TfTypeInfoMap::Remove

In TfTypeInfoMap, _nameMap owns _Entry values.  _Entry records
the primary key used to create the _nameMap node.  This is
used so that removing by any string or type_info alias will
remove the underlying _nameMap entry.  However, the
implementation of __gnu_cxx::hash_map::erase requires that the
key value passed to erase remains valid after the node has
been deleted.  Previously, we would pass `e->primaryKey` which
points into the node being deleted.  Instead, we now move
primaryKey out of the entry before using it to delete.

(Internal change: 2237144)

Consistent naming of capabilities bits enum

Remove excess parameters, change vega fix to member, support caps in pso

Remove code duplication for Pcp_ForEachDependentNode

(Internal change: 2237225)

[arch] make testArchStackTrace work on windows debug even when relocated

tf: allow TF_MAKE_STATIC_DATA to provide const access

TF_MAKE_STATIC_DATA can now be used to define a TfStaticData instance
that only allows const access to the underlying data.  The data itself
is non-const so that initialization code can be used in a
straightforward manner.  This is particularly useful for copy-on-write
types where seemingly innocuous access (e.g. range-for iteration) can
trigger detachment.  Consider the following example,

    TF_MAKE_STATIC_DATA(VtIntArray, _array)
    {
       *_array= { /* ... */ };
    }

    void
    Func()
    {
        WorkParallelForN(_array->size(), [](size_t f, size_t l) {
            for (; f != l; ++f) {
                int x = (*_array)[f]; // invokes non-const operator[]
                // ...
            }
        }
    }

This code attempts to read _array in parallel but, because VtIntArray
is copy-on-write and TfStaticData::operator* returns a non-const
reference, multiple threads may race to detach if the array has been
shared previously.  TF_MAKE_STATIC_DATA(const VtIntArray, _array)
solves this issue.

(Internal change: 2237275)

Fix code generation for GLSL bindings to primvars. This type of binding
was missing the definition of HdGetScalar_name to call HdGet_name.

Update download URL for libtiff

Fixes #1901

(Internal change: 2237347)

Make Display and Sample filters imageable.

(Internal change: 2237460)

When creating the SampleFilter network to provide Riley, ignore any SampleFilters that are not visible in the scene.

(Internal change: 2237461)

Update CHANGELOG for 22.05b release

(Internal change: 2237514)

Fixing merge issues

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

# This is a combination of 33 commits.

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep…
AdamFelt pushed a commit to autodesk-forks/USD that referenced this pull request Oct 11, 2022
This submission adds deep selection capabilities to HdStorm. This allows for selection of all objects within a pick-point or frustum to be selected even if the objects are obscured by other objects drawn on top.

It uses a GPU rendering technique similar to ID based picking except that it accummulates all pick results into a one dimensional "pickBuffer" instead of storing a single selection per pixel like the ID buffer approach does.

It can be enabled by setting a new resolve mode defined as HdxPickTokens->resolveDeep.

A new helper function named TestIntersections (plural) has been added to UsdImagingGlEngine to exercise the new functionality. A new Unit test is included to test the new resolve mode and UsdImagingGLEngine helper function.

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

Minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Code cleanup based on code review.

[hdSt] Don't swizzle the scalar return value from HdGet_displayOpacity().

Contribution: Jason Fielder

(Internal change: 2224434)

[hdSt] Check that a render buffer is multisampled before using its sample count
in setting up the graphics pipeline.

(Internal change: 2224435)

[HdSt] Fixed some unresolved shader symbols for Metal

The Metal Shading Language program linker requires all refereneced
functions to be defined even if not called. This adds definitions for
"integrateLights()" for image shaders and volumes since that symbol
is referenced from the lighting and lighting termal shader code.

Also, moved the definition of the "GetPatchCoord()" out of general
codeGen an into the mesh shaders specificially, since it is needed
only by mesh primitives.

Contribution: Jon Creighton

(Internal change: 2224562)

[HdSt] Updated codeGen of compute shader parameters

This is preparation for moving more shader declarations to
resource layouts.

Contribution: Jon Creighton

(Internal change: 2224574)

[arch] use "aligned_alloc" not "std::aligned_alloc" on linux

std::aligned_alloc is introduced in c++17, but USD only requires c++14

[HdSt] Fixed some compute shader compilation errors

Restored the placement of the compute shader main() to
be last in the generated shader source string so that we
don't need to forward declare the compute() method which
might have const or non-const arguments.

(Internal change: 2224819)

[HdSt] Updated codeGen to use packed types from hgi

We alias the low-level packed types used by Storm codeGen
onto Hgi generated types so that values of these types are
initialized consistently.

Contribution: Jon Creighton

(Internal change: 2224836)

[hdSt] Wait until blit cmds complete after reallocating buffer arrays.

Contribution: Jon Creighton

(Internal change: 2224907)

[HdSt] Use appropriate OSD shader source for GLSL vs MSL

We need to use Metal-specific shader source when targeting
Metal Shading Language. This is a little awkward and we hope
that this can be improved in future releases of OpenSubdiv.

Contribution: Jon Creighton

(Internal change: 2224908)

[HdSt] Updated Storm drawing coordinate plumbing

Updated interstage drawing coordinate plumbing to use resource
layouts. This facilitates using Hgi to manage interstage inputs
and outputs for Metal.

This also changes interstage drawing coord values to be independent
variables. Previously, drawing coord values were managed as members
of interstage struct values, but that will not work for Metal. An
alternative might be to use an interstage interface block, but that
is not robustly supported by cross platform GL drivers.

Since Hgi resource generation is not currently enabled for GL,
we process resource layouts in _GeneratateGLResources() when
compiling with generated GLSL resources. This is organized to
match the existing behavior when generating Hgi resources.

Also, while GLSL provides a way to pass array-valued input
attributes, we instead declare and bind input attributes
distinctly for each item in an array of instance indices which
better matches Metal.

Some of the pre-existing documentation for this is out-of-date,
and we will address that as a follow-up change.

Contribution; Thor Hjalmarsson, David G Yu

(Internal change: 2224924)

[HgiVulkan] Add organizational shader comments to Vulkan shadergen.

Contribution: Jon Creighton

(Internal change: 2225030)

[HdSt] Generate GLSL builtins when using Hgi resource generation.

We may move this into the HgiMetal implementation.

Contribution: Jon Creighton

(Internal change: 2225035)

[HdSt] Updated primvar plumbing to resource layouts

Interstage primvar plumbing still uses GLSL interface blocks,
but these can now be generated using Hgi. Although for now
we continue to generate primvar interface blocks as native
GLSL while we complete the transition to Hgi.

This also fills out the remaing codeGen support for Metal
Tessellation PTVS and PTCS shader stages, but for this
release we are not yet using PTCS shaders.

PTVS shaders have aspects that are similar to both
VS and TES, and we must also take into account differences
in PrimitiveID addressing.

Contribution: Thor Hjalmarsson, David G Yu

(Internal change: 2225042)

[HdSt] Enabled resource layouts for all codeGen resources

This flips the switch to use HdSt_ResourceLayout to coordinate
declarations for all resources. This includes buffers and textures
and also interstage variables and interstage interface blocks and
input attributes.

Textures and other resources that are expressed using resource
layouts can be declared using Hgi resource generation, or they
can be declared using native GLSL resource generation. Currently,
Hgi resource generation is enabled only for Metal, but we intend
to enable this for other Hgi backends eventually.

This change incorporates three other extensions to codeGen to
improve compatibility between GLSL and Metal Shading Language:

- Promotes "bool" resource to be of type "int" in shader declarations
  so that the memory layout of struct members is consistent.

- HdTextureLod_name() accessors to allow sampled access to
  a specific mip level.

- HdGetScalar_name() accessors to allow access to the scalar
  value of name without needing a ".x" swizzle which is not
  supported for scalar data types in Metal, even though is
  is supported by GLSL.

Contribution: Jon Creighton, David G Yu

(Internal change: 2225264)

[HdSt] Metal requires storeOp for AOV attachments

Contribution: Jon Creighton

(Internal change: 2225265)

[HdSt,Glf,UsdShaders] Updated shaders for Metal

Contribution: Jon Creighton

(Internal change: 2225273)

[HgiMetal] Enabled Storm for macOS using HgiMetal

The implementation of Storm for Metal requires support for
built-in fragment shader barycentric coords, e.g. we need
support for the [[barycentric_coord]] fragment function
input attribute. So, this is enabled only for macOS >= 10.15
and only on systems with display driver
support for barycentric coords.

Contribution: Jon Creighton

(Internal change: 2225274)

[HdSt,HgiGL] Fixed two issues affecting Storm on AMD GPUs

1) HgiGL should be filtering out generation of built-in shader
outputs for GL, but the filter search was using the wrong key.

2) HdSt should be emitting location bindings for fragment shader
outputs, but was not.

(Internal change: 2225525)

[UsdImagingGL] Updated the displayName for Storm to be Metal on macOS

This is an interim fix until we have a more complete system in
place for determining the display name for Storm based on Hgi.

(Internal change: 2225526)

Fix UsdShadeConnectableAPI::HasConnectableAPI crash when querying for a Abstract type

- Adds static helper UsdSchemaRegistry::IsAbstract which return true for abstract prim types.

Note since we can not consult built-in API schemas for abstract prim types (these do not have any primDefinition),
we are ignoring these and returning false when querying for HasConnectableAPI, at least for now!

(Internal change: 2225705)

[HdSt] For Metal convert double to float for ext computations

We'll still use double precision for Hgi implementations that
support double precision shading language data types.

(Internal change: 2225828)

[UsdAppUtils] Updated command line args test for Metal

The Storm renderer is named "Metal" on macOS but is still
named "GL" on other platforms.

(Internal change: 2225829)

[usdviewq] Updated to disable line stipple for bbox drawing on Metal

The OpenGL driver on Apple Silicon systems is fully emulated on
top of Metal and issues performance warnings if line stipple is
enabled.

(Internal change: 2225838)

[HgiMetal] Enabled multi draw indirect drawing for Metal

This allows the Metal implementation to take advantage of
parallel encoding of render commands.

(Internal change: 2225839)

[hdSt] Use HgiGet_ texture accessor for non-bindless textures. Fixes issue when
calling HdGet_ for a shadow texture on Metal.

(Internal change: 2225931)

Update CHANGELOG.md for 22.05 release

(Internal change: 2225965)

Update tutorial badge for v22.05

(Internal change: 2226029)

Correct year in CHANGELOG.md for 22.05 release

(Internal change: 2226689)

[HdSt] Fixed missing forward decl guards for transform2d accessors

This avoids shader compilation errors with HgiMetal

(Internal change: 2227394)

Update 22.05 release date.

(Internal change: 2227503)

Bump USD version to anticipated next release 22.08

(Internal change: 2227785)

Remove usage of deprecated function GetConnectedSource which is causing warning messages in katana

(Internal change: 2224512)

Animated volumes in Storm: adding scene index plugin that adds a dependency of a volume on its fields and chains it with a dependency forwarding scene index.

This way, the voulme pulls the new textures when the filePaths of its volume fields change.

Note that this replaces the old mechanism where HdStField::Sync calls HdChangeTracker::MarkAllRprimsDirty - when scene indices or scene index emulation is used.

(Internal change: 2224513)
(Internal change: 2224657)

Introducing HdDependencyForwardingSceneIndex.

(Internal change: 2224515)
(Internal change: 2224584)
(Internal change: 2224658)

Scene index emulation: fixing inconsistencies so that clipping planes work with USDIMAGINGGL_ENGINE_ENABLE_SCENE_INDEX.

Adding clippingPlanes of type VtArray<GfVec4d> to the HdCameraSchema.
This differs from HdCamera where it is called clipPlanes and of type std::vector<GfVec4d>. Thus, we need to convert in the scene index adapter scene delegate and the data source legacy prim.

Adding test case for (animated) clipping planes to usdImagingGL.

(Internal change: 2224516)

Change how XPU Devices are set

CreateRiley now uses xpu:cpuconfig and xpu:gpuconfig to communicate which devices XPU should use.

Note on GPU selection: As off now in rman, only the first GPU is supported regardless of the input type being an array.

(Internal change: 2224729)

Adding support in USD for declaring properties as API schema overrides.

A schema property that is declared as an API schema override does not define
that property in that schema. Instead it behaves as an "over: for a property with
the same name that may be defined by an API schema that is included as a
built-in API schema of the schema declaring the override. This is different than
the behavior when included API schemas define the same property (without
specifying an override) as in that case, the strongest schema's property wins
and completely stomps over the same property from any weaker schema.

API schema overrides can be declared for both API and Typed schemas in the
source schema files through adding customData on the property of
'bool apiSchemaOverride = true'. This will be converted to a list of API schema
override property names stored in the schema prim's customData in the
resulting generatedSchema.usda. When the UsdSchemaRegistry is populated,
any properties declared as API schema overrides will not be immediately
added to the prim definition. Instead they will be composed over the defined
property from the schema's built-in API schemas if a property with that name
is indeed found. If no property with the name exists in the included API schemas,
the override property is ignored.

An examples of where this will be used is UsdLuxLightAPI which will now be able
to declare:
class "LightAPI" (
    prepend apiSchemas = ["CollectionAPI:lightLink", "CollectionAPI:shadowLink"]
) {
    uniform bool collection:lightLink:includeRoot = 1 (
        customData = {
            bool apiSchemaOverride = true
        }
    )
    uniform bool collection:shadowLink:includeRoot = 1 (
        customData = {
            bool apiSchemaOverride = true
        }
    )
}
This means that LightAPI can now override just the default values of the
includeRoot properties defined in its two built-in CollectionAPIs while leaving the
rest of the definition (such as documentation) as defined in the CollectionAPI
schema itself.

Another example is the light:shaderId property defined in LightAPI which all the
concrete Typed light schemas (RectLight, DistantLight, etc.) will be able to
override to defaulting to the USD shader ID for the light, once again, without
stomping over the entire property definition from LightAPI.

Note that this feature is specific to overriding properties from built-in API
schemas and doesn't apply to overriding properties via schema inheritance.
This is because schema properties are already always composed over via
inheritance during schema generation so no specification is necessary.

(Internal change: 2224838)

Clients of HdSceneIndexPluginRegistry: do not add HdSceneIndexPlugin as Base to HdSceneIndexPluginRegistry::Define already does it.

(Internal change: 2224869)

Clients of HdSceneIndexPluginRegistry: do not add HdSceneIndexPlugin as Base to HdSceneIndexPluginRegistry::Define already does it.

(Internal change: 2224870)

testUsdImagingGLUsdLux: avoiding degeneracies.

The box had a degenerate transform and the sphere and sphere light were at exactly the same position with the same radius.

Note that the test uses auto framing for the camera and thus is sensitive to geometry movements changing the bounding box.

(Internal change: 2225336)

Replace all description of .usda as "ASCII" in user doc with
"text", and enhance the FAQ to describe that usda is a UTF-8 encoding.

Doc-only change.

(Internal change: 2225469)

Hydra, usdImaging and Storm: adding cube prim type and schema to Hydra. Adding a implicits data source for usdImaging. Adding scene index to storm to convert the cube into a mesh.

(Internal change: 2225666)
(Internal change: 2225696)
(Internal change: 2225865)

Add Basic UsdImaging support for RenderSettings and MurkFilters

Getting basic Murk working in Usdview. The murk prims are populated
only when they are connected through the outputs:ri:sampleFilters
terminal. Attaching a murk filter or changing parameters works as
expected, however, removing or changing the connected filter
currently needs a stage reload to visually see the appropriate change.

(Internal change: 2225714)

Hydra, usdImaging and Storm: adding cone and cylinder prim type and schema to Hydra. Using implicits data source in the UsdImagingSphereAdapter. Adding conversion from cone and cylinder to mesh to Storm's implicit surface scene index plugin.

(Internal change: 2225900)

Hydra, usdImaging and Storm: adding sphere prim type and schema to Hydra. Using implicits data source in the UsdImagingSphereAdapter. Adding conversion from sphere to mesh to Storm's implicit surface scene index plugin.

(Internal change: 2225909)

usdGenSchema updates:

1. The apiSchemaOverride customData in a schema.usda used for schema
    generation is no longer composed across schema inheritance. Instead a
    schema property's apiSchemaOverride state is just determined by the
    customData on the strongest property definition (with no customData
    opinion meaning it's not an API schema override). We still check the
    property's full property stack to make sure that if a property is defined
    as an API schema override, then all the ancestor classes that defined
    the property must also have defined it as an API schema override.
2. Setting apiName = '' for a schema attribute will also exclude it from the
    list of attributes listed for just the class in its generated
    GetSchemaAttributeNames function.
3. The blurb in generated schema class headers about fallbacks for token
    valued attributes is no longer included if all token valued attributes are
    excluded from the C++ API (via apiName = '' or
    apiSchemaOverride = true).

(Internal change: 2226008)

UsdLux updated with API schema override declarations:

Updated all usdLux properties that override API schema
properties to define them as apiSchemaOverride = true and regenerated
USD schemas.

(Internal change: 2226010)

Add PLUG_THIS_PLUGIN_NAME macro for retrieving the name
of the plugin where this macro is invoked. By default this
macro has the same value as MFB_PACKAGE_NAME that is set
by the build, but this can be overridden in the (rare) case
that the plugin and package names differ.

PLUG_THIS_PLUGIN was modified to use PLUG_THIS_PLUGIN_NAME
for lookups in the plugin registry.

(Internal change: 2226064)

Hydra, usdImaging and Storm: adding capsule prim type and schema to Hydra. Using implicits data source in the UsdImagingCapsuleAdapter. Adding conversion from capsule to mesh to Storm's implicit surface scene index plugin.

Together with the previous changes, this covers all implicit surfaces.

(Internal change: 2226093)

Hydra scene index emulation: passing through values and invalidation for new implicit surface prim types capsule, cube, cone, cylinder and sphere.

(Internal change: 2226094)

hdPrman: adding native support for spheres.

(Internal change: 2226095)
(Internal change: 2226331)

[hdPrman] Don't emit warnings when traversing material nodes with id
"PrimvarPass."

(Internal change: 2226226)

Fix to how we compose reference and payload list ops when layers and
 sublayers have layer offsets (both explicitly authored or implicit through
 time codes per second resolution).

This easiest way to explain this is with an example. The issue from the
 bug this is for is someone has a root layer with two sublayers:
-root.usda-
(
    subLayers = [
        @./sublayer_del_ref_30tcps.usda@,
        @./sublayer_add_ref.usda@
    ]
)

-sublayer_add_ref.usda-
def Xform "World" (
    prepend references = @./mesh.usda@</World>
) {
}

-sublayer_del_ref_30tcps.usda-
(
    timeCodesPerSecond = 30
)
def Xform "World" (
    delete references = @./mesh.usda@</World>
) {
}

The user is expecting the stronger sublayer to remove the reference to
mesh in /World, but because of the 30 tcps specified in the deleting
layer we resolve a layer offset for the reference to convert it into the 24
tcps of the root layer. This resolved layer changes the identity of deleted
reference and since it no longer matches reference added by the weaker
sublayer, it is not actually deleted.

While the automatic scaling from the tcps difference makes this extra
mysterious, this same problem would be caused if there were no tcps
difference but the sublayers were authored with different layer offsets in
the root layer, e.g.
(
    subLayers = [
        @./sublayer_del_ref_.usda@ (scale = 2.0),
        @./sublayer_add_ref.usda@
    ]
)

This fix is pretty simple in that while we still fully resolve the layer offsets
for the reference arc in the exact same way as before, we only use the
layer offset as authored as part of the identity of the reference when
composing the list op. Now in both of the above examples, the reference
 is properly removed regardless of the offsets of the sublayers.

Fixes #1778

(Internal change: 2226344)

Don't crash in debug routines when the shader is empty due to a bug.

(Internal change: 2226382)

[hdSt, usdImagingGL] Clean up some of the remaining uses of env var
HGIGL_ENABLE_MULTI_DRAW_INDIRECT. At this point, this env var is really just a
debug flag.

Its use was removed from any usdImagingGL tests, and there is now only one test
in hdSt, testHdStBasicDrawingImmediate, testing its disabling.

(Internal change: 2226474)

UsdShadeConnectableAPIBehavior: Fix when trying to get a plugin for an incompatible type

Make sure type being queried is usd compatible (Typed or APISchemaBase) before trying to get plugin associated with that type.

(Internal change: 2226659)

Update python wrapping in fs and usdShade to use TfPyBoolBuiltinFuncName
when wrapping __zero__/__bool__.

(Internal change: 2226690)

Hydra implicit surface scene index:
Moving the implicit surface scene index into a new library hdsi.
Making it configurable so that scene index plugins can say which prims need to be converted to a mesh or need to have their transform changed - which is necessary for RenderMan.

(Internal change: 2226698)
(Internal change: 2226805)

hdPrman: adding cone, cylinder, cube and capsule support by using native Riley prims and the implicit surface scene index.

(Internal change: 2226699)

Fixes to primvar sampling in scene index emulation and the usd imaging stage scene index:

UsdImagingDataSourceAttribute::GetContributingSampleTimesForInterval:
- return times relative to shutterInterval
- return sample for the endpoints of the interval instead of crashing if there were no samples on the usd attribute for the given interval (interval is between two far apart samples or before or after the first or last sample, respectively)

HdSceneIndexAdapterSceneDelegate::_SamplePrimvar:
- respect the boolean return value of GetContributingSampleTimesForInterval (when not using the HdLegacyPrimSceneIndex)
- Make sure that the method never returns 0 and thus making clients drop any values. This happened when GetContributingSampleTimesForInterval didn't fill times due to authoredSamples being computed before the fallback sample time 0.0f was added.

(Internal change: 2226759)

Add initial sections for anticipated 22.08 release notes

(Internal change: 2226798)

[hd, hdSt] Remove references to unused env var HD_ENABLE_SMOOTH_NORMALS.

(Internal change: 2226815)

[hdSt, hdx] Update skydome Viewport calculation
to re-use existing function that was previously a private helper
in HdStRenderPass.

(Internal change: 2226855)

Tiny doxygen fix for parameter name.

(Internal change: 2226876)

Add ability to add/remove/change Murk Sample Filters in usdview

Storing the sampleFilterPath indicated in the connection on
the RenderSettings prim in HdPrman's RenderParams, and
dirtying the affected sampleFilters when switching connected
filters. Then having the SampleFilter check against this stored
path to see if the filter should be created/deleted, and changing
the renderSettings to a Bprim so that it will be sure to sync
before the Sprim SampleFilter.

(Internal change: 2226882)

Cleanup post Basic Murk-Sample Filter Support

(Internal change: 2226884)

removes repeated reserve call within HdNoticeBatchingSceneIndex as it is unnecessary and surprisingly expensive

(Internal change: 2226894)

small fix to GfVec Slerp test

Hydra scene indices: moving helper to merge contributing time samples into hd/dataSource.h.

(Internal change: 2227047)

When using scene index emulation, return after calling AddLegacyPrim when
inserting a new Bprim (otherwise it would be created twice).

Hydra implicit surface scene index: rather than implementing HdsiImplicitSurfaceSceneIndex::_PrimsDirtied, adding __dependencies.

In Storm, factoring out the creation of the dependency forwarding scene index to make sure it is always run last.

(Internal change: 2227053)

HdPrman: since the implicit surface scene index is now using __dependencies, we need to add a dependency forwarding scene index to hdPrman.

(Internal change: 2227054)
(Internal change: 2227129)

Remove unused TfPyGetModulePath.

(Internal change: 2227203)

Remove commented-out Objective-C code from a Tf test.

(Internal change: 2227206)

TfPyRun*: comment clarifications.

In particular, point out that TfPyRun{String,File} require the GIL.

(Internal change: 2227207)

tf test: add TfPyLock before TfPyRunString.

(Internal change: 2227214)

Storm dependency scene index plugin: rather than implementing HdSt_DependencySceneIndexPlugin::_PrimsDirtied, making __dependencies depend on volumeFieldBinding.

(Internal change: 2227264)

[ar 2.0] Remove support for Ar 1.0

Ar 1.0 was deprecated in the 21.11 release. This change
removes the ability to switch to Ar 1.0, effectively
ending support. Follow-up changes will remove Ar 1.0
code from the tree.

(Internal change: 2227389)

[hdSt] Don't add fallback/unconnected material param names to the list of a
material network's primvars. Fixes a scenario where an asset had
both a primvar "occlusion" and a UsdPreviewSurface material with an unconnected
"occlusion" input parameter.

(Internal change: 2227467)

Change Usd_Clip to hold a shared pointer to the array of time mappings.
Set up this array in Usd_ClipSet where all the Usd_Clip objects are
allocated. Prevents N^2 memory usage on the number of time mappings in
a clip set.

rmanArgsParser: Do not warn when args file is not in Args dir

- Put this behind a TF_DEBUG for the users to know that no implementation will be provided for such an args file which is not under parent "Args" directory.

(Internal change: 2227851)

Fix rmanArgsParser out of bound crash

(Internal change: 2228044)

Ensure the GIL is locked before destroying Python objects

This avoids issues when a TfErrorMark instantiated in C++
captures Tf.Errors emitted in Python and is subsequently
cleared, destroying the captured TfPyExceptionState objects.

(Internal change: 2228054)

Catchup CHANGELOGs for anticated 22.08 release

(Internal change: 2228100)

Couple of fixes to UsdUtilsUpdateSchemaFromSdrNode

- Do not set any connectivity for non connectable nodes.
- Fix property pruning when only typedSchemaForAttrPruning is set and no apiSchemasForAttrPruning is provided.
- Check early if the output parameters are suppressed and use this information in error handling for namespace prefix override when outputs are present

(Internal change: 2228101)

Fixing startup python script for usdview interpreter in python3

(Internal change: 2228144)

Storm: fixing comment.

(Internal change: 2228168)

Implicit surface scene index: removing unused member.

(Internal change: 2228219)

Fix usdgenschemafromsdr to allow environment variable paths

- Useful when when "sourceAssetNodes" has paths to sdr nodes with envionment variable in them, example "$RMANTREE/lib/defaults/PRManAttributes.args".
- Cleanups.

(Internal change: 2228325)

Allow mtlx networks with mismatched connection types to work.

(Internal change: 2228330)

Some improvements for translating certain kinds of materialX networks.

* Use default st coordinates when nothing is connected to an image node's texcoord.
* Fix assumptions about the expected name of graphs in the materialX document.
* Mtlx image nodes using tex files were fipped vertically.

(Internal change: 2228333)

Hd: introducing HdMapContainerDataSource.

(Internal change: 2228358)

Adding convenience c'tors to HdOverlayContainerDataSource.

(Internal change: 2228359)

[ar 2.0] Remove Ar 1.0 implementation

(Internal change: 2228392)

[HdSt,Hdx] Removed backward compatable resource layout shader source

This is no longer needed now that HdSt_CodeGen can fully
handle backward compatible GLSL resource generation. As before,
we've only added GLSLFX resource layouts for shader snippets
shared between HgiGL and HgiMetal. We'll likely add more as we
continue to enable support for HgiVulkan.

(Internal change: 2228409)

TfPyWrapEnum will now append an underscore to all enum
types and values that match reserved keywords from both
Python 2 and 3. For example, if an enum class "Foo" has
a value named "None" and is wrapped via TfPyWrapEnum,
the corresponding value in Python will be "Foo.None_".
This follows the recommendation in the PEP 8 style
guide for resolving identifier conflicts with keywords.

Previously any such values would result in syntax errors
when used in Python, since reserved keywords cannot be
used as identifiers. This change avoids this problem
without forcing clients to modify their C++ code.

Note that keywords from both Python 2 and 3 receive
this treatment no matter which version of Python is
being used. So the above example will be the case
under either version. This ensures that enum values
stay consistent and client code doesn't have to change
change depending on the version of Python being run.

(Internal change: 2228741)

Fix race condition during prim destruction that
could lead to invalid memory access.

(Internal change: 2228809)

Fix intermittent crashes due to XPU configuration

(Internal change: 2228868)

Update UsdGeom::ComputeProxyPrim to implement non-pruning semantics
when computing the purpose value for the targeted prim.

This is followup to change 2033434.

(Internal change: 2229004)

[hd] Adding Schemas and emulation for RenderSettings and SampleFilters.

(Internal change: 2229022)

[HdPrman] Fixed to support sharpness per crease edge

UsdGeomMesh supports both: sharpness per crease and sharpness
per crease edge, but previously HdPrman was transporting only sharpness
per crease.

(Internal change: 2229069)

HdDataSource::AtmoicStore: changing signature to take const & instead of & for value.

(Internal change: 2229081)

SdrShaderProperty: document and add support for nested pages

- delimited by ":".
- Update rmanArgsParser, rmanOslParser, usdSdrOsl plugin to add ":" delimited instead of Osl default of "." delimited page metadata.

(Internal change: 2229101)
(Internal change: 2229116)

Introducing HdLazyContainerDataSource.

(Internal change: 2229106)
(Internal change: 2229382)

Replacing usage of deprecated UsdGeomImageable primvar methods in pxr with the corresponding UsdGeomPrimvarAPI methods in prep for deleting the deprecated methods.

(Internal change: 2229301)

Updated changelogs for OSL and Args parsers using Sdr's nested page delimiter as ":" instead of "."

(Internal change: 2229325)

Adding HdContainerDataSourceEditor::Overlay.

(Internal change: 2229372)
(Internal change: 2229382)

Add a note about setting USD_DISABLE_AUTO_APPLY_API_SCHEMAS to true
when regenerating schemas using usdgenschemafromsdr. Not doing this
can cause extra properties to be pruned from the "re"-generated schemas.

(Internal change: 2229391)

usdImagingGL/CMakeLists.txt: adding testUsdImagingGLClippingPlanes.

(Internal change: 2229393)

[ar 2.0] Remove Ar 1.0 support from sdf

(Internal change: 2229415)

[ar 2.0] Remove Ar 1.0 support from pcp

(Internal change: 2229416)

[ar 2.0] Remove Ar 1.0 support from usd

(Internal change: 2229418)

[ar 2.0] Remove Ar 1.0 support from usdUtils

(Internal change: 2229420)

Move renderman material property tokens to the primvars namespace.
Keep checking for materials that do not start with "primvar:" for compatibility sake.
Minor changes to rman for handling material properties that start with "primvar"

(Internal change: 2229421)

added root selected check to printTreeWidget.py>ExpandItemRecursively()

Deleting deprecated primvar methods from UsdGeomImageable

(Internal change: 2229688)

Replace boost::shared_ptr and scoped_ptr in usdAbc

(Internal change: 2229779)

Replace boost::shared_ptr in Sdf_FileFormatRegistry

(Internal change: 2229780)

ndr: add the ability to disable NDR plugins

NDR plugins can do expensive filesystem walking that may not be desired
in all situations. Allow specific NDR plugins to be disabled through the
environment by setting PXR_NDR_DISABLE_PLUGINS to a comma-separated list
of plugin names.

(Internal change: 2229885)

Copying behaviour from `lightAdapter` to consider *all* attributes for setting `DirtyParams` in `TrackVariability`

Addressing feedback

Addressing feedback

Implement reverse lookup table in instanceAdapter to improve performance of getting proto prim

Address feedback to improve inserting and removing proto prim cache

Fixed missing material dependency on GeomSubSet

Add support for Multiple Murks-SampleFilters in Usdview

When using multiple murks we need to create a Combiner node
that has an array with all the riley sampleFilter handles listed in
the desired order. This combiner node needs to be added to the
riley shading network that contains all the riley sampleFilter nodes.
This shading network is then used to create or modify the
SampleFilters in riley.

(Internal change: 2229915)
(Internal change: 2230077)

Ensure light collections are dirtied on creation

Added dirty tracking in CollectionCache

Cleaner and simpler collection dirty tracking

Cleaner and more reliable collection dirty

Missing method declarations

Fixed compile error

Removed duplicated method

Fixed another build issue

Update usdRiPxr schemas from updates args files and to include new schemas

- Includes schemas for:
  - PRManAttributes
  - PRManCamera
  - PRManDisplayChannel
  - PRManOptions
  - PRManPrimVars
  - All rman display drivers: deepexr, openexr, pointcloud, tiff, texture,etc.

- All schemas are updated to use ":" delimiter for displayGroup which is the default for sdrNodes (instead of ".").
- All renderman Light API schemas now "canOnly" auto apply to their respective UsdLux concrete schemas.
- Updated autogen README to include mention of setting of RMANTREE environment variable if users try to regenerate the schemas.
- Updated autogen README to include a suggestion to set USD_DISABLE_AUTO_APPLY_API_SCHEMAS to true when regen`ing the schemas.

(Internal change: 2230113)

Adds API for accessing AOV render buffers.

(Internal change: 2230229)

Adds envvar as a temporary solution to disable hider jitter.

(Internal change: 2230255)

Allow any prim type in HdDataSourceLegacyPrim to provide a "primvars" datasource.

(Internal change: 2230301)

Register velocities and acclerations on point instancer primitives as
hydra-accessible primvars.

Update CHANGELOG.md for 22.05a patch release

(Internal change: 2230317)
(Internal change: 2230746)

Add dual quaternion to the Gf package (part 1 of 4)

Add GetZero() and GfDot() to quaternion types (GfQuaternion, GfQuatd,
GfQuatf & GfQuath) in preparation for the implementation of dual
quaternion types.

(Internal change: 2230330)

Add dual quaternion to the Gf package (part 2 of 4)

Add GfDualQuat template and types (GfDualQuatd, GfDualQuatf &
GfDualQuath) to Gf package.

In preparation for the implementation of Dual Quaternion Skinning in
USDSkel.

(Internal change: 2230350)

Add dual quaternion to the Gf package (part 3 of 4)

Add support for GfDualQuat types in pix/base/vt

In preparation for the implementation of Dual Quaternion Skinning in
USDSkel.

(Internal change: 2230364)

Bug Fixing single sampleFilter changes after adding Multiple SampleFilter support

(Internal change: 2230558)

Update to MaterialX v1.38.3

- Use CMake config directly from MaterialX install
- Update for API and library changes in v1.38.3
- Strenghten NodeDef discovery

This is the last update that is not version tagged in the C++ code.
Future updates will be bracketed using MATERIALX_MINOR_VERSION defines
introduced in v1.38.3.

Update to MaterialX v1.38.4

Add support back in for MaterialX v1.38.3

Fix incorrect MaterialX cmake variable.

If no XpuDevices are selected, use the default RenderParams when initializing Riley

(Internal change: 2230627)

Remove unused variable

(Internal change: 2230691)

defines HdGpGenerativeProcedural

This is a base class for procedurals which have read access to the input scene and
can generate (or update) prims beneath a given prim. Also includes a
registry for delivering these procedurals via plug-in.

HdGpGenerativeProceduralResolvingSceneIndex can be instantiated to resolve/evaluate/update
these procedurals when found within the input scene index.

(Internal change: 2230703)

[hdPrman] Convert depth AOV from NDC space (-1, 1) to window space (0, 1) for
consistent behavior with Storm.

(Internal change: 2230731)

Add support for specifying a post-release tag to the
PyPI package version when running the Azure pipeline.

This allows us to create packages with different
version numbers (e.g. 22.05.post1) for patch releases.

(Internal change: 2230738)

removes unnecessary inclusion of base class during plug-in registration

(Internal change: 2230790)

[ar 2.0] Remove Ar 1.0 support from usdMtlx

(Internal change: 2230839)

[ar 2.0] Remove Ar 1.0 support from Hio

(Internal change: 2230843)

[ar 2.0] Remove Ar 1.0 support from sdrOsl

(Internal change: 2230844)

[ar 2.0] Remove Ar 1.0 support from rmanArgsParser

(Internal change: 2230845)

[ar 2.0] Remove Ar 1.0 support from rmanOslParser

(Internal change: 2230846)

[ar 2.0] Remove Ar 1.0 support from usdResolverExample

(Internal change: 2230847)

[ar 2.0] Remove Ar 1.0 support from sdrGlslfx

(Internal change: 2230849)

[ar 2.0] Remove check for PXR_USE_AR_2 that was missed in an earlier change

(Internal change: 2230850)

Corrected documentation errors that inadvertently led
to the declaration of a struct named "For". In turn, this would cause
Doxygen to auto-generate links to this bogus struct any time it saw
the word "For" in documentation text. (Oops.)

The affected doc string should not have been encountered in our doc
build in the first place, as it is only applicable when USD python
support is disabled at build time.

We now define PXR_PYTHON_SUPPORT_ENABLED so that the generated doc
correctly reflects our build configuration. This also happens to fix
our docs because the incorrect doc string is no longer processed.

The error in tf/pyTracing.h has also been corrected for anyone else
who may generate the docs without python support.

(Internal change: 2230926)

Update usdRiPxr disabling canOnly auto apply for Pxr*Lights

- Also includes a couple of args properties update for PxrOptions
- Also includes updates of apiSchema override property names for LightFilter's CollectionAPI filterLink.

(Internal change: 2230994)

[hd] Fix DataSourceLegacyPrim's "mesh" datasource to return "subdivisionScheme" in GetNames()

(Internal change: 2231037)

Update error thresholds for usdImagingGLInstancing tests.

(Internal change: 2231058)

[hdSt] Add API export tags to HdStTextureIdentifier.

Fixes #1758

(Internal change: 2231079)

[hdPrman] Suppress warning when a material has an empty material resource; upgrade to a coding error if there's a type mismatch.

(Internal change: 2231144)

[usdImaging] Add edit processing support for UsdImagingStageSceneIndex.

This change subscribes the scene index to the _OnObjectsChanged notice, and turns the notice into a series of "resync" and "invalidate" operations.  Invalidation operations are dispatched through prim adapters, which are responsible for saying (for that prim type) what hydra properties changed for a given set of USD properties.

(Internal change: 2231145)

Remove unused function

(Internal change: 2231215)

HdPrimvarSchema role tokens: changing capitalization for consistency with how these are used elsewhere in hydra.

(Internal change: 2231235)

USD schema for an abstract "GenerativeProcedural" as the founding member of a usdProc library.

(Internal change: 2231316)

Temporarily disable testUsdImagingGLClippingPlanes until
issue with infinite loop can be resolved.

(Internal change: 2231352)

Storm volumes: making material final to avoid the volume shader being replaced by the default material network that does not work for volumes.

(Internal change: 2231353)

Adding HdDataSourceLocatorSet::Contains.

(Internal change: 2231354)

Implementing UsdImagingGL draw modes through a scene index.

(Internal change: 2231380)
(Internal change: 2231391)

Reenable testUsdImagingGLClippingPlanes and run test in offscreen
mode to fix hang.

(Internal change: 2231390)

Fix compile errors due to default constructors

On some combination of compilers and STL implementations,
(I hit this using clang on Linux with libstdc++ from gcc 9)
hd/command.cpp fails to build with errors like:

usd/pxr/imaging/hd/command.cpp:30:22: error: defaulting this default constructor would delete it after its first declaration
HdCommandDescriptor::HdCommandDescriptor() = default;
                     ^
usd/pxr/imaging/hd/command.h:104:35: note: default constructor of 'HdCommandDescriptor' is implicitly deleted because field 'commandArgs' of const-qualified type 'const pxrInternal_v0_21__pxrReserved__::HdCommandArgDescriptors' (aka 'const vector<pxrInternal_v0_21__pxrReserved__::HdCommandArgDescriptor>') would not be initialized
    const HdCommandArgDescriptors commandArgs;

I believe this error is because commandArgs in HdCommandDescriptor
is a const std::vector member variable and C++ requires that it
have a user-provided constructor in order to generate the
default constructor for HdCommandDescriptor. The STL implementations
where this fails has an inline defaulted (i.e. not user-provided)
std::vector c'tor, which means the compiler is unable to generate
HdCommandDescriptor's default c'tor and errors out.

To fix this, we explicitly define empty constructors for
HdCommandDescriptor and HdCommandArgDescriptors. (Oh, C++).

Originally reported with a proposed fix in #1696.

Fixes #1696

(Internal change: 2231575)

Adds HDGP_INCLUDE_DEFAULT_RESOLVER envvar (defaulting to false) to ease with development and testing of hydra procedurals

(Internal change: 2231623)

[arch] remove ArchTestCrash(bool) declaration

From the looks of things, ArchTestCrash(bool) was the original
signature; then at some point it was changed to
ArchTestCrash(ArchTestCrashMode) and moved to testArchUtil.  However it
seems that the old declaration was left dangling (though implementation
was removed).

Removed invalid TF_VERIFY encountered in cases involving
subroot references and relocates.

(Internal change: 2231953)

Adding TRACE_FUNCTION to implicit surfce scene index.

(Internal change: 2231995)

Apply compile definitions and include directories from
external targets when building object libraries for the
monolithic build.

This fixes an issue with monolithic builds on Windows
using MaterialX v1.38.4 shared libraries. The USD build
now relies on CMake config files published by the
MaterialX build, but because we were ignoring compile
definitions from external targets we weren't picking
up the MATERIALX_BUILD_SHARED_LIBS define that was
needed to ensure symbols were imported/exported
properly.

(Internal change: 2232025)

HdNoticeBatchingSceneIndex: adding TRACE_FUNCTION.

(Internal change: 2232081)

lazily load prim adapters and confirm stage is valid prior to registering for usd change notices
- the lazy loading matches existing UsdImagingSceneDelegate behavior and is desirable beyond fixing the mysterious crash
  that can occur when ctrl-c exiting usdview
- confirming stage validity fixes a less mysterious crash which can happen with natural destruction

(Internal change: 2232092)

usdImaging: Change-processing for implicits.

(Internal change: 2232106)

move _GetInheritedPrimvar from UsdImagingGprimAdapter to UsdImagingPrimAdapter
- Because _GetInheritedPrimvars is already on UsdImagingPrimAdapter, it makes sense for _GetInheritedPrimvar to join it in service on non-gprim adapters which may need it

(Internal change: 2232147)

UsdImagingStageSceneIndex::_AdapterLookup: factoring caching of adapters into separate method.

(Internal change: 2232169)

adds usdProcImaging which initially provides baseline imaging for UsdProcGenerativeProcedural

(Internal change: 2232218)

HdPrman: Handle SdfAssetPath-valued shader parameters

(Internal change: 2232258)

testUsdImagingGLCards: adding test case for fromTexture cardGeometry

(Internal change: 2232317)

Let glslfxConfig parsing accept ints as a valid type.

Previously, it was impossible to consume an int-valued primvar in
a glslfx shader, as the config parsing in HioGlslfxConfig only handled
float, double, and vec thereof.  Now, it also handles ints (and thus
arrays of ints) but we do not bother extending to vec2i, vec3i, etc.

(Internal change: 2232543)

Avoid python3 warning about not properly closing a file.

[Tf] fix TfDenseHashMap test for windows debug builds

the size of vectors changes in debug mode on windows - from
3*sizeof(void*) to 4*sizeof(void*)

end-to-end test for HdGpGenerativeProcedural (usd->imaging->procedural resolution)

(Internal change: 2232761)
(Internal change: 2233440)

Attempt to fix intermittent testWorkThreadLimitsRawTBBMax failures

This test tries to get TBB to use the max number of worker threads
(according to WorkGetPhysicalConcurrencyLimit) by running a large
number of "tasks" through tbb::parallel_for. However, this would
often end up using some number of threads greater than 1 but less
than the physical concurrency limit, causing the test to fail.

We now use a simple_partitioner when calling parallel_for to try
to force TBB to create more chunks of work to saturate the
available worker threads. On a Windows testing machine, running
this test 100 times led to many failures prior to this change
but no failures after this change.

(Internal change: 2232861)

adds HydraGenerativeProceduralAPI to usdHydra and updates docs to indicate restored intent of library

(Internal change: 2233001)

I am modifying functions in /arch so they can substitute in a reason or message
string.

I am also renaming and adjusting the functionality of ArchLogPostMortem() and
related functions for clarity.  ArchSetPostMortem() is now
ArchSetProcessStateLogCommand(), and takes in two arrays of arguments for fatal
and nonfatal cases, similar to ArchSetLogSession(). The nonfatal case can be
invoked through the new ArchLogCurrentProcessState() and is intended to preserve
the old crash handling behavior of taking a stack trace and only outputting
information to the terminal. The fatal case can be invoked through
ArchLogFatalProcessState(), and is intened to be the normal way of handling a
crash. All code with the old ArchLogPostMortem() has been updated accordingly to
use the appropriate new function.

(Internal change: 2233042)

use HydraGenerativeProceduralAPI schema in testUsdImagingGLHdGp now that it's available (from usdHydra)

(Internal change: 2233188)

Update USD library dependencies for building on Apple Silicon

This change allows USD to build and pass tests on Apple Silicon, as long as usdview is not built. The fixes for usdview will follow in a later change.

- boost 1.76 is minimum viable for Apple Silicon and boost python.

- TBB version 2020_U2 corrects compatibility with Apple Silicon and does not emit thousands of deprecation warnings. the previously reported tear down crashes do not occur when running the tests. All tests succeed.

- libpng makes assumptions about arm processors only being on phones, build arguments are available to suppress that mistake.

(Internal change: 2233463)

[pxr] Fix some typos in comments.

(Internal change: 2233519)

Adding detailed doxygen documentation section for the USD API schema property overrides feature.

(Internal change: 2233521)

arch: Malloc hooks were removed in glibc 2.34; disable support when building on
that or newer glibc versions.

Fixes #1830

(Internal change: 2233778)
(Internal change: 2234127)

arch: Add API indicating when the app is crashing

It can be useful for non-crashing threads to know that another thread has
crashed. We now have ArchIsAppCrashing() for this purpose.

Internally we use std::sig_atomic_t to ensure safety with regard to
asynchronous signals. This doesn't guarantee thread safety by itself, but
the only place where the crashing flag is set is protected by a spin lock
that only lets one thread execute at a time, so we end up with a
thread+signal safe mechanism.

(Internal change: 2233779)

Remove "usd_" prefix from monolithic libraries by default.

Change 2190561 added the "usd_" prefix to all library
names by default, which caused the monolithic libraries
to be named "libusd_usd_ms.so" on Linux and macOS and
"usd_usd_ms.dll" on Windows. This changes the default
prefix for the monolithic builds so that the names
revert back to "libusd_ms.so" and "usd_ms.dll". Users
can still use the PXR_LIB_PREFIX option to change
the prefix if desired.

Issue and original proposed fix was from PR #1711

Fixes #1711

(Internal change: 2233803)

UsdImagingStageSceneIndex: property invalidation support for volumes by dirting volume field bindings.

(Internal change: 2233944)

Account for ABI tags in Python shared library filename on macOS

For example, this fixes incorrect discovery when using a
Python built with pymalloc which (prior to Python 3.8) adds
an 'm' to the version number in the library name,
e.g. libpython3.7m.dylib.

Fixes #1724

(Internal change: 2233952)

better detection of python lib / include dirs in build_usd.py

This addresses two issues:

- Building using a venv-installed python
  - The venv-installed pythons would try to pull the libraries from
    the venv-directory, when they only reside at the "original"\
    installed python location

- Building with a python that was moved after building on Linux
  - We experienced issues where the `INCLUDEPY` and `LIBDIR` sysconfig
    vars were baked at build time.  Thus these would no longer be
    reliable if running a python executable that was moved to a
    different location after building.

Note that or python-2.7, `installed_base` doesn't exist, so we fall back
to `base`.  This should be fairly backward-compatible, as we check if
the dir (for include) or file (for lib) doesn't exist, and try alternate
methods if not.

fixes errant conversion of infoFilename and infoVarname tokens within usdHydra

(Internal change: 2234003)

Use std::vector<int> for O(1) query in GetScenePrimPaths and to avoid costly std::map/std::set data structures.

[hdSt/hdx] Add a render setting for the maximum number of lights storm should support.

Currently, storm is hardcoded to 16 lights via a single line in glf/simpleLightingContext.cpp.  Since we don't call into any API that explicitly restricts it to 16 lights, it's better to get rid of that line, and have SimpleLightTask truncate to a settings-provided number in a more clever manner.

Note that if you bump the number of lights past 16, you will encounter both performance issues (since we haven't optimized for this yet) and (possibly) issues with running out of uniform binding points, particularly for app integrations that use the lighting context to build their own lighting buffers instead of just using the hydra lighting buffers.  For now, playing with this setting should be considered experimental.

(Internal change: 2234026)

adds support for "includeDisconnectedNodes" within material network data source to trigger legacy behavior

(Internal change: 2234110)

[hdPrman] MaterialX failures using OSL and MXv1.38.4.

The OSL files were restructured for MaterialX v1.38.4
stdlibOslPath is updated to reflect the new location of
the main include mx_funcs.h.
When using older versions of OSL the generated oslSource
will have issues compiling. OSL is unable to find stdosl.h,
but even including that into oslArgs won't allow the
oslSource to compile since code added to mx_funcs.h is
using vector.x instead of vector[0] which is not supported
in earlier versions of OSL.
Added an early out to avoid crashes when using v1.38.4
with an older OSL version.

(Internal change: 2234179)

[hdx] Fix for GlfSimpleShadowArray::GetShadowMapTexture crash.
Before updating GlfSimpleShadowArray with shadow information in
HdxSimpleLightTask, check if lighting context will use shadows. Similarly, in
HdxShadowTask, confirm there are a non-zero number of shadow maps in
GlfSimpleShadowArray before creating renderpasses.

This avoids a discrepancy between the lighting context/light data and the
simple shadow array data. In the reported bug, there were 17 lights in the
lighting context, with only the last one possessing shadows. Because we only
support up to 16 lights in Storm, the last light is truncated (see
GlfSimpleLightingContext::SetLights). This resulted in a state in which the
lighting context did not think there were any shadows, while the simple shadow
array did.

(Internal change: 2234187)

[hdx] Cleaning up code after change 2234187.

(Internal change: 2234189)

UsdImaging: marking function deprecated.

(Internal change: 2234210)

usd: Replace TfHashMap plus mutex with tbb::concurrent_hash_map for better stage loading/population scaling.

(Internal change: 2234367)

Improved for Roz stats support in hdPrman:

  * A stats Session is now created within hdPrman and passed into the libprman instance on the commandline. (Previously prman would create an instance internally as none was provided). This allows hdPrman to communicate with the session to publish its own stats etc.
  * The session is informed when a render is restarted due to user input, so that various counters and timers can be reset.
  * Meaningful strings for scene entities generated within hdprman are converted to stats::DataLocIds and passed into the riley create calls as riley::userIds. This means that Roz events which refer to a particular scene entity in their payloads now include the entity's userId in their payloads, which can be converted back into a meaningful string by the Listener or hdPrman itself.

(Internal change: 2234734)
(Internal change: 2234904)
(Internal change: 2235103)
(Internal change: 2235180)
(Internal change: 2235473)

usd: Use a robin_map here instead of std::unordered_map.  It is well-suited to
this case and provides >10% speedup on usdc file writing perf metrics.

(Internal change: 2234973)

Reorganize code to workaround compiler warnings from MSVC

These warnings show up when building code against USD and
look like:

warning C4506: no definition for inline function 'pxrInternal_v0_22__pxrReserved__::Vt_DefaultValueHolder pxrInternal_v0_22__pxrReserved__::Vt_DefaultValueFactory<pxrInternal_v0_22__pxrReserved__::GfMatrix4d>::Invoke(void)'

This happens on at least MSVC 2015 and 2017. This post seems
to indicate this is a compiler issue:

https://developercommunity.visualstudio.com/t/c4506-no-definition-for-inline-function-incorrectl/359415

Also cleaned up some old comments.

Fixes #806

(Internal change: 2235193)

Extend test case to verify that the default values
for Gf vector/matrix/quaternion types used by VtValue
are zeroed out.

(Internal change: 2235194)

Remove Maya-specific code for detecting Python from build_usd.py

This code was a remnant from when USD shipped with an optional
Maya plugin. Since that plugin has migrated to Autodesk's
maya-usd repository and USD itself no longer has Maya
dependencies, we can remove this code and reduce the surface
area of the (annoyingly complicated) Python detection code.

Note that the --build-python-info flag can be used to supply
Python information in cases where build_usd.py can't figure
it out itself. The documentation for this flag was updated
to clean it up a bit and remove explicit references to Maya.

(Internal change: 2235203)

implements data source methods for UsdImagingMaterialAdapter

(Internal change: 2235509)

Fixing issues where UsdInherits::GetAllDirectInherits would not correctly
return all inherit paths for some composition scenarios.
Specifically, this fixes the following issues:
1. It would incorrectly return paths from non-inherit arcs if non-inherit arc
    was present under an inherit. An example would be if an inherited
    class prim has a reference to another prim, the reference's path would
    be incorrectly included as an inherit path.
2. It would not return paths from inherit arcs that were included under a
    root level specializes arc.
Both of these issues are fixed with this change.

(Internal change: 2235921)

[hdSt] Transform two channel (grayscale + alpha) PNG images into RGBA format

Updating the textureChannel test in usdImagingGLBasicDrawing.
The previous textureChannels2.png image had the pattern stored
in the alpha channel, it is now swapped so the pattern is in the R
channel to be more consistant with the other test case pngs.

Note that this test case is just taking the first n channels based on
the original number of channels in the image. For the two channel
case this means we are expanding (r, a) to (r, r, r, a) which this
test case turns it into (r, r, 0, 1)

Added a test case to usdImagingGLBasicDrawing that has an 8 bit
two channel transparent grayscale image.

Fixes #1796

(Internal change: 2235970)

usd: Add overload for when `*this` is an rvalue and move out the _layer member.
This lets client code that does `SdfLayerHandle const &layer =
<editTarget>.GetLayer();` always work correctly even if <editTarget> is an
expression that conjures a temporary UsdEditTarget.

(Internal change: 2235990)

Adds Plane primitive to UsdGeom.

Address 5/25 for PR #1819

 * Rotated the plane orientations to be consistent
 * Removed 'st' coordinates, pending clarificaitons
 * Replaced 'height' with 'length'
 * Doc/comment typos and wordings
 * Coding style tweaks

Set the default width and length to 2.0, in line with other gprims.

Fixes incorrect double-sizing of width and length, and doc wording.

[HdPrman] Adding a Filtering Scene Index Plugin
to HdPrman so that when the connected SampleFilters on a
RenderSettings prim change, they are dirtied.

(Internal change: 2236375)

[usdImaging] fix _GetDirtyBitsForPrimvarChange for PrimvarChangeAdd

It was observed that primvars such as widths for UsdGeomPoints would not
update in hdSt from the usdImagingDelegate. If the widths primvar was
not read from disk it would always display with it's default value. The
change here is that with a PrimvarChangeAdd it will set the incoming
dirty bit instead of just DirtyPrimvar

[usdImaging] Remove _GetDirtyBitsForPrimvarChange

Addressing notes. Removes _GetDirtyBitsForPrimvarChange to simplify logic when checking dirty bits.

See https://github.com/PixarAnimationStudios/USD/pull/1807 for more details

vt: Change (Unchecked)Get<T>() to move out instead of return a reference when
called on an rvalue VtValue.  In this case the reference would almost certainly
dangle.

(Internal change: 2236952)

[hdSt] Destroy Hgi resources properly in hdSt texture tests.

(Internal change: 2236976)

Adds multi-use --mute argument that allows for auto-muting matching
layers both before and after stage load.

Also improves the handling of muted layers in the Layer Stack tab:
  * Muted layers no longer emit a bogus warning about not being found.
  * Muted layers now display as a dark grey entry in the layers panel.
       Previously they were not listed at all (not intentionally, but due to
    limitations in the way that layers missing from the layer registry
       were handled).
  * Adds a Mute/Unmute option to the layer panel right-click context menu,
    allowing for interactive muting without using the python interpreter.

(Internal change: 2236983)

First try at RenderPass and DenoisePassAPI prims.

(Internal change: 2237127)
(Internal change: 2237218)

tf: fix use-after-free in TfTypeInfoMap::Remove

In TfTypeInfoMap, _nameMap owns _Entry values.  _Entry records
the primary key used to create the _nameMap node.  This is
used so that removing by any string or type_info alias will
remove the underlying _nameMap entry.  However, the
implementation of __gnu_cxx::hash_map::erase requires that the
key value passed to erase remains valid after the node has
been deleted.  Previously, we would pass `e->primaryKey` which
points into the node being deleted.  Instead, we now move
primaryKey out of the entry before using it to delete.

(Internal change: 2237144)

Consistent naming of capabilities bits enum

Remove excess parameters, change vega fix to member, support caps in pso

Remove code duplication for Pcp_ForEachDependentNode

(Internal change: 2237225)

[arch] make testArchStackTrace work on windows debug even when relocated

tf: allow TF_MAKE_STATIC_DATA to provide const access

TF_MAKE_STATIC_DATA can now be used to define a TfStaticData instance
that only allows const access to the underlying data.  The data itself
is non-const so that initialization code can be used in a
straightforward manner.  This is particularly useful for copy-on-write
types where seemingly innocuous access (e.g. range-for iteration) can
trigger detachment.  Consider the following example,

    TF_MAKE_STATIC_DATA(VtIntArray, _array)
    {
       *_array= { /* ... */ };
    }

    void
    Func()
    {
        WorkParallelForN(_array->size(), [](size_t f, size_t l) {
            for (; f != l; ++f) {
                int x = (*_array)[f]; // invokes non-const operator[]
                // ...
            }
        }
    }

This code attempts to read _array in parallel but, because VtIntArray
is copy-on-write and TfStaticData::operator* returns a non-const
reference, multiple threads may race to detach if the array has been
shared previously.  TF_MAKE_STATIC_DATA(const VtIntArray, _array)
solves this issue.

(Internal change: 2237275)

Fix code generation for GLSL bindings to primvars. This type of binding
was missing the definition of HdGetScalar_name to call HdGet_name.

Update download URL for libtiff

Fixes #1901

(Internal change: 2237347)

Make Display and Sample filters imageable.

(Internal change: 2237460)

When creating the SampleFilter network to provide Riley, ignore any SampleFilters that are not visible in the scene.

(Internal change: 2237461)

Update CHANGELOG for 22.05b release

(Internal change: 2237514)

Fixing merge issues

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

# This is a combination of 33 commits.

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep…
AdamFelt pushed a commit to autodesk-forks/USD that referenced this pull request Apr 16, 2024
This submission adds deep selection capabilities to HdStorm. This allows for selection of all objects within a pick-point or frustum to be selected even if the objects are obscured by other objects drawn on top.

It uses a GPU rendering technique similar to ID based picking except that it accummulates all pick results into a one dimensional "pickBuffer" instead of storing a single selection per pixel like the ID buffer approach does.

It can be enabled by setting a new resolve mode defined as HdxPickTokens->resolveDeep.

A new helper function named TestIntersections (plural) has been added to UsdImagingGlEngine to exercise the new functionality. A new Unit test is included to test the new resolve mode and UsdImagingGLEngine helper function.

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

Minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Code cleanup based on code review.

[hdSt] Don't swizzle the scalar return value from HdGet_displayOpacity().

Contribution: Jason Fielder

(Internal change: 2224434)

[hdSt] Check that a render buffer is multisampled before using its sample count
in setting up the graphics pipeline.

(Internal change: 2224435)

[HdSt] Fixed some unresolved shader symbols for Metal

The Metal Shading Language program linker requires all refereneced
functions to be defined even if not called. This adds definitions for
"integrateLights()" for image shaders and volumes since that symbol
is referenced from the lighting and lighting termal shader code.

Also, moved the definition of the "GetPatchCoord()" out of general
codeGen an into the mesh shaders specificially, since it is needed
only by mesh primitives.

Contribution: Jon Creighton

(Internal change: 2224562)

[HdSt] Updated codeGen of compute shader parameters

This is preparation for moving more shader declarations to
resource layouts.

Contribution: Jon Creighton

(Internal change: 2224574)

[arch] use "aligned_alloc" not "std::aligned_alloc" on linux

std::aligned_alloc is introduced in c++17, but USD only requires c++14

[HdSt] Fixed some compute shader compilation errors

Restored the placement of the compute shader main() to
be last in the generated shader source string so that we
don't need to forward declare the compute() method which
might have const or non-const arguments.

(Internal change: 2224819)

[HdSt] Updated codeGen to use packed types from hgi

We alias the low-level packed types used by Storm codeGen
onto Hgi generated types so that values of these types are
initialized consistently.

Contribution: Jon Creighton

(Internal change: 2224836)

[hdSt] Wait until blit cmds complete after reallocating buffer arrays.

Contribution: Jon Creighton

(Internal change: 2224907)

[HdSt] Use appropriate OSD shader source for GLSL vs MSL

We need to use Metal-specific shader source when targeting
Metal Shading Language. This is a little awkward and we hope
that this can be improved in future releases of OpenSubdiv.

Contribution: Jon Creighton

(Internal change: 2224908)

[HdSt] Updated Storm drawing coordinate plumbing

Updated interstage drawing coordinate plumbing to use resource
layouts. This facilitates using Hgi to manage interstage inputs
and outputs for Metal.

This also changes interstage drawing coord values to be independent
variables. Previously, drawing coord values were managed as members
of interstage struct values, but that will not work for Metal. An
alternative might be to use an interstage interface block, but that
is not robustly supported by cross platform GL drivers.

Since Hgi resource generation is not currently enabled for GL,
we process resource layouts in _GeneratateGLResources() when
compiling with generated GLSL resources. This is organized to
match the existing behavior when generating Hgi resources.

Also, while GLSL provides a way to pass array-valued input
attributes, we instead declare and bind input attributes
distinctly for each item in an array of instance indices which
better matches Metal.

Some of the pre-existing documentation for this is out-of-date,
and we will address that as a follow-up change.

Contribution; Thor Hjalmarsson, David G Yu

(Internal change: 2224924)

[HgiVulkan] Add organizational shader comments to Vulkan shadergen.

Contribution: Jon Creighton

(Internal change: 2225030)

[HdSt] Generate GLSL builtins when using Hgi resource generation.

We may move this into the HgiMetal implementation.

Contribution: Jon Creighton

(Internal change: 2225035)

[HdSt] Updated primvar plumbing to resource layouts

Interstage primvar plumbing still uses GLSL interface blocks,
but these can now be generated using Hgi. Although for now
we continue to generate primvar interface blocks as native
GLSL while we complete the transition to Hgi.

This also fills out the remaing codeGen support for Metal
Tessellation PTVS and PTCS shader stages, but for this
release we are not yet using PTCS shaders.

PTVS shaders have aspects that are similar to both
VS and TES, and we must also take into account differences
in PrimitiveID addressing.

Contribution: Thor Hjalmarsson, David G Yu

(Internal change: 2225042)

[HdSt] Enabled resource layouts for all codeGen resources

This flips the switch to use HdSt_ResourceLayout to coordinate
declarations for all resources. This includes buffers and textures
and also interstage variables and interstage interface blocks and
input attributes.

Textures and other resources that are expressed using resource
layouts can be declared using Hgi resource generation, or they
can be declared using native GLSL resource generation. Currently,
Hgi resource generation is enabled only for Metal, but we intend
to enable this for other Hgi backends eventually.

This change incorporates three other extensions to codeGen to
improve compatibility between GLSL and Metal Shading Language:

- Promotes "bool" resource to be of type "int" in shader declarations
  so that the memory layout of struct members is consistent.

- HdTextureLod_name() accessors to allow sampled access to
  a specific mip level.

- HdGetScalar_name() accessors to allow access to the scalar
  value of name without needing a ".x" swizzle which is not
  supported for scalar data types in Metal, even though is
  is supported by GLSL.

Contribution: Jon Creighton, David G Yu

(Internal change: 2225264)

[HdSt] Metal requires storeOp for AOV attachments

Contribution: Jon Creighton

(Internal change: 2225265)

[HdSt,Glf,UsdShaders] Updated shaders for Metal

Contribution: Jon Creighton

(Internal change: 2225273)

[HgiMetal] Enabled Storm for macOS using HgiMetal

The implementation of Storm for Metal requires support for
built-in fragment shader barycentric coords, e.g. we need
support for the [[barycentric_coord]] fragment function
input attribute. So, this is enabled only for macOS >= 10.15
and only on systems with display driver
support for barycentric coords.

Contribution: Jon Creighton

(Internal change: 2225274)

[HdSt,HgiGL] Fixed two issues affecting Storm on AMD GPUs

1) HgiGL should be filtering out generation of built-in shader
outputs for GL, but the filter search was using the wrong key.

2) HdSt should be emitting location bindings for fragment shader
outputs, but was not.

(Internal change: 2225525)

[UsdImagingGL] Updated the displayName for Storm to be Metal on macOS

This is an interim fix until we have a more complete system in
place for determining the display name for Storm based on Hgi.

(Internal change: 2225526)

Fix UsdShadeConnectableAPI::HasConnectableAPI crash when querying for a Abstract type

- Adds static helper UsdSchemaRegistry::IsAbstract which return true for abstract prim types.

Note since we can not consult built-in API schemas for abstract prim types (these do not have any primDefinition),
we are ignoring these and returning false when querying for HasConnectableAPI, at least for now!

(Internal change: 2225705)

[HdSt] For Metal convert double to float for ext computations

We'll still use double precision for Hgi implementations that
support double precision shading language data types.

(Internal change: 2225828)

[UsdAppUtils] Updated command line args test for Metal

The Storm renderer is named "Metal" on macOS but is still
named "GL" on other platforms.

(Internal change: 2225829)

[usdviewq] Updated to disable line stipple for bbox drawing on Metal

The OpenGL driver on Apple Silicon systems is fully emulated on
top of Metal and issues performance warnings if line stipple is
enabled.

(Internal change: 2225838)

[HgiMetal] Enabled multi draw indirect drawing for Metal

This allows the Metal implementation to take advantage of
parallel encoding of render commands.

(Internal change: 2225839)

[hdSt] Use HgiGet_ texture accessor for non-bindless textures. Fixes issue when
calling HdGet_ for a shadow texture on Metal.

(Internal change: 2225931)

Update CHANGELOG.md for 22.05 release

(Internal change: 2225965)

Update tutorial badge for v22.05

(Internal change: 2226029)

Correct year in CHANGELOG.md for 22.05 release

(Internal change: 2226689)

[HdSt] Fixed missing forward decl guards for transform2d accessors

This avoids shader compilation errors with HgiMetal

(Internal change: 2227394)

Update 22.05 release date.

(Internal change: 2227503)

Bump USD version to anticipated next release 22.08

(Internal change: 2227785)

Remove usage of deprecated function GetConnectedSource which is causing warning messages in katana

(Internal change: 2224512)

Animated volumes in Storm: adding scene index plugin that adds a dependency of a volume on its fields and chains it with a dependency forwarding scene index.

This way, the voulme pulls the new textures when the filePaths of its volume fields change.

Note that this replaces the old mechanism where HdStField::Sync calls HdChangeTracker::MarkAllRprimsDirty - when scene indices or scene index emulation is used.

(Internal change: 2224513)
(Internal change: 2224657)

Introducing HdDependencyForwardingSceneIndex.

(Internal change: 2224515)
(Internal change: 2224584)
(Internal change: 2224658)

Scene index emulation: fixing inconsistencies so that clipping planes work with USDIMAGINGGL_ENGINE_ENABLE_SCENE_INDEX.

Adding clippingPlanes of type VtArray<GfVec4d> to the HdCameraSchema.
This differs from HdCamera where it is called clipPlanes and of type std::vector<GfVec4d>. Thus, we need to convert in the scene index adapter scene delegate and the data source legacy prim.

Adding test case for (animated) clipping planes to usdImagingGL.

(Internal change: 2224516)

Change how XPU Devices are set

CreateRiley now uses xpu:cpuconfig and xpu:gpuconfig to communicate which devices XPU should use.

Note on GPU selection: As off now in rman, only the first GPU is supported regardless of the input type being an array.

(Internal change: 2224729)

Adding support in USD for declaring properties as API schema overrides.

A schema property that is declared as an API schema override does not define
that property in that schema. Instead it behaves as an "over: for a property with
the same name that may be defined by an API schema that is included as a
built-in API schema of the schema declaring the override. This is different than
the behavior when included API schemas define the same property (without
specifying an override) as in that case, the strongest schema's property wins
and completely stomps over the same property from any weaker schema.

API schema overrides can be declared for both API and Typed schemas in the
source schema files through adding customData on the property of
'bool apiSchemaOverride = true'. This will be converted to a list of API schema
override property names stored in the schema prim's customData in the
resulting generatedSchema.usda. When the UsdSchemaRegistry is populated,
any properties declared as API schema overrides will not be immediately
added to the prim definition. Instead they will be composed over the defined
property from the schema's built-in API schemas if a property with that name
is indeed found. If no property with the name exists in the included API schemas,
the override property is ignored.

An examples of where this will be used is UsdLuxLightAPI which will now be able
to declare:
class "LightAPI" (
    prepend apiSchemas = ["CollectionAPI:lightLink", "CollectionAPI:shadowLink"]
) {
    uniform bool collection:lightLink:includeRoot = 1 (
        customData = {
            bool apiSchemaOverride = true
        }
    )
    uniform bool collection:shadowLink:includeRoot = 1 (
        customData = {
            bool apiSchemaOverride = true
        }
    )
}
This means that LightAPI can now override just the default values of the
includeRoot properties defined in its two built-in CollectionAPIs while leaving the
rest of the definition (such as documentation) as defined in the CollectionAPI
schema itself.

Another example is the light:shaderId property defined in LightAPI which all the
concrete Typed light schemas (RectLight, DistantLight, etc.) will be able to
override to defaulting to the USD shader ID for the light, once again, without
stomping over the entire property definition from LightAPI.

Note that this feature is specific to overriding properties from built-in API
schemas and doesn't apply to overriding properties via schema inheritance.
This is because schema properties are already always composed over via
inheritance during schema generation so no specification is necessary.

(Internal change: 2224838)

Clients of HdSceneIndexPluginRegistry: do not add HdSceneIndexPlugin as Base to HdSceneIndexPluginRegistry::Define already does it.

(Internal change: 2224869)

Clients of HdSceneIndexPluginRegistry: do not add HdSceneIndexPlugin as Base to HdSceneIndexPluginRegistry::Define already does it.

(Internal change: 2224870)

testUsdImagingGLUsdLux: avoiding degeneracies.

The box had a degenerate transform and the sphere and sphere light were at exactly the same position with the same radius.

Note that the test uses auto framing for the camera and thus is sensitive to geometry movements changing the bounding box.

(Internal change: 2225336)

Replace all description of .usda as "ASCII" in user doc with
"text", and enhance the FAQ to describe that usda is a UTF-8 encoding.

Doc-only change.

(Internal change: 2225469)

Hydra, usdImaging and Storm: adding cube prim type and schema to Hydra. Adding a implicits data source for usdImaging. Adding scene index to storm to convert the cube into a mesh.

(Internal change: 2225666)
(Internal change: 2225696)
(Internal change: 2225865)

Add Basic UsdImaging support for RenderSettings and MurkFilters

Getting basic Murk working in Usdview. The murk prims are populated
only when they are connected through the outputs:ri:sampleFilters
terminal. Attaching a murk filter or changing parameters works as
expected, however, removing or changing the connected filter
currently needs a stage reload to visually see the appropriate change.

(Internal change: 2225714)

Hydra, usdImaging and Storm: adding cone and cylinder prim type and schema to Hydra. Using implicits data source in the UsdImagingSphereAdapter. Adding conversion from cone and cylinder to mesh to Storm's implicit surface scene index plugin.

(Internal change: 2225900)

Hydra, usdImaging and Storm: adding sphere prim type and schema to Hydra. Using implicits data source in the UsdImagingSphereAdapter. Adding conversion from sphere to mesh to Storm's implicit surface scene index plugin.

(Internal change: 2225909)

usdGenSchema updates:

1. The apiSchemaOverride customData in a schema.usda used for schema
    generation is no longer composed across schema inheritance. Instead a
    schema property's apiSchemaOverride state is just determined by the
    customData on the strongest property definition (with no customData
    opinion meaning it's not an API schema override). We still check the
    property's full property stack to make sure that if a property is defined
    as an API schema override, then all the ancestor classes that defined
    the property must also have defined it as an API schema override.
2. Setting apiName = '' for a schema attribute will also exclude it from the
    list of attributes listed for just the class in its generated
    GetSchemaAttributeNames function.
3. The blurb in generated schema class headers about fallbacks for token
    valued attributes is no longer included if all token valued attributes are
    excluded from the C++ API (via apiName = '' or
    apiSchemaOverride = true).

(Internal change: 2226008)

UsdLux updated with API schema override declarations:

Updated all usdLux properties that override API schema
properties to define them as apiSchemaOverride = true and regenerated
USD schemas.

(Internal change: 2226010)

Add PLUG_THIS_PLUGIN_NAME macro for retrieving the name
of the plugin where this macro is invoked. By default this
macro has the same value as MFB_PACKAGE_NAME that is set
by the build, but this can be overridden in the (rare) case
that the plugin and package names differ.

PLUG_THIS_PLUGIN was modified to use PLUG_THIS_PLUGIN_NAME
for lookups in the plugin registry.

(Internal change: 2226064)

Hydra, usdImaging and Storm: adding capsule prim type and schema to Hydra. Using implicits data source in the UsdImagingCapsuleAdapter. Adding conversion from capsule to mesh to Storm's implicit surface scene index plugin.

Together with the previous changes, this covers all implicit surfaces.

(Internal change: 2226093)

Hydra scene index emulation: passing through values and invalidation for new implicit surface prim types capsule, cube, cone, cylinder and sphere.

(Internal change: 2226094)

hdPrman: adding native support for spheres.

(Internal change: 2226095)
(Internal change: 2226331)

[hdPrman] Don't emit warnings when traversing material nodes with id
"PrimvarPass."

(Internal change: 2226226)

Fix to how we compose reference and payload list ops when layers and
 sublayers have layer offsets (both explicitly authored or implicit through
 time codes per second resolution).

This easiest way to explain this is with an example. The issue from the
 bug this is for is someone has a root layer with two sublayers:
-root.usda-
(
    subLayers = [
        @./sublayer_del_ref_30tcps.usda@,
        @./sublayer_add_ref.usda@
    ]
)

-sublayer_add_ref.usda-
def Xform "World" (
    prepend references = @./mesh.usda@</World>
) {
}

-sublayer_del_ref_30tcps.usda-
(
    timeCodesPerSecond = 30
)
def Xform "World" (
    delete references = @./mesh.usda@</World>
) {
}

The user is expecting the stronger sublayer to remove the reference to
mesh in /World, but because of the 30 tcps specified in the deleting
layer we resolve a layer offset for the reference to convert it into the 24
tcps of the root layer. This resolved layer changes the identity of deleted
reference and since it no longer matches reference added by the weaker
sublayer, it is not actually deleted.

While the automatic scaling from the tcps difference makes this extra
mysterious, this same problem would be caused if there were no tcps
difference but the sublayers were authored with different layer offsets in
the root layer, e.g.
(
    subLayers = [
        @./sublayer_del_ref_.usda@ (scale = 2.0),
        @./sublayer_add_ref.usda@
    ]
)

This fix is pretty simple in that while we still fully resolve the layer offsets
for the reference arc in the exact same way as before, we only use the
layer offset as authored as part of the identity of the reference when
composing the list op. Now in both of the above examples, the reference
 is properly removed regardless of the offsets of the sublayers.

Fixes #1778

(Internal change: 2226344)

Don't crash in debug routines when the shader is empty due to a bug.

(Internal change: 2226382)

[hdSt, usdImagingGL] Clean up some of the remaining uses of env var
HGIGL_ENABLE_MULTI_DRAW_INDIRECT. At this point, this env var is really just a
debug flag.

Its use was removed from any usdImagingGL tests, and there is now only one test
in hdSt, testHdStBasicDrawingImmediate, testing its disabling.

(Internal change: 2226474)

UsdShadeConnectableAPIBehavior: Fix when trying to get a plugin for an incompatible type

Make sure type being queried is usd compatible (Typed or APISchemaBase) before trying to get plugin associated with that type.

(Internal change: 2226659)

Update python wrapping in fs and usdShade to use TfPyBoolBuiltinFuncName
when wrapping __zero__/__bool__.

(Internal change: 2226690)

Hydra implicit surface scene index:
Moving the implicit surface scene index into a new library hdsi.
Making it configurable so that scene index plugins can say which prims need to be converted to a mesh or need to have their transform changed - which is necessary for RenderMan.

(Internal change: 2226698)
(Internal change: 2226805)

hdPrman: adding cone, cylinder, cube and capsule support by using native Riley prims and the implicit surface scene index.

(Internal change: 2226699)

Fixes to primvar sampling in scene index emulation and the usd imaging stage scene index:

UsdImagingDataSourceAttribute::GetContributingSampleTimesForInterval:
- return times relative to shutterInterval
- return sample for the endpoints of the interval instead of crashing if there were no samples on the usd attribute for the given interval (interval is between two far apart samples or before or after the first or last sample, respectively)

HdSceneIndexAdapterSceneDelegate::_SamplePrimvar:
- respect the boolean return value of GetContributingSampleTimesForInterval (when not using the HdLegacyPrimSceneIndex)
- Make sure that the method never returns 0 and thus making clients drop any values. This happened when GetContributingSampleTimesForInterval didn't fill times due to authoredSamples being computed before the fallback sample time 0.0f was added.

(Internal change: 2226759)

Add initial sections for anticipated 22.08 release notes

(Internal change: 2226798)

[hd, hdSt] Remove references to unused env var HD_ENABLE_SMOOTH_NORMALS.

(Internal change: 2226815)

[hdSt, hdx] Update skydome Viewport calculation
to re-use existing function that was previously a private helper
in HdStRenderPass.

(Internal change: 2226855)

Tiny doxygen fix for parameter name.

(Internal change: 2226876)

Add ability to add/remove/change Murk Sample Filters in usdview

Storing the sampleFilterPath indicated in the connection on
the RenderSettings prim in HdPrman's RenderParams, and
dirtying the affected sampleFilters when switching connected
filters. Then having the SampleFilter check against this stored
path to see if the filter should be created/deleted, and changing
the renderSettings to a Bprim so that it will be sure to sync
before the Sprim SampleFilter.

(Internal change: 2226882)

Cleanup post Basic Murk-Sample Filter Support

(Internal change: 2226884)

removes repeated reserve call within HdNoticeBatchingSceneIndex as it is unnecessary and surprisingly expensive

(Internal change: 2226894)

small fix to GfVec Slerp test

Hydra scene indices: moving helper to merge contributing time samples into hd/dataSource.h.

(Internal change: 2227047)

When using scene index emulation, return after calling AddLegacyPrim when
inserting a new Bprim (otherwise it would be created twice).

Hydra implicit surface scene index: rather than implementing HdsiImplicitSurfaceSceneIndex::_PrimsDirtied, adding __dependencies.

In Storm, factoring out the creation of the dependency forwarding scene index to make sure it is always run last.

(Internal change: 2227053)

HdPrman: since the implicit surface scene index is now using __dependencies, we need to add a dependency forwarding scene index to hdPrman.

(Internal change: 2227054)
(Internal change: 2227129)

Remove unused TfPyGetModulePath.

(Internal change: 2227203)

Remove commented-out Objective-C code from a Tf test.

(Internal change: 2227206)

TfPyRun*: comment clarifications.

In particular, point out that TfPyRun{String,File} require the GIL.

(Internal change: 2227207)

tf test: add TfPyLock before TfPyRunString.

(Internal change: 2227214)

Storm dependency scene index plugin: rather than implementing HdSt_DependencySceneIndexPlugin::_PrimsDirtied, making __dependencies depend on volumeFieldBinding.

(Internal change: 2227264)

[ar 2.0] Remove support for Ar 1.0

Ar 1.0 was deprecated in the 21.11 release. This change
removes the ability to switch to Ar 1.0, effectively
ending support. Follow-up changes will remove Ar 1.0
code from the tree.

(Internal change: 2227389)

[hdSt] Don't add fallback/unconnected material param names to the list of a
material network's primvars. Fixes a scenario where an asset had
both a primvar "occlusion" and a UsdPreviewSurface material with an unconnected
"occlusion" input parameter.

(Internal change: 2227467)

Change Usd_Clip to hold a shared pointer to the array of time mappings.
Set up this array in Usd_ClipSet where all the Usd_Clip objects are
allocated. Prevents N^2 memory usage on the number of time mappings in
a clip set.

rmanArgsParser: Do not warn when args file is not in Args dir

- Put this behind a TF_DEBUG for the users to know that no implementation will be provided for such an args file which is not under parent "Args" directory.

(Internal change: 2227851)

Fix rmanArgsParser out of bound crash

(Internal change: 2228044)

Ensure the GIL is locked before destroying Python objects

This avoids issues when a TfErrorMark instantiated in C++
captures Tf.Errors emitted in Python and is subsequently
cleared, destroying the captured TfPyExceptionState objects.

(Internal change: 2228054)

Catchup CHANGELOGs for anticated 22.08 release

(Internal change: 2228100)

Couple of fixes to UsdUtilsUpdateSchemaFromSdrNode

- Do not set any connectivity for non connectable nodes.
- Fix property pruning when only typedSchemaForAttrPruning is set and no apiSchemasForAttrPruning is provided.
- Check early if the output parameters are suppressed and use this information in error handling for namespace prefix override when outputs are present

(Internal change: 2228101)

Fixing startup python script for usdview interpreter in python3

(Internal change: 2228144)

Storm: fixing comment.

(Internal change: 2228168)

Implicit surface scene index: removing unused member.

(Internal change: 2228219)

Fix usdgenschemafromsdr to allow environment variable paths

- Useful when when "sourceAssetNodes" has paths to sdr nodes with envionment variable in them, example "$RMANTREE/lib/defaults/PRManAttributes.args".
- Cleanups.

(Internal change: 2228325)

Allow mtlx networks with mismatched connection types to work.

(Internal change: 2228330)

Some improvements for translating certain kinds of materialX networks.

* Use default st coordinates when nothing is connected to an image node's texcoord.
* Fix assumptions about the expected name of graphs in the materialX document.
* Mtlx image nodes using tex files were fipped vertically.

(Internal change: 2228333)

Hd: introducing HdMapContainerDataSource.

(Internal change: 2228358)

Adding convenience c'tors to HdOverlayContainerDataSource.

(Internal change: 2228359)

[ar 2.0] Remove Ar 1.0 implementation

(Internal change: 2228392)

[HdSt,Hdx] Removed backward compatable resource layout shader source

This is no longer needed now that HdSt_CodeGen can fully
handle backward compatible GLSL resource generation. As before,
we've only added GLSLFX resource layouts for shader snippets
shared between HgiGL and HgiMetal. We'll likely add more as we
continue to enable support for HgiVulkan.

(Internal change: 2228409)

TfPyWrapEnum will now append an underscore to all enum
types and values that match reserved keywords from both
Python 2 and 3. For example, if an enum class "Foo" has
a value named "None" and is wrapped via TfPyWrapEnum,
the corresponding value in Python will be "Foo.None_".
This follows the recommendation in the PEP 8 style
guide for resolving identifier conflicts with keywords.

Previously any such values would result in syntax errors
when used in Python, since reserved keywords cannot be
used as identifiers. This change avoids this problem
without forcing clients to modify their C++ code.

Note that keywords from both Python 2 and 3 receive
this treatment no matter which version of Python is
being used. So the above example will be the case
under either version. This ensures that enum values
stay consistent and client code doesn't have to change
change depending on the version of Python being run.

(Internal change: 2228741)

Fix race condition during prim destruction that
could lead to invalid memory access.

(Internal change: 2228809)

Fix intermittent crashes due to XPU configuration

(Internal change: 2228868)

Update UsdGeom::ComputeProxyPrim to implement non-pruning semantics
when computing the purpose value for the targeted prim.

This is followup to change 2033434.

(Internal change: 2229004)

[hd] Adding Schemas and emulation for RenderSettings and SampleFilters.

(Internal change: 2229022)

[HdPrman] Fixed to support sharpness per crease edge

UsdGeomMesh supports both: sharpness per crease and sharpness
per crease edge, but previously HdPrman was transporting only sharpness
per crease.

(Internal change: 2229069)

HdDataSource::AtmoicStore: changing signature to take const & instead of & for value.

(Internal change: 2229081)

SdrShaderProperty: document and add support for nested pages

- delimited by ":".
- Update rmanArgsParser, rmanOslParser, usdSdrOsl plugin to add ":" delimited instead of Osl default of "." delimited page metadata.

(Internal change: 2229101)
(Internal change: 2229116)

Introducing HdLazyContainerDataSource.

(Internal change: 2229106)
(Internal change: 2229382)

Replacing usage of deprecated UsdGeomImageable primvar methods in pxr with the corresponding UsdGeomPrimvarAPI methods in prep for deleting the deprecated methods.

(Internal change: 2229301)

Updated changelogs for OSL and Args parsers using Sdr's nested page delimiter as ":" instead of "."

(Internal change: 2229325)

Adding HdContainerDataSourceEditor::Overlay.

(Internal change: 2229372)
(Internal change: 2229382)

Add a note about setting USD_DISABLE_AUTO_APPLY_API_SCHEMAS to true
when regenerating schemas using usdgenschemafromsdr. Not doing this
can cause extra properties to be pruned from the "re"-generated schemas.

(Internal change: 2229391)

usdImagingGL/CMakeLists.txt: adding testUsdImagingGLClippingPlanes.

(Internal change: 2229393)

[ar 2.0] Remove Ar 1.0 support from sdf

(Internal change: 2229415)

[ar 2.0] Remove Ar 1.0 support from pcp

(Internal change: 2229416)

[ar 2.0] Remove Ar 1.0 support from usd

(Internal change: 2229418)

[ar 2.0] Remove Ar 1.0 support from usdUtils

(Internal change: 2229420)

Move renderman material property tokens to the primvars namespace.
Keep checking for materials that do not start with "primvar:" for compatibility sake.
Minor changes to rman for handling material properties that start with "primvar"

(Internal change: 2229421)

added root selected check to printTreeWidget.py>ExpandItemRecursively()

Deleting deprecated primvar methods from UsdGeomImageable

(Internal change: 2229688)

Replace boost::shared_ptr and scoped_ptr in usdAbc

(Internal change: 2229779)

Replace boost::shared_ptr in Sdf_FileFormatRegistry

(Internal change: 2229780)

ndr: add the ability to disable NDR plugins

NDR plugins can do expensive filesystem walking that may not be desired
in all situations. Allow specific NDR plugins to be disabled through the
environment by setting PXR_NDR_DISABLE_PLUGINS to a comma-separated list
of plugin names.

(Internal change: 2229885)

Copying behaviour from `lightAdapter` to consider *all* attributes for setting `DirtyParams` in `TrackVariability`

Addressing feedback

Addressing feedback

Implement reverse lookup table in instanceAdapter to improve performance of getting proto prim

Address feedback to improve inserting and removing proto prim cache

Fixed missing material dependency on GeomSubSet

Add support for Multiple Murks-SampleFilters in Usdview

When using multiple murks we need to create a Combiner node
that has an array with all the riley sampleFilter handles listed in
the desired order. This combiner node needs to be added to the
riley shading network that contains all the riley sampleFilter nodes.
This shading network is then used to create or modify the
SampleFilters in riley.

(Internal change: 2229915)
(Internal change: 2230077)

Ensure light collections are dirtied on creation

Added dirty tracking in CollectionCache

Cleaner and simpler collection dirty tracking

Cleaner and more reliable collection dirty

Missing method declarations

Fixed compile error

Removed duplicated method

Fixed another build issue

Update usdRiPxr schemas from updates args files and to include new schemas

- Includes schemas for:
  - PRManAttributes
  - PRManCamera
  - PRManDisplayChannel
  - PRManOptions
  - PRManPrimVars
  - All rman display drivers: deepexr, openexr, pointcloud, tiff, texture,etc.

- All schemas are updated to use ":" delimiter for displayGroup which is the default for sdrNodes (instead of ".").
- All renderman Light API schemas now "canOnly" auto apply to their respective UsdLux concrete schemas.
- Updated autogen README to include mention of setting of RMANTREE environment variable if users try to regenerate the schemas.
- Updated autogen README to include a suggestion to set USD_DISABLE_AUTO_APPLY_API_SCHEMAS to true when regen`ing the schemas.

(Internal change: 2230113)

Adds API for accessing AOV render buffers.

(Internal change: 2230229)

Adds envvar as a temporary solution to disable hider jitter.

(Internal change: 2230255)

Allow any prim type in HdDataSourceLegacyPrim to provide a "primvars" datasource.

(Internal change: 2230301)

Register velocities and acclerations on point instancer primitives as
hydra-accessible primvars.

Update CHANGELOG.md for 22.05a patch release

(Internal change: 2230317)
(Internal change: 2230746)

Add dual quaternion to the Gf package (part 1 of 4)

Add GetZero() and GfDot() to quaternion types (GfQuaternion, GfQuatd,
GfQuatf & GfQuath) in preparation for the implementation of dual
quaternion types.

(Internal change: 2230330)

Add dual quaternion to the Gf package (part 2 of 4)

Add GfDualQuat template and types (GfDualQuatd, GfDualQuatf &
GfDualQuath) to Gf package.

In preparation for the implementation of Dual Quaternion Skinning in
USDSkel.

(Internal change: 2230350)

Add dual quaternion to the Gf package (part 3 of 4)

Add support for GfDualQuat types in pix/base/vt

In preparation for the implementation of Dual Quaternion Skinning in
USDSkel.

(Internal change: 2230364)

Bug Fixing single sampleFilter changes after adding Multiple SampleFilter support

(Internal change: 2230558)

Update to MaterialX v1.38.3

- Use CMake config directly from MaterialX install
- Update for API and library changes in v1.38.3
- Strenghten NodeDef discovery

This is the last update that is not version tagged in the C++ code.
Future updates will be bracketed using MATERIALX_MINOR_VERSION defines
introduced in v1.38.3.

Update to MaterialX v1.38.4

Add support back in for MaterialX v1.38.3

Fix incorrect MaterialX cmake variable.

If no XpuDevices are selected, use the default RenderParams when initializing Riley

(Internal change: 2230627)

Remove unused variable

(Internal change: 2230691)

defines HdGpGenerativeProcedural

This is a base class for procedurals which have read access to the input scene and
can generate (or update) prims beneath a given prim. Also includes a
registry for delivering these procedurals via plug-in.

HdGpGenerativeProceduralResolvingSceneIndex can be instantiated to resolve/evaluate/update
these procedurals when found within the input scene index.

(Internal change: 2230703)

[hdPrman] Convert depth AOV from NDC space (-1, 1) to window space (0, 1) for
consistent behavior with Storm.

(Internal change: 2230731)

Add support for specifying a post-release tag to the
PyPI package version when running the Azure pipeline.

This allows us to create packages with different
version numbers (e.g. 22.05.post1) for patch releases.

(Internal change: 2230738)

removes unnecessary inclusion of base class during plug-in registration

(Internal change: 2230790)

[ar 2.0] Remove Ar 1.0 support from usdMtlx

(Internal change: 2230839)

[ar 2.0] Remove Ar 1.0 support from Hio

(Internal change: 2230843)

[ar 2.0] Remove Ar 1.0 support from sdrOsl

(Internal change: 2230844)

[ar 2.0] Remove Ar 1.0 support from rmanArgsParser

(Internal change: 2230845)

[ar 2.0] Remove Ar 1.0 support from rmanOslParser

(Internal change: 2230846)

[ar 2.0] Remove Ar 1.0 support from usdResolverExample

(Internal change: 2230847)

[ar 2.0] Remove Ar 1.0 support from sdrGlslfx

(Internal change: 2230849)

[ar 2.0] Remove check for PXR_USE_AR_2 that was missed in an earlier change

(Internal change: 2230850)

Corrected documentation errors that inadvertently led
to the declaration of a struct named "For". In turn, this would cause
Doxygen to auto-generate links to this bogus struct any time it saw
the word "For" in documentation text. (Oops.)

The affected doc string should not have been encountered in our doc
build in the first place, as it is only applicable when USD python
support is disabled at build time.

We now define PXR_PYTHON_SUPPORT_ENABLED so that the generated doc
correctly reflects our build configuration. This also happens to fix
our docs because the incorrect doc string is no longer processed.

The error in tf/pyTracing.h has also been corrected for anyone else
who may generate the docs without python support.

(Internal change: 2230926)

Update usdRiPxr disabling canOnly auto apply for Pxr*Lights

- Also includes a couple of args properties update for PxrOptions
- Also includes updates of apiSchema override property names for LightFilter's CollectionAPI filterLink.

(Internal change: 2230994)

[hd] Fix DataSourceLegacyPrim's "mesh" datasource to return "subdivisionScheme" in GetNames()

(Internal change: 2231037)

Update error thresholds for usdImagingGLInstancing tests.

(Internal change: 2231058)

[hdSt] Add API export tags to HdStTextureIdentifier.

Fixes #1758

(Internal change: 2231079)

[hdPrman] Suppress warning when a material has an empty material resource; upgrade to a coding error if there's a type mismatch.

(Internal change: 2231144)

[usdImaging] Add edit processing support for UsdImagingStageSceneIndex.

This change subscribes the scene index to the _OnObjectsChanged notice, and turns the notice into a series of "resync" and "invalidate" operations.  Invalidation operations are dispatched through prim adapters, which are responsible for saying (for that prim type) what hydra properties changed for a given set of USD properties.

(Internal change: 2231145)

Remove unused function

(Internal change: 2231215)

HdPrimvarSchema role tokens: changing capitalization for consistency with how these are used elsewhere in hydra.

(Internal change: 2231235)

USD schema for an abstract "GenerativeProcedural" as the founding member of a usdProc library.

(Internal change: 2231316)

Temporarily disable testUsdImagingGLClippingPlanes until
issue with infinite loop can be resolved.

(Internal change: 2231352)

Storm volumes: making material final to avoid the volume shader being replaced by the default material network that does not work for volumes.

(Internal change: 2231353)

Adding HdDataSourceLocatorSet::Contains.

(Internal change: 2231354)

Implementing UsdImagingGL draw modes through a scene index.

(Internal change: 2231380)
(Internal change: 2231391)

Reenable testUsdImagingGLClippingPlanes and run test in offscreen
mode to fix hang.

(Internal change: 2231390)

Fix compile errors due to default constructors

On some combination of compilers and STL implementations,
(I hit this using clang on Linux with libstdc++ from gcc 9)
hd/command.cpp fails to build with errors like:

usd/pxr/imaging/hd/command.cpp:30:22: error: defaulting this default constructor would delete it after its first declaration
HdCommandDescriptor::HdCommandDescriptor() = default;
                     ^
usd/pxr/imaging/hd/command.h:104:35: note: default constructor of 'HdCommandDescriptor' is implicitly deleted because field 'commandArgs' of const-qualified type 'const pxrInternal_v0_21__pxrReserved__::HdCommandArgDescriptors' (aka 'const vector<pxrInternal_v0_21__pxrReserved__::HdCommandArgDescriptor>') would not be initialized
    const HdCommandArgDescriptors commandArgs;

I believe this error is because commandArgs in HdCommandDescriptor
is a const std::vector member variable and C++ requires that it
have a user-provided constructor in order to generate the
default constructor for HdCommandDescriptor. The STL implementations
where this fails has an inline defaulted (i.e. not user-provided)
std::vector c'tor, which means the compiler is unable to generate
HdCommandDescriptor's default c'tor and errors out.

To fix this, we explicitly define empty constructors for
HdCommandDescriptor and HdCommandArgDescriptors. (Oh, C++).

Originally reported with a proposed fix in #1696.

Fixes #1696

(Internal change: 2231575)

Adds HDGP_INCLUDE_DEFAULT_RESOLVER envvar (defaulting to false) to ease with development and testing of hydra procedurals

(Internal change: 2231623)

[arch] remove ArchTestCrash(bool) declaration

From the looks of things, ArchTestCrash(bool) was the original
signature; then at some point it was changed to
ArchTestCrash(ArchTestCrashMode) and moved to testArchUtil.  However it
seems that the old declaration was left dangling (though implementation
was removed).

Removed invalid TF_VERIFY encountered in cases involving
subroot references and relocates.

(Internal change: 2231953)

Adding TRACE_FUNCTION to implicit surfce scene index.

(Internal change: 2231995)

Apply compile definitions and include directories from
external targets when building object libraries for the
monolithic build.

This fixes an issue with monolithic builds on Windows
using MaterialX v1.38.4 shared libraries. The USD build
now relies on CMake config files published by the
MaterialX build, but because we were ignoring compile
definitions from external targets we weren't picking
up the MATERIALX_BUILD_SHARED_LIBS define that was
needed to ensure symbols were imported/exported
properly.

(Internal change: 2232025)

HdNoticeBatchingSceneIndex: adding TRACE_FUNCTION.

(Internal change: 2232081)

lazily load prim adapters and confirm stage is valid prior to registering for usd change notices
- the lazy loading matches existing UsdImagingSceneDelegate behavior and is desirable beyond fixing the mysterious crash
  that can occur when ctrl-c exiting usdview
- confirming stage validity fixes a less mysterious crash which can happen with natural destruction

(Internal change: 2232092)

usdImaging: Change-processing for implicits.

(Internal change: 2232106)

move _GetInheritedPrimvar from UsdImagingGprimAdapter to UsdImagingPrimAdapter
- Because _GetInheritedPrimvars is already on UsdImagingPrimAdapter, it makes sense for _GetInheritedPrimvar to join it in service on non-gprim adapters which may need it

(Internal change: 2232147)

UsdImagingStageSceneIndex::_AdapterLookup: factoring caching of adapters into separate method.

(Internal change: 2232169)

adds usdProcImaging which initially provides baseline imaging for UsdProcGenerativeProcedural

(Internal change: 2232218)

HdPrman: Handle SdfAssetPath-valued shader parameters

(Internal change: 2232258)

testUsdImagingGLCards: adding test case for fromTexture cardGeometry

(Internal change: 2232317)

Let glslfxConfig parsing accept ints as a valid type.

Previously, it was impossible to consume an int-valued primvar in
a glslfx shader, as the config parsing in HioGlslfxConfig only handled
float, double, and vec thereof.  Now, it also handles ints (and thus
arrays of ints) but we do not bother extending to vec2i, vec3i, etc.

(Internal change: 2232543)

Avoid python3 warning about not properly closing a file.

[Tf] fix TfDenseHashMap test for windows debug builds

the size of vectors changes in debug mode on windows - from
3*sizeof(void*) to 4*sizeof(void*)

end-to-end test for HdGpGenerativeProcedural (usd->imaging->procedural resolution)

(Internal change: 2232761)
(Internal change: 2233440)

Attempt to fix intermittent testWorkThreadLimitsRawTBBMax failures

This test tries to get TBB to use the max number of worker threads
(according to WorkGetPhysicalConcurrencyLimit) by running a large
number of "tasks" through tbb::parallel_for. However, this would
often end up using some number of threads greater than 1 but less
than the physical concurrency limit, causing the test to fail.

We now use a simple_partitioner when calling parallel_for to try
to force TBB to create more chunks of work to saturate the
available worker threads. On a Windows testing machine, running
this test 100 times led to many failures prior to this change
but no failures after this change.

(Internal change: 2232861)

adds HydraGenerativeProceduralAPI to usdHydra and updates docs to indicate restored intent of library

(Internal change: 2233001)

I am modifying functions in /arch so they can substitute in a reason or message
string.

I am also renaming and adjusting the functionality of ArchLogPostMortem() and
related functions for clarity.  ArchSetPostMortem() is now
ArchSetProcessStateLogCommand(), and takes in two arrays of arguments for fatal
and nonfatal cases, similar to ArchSetLogSession(). The nonfatal case can be
invoked through the new ArchLogCurrentProcessState() and is intended to preserve
the old crash handling behavior of taking a stack trace and only outputting
information to the terminal. The fatal case can be invoked through
ArchLogFatalProcessState(), and is intened to be the normal way of handling a
crash. All code with the old ArchLogPostMortem() has been updated accordingly to
use the appropriate new function.

(Internal change: 2233042)

use HydraGenerativeProceduralAPI schema in testUsdImagingGLHdGp now that it's available (from usdHydra)

(Internal change: 2233188)

Update USD library dependencies for building on Apple Silicon

This change allows USD to build and pass tests on Apple Silicon, as long as usdview is not built. The fixes for usdview will follow in a later change.

- boost 1.76 is minimum viable for Apple Silicon and boost python.

- TBB version 2020_U2 corrects compatibility with Apple Silicon and does not emit thousands of deprecation warnings. the previously reported tear down crashes do not occur when running the tests. All tests succeed.

- libpng makes assumptions about arm processors only being on phones, build arguments are available to suppress that mistake.

(Internal change: 2233463)

[pxr] Fix some typos in comments.

(Internal change: 2233519)

Adding detailed doxygen documentation section for the USD API schema property overrides feature.

(Internal change: 2233521)

arch: Malloc hooks were removed in glibc 2.34; disable support when building on
that or newer glibc versions.

Fixes #1830

(Internal change: 2233778)
(Internal change: 2234127)

arch: Add API indicating when the app is crashing

It can be useful for non-crashing threads to know that another thread has
crashed. We now have ArchIsAppCrashing() for this purpose.

Internally we use std::sig_atomic_t to ensure safety with regard to
asynchronous signals. This doesn't guarantee thread safety by itself, but
the only place where the crashing flag is set is protected by a spin lock
that only lets one thread execute at a time, so we end up with a
thread+signal safe mechanism.

(Internal change: 2233779)

Remove "usd_" prefix from monolithic libraries by default.

Change 2190561 added the "usd_" prefix to all library
names by default, which caused the monolithic libraries
to be named "libusd_usd_ms.so" on Linux and macOS and
"usd_usd_ms.dll" on Windows. This changes the default
prefix for the monolithic builds so that the names
revert back to "libusd_ms.so" and "usd_ms.dll". Users
can still use the PXR_LIB_PREFIX option to change
the prefix if desired.

Issue and original proposed fix was from PR #1711

Fixes #1711

(Internal change: 2233803)

UsdImagingStageSceneIndex: property invalidation support for volumes by dirting volume field bindings.

(Internal change: 2233944)

Account for ABI tags in Python shared library filename on macOS

For example, this fixes incorrect discovery when using a
Python built with pymalloc which (prior to Python 3.8) adds
an 'm' to the version number in the library name,
e.g. libpython3.7m.dylib.

Fixes #1724

(Internal change: 2233952)

better detection of python lib / include dirs in build_usd.py

This addresses two issues:

- Building using a venv-installed python
  - The venv-installed pythons would try to pull the libraries from
    the venv-directory, when they only reside at the "original"\
    installed python location

- Building with a python that was moved after building on Linux
  - We experienced issues where the `INCLUDEPY` and `LIBDIR` sysconfig
    vars were baked at build time.  Thus these would no longer be
    reliable if running a python executable that was moved to a
    different location after building.

Note that or python-2.7, `installed_base` doesn't exist, so we fall back
to `base`.  This should be fairly backward-compatible, as we check if
the dir (for include) or file (for lib) doesn't exist, and try alternate
methods if not.

fixes errant conversion of infoFilename and infoVarname tokens within usdHydra

(Internal change: 2234003)

Use std::vector<int> for O(1) query in GetScenePrimPaths and to avoid costly std::map/std::set data structures.

[hdSt/hdx] Add a render setting for the maximum number of lights storm should support.

Currently, storm is hardcoded to 16 lights via a single line in glf/simpleLightingContext.cpp.  Since we don't call into any API that explicitly restricts it to 16 lights, it's better to get rid of that line, and have SimpleLightTask truncate to a settings-provided number in a more clever manner.

Note that if you bump the number of lights past 16, you will encounter both performance issues (since we haven't optimized for this yet) and (possibly) issues with running out of uniform binding points, particularly for app integrations that use the lighting context to build their own lighting buffers instead of just using the hydra lighting buffers.  For now, playing with this setting should be considered experimental.

(Internal change: 2234026)

adds support for "includeDisconnectedNodes" within material network data source to trigger legacy behavior

(Internal change: 2234110)

[hdPrman] MaterialX failures using OSL and MXv1.38.4.

The OSL files were restructured for MaterialX v1.38.4
stdlibOslPath is updated to reflect the new location of
the main include mx_funcs.h.
When using older versions of OSL the generated oslSource
will have issues compiling. OSL is unable to find stdosl.h,
but even including that into oslArgs won't allow the
oslSource to compile since code added to mx_funcs.h is
using vector.x instead of vector[0] which is not supported
in earlier versions of OSL.
Added an early out to avoid crashes when using v1.38.4
with an older OSL version.

(Internal change: 2234179)

[hdx] Fix for GlfSimpleShadowArray::GetShadowMapTexture crash.
Before updating GlfSimpleShadowArray with shadow information in
HdxSimpleLightTask, check if lighting context will use shadows. Similarly, in
HdxShadowTask, confirm there are a non-zero number of shadow maps in
GlfSimpleShadowArray before creating renderpasses.

This avoids a discrepancy between the lighting context/light data and the
simple shadow array data. In the reported bug, there were 17 lights in the
lighting context, with only the last one possessing shadows. Because we only
support up to 16 lights in Storm, the last light is truncated (see
GlfSimpleLightingContext::SetLights). This resulted in a state in which the
lighting context did not think there were any shadows, while the simple shadow
array did.

(Internal change: 2234187)

[hdx] Cleaning up code after change 2234187.

(Internal change: 2234189)

UsdImaging: marking function deprecated.

(Internal change: 2234210)

usd: Replace TfHashMap plus mutex with tbb::concurrent_hash_map for better stage loading/population scaling.

(Internal change: 2234367)

Improved for Roz stats support in hdPrman:

  * A stats Session is now created within hdPrman and passed into the libprman instance on the commandline. (Previously prman would create an instance internally as none was provided). This allows hdPrman to communicate with the session to publish its own stats etc.
  * The session is informed when a render is restarted due to user input, so that various counters and timers can be reset.
  * Meaningful strings for scene entities generated within hdprman are converted to stats::DataLocIds and passed into the riley create calls as riley::userIds. This means that Roz events which refer to a particular scene entity in their payloads now include the entity's userId in their payloads, which can be converted back into a meaningful string by the Listener or hdPrman itself.

(Internal change: 2234734)
(Internal change: 2234904)
(Internal change: 2235103)
(Internal change: 2235180)
(Internal change: 2235473)

usd: Use a robin_map here instead of std::unordered_map.  It is well-suited to
this case and provides >10% speedup on usdc file writing perf metrics.

(Internal change: 2234973)

Reorganize code to workaround compiler warnings from MSVC

These warnings show up when building code against USD and
look like:

warning C4506: no definition for inline function 'pxrInternal_v0_22__pxrReserved__::Vt_DefaultValueHolder pxrInternal_v0_22__pxrReserved__::Vt_DefaultValueFactory<pxrInternal_v0_22__pxrReserved__::GfMatrix4d>::Invoke(void)'

This happens on at least MSVC 2015 and 2017. This post seems
to indicate this is a compiler issue:

https://developercommunity.visualstudio.com/t/c4506-no-definition-for-inline-function-incorrectl/359415

Also cleaned up some old comments.

Fixes #806

(Internal change: 2235193)

Extend test case to verify that the default values
for Gf vector/matrix/quaternion types used by VtValue
are zeroed out.

(Internal change: 2235194)

Remove Maya-specific code for detecting Python from build_usd.py

This code was a remnant from when USD shipped with an optional
Maya plugin. Since that plugin has migrated to Autodesk's
maya-usd repository and USD itself no longer has Maya
dependencies, we can remove this code and reduce the surface
area of the (annoyingly complicated) Python detection code.

Note that the --build-python-info flag can be used to supply
Python information in cases where build_usd.py can't figure
it out itself. The documentation for this flag was updated
to clean it up a bit and remove explicit references to Maya.

(Internal change: 2235203)

implements data source methods for UsdImagingMaterialAdapter

(Internal change: 2235509)

Fixing issues where UsdInherits::GetAllDirectInherits would not correctly
return all inherit paths for some composition scenarios.
Specifically, this fixes the following issues:
1. It would incorrectly return paths from non-inherit arcs if non-inherit arc
    was present under an inherit. An example would be if an inherited
    class prim has a reference to another prim, the reference's path would
    be incorrectly included as an inherit path.
2. It would not return paths from inherit arcs that were included under a
    root level specializes arc.
Both of these issues are fixed with this change.

(Internal change: 2235921)

[hdSt] Transform two channel (grayscale + alpha) PNG images into RGBA format

Updating the textureChannel test in usdImagingGLBasicDrawing.
The previous textureChannels2.png image had the pattern stored
in the alpha channel, it is now swapped so the pattern is in the R
channel to be more consistant with the other test case pngs.

Note that this test case is just taking the first n channels based on
the original number of channels in the image. For the two channel
case this means we are expanding (r, a) to (r, r, r, a) which this
test case turns it into (r, r, 0, 1)

Added a test case to usdImagingGLBasicDrawing that has an 8 bit
two channel transparent grayscale image.

Fixes #1796

(Internal change: 2235970)

usd: Add overload for when `*this` is an rvalue and move out the _layer member.
This lets client code that does `SdfLayerHandle const &layer =
<editTarget>.GetLayer();` always work correctly even if <editTarget> is an
expression that conjures a temporary UsdEditTarget.

(Internal change: 2235990)

Adds Plane primitive to UsdGeom.

Address 5/25 for PR #1819

 * Rotated the plane orientations to be consistent
 * Removed 'st' coordinates, pending clarificaitons
 * Replaced 'height' with 'length'
 * Doc/comment typos and wordings
 * Coding style tweaks

Set the default width and length to 2.0, in line with other gprims.

Fixes incorrect double-sizing of width and length, and doc wording.

[HdPrman] Adding a Filtering Scene Index Plugin
to HdPrman so that when the connected SampleFilters on a
RenderSettings prim change, they are dirtied.

(Internal change: 2236375)

[usdImaging] fix _GetDirtyBitsForPrimvarChange for PrimvarChangeAdd

It was observed that primvars such as widths for UsdGeomPoints would not
update in hdSt from the usdImagingDelegate. If the widths primvar was
not read from disk it would always display with it's default value. The
change here is that with a PrimvarChangeAdd it will set the incoming
dirty bit instead of just DirtyPrimvar

[usdImaging] Remove _GetDirtyBitsForPrimvarChange

Addressing notes. Removes _GetDirtyBitsForPrimvarChange to simplify logic when checking dirty bits.

See https://github.com/PixarAnimationStudios/USD/pull/1807 for more details

vt: Change (Unchecked)Get<T>() to move out instead of return a reference when
called on an rvalue VtValue.  In this case the reference would almost certainly
dangle.

(Internal change: 2236952)

[hdSt] Destroy Hgi resources properly in hdSt texture tests.

(Internal change: 2236976)

Adds multi-use --mute argument that allows for auto-muting matching
layers both before and after stage load.

Also improves the handling of muted layers in the Layer Stack tab:
  * Muted layers no longer emit a bogus warning about not being found.
  * Muted layers now display as a dark grey entry in the layers panel.
       Previously they were not listed at all (not intentionally, but due to
    limitations in the way that layers missing from the layer registry
       were handled).
  * Adds a Mute/Unmute option to the layer panel right-click context menu,
    allowing for interactive muting without using the python interpreter.

(Internal change: 2236983)

First try at RenderPass and DenoisePassAPI prims.

(Internal change: 2237127)
(Internal change: 2237218)

tf: fix use-after-free in TfTypeInfoMap::Remove

In TfTypeInfoMap, _nameMap owns _Entry values.  _Entry records
the primary key used to create the _nameMap node.  This is
used so that removing by any string or type_info alias will
remove the underlying _nameMap entry.  However, the
implementation of __gnu_cxx::hash_map::erase requires that the
key value passed to erase remains valid after the node has
been deleted.  Previously, we would pass `e->primaryKey` which
points into the node being deleted.  Instead, we now move
primaryKey out of the entry before using it to delete.

(Internal change: 2237144)

Consistent naming of capabilities bits enum

Remove excess parameters, change vega fix to member, support caps in pso

Remove code duplication for Pcp_ForEachDependentNode

(Internal change: 2237225)

[arch] make testArchStackTrace work on windows debug even when relocated

tf: allow TF_MAKE_STATIC_DATA to provide const access

TF_MAKE_STATIC_DATA can now be used to define a TfStaticData instance
that only allows const access to the underlying data.  The data itself
is non-const so that initialization code can be used in a
straightforward manner.  This is particularly useful for copy-on-write
types where seemingly innocuous access (e.g. range-for iteration) can
trigger detachment.  Consider the following example,

    TF_MAKE_STATIC_DATA(VtIntArray, _array)
    {
       *_array= { /* ... */ };
    }

    void
    Func()
    {
        WorkParallelForN(_array->size(), [](size_t f, size_t l) {
            for (; f != l; ++f) {
                int x = (*_array)[f]; // invokes non-const operator[]
                // ...
            }
        }
    }

This code attempts to read _array in parallel but, because VtIntArray
is copy-on-write and TfStaticData::operator* returns a non-const
reference, multiple threads may race to detach if the array has been
shared previously.  TF_MAKE_STATIC_DATA(const VtIntArray, _array)
solves this issue.

(Internal change: 2237275)

Fix code generation for GLSL bindings to primvars. This type of binding
was missing the definition of HdGetScalar_name to call HdGet_name.

Update download URL for libtiff

Fixes #1901

(Internal change: 2237347)

Make Display and Sample filters imageable.

(Internal change: 2237460)

When creating the SampleFilter network to provide Riley, ignore any SampleFilters that are not visible in the scene.

(Internal change: 2237461)

Update CHANGELOG for 22.05b release

(Internal change: 2237514)

Fixing merge issues

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

# This is a combination of 33 commits.

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep

minor refactoring

Changing the way we collect data in pick buffer to make sure that we put there only unique entries

refactoring

- Disable depth write when doing deep selection
- Predefined needed tokens

Adding support for instanceId, faceId, edgeId and pointId

Small refactoring

Improving the way we clear pick buffer

Adding comments

Fixing a bug caused by the merge

Minor improvements after the code review

Introducing alphaThreshold in HdxPickTaskContextParams to be able to discard translucent pixels

Add deep selection to UsdImagingGlEngine

Basic start to deep selection and rectangular selection in the Engine class.

Deep selection related changes.

Restore single pick functionality when picking, not rectangle selection

Deep selection improvements

Fix merge conflicts
Drive deep selection through new methods on UsdImagingGLEngine
Add unit tests and baselines

Deep selection first prototype

Add-on to the previous commit: the pick shader

Implement a hash table in the shader to reduce the number of entries

Introducing a new resolve mode in HdxPickTask: resolveDeep…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants