Examples to copy some style keys from one selected objet to another.
List of macro defined here Project/Sources/FormMacros.json
- FormMacro allow to share some functions between macro classes
- StyleMacro allow to share some functions about style.
CopyStyle copy selected object style into pasteboard using JSON format.
Not all style keys are copyed, a list of keys is here in code. More could be added, see todo (like background color...)
PasteStyle get the style from pasteboard and apply to the selected element
SaveStyle, select an object and provide a name to the style. It will saved in a share file (Folder:C1567(fk user preferences folder).file("styleMacro.json")
) ad you could use later with next macro.
LoadStyle: select an object and launch the macro. A menu will be shown to select one of the saved style to apply.
- Apply the style to a list of selected elements (easy, you could PR if you implement it, my other macro do it)
- More style keys
- Instead of settings null, unset when pasting style if not defined