AndrewVK Posted September 9, 2004 Share Posted September 9, 2004 It is my first SOP (and my first C++ programm as well) so be indulgent pls. Just want to know "what is good...what is wrong...what is possible to make easier" This sop not finished yet. Still have no idea how to perform "Custom Variable Mapping" Look at example file to understand what i mean. solveXform function looks too complex as well...i`m sure it is possible to make easier. Project.zip Quote Link to comment Share on other sites More sharing options...
edward Posted September 10, 2004 Share Posted September 10, 2004 Very cool! Looks like you've got most of it figured out to me. Some very minor points: - OP_3PArcOperator is not needed. Very seldom does anyone need to derive from OP_Operator - UTaddWarning ... Instead of 46, you could also #include <GU/GU_Error.h> and use GU_WARNING_NEWORDER instead - When calling boss->opStart(), the user may have already hit the escape key so the code usually looks like this: if (boss->opStart("Building Arc")) { // do algorithm here // periodically check if boss->opInterrupt() returns true in which case // the user hit the escape key so quit } boss->opEnd() - The parameter accessors done that way are error prone. Yes, I know the HDK examples do them that way. The less error prone way is to use the parameter token. eg. float P1X(float t) { return evalFloat("p1", 0, t); } As for the attributes, you can just use GEO_Detail::addVariableName(). The first parameter is the attribute name, and the second parameter is the name you which to use as the local variable name. These mean exactly what you would put in an AttribCreate SOP. Cheers! Quote Link to comment Share on other sites More sharing options...
AndrewVK Posted September 10, 2004 Author Share Posted September 10, 2004 Hey Edward! Thank You for help!!! Just one question. What should i do to interact with new html help system? Quote Link to comment Share on other sites More sharing options...
edward Posted September 10, 2004 Share Posted September 10, 2004 You have to write helpcards for them and put it in the appropriate place. Quote Link to comment Share on other sites More sharing options...
AndrewVK Posted September 13, 2004 Author Share Posted September 13, 2004 I hope its ok now Reupploaded 24.09.2004 ( SolveLine bug fixed :coffee1: ) 3PArc.zip 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.