About   |   Getting Started   |   Downloads   |   Documentation   |   Forum


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tool groups shared among several plugins
10-26-2016, 08:48 PM
Post: #1
tool groups shared among several plugins
I'd like to put all (or at least many) of my tool plugins into one common group. I'll try the ThirdPartyPlugin approach if need be, but I fear it may get unnecessarily complicated since the plugins can exist in any combination and load in any order.

To specify a group in which to install my tools, I need to reference an existing tool. Between CORE and the Adobe SDKs, I can capture the tool number, tool handle, and tool name of another of my plugin tools and pass it on to plugins loading after it, but can't figure out how to create a CORE tool object based on any of them. I tried to use the tool number to coerce BuiltInTools to create it as a pseudo-Adobe tool, but that didn't work.

Are there any avenues I may have overlooked? Perhaps one or two more options for creating a tool could be a feature request, like creating one from the tool handle (like I often create CORE Art objects from AIArtHandles).

Thanks for any advice!
Find all posts by this user
Quote this message in a reply
10-26-2016, 09:03 PM
Post: #2
RE: tool groups shared among several plugins
There is already a variant of the hdi::core::Tool constructor that takes arguments for the tool numbers for the group/set in which the new tool should be placed. Your first plugin to load should create a Tool object via whichever constructor you prefer, and then subsequent plugins to load will need to acquire the tool number from the first plugin. They can then call the aforementioned Tool constructor, passing the tool number(s).
Find all posts by this user
Quote this message in a reply
12-19-2016, 08:14 PM (This post was last modified: 12-20-2016 05:37 PM by Rick Johnson.)
Post: #3
RE: tool groups shared among several plugins
Thanks, Garrett, it works beautifully!

Well, at least with the Xcode versions I start with--I'll know soon about Visual Studio. I made a small group of functions in their own namespace, which I include in tool projects as needed. It's baffling, though, that it works great in every build from CS6 through CC 2015.3. With CC 2017 I keep getting errors in hdicoreFiles.h for unknown type name 'mode_t' even though I use the same hdicoreFiles methods in my preferences and registration. I tried using the helper file with the Tool and Annotator samples (works in AI16-20), then adding all of the includes that the others had, with the same result. I'll keep experimenting, though. There's got to be a way...

To see what I'm referring to, it's easy to reproduce. Open the untouched AnnoSample from CORE 0.6.3 in Xcode. In "annoPlugin.h" add "#include "hdicoreFiles.h" and build for AI 21. You'll get two errors in "hdicoreFiles.h" for the two occurrences of the type mode_t. Build for any earlier release and it's fine, or add it to the .cpp file and it's fine (I've only referenced it from my .cpp files). As Spock would say, "Fascinating."
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)