Jump to content

Connectivity and Foreach problem


logix1390

Recommended Posts

Hi everyone,

I stumbled across a small problem. I have a few basic assets with geometry copied onto the points .

I want to run a foreach on these assets and be able to see the asset as a whole so that I can manipulate it.

However, the foreach only reveals only one part of that asset (the geometry copied onto the points of that particular asset). I understand that the connectivity is separating each connected geometry and giving it an attribute called "class", which makes sense.

but in this situation I would like to view the asset as a whole (including the copied geo) inside the foreach. 

I have attached my scene file if you want to take a quick look.

Thank you!

grouping_connectivity_problem.hip

Link to comment
Share on other sites

i would discourage you from using old style of for each loops (the one where you have to dive inside the node). it is a legacy feature and is not developed any longer. the new one is much more straightforward anyway even if it takes some time to get used to the different approach.

in any case, you can always put a template flag at null (or any node) after your loop and look at that while working with the nodes inside of the loop (so you can see both at the same time). you can change the way how template geometry is displayed (in Display options) if default display style is not what you want (press D when hovering mouse over the viewport)

Edited by davpe
Link to comment
Share on other sites

sry for stating the obvious... you never know :) anyway, I suggest you using a new looping method with a template flag. that's what you want. with the old looping method, use two scene views. one with a pin outside of the loop.

Link to comment
Share on other sites

I'm not sure about what you are trying to do ?

the foreach is behaving as expected, you've got access to each set of connected primitives at a time.

If you want to work on the whole "asset" (just confirming we are talking about 'torus + boxes' or 'boxes + spheres', anything coming out of the ASSET_MDL) you have to define your class attribute per asset, not per set of connected primitives.
Add an attribwrangler set on primitive mode before each one of your black nulls and define a class attribute manually per asset: @class = 0; // or @class = 1; etc,

But in that case I don't understand why you want to go through a foreach approach and not do your operations before the merge.

Link to comment
Share on other sites

Thank you iamyog. That is exactly what I am trying to do. I need a class attribute for the whole asset (Torus+boxes etc..) I will try this method.

I am basically trying to make a procedural village and have come across this problem.

Thanks again.

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...