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

Light linking sync #4046

Merged
merged 3 commits into from
Dec 16, 2024
Merged

Light linking sync #4046

merged 3 commits into from
Dec 16, 2024

Conversation

barbalt
Copy link
Collaborator

@barbalt barbalt commented Dec 12, 2024

  • Introduction of Host class
    • Foundation for pick mode or dcc specific functions
  • Delete elements from the list

Synching up this repo with internal content

@barbalt barbalt self-assigned this Dec 12, 2024
@barbalt barbalt assigned barbalt and unassigned barbalt Dec 12, 2024
def getIncludeAll(self):
return self._include.cbIncludeAll.isChecked()

def setIncludeAll(self, value: bool):
self._include.cbIncludeAll.setChecked(value)

def onIncludeAllToggle(self):
self._collection.GetIncludeRootAttr().Set(self._include.cbIncludeAll.isChecked())
def updateUI(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Eventually, I expect that we will move all code that directly interact with USD out of the UI code and into a "model" that will also "hold" the DCC-specific code or callbacks. So all code currently in UI classes will move in the future.

return
self._updatingUI = True
for prim in prims:
self._collection.GetIncludesRel().AddTarget(prim.GetPath())
Copy link
Collaborator

Choose a reason for hiding this comment

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

For example code like this would move to that data-model class. This is necessary to support things like undo/redo

try:
self._deleteBtn.pressed.disconnect(self.onRemoveSelectionFromInclude)
self._deleteBtn.pressed.disconnect(self.onRemoveSelectionFromExclude)
except:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe only catch Exception, not everyhing should be caught?

raise ValueError("Value must be a float or an int")(
"Error: The dragged object is not in the same stage as the collection. Ensure that objects belong to the same stage before adding them"
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I saw this code and wondered if this was code generated by AI?

In any case, error will have to be reported by going through the data-model class to support DCC-specific error reporting mechanisms.

painter = QPainter(self.viewport())
painter.setPen(QColor(128, 128, 128))
painter.drawText(self.rect(), Qt.AlignCenter, kNoObjectFoundLabel)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Both the paint-override method and the place-holder label method (which were redundant with each other...) are now removed. What is replacing these the place-holders?

from typing import Sequence
from pxr import Usd

class Host(object):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Eventually, the host class should be moved to another place, not in the UI classes, another Python module.

Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk left a comment

Choose a reason for hiding this comment

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

Unclear to me what is drawing the place-holder texts now.

@barbalt barbalt assigned barbalt and unassigned barbalt Dec 13, 2024
@barbalt barbalt added the ready-for-merge Development process is finished, PR is ready for merge label Dec 16, 2024
@seando-adsk seando-adsk added the workflows Related to in-context workflows label Dec 16, 2024
@seando-adsk seando-adsk merged commit d0139af into dev Dec 16, 2024
11 checks passed
@seando-adsk seando-adsk deleted the barbalt/master/ll-internal-sync branch December 16, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge workflows Related to in-context workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants