Hey guys,
I'm building an HDA with a somewhat complex set of parms and I wonder if there would be a way to group a few parms together to create an uber parm block, so I can duplicate it around for other parms, a little bit like what you can create in pyqt with widgets.
I read about Import blocks a bit, but I don't think they can do what I want.
For example, let's assume that I have a block of parms as follow :
- A toggle
- A label
- A min value
- A max value
- A variation value
- etc.
So now I want a Parm block for let's say “density” and “rotation”, same ui, same behaviour, just different Parm names. I can duplicate manually the parms, but it would be great to have such a “block” to control the overall UI/logic, specially if I want to change the global look and feel later.
I assume this is something that is probably not doable, but maybe there is a way ?
Let me know,
Thanks a lot,
Julien
Found 65 posts.
Search results Show results as topic list.
Technical Discussion » HDA "widget-style" parms
- julien-b
- 65 posts
- Offline
Technical Discussion » Python states and Edit Node
- julien-b
- 65 posts
- Offline
Hi guys,
Is there a hook to be able to get the behaviour of a Edit Sop as the default state of an HDA ? Or is there a Python Viewer State for that ?
Thanks,
Julien
Is there a hook to be able to get the behaviour of a Edit Sop as the default state of an HDA ? Or is there a Python Viewer State for that ?
Thanks,
Julien
Technical Discussion » Loop networks not updating properly
- julien-b
- 65 posts
- Offline
In case this happens to anyone…
If you have OTLs with a lot of loops, it is quite important to use spare inputs and protect any input feeding the loops with some begin block nodes. It seems like it fixed all the issues for me (so far…)
Cheers,
Julien
If you have OTLs with a lot of loops, it is quite important to use spare inputs and protect any input feeding the loops with some begin block nodes. It seems like it fixed all the issues for me (so far…)
Cheers,
Julien
Technical Discussion » Loop networks not updating properly
- julien-b
- 65 posts
- Offline
Yes, I tried this already and it didn't work. I wouldn't be sustainable anyway as it would ultimately be inside an HDA …
Technical Discussion » Loop networks not updating properly
- julien-b
- 65 posts
- Offline
Hey guys,
As I'm building more and more complex scenes, using custom OTLs and switching between SOPs and LOPs, I'm getting weird behaviour with For Each loop nodes, where they don't update and/or evaluate properly. If let's say I loop over 5 named primitives, merging iterations, I end up with 5 times the first iteration… The interesting part is, if I look at individual iteration (using single pass), they evaluate properly individually. If I do a cut/paste of the entire loop graph, I get what I need, but it's obviously not sustainable.
I'm trying to isolated a bug on a single scene, and so far, it's proven really hard…
So if you have encountered the same issue, and you have pointers of the type of things to look for, that would be great!
Thanks a lot,
Julien
As I'm building more and more complex scenes, using custom OTLs and switching between SOPs and LOPs, I'm getting weird behaviour with For Each loop nodes, where they don't update and/or evaluate properly. If let's say I loop over 5 named primitives, merging iterations, I end up with 5 times the first iteration… The interesting part is, if I look at individual iteration (using single pass), they evaluate properly individually. If I do a cut/paste of the entire loop graph, I get what I need, but it's obviously not sustainable.
I'm trying to isolated a bug on a single scene, and so far, it's proven really hard…
So if you have encountered the same issue, and you have pointers of the type of things to look for, that would be great!
Thanks a lot,
Julien
Technical Discussion » Take a screenshot of the Network Editor
- julien-b
- 65 posts
- Offline
Thanks Marc!
Unfortunately, I had to make it work in Linux. But I found a little trick :
Basically putting the cursor at the origin of the networkEditor and retrieving the cursor position in Qt.
I had to do all sorts of conversions to get back on my feet, but it works
Cheers,
Julien
Unfortunately, I had to make it work in Linux. But I found a little trick :
networkEditor.setCursorPosition(hou.Vector2(0,0)) origin = QCursor.pos()
Basically putting the cursor at the origin of the networkEditor and retrieving the cursor position in Qt.
I had to do all sorts of conversions to get back on my feet, but it works
Cheers,
Julien
Edited by julien-b - Aug. 10, 2020 04:29:44
Technical Discussion » Will recursion be supported in wrangle in the next version ?
- julien-b
- 65 posts
- Offline
If it helps, you can implement recursion in what's called “stack base recursion”. Not as elegant and simple to implement as traditional recursion, but it works.
I followed this to get the idea : https://sergeneren.com/2018/09/23/recursion-in-vex/ [sergeneren.com]
I followed this to get the idea : https://sergeneren.com/2018/09/23/recursion-in-vex/ [sergeneren.com]
Technical Discussion » Take a screenshot of the Network Editor
- julien-b
- 65 posts
- Offline
Hi guys,
I'm trying to find a way to take a screenshot of the selected nodes of the networkEditor. Did anyone managed to do the same already ?
So far, I got everything I needed, the coordinates in screen space of the bounding rect I need to capture (based on the selected nodes), but it's expressed in local space of the networkEditor.
The next (and last) step for me would be to “just” get the position of the networkEditor in screen space, but this is something that is not available in the Python API.
I tried to go through the Qt Widgets in an attempt to find the one that describes the networkEditor, but without any success.
Please let me know if you had ideas on how to solve this…
Thanks a lot,
Julien
I'm trying to find a way to take a screenshot of the selected nodes of the networkEditor. Did anyone managed to do the same already ?
So far, I got everything I needed, the coordinates in screen space of the bounding rect I need to capture (based on the selected nodes), but it's expressed in local space of the networkEditor.
The next (and last) step for me would be to “just” get the position of the networkEditor in screen space, but this is something that is not available in the Python API.
I tried to go through the Qt Widgets in an attempt to find the one that describes the networkEditor, but without any success.
Please let me know if you had ideas on how to solve this…
Thanks a lot,
Julien
Technical Discussion » Packages expression syntax
- julien-b
- 65 posts
- Offline
I see, thanks!
One thing I tried though what to put that houdini_env in the package itself, it didn't work either …
Problem is, I can't put it in my env.csh, but that's a problem I'll have to solve somewhere else …
One thing I tried though what to put that houdini_env in the package itself, it didn't work either …
Problem is, I can't put it in my env.csh, but that's a problem I'll have to solve somewhere else …
Technical Discussion » SceneViewer as QWidget in H18
- julien-b
- 65 posts
- Offline
Hi guys,
I'm trying to do the same for the network Editor, but even going (recursively) through all the Qt widgets from the hou.qt.mainWindow(), I can't find the right widget …
Any thought ?
Thanks a lot,
Julien
I'm trying to do the same for the network Editor, but even going (recursively) through all the Qt widgets from the hou.qt.mainWindow(), I can't find the right widget …
Any thought ?
Thanks a lot,
Julien
Technical Discussion » Packages expression syntax
- julien-b
- 65 posts
- Offline
Hi guys,
I've been trying to get expressions in packages working, but I've come to a dead end.
Here is a snippet of what I'm trying to do :
In my houdini.env, I have a houdini_dev variable that I want to use to switch between the global project and a local project.
But this doesn't seem to work.
If I check the environment variables in Python once Houdini is loaded, I can see my houdini_dev variable, as well as TOOLS_PATH but MYPROJECT_PATH is not there.
What am I doing wrong here ?
Thanks a lot,
Julien
I've been trying to get expressions in packages working, but I've come to a dead end.
Here is a snippet of what I'm trying to do :
{ "env": [ { "MYPROJECT_PATH": [ { "$houdini_dev == '0'" : "/global/path" }, { "$houdini_dev == '1'" : "/dev/path" } ] }, { "TOOLS_PATH": "/my/other/path" } ] }
In my houdini.env, I have a houdini_dev variable that I want to use to switch between the global project and a local project.
But this doesn't seem to work.
If I check the environment variables in Python once Houdini is loaded, I can see my houdini_dev variable, as well as TOOLS_PATH but MYPROJECT_PATH is not there.
What am I doing wrong here ?
Thanks a lot,
Julien
Technical Discussion » Node dependencies in Python
- julien-b
- 65 posts
- Offline
Thanks Jonathan, I will have a look.
In the meantime, I think I managed to get what I needed by writing a recursive function that inspects the references of a given list of nodes. The function find the references of each node, then look at their ancestors for new references, etc.
I don't think it's necessarily future proof, and I'll keep testing it further, but for now I think I got what I needed.
Please let me know if you guys feel like there is something wrong with what I'm doing.
In the meantime, I think I managed to get what I needed by writing a recursive function that inspects the references of a given list of nodes. The function find the references of each node, then look at their ancestors for new references, etc.
I don't think it's necessarily future proof, and I'll keep testing it further, but for now I think I got what I needed.
Please let me know if you guys feel like there is something wrong with what I'm doing.
### RETURNS REFERENCES FROM A GIVEN NODE ### ### Ignores the references inside a hda, as they are considered self contained ### def getReferences(node): references = [] if isNodeHDA(node): references = list(node.references(include_children=False)) ### Removes children if referenced in the hda ### for reference in references: if isNodeChildOf(reference,node): references.remove(reference) else: references = node.references(include_children=True) references = list(set(references)) ### Removes the node if it references itself ### if node in references: references.remove(node) return references ### RETURNS ALL DEPENDENCIES FOR A GIVEN NODE def getAllDependencies(nodes, level=0, maxdepth=10): dependencies = [] if level == maxdepth: return dependencies for node in nodes: references = getReferences(node) ## for each reference, get ancestors for reference in references: ancestors = reference.inputAncestors(include_ref_inputs=True,only_used_inputs=False) newDependencies = getAllDependencies(ancestors,level+1,maxdepth) newDependencies.append(reference) for dependency in newDependencies: if dependency not in dependencies: dependencies.append(dependency) result = [] for dependency in dependencies: if dependency not in nodes: result.append(dependency) return result
Edited by julien-b - Aug. 6, 2020 18:06:10
Technical Discussion » Node dependencies in Python
- julien-b
- 65 posts
- Offline
I don't think that's what the dependents function does.
This function returns a list of nodes referencing the given node.
This function returns a list of nodes referencing the given node.
Technical Discussion » Node dependencies in Python
- julien-b
- 65 posts
- Offline
Hey guys,
I need to find a way to retrieve the nodes that are referenced by the entire hierarchy used to cook a given node.
With node.references, node.inputAncestors, etc. I think I can get something, but Houdini has a visual representation of this already :
And this is exactly what I need. I want to know which nodes at the same level of the node selected are needed for the selected node.
Is there a function I don't know of that already does this ?
Thanks a lot,
Julien
I need to find a way to retrieve the nodes that are referenced by the entire hierarchy used to cook a given node.
With node.references, node.inputAncestors, etc. I think I can get something, but Houdini has a visual representation of this already :
And this is exactly what I need. I want to know which nodes at the same level of the node selected are needed for the selected node.
Is there a function I don't know of that already does this ?
Thanks a lot,
Julien
Technical Discussion » Double click on a node callback
- julien-b
- 65 posts
- Offline
Hey guys,
Is there a way to detect double click (dive target) on a node/hda callback ?
Right now, if I add a callback on the “appearenceChanged” event, I just get a “Picked” result that is no different from a single click.
Thanks a lot,
Julien
Is there a way to detect double click (dive target) on a node/hda callback ?
Right now, if I add a callback on the “appearenceChanged” event, I just get a “Picked” result that is no different from a single click.
Thanks a lot,
Julien
Technical Discussion » HDA Type Properties - Node Tab in Python
- julien-b
- 65 posts
- Offline
ah I see!
I got confused because the guides is the fist thing I looked at, and it was not in the sections, whereas some other ones like “Dive Target” and “Editable Node” are …
Thanks!
I got confused because the guides is the fist thing I looked at, and it was not in the sections, whereas some other ones like “Dive Target” and “Editable Node” are …
Thanks!
Technical Discussion » HDA Type Properties - Node Tab in Python
- julien-b
- 65 posts
- Offline
Hi guys,
I was looking around to see how to access (get/set) any of the parameters of the Node tab of a HDA type properties, but couldn't find anything in the doc.
How can I get/set the guides, editable nodes, dive targets etc. in Python ?
Thanks a lot,
Julien
I was looking around to see how to access (get/set) any of the parameters of the Node tab of a HDA type properties, but couldn't find anything in the doc.
How can I get/set the guides, editable nodes, dive targets etc. in Python ?
Thanks a lot,
Julien
Technical Discussion » Node ancestors needed for cooking
- julien-b
- 65 posts
- Offline
Hi guys,
Is there a way to query which ancestors of a given node are required to cook ?
Node.getAllAncestors() returns all the ancestors regardless if they need cooking or not.
If you have switches or others, parts of the ancestors would be ignored.
Please let me know!
Thanks a lot,
Julien
Is there a way to query which ancestors of a given node are required to cook ?
Node.getAllAncestors() returns all the ancestors regardless if they need cooking or not.
If you have switches or others, parts of the ancestors would be ignored.
Please let me know!
Thanks a lot,
Julien
Technical Discussion » Quaternion Vex/Python equivalents
- julien-b
- 65 posts
- Offline
Ok, I think I found the answer : dihedral seems to be the vex equivalent of Quaternion.setToVectors() !
Cheers,
Julien
Cheers,
Julien
Technical Discussion » Quaternion Vex/Python equivalents
- julien-b
- 65 posts
- Offline
Hi guys,
I'm struggling to find the equivalent functions in python and vex when it comes to quaternions.
This seems to be working in Python :
How would I get the same result in Vex?
Or if even my Python code is wrong, how can I get the same result in Vex/Python for what I'm trying to achieve ?
Thanks a lot,
Julien
I'm struggling to find the equivalent functions in python and vex when it comes to quaternions.
This seems to be working in Python :
o1 = hou.Quaternion() o1.setToVectors(hou.Vector3(0, 1, 0), self.normal) o2 = hou.Quaternion() q = o2.slerp(o1, ratio)
Or if even my Python code is wrong, how can I get the same result in Vex/Python for what I'm trying to achieve ?
Thanks a lot,
Julien
Edited by julien-b - May 18, 2020 18:13:50
-
- Quick Links