Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cloaks

  • Rank

Personal Information

  • Name
  • Location
  1. Getting size or position of text

    Hello Mark, thank you so much for this! This is exactly what I was looking for! Thanks for chiming in everybody!
  2. Getting size or position of text

    Entering the following into the text field of the font node yields 0 (zero). `bbox("../font4", D_XSIZE)` But that might have been expected due to the documentation for bbox reading as follows; Returns bounding box information for a surface node. I also looked into the python documentation for boundingbox stuff. That gave me hou.BoundingBox() , which instantiates a bounding box. The docs here also mention that it's for geometry. I guess that doesn't include the nodes in a COP2NET
  3. Getting size or position of text

    Hello Atom, thank you for your reply. The width and height of the entire font node area isn't exactly what I'm trying to get here though. I've added a few images to hopefully better explain the exact details of what I'm trying to get. Image 01: Roughly measuring the width I get from $W * ch("scale1") Image 02: Roughly measuring the width I would like to get Image 03: The blue rectangle in Houdini indicates that it knows those values. Now the big question is, how to get those values
  4. Hi there Odforce! I had a small question which I hope someone will know the answer to! When i'm in the COP context, and I create a text node, how can I then get the actual width of the text? As you can see in the top part of the image, there is quite a lot of black padding around the word "Layer". When I drag the text outside of the actual canvas, you can see the blue rectangle that represents the actual size of the word. Is there any way I can query the size of that blue rectangle? Some more background on what I'm trying to achieve: I would like to move and resize the text to a specific location within a canvas. The text however, isn't predefined, so I would need to know the actual size and position of the text without manually having to override the size to minimize the background behind the letters. Thank you all for your time!
  5. Name based colouring shelf tool

    Ooooh PySide in Houdini, nice! I really like the idea of offering a workflow to improve scene cleanup, as I usually like to just focus on creating.. the cleaning up of scenes will almost always happen afterwards for me. I'm only just in the process of learning Houdini, but I am certainly familiar with Python tool development in Maya including PyQt/Pyside. So I will try to give at least some advice. Bug: - Houdini ( apprentice) crashes when closing the main form if a subform (color window) is open. (Perhaps also try to see if an instance of your window is already open, so you can close that old instance and THEN give the user the new 'fresh' window. Otherwise you can get 4 open which makes reproducing the bug above more likely.) Few other, perhaps less relevant thoughts from my side: - Make the widget with the lineEdit, checkbox etc. scale horizontally, or set the mainwindow's horizontal sizepolicy to QtGui.QSizePolicy.Fixed . Right now the headers mis-allign and making the window bigger horizontally imho doesn't seem usefull in this case. (#ocd ) The same goes for the color picking window ofcourse. If it doesn't have to scale, then I like to make it unable to scale. You can do this directly in the code, but the QtDesigner has the functionality as well ofcourse. - If possible, I'd split the UI code into a different file and import that into your main script (for clarity). Does Houdini have a default scripts folder? - Are you familiar with the new style stringformatting in python? Personally I find that way more readable and you can repeat arguments with that. Example: #old style colourName = "comboBox_%d" % size #new style colourName = "comboBox_{0}".format(size) nice read: http://stackoverflow.com/questions/5082452/python-string-formatting-vs-format Then finally, I have a question for you!: -Would you care to elaborate on the workflow of creating the GUI? You compiled through the commandline I presume? P.s.: You might already know, but there's also a way to have certain types of nodes colored automatically. Eg; create a null and it will be colored black by default. Not sure how to make that work myself, but I got some user preference files from a colleague and that got me set up quite easily with that.