Is there any way to trigger a python script that is part of an HDA specifically when a copy of the HDA is pasted (only for the pasted copy)?
Neither On Created nor On Updated get triggered after the copy is pasted.
On Name Changed is triggered for both the copy and the source node after the paste.
On Loaded is triggered for just the pasted copy, but is also triggered for all node instances the next time the hip is loaded ...
Found 35 posts.
Search results Show results as topic list.
Technical Discussion » Event handler specifically when an HDA is pasted?
- cruiserandmax
- 35 posts
- Offline
Technical Discussion » Example of using stroke meta data ?
- cruiserandmax
- 35 posts
- Offline
I'm interested in building a stroke tool that associates the frame number at which a stroke was drawn with the primitive of the stroke. It seems like stroke meta data maybe a good way to handle this, but following the docs it doesn't seem to work.
Does anyone have an example of setting custom data per stroke, and doing something with it after the stroke node inside the hda?
I have tried making an hda with just a stroke node inside, setting the hda Node Default State to stroke, dragging the Number of Strokes parameter from the parameters panel on the stroke node inside the hda to the Edit Operator Type Properties Parameters panel of the hda. Then adding a new parameter on the hda properties called something like stroke#_frame or stroke_frame#. According to the docs the Meta Data parameter on the stroke geometry node:
"Stores the values of all parameters whose names start with stroke_ from the top level node. These are copied into correspondingly named primitive attributes."
But the Meta Data always seem to contain just a list like
I can't figure out what I am doing wrong?
Does anyone have an example of setting custom data per stroke, and doing something with it after the stroke node inside the hda?
I have tried making an hda with just a stroke node inside, setting the hda Node Default State to stroke, dragging the Number of Strokes parameter from the parameters panel on the stroke node inside the hda to the Edit Operator Type Properties Parameters panel of the hda. Then adding a new parameter on the hda properties called something like stroke#_frame or stroke_frame#. According to the docs the Meta Data parameter on the stroke geometry node:
"Stores the values of all parameters whose names start with stroke_ from the top level node. These are copied into correspondingly named primitive attributes."
But the Meta Data always seem to contain just a list like
[ 0 ]
I can't figure out what I am doing wrong?
Edited by cruiserandmax - 2023年10月23日 18:16:34
Technical Discussion » HDA version resolution vs HOUDINI_OTLSCAN_PATH
- cruiserandmax
- 35 posts
- Offline
We are in a situation where we have a SOP HDA, say foo.hda, that exists without any versions. However that same foo.hda exists in our HOUDINI_OTLSCAN_PATH in a lower priority path location where it happens to have a foo.hda::2 version which is significantly different from the foo.hda definition in the priority scan path location. As a result whenever we TAB create this SOP HDA in a houdini session using this HOUDIN_OTLSCAN_PATH we get the foo.hda::2 defined in the lower priority location... And if we then switch the asset definition to the foo.hda version it does appear to switch to the priority source location for the .hda file, however it continues to display the parameter interface that was defined in the foo.hda::2 definition which makes things very confusing.
Is there any way to get houdini to correctly resolve to the foo.hda definition (including parameter interface) that is defined in the first folder of the HOUDINI_OTLSCAN_PATH?
Is there any way to get houdini to correctly resolve to the foo.hda definition (including parameter interface) that is defined in the first folder of the HOUDINI_OTLSCAN_PATH?
Technical Discussion » HDA edit mode (ENTER key) invoke edit mode on internal SOP?
- cruiserandmax
- 35 posts
- Offline
Is there any way to setup a SOP HDA so that when the <ENTER> key is used (to enter "edit" mode) the edit mode of a targeted SOP within the HDA becomes active for use?
Technical Discussion » Can you determine if an attrib is 2float or 3float in vex?
- cruiserandmax
- 35 posts
- Offline
Technical Discussion » Can you determine if an attrib is 2float or 3float in vex?
- cruiserandmax
- 35 posts
- Offline
I am trying to set Cd to the value of an attribute in vex but I do not know the attribute type ahead of time. Assuming the attr is an int, float, 2float, or 3float I want Cd to become:
int -> {int,int,int}
float -> {float,float,float}
float2 -> {float2.x,float2.y,0}
float3 -> {float3.x,float3.y,float3.z}
So I am doing something like (vertex wrangle in this case):
if st is a 2float then this does not evaluate st correctly. How do I handle setting Cd when st could be any of int, float, vector(3float), vector(2float) ?
If I can determine 2float vs 3float then I can do:
or
as needed to get the correct result.
the functions attribtype() or vertexattribtype() group float and vector types into one return value.. So they don't really help.
int -> {int,int,int}
float -> {float,float,float}
float2 -> {float2.x,float2.y,0}
float3 -> {float3.x,float3.y,float3.z}
So I am doing something like (vertex wrangle in this case):
v@Cd = vertex(0,"st",i@vtxnum);
if st is a 2float then this does not evaluate st correctly. How do I handle setting Cd when st could be any of int, float, vector(3float), vector(2float) ?
If I can determine 2float vs 3float then I can do:
v@Cd = vector2(vertex(0,"st",i@vtxnum));
v@Cd = vector(vertex(0,"st",i@vtxnum));
as needed to get the correct result.
the functions attribtype() or vertexattribtype() group float and vector types into one return value.. So they don't really help.
Edited by cruiserandmax - 2021年11月4日 22:27:49
Technical Discussion » Hard constraint between animated and active object? Bug?
- cruiserandmax
- 35 posts
- Offline
cwhite
I think you want to flip this around so that the anchors are positioned on the static object, letting the active object rotate around that pivot. You can use a Reverse SOP to flip the vertex order on your constraint primitives.
Thanks- that does then behave as you desribe.. Using "anchor logic" then I can also co-locate both anchor points at the center of the inactive object, and use a restlength of zero (same as not using restlength I guess) and get the desired swinging relationship (active object swinging around the location of the inactive object) and not have to worry about the point order... Maybe that is a more robust way of setting this up on a larger scale since point order never has to be considered? Though maybe the downside there is it's harder to visualize which objects are constrained to which via the constraint geometry in SOPs.. hmm..
Thanks for pointing out the meaning/importance of anchor relativity
Technical Discussion » Hard constraint between animated and active object? Bug?
- cruiserandmax
- 35 posts
- Offline
I made a simple example where two packed rbs (one animated and one active) are constrained via one hard constraint. I would expect the active object to fall and swing under the animated object. But instead everything stays still... If I change the name on the constraint geometry point that attaches to the animated object to an empty string "" then the active object will swing as expected below that constraint point- so I believe the constraint is working.
In the attached example notice everything stays still- and if you enable the wrangle on the bottom right (sets name to "") then it "works"...
It almost feels like a bug- that the constraint doesn't work when attached to the animated rbd...
In the attached example notice everything stays still- and if you enable the wrangle on the bottom right (sets name to "") then it "works"...
It almost feels like a bug- that the constraint doesn't work when attached to the animated rbd...
Technical Discussion » display selected packed RBD points in DOPs geo spreadsheet?
- cruiserandmax
- 35 posts
- Offline
Is there any way while inside DOPs to display only selected packed RBD object Geometry points in the geometry spreadsheet when inside the DOPs context?
It has driven me nuts for years not knowing a way to do this..
It has driven me nuts for years not knowing a way to do this..
Edited by cruiserandmax - 2021年7月13日 22:07:00
Technical Discussion » delete/save geometry out of flip object in dops per frame?
- cruiserandmax
- 35 posts
- Offline
In a flip sim I am using a wrangle to tag flip points that match a certain condition. My goal is to remove the tagged points from the flip object when they meet that condition, but keep them around so they may be extracted from the dopnet into SOPs on every frame.
What is a good way to remove the points from the flip object as soon as they meet their condition but also keep them around so all of the "removed" points on any frame are available in SOPs?
What is a good way to remove the points from the flip object as soon as they meet their condition but also keep them around so all of the "removed" points on any frame are available in SOPs?
Technical Discussion » Distributed narrow band flip sim?
- cruiserandmax
- 35 posts
- Offline
Apparently distributed narrow band simulation support was a feature release in 17.5:
https://www.sidefx.com/docs/houdini/news/17_5/index.html#fluids [www.sidefx.com]
https://www.sidefx.com/docs/houdini/news/17_5/index.html#fluids [www.sidefx.com]
Technical Discussion » Distributed narrow band flip sim?
- cruiserandmax
- 35 posts
- Offline
I have been running distributed flip sims on our farm and it has been working very well. We can can get a traditional 14hr sim back in 2-3 hours distributing it into 5 clusters. The tank in this case needs to be fairly deep so I tried optimizing further by making it a narrow band sim, however as soon as it is setup for narrow band the distributed sims seem to splash up and down at the interface between clusters whereas the interface was imperceptible before using narrow band.. Distributed Pressure Solve is being used in both cases.. There is a section in the docs called “Set up a distributed narrow band FLIP tank” so I assume it's supported (I am in H17.5)? Is there anything special I need to consider when distributing a narrow band flip sim?
And for the record- A 5 cluster distributed sim finishes in 2-3 hours, and a non-distributed narrow band sim also finishes in about 3 hours and does not look qualitatively different.
And for the record- A 5 cluster distributed sim finishes in 2-3 hours, and a non-distributed narrow band sim also finishes in about 3 hours and does not look qualitatively different.
Edited by cruiserandmax - 2020年10月17日 01:34:37
Technical Discussion » volesamplefile VOP and op:/ syntax fails in shader?
- cruiserandmax
- 35 posts
- Offline
It seems using a volumesamplefile VOP in an attributeVOP and pointing the geometry file to a SOP using something like op:/obj/myvolume/vdbfrompolygons works just fine to sample the volume. But when the same VOP is used inside a material it fails to sample the volume. It seems in the material context it will only sample the volume correctly if it is read from an actual file on disk.
Is this true? I thought the op:/ syntax should work almost anywhere ?
Is this true? I thought the op:/ syntax should work almost anywhere ?
Technical Discussion » release a node auto-connecting to noodel?
- cruiserandmax
- 35 posts
- Offline
DaJuice
The hotkey for drop-on-wire was changed to ctrl+8.
Wow that was driving me nuts! Thank you!!
Technical Discussion » release a node auto-connecting to noodel?
- cruiserandmax
- 35 posts
- Offline
I feel like there used to be a hotkey to hold when dragging a node so that when you release it won't automatically connect to any noodle you might be releasing it over? I sort of feel like it was the ‘e’ key. Probably many versions ago.. I'm in 17.0 now and can't figure a way to make this happen..
Does anyone else remember that behavior?
Does anyone else remember that behavior?
Technical Discussion » Save CHOP audio to .wav file via Python in 16.5 ?
- cruiserandmax
- 35 posts
- Offline
I'm always amazed at how long the python api has been around and how much hscript functionality still hasn't made it over..
Good call on hscript- that works great!
Good call on hscript- that works great!
Technical Discussion » Save CHOP audio to .wav file via Python in 16.5 ?
- cruiserandmax
- 35 posts
- Offline
Is there any way to save a CHOP channel as an audio file via Python in H16.5 ?
I can right click on the CHOP and Save->Data Channles and give the filename a .wav extension and it writes a correct audio wav file, but it looks like hou.ChopNode.saveClip() method isn't implemented in 16.5 and (maybe) is in 17.0.. ?
Would that be the only way to get a sound file out through Python?
I can right click on the CHOP and Save->Data Channles and give the filename a .wav extension and it writes a correct audio wav file, but it looks like hou.ChopNode.saveClip() method isn't implemented in 16.5 and (maybe) is in 17.0.. ?
Would that be the only way to get a sound file out through Python?
Technical Discussion » Animation Editor grap vs dopesheet default view!?
- cruiserandmax
- 35 posts
- Offline
I removed hchanneleditor.pref from my houdini preferences folder and restarted houdini and the animation editor was back to normal (displays curves by default now).. I didn't bother trying to figure out the individual line that was causing it..
Technical Discussion » Animation Editor grap vs dopesheet default view!?
- cruiserandmax
- 35 posts
- Offline
I accidentally changed the default animation editor view to be “dopesheet” mode- so now whenever I SHIFT-MMB on a parameter it opens the animation editor for that parameter in dopesheet mode and I need to manually click on the “Graph” button in the top/left to see the curves…
The problem is I don't know where to ccontrol/reset that default behavior!
Any ideas?
The problem is I don't know where to ccontrol/reset that default behavior!
Any ideas?
Houdini Lounge » Disable auto layout adjustment when drag-inserting new nodes in network editor?
- cruiserandmax
- 35 posts
- Offline
Is there any way to disable this behavior? I want to be able to drag a node onto an edge to insert it in one step without the graph layout changing automatically..
-
- Quick Links