You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
ivan-015
changed the title
Convert Sketch SymbolMaster into PBDLSharedMasterNode
Convert Sketch SymbolMaster overrideProperties into PBDLOverrideProperties
Jul 13, 2021
In Sketch, we are already given the
overrideProperties
that can be overridden by Symbolinstances. Therefore, theseOverrideProperties
can be mapped relatively directly.The following image is a sample SymbolMaster from Sketch's JSON
For each
overrideProperty
, we have access to theoverrideName
andcanOverride
.Firstly, Parabeac-Core shall only convert override properties with
canOverride
set to `true.Secondly, we need to extract some information from the
overrideName
._
(underscore). This string will be mapped to theUUID
property 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 thelayers
of the symbol master and finding the UUID that matches the UUID inside ofoverrideName
(discussed above). This will allow us to populate theproperties
value for each overridableProperty.The text was updated successfully, but these errors were encountered: