sibarrick Posted April 16, 2006 Share Posted April 16, 2006 Sorry more questions, I'm trying to add the ability to hide primitive groups into my sop. And I need a few pointers. Here's how I'm going about this at the moment, not sure if I'm even approaching this correctly. I've made my sop by inheriting from the visibility sop class SOP_mySOP : public SOP_Visibility I've also created some private member function and data that create what I'm guessing the visibilty sop needs in order to function GB_PrimitiveGroup *myGroup; GU_DetailGroupPair myDetailGroupPair; int HIDE_OR_EXPOSE() { return HIDE; } int SEL_OR_NONSEL() { return SELECTED; } int THREE_D_OR_TWO_D() { return TWO_D_AND_THREE_D; } int CUMULATIVE() { return false; } I don't use parameters because I always want it to do the same thing, which is hide non-selected prims. In my cook method I set myGroup and myDetailGroupPair to sensible values. Then I call performVisibility(HIDE_OR_EXPOSE()); Now my problem is that no matter what I set myGroup and myDetailGroupPair too it always hides the entire gdp. I'm a little confused as to the difference between myGroup and myDetailGroupPair since both require a group but I've tried setting both to a pointer to my group I want to hide and neither have any effect. Am I going about this right? any help much apprieciated as always. Quote Link to comment Share on other sites More sharing options...
George Posted April 16, 2006 Share Posted April 16, 2006 Hi Simon, I think this is actually much easier than that. Houdini picks up a special group named "__3d_hidden_primitives__" and doesn't display prims in that group. Look in GU_Types.h for GU_HIDDEN_3D_PRIMS_GROUP define and use that to add primitives to it. I think that's all you need to do to hide primitives. (The 2D visibility one is to hide primitives from the UV viewport). Hope that helps, George. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted April 16, 2006 Author Share Posted April 16, 2006 Cool, I'll check it out. The first thing I tried was making a group called 3d_hidden_primitives just using a normal group sop, just to see if that would work, which it didn't of course. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted April 16, 2006 Author Share Posted April 16, 2006 Cool, I'll check it out.The first thing I tried was making a group called 3d_hidden_primitives just using a normal group sop, just to see if that would work, which it didn't of course. 26546[/snapback] Sorted! nice one. 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.