Jump to content

GA_FOR_ALL_PRIMGROUPS not picking up my groups


Recommended Posts

Hi, I'm having a small problem trying to process multiple groups. I've created some groups both with my own code and with the standard group node, but my second node is not picking them up. I'm sure the created groups are primgroups. This is my code inside of the cook method:

//Try 1
	GA_PrimitiveGroup *grp;
	GA_FOR_ALL_PRIMGROUPS(gdp, grp)
	{
		int i = 0; //Breakpoint here
	}

//Try 2
	GA_PrimitiveGroup *polyMeshGroup = gdp->findPrimitiveGroup("polymesh");

	if (polyMeshGroup == NULL)
	{
		addError(SOP_MESSAGE, "No polymesh groups found to build structures.");
		return error();
	}

Is there something else I need to process before I can access the groups inside the detail?

Link to comment
Share on other sites

I've posted this on the sidefx forums as well. I misunderstood what the gdp contained at the beginning of the cook. The gdp holds the previous cook, not the first input, so I had to do a duplicateSource to get it to register.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...