Styles

Style Nodes

Styles are defined by python dataclasses in the styles.py. Data in these classes will be used to update Molecular Nodes Styles. They can be updtes with custom styles by overriding one or more of the fields.

# dev note: the data is types and immutable
class BallStickStyle():
    quality: int = 2
    as_mesh: bool = True
    sphere_radii: float = 0.3
    bond_split: bool = False
    bond_find: bool = False
    bond_radius: float = 0.3
    color_blur: bool = False
    shade_smooth: bool = True

from dataclasses import replace
bs = replace(BallStickStyle(), "bond_radius" = 10)
bs = replace(BallStickStyle(), **{"bond_radius": 10, "sphere_radii" = 10})