logix1390 Posted January 6, 2017 Share Posted January 6, 2017 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 Quote Link to comment Share on other sites More sharing options...
woodenduck Posted January 6, 2017 Share Posted January 6, 2017 Pin your viewport before entering the foreach. It's the leftmost icon above where you select your camera. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 6, 2017 Share Posted January 6, 2017 Either as Woodenduck says, pin your Scene View. Or you can use the new for each loop and just preview the End Block. Quote Link to comment Share on other sites More sharing options...
logix1390 Posted January 6, 2017 Author Share Posted January 6, 2017 (edited) Thats not exactly the issue here.. I need to be able to manipulate the geometry inside the foreach after I merge all the assets together. Edited January 6, 2017 by logix1390 Quote Link to comment Share on other sites More sharing options...
davpe Posted January 6, 2017 Share Posted January 6, 2017 (edited) 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 January 6, 2017 by davpe Quote Link to comment Share on other sites More sharing options...
logix1390 Posted January 6, 2017 Author Share Posted January 6, 2017 davpe I know how to template geometry lol. I am trying to manipulate the geometry inside the foreach... but not just one part of the geometry as you can see in the file. Quote Link to comment Share on other sites More sharing options...
davpe Posted January 6, 2017 Share Posted January 6, 2017 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. Quote Link to comment Share on other sites More sharing options...
iamyog Posted January 6, 2017 Share Posted January 6, 2017 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. Quote Link to comment Share on other sites More sharing options...
logix1390 Posted January 6, 2017 Author Share Posted January 6, 2017 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.