04-19-2022, 07:34 AM
I think what you're seeing is multiple tools in a set, which you can set up when initializing a tool.
The Tool sample project is a good example of that.
I just noticed that the Tool sample comments for group and set are swapped, based on what's in the header. If you wanted to add a second tool to this set, you'd initialize it something like this:
If you have multiple tools in your plugin, you'll probably want them to all be in the same group, even if they are not all "stacked" in the same set. If a users' toolbox is displayed in more than one column, having one tool in a group can result in a blank tool space displayed next to the actual one.
I hope this addresses your question. I'm sure others can add to or clarify this.
Code:
Tool(
const Tool& sameGroupAs_,
const Tool* const sameSetAs_,
const std::string& title_,
const std::string& tip_,
const IconResourceType iconType_,
const int16_t lightIconID_,
const int16_t darkIconID_,
const Options options_ = DefaultOptions
);
The Tool sample project is a good example of that.
Code:
this->__gearTool = hdi::core::Tool(
hdi::core::Tool(), // Not in same set as any other tool
NULL, // Not in same group as any other tool
"Sample Gear Tool",
"Sample Gear Tool - Used to generate simple gears",
hdi::core::IconResourceTypePNGI,
TS_GEAR_PNGI_RSRC_ID,
TS_GEAR_DARK_PNGI_RSRC_ID
);
I just noticed that the Tool sample comments for group and set are swapped, based on what's in the header. If you wanted to add a second tool to this set, you'd initialize it something like this:
Code:
this->__pivotTool = hdi::core::Tool(
this->__gearTool, // in same group as existing tool
&this->__gearTool, // in same set as other tool
"Pivot Tool", // title
"Pivot Tool companion to Gear Tool", // tool tip
etc.
If you have multiple tools in your plugin, you'll probably want them to all be in the same group, even if they are not all "stacked" in the same set. If a users' toolbox is displayed in more than one column, having one tool in a group can result in a blank tool space displayed next to the actual one.
I hope this addresses your question. I'm sure others can add to or clarify this.