Found 53 posts.
Search results Show results as topic list.
Technical Discussion » Python SOP equivalent to GU_Detail::addMessage()?
- jrcooper
- 59 posts
- Offline
Well, trying to implement a derived class of SOP_Node using inlinecpp didn't work. The gotcha is that derived classes are required to implement cookMySop(), which fails to compile, and probably for good reason. There is no way that I can think of to wrap SOP_Node such that its (wrapped) cookMySop() implementation results in the python SOP's Code section being executed properly.
Technical Discussion » Python SOP equivalent to GU_Detail::addMessage()?
- jrcooper
- 59 posts
- Offline
Actually, after looking at some of my C++ SOP node code, I think what I really want is for the SOP_Node::addMessage() member function to be exposed on hou.SopNode objects.
I can't add it via inlinecpp because SOP_Node::addMessage() is a protected member function and therefore only available to derived C++ classes.
Though maybe I can create a derived class with inlinecpp and use that…
Still, it would be nice to have hou.SopNode simply implement addMessage() so that I don't have to.
I can't add it via inlinecpp because SOP_Node::addMessage() is a protected member function and therefore only available to derived C++ classes.
Though maybe I can create a derived class with inlinecpp and use that…
Still, it would be nice to have hou.SopNode simply implement addMessage() so that I don't have to.
Technical Discussion » Python SOP equivalent to GU_Detail::addMessage()?
- jrcooper
- 59 posts
- Offline
Well, investigating that idea has led me to realize that GU_Detail::addMessage() does not actually do what I thought it did (which was to allow adding general message text without associating it with a specific warning or error code).
I guess there is no such functionality at all in Houdini. Ignore this thread! Sorry.
I guess there is no such functionality at all in Houdini. Ignore this thread! Sorry.
Technical Discussion » Python SOP equivalent to GU_Detail::addMessage()?
- jrcooper
- 59 posts
- Offline
Unfortunately, neither of those do what GU_Detail::addMessage() does. I need functionality equivalent to addMessage().
Technical Discussion » Python SOP equivalent to GU_Detail::addMessage()?
- jrcooper
- 59 posts
- Offline
So if I am implementing a SOP in python (instead of C++), what is the python equivalent to the GU_Detail::addMessage() member function?
I know that I can raise hou.NodeError or hou.NodeWarning to get the equivalent behavior of GU_Detail::addError() and GU_Detail::addWarning() respectively, but I can't seem to find anything for simply adding informational message text.
I know that I can raise hou.NodeError or hou.NodeWarning to get the equivalent behavior of GU_Detail::addError() and GU_Detail::addWarning() respectively, but I can't seem to find anything for simply adding informational message text.
Technical Discussion » opmenu is smarter than hou.Parm.parmTemplate()
- jrcooper
- 59 posts
- Offline
If I have a string parameter that uses a menu script to turn it into a dropdown menu, opmenu -l properly returns the item/label pairs. However, the documented python equivalent/replacement for opmenu (hou.MenuParmTemplate) can't apply here because the hou.Parm.parmTemplate() method returns an object of type hou.StringParmTemplate, not hou.MenuParmTemplate, and the menuItem() and menuLabel() methods return empty tuples as a result.
This makes opmenu quite a bit smarter than the hou.ParmTemplate system since it seems to be able to figure out that such string parms are actually menu parms with items and labels.
Is there any ETA on when the hou.Parm.parmTemplate() method will be smart enough to return a hou.MenuParmTemplate object under these conditions?
This makes opmenu quite a bit smarter than the hou.ParmTemplate system since it seems to be able to figure out that such string parms are actually menu parms with items and labels.
Is there any ETA on when the hou.Parm.parmTemplate() method will be smart enough to return a hou.MenuParmTemplate object under these conditions?
Technical Discussion » SOP geometry getting cleared by TimeShift?
- jrcooper
- 59 posts
- Offline
Okay, hopefully I can adequately explain the scenario that is puzzling me. I have a SOP node that generates geometry. It takes no inputs, and therefore is a pure generator. It assumes that unless certain internal conditions are met, that the geometry it generated during its last cook is still in the Detail when it cooks again.
However, this is not always the case. For instance, if the user toggles the bypass flag, Houdini will clear out the geometry that is cached in my node. I can detect this by implementing SOP_Node::bypassMe(). However, I also notice that if I attach a TimeShift SOP after my generator SOP and put the display flag on it, my SOP's geometry gets wiped out from underneath it.
If there is a virtual function like bypassMe() that is called when Houdini goes and does this, I'd love to know about it so that I can update my SOP's internal state flags and force it to regenerate its geometry on the next cook. So my question is two-fold:
(1) What is going on when Houdini encounters a TimeShift in the network chain? I mean, aside from passing an appropriately time-shifted context to my SOP, what else is going on behind the scenes that I need to know about?
(2) Is there a virtual callback function (like bypassMe) that I can implement in my SOP to detect that the Detail has been wiped out?
However, this is not always the case. For instance, if the user toggles the bypass flag, Houdini will clear out the geometry that is cached in my node. I can detect this by implementing SOP_Node::bypassMe(). However, I also notice that if I attach a TimeShift SOP after my generator SOP and put the display flag on it, my SOP's geometry gets wiped out from underneath it.
If there is a virtual function like bypassMe() that is called when Houdini goes and does this, I'd love to know about it so that I can update my SOP's internal state flags and force it to regenerate its geometry on the next cook. So my question is two-fold:
(1) What is going on when Houdini encounters a TimeShift in the network chain? I mean, aside from passing an appropriately time-shifted context to my SOP, what else is going on behind the scenes that I need to know about?
(2) Is there a virtual callback function (like bypassMe) that I can implement in my SOP to detect that the Detail has been wiped out?
Technical Discussion » H12 HDK equivalent to GB_Detail::mergeGroup() functions?
- jrcooper
- 59 posts
- Offline
Awesome!
Will the new build include the mergeGroup() functions as well? There were originally three in the mergeGroup* family of functions, so to speak:
GB_Detail::mergeGroup(const GB_Detail&, const GB_PointGroup&, int);
GB_Detail::mergeGroup(const GB_Detail&, const GB_PrimitiveGroup&, int);
GB_Detail::mergeGroups(const GB_Detail&, int);
The first two are actually more important to me for my SOP than the third.
Will the new build include the mergeGroup() functions as well? There were originally three in the mergeGroup* family of functions, so to speak:
GB_Detail::mergeGroup(const GB_Detail&, const GB_PointGroup&, int);
GB_Detail::mergeGroup(const GB_Detail&, const GB_PrimitiveGroup&, int);
GB_Detail::mergeGroups(const GB_Detail&, int);
The first two are actually more important to me for my SOP than the third.
Technical Discussion » H12 HDK equivalent to GB_Detail::mergeGroup() functions?
- jrcooper
- 59 posts
- Offline
If the source and destination geometries are the same, is there any reason this wouldn't work also?
dest_group->addRange(GA_Range(*src_group));
dest_group->addRange(GA_Range(*src_group));
Technical Discussion » H12 HDK equivalent to GB_Detail::mergeGroup() functions?
- jrcooper
- 59 posts
- Offline
Thank you for the code snippet. One question though. Where is src_range supposed to come from in the expression:
GA_Iterator it(GA_Range(*src_range))
Was that supposed to be src_group?
Thanks!
GA_Iterator it(GA_Range(*src_range))
Was that supposed to be src_group?
Thanks!
Technical Discussion » H12 HDK equivalent to GB_Detail::mergeGroup() functions?
- jrcooper
- 59 posts
- Offline
The HDK porting guide doesn't describe any methodology for doing what the old GB_Detail::mergeGroup() and GB_Detail::mergeGroups() functions used to do. And there don't seem to be any equivalent functions. How do we now copy/merge groups from one Detail to another (GA_ElementGroup::copyMembership() only seems to work between groups within the same Detail).
Thanks!
Thanks!
Technical Discussion » How do I save bgeos in the older geo format from H12 HDK?
- jrcooper
- 59 posts
- Offline
Technical Discussion » How do I save bgeos in the older geo format from H12 HDK?
- jrcooper
- 59 posts
- Offline
When I use the GU_Detail::save() function without specifying any options, H12 writes out bgeos in the new format. How can I get my H12 plugin to write out bgeos in the previous format?
-
- Quick Links