[Sidefx-houdini-list] HOM evaluating wildcards in a parameter

jon parker parker.jon at gmail.com
Tue Nov 30 18:35:04 EST 2010


Whaddya know, the docs show an example that is almost exactly what I'm
looking for.  Thanks for the tip!
-JP

On Tue, Nov 30, 2010 at 5:18 PM, Graham Thompson <captainhammy at gmail.com> wrote:
> There is some pattern matching available but mostly just through
> various glob functions.  There is a hou.Geometry.findPointGroup() but
> that only searches for exact names, not wildcards.  What you can do in
> Houdini 11 is use the new inlinecpp functionality and write a quick
> wrapper around UT_String::MultiMatch.  If you look in the help docs
> the first example shows this.  You can then use a loop to process
> strings, group names, etc, and see if they match your pattern or not.
>
> http://www.sidefx.com/docs/houdini11.0/hom/extendingwithcpp
>
> For point groups:
>
> geo = hou.node(some_sop_node).geometry()
> pattern = "*stuff ^thingstuff"
> valid_groups = [group for group in geo.pointGroups() if
> mymodule.matchesPattern(group.name(), pattern)]
>
>
>
>
> On Tue, Nov 30, 2010 at 1:01 PM, jon parker <parker.jon at gmail.com> wrote:
>> I'd like to know if Houdini has any built in functions in Python for
>> expanding expressions such as for Point Group parms.  For example to
>> return a list of groups from a parameter like this:
>> "*stuff ^thingstuff"
>> Should get me a list of all groups that end in"stuff" except for one
>> called "thingstuff".  Is there any automatic way to do this?
>> Cheers,
>> Jon
>> _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



More information about the Sidefx-houdini-list mailing list