(
    paint, property_path, is_color=False, is_expression=False, can_interpolate=False, default=None, take=None
)
return properties
Returns a list of properties (defined by name, zoom_level, value and is_qgis_expr)
    If stops are defined, multiple properties will be in the list. One for each zoom-level defined by the stops.
    If no stops are defined, only a single property (for zoom_level None) will be added to the list.
    :param paint: The paint object (according to the Mapbox GL Style spec)
    :param property_path: The path to the property, delimited by a forward-slash. E.g. 'paint/fill-color'
    :param is_color: True if the property defines a color, like fill-color, line-color, etc.
    :param is_expression: True if the value represents a qgis expression
    :param can_interpolate:
    :param default:
    :param take:
    :return:
Returns a list of properties (defined by name, zoom_level, value and is_qgis_expr)
    If stops are defined, multiple properties will be in the list. One for each zoom-level defined by the stops.
    If no stops are defined, only a single property (for zoom_level None) will be added to the list.
    :param paint: The paint object (according to the Mapbox GL Style spec)
    :param property_path: The path to the property, delimited by a forward-slash. E.g. 'paint/fill-color'
    :param is_color: True if the property defines a color, like fill-color, line-color, etc.
    :param is_expression: True if the value represents a qgis expression
    :param can_interpolate:
    :param default:
    :param take:
    :return:
Returns a list of properties ( defined by name zoom_level value and is_qgis_expr ) If stops are defined multiple properties will be in the list . One for each zoom - level defined by the stops . If no stops are defined only a single property ( for zoom_level None ) will be added to the list . : param paint : The paint object ( according to the Mapbox GL Style spec ) : param property_path : The path to the property delimited by a forward - slash . E . g . paint / fill - color : param is_color : True if the property defines a color like fill - color line - color etc . : param is_expression : True if the value represents a qgis expression : param can_interpolate : : param default : : param take : : return :
def get_properties_values_for_zoom(
    paint, property_path, is_color=False, is_expression=False, can_interpolate=False, default=None, take=None
):
    """
    Returns a list of properties (defined by name, zoom_level, value and is_qgis_expr)
    If stops are defined, multiple properties will be in the list. One for each zoom-level defined by the stops.
    If no stops are defined, only a single property (for zoom_level None) will be added to the list.
    :param paint: The paint object (according to the Mapbox GL Style spec)
    :param property_path: The path to the property, delimited by a forward-slash. E.g. 'paint/fill-color'
    :param is_color: True if the property defines a color, like fill-color, line-color, etc.
    :param is_expression: True if the value represents a qgis expression
    :param can_interpolate:
    :param default:
    :param take:
    :return:
    """

    if (is_color or is_expression) and can_interpolate:
        raise RuntimeError("Colors and expressions cannot be interpolated")

    value, property_name = _get_property_value(obj=paint, property_path=property_path)

    stops = None
    if value is not None:
        stops = _get_value_safe(value, "stops")
    else:
        value = default
    properties = []
    if stops:
        base = _get_value_safe(value, "base")
        if not base:
            base = 1
        stops_to_iterate = stops
        if can_interpolate:
            stops_to_iterate = stops[:-1]

        for index, stop in enumerate(stops_to_iterate):
            is_qgis_expr = is_expression
            lower_zoom = stop[0]
            value = stop[1]
            if is_color:
                value = parse_color(value)
            if is_expression:
                value = _parse_expr(value, take=take)
            if can_interpolate:
                is_qgis_expr = True
                next_stop = stops[index + 1]
                upper_zoom = next_stop[0]
                second_value = next_stop[1]
                value = (
                    f"interpolate_exp(get_zoom_for_scale(@map_scale), {base}, {int(lower_zoom)}, {int(upper_zoom)}, "
                    f"{value}, {second_value})"
                )
            properties.append(
                {"name": property_name, "zoom_level": int(lower_zoom), "value": value, "is_qgis_expr": is_qgis_expr}
            )
    elif value is not None:
        if is_color:
            value = parse_color(value)
        if is_expression:
            value = _parse_expr(value, take=take)
        properties.append({"name": property_name, "zoom_level": None, "value": value, "is_qgis_expr": is_expression})
    return properties
def get_properties_values_for_zoom ( paint , property_path , is_color = False , is_expression = False , can_interpolate = False , default = None , take = None ) : if ( is_color or is_expression ) and can_interpolate : raise RuntimeError ( "Colors and expressions cannot be interpolated" ) value , property_name = _get_property_value ( obj = paint , property_path = property_path ) stops = None if value is not None : stops = _get_value_safe ( value , "stops" ) else : value = default properties = [ ] if stops : base = _get_value_safe ( value , "base" ) if not base : base = 1 stops_to_iterate = stops if can_interpolate : stops_to_iterate = stops [ : - 1 ] for index , stop in enumerate ( stops_to_iterate ) : is_qgis_expr = is_expression lower_zoom = stop [ 0 ] value = stop [ 1 ] if is_color : value = parse_color ( value ) if is_expression : value = _parse_expr ( value , take = take ) if can_interpolate : is_qgis_expr = True next_stop = stops [ index + 1 ] upper_zoom = next_stop [ 0 ] second_value = next_stop [ 1 ] value = ( f"interpolate_exp(get_zoom_for_scale(@map_scale), {base}, {int(lower_zoom)}, {int(upper_zoom)}, " f"{value}, {second_value})" ) properties . append ( { "name" : property_name , "zoom_level" : int ( lower_zoom ) , "value" : value , "is_qgis_expr" : is_qgis_expr } ) elif value is not None : if is_color : value = parse_color ( value ) if is_expression : value = _parse_expr ( value , take = take ) properties . append ( { "name" : property_name , "zoom_level" : None , "value" : value , "is_qgis_expr" : is_expression } ) return properties