Just like Swap Libraries, but for variables.
Run it from the Quick Actions or Plugin menu. Select some layers, choose source and destination variable collections and hit Swap button.
You can choose the scope for plugin: selection, current page, all pages, local styles or links in local variables (aka aliases)ⁿᵉʷ.
After all, you may see some error. Click on them to focus viewport on problematic objects.
Swap Variables will display all local and enabled external variable collections that actually contains variables.
When you swap these collections, plugin will recursively find every used variable, then check two things:
- variable exists in source collection,
- destination collection containt variable with same group and name.
After the plugin ends its job, it will display known ecnountered errors below Swap button.
- If you modified external libraries, reload file to apply changes.
- Plugin doesn't swap styles. Use Swap Libraries instead.
- Plugin can't swap strokes in section. That’s not supported by Figma API yet. Do it manually instead.
- It may take some time to parse and swap variables when there're to many nodes or variables. Take a break and make some tea.
I accept feature suggestions and ideas to improve the plugin. No need to mess with hidden layers? Useful exceptions? If you have any ideas or issues, let me know in the comments.
Alternatively you can contact me via e-mail at nikita.denisov@vk.team and Telegram.
