diff --git a/src/Classes/Drawers.gd b/src/Classes/Drawers.gd index 40994ed0d..ab22a445b 100644 --- a/src/Classes/Drawers.gd +++ b/src/Classes/Drawers.gd @@ -3,8 +3,8 @@ class_name Drawer class ColorOp: var strength := 1.0 - - + + func process(src: Color, _dst: Color) -> Color: return src diff --git a/src/Tools/Bucket.gd b/src/Tools/Bucket.gd index e9fc01ec0..059147517 100644 --- a/src/Tools/Bucket.gd +++ b/src/Tools/Bucket.gd @@ -48,6 +48,8 @@ func _on_PatternOffsetY_value_changed(value : float): func get_config() -> Dictionary: + if !_pattern: + return {} return { "pattern_index" : _pattern.index, "fill_area" : _fill_area, @@ -58,8 +60,9 @@ func get_config() -> Dictionary: func set_config(config : Dictionary) -> void: - var index = config.get("pattern_index", _pattern.index) - _pattern = Global.patterns_popup.get_pattern(index) + if _pattern: + var index = config.get("pattern_index", _pattern.index) + _pattern = Global.patterns_popup.get_pattern(index) _fill_area = config.get("fill_area", _fill_area) _fill_with = config.get("fill_with", _fill_with) _offset_x = config.get("offset_x", _offset_x) @@ -78,7 +81,10 @@ func update_config() -> void: func update_pattern() -> void: if _pattern == null: - _pattern = Global.patterns_popup.default_pattern + if Global.patterns_popup.default_pattern == null: + return + else: + _pattern = Global.patterns_popup.default_pattern var tex := ImageTexture.new() tex.create_from_image(_pattern.image, 0) $FillPattern/Type/Texture.texture = tex