Search the Community
Showing results for tags 'Pyqt'.
-
I have a custom pyqt ui with a list widget in it. I'd like that list widget to update if the user changes context in the network view. e.g. from object to SOP to ROP (Driver) etc. I believe I can utilise the ContextEvent handler but I don't know how to initiate it. Can anyone help me out or point me to a script I can dissect? https://www.sidefx.com/docs/houdini/hom/network.html I briefly flirted with the pypanel nodepath hook but ideally I'd like to run this from a toolshelf too. https://www.sidefx.com/docs/houdini/examples/python_panels/nodepath.html
-
Hi, guys! Just wanted to share with you some of my experiments. huilib - is a simple Python wrapper around Houdini's native .ui language. It has been written "just for fun", so no warranty if it works for you, but I think it's pretty usable for a simple UI, in situations, when using PyQt is not an option Maybe someday we'll see something similar from SESI Feel free to use it. https://github.com/alexxbb/huilib
-
hi, i need some help with resizable widgets. it seems the window wont redraw the window canvas. i tried to resize the window with a event(second picture), but nothing worked. the .ui comes from QtDesigner. do i have to set some flags? is it possible at all? i appreciate your help, thx. nic.
-
http://patreon.com/posts/33249763 http://gumroad.com/l/houdinisupercharged In this video I will show you some of the inner workings of the context-sensitive rule-based hotkey system that I implemented and one I have been using for a while to speed up my workflow inside Houdini. It's a very light-weight and flexible system that allows an arbitrary number of actions to be assigned to any key, with extensive modifier key and state support (Ctrl, Shift, Alt, Space, LMB, MMB, RMB, selection state). It's deeply integrated into the overlay network editor workflow.
-
- 5
-
- optimization
- walkthrough
-
(and 11 more)
Tagged with:
-
Hi guys, I'm having a simple shelf tool in Houdini: from PySide2 import QtCore, QtGui, QtWidgets class PysideTest(QtWidgets.QMainWindow): def __init__(self, parent=None): super(PysideTest, self).__init__(parent) test = QtWidgets.QWidget() self.resize(800, 800) self.setWindowTitle("This is a test") hbox = QtWidgets.QHBoxLayout() edit = QtWidgets.QLineEdit() edit.setObjectName("QLineEditCustom") print edit.styleSheet() hbox.addWidget(edit) test.setLayout(hbox) self.setCentralWidget(test) #self.setBackgroundRole(QtGui.QPalette.ColorRole.Base) self.setBackgroundRole(QtGui.QPalette.Dark) self.setAutoFillBackground(True) self.show() def run(): mainWidget = hou.qt.mainWindow() css = mainWidget.styleSheet() css_filter_str = 'QLineEdit#QLineEditCustom\n{background: rgb(255, 255, 255); color: rgb(255, 0, 255); selection-background-color: red}' css = "\n".join([css, css_filter_str]) mainWidget.setStyleSheet(css) obj = PysideTest(mainWidget) run() When I press on the shelf tool button I get my UI popping up nicely. This only works if I give the class "PysideTest" the parent "mainWidget", otherwise the UI disappears immediately after clicking on the shelf tool. Now because I'm giving it the "hou.qt.mainWindow()" as a parent, the UI inherits the CSS from its parent. In order to override the CSS on the QLineEdit for instance, I can't just simply write edit.setStyleSheet(), this is being ignored. Instead, I apparently have to grab the CSS from the mainWidget (which is a string) and append my own line using the identifier "#QLineEditCustom". This way it's possible for me to adjust the text color (in my case pink) as well as the selection background color (in my case red), however I'm unable to change the background color of the QLineEdit, which is what I actually want to do. > background: rgb(255, 255, 255) does not work > background-color: rgb(255, 255, 255) does not work either What am I missing here guys? I really like the fact that I can just inherit the CSS from Houdini, but it would be great if there was a more straight forward way of customizing it. The other question I have, what if I wanted to change the background color based on the user text input from color A to color B dynamically, how would I approach that? Thanks in advance, Manu
-
I know the icons are stored here: hicon:/SVGIcons.index? and the short form to add one to a tool or shelf would be, for example, BUTTONS_add.svg. But how can I point to one of these icons from a pyside gui? Is there a fullpath I can use?
-
How to get houdini mainWindow & parent PyQt/PySide Qwidget to mainWindow in 14.0 and 15.0?? hou.ui.mainQtWindow() not working here
-
Hi guys, This has boggled my mind for a while now. I have a OTL that has a tool script attached to it (Type Properties > Tool section), that evokes a PySide interface. The problem is that when I run the tool a few times, every single time a new instance of the interface is being opened, while the old one is still alive. So I'm ending up with lots of open windows of the same tool after a while which is super annoying. How can I prevent this from happening? I want to have only one single instance running at a time, basically close the old window if the tool is run again. Here's a really simple example that we could use as a test case. (Same problem if I run it as a shelf tool) from PySide import QtGui, QtCore class Window(QtGui.QWidget): """Simple Test""" def __init__(self): super(Window, self).__init__() self.setGeometry(50, 50, 500, 300) self.setWindowTitle("test") self.home() def home(self): btn = QtGui.QPushButton("Test Button") a_label = QtGui.QLabel("Test Label") qvbox = QtGui.QVBoxLayout() qvbox.addWidget(btn) qvbox.addWidget(a_label) qvbox.insertStretch(2) self.setLayout(qvbox) def run(self): self.show() main = Window() main.run() Some where I read that using the QEventLoop might help to detect running instances with hou.ui.eventLoopCallbacks(), but after trying some stuff for a few hours, I'm at my wits end. Help here would be much appreciated Thanks!!!
-
A few weeks ago i started working on a shelf tool for my self, to learn PyQt and make my own live a bit easier. It allows uses to create a list of node names and assign colours to each name. When applied all nodes in the project matching to any of the given names is given a colour linked to that name. This can be used for example if you want to give all Null nodes the same colour without havin to look for every node in your project. I'ts almost finished and would like some feedback on possible improvements. attached is a file with the code. Simply create a new shelf tool and add the code in script tab. node coloring tool.txt
- 1 reply
-
- PyQt
- Shelf tool
-
(and 3 more)
Tagged with:
-
Hi, I'm currently working on an asset browser implemented as a python panel using PySide. The main part of it is a QListWidget containing one items per asset. I'm trying to implement drag and drop functionality to place items directly in viewport at drop position. For dragging I'm using the itemPressed signal, which is sent by QListWidget when holding the mouse button over an item. Then I want to check if a drop is allowed on mouseMoveEvent() by traversing all viewports and checking if the mouse cursor is located inside. But can't find a way to check if the mouse cursor is over the viewport. Also I need the exact drop position when releasing the mouse button. I found this related topic http://forums.odforce.net/topic/20382-geometry-point-under-the-mouse/ and tried to adopt the first block to get the drop position in world space. For testing I just created a default Mouse CHOP and called hou.evalParm('/obj/chopnet/mouse") from withi mouseReleaseEvent(), but it always fails (the path is definetely correct) with hou.OperationFailed exception. Also calling hou.GeometryViewport.mapFromMouseChop() always fails for me, even if I just pass (0.0, 0.0). Here is some code: class AssetListWidget(QtGui.QListWidget): def __init__(self, parent=None): QtGui.QListWidget.__init__(self, parent) # doing some initialization here self.itemPressed.connect(self.onItemPressed) def onItemPressed(self, item): self.draggedItem = item # cache sceneviewers for paneTab in hou.ui.curDesktop().paneTabs(): if paneTab.type() == hou.paneTabType.SceneViewer: self.sceneViewers.append(paneTab) def mouseMoveEvent(self, ev): allowDrag = False for sceneViewer in self.sceneViewers: for viewport in sceneViewer.viewports(): try: mx, my = hou.evalParmTuple("/obj/chopnet/mouse") # always fails vx, vy = v.mapFromMouseChop(mx, my) # screen to view direction, position =v.mapToWorld(vx,vy) # view to world except hou.OperationFailed as err: print err """ try: print viewport.mapFromMouseChop(0.0, 0.0) # always fails except hou.OperationFailed as err: print err """ def mouseReleaseEvent(self, ev): # will be similiar to above QtGui.QListWidget.mouseReleaseEvent(self, ev) What am I doing wrong? How do I have to set up the Mouse CHOP properly? Does someone have a better advice for implementing this feature (if it is even possible using hom)? Thanks for any help! Best, Satara
-
Pipeline Technical Director - Digital Domain Vancouver Location: Vancouver, BC Summary: Pipeline Technical Directors are responsible for improving the overall efficiency of the facility-wide production pipeline. They design, implement, and manage tools that assist the digital artists with their daily use of both third party and in-house software and systems. These tools are intended to make the computer graphics production as efficient and productive as possible. Pipeline TDs work with peers and supervisors to craft novel tools, techniques, and procedures to aid the execution of the current project and advance the capabilities of the facility. The role requires strong technical and communication skills, as well as a firm understanding of software design, graphics, and production work flow. Principal Duties and Responsibilities: • Work with other TDs and artists to help design and create tools to be integrated into Digital Domain's existing pipeline. These tools will be created using a combination of custom and commercial Python and C++ APIs- including those applicable to Nuke, Maya, and Houdini dependent upon the emphasis of the specific role. • Work with department representatives to augment their work flows and tool sets to achieve specific goals of the project • Work with artists to troubleshoot and fix problems • Craft and update documentation for tools, techniques and work flows generated by the Technical Director Education, Experience and Skills Required: • 3+ years experience as a Technical Director • Degree in Computer Science, Engineering, Mathematics, or equivalent work experience • Practical knowledge of Python strongly desired, knowledge of PyQt a plus • Working experience with one or more professional graphics packages, including Maya, Houdini and Nuke • Proficiency in one or more professional graphics package C++/ Python APIs, including the Maya SDK, HDK, Nuke SDK, Mental Ray SDK, and Prman SDK preferred • Proficiency in applicable domain specific programming language(s) including Mel, HScript, RSL, MetaSL To apply for this position submit an application at www.digitaldomain.com/careers/ Please select Vancouver from the location drop down menu
-
- Pipeline TDDigital Domain
- Vancouver
- (and 7 more)
-
Python in CG pipeline Masterclass with Pavel Giydenko originaly taught in Russian, translated (by me) to English. Toppics include - Python in CG Pipeline intro - Implementation of PyQt - Python- operators in Houdini - Live Connect and Data Transfer - Correct pattern for Object Oriented Programming Formore info, scene files and code: Pavels Blog
- 6 replies
-
- 3
-
- Free
- Masterclass
- (and 5 more)
-
Hi, I looked for but couldn't find an answer to my question, so sorry if this has actually been answered before. I am having a hard time having the PyQt4 library that is installed on my Win7 machine imported into houdini. When I try to run my code that includes an import command of PyQt4, I am getting: ImportError: No module named PyQt4 I already have this path defined in my windows environment variables. One thing I am noticing though is: when I check out the sys.path inside python shell, there doesn't seem to be any of my windows global environment paths listed there. I guess the question I have is: how do I get them to be seen by Houdini? Thanks!
- 2 replies
-
- pyqt
- environment variables
-
(and 1 more)
Tagged with:
-
Hey guys I started using pyqt inside Houdini using eventloops. I followed this link from sidefx for setup and I'm able to get it working http://www.sidefx.com/docs/houdini12.5/hom/cookbook/pyqt/part1/ But it seems that the application runs independent of Houdini's UI. I'm just curious whether there is a way I can make this window behave like a Houdini UI window. So if I minimize Houdini, the pyqt window also gets minimized and If I maximize, the Pyqt window should get focus somthing of that sort.. Any help much appreciated. Cheers -J