In Sketch, we are already given the overrideProperties that can be overridden by Symbolinstances. Therefore, these OverrideProperties can be mapped relatively directly.
The following image is a sample SymbolMaster from Sketch's JSON

For each overrideProperty, we have access to the overrideName and canOverride.
Firstly, Parabeac-Core shall only convert override properties with canOverride set to `true.
Secondly, we need to extract some information from the overrideName.
- The first thing we need is the UUID of the overridable element. This is the String to the left of the
_(underscore). This string will be mapped to the UUID property of the PBDLOverrideProperty
- The second thing we need is the type of the overridable property. This is the String to the right of the
_(underscore). This string will be used to determine the type of overridable property.
Thirdly, for each OverrideProperty, we need to perform a lookup to find the default value of the property. This can be done by traversing the layers of the symbol master and finding the UUID that matches the UUID inside of overrideName (discussed above). This will allow us to populate the properties value for each overridableProperty.
In Sketch, we are already given the
overridePropertiesthat can be overridden by Symbolinstances. Therefore, theseOverridePropertiescan be mapped relatively directly.The following image is a sample SymbolMaster from Sketch's JSON
For each
overrideProperty, we have access to theoverrideNameandcanOverride.Firstly, Parabeac-Core shall only convert override properties with
canOverrideset to `true.Secondly, we need to extract some information from the
overrideName._(underscore). This string will be mapped to theUUIDproperty of thePBDLOverrideProperty_(underscore). This string will be used to determine the type of overridable property.Thirdly, for each
OverrideProperty, we need to perform a lookup to find the default value of the property. This can be done by traversing thelayersof the symbol master and finding the UUID that matches the UUID inside ofoverrideName(discussed above). This will allow us to populate thepropertiesvalue for each overridableProperty.