Igor Churakov
maxpayne
About Me
専門知識
VFX Artist
INDUSTRY
Film/TV
Connect
LOCATION
Canada
ウェブサイト
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Python States : Run one selector after another issue 2026年11月1日10:02
Hi Everyone. I'm trying to run point selector right after primitive selector. Point selector runs but it looks like it stuck with primitive selection type even thought I specified it to be point.
If I bind those selectors to a keyboard event like one when pressing ctrl E and another ctrl+T, it works but if I use just ctrl+E and call second selector after first one it doesn't work. Perhaps someone knows what the issue might be ?
I also tried to stop the selector before running another one but no luck.
template.bindGeometrySelector("Select curve you want to edit",
allow_drag=False,
quick_select=True,
auto_start=False,
use_existing_selection=False,
consume_selection=False,
secure_selection=hou.secureSelectionOption.Ignore,
geometry_types=,
name="curve_select")
template.bindGeometrySelector("Edit the curve",
allow_drag=False,
quick_select=True,
auto_start=False,
use_existing_selection=False,
consume_selection=True,
secure_selection=hou.secureSelectionOption.Ignore,
geometry_types=,
name="curve_edit")
self.scene_viewer.triggerStateSelector(hou.triggerSelectorAction.Start, name='curve_select')
...
self.scene_viewer.triggerStateSelector(hou.triggerSelectorAction.Start, name='curve_edit')
If I bind those selectors to a keyboard event like one when pressing ctrl E and another ctrl+T, it works but if I use just ctrl+E and call second selector after first one it doesn't work. Perhaps someone knows what the issue might be ?
I also tried to stop the selector before running another one but no luck.
template.bindGeometrySelector("Select curve you want to edit",
allow_drag=False,
quick_select=True,
auto_start=False,
use_existing_selection=False,
consume_selection=False,
secure_selection=hou.secureSelectionOption.Ignore,
geometry_types=,
name="curve_select")
template.bindGeometrySelector("Edit the curve",
allow_drag=False,
quick_select=True,
auto_start=False,
use_existing_selection=False,
consume_selection=True,
secure_selection=hou.secureSelectionOption.Ignore,
geometry_types=,
name="curve_edit")
self.scene_viewer.triggerStateSelector(hou.triggerSelectorAction.Start, name='curve_select')
...
self.scene_viewer.triggerStateSelector(hou.triggerSelectorAction.Start, name='curve_edit')
HDK : Multi output 2026年10月26日10:28
Hey Umang_Raj. Thank you for clarification. I appreciate it.
HDK : Multi output 2026年10月25日13:16
So I made it working. Not sure that is the right way though.
In a header file we declare
GU_DetailHandle cookMySopOutput(OP_Context& context, int outputidx, SOP_Node* interests) override;
Also we declare some struct to use later for the second output
struct point_data
{
UT_Vector3 pos;
fpreal total_length;
};
private:
UT_Array<point_data> point_data;
All logic happens in cookMySop and I keep values in point_data variable.
Then in
GU_DetailHandle SOP_groom_segmentation_data::cookMySopOutput(OP_Context& context, int outputidx, SOP_Node* interests)
{
GU_DetailHandle handle;
...
if (outputidx == 1)
{
some logic here where using variable from main cook.
}
Is it okay to use if (outputidx == 1) ? And is it safe to keep and use point_data variable in this case ? Can someone confirm ?
Is this the legit way of doing it in general ?
In a header file we declare
GU_DetailHandle cookMySopOutput(OP_Context& context, int outputidx, SOP_Node* interests) override;
Also we declare some struct to use later for the second output
struct point_data
{
UT_Vector3 pos;
fpreal total_length;
};
private:
UT_Array<point_data> point_data;
All logic happens in cookMySop and I keep values in point_data variable.
Then in
GU_DetailHandle SOP_groom_segmentation_data::cookMySopOutput(OP_Context& context, int outputidx, SOP_Node* interests)
{
GU_DetailHandle handle;
...
if (outputidx == 1)
{
some logic here where using variable from main cook.
}
Is it okay to use if (outputidx == 1) ? And is it safe to keep and use point_data variable in this case ? Can someone confirm ?
Is this the legit way of doing it in general ?