Last active
March 14, 2024 09:09
-
-
Save maty974/4739917 to your computer and use it in GitHub Desktop.
The Foundry Nuke hack works with "nukescripts.panels.registerWidgetAsPanel", to remove the disturbing widget contents margins set by Nuke.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Feb 8, 2013 | |
@author: matthieuc | |
@contact: [email protected] | |
''' | |
import PySide.QtGui as QtGui | |
def setNukeZeroMarginsWidget(widget_object): | |
try: | |
if widget_object: | |
target_widgets = set() | |
target_widgets.add(widget_object.parentWidget().parentWidget()) | |
target_widgets.add(widget_object.parentWidget().parentWidget().parentWidget().parentWidget()) | |
for widget_layout in target_widgets: | |
widget_layout.layout().setContentsMargins(0, 0, 0, 0) | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've updated the code, I think it is better to not parse all the application Widget with
QtGui.QApplication.allWidgets()