[Sidefx-houdini-list] Group edit prim wrangle

robert east east.robert at gmail.com
Wed Jan 25 15:22:34 EST 2017


Thanks thats perfect guys, that code is going straight into the notebook

Rob

On Thu, Jan 26, 2017 at 12:30 AM, Andy Nicholas <andy at andynicholas.com>
wrote:

> Hi Rob,
> I’ve just modified what Tim wrote (apologies for hijacking your code like
> this Tim!) to do something slightly different. This basically does a group
> ‘promote’ inside the primitive wrangle which was my understanding of what
> you’re after?
>
> You need to leave the top “Group” parameter empty, then press the button
> on the right of the VEX code to create the “Point Group” and “New Prim
> Group” parameters. The “Point Group” parameter is the group of the points
> that you wish to convert to the primitive group whose name is given by “New
> Prim Group” parameter.
>
>
> int i,v,p;
>
> i=0;
> v = primvertex(0, at primnum,i);
>
> while(v>=0){
>
>     p = vertexpoint(0,v);
>     if(inpointgroup(0,chs("point_group"),p))
>     {
>         setprimgroup(0, chs("new_prim_group"), @primnum, 1);
>     }
>     i++;
>     v = primvertex(0, at primnum,i);
> }
>
>
> Cheers,
> A
>
>
>
> > On 25 Jan 2017, at 02:11, Tim Fagan <Tim.Fagan at al.com.au> wrote:
> >
> > You could create a new group from those prims?  Here's a go:
> >
> > int i,v,p;
> >
> > i=0;
> > v = primvertex(0, at primnum,i);
> >
> > while(v>=0){
> >
> >        p = vertexpoint(0,v);
> >        setpointgroup(0, "someNewGroup", p, 1, "set");
> >        i++;
> >        v = primvertex(0, at primnum,i);
> >
> >    }
> >
> > Just set the group field on the wrangle to the prim group
> >
> > Tim
> >
> > ________________________________________
> > From: sidefx-houdini-list-bounces at sidefx.com <
> sidefx-houdini-list-bounces at sidefx.com> on behalf of Olex P <
> hoknamahn at gmail.com>
> > Sent: 25 January 2017 13:03
> > To: sidefx-houdini-list at sidefx.com
> > Subject: Re: [Sidefx-houdini-list] Group edit prim wrangle
> >
> > Hi,
> >
> > I guess conversion in VEX is not possible as it can only create but not
> > promote / delete the groups. If there is a primitive group and a wrangle
> > creates a point one with the same name (using setpointgroup() or
> > @group_name) you will end up with two groups with the same name.
> >
> > On Wed, Jan 25, 2017 at 1:47 AM, robert east <east.robert at gmail.com>
> wrote:
> >
> >> Hi All ,
> >>           Is it possible in a prim wrangle to convert  group from points
> >> to prim. ? .Even though the wrangle is set to run over prims ? .
> >>
> >> Regards
> >>
> >> Rob
> >> _______________________________________________
> >> 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
> > --
> > Tim Fagan
> > Digital Artist
> >
> > T: +61 2 9383 4800 (main)
> > D: +61 2 938 34853 (direct)
> > E: Tim.Fagan at al.com.au
> >
> > Bld 54/FSA #19, Fox Studios Australia
> > 38 Driver Ave
> > Moore Park, NSW 2021
> > AUSTRALIA
> >
> >  [LinkedIn] <https://www.linkedin.com/company/animal-logic>
>  [Facebook] <https://www.facebook.com/Animal-Logic-129284263808191/>
>  [Twitter] <https://twitter.com/AnimalLogic>   [Instagram] <
> https://www.instagram.com/animallogicstudios/>
> >
> > [Animal Logic]<http://www.animallogic.com>
> >
> > www.animallogic.com<http://www.animallogic.com>
> >
> > CONFIDENTIALITY AND PRIVILEGE NOTICE
> > This email is intended only to be read or used by the addressee. It is
> confidential and may contain privileged information. If you are not the
> intended recipient, any use, distribution, disclosure or copying of this
> email is strictly prohibited. Confidentiality and legal privilege attached
> to this communication are not waived or lost by reason of the mistaken
> delivery to you. If you have received this email in error, please delete it
> and notify us immediately by telephone or email.
> > _______________________________________________
> > 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
>



-- 
Robert East
Home
Sydney Australia
 Tel +61 (0)424648857



More information about the Sidefx-houdini-list mailing list