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

-root/-rt flag (sl flag defaults to not export roots unless "|" is passed to the root arg) #4

Open
wants to merge 5,413 commits into
base: nr-1.1.3-root-x-sl
Choose a base branch
from

Conversation

BSalem
Copy link
Owner

@BSalem BSalem commented Jun 12, 2021

New Feature

"-root/-rt" flag (multi-use) to USD Export plugin, can be used to specify the roots/parents the exporter shouldn't go beyond them when writing out the USD, the objects/groups passed to the root arg then becomes at the root of the written USD.

  • If the root flag was given alone, all given objects/groups and their children will be exported to the root of the USD.
  • Passing 'root' in combination with the 'exportSelected' flag, then the selected objects are exported under all their parents till the given root transform, all intermediate transform nodes are written as well, however, the objects under these exported parents will be ignored unless they are selected.

Enhancement:

exportSelected flag now will export only the selected objects and their children, all parents above the selected objects will be ignored unless requested via the 'root' flag.

To achieve the old behavior the 'exportSelected' flag used to do before the implementation of the "root" feature, a pipe "|" can be passed to the root flag, this will export the selected objects under all their parents up till the scene top root::

usdExport(file='/path/to/usd.usda', sl=True, root='|')

kpolonski-atomic and others added 30 commits October 16, 2024 17:19
EMSUSD-0 fix Cmake configure overwriting plugInfo.json
…n-warnings

EMSUSD-1504 prevent warnings when reloading the plugin
…or-units

EMSUSD-1718 automatically close prefs when changing units
…on-locked-layers

EMSUSD-1222 no metadata on read-only layers
Two different branches modified the same file in incompatible ways.
…r-string-merge

EMSUSD-0 fix bad merge in string resources
When loading a Maya scene containing a stage, possibly through other Maya
reference, find the correct layer manager node for the stage. Each layer
manager node is specific to the scene or reference.

- Add an optional parameter to some layer manager function to specify
  the Maya reference that should contain the information.
- Pass the correct Maya reference, if any, when computing the proxy
  shape node layers.
- Add a unit test to load a stage in a Maya reference.
… transparency.

HdVP2Material now detects when its shader's transparency is used for a
geometric cut-out, such as a UsdPreviewSurface with opacityThreshold
(e.g., for `cards` drawMode).

In this case, transparency does not require alpha blending or depth
sorting. We can setup the transparent MRenderItem to still leverage
GPU instanced draw thanks to `MPxSubSceneOverride::setAllowTransparentInstances`.

cf Maya API Reference: https://help.autodesk.com/cloudhelp/2025/ENU/MAYA-API-REF/cpp_ref/class_m_h_w_render_1_1_m_px_sub_scene_override.html#ab5f84f5ba90bb3caabbb69ab3d52cb37
…eview.

Removes the special case for instanced render items, all objects with materials
that have masked transparency are now consistently marked as opaque.
When a USD prim is transformed using a matrix, correctly read the initial matrix values when teh transform is time-sampled.

Note that we still write the new matrix in the USD default value *not* at the time sample. So it only "works" like it used to "works" in the sense that when translating, for example, the other elements of the matrix are not lost, but the new value is not time-sampled.

- Revert the change in the matrix implementation of the UFE transform3d interface to read the initial matrix value at the read-time not the write-time.
- Currently, the write time is always the USD default-time.
- Add a unit test to cover this case.
…-prefs

EMSUSD-1719 units prefs during import
…a-ref

EMSUSD-1722 find the correct layer manager node
…ix-manip

EMSUSD-1735 Correct matrix manipulation
…reshold

Fix VP2 rendering of UsdPreviewSurface with opacityThreshold
- Move each custom control to its own file.
- Rename custom control and their file to follow the same pattern.
- Move the creator function to static function in the corresponding custom control.
- Move some helper functions to their corresponding custom control.
- Rename some parameters to have clearer name (attrNames instead of controls and attrName instead of c).
- Document how the AE template code works.
…ances_with_masked_transparency

Optimize VP2 rendering of USD objects with geometric cut-outs
Two tests were using the same scene file names. Maybe they were randomly overwriting each other when run in parrallel.
…a-scene

EMSUSD-0 make unit test scne file names unique
seando-adsk and others added 30 commits January 8, 2025 15:18
…minate_storm_libraries

EMSUSD-2000 - Do not contaminate HdStorm libraries with lobe pruning
- Added methods on the Host class to create the data used by the UI.
- Host create USD collection and string list by default.
- Use the Host to create the data in the UI classes.
- UsdCollectionData uses Host to create its string lists.
- Make the expression widget update itself on USD data changed
  notification even when there is no expression attribute.
- Rename the light linking custom control to be collection custom
  control.
- Move the Maya host class to its own file.
- Implement Maya-specific collection data with all needed setters.
- Add a _UsdUndoBlockContext class to capture all USD changes into
  undo items and later transfer them to a Maya command.
- Add a _UsdUndoBlockCommand that tarnsfer the captured undo items
  into itself for future undo and redo.
- Add a _UndoItemHolder class to hold the undo items to be transferred
  between the Python undo context and the Maya command.
- Add multiple command sub-classes so that the undo UI shows a nice and
  comprehensible undo name.

In theory, we could have just used the existing UsdUndoBlock and that
was in the initial prototype, but this makes all entries in the undo UI
all be "UsdUndoBlock" which is incomprehensible for the user and does
not state what would be undone or redone. Using one command per action
allows the user to know what is in the undo stack.
…g-undo-per-cmd

EMSUSD-1657 light linking undo and redo
- Fix setting a new prim and collection on an existing colletion widget.
- Remove obsolete list item delegate and unused painters from the list view widget.
- Remove unused painter function from the Theme class.
- Make the data setter return true or False if the data was set or not.
- (This will potentially make possible to not add an undo for do-nothing actions.)
- Add validation of the prim and collection to avoid printing stack
  traces to the user.
- Update the check condition to change include all.
- Don't change focus of the expression widget on enter.
- Don't allow pasting text with formatting (bold, etc)
- Making the resizing of the list widgets more robust.
- Added an error message when setting the expression causes an exception.
- Avoid submitting the expression when it has not changed, to avoid bad
  interactions with undo/redo.
- Move the business logic of resetting teh include-all flaginto the data
  class, wher eit belongs.
- This avoids confusingly having two undo items when setting the
  expression the first time.
- Also avoids having yet another "magic" callback in the UI code that
  would know about the business logic instead of being pure UI.
HYDRA-1347 : Fully revert the changes from PR #4060.
…hared-code-update

EMSUSD-0 bring light linking changes from the shared repo
- Make tabs be themeable by the Theme class.
- Create a MayaTheme to theme the tab to look right in Maya.
- Make the collection widget theme its tab using the Theme class.
- Only inject Host and Theme once.
- Implement the uiScaleFactor function in the Maya host.
- Check if the command exists before calling it.
- Use the real scale value.
- Add a reportMessage function and MessageType to the Host class.
- Report about invalid items when dropping objects on the include or exclude lists.
- Implement the reportMessage function in the Maya host.
…essage

EMSUSD-2014 report error for invalid include and exclude
EMSUSD-2012 implement theme scale in Maya Host
- Add a getSelectionAsText function to the host class.
- Add the "add selection..." actions to the add button.
- Enable the items only if a valid selection is present, outside of the collection itself.
- Add additional validation in the _isValidString USD implementation to avoid adding a prim to its own collection.
- Implement the getSelectionAsText in the Maya host.
Give def a base type so that the Maya AE machinery can find teh AE
template, which assumes that the prim ultimately has UsdSchemaBase as a
base type.

Added a unit test.
…-to-collection

EMSUSD-1646 add the selection to a collection
- Adjust the spacing in the include/exclude header buttons.
- Add a themeMenuButton function to the Theme class.
- Call it to adjust the menu indicator for buttons with menus.
- Don't draw rectangle in list paint event that cuase error output.
- Don't let the delete and backspace key events out of the list view to avoid deleting the DCC selection. (What is slected in the Maya outliner.)
- Don't add items that are already present.
- Fix invalid expression error message.
- Make use of the Host reportMesage function to report errors and info.
- Default to the expression tab if only expressions are used.
…I-spacing

EMSUSD-1997 adjust collection UI spacing
…fixes

EMSUSD-2095 multiple small UI fixes
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.