Hi,
When I invoke hou.SceneViewer().selectGeometry() for user to select geo, can I initialize specific mode configuration?
selectGeometry() is not documented, there is plenty of options, but none of them sounds like it.
Any workaround? I want to suggest user to use “3D Connected Geometry” option.
thanks
Found 120 posts.
Search results Show results as topic list.
Technical Discussion » hou.SceneViewer().selectGeometry() - can I initialize connectivity type ?
- tas3d
- 120 posts
- Offline
Technical Discussion » Permission error in blackboxed HDA
- tas3d
- 120 posts
- Offline
Thanks Ben for advise.
I cant say that I like this approach. This way I end up with two HDA files, I'm putting extra effort to keep it all in one file, easier for distribution. Its asset for general public.
There is a list of Editable nodes in Type Properties. I cant stop thinking that once I specify if, I should be able to edit those nodes, as well as query.
Best
I cant say that I like this approach. This way I end up with two HDA files, I'm putting extra effort to keep it all in one file, easier for distribution. Its asset for general public.
There is a list of Editable nodes in Type Properties. I cant stop thinking that once I specify if, I should be able to edit those nodes, as well as query.
Best
Technical Discussion » Permission error in blackboxed HDA
- tas3d
- 120 posts
- Offline
Hi,
Is there a way to execute a Python script inside or outside HDA that is reading geometry inside HDA ?
I get permission error when I try to do this. I want to querry geo inside blackboxed HDA and pass result to the parameter of HDA. Why is that illegal ?
Attached example HDA. Please convert it to blackboxed to see the error.
Thank you
Is there a way to execute a Python script inside or outside HDA that is reading geometry inside HDA ?
I get permission error when I try to do this. I want to querry geo inside blackboxed HDA and pass result to the parameter of HDA. Why is that illegal ?
Unable to evaluate expression ( Traceback (most recent call last): File "", line 4, in expression File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.457/houdini/python2.7libs\hou.py", line 56807, in node return _hou.node(*args) PermissionError: You don't have permissions to access that node in a compiled HDA. (/obj/geo1/subnet1/null1/parm)).
Attached example HDA. Please convert it to blackboxed to see the error.
Thank you
Technical Discussion » embed .ui file into HDA ?
- tas3d
- 120 posts
- Offline
I got it working by saving extra files to temp file, then reading them in
type = hou.nodeType(hou.sopNodeTypeCategory(), "xxx") definition = type.definition() sections = definition.sections() extraFiles = ('ui.png', 'ui_mask.jpg', 'widget.ui', 'about.jpg') tempDir = tempfile.gettempdir() for f in extraFiles: section = sections[f] filepath = os.path.join(tempDir, f) file = open(filepath, "wb") file.write(section.contents()) file.close()
Edited by tas3d - June 6, 2018 06:38:44
Technical Discussion » embed .ui file into HDA ?
- tas3d
- 120 posts
- Offline
Hi,
Im having trouble reading embeded widget ui file.
tried also full path
or this
Is it because readFile returns content of the file, rather then file itself ?
What it a proper way of reading embeded widget ui files from the same HDA ?
Im having trouble reading embeded widget ui file.
class MyWidget(QtWidgets.QWidget): def __init__(self, *args, **kwargs): super(MyWidget, self).__init__(*args, **kwargs) ui_file = hou.readFile("opdef:.?widget.ui") ...
ui_file = hou.readFile("opdef:/Sop/myHDA?widget.ui")
or this
ui_file = "opdef:/Sop/myHDA?widget.ui"
Is it because readFile returns content of the file, rather then file itself ?
What it a proper way of reading embeded widget ui files from the same HDA ?
Edited by tas3d - June 5, 2018 06:39:53
Houdini Indie and Apprentice » Multi FlipBook
- tas3d
- 120 posts
- Offline
Flipbook session label disappeared in 16.5 ( even in 16.0 is gone).
How can we label flipbooks that we keep in Sequence List ?
How can we label flipbooks that we keep in Sequence List ?
Technical Discussion » QDoubleSpinBox not consistent with hou.ui.stylesheet
- tas3d
- 120 posts
- Offline
Technical Discussion » QDoubleSpinBox not consistent with hou.ui.stylesheet
- tas3d
- 120 posts
- Offline
Hi,
Here is comparison of QSpinBox and QDoubleSpinBox in PySide2.
Why double looks so odd compared to all other Qt Widgets?
Is there a way to override just QDoubleSpinBox style in hou.ui.stylesheet ?
This is captured on Windows, but same on Linux with Qt4 and Qt5.
Code borrowed from
http://ikatnek.blogspot.co.nz/p/pyside2.html [ikatnek.blogspot.co.nz]
thanks
Here is comparison of QSpinBox and QDoubleSpinBox in PySide2.
Why double looks so odd compared to all other Qt Widgets?
Is there a way to override just QDoubleSpinBox style in hou.ui.stylesheet ?
This is captured on Windows, but same on Linux with Qt4 and Qt5.
Code borrowed from
http://ikatnek.blogspot.co.nz/p/pyside2.html [ikatnek.blogspot.co.nz]
thanks
from PySide2 import QtWidgets class MainWindow(QtWidgets.QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.construct_ui() def construct_ui(self): self.setStyleSheet(hou.qt.styleSheet()) self.setProperty("houdiniStyle", True) self.setWindowTitle('PySide2 Test') # main widget main_widget = QtWidgets.QWidget(self) self.setCentralWidget(main_widget) # layout initialize g_layout = QtWidgets.QVBoxLayout() layout = QtWidgets.QFormLayout() main_widget.setLayout(g_layout) # Add Widgets self.parm = QtWidgets.QSpinBox() self.parm.setValue(30) self.parm2 = QtWidgets.QDoubleSpinBox() self.parm2.setValue(30) layout.addRow('Parameter', self.parm) layout.addRow('Parameter', self.parm2) self.exec_btn = QtWidgets.QPushButton('Execute') # global layout setting g_layout.addLayout(layout) g_layout.addWidget(self.exec_btn) w = MainWindow() w.show()
Edited by tas3d - April 30, 2018 04:50:47
Technical Discussion » COP Metadata
- tas3d
- 120 posts
- Offline
thanks for explanation.
the only way i found working, is to use post-frame script and run oiiotool to mess with meta
the only way i found working, is to use post-frame script and run oiiotool to mess with meta
Technical Discussion » COP Metadata
- tas3d
- 120 posts
- Offline
Hi,
I need to add exr metadata to images rendered with COP ROP.
1. I tried using Metadata node in COPs, but it doesnt seem to work. I read exr in Nuke or oiiotool, and there is no Metadata defined in COPs.
2. Tried adding vm_image_exr_attributes to ROP, but that also doesnt pass any Meta into generated exr file.
Any suggestions ?
Thanks
I need to add exr metadata to images rendered with COP ROP.
1. I tried using Metadata node in COPs, but it doesnt seem to work. I read exr in Nuke or oiiotool, and there is no Metadata defined in COPs.
2. Tried adding vm_image_exr_attributes to ROP, but that also doesnt pass any Meta into generated exr file.
Any suggestions ?
Thanks
Technical Discussion » replacing HDA's menu parameter with Python, resets variables
- tas3d
- 120 posts
- Offline
Technical Discussion » Adding spare parms is resetting other parms ??
- tas3d
- 120 posts
- Offline
same here, can anyone give us a clue what is going on and how to avoid this or do it properly ?
Thanks
Thanks
Technical Discussion » replacing HDA's menu parameter with Python, resets variables
- tas3d
- 120 posts
- Offline
Hi,
I started using Python in Houdini just recently, perhaps this is something basic I am missing.
I want to update menu parm with some Python logic when SOP is created. Then each time menu is being changed(clicked and selected new value), I do another logic.
The problem is, whenever I do setParmTemplateGroup() on HDA object, some variables are being changed. I dont get whats going on. Please see attached hda and code. If you bypass setParmTemplateGroup() line, it works fine, x=20. If I update menu parm with new values/labels, x=10, even tho it was set to 20 onCreated.
Thanks!
I started using Python in Houdini just recently, perhaps this is something basic I am missing.
I want to update menu parm with some Python logic when SOP is created. Then each time menu is being changed(clicked and selected new value), I do another logic.
The problem is, whenever I do setParmTemplateGroup() on HDA object, some variables are being changed. I dont get whats going on. Please see attached hda and code. If you bypass setParmTemplateGroup() line, it works fine, x=20. If I update menu parm with new values/labels, x=10, even tho it was set to 20 onCreated.
Thanks!
import hou x = 10 labelList = ["one", "two", "three"] itemList = ["one", "two", "three"] def updateUI(node, myitemList, mylabelList): parm = node.parm("menuParm") hda = node.type().definition() ptg = hda.parmTemplateGroup() menuParm = node.parm("menuParm") template = menuParm.parmTemplate() template.setMenuItems(myitemList) template.setMenuLabels(mylabelList) ptg.replace("menuParm", template) hda.setParmTemplateGroup(ptg) def changedMenu(): global x print ("changed menu: " + str(x)) def onCreated(node): global x, itemList, labelList print ("on created: " + str(x)) x = 20 print ("on created value updated: " + str(x)) updateUI(node, itemList, labelList) print ("after updated UI: " + str(x))
Houdini Lounge » Display reversed normals?
- tas3d
- 120 posts
- Offline
twod
If they're auto-generated normals you can turn on Backface Culling (Optimization tab) and it'll remove all incorrectly wound polygons. If the normals are defined by an attribute, you'd have to write an attrib wrangle which compares the face and point/vert normal and assigns Cd = {1, 0 ,0} if dot(faceN, N) < 0.
would you mind elaborating or making an example how to do this?
Im not sure if I got ur method right.
Thanks
Technical Discussion » Bullet RBD constrained to Wire Object
- tas3d
- 120 posts
- Offline
thanks houndman, I checked this method before, the result is bit laggy and doesnt really look realisitic.
I found this statement in docs, so I assumed Constraint Network is the right way to go, I just dont know how to set it up.
I found this statement in docs, so I assumed Constraint Network is the right way to go, I just dont know how to set it up.
Constraint Network
dynamics node
Constrains pairs of RBD objects together according to a polygon network.
Note
This DOP is currently only supported by the Bullet Solver and the Wire Solver.
Technical Discussion » Bullet RBD constrained to Wire Object
- tas3d
- 120 posts
- Offline
Hi,
Im simming Bullet RBD and Wire Object in one DOP context, they collide and affect each other, nice.
How can I constrain them together ? Attach two RBD objects with wire ?
See attached hip and image. There is so many constrains in DOPs, which one should I use ? Is Constrain Network the right approach ?
Thanks!
Im simming Bullet RBD and Wire Object in one DOP context, they collide and affect each other, nice.
How can I constrain them together ? Attach two RBD objects with wire ?
See attached hip and image. There is so many constrains in DOPs, which one should I use ? Is Constrain Network the right approach ?
Thanks!
Houdini Engine for Unreal » can we create BP nodes with Houdini Engine ?
- tas3d
- 120 posts
- Offline
Houdini Engine for Unreal » can we create BP nodes with Houdini Engine ?
- tas3d
- 120 posts
- Offline
Hi,
Im not sure what to expect from Engine for UE4, there is no documentation(is there?).
Can we create custom Blueprint nodes that will perform certain operations ?
The one I have in mind is to analyze Static meshes with SOPs, calc volume or area and output float value.
ie. calculate area of StaticMesh component and write it to Actor's variable.
possible ?
cheers
Im not sure what to expect from Engine for UE4, there is no documentation(is there?).
Can we create custom Blueprint nodes that will perform certain operations ?
The one I have in mind is to analyze Static meshes with SOPs, calc volume or area and output float value.
ie. calculate area of StaticMesh component and write it to Actor's variable.
possible ?
cheers
Technical Discussion » xTools Deadline submission in H13
- tas3d
- 120 posts
- Offline
Hi,
does anyone is using xTools in H13 ? Specificly Deadline submission tools.
When I run xSubmit, i get this error:
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “opdefxAutomate:river/xSubmit::1.0?PythonModule”, line 359, in submitJobs
AttributeError: ‘NoneType’ object has no attribute ‘hdaModule’
When I go to 359 line of code ( there are two scripts in this operator, not sure if im looking at the correct one), i see this:
data = hou.nodeType(hou.nodeTypeCategories(),“xOutput”).hdaModule().outputData()
No idea what to do with this, didnt try it on H12. Any clues ?
does anyone is using xTools in H13 ? Specificly Deadline submission tools.
When I run xSubmit, i get this error:
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “opdefxAutomate:river/xSubmit::1.0?PythonModule”, line 359, in submitJobs
AttributeError: ‘NoneType’ object has no attribute ‘hdaModule’
When I go to 359 line of code ( there are two scripts in this operator, not sure if im looking at the correct one), i see this:
data = hou.nodeType(hou.nodeTypeCategories(),“xOutput”).hdaModule().outputData()
No idea what to do with this, didnt try it on H12. Any clues ?
Houdini Indie and Apprentice » reflections going through object - steep normals
- tas3d
- 120 posts
- Offline
it sovled my problem, if I raise Reflection Angle to >0. thanks for that!
But the issue still exists if I apply even slightest bump map. Then I get red color all over the place.
any ideas ?
But the issue still exists if I apply even slightest bump map. Then I get red color all over the place.
any ideas ?
-
- Quick Links