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

RBF Manager 2.0: Miscellaneous Improvements #324

Merged
merged 21 commits into from
Nov 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5018a5c
The user interface now remembers its previous size, and won't recreat…
joji2468ng Sep 30, 2023
f5c0df8
Set 'Display Keyable' as the default, or use 'Display Non-Keyable' if…
joji2468ng Sep 30, 2023
c97987a
Changed button and selectionNode styles
joji2468ng Oct 3, 2023
4b3e9f8
New layout design
joji2468ng Oct 3, 2023
990203c
Refactored codes
joji2468ng Oct 3, 2023
bf91c10
Added a button to add new driven object, refactored some codes
joji2468ng Oct 7, 2023
ddad603
Update rbf_manager_ui.py
joji2468ng Oct 7, 2023
64f3421
QSplitter was added between attributeWidget and tableWidget.
joji2468ng Oct 8, 2023
d8ac05a
Added a new context menu item in QListWidget for both driver and driven.
joji2468ng Oct 10, 2023
cfd9cc3
Changed the height size of buttons and layout of pose buttons
joji2468ng Oct 10, 2023
41458b8
Fixed a bug where a new driven tab couldn't be generated
joji2468ng Oct 10, 2023
d1af20e
Updated to version 1.0.9
joji2468ng Oct 10, 2023
e09da11
Refactored the entire codebase to improve readability and maintainabi…
joji2468ng Oct 10, 2023
e7d13ab
Optimized the codebase and fixed a crash when refreshing the UI
joji2468ng Oct 12, 2023
7f77b37
Approximate small float values to zero to clean up data and make it m…
joji2468ng Oct 13, 2023
8919a71
Approximate small values to zero and rounds the others.
joji2468ng Oct 25, 2023
5c4a2a7
Revert "Approximate small values to zero and rounds the others."
joji2468ng Oct 25, 2023
e351a13
Transitioning to RBFmanager 2.0 and packaging it in a self-contained…
joji2468ng Nov 4, 2023
7344691
Add icons
joji2468ng Nov 5, 2023
ce71d1f
Created widget.py and refactored the code
joji2468ng Nov 11, 2023
2e65129
Merge branch 'master' into rbfManger
joji2468ng Nov 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Optimized the codebase and fixed a crash when refreshing the UI
  • Loading branch information
joji2468ng committed Oct 12, 2023
commit e7d13ab51a2c5ca37bc1cf38794443f0cf22d96f
35 changes: 16 additions & 19 deletions release/scripts/mgear/rigbits/rbf_manager_ui.py
Original file line number Diff line number Diff line change
@@ -824,9 +824,10 @@ def __init__(self, hideMenuBar=False, newSceneCallBack=True):
self.centralWidget().setMouseTracking(True)
self.refreshRbfSetupList()
self.connectSignals()

# added because the dockableMixin makes the ui appear small
self.adjustSize()
self.resize(800, 650)
# self.resize(800, 650)
if newSceneCallBack:
self.newSceneCallBack()

@@ -839,6 +840,11 @@ def closeEvent(self, event):
mc.optionVar(intValue=('RBF_UI_width', width))
mc.optionVar(intValue=('RBF_UI_height', height))

self.deleteAssociatedWidgetsMaya(self.driverPoseTableWidget)
self.deleteAssociatedWidgets(self.driverPoseTableWidget)
if self.callBackID is not None:
self.removeSceneCallback()

# Call the parent class's closeEvent
super(RBFManagerUI, self).closeEvent(event)

@@ -1081,8 +1087,8 @@ def refreshAllTables(self):
drivenNodes = rbfNode.getDrivenNode()
if drivenNodes and drivenNodes[0] == drivenNodeName:
weightInfo = rbfNode.getNodeInfo()
self.setDriverTable(rbfNode, weightInfo)
self.setDrivenTable(drivenWidget, rbfNode, weightInfo)
self.populateDriverInfo(rbfNode, weightInfo)

@staticmethod
def determineAttrType(node):
@@ -1622,7 +1628,7 @@ def recreateDrivenTabs(self, rbfNodes):

self.addPoseButton.setEnabled(True)

def displayRBFSetupInfo(self, index):
def displayRBFSetupInfo(self):
"""Display the rbfnodes within the desired setups

Args:
@@ -1788,15 +1794,18 @@ def refresh(self,
self.controlLineEdit.clear()
self.driverLineEdit.clear()
self.driverAttributesWidget.clear()
self.deleteAssociatedWidgetsMaya(self.driverPoseTableWidget)
self.deleteAssociatedWidgets(self.driverPoseTableWidget)
self.driverPoseTableWidget.clear()

self.driverPoseTableWidget.setRowCount(1)
self.driverPoseTableWidget.setColumnCount(1)
self.driverPoseTableWidget.setHorizontalHeaderLabels(["Pose Value"])
self.driverPoseTableWidget.setVerticalHeaderLabels(["Pose #0"])

if drivenSelection:
self.drivenLineEdit.clear()
self.drivenAttributesWidget.clear()
if clearDrivenTab:
self.rbfTabWidget.clear()
self.deleteAssociatedWidgetsMaya(self.rbfTabWidget)
self.deleteAssociatedWidgets(self.rbfTabWidget)
if currentRBFSetupNodes:
self.currentRBFSetupNodes = []

@@ -2277,15 +2286,3 @@ def mouseMoveEvent(self, event):
pos = event.pos()
self.mousePosition.emit(pos.x(), pos.y())

def closeEvent(self, evnt):
"""on UI close, ensure that all attrControlgrps are destroyed in case
the user is just reopening the UI. Properly severs ties to the attrs

Args:
evnt (Qt.QEvent): Close event called
"""
self.deleteAssociatedWidgetsMaya(self.driverPoseTableWidget)
self.deleteAssociatedWidgets(self.driverPoseTableWidget)
if self.callBackID is not None:
self.removeSceneCallback()
super(RBFManagerUI, self).closeEvent(evnt)