doc Posted April 27, 2010 Share Posted April 27, 2010 gdp->normal(); creates normals as you would expect. the following doesn't work: const GU_Detail *r_gdp; r_gdp=inputGeo(1); r_gdp->normal(); I'm assuming this has something to do with r_gdp being a "copy" of the gdp from the second input. Is there a way around this? I could compute the normals with a facet before attaching it to the second input, but I'd like to do the calculation in the sop itself. This way I could insure that the user wasn't inputting "bad" normals. Many thanks Luca Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 27, 2010 Share Posted April 27, 2010 Hi, I think this might work for you: OP_ERROR duplicateSource (unsigned index, OP_Context &context, GU_Detail *gdp, int clean=1) Mark Quote Link to comment Share on other sites More sharing options...
doc Posted April 27, 2010 Author Share Posted April 27, 2010 I heard back from sidefx they told me that it's a bad idea to modify a const piece of geometry. here's what they recommended instead: UT_Vector3Array normals; r_gdp->normal(normals); seems to do the trick L Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 27, 2010 Share Posted April 27, 2010 I heard back from sidefx they told me that it's a bad idea to modify a const piece of geometry. :-) 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.