stingalleman Posted May 18 Share Posted May 18 Hi, I managed to add buttons to the mode bar but I'd like to add a drop down and a text field like this: Anybody any idea? I've managed to found the function `vs.vstAddPDMenuMode()` but I think that's not what I am looking for. Thanks! Sting Quote Link to comment
JBenghiat Posted May 18 Share Posted May 18 I think you found it. You would then add items to the menu 1 Quote Link to comment
stingalleman Posted June 10 Author Share Posted June 10 On 5/18/2024 at 11:32 PM, JBenghiat said: I think you found it. You would then add items to the menu I however have a 2D path plugin, and not a tool plugin, so I'm pretty sure I cannot use vs.vst functions, right? Using that function does make a drop down menu appear in the mode bar, but it's not usable. I also cannot seem to be able to add more values to it. It also disappears when I place a 2d path. Screen Recording 2024-06-10 at 16.16.52.mov Quote Link to comment
stingalleman Posted June 12 Author Share Posted June 12 @Pat Stanforddo you have any idea how this works? You seem to be the master of everything 🙂 Quote Link to comment
Pat Stanford Posted June 12 Share Posted June 12 Unfortunately, no, I don't have any experience with these. There does not seem to be an equivalent option in the VSO (object) section of the function reference. However, since Plugin Objects generate their own basic Tool to allow them to insert from tool palettes, the VST commands might work. Or at least might be worth testing. Alternatively you could write a Tool that uses the VST calls and places your PIO. 1 Quote Link to comment
stingalleman Posted June 13 Author Share Posted June 13 Hi Pat, Thanks! Could you point me in the right direction for writing a tool that places my PIO? How would I go about creating a tool that uses a 2D path? I'm using python - is this even possible with that language? Also, I am trying to get buttons in the mode bar with `vs.AddRadioMode` but it seems like they disappear after the tool is used for the first time. Are there any examples or documentation about the mode bar options somewhere? Thank you Quote Link to comment
Pat Stanford Posted June 13 Share Posted June 13 Take a look at the following thread for a little information on Tool type PIOs. @Jesse Cogswell Anything to add to this thread? Quote Link to comment
JBenghiat Posted June 14 Share Posted June 14 Tools created with VS/Python have a lot of limitations — most of the complex tools you see require the SDK. The easiest way to have a tool with options is to call RunTempTool from a menu command: https://developer.vectorworks.net/index.php?title=VS:RunTempTool You CAN create an event-enabled tool, though the process requires a byte editor, so not very user-friendly: https://developer.vectorworks.net/index.php?title=VS:vstGetEventInfo. The event loop is almost identical to RunTempTool. 1 Quote Link to comment
Jesse Cogswell Posted June 14 Share Posted June 14 I've never used an external tool to place a 2D path plug-in, but I imagine that @JBenghiat's suggestion of using RunTempTool is the logical one to get a path. Then, you could use CreateCustomObjectN to drop in a plug-in instance and send the path made from RunTempTool to the path plug-in with SetCustomObjectPath. I can't really help much with RunTempTool, as I've never used it and the documentation is fairly dreadful and confusing. The only other thing that I will mention about using an external tool is that if there are other parameters you want the tool to pass on to the plug-in, add them to the tool. Then you can pass them forward to the placed plug-in with SetRField. 1 Quote Link to comment
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.