Have been doing some plugin development recently and was getting frustrated with the loop of edit SVG -> regen CPP -> copy in needed edits by hand -> preview in Rack. Particularly since the green/red/blue circles for components were hard for me to visualize what they would look like.
So I wrote another script: https://github.com/xaviershay/vitamin-vcv-modules/blob/master/create_module.rb It’s still pretty janky but I’ve found it useful so thought I’d share.
- Rather than rewrite the entire CPP file, it creates comment blocks and only rewrites code within them: Example: https://github.com/xaviershay/vitamin-vcv-modules/blob/master/src/Bypass.cpp#L206
- Can set widget class name in SVG metadata.
- Works off groups or circles, meaning you can use the actual widgets in your components layer as long as they have at least one circle in them.
Things it doesn’t do:
- Initial plugin setup, rewriting JSON file etc… I’d recommend running helper.py createmodule first, then deleting the CPP file and using this Ruby script.
Anyway, hope it’s useful to someone,