统一缩进为制表符

master
chendian 9 months ago
parent 71119f326e
commit e885c52f20

@ -1,9 +1,2 @@
# Editor configuration, see https://editorconfig.org
root = true
[*.gd]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

@ -1,14 +1,17 @@
const Faces = preload("./Faces.gd");
const vox_to_godot = Basis(Vector3.RIGHT, Vector3.FORWARD, Vector3.UP);
func generate(vox, voxel_data, scale, snaptoground):
var generator = VoxelMeshGenerator.new(vox, voxel_data, scale, snaptoground);
return generator.generate_mesh();
class MeshGenerator:
var surfaces = {};
func ensure_surface_exists(surface_index: int, color: Color, material: Material):
if (surfaces.has(surface_index)): return;
@ -18,10 +21,12 @@ class MeshGenerator:
st.set_material(material);
surfaces[surface_index] = st;
func add_vertex(surface_index: int, vertex: Vector3):
var st = surfaces[surface_index] as SurfaceTool;
st.add_vertex(vertex);
func combine_surfaces():
var mesh = null;
for surface_index in surfaces:
@ -35,22 +40,26 @@ class MeshGenerator:
mesh.surface_set_name(new_surface_index, name);
return mesh;
class VoxelMeshGenerator:
var vox;
var voxel_data = {};
var scale:float;
var snaptoground:bool;
var scale: float;
var snaptoground: bool;
func _init(vox,voxel_data,scale,snaptoground):
func _init(vox, voxel_data, scale, snaptoground):
self.vox = vox;
self.voxel_data = voxel_data;
self.scale = scale;
self.snaptoground = snaptoground;
func get_material(voxel):
var surface_index = voxel_data[voxel];
return vox.materials[surface_index]
func face_is_visible(voxel, face):
if (not voxel_data.has(voxel + face)):
return true;
@ -58,12 +67,13 @@ class VoxelMeshGenerator:
var adj_material = get_material(voxel + face);
return adj_material.is_glass() && !local_material.is_glass();
func generate_mesh():
# Minimum extends of the volume
var mins :Vector3 = Vector3(1000000, 1000000, 1000000)
var mins: Vector3 = Vector3(1000000, 1000000, 1000000)
# Maximum extends of the volume
var maxs :Vector3 = Vector3(-1000000,-1000000,-1000000)
var maxs: Vector3 = Vector3(-1000000, -1000000, -1000000)
# Find bounds
for v in voxel_data:
@ -75,8 +85,8 @@ class VoxelMeshGenerator:
maxs.z = max(maxs.z, v.z)
var vox_to_godot = Basis(Vector3.RIGHT, Vector3.FORWARD, Vector3.UP);
var yoffset = Vector3(0,0,0);
if snaptoground : yoffset = Vector3(0, -mins.z * scale, 0);
var yoffset = Vector3(0, 0, 0);
if snaptoground: yoffset = Vector3(0, -mins.z * scale, 0);
var gen = MeshGenerator.new();
for voxel in voxel_data:

@ -6,8 +6,7 @@ const Top = [
Vector3( 0.0000, 1.0000, 0.0000),
Vector3( 1.0000, 1.0000, 0.0000),
Vector3( 1.0000, 1.0000, 1.0000),
];
];
const Bottom = [
Vector3( 0.0000, 0.0000, 0.0000),
Vector3( 0.0000, 0.0000, 1.0000),
@ -16,8 +15,7 @@ const Bottom = [
Vector3( 1.0000, 0.0000, 1.0000),
Vector3( 1.0000, 0.0000, 0.0000),
Vector3( 0.0000, 0.0000, 0.0000),
];
];
const Front = [
Vector3( 0.0000, 1.0000, 1.0000),
Vector3( 1.0000, 1.0000, 1.0000),
@ -26,8 +24,7 @@ const Front = [
Vector3( 1.0000, 0.0000, 1.0000),
Vector3( 0.0000, 0.0000, 1.0000),
Vector3( 0.0000, 1.0000, 1.0000),
];
];
const Back = [
Vector3( 1.0000, 0.0000, 0.0000),
Vector3( 1.0000, 1.0000, 0.0000),
@ -36,8 +33,7 @@ const Back = [
Vector3( 0.0000, 1.0000, 0.0000),
Vector3( 0.0000, 0.0000, 0.0000),
Vector3( 1.0000, 0.0000, 0.0000)
];
];
const Left = [
Vector3( 0.0000, 1.0000, 1.0000),
Vector3( 0.0000, 0.0000, 1.0000),
@ -46,8 +42,7 @@ const Left = [
Vector3( 0.0000, 0.0000, 0.0000),
Vector3( 0.0000, 1.0000, 0.0000),
Vector3( 0.0000, 1.0000, 1.0000),
];
];
const Right = [
Vector3( 1.0000, 1.0000, 1.0000),
Vector3( 1.0000, 1.0000, 0.0000),
@ -56,4 +51,4 @@ const Right = [
Vector3( 1.0000, 0.0000, 0.0000),
Vector3( 1.0000, 0.0000, 1.0000),
Vector3( 1.0000, 1.0000, 1.0000),
];
];

@ -1,7 +1,6 @@
const Faces = preload("./Faces.gd")
const VoxData = preload("./VoxFormat/VoxData.gd")
const vox_to_godot = Basis(Vector3.RIGHT, Vector3.FORWARD, Vector3.UP)
# Names for the faces by orientation
enum FaceOrientation {
Top = 0,
@ -11,96 +10,86 @@ enum FaceOrientation {
Front = 4,
Back = 5,
}
# An Array(FaceOrientation) of all possible face orientations
const face_orientations :Array = [
const face_orientations: Array = [
FaceOrientation.Top,
FaceOrientation.Bottom,
FaceOrientation.Left,
FaceOrientation.Right,
FaceOrientation.Front,
FaceOrientation.Back
]
]
# An Array(int) of the depth axis by orientation
const depth_axis :Array = [
const depth_axis: Array = [
Vector3.AXIS_Z,
Vector3.AXIS_Z,
Vector3.AXIS_X,
Vector3.AXIS_X,
Vector3.AXIS_Y,
Vector3.AXIS_Y,
]
]
# An Array(int) of the width axis by orientation
const width_axis :Array = [
const width_axis: Array = [
Vector3.AXIS_Y,
Vector3.AXIS_Y,
Vector3.AXIS_Z,
Vector3.AXIS_Z,
Vector3.AXIS_X,
Vector3.AXIS_X,
]
]
# An Array(int) of height axis by orientation
const height_axis :Array = [
const height_axis: Array = [
Vector3.AXIS_X,
Vector3.AXIS_X,
Vector3.AXIS_Y,
Vector3.AXIS_Y,
Vector3.AXIS_Z,
Vector3.AXIS_Z,
]
]
# An Array(Vector3) describing what vectors to use to check for face occlusion
# by orientation
const face_checks :Array = [
const face_checks: Array = [
Vector3(0, 0, 1),
Vector3(0, 0, -1),
Vector3(-1, 0, 0),
Vector3(1, 0, 0),
Vector3(0, -1, 0),
Vector3(0, 1, 0),
]
]
# An array of the face meshes by orientation
const face_meshes :Array = [
const face_meshes: Array = [
Faces.Front,
Faces.Back,
Faces.Left,
Faces.Right,
Faces.Bottom,
Faces.Top,
]
]
# An Array(Vector3) describing what normals to use by orientation
const normals :Array = [
const normals: Array = [
Vector3(0, 1, 0),
Vector3(0, -1, 0),
Vector3(-1, 0, 0),
Vector3(1, 0, 0),
Vector3(0, 0, 1),
Vector3(0, 0, -1),
]
]
# The SurfaceTool the object will use to generate the mesh
var st :SurfaceTool = SurfaceTool.new()
var st: SurfaceTool = SurfaceTool.new()
# A Dictonary[Vector3]int of the voxel data for the visible faces of the
# current slice
var faces :Dictionary
var faces: Dictionary
# Minimum extends of the volume
var mins :Vector3 = Vector3(1000000, 1000000, 1000000)
var mins: Vector3 = Vector3(1000000, 1000000, 1000000)
# Maximum extends of the volume
var maxs :Vector3 = Vector3(-1000000,-1000000,-1000000)
var maxs: Vector3 = Vector3(-1000000, -1000000, -1000000)
# Generate a mesh for the given voxel_data with single-pass greedy face merging
# Primary RefCounted: https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/
# Secondary RefCounted: https://www.gedge.ca/dev/2014/08/17/greedy-voxel-meshing
# voxel_data is a dict[Vector3]int
func generate(vox :VoxData, voxel_data :Dictionary, scale :float, snaptoground : bool):
func generate(vox: VoxData, voxel_data: Dictionary, scale: float, snaptoground: bool):
# Remeber, MagicaVoxel thinks Y is the depth axis. We convert to the correct
# coordinate space when we generate the faces.
st.begin(Mesh.PRIMITIVE_TRIANGLES)
@ -134,31 +123,34 @@ func generate(vox :VoxData, voxel_data :Dictionary, scale :float, snaptoground :
st.set_material(material)
return st.commit()
# Generates all of the geometry for a given face orientation
func generate_geometry_for_orientation(voxel_data :Dictionary, o :int, scale :float, snaptoground :bool) -> void:
func generate_geometry_for_orientation(voxel_data: Dictionary, o: int, scale: float, snaptoground: bool) -> void:
# Sweep through the volume along the depth reducing the problem to 2 dimensional
var da :int = depth_axis[o]
var da: int = depth_axis[o]
for slice in range(mins[da], maxs[da]+1):
var faces :Dictionary = query_slice_faces(voxel_data, o, slice)
var faces: Dictionary = query_slice_faces(voxel_data, o, slice)
if faces.size() > 0:
generate_geometry(faces, o, slice, scale, snaptoground)
# Returns the voxels in the set voxel_data with a visible face along the slice
# for the given orientation
func query_slice_faces(voxel_data :Dictionary, o :int, slice :float) -> Dictionary:
var ret :Dictionary = Dictionary()
func query_slice_faces(voxel_data: Dictionary, o: int, slice: float) -> Dictionary:
var ret: Dictionary = Dictionary()
var da = depth_axis[o]
for v in voxel_data:
if v[da] == slice and voxel_data.has(v + face_checks[o]) == false:
ret[v] = voxel_data[v]
return ret
# Generates geometry for the given orientation for the set of faces
func generate_geometry(faces :Dictionary, o :int, slice :float, scale :float, snaptoground :bool) -> void:
var da :int = depth_axis[o]
var wa :int = width_axis[o]
var ha :int = height_axis[o]
var v :Vector3 = Vector3()
func generate_geometry(faces: Dictionary, o: int, slice: float, scale: float, snaptoground: bool) -> void:
var da: int = depth_axis[o]
var wa: int = width_axis[o]
var ha: int = height_axis[o]
var v: Vector3 = Vector3()
v[da] = slice
# Itterate the rows of the sparse volume
@ -172,23 +164,24 @@ func generate_geometry(faces :Dictionary, o :int, slice :float, scale :float, sn
v[wa] += 1.0
v[ha] += 1.0
# Generates the geometry for the given face and orientation and scale and returns
# the set of remaining faces
func generate_geometry_for_face(faces :Dictionary, face :Vector3, o :int, scale :float, snaptoground :bool) -> Dictionary:
var da :int = depth_axis[o]
var wa :int = width_axis[o]
var ha :int = height_axis[o]
func generate_geometry_for_face(faces: Dictionary, face: Vector3, o: int, scale: float, snaptoground: bool) -> Dictionary:
var da: int = depth_axis[o]
var wa: int = width_axis[o]
var ha: int = height_axis[o]
# Greedy face merging
var width :int = width_query(faces, face, o)
var height :int = height_query(faces, face, o, width)
var grow :Vector3 = Vector3(1, 1, 1)
var width: int = width_query(faces, face, o)
var height: int = height_query(faces, face, o, width)
var grow: Vector3 = Vector3(1, 1, 1)
grow[wa] *= width
grow[ha] *= height
# Generate geometry
var yoffset = Vector3(0,0,0);
if snaptoground : yoffset = Vector3(0, -mins.z * scale, 0);
var yoffset = Vector3(0, 0, 0);
if snaptoground: yoffset = Vector3(0, -mins.z * scale, 0);
st.set_color(faces[face])
st.set_normal(normals[o])
@ -196,7 +189,7 @@ func generate_geometry_for_face(faces :Dictionary, face :Vector3, o :int, scale
st.add_vertex(yoffset + vox_to_godot * ((vert * grow) + face) * scale)
# Remove these faces from the pool
var v :Vector3 = Vector3()
var v: Vector3 = Vector3()
v[da] = face[da]
for iy in range(height):
v[ha] = face[ha] + float(iy)
@ -206,21 +199,23 @@ func generate_geometry_for_face(faces :Dictionary, face :Vector3, o :int, scale
return faces
# Returns the number of voxels wide the run starting at face is with respect to
# the set of faces and orientation
func width_query(faces :Dictionary, face :Vector3, o :int) -> int:
var wd :int = width_axis[o]
var v :Vector3 = face
func width_query(faces: Dictionary, face: Vector3, o: int) -> int:
var wd: int = width_axis[o]
var v: Vector3 = face
while faces.has(v) and faces[v] == faces[face]:
v[wd] += 1.0
return int(v[wd] - face[wd])
# Returns the number of voxels high the run starting at face is with respect to
# the set of faces and orientation, with the given width
func height_query(faces :Dictionary, face :Vector3, o :int, width :int) -> int:
var hd :int = height_axis[o]
var c :Color = faces[face]
var v :Vector3 = face
func height_query(faces: Dictionary, face: Vector3, o: int, width: int) -> int:
var hd: int = height_axis[o]
var c: Color = faces[face]
var v: Vector3 = face
v[hd] += 1.0
while faces.has(v) and faces[v] == c and width_query(faces, v, o) >= width:
v[hd] += 1.0

@ -1,5 +1,7 @@
# MagicaVoxel Importer with Extensions
Imports MagicaVoxel .vox files as meshes. Supports most node extensions, allowing multiple models and complex scene graphs.
Imports MagicaVoxel .vox files as meshes. Supports most node extensions, allowing multiple models and complex scene
graphs.
This is an adaptation of vox-importer by JohnCWakley (https://github.com/JohnCWakley/vox-importer)
This is an adaptation of MagicaVoxelImporter by Scayze (https://github.com/scayze/MagicaVoxel-Importer)

@ -1,36 +1,48 @@
var file: FileAccess;
var chunk_size = 0;
func _init(file: FileAccess):
self.file = file;
self.chunk_size = 0;
func has_data_to_read(): return file.get_position() < file.get_length()
func set_chunk_size(size):
chunk_size = size;
func get_8():
chunk_size -= 1;
return file.get_8();
func get_32():
chunk_size -= 4;
return file.get_32();
func get_buffer(length):
chunk_size -= length;
return file.get_buffer(length);
func read_remaining():
get_buffer(chunk_size);
chunk_size = 0;
func get_string(length):
return get_buffer(length).get_string_from_ascii()
func get_vox_string():
var length = get_32();
return get_string(length);
func get_vox_dict():
var result = {};
var pairs = get_32();

@ -1,5 +1,4 @@
const Model = preload("./Model.gd");
var models = {0: Model.new()};
var current_index = -1;
var colors: Array;
@ -7,6 +6,7 @@ var nodes = {};
var materials = {};
var layers = {};
func get_model():
if (!models.has(current_index)):
models[current_index] = Model.new();

@ -1,6 +1,7 @@
var id: int;
var isVisible: bool;
func _init(id,isVisible):
func _init(id, isVisible):
self.id = id;
self.isVisible = isVisible;

@ -25,12 +25,15 @@ var refraction:
get:
return float(properties.get("ior"));
func _init(properties):
self.properties = properties;
func is_glass():
return self.type == "_glass";
func get_material(color: Color):
if (material != null): return material;

@ -5,6 +5,7 @@ var child_nodes = [];
var models = {};
var transforms = { 0: { "position": Vector3(), "rotation": Basis() } };
func _init(id,attributes):
func _init(id, attributes):
self.id = id;
self.attributes = attributes;

@ -1,12 +1,12 @@
@tool
extends MeshInstance3D
@export var frames: MeshLibrary = null : set = set_frames
@export var current_frame: int = 0 : set = set_current_frame
@export var frames: MeshLibrary = null: set = set_frames
@export var current_frame: int = 0: set = set_current_frame
var mesh_count = 0;
func set_frames(v):
frames = v;
current_frame = 0
@ -17,6 +17,7 @@ func set_frames(v):
mesh_count = v.get_item_list().size()
self.mesh = v.get_item_mesh(0)
func set_current_frame(v):
if v >= 0 and v < mesh_count:
current_frame = v

@ -1,7 +1,7 @@
[plugin]
name="MagicaVoxel Importer with Extensions"
description="Imports MagicaVoxel .vox files as meshes. Supports most node extensions, allowing multiple models and complex scene graphs."
author="Violgamba"
version="1.2"
script="plugin.gd"
name = "MagicaVoxel Importer with Extensions"
description = "Imports MagicaVoxel .vox files as meshes. Supports most node extensions, allowing multiple models and complex scene graphs."
author = "Violgamba"
version = "1.2"
script = "plugin.gd"

@ -4,6 +4,7 @@ extends EditorPlugin
var pluginToMesh
var pluginToMeshLibrary
func _enter_tree():
pluginToMesh = preload('vox-importer-mesh.gd').new()
pluginToMeshLibrary = preload('vox-importer-meshLibrary.gd').new()
@ -12,6 +13,7 @@ func _enter_tree():
add_custom_type("FramedMeshInstance", "MeshInstance3D",
preload("framed_mesh_instance.gd"), preload("framed_mesh_instance.png"))
func _exit_tree():
remove_import_plugin(pluginToMesh)
remove_import_plugin(pluginToMeshLibrary)
@ -19,5 +21,6 @@ func _exit_tree():
pluginToMeshLibrary = null
remove_custom_type("FramedMeshInstance")
func _get_priority() -> float:
return 1.0

@ -1,4 +1,3 @@
const VoxFile = preload("./VoxFile.gd");
const VoxData = preload("./VoxFormat/VoxData.gd");
const VoxNode = preload("./VoxFormat/VoxNode.gd");
@ -6,12 +5,11 @@ const VoxMaterial = preload("./VoxFormat/VoxMaterial.gd");
const VoxLayer = preload("./VoxFormat/VoxLayer.gd");
const CulledMeshGenerator = preload("./CulledMeshGenerator.gd");
const GreedyMeshGenerator = preload("./GreedyMeshGenerator.gd");
const debug_file = false;
const debug_models = false;
var fileKeyframeIds = [];
func import(source_path, destination_path, options, _platforms, _gen_files):
var scale = 0.1
if options.Scale:
@ -26,7 +24,6 @@ func import(source_path, destination_path, options, _platforms, _gen_files):
if options.has("FirstKeyframeOnly"):
mergeKeyframes = not bool(options.FirstKeyframeOnly)
var file = FileAccess.open(source_path, FileAccess.READ)
if file == null:
@ -54,10 +51,12 @@ func import(source_path, destination_path, options, _platforms, _gen_files):
meshes.append(CulledMeshGenerator.new().generate(vox, voxel_data[keyframeVoxels], scale, snaptoground))
return meshes
func string_to_vector3(input: String) -> Vector3:
var data = input.split_floats(' ');
return Vector3(data[0], data[1], data[2]);
func byte_to_basis(data: int):
var x_ind = ((data >> 0) & 0x03);
var y_ind = ((data >> 2) & 0x03);
@ -82,6 +81,7 @@ func byte_to_basis(data: int):
result.z[2] = z_sign if z_ind == 2 else 0;
return result;
func read_chunk(vox: VoxData, file: VoxFile):
var chunk_id = file.get_string(4);
var chunk_size = file.get_32();
@ -180,7 +180,7 @@ func read_chunk(vox: VoxData, file: VoxFile):
if not fileKeyframeIds.has(keyframe):
fileKeyframeIds.append(keyframe);
if debug_file:
print('nSHP[', node_id,'] -> ', node.models);
print('nSHP[', node_id, '] -> ', node.models);
if (!attributes.is_empty()): print('\t', attributes);
'MATL':
var material_id = file.get_32() - 1;
@ -201,14 +201,17 @@ func read_chunk(vox: VoxData, file: VoxFile):
if debug_file: print(chunk_id);
file.read_remaining();
func unify_voxels(vox: VoxData, mergeKeyframes: bool):
var node = vox.nodes[0];
var layeredVoxelData = get_layeredVoxels(node, vox, -1, mergeKeyframes)
return layeredVoxelData.getDataMergedFromLayers();
class LayeredVoxelData:
var data_keyframed_layered = {};
func combine(keyframeId, layerId, model):
# Make sure there's space
if not keyframeId in data_keyframed_layered:
@ -220,6 +223,7 @@ class LayeredVoxelData:
for voxel in model.voxels:
data_keyframed_layered[keyframeId][layerId][voxel - offset] = model.voxels[voxel];
func combine_data(other):
for keyframeId in other.data_keyframed_layered:
if not keyframeId in data_keyframed_layered:
@ -231,6 +235,7 @@ class LayeredVoxelData:
data_keyframed_layered[keyframeId][layerId][voxel] = (
other.data_keyframed_layered[keyframeId][layerId][voxel]);
func transform(transforms):
var new_data = {};
for keyframeId in data_keyframed_layered:
@ -247,6 +252,7 @@ class LayeredVoxelData:
data_keyframed_layered[keyframeId][layerId][voxel]);
data_keyframed_layered = new_data;
func getDataMergedFromLayers():
# The result of this function
var result = {};
@ -261,6 +267,7 @@ class LayeredVoxelData:
# Return the merged data
return result;
static func get_input_for_keyframe(focusKeyframeId, inputCollection):
var inputKeyframeIds = inputCollection.keys();
inputKeyframeIds.sort();

@ -3,36 +3,47 @@ extends EditorImportPlugin
const VoxImporterCommon = preload("./vox-importer-common.gd");
func _init():
print('MagicaVoxel Mesh Importer: Ready')
func _get_importer_name():
return 'MagicaVoxel.With.Extensions.To.Mesh'
func _get_visible_name():
return 'MagicaVoxel Mesh'
func _get_recognized_extensions():
return [ 'vox' ]
func _get_resource_type():
return 'Mesh'
func _get_save_extension():
return 'mesh'
func _get_preset_count():
return 0
func _get_preset_name(_preset):
return 'Default'
func _get_import_order():
return 0
func _get_priority() -> float:
return 1.0
func _get_import_options(path, preset):
return [
{
@ -53,9 +64,11 @@ func _get_import_options(path, preset):
}
]
func _get_option_visibility(path, option, options):
return true
func _import(source_path, destination_path, options, _platforms, _gen_files):
var meshes = VoxImporterCommon.new().import(source_path, destination_path, options, _platforms, _gen_files);
var full_path = "%s.%s" % [ destination_path, _get_save_extension() ]

@ -3,36 +3,47 @@ extends EditorImportPlugin
const VoxImporterCommon = preload("./vox-importer-common.gd");
func _init():
print('MagicaVoxel MeshLibrary Importer: Ready')
func _get_importer_name():
return 'MagicaVoxel.With.Extensions.To.MeshLibrary'
func _get_visible_name():
return 'MagicaVoxel MeshLibrary'
func _get_recognized_extensions():
return [ 'vox' ]
func _get_resource_type():
return 'MeshLibrary'
func _get_save_extension():
return 'meshlib'
func _get_preset_count():
return 0
func _get_preset_name(_preset):
return 'Default'
func _get_import_order():
return 0
func _get_priority() -> float:
return 1.0
func _get_import_options(path, preset_index):
return [
{
@ -49,9 +60,11 @@ func _get_import_options(path, preset_index):
}
]
func _get_option_visibility(path, option, options):
return true
func _import(source_path, destination_path, options, _platforms, _gen_files):
var meshes = VoxImporterCommon.new().import(source_path, destination_path, options, _platforms, _gen_files);
var meshLib = MeshLibrary.new()

@ -1,10 +1,12 @@
## The blackboard is an object that can be used to store and access data between
## multiple nodes of the behavior tree.
@icon("icons/blackboard.svg")
class_name Blackboard extends Node
class_name Blackboard
extends Node
var blackboard: Dictionary = {}
func keys() -> Array[String]:
var keys: Array[String]
keys.assign(blackboard.keys().duplicate())

@ -1,6 +1,5 @@
class_name BeehaveDebuggerMessages
static func can_send_message() -> bool:
return not Engine.is_editor_hint() and OS.has_feature("editor")

@ -2,15 +2,12 @@
extends PanelContainer
signal make_floating()
const BeehaveGraphEdit := preload("graph_edit.gd")
const TREE_ICON := preload("../icons/tree.svg")
var container: HSplitContainer
var item_list: ItemList
var graph: BeehaveGraphEdit
var message: Label
var active_trees: Dictionary
var active_tree_id: int = -1
var session: EditorDebuggerSession

@ -5,7 +5,6 @@ const SUCCESS_COLOR := Color("#009944c8")
const NORMAL_COLOR := Color("#15181e")
const FAILURE_COLOR := Color("#cf000f80")
const RUNNING_COLOR := Color("#ffcc00c8")
var empty: StyleBoxEmpty
var normal: StyleBoxFlat
var success: StyleBoxFlat

@ -2,18 +2,15 @@
extends GraphEdit
const BeehaveGraphNode := preload("graph_node.gd")
const HORIZONTAL_LAYOUT_ICON := preload("icons/horizontal_layout.svg")
const VERTICAL_LAYOUT_ICON := preload("icons/vertical_layout.svg")
const PROGRESS_SHIFT: int = 50
const INACTIVE_COLOR: Color = Color("#898989aa")
const ACTIVE_COLOR: Color = Color("#ffcc00c8")
const SUCCESS_COLOR: Color = Color("#009944c8")
var updating_graph: bool = false
var arraging_nodes: bool = false
var beehave_tree: Dictionary:
set(value):
if beehave_tree == value:
@ -32,7 +29,6 @@ var horizontal_layout: bool = false:
_update_layout_button()
_update_graph()
var active_nodes: Array[String]
var progress: int = 0
var layout_button: Button

@ -2,13 +2,11 @@
extends GraphNode
const DEFAULT_COLOR := Color("#dad4cb")
const PORT_TOP_ICON := preload("icons/port_top.svg")
const PORT_BOTTOM_ICON := preload("icons/port_bottom.svg")
const PORT_LEFT_ICON := preload("icons/port_left.svg")
const PORT_RIGHT_ICON := preload("icons/port_right.svg")
@export var title_text: String:
set(value):
title_text = value
@ -31,13 +29,11 @@ var layout_size: float:
get:
return size.y if horizontal else size.x
var panel: PanelContainer
var icon_rect: TextureRect
var title_label: Label
var container: VBoxContainer
var label: Label
var frames: RefCounted = BeehaveUtils.get_frames()
var horizontal: bool = false

@ -1 +1,11 @@
<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0" transform="matrix(0 -1 1 0 0 16)"><rect height="6" rx="1" stroke-width=".6" width="6" y="10"/><rect height="6" rx="1" stroke-width=".780723" width="6" x="5"/><rect height="6" rx="1" stroke-width=".780723" width="6" x="10" y="10"/><path d="m7 5h2v4h-2z" stroke-width=".768491"/><rect height="4" rx="1" ry="0" stroke-width=".768491" width="2" x="12" y="7"/><rect height="5" rx="1" stroke-width=".859" width="2" x="2" y="7"/><path d="m3 7h10v2h-10z" stroke-width="1.09113"/></g></svg>
<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
<g fill="#e0e0e0" transform="matrix(0 -1 1 0 0 16)">
<rect height="6" rx="1" stroke-width=".6" width="6" y="10"/>
<rect height="6" rx="1" stroke-width=".780723" width="6" x="5"/>
<rect height="6" rx="1" stroke-width=".780723" width="6" x="10" y="10"/>
<path d="m7 5h2v4h-2z" stroke-width=".768491"/>
<rect height="4" rx="1" ry="0" stroke-width=".768491" width="2" x="12" y="7"/>
<rect height="5" rx="1" stroke-width=".859" width="2" x="2" y="7"/>
<path d="m3 7h10v2h-10z" stroke-width="1.09113"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 636 B

@ -1 +1,4 @@
<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><path d="m10 4a5 5 0 0 1 -2.5000001 4.3301271 5 5 0 0 1 -5-.0000002 5 5 0 0 1 -2.4999999-4.3301269" fill="#fff" fill-rule="evenodd"/></svg>
<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg">
<path d="m10 4a5 5 0 0 1 -2.5000001 4.3301271 5 5 0 0 1 -5-.0000002 5 5 0 0 1 -2.4999999-4.3301269" fill="#fff"
fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 238 B

@ -1 +1,4 @@
<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><path d="m5 0a5 5 0 0 0 -4.33012712 2.5000001 5 5 0 0 0 .0000002 5 5 5 0 0 0 4.33012692 2.4999999" fill="#fff" fill-rule="evenodd"/></svg>
<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg">
<path d="m5 0a5 5 0 0 0 -4.33012712 2.5000001 5 5 0 0 0 .0000002 5 5 5 0 0 0 4.33012692 2.4999999" fill="#fff"
fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 237 B

@ -1 +1,4 @@
<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><path d="m4.5 10a5 5 0 0 0 4.3301271-2.5000002 5 5 0 0 0 -.0000002-4.9999999 5 5 0 0 0 -4.3301269-2.4999999" fill="#fff" fill-rule="evenodd"/></svg>
<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg">
<path d="m4.5 10a5 5 0 0 0 4.3301271-2.5000002 5 5 0 0 0 -.0000002-4.9999999 5 5 0 0 0 -4.3301269-2.4999999"
fill="#fff" fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 247 B

@ -1 +1,4 @@
<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><path d="m10-6a5 5 0 0 1 -2.5000001 4.3301271 5 5 0 0 1 -5-.0000002 5 5 0 0 1 -2.4999999-4.3301269" fill="#fff" fill-rule="evenodd" transform="scale(1 -1)"/></svg>
<svg height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg">
<path d="m10-6a5 5 0 0 1 -2.5000001 4.3301271 5 5 0 0 1 -5-.0000002 5 5 0 0 1 -2.4999999-4.3301269" fill="#fff"
fill-rule="evenodd" transform="scale(1 -1)"/>
</svg>

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 262 B

@ -1 +1,11 @@
<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e0e0"><rect height="6" rx="1" stroke-width=".6" width="6" y="10"/><rect height="6" rx="1" stroke-width=".780723" width="6" x="5"/><rect height="6" rx="1" stroke-width=".780723" width="6" x="10" y="10"/><path d="m7 5h2v4h-2z" stroke-width=".768491"/><rect height="4" rx="1" ry="0" stroke-width=".768491" width="2" x="12" y="7"/><rect height="5" rx="1" stroke-width=".859" width="2" x="2" y="7"/><path d="m3 7h10v2h-10z" stroke-width="1.09113"/></g></svg>
<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg">
<g fill="#e0e0e0">
<rect height="6" rx="1" stroke-width=".6" width="6" y="10"/>
<rect height="6" rx="1" stroke-width=".780723" width="6" x="5"/>
<rect height="6" rx="1" stroke-width=".780723" width="6" x="10" y="10"/>
<path d="m7 5h2v4h-2z" stroke-width=".768491"/>
<rect height="4" rx="1" ry="0" stroke-width=".768491" width="2" x="12" y="7"/>
<rect height="5" rx="1" stroke-width=".859" width="2" x="2" y="7"/>
<path d="m3 7h10v2h-10z" stroke-width="1.09113"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 602 B

@ -5,13 +5,11 @@ extends RefCounted
const SIBLING_DISTANCE: float = 20.0
const LEVEL_DISTANCE: float = 40.0
var x: float
var y: float
var mod: float
var parent: TreeNode
var children: Array[TreeNode]
var item: GraphNode

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8745" />
id="defs8745"/>
<sodipodi:namedview
id="namedview8743"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg8741" />
inkscape:current-layer="svg8741"/>
<path
d="M 10.176432,3.6912688 Q 9.4137999,3.5779847 8.9573199,2.9622304 8.5018279,2.346623 8.6151119,1.5839909 q 0.113137,-0.76164287 0.727903,-1.21827047 0.615754,-0.45648072 1.3783861,-0.34319658 0.762632,0.1132841 1.218124,0.72889148 0.45648,0.61575427 0.343343,1.37739717 -0.113284,0.7626321 -0.729038,1.2191128 -0.614766,0.4566276 -1.377398,0.3433435 z M 8.3557339,18.50048 q -0.412474,-0.06127 -0.675246,-0.415727 -0.263613,-0.355592 -0.2024895,-0.767077 l 0.5938965,-3.998131 -1.1673025,-1.499791 -0.492278,1.19059 Q 6.067908,13.906466 5.2412215,14.299263 4.4143881,14.693049 3.5141916,14.369273 L 0.68012778,13.316428 q -0.3971933,-0.164141 -0.5825748,-0.549563 -0.1843923,-0.385274 -0.0202507,-0.782468 0.1463082,-0.420062 0.5218382,-0.606912 0.3753831,-0.185862 0.79544492,-0.03955 L 4.2327238,12.370146 6.3483399,6.4922013 5.1950516,6.7424632 4.9226408,8.5763411 Q 4.8584317,9.0085983 4.5028393,9.2722113 4.1483829,9.534983 3.7359088,9.473712 3.3234346,9.412442 3.0497828,9.0563693 2.7772671,8.6994546 2.8414761,8.2671975 L 3.0925819,6.5767458 Q 3.1935238,5.897202 3.6684284,5.3884589 4.1443222,4.8798627 4.8023572,4.703636 L 6.9923039,4.1443377 q 0.743073,-0.1838143 1.140791,-0.2409975 0.398708,-0.057036 0.728094,-0.00811 0.515345,0.076551 0.87859,0.3943727 0.3633911,0.3168322 0.5670941,0.7898969 l 0.629089,1.4410733 q 0.295795,0.6970267 0.885176,1.2688312 0.589381,0.5718045 1.447044,0.8892676 0.421051,0.1464552 0.62705,0.4611386 0.205852,0.3156725 0.147667,0.7073745 -0.07347,0.494573 -0.448694,0.754259 -0.376218,0.259539 -0.813966,0.08937 Q 11.753166,10.370427 10.957563,9.778099 10.159981,9.1854775 9.5990659,8.4288493 l -0.661707,1.9024227 0.845301,1.115306 q 0.2835431,0.357542 0.3859911,0.804445 0.102448,0.446903 0.03501,0.900921 l -0.6642771,4.471933 q -0.06112,0.411485 -0.416716,0.675098 -0.355445,0.262624 -0.76693,0.201501 z"
id="path8739"
style="fill:#ffb649;fill-opacity:1" />
style="fill:#ffb649;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1065" />
id="defs1065"/>
<sodipodi:namedview
id="namedview1063"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg1061" />
inkscape:current-layer="svg1061"/>
<path
d="M 0,4.333 V 1.937 Q 0,1.125 0.573,0.562 1.146,0 1.937,0 h 11.542 q 0.791,0 1.364,0.562 0.573,0.563 0.573,1.375 v 2.396 z m 4.354,1.396 v 8.687 H 1.937 q -0.791,0 -1.364,-0.573 Q 0,13.27 0,12.479 v -6.75 z m 6.708,0 h 4.354 v 6.75 q 0,0.791 -0.573,1.364 -0.573,0.573 -1.364,0.573 h -2.417 z m -1.396,0 v 8.687 H 5.75 V 5.729 Z"
id="path1059"
style="fill:#c689ff;fill-opacity:1;stroke:none;stroke-opacity:1" />
style="fill:#c689ff;fill-opacity:1;stroke:none;stroke-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
id="defs8"/>
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
inkscape:current-layer="svg4"/>
<path
d="m 11.48968,7.688 q -0.354,0 -0.76,-0.219 -0.406,-0.219 -0.552,-0.51 L 9.5736798,6 q -0.167,-0.291 -0.167,-0.729 0,-0.437 0.167,-0.729 L 10.07368,3.667 q 0.146,-0.291 0.552,-0.531 0.406,-0.24 0.76,-0.24 h 0.875 q 0.375,0 0.792,0.219 0.417,0.219 0.562,0.552 l 0.355,0.854 q 0.145,0.334 0.156,0.761 0.01,0.427 -0.136,0.76 l -0.396,0.875 q -0.145,0.333 -0.552,0.552 -0.406,0.219 -0.781,0.219 z m -4.8120002,2.917 q -0.354,0 -0.761,-0.219 -0.406,-0.219 -0.573,-0.531 l -0.374,-0.917 q -0.146,-0.312 -0.146,-0.75 0,-0.438 0.146,-0.75 l 0.374,-0.917 q 0.167,-0.312 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.219 0.552,0.531 l 0.396,0.917 q 0.146,0.312 0.146,0.75 0,0.438 -0.146,0.75 l -0.396,0.917 q -0.146,0.312 -0.552,0.531 -0.406,0.219 -0.781,0.219 z m 0,-5.813 q -0.354,0 -0.761,-0.219 -0.406,-0.218 -0.573,-0.531 l -0.374,-0.875 q -0.146,-0.333 -0.146,-0.771 0,-0.437 0.146,-0.75 l 0.374,-0.896 q 0.167,-0.312 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.219 0.552,0.531 l 0.396,0.896 q 0.146,0.313 0.146,0.75 0,0.438 -0.146,0.771 l -0.396,0.875 q -0.146,0.313 -0.552,0.531 -0.406,0.219 -0.781,0.219 z m -4.813,2.896 q -0.375,0 -0.771,-0.219 Q 0.69867978,7.25 0.53167978,6.917 l -0.375,-0.875 Q -0.01032022,5.709 6.7977528e-4,5.282 0.01067978,4.855 0.17767978,4.521 l 0.333,-0.854 q 0.167,-0.333 0.57300002,-0.552 0.406,-0.219 0.781,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.407,0.219 0.573,0.552 l 0.334,0.854 q 0.166,0.334 0.177,0.761 0.01,0.427 -0.157,0.76 l -0.374,0.875 q -0.167,0.333 -0.563,0.552 -0.396,0.219 -0.771,0.219 z m 0,5.75 q -0.375,0 -0.781,-0.219 Q 0.67767978,13 0.51067978,12.667 l -0.333,-0.854 Q 0.01067978,11.48 6.7977528e-4,11.053 -0.01032022,10.626 0.15667978,10.292 l 0.375,-0.875 q 0.167,-0.333 0.56200002,-0.552 0.396,-0.219 0.771,-0.219 h 0.771 q 0.375,0 0.771,0.219 0.396,0.219 0.563,0.552 l 0.374,0.875 q 0.167,0.334 0.157,0.761 -0.011,0.427 -0.177,0.76 l -0.334,0.854 q -0.166,0.333 -0.573,0.552 -0.406,0.219 -0.781,0.219 z m 4.855,2.938 q -0.355,0 -0.761,-0.219 -0.406,-0.219 -0.594,-0.531 l -0.375,-0.896 q -0.166,-0.313 -0.166,-0.75 0,-0.438 0.146,-0.771 l 0.374,-0.875 q 0.167,-0.313 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.218 0.552,0.531 l 0.396,0.875 q 0.146,0.333 0.146,0.771 0,0.437 -0.146,0.75 l -0.396,0.896 q -0.146,0.312 -0.552,0.531 -0.406,0.219 -0.781,0.219 z M 11.48968,13.438 q -0.354,0 -0.77,-0.219 -0.417,-0.219 -0.563,-0.51 L 9.5936798,11.771 q -0.166,-0.291 -0.177,-0.718 -0.01,-0.427 0.157,-0.719 L 10.17768,9.376 q 0.146,-0.292 0.552,-0.511 0.406,-0.219 0.76,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.407,0.219 0.552,0.552 l 0.396,0.875 q 0.146,0.334 0.136,0.761 -0.011,0.427 -0.156,0.76 l -0.355,0.854 q -0.145,0.333 -0.562,0.552 -0.417,0.219 -0.792,0.219 z"
id="path2"
style="fill:#c689ff;fill-opacity:1" />
style="fill:#c689ff;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
id="defs8"/>
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
inkscape:current-layer="svg4"/>
<path
d="m 11.48968,7.688 q -0.354,0 -0.76,-0.219 -0.406,-0.219 -0.552,-0.51 L 9.5736798,6 q -0.167,-0.291 -0.167,-0.729 0,-0.437 0.167,-0.729 L 10.07368,3.667 q 0.146,-0.291 0.552,-0.531 0.406,-0.24 0.76,-0.24 h 0.875 q 0.375,0 0.792,0.219 0.417,0.219 0.562,0.552 l 0.355,0.854 q 0.145,0.334 0.156,0.761 0.01,0.427 -0.136,0.76 l -0.396,0.875 q -0.145,0.333 -0.552,0.552 -0.406,0.219 -0.781,0.219 z m -4.8120002,2.917 q -0.354,0 -0.761,-0.219 -0.406,-0.219 -0.573,-0.531 l -0.374,-0.917 q -0.146,-0.312 -0.146,-0.75 0,-0.438 0.146,-0.75 l 0.374,-0.917 q 0.167,-0.312 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.219 0.552,0.531 l 0.396,0.917 q 0.146,0.312 0.146,0.75 0,0.438 -0.146,0.75 l -0.396,0.917 q -0.146,0.312 -0.552,0.531 -0.406,0.219 -0.781,0.219 z m 0,-5.813 q -0.354,0 -0.761,-0.219 -0.406,-0.218 -0.573,-0.531 l -0.374,-0.875 q -0.146,-0.333 -0.146,-0.771 0,-0.437 0.146,-0.75 l 0.374,-0.896 q 0.167,-0.312 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.219 0.552,0.531 l 0.396,0.896 q 0.146,0.313 0.146,0.75 0,0.438 -0.146,0.771 l -0.396,0.875 q -0.146,0.313 -0.552,0.531 -0.406,0.219 -0.781,0.219 z m -4.813,2.896 q -0.375,0 -0.771,-0.219 Q 0.69867978,7.25 0.53167978,6.917 l -0.375,-0.875 Q -0.01032022,5.709 6.7977528e-4,5.282 0.01067978,4.855 0.17767978,4.521 l 0.333,-0.854 q 0.167,-0.333 0.57300002,-0.552 0.406,-0.219 0.781,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.407,0.219 0.573,0.552 l 0.334,0.854 q 0.166,0.334 0.177,0.761 0.01,0.427 -0.157,0.76 l -0.374,0.875 q -0.167,0.333 -0.563,0.552 -0.396,0.219 -0.771,0.219 z m 0,5.75 q -0.375,0 -0.781,-0.219 Q 0.67767978,13 0.51067978,12.667 l -0.333,-0.854 Q 0.01067978,11.48 6.7977528e-4,11.053 -0.01032022,10.626 0.15667978,10.292 l 0.375,-0.875 q 0.167,-0.333 0.56200002,-0.552 0.396,-0.219 0.771,-0.219 h 0.771 q 0.375,0 0.771,0.219 0.396,0.219 0.563,0.552 l 0.374,0.875 q 0.167,0.334 0.157,0.761 -0.011,0.427 -0.177,0.76 l -0.334,0.854 q -0.166,0.333 -0.573,0.552 -0.406,0.219 -0.781,0.219 z m 4.855,2.938 q -0.355,0 -0.761,-0.219 -0.406,-0.219 -0.594,-0.531 l -0.375,-0.896 q -0.166,-0.313 -0.166,-0.75 0,-0.438 0.146,-0.771 l 0.374,-0.875 q 0.167,-0.313 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.218 0.552,0.531 l 0.396,0.875 q 0.146,0.333 0.146,0.771 0,0.437 -0.146,0.75 l -0.396,0.896 q -0.146,0.312 -0.552,0.531 -0.406,0.219 -0.781,0.219 z M 11.48968,13.438 q -0.354,0 -0.77,-0.219 -0.417,-0.219 -0.563,-0.51 L 9.5936798,11.771 q -0.166,-0.291 -0.177,-0.718 -0.01,-0.427 0.157,-0.719 L 10.17768,9.376 q 0.146,-0.292 0.552,-0.511 0.406,-0.219 0.76,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.407,0.219 0.552,0.552 l 0.396,0.875 q 0.146,0.334 0.136,0.761 -0.011,0.427 -0.156,0.76 l -0.355,0.854 q -0.145,0.333 -0.562,0.552 -0.417,0.219 -0.792,0.219 z"
id="path2"
style="fill:#40d29f;fill-opacity:1" />
style="fill:#40d29f;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
id="defs8"/>
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
inkscape:current-layer="svg4"/>
<path
d="m 11.48968,7.688 q -0.354,0 -0.76,-0.219 -0.406,-0.219 -0.552,-0.51 L 9.5736798,6 q -0.167,-0.291 -0.167,-0.729 0,-0.437 0.167,-0.729 L 10.07368,3.667 q 0.146,-0.291 0.552,-0.531 0.406,-0.24 0.76,-0.24 h 0.875 q 0.375,0 0.792,0.219 0.417,0.219 0.562,0.552 l 0.355,0.854 q 0.145,0.334 0.156,0.761 0.01,0.427 -0.136,0.76 l -0.396,0.875 q -0.145,0.333 -0.552,0.552 -0.406,0.219 -0.781,0.219 z m -4.8120002,2.917 q -0.354,0 -0.761,-0.219 -0.406,-0.219 -0.573,-0.531 l -0.374,-0.917 q -0.146,-0.312 -0.146,-0.75 0,-0.438 0.146,-0.75 l 0.374,-0.917 q 0.167,-0.312 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.219 0.552,0.531 l 0.396,0.917 q 0.146,0.312 0.146,0.75 0,0.438 -0.146,0.75 l -0.396,0.917 q -0.146,0.312 -0.552,0.531 -0.406,0.219 -0.781,0.219 z m 0,-5.813 q -0.354,0 -0.761,-0.219 -0.406,-0.218 -0.573,-0.531 l -0.374,-0.875 q -0.146,-0.333 -0.146,-0.771 0,-0.437 0.146,-0.75 l 0.374,-0.896 q 0.167,-0.312 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.219 0.552,0.531 l 0.396,0.896 q 0.146,0.313 0.146,0.75 0,0.438 -0.146,0.771 l -0.396,0.875 q -0.146,0.313 -0.552,0.531 -0.406,0.219 -0.781,0.219 z m -4.813,2.896 q -0.375,0 -0.771,-0.219 Q 0.69867978,7.25 0.53167978,6.917 l -0.375,-0.875 Q -0.01032022,5.709 6.7977528e-4,5.282 0.01067978,4.855 0.17767978,4.521 l 0.333,-0.854 q 0.167,-0.333 0.57300002,-0.552 0.406,-0.219 0.781,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.407,0.219 0.573,0.552 l 0.334,0.854 q 0.166,0.334 0.177,0.761 0.01,0.427 -0.157,0.76 l -0.374,0.875 q -0.167,0.333 -0.563,0.552 -0.396,0.219 -0.771,0.219 z m 0,5.75 q -0.375,0 -0.781,-0.219 Q 0.67767978,13 0.51067978,12.667 l -0.333,-0.854 Q 0.01067978,11.48 6.7977528e-4,11.053 -0.01032022,10.626 0.15667978,10.292 l 0.375,-0.875 q 0.167,-0.333 0.56200002,-0.552 0.396,-0.219 0.771,-0.219 h 0.771 q 0.375,0 0.771,0.219 0.396,0.219 0.563,0.552 l 0.374,0.875 q 0.167,0.334 0.157,0.761 -0.011,0.427 -0.177,0.76 l -0.334,0.854 q -0.166,0.333 -0.573,0.552 -0.406,0.219 -0.781,0.219 z m 4.855,2.938 q -0.355,0 -0.761,-0.219 -0.406,-0.219 -0.594,-0.531 l -0.375,-0.896 q -0.166,-0.313 -0.166,-0.75 0,-0.438 0.146,-0.771 l 0.374,-0.875 q 0.167,-0.313 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.218 0.552,0.531 l 0.396,0.875 q 0.146,0.333 0.146,0.771 0,0.437 -0.146,0.75 l -0.396,0.896 q -0.146,0.312 -0.552,0.531 -0.406,0.219 -0.781,0.219 z M 11.48968,13.438 q -0.354,0 -0.77,-0.219 -0.417,-0.219 -0.563,-0.51 L 9.5936798,11.771 q -0.166,-0.291 -0.177,-0.718 -0.01,-0.427 0.157,-0.719 L 10.17768,9.376 q 0.146,-0.292 0.552,-0.511 0.406,-0.219 0.76,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.407,0.219 0.552,0.552 l 0.396,0.875 q 0.146,0.334 0.136,0.761 -0.011,0.427 -0.156,0.76 l -0.355,0.854 q -0.145,0.333 -0.562,0.552 -0.417,0.219 -0.792,0.219 z"
id="path2"
style="fill:#46c0e1;fill-opacity:1" />
style="fill:#46c0e1;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
id="defs8"/>
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
inkscape:current-layer="svg4"/>
<path
d="m 11.48968,7.688 q -0.354,0 -0.76,-0.219 -0.406,-0.219 -0.552,-0.51 L 9.5736798,6 q -0.167,-0.291 -0.167,-0.729 0,-0.437 0.167,-0.729 L 10.07368,3.667 q 0.146,-0.291 0.552,-0.531 0.406,-0.24 0.76,-0.24 h 0.875 q 0.375,0 0.792,0.219 0.417,0.219 0.562,0.552 l 0.355,0.854 q 0.145,0.334 0.156,0.761 0.01,0.427 -0.136,0.76 l -0.396,0.875 q -0.145,0.333 -0.552,0.552 -0.406,0.219 -0.781,0.219 z m -4.8120002,2.917 q -0.354,0 -0.761,-0.219 -0.406,-0.219 -0.573,-0.531 l -0.374,-0.917 q -0.146,-0.312 -0.146,-0.75 0,-0.438 0.146,-0.75 l 0.374,-0.917 q 0.167,-0.312 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.219 0.552,0.531 l 0.396,0.917 q 0.146,0.312 0.146,0.75 0,0.438 -0.146,0.75 l -0.396,0.917 q -0.146,0.312 -0.552,0.531 -0.406,0.219 -0.781,0.219 z m 0,-5.813 q -0.354,0 -0.761,-0.219 -0.406,-0.218 -0.573,-0.531 l -0.374,-0.875 q -0.146,-0.333 -0.146,-0.771 0,-0.437 0.146,-0.75 l 0.374,-0.896 q 0.167,-0.312 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.219 0.552,0.531 l 0.396,0.896 q 0.146,0.313 0.146,0.75 0,0.438 -0.146,0.771 l -0.396,0.875 q -0.146,0.313 -0.552,0.531 -0.406,0.219 -0.781,0.219 z m -4.813,2.896 q -0.375,0 -0.771,-0.219 Q 0.69867978,7.25 0.53167978,6.917 l -0.375,-0.875 Q -0.01032022,5.709 6.7977528e-4,5.282 0.01067978,4.855 0.17767978,4.521 l 0.333,-0.854 q 0.167,-0.333 0.57300002,-0.552 0.406,-0.219 0.781,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.407,0.219 0.573,0.552 l 0.334,0.854 q 0.166,0.334 0.177,0.761 0.01,0.427 -0.157,0.76 l -0.374,0.875 q -0.167,0.333 -0.563,0.552 -0.396,0.219 -0.771,0.219 z m 0,5.75 q -0.375,0 -0.781,-0.219 Q 0.67767978,13 0.51067978,12.667 l -0.333,-0.854 Q 0.01067978,11.48 6.7977528e-4,11.053 -0.01032022,10.626 0.15667978,10.292 l 0.375,-0.875 q 0.167,-0.333 0.56200002,-0.552 0.396,-0.219 0.771,-0.219 h 0.771 q 0.375,0 0.771,0.219 0.396,0.219 0.563,0.552 l 0.374,0.875 q 0.167,0.334 0.157,0.761 -0.011,0.427 -0.177,0.76 l -0.334,0.854 q -0.166,0.333 -0.573,0.552 -0.406,0.219 -0.781,0.219 z m 4.855,2.938 q -0.355,0 -0.761,-0.219 -0.406,-0.219 -0.594,-0.531 l -0.375,-0.896 q -0.166,-0.313 -0.166,-0.75 0,-0.438 0.146,-0.771 l 0.374,-0.875 q 0.167,-0.313 0.573,-0.531 0.407,-0.219 0.761,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.406,0.218 0.552,0.531 l 0.396,0.875 q 0.146,0.333 0.146,0.771 0,0.437 -0.146,0.75 l -0.396,0.896 q -0.146,0.312 -0.552,0.531 -0.406,0.219 -0.781,0.219 z M 11.48968,13.438 q -0.354,0 -0.77,-0.219 -0.417,-0.219 -0.563,-0.51 L 9.5936798,11.771 q -0.166,-0.291 -0.177,-0.718 -0.01,-0.427 0.157,-0.719 L 10.17768,9.376 q 0.146,-0.292 0.552,-0.511 0.406,-0.219 0.76,-0.219 h 0.771 q 0.375,0 0.781,0.219 0.407,0.219 0.552,0.552 l 0.396,0.875 q 0.146,0.334 0.136,0.761 -0.011,0.427 -0.156,0.76 l -0.355,0.854 q -0.145,0.333 -0.562,0.552 -0.417,0.219 -0.792,0.219 z"
id="path2"
style="fill:#ffb649;fill-opacity:1" />
style="fill:#ffb649;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs4184" />
id="defs4184"/>
<sodipodi:namedview
id="namedview4182"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg4180" />
inkscape:current-layer="svg4180"/>
<path
d="m 8.938,14.063 q 0.542,0 0.927,-0.386 0.385,-0.385 0.385,-0.927 0,-0.541 -0.385,-0.916 -0.385,-0.375 -0.927,-0.375 -0.542,0 -0.927,0.375 -0.386,0.375 -0.386,0.916 0,0.542 0.386,0.927 0.385,0.386 0.927,0.386 z M 9.042,5.938 q 0.396,0 0.646,0.229 0.25,0.229 0.25,0.542 0,0.229 -0.177,0.562 Q 9.584,7.604 9.292,7.834 8.646,8.417 8.323,8.927 8,9.438 8,9.917 q 0,0.375 0.261,0.635 0.26,0.261 0.656,0.261 0.396,0 0.698,-0.24 0.302,-0.239 0.469,-0.698 0.104,-0.25 0.291,-0.51 0.188,-0.261 0.542,-0.615 0.604,-0.562 0.833,-1.073 0.23,-0.51 0.23,-1.135 0,-1.167 -0.761,-1.865 Q 10.459,3.98 9.188,3.98 8.25,3.98 7.552,4.365 6.854,4.75 6.292,5.48 6.084,5.75 6.198,6.125 6.313,6.5 6.584,6.709 6.938,6.98 7.365,6.886 7.792,6.792 8.104,6.417 8.313,6.209 8.563,6.073 8.813,5.938 9.042,5.938 Z m 0,12.146 q -1.875,0 -3.531,-0.709 Q 3.854,16.667 2.636,15.448 1.417,14.23 0.709,12.584 0,10.938 0,9.042 0,7.146 0.709,5.5 1.417,3.854 2.636,2.636 3.854,1.417 5.511,0.709 7.167,0 9.042,0 q 1.896,0 3.542,0.709 1.646,0.708 2.864,1.927 1.219,1.218 1.927,2.864 0.709,1.646 0.709,3.542 0,1.896 -0.709,3.542 -0.708,1.646 -1.927,2.864 -1.218,1.219 -2.864,1.927 -1.646,0.709 -3.542,0.709 z"
id="path4178"
style="fill:#ffb649;fill-opacity:1" />
style="fill:#ffb649;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs6755" />
id="defs6755"/>
<sodipodi:namedview
id="namedview6753"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg6751" />
inkscape:current-layer="svg6751"/>
<path
d="m 8.854,9.666 q 0.5,0 0.896,-0.395 0.395,-0.396 0.395,-0.917 v -2.75 q 0,-0.5 -0.395,-0.886 Q 9.354,4.333 8.854,4.333 8.333,4.333 7.937,4.729 7.541,5.125 7.541,5.625 v 2.75 q 0,0.52 0.396,0.906 0.396,0.385 0.917,0.385 z m -0.021,3.959 q 0.583,0 1.01,-0.407 0.428,-0.406 0.428,-1.031 0,-0.583 -0.428,-1.021 -0.427,-0.437 -1.01,-0.437 -0.583,0 -1.01,0.437 -0.428,0.438 -0.428,1.021 0,0.625 0.428,1.031 0.427,0.407 1.01,0.407 z m 0,4.041 q -1.854,0 -3.458,-0.687 Q 3.771,16.291 2.573,15.093 1.375,13.895 0.687,12.291 0,10.687 0,8.833 0,6.958 0.687,5.364 1.375,3.771 2.573,2.573 3.771,1.375 5.375,0.687 6.979,0 8.833,0 q 1.875,0 3.469,0.687 1.593,0.688 2.791,1.886 1.198,1.198 1.886,2.791 0.687,1.594 0.687,3.469 0,1.854 -0.687,3.458 -0.688,1.604 -1.886,2.802 -1.198,1.198 -2.791,1.886 -1.594,0.687 -3.469,0.687 z"
id="path6749"
style="fill:#46c0e1;fill-opacity:1" />
style="fill:#46c0e1;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs72" />
id="defs72"/>
<sodipodi:namedview
id="namedview70"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg68" />
inkscape:current-layer="svg68"/>
<path
d="m 12.937,8.48 q -0.458,-0.459 -0.458,-1.032 0,-0.572 0.458,-1.031 L 13.416,5.938 H 9.812 Q 9.229,5.938 8.791,5.5 8.354,5.063 8.354,4.48 8.354,3.876 8.791,3.448 9.229,3.021 9.812,3.021 h 3.604 l -0.5,-0.5 Q 12.458,2.063 12.468,1.49 12.479,0.917 12.937,0.48 13.396,0 13.979,0 14.562,0 15,0.459 l 2.979,2.979 q 0.229,0.229 0.344,0.5 0.114,0.271 0.114,0.521 0,0.271 -0.114,0.541 -0.115,0.271 -0.344,0.5 l -3,3 Q 14.52,8.959 13.958,8.948 13.396,8.938 12.937,8.48 Z M 3.416,13.438 0.437,10.459 Q 0.229,10.25 0.114,9.98 0,9.709 0,9.438 0,9.167 0.114,8.896 0.229,8.626 0.437,8.396 l 3.021,-3 Q 3.916,4.938 4.468,4.948 5.02,4.959 5.479,5.417 5.937,5.876 5.937,6.459 5.937,7.042 5.479,7.48 L 5,7.959 h 3.604 q 0.583,0 1.021,0.437 0.437,0.438 0.437,1.021 0,0.604 -0.437,1.031 -0.438,0.428 -1.021,0.428 H 5 l 0.5,0.52 q 0.458,0.459 0.448,1.021 -0.011,0.563 -0.469,1.021 -0.459,0.458 -1.021,0.469 -0.562,0.01 -1.042,-0.469 z"
id="path66"
style="fill:#46c0e1;fill-opacity:1" />
style="fill:#46c0e1;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs3327" />
id="defs3327"/>
<sodipodi:namedview
id="namedview3325"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg3323" />
inkscape:current-layer="svg3323"/>
<path
d="M 7.375,14.75 Q 4.312,14.75 2.156,12.594 0,10.437 0,7.375 0,4.313 2.156,2.156 4.312,0 7.375,0 8.979,0 10.385,0.646 11.791,1.292 12.833,2.5 V 1.042 q 0,-0.417 0.313,-0.729 Q 13.458,0 13.875,0 q 0.416,0 0.729,0.313 0.312,0.312 0.312,0.729 v 4.583 q 0,0.542 -0.406,0.948 -0.406,0.406 -0.948,0.406 H 8.958 Q 8.541,6.979 8.229,6.677 7.916,6.375 7.916,5.958 7.916,5.542 8.229,5.229 8.541,4.917 8.958,4.917 h 2.354 Q 10.646,3.917 9.614,3.313 8.583,2.708 7.375,2.708 q -1.938,0 -3.302,1.365 -1.365,1.364 -1.365,3.302 0,1.938 1.365,3.302 1.364,1.365 3.302,1.365 1.25,0 2.291,-0.615 1.042,-0.614 1.688,-1.677 0.208,-0.313 0.562,-0.521 0.354,-0.208 0.688,-0.208 0.854,0 1.239,0.573 0.386,0.573 0.011,1.26 -0.979,1.771 -2.698,2.833 -1.719,1.063 -3.781,1.063 z"
id="path3321"
style="fill:#46c0e1;fill-opacity:1" />
style="fill:#46c0e1;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs5041" />
id="defs5041"/>
<sodipodi:namedview
id="namedview5039"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg5037" />
inkscape:current-layer="svg5037"/>
<path
d="M 4.52,13.645 Q 4.25,13.374 4.25,13 4.25,12.624 4.5,12.354 L 5.208,11.666 Q 2.979,11.395 1.489,9.802 0,8.208 0,5.895 0,3.437 1.718,1.718 3.437,0 5.895,0 H 7.562 Q 7.916,0 8.187,0.27 8.458,0.541 8.458,0.895 8.458,1.27 8.187,1.541 7.916,1.812 7.562,1.812 H 5.895 Q 4.187,1.812 3,3 1.812,4.187 1.812,5.895 1.812,7.437 2.76,8.52 3.708,9.604 5.187,9.916 L 4.5,9.229 Q 4.229,8.937 4.239,8.583 4.25,8.229 4.52,7.958 4.77,7.687 5.145,7.687 q 0.375,0 0.646,0.271 l 2.167,2.187 q 0.125,0.125 0.208,0.302 0.084,0.177 0.084,0.365 0,0.167 -0.084,0.344 -0.083,0.177 -0.208,0.323 L 5.75,13.645 Q 5.479,13.916 5.124,13.906 4.77,13.895 4.52,13.645 Z M 12.041,5.958 Q 11.25,5.958 10.708,5.416 10.166,4.874 10.166,4.083 V 1.874 q 0,-0.77 0.542,-1.322 Q 11.25,0 12.041,0 h 3.875 q 0.771,0 1.323,0.552 0.552,0.552 0.552,1.322 v 2.209 q 0,0.791 -0.552,1.333 -0.552,0.542 -1.323,0.542 z m 0,-1.875 h 3.875 V 1.874 h -3.875 z m 0,9.541 q -0.791,0 -1.333,-0.552 Q 10.166,12.52 10.166,11.75 V 9.541 q 0,-0.791 0.542,-1.333 0.542,-0.542 1.333,-0.542 h 3.875 q 0.771,0 1.323,0.542 0.552,0.542 0.552,1.333 v 2.209 q 0,0.77 -0.552,1.322 -0.552,0.552 -1.323,0.552 z"
id="path5035"
style="fill:#40d29f;fill-opacity:1" />
style="fill:#40d29f;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

@ -11,7 +11,8 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs5041" /><sodipodi:namedview
id="defs5041" />
<sodipodi:namedview
id="namedview5039"
pagecolor="#ffffff"
bordercolor="#000000"
@ -29,17 +30,20 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg5037" /><path
inkscape:current-layer="svg5037"/>
<path
style="fill:#40d29f;fill-opacity:1;color:#000000;stroke-width:1.7354;-inkscape-stroke:none;paint-order:markers stroke fill"
d="m 15.63424,18.518399 q -0.218955,0 -0.373746,-0.150649 -0.155154,-0.150651 -0.155154,-0.363746 v -1.161448 l -0.860595,0.49993 q -0.196481,0.103026 -0.400572,0.05152 -0.20373,-0.05152 -0.309582,-0.227915 l -0.181253,-0.308712 q -0.105496,-0.183813 -0.05655,-0.385972 0.04894,-0.202159 0.237805,-0.312236 l 0.868569,-0.492527 -0.883432,-0.485112 q -0.188867,-0.110433 -0.241793,-0.312236 -0.05292,-0.202161 0.05292,-0.385974 l 0.196116,-0.301299 q 0.113465,-0.183814 0.321183,-0.238852 0.207716,-0.05539 0.388971,0.05504 l 0.868208,0.492523 v -1.161448 q 0,-0.213096 0.155154,-0.363747 0.154791,-0.150648 0.373746,-0.150648 h 0.347283 q 0.218955,0 0.373747,0.150648 0.155152,0.150651 0.155152,0.363747 v 1.161448 l 0.868209,-0.499931 q 0.188867,-0.103026 0.388973,-0.04763 0.200104,0.05504 0.313568,0.224034 l 0.211343,0.323526 q 0.113466,0.183813 0.05655,0.38562 -0.05655,0.20216 -0.253031,0.312589 l -0.87582,0.477704 0.86857,0.492521 q 0.181255,0.09561 0.245418,0.304826 0.06416,0.209569 -0.0493,0.385974 l -0.196119,0.316117 q -0.113464,0.176404 -0.313569,0.235323 -0.200105,0.05857 -0.388972,-0.05151 l -0.875822,-0.50734 v 1.161449 q 0,0.213096 -0.155152,0.363745 -0.154792,0.15065 -0.373747,0.15065 z"
id="path5291"
transform="matrix(1.2719165,0,0,1.2110461,-6.1455464,-7.8832739)"
inkscape:label="asterisk" /><path
inkscape:label="asterisk"/>
<path
style="fill:#40d29f;fill-opacity:1"
d="M 12.041,5.958 Q 11.25,5.958 10.708,5.416 10.166,4.874 10.166,4.083 V 1.874 q 0,-0.77 0.542,-1.322 Q 11.25,0 12.041,0 h 3.875 q 0.771,0 1.323,0.552 0.552,0.552 0.552,1.322 v 2.209 q 0,0.791 -0.552,1.333 -0.552,0.542 -1.323,0.542 z m 0,-1.875 h 3.875 V 1.874 h -3.875 z"
id="path923"
inkscape:label="square" /><path
inkscape:label="square"/>
<path
style="fill:#40d29f;fill-opacity:1"
d="M 4.52,13.645 Q 4.25,13.374 4.25,13 4.25,12.624 4.5,12.354 L 5.208,11.666 Q 2.979,11.395 1.489,9.802 0,8.208 0,5.895 0,3.437 1.718,1.718 3.437,0 5.895,0 H 7.562 Q 7.916,0 8.187,0.27 8.458,0.541 8.458,0.895 8.458,1.27 8.187,1.541 7.916,1.812 7.562,1.812 H 5.895 Q 4.187,1.812 3,3 1.812,4.187 1.812,5.895 1.812,7.437 2.76,8.52 3.708,9.604 5.187,9.916 L 4.5,9.229 Q 4.229,8.937 4.239,8.583 4.25,8.229 4.52,7.958 4.77,7.687 5.145,7.687 q 0.375,0 0.646,0.271 l 2.167,2.187 q 0.125,0.125 0.208,0.302 0.084,0.177 0.084,0.365 0,0.167 -0.084,0.344 -0.083,0.177 -0.208,0.323 L 5.75,13.645 Q 5.479,13.916 5.124,13.906 4.77,13.895 4.52,13.645 Z"
id="path5035"
inkscape:label="arrow" /></svg>
inkscape:label="arrow"/></svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs5898" />
id="defs5898"/>
<sodipodi:namedview
id="namedview5896"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg5894" />
inkscape:current-layer="svg5894"/>
<path
d="M 1.709,8.313 Q 1,8.313 0.5,7.823 0,7.333 0,6.604 0,5.896 0.5,5.396 q 0.5,-0.5 1.209,-0.5 0.708,0 1.208,0.5 0.5,0.5 0.5,1.229 0,0.708 -0.5,1.198 -0.5,0.49 -1.208,0.49 z m 0,-4.896 Q 1,3.417 0.5,2.927 0,2.437 0,1.708 0,1 0.5,0.5 1,0 1.709,0 q 0.708,0 1.208,0.5 0.5,0.5 0.5,1.229 0,0.708 -0.5,1.198 -0.5,0.49 -1.208,0.49 z m 0,9.77 Q 1,13.187 0.5,12.698 0,12.208 0,11.479 q 0,-0.708 0.5,-1.208 0.5,-0.5 1.209,-0.5 0.708,0 1.208,0.5 0.5,0.5 0.5,1.229 0,0.708 -0.5,1.198 -0.5,0.489 -1.208,0.489 z m 4.604,-0.395 q -0.5,0 -0.896,-0.396 Q 5.021,12 5.021,11.479 q 0,-0.5 0.396,-0.896 0.396,-0.396 0.896,-0.396 h 8.979 q 0.5,0 0.896,0.396 0.395,0.396 0.395,0.896 0,0.521 -0.395,0.917 -0.396,0.396 -0.896,0.396 z m 0,-4.875 q -0.5,0 -0.896,-0.396 -0.396,-0.396 -0.396,-0.917 0,-0.5 0.396,-0.896 0.396,-0.395 0.896,-0.395 h 8.979 q 0.5,0 0.896,0.395 0.395,0.396 0.395,0.896 0,0.521 -0.395,0.917 -0.396,0.396 -0.896,0.396 z m 0,-4.896 q -0.5,0 -0.896,-0.396 -0.396,-0.396 -0.396,-0.917 0,-0.5 0.396,-0.895 0.396,-0.396 0.896,-0.396 h 8.979 q 0.5,0 0.896,0.396 0.395,0.395 0.395,0.895 0,0.521 -0.395,0.917 -0.396,0.396 -0.896,0.396 z"
id="path5892"
style="fill:#40d29f;fill-opacity:1" />
style="fill:#40d29f;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs5898" />
id="defs5898"/>
<sodipodi:namedview
id="namedview5896"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg5894" />
inkscape:current-layer="svg5894"/>
<path
id="path414"
style="color:#000000;fill:#40d29f;stroke-width:0.4;stroke-linecap:round;paint-order:fill markers stroke"
d="M 1.7089844,0 C 1.2363186,0 0.83333267,0.16666733 0.5,0.5 0.16666733,0.83333267 0,1.2350322 0,1.7070312 c 0,0.4859992 0.16666733,0.8940371 0.5,1.2207032 0.33333267,0.3266659 0.7363186,0.4902343 1.2089844,0.4902344 0.471999,0 0.8756516,-0.1635685 1.2089844,-0.4902344 0.3333326,-0.3266661 0.4999999,-0.7272196 0.5,-1.1992188 0,-0.485999 -0.1666674,-0.89518293 -0.5,-1.2285156 C 2.5846361,0.16666733 2.1809834,0 1.7089844,0 Z M 6.3125,0.41796875 c -0.3333327,0 -0.6305318,0.13053177 -0.8945312,0.39453125 -0.2639996,0.2633328 -0.3964844,0.5611987 -0.3964844,0.8945312 0,0.3473327 0.1324848,0.6539694 0.3964844,0.9179688 C 5.6819682,2.8889994 5.9791673,3.0214844 6.3125,3.0214844 h 8.980469 C 15.626301,3.0214844 15.9235,2.8889994 16.1875,2.625 16.450833,2.3610006 16.582031,2.0543639 16.582031,1.7070312 16.582031,1.3736987 16.450833,1.0758328 16.1875,0.8125 15.9235,0.54850052 15.626301,0.41796875 15.292969,0.41796875 Z M 9.0878906,4.3007812 c -0.2828275,0 -0.5270087,0.1055895 -0.7324218,0.3164063 -0.2050874,0.2104687 -0.3066407,0.4597345 -0.3066407,0.75 v 5.7480465 c 0,0.290266 0.101563,0.543098 0.3066407,0.753907 0.2054131,0.210442 0.4495943,0.314453 0.7324218,0.314453 h 5.6015624 c 0.282829,0 0.527005,-0.103984 0.732422,-0.314453 0.20504,-0.210809 0.310547,-0.463641 0.310547,-0.753907 V 5.3671875 c 0,-0.2902655 -0.105468,-0.5395313 -0.310547,-0.75 -0.192576,-0.1976408 -0.419166,-0.3040153 -0.679687,-0.3164063 -0.01736,-8.263e-4 -0.03505,0 -0.05274,0 z M 1.9257812,5.3535156 C 1.6720837,5.3535062 1.4450691,5.4533683 1.2441406,5.6542969 1.043212,5.8547182 0.94335938,6.0822399 0.94335938,6.3359375 c 0,0.2643529 0.0998526,0.4982903 0.30078122,0.6992187 0.2009285,0.2009285 0.4279431,0.3007813 0.6816406,0.3007813 H 6.8886719 V 5.7070312 c 0,-0.1182132 0.017785,-0.2363441 0.048828,-0.3515624 z m 11.7246098,0.041016 c 0.275278,0 0.533582,0.1086393 0.724609,0.3046876 0.191017,0.1960469 0.294922,0.4582008 0.294922,0.7363281 0,0.2781252 -0.10358,0.53844 -0.294922,0.734375 -0.191911,0.1969508 -0.45114,0.3027343 -0.724609,0.3027343 -0.273472,0 -0.532817,-0.1054585 -0.72461,-0.3027343 -0.192232,-0.1968435 -0.291015,-0.4579656 -0.291015,-0.734375 0,-0.2764085 0.09911,-0.5393695 0.291015,-0.7363281 0.190906,-0.1963654 0.449327,-0.3046876 0.72461,-0.3046876 z M 11.888672,7.203125 c 0.0068,0 0.0244,-0.00128 0.05273,0 0.256852,0.011652 0.493747,0.1218832 0.671875,0.3046875 0.191019,0.1960465 0.296876,0.4562463 0.296875,0.734375 10e-7,0.2781245 -0.105853,0.5402803 -0.296875,0.7363281 C 12.42137,9.1754773 12.162139,9.28125 11.888672,9.28125 c -0.273461,0 -0.532699,-0.1057738 -0.72461,-0.3027344 -0.191923,-0.1969574 -0.291015,-0.4599183 -0.291015,-0.7363281 0,-0.2764094 0.0991,-0.5374165 0.291015,-0.734375 0.191024,-0.1960448 0.449335,-0.3046875 0.72461,-0.3046875 z m -1.75,1.8066406 c 0.0068,0 0.0244,6.732e-4 0.05273,0.00195 0.256848,0.011652 0.49375,0.1238283 0.671875,0.3066406 0.189491,0.1948428 0.294922,0.4530828 0.294922,0.7304688 0,0.278128 -0.103894,0.538327 -0.294922,0.734375 -0.191019,0.196026 -0.449319,0.306641 -0.724609,0.306641 -0.2750313,0 -0.5324,-0.111387 -0.7226564,-0.306641 C 9.2249894,10.587155 9.1210938,10.326955 9.1210938,10.048828 9.1210937,9.7714422 9.2265406,9.5132022 9.4160156,9.3183594 9.6062729,9.1231217 9.8636398,9.0097656 10.138672,9.0097656 Z m -8.216797,0.1875 c -0.2536975,-9.4e-6 -0.478759,0.0979 -0.6796875,0.2988282 -0.2009286,0.2004212 -0.30273437,0.4279427 -0.30273438,0.6816402 0,0.264353 0.10180578,0.498291 0.30273438,0.699219 0.2009285,0.200929 0.42599,0.300781 0.6796875,0.300781 H 6.8867188 V 9.5488281 c 0,-0.1182133 0.017785,-0.2363441 0.048828,-0.3515625 z" />
d="M 1.7089844,0 C 1.2363186,0 0.83333267,0.16666733 0.5,0.5 0.16666733,0.83333267 0,1.2350322 0,1.7070312 c 0,0.4859992 0.16666733,0.8940371 0.5,1.2207032 0.33333267,0.3266659 0.7363186,0.4902343 1.2089844,0.4902344 0.471999,0 0.8756516,-0.1635685 1.2089844,-0.4902344 0.3333326,-0.3266661 0.4999999,-0.7272196 0.5,-1.1992188 0,-0.485999 -0.1666674,-0.89518293 -0.5,-1.2285156 C 2.5846361,0.16666733 2.1809834,0 1.7089844,0 Z M 6.3125,0.41796875 c -0.3333327,0 -0.6305318,0.13053177 -0.8945312,0.39453125 -0.2639996,0.2633328 -0.3964844,0.5611987 -0.3964844,0.8945312 0,0.3473327 0.1324848,0.6539694 0.3964844,0.9179688 C 5.6819682,2.8889994 5.9791673,3.0214844 6.3125,3.0214844 h 8.980469 C 15.626301,3.0214844 15.9235,2.8889994 16.1875,2.625 16.450833,2.3610006 16.582031,2.0543639 16.582031,1.7070312 16.582031,1.3736987 16.450833,1.0758328 16.1875,0.8125 15.9235,0.54850052 15.626301,0.41796875 15.292969,0.41796875 Z M 9.0878906,4.3007812 c -0.2828275,0 -0.5270087,0.1055895 -0.7324218,0.3164063 -0.2050874,0.2104687 -0.3066407,0.4597345 -0.3066407,0.75 v 5.7480465 c 0,0.290266 0.101563,0.543098 0.3066407,0.753907 0.2054131,0.210442 0.4495943,0.314453 0.7324218,0.314453 h 5.6015624 c 0.282829,0 0.527005,-0.103984 0.732422,-0.314453 0.20504,-0.210809 0.310547,-0.463641 0.310547,-0.753907 V 5.3671875 c 0,-0.2902655 -0.105468,-0.5395313 -0.310547,-0.75 -0.192576,-0.1976408 -0.419166,-0.3040153 -0.679687,-0.3164063 -0.01736,-8.263e-4 -0.03505,0 -0.05274,0 z M 1.9257812,5.3535156 C 1.6720837,5.3535062 1.4450691,5.4533683 1.2441406,5.6542969 1.043212,5.8547182 0.94335938,6.0822399 0.94335938,6.3359375 c 0,0.2643529 0.0998526,0.4982903 0.30078122,0.6992187 0.2009285,0.2009285 0.4279431,0.3007813 0.6816406,0.3007813 H 6.8886719 V 5.7070312 c 0,-0.1182132 0.017785,-0.2363441 0.048828,-0.3515624 z m 11.7246098,0.041016 c 0.275278,0 0.533582,0.1086393 0.724609,0.3046876 0.191017,0.1960469 0.294922,0.4582008 0.294922,0.7363281 0,0.2781252 -0.10358,0.53844 -0.294922,0.734375 -0.191911,0.1969508 -0.45114,0.3027343 -0.724609,0.3027343 -0.273472,0 -0.532817,-0.1054585 -0.72461,-0.3027343 -0.192232,-0.1968435 -0.291015,-0.4579656 -0.291015,-0.734375 0,-0.2764085 0.09911,-0.5393695 0.291015,-0.7363281 0.190906,-0.1963654 0.449327,-0.3046876 0.72461,-0.3046876 z M 11.888672,7.203125 c 0.0068,0 0.0244,-0.00128 0.05273,0 0.256852,0.011652 0.493747,0.1218832 0.671875,0.3046875 0.191019,0.1960465 0.296876,0.4562463 0.296875,0.734375 10e-7,0.2781245 -0.105853,0.5402803 -0.296875,0.7363281 C 12.42137,9.1754773 12.162139,9.28125 11.888672,9.28125 c -0.273461,0 -0.532699,-0.1057738 -0.72461,-0.3027344 -0.191923,-0.1969574 -0.291015,-0.4599183 -0.291015,-0.7363281 0,-0.2764094 0.0991,-0.5374165 0.291015,-0.734375 0.191024,-0.1960448 0.449335,-0.3046875 0.72461,-0.3046875 z m -1.75,1.8066406 c 0.0068,0 0.0244,6.732e-4 0.05273,0.00195 0.256848,0.011652 0.49375,0.1238283 0.671875,0.3066406 0.189491,0.1948428 0.294922,0.4530828 0.294922,0.7304688 0,0.278128 -0.103894,0.538327 -0.294922,0.734375 -0.191019,0.196026 -0.449319,0.306641 -0.724609,0.306641 -0.2750313,0 -0.5324,-0.111387 -0.7226564,-0.306641 C 9.2249894,10.587155 9.1210938,10.326955 9.1210938,10.048828 9.1210937,9.7714422 9.2265406,9.5132022 9.4160156,9.3183594 9.6062729,9.1231217 9.8636398,9.0097656 10.138672,9.0097656 Z m -8.216797,0.1875 c -0.2536975,-9.4e-6 -0.478759,0.0979 -0.6796875,0.2988282 -0.2009286,0.2004212 -0.30273437,0.4279427 -0.30273438,0.6816402 0,0.264353 0.10180578,0.498291 0.30273438,0.699219 0.2009285,0.200929 0.42599,0.300781 0.6796875,0.300781 H 6.8867188 V 9.5488281 c 0,-0.1182133 0.017785,-0.2363441 0.048828,-0.3515625 z"/>
</svg>

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

@ -25,7 +25,8 @@
lpeversion="0"
join="true"
close="true"
autoreverse="true" /></defs><sodipodi:namedview
autoreverse="true"/></defs>
<sodipodi:namedview
id="namedview5896"
pagecolor="#ffffff"
bordercolor="#000000"
@ -43,18 +44,21 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg5894" /><path
inkscape:current-layer="svg5894"/>
<path
d="M 0,0"
id="path3722"
class="UnoptimicedTransforms"
inkscape:original-d="M 0,0"
inkscape:path-effect="#path-effect3720"
transform="translate(-1.7285156,-3.375)" /><path
transform="translate(-1.7285156,-3.375)"/>
<path
id="path5892"
style="fill:#40d29f;fill-opacity:1"
class="UnoptimicedTransforms"
d="m 3.4375,3.375 c -0.4726662,0 -0.8756514,0.166667 -1.2089844,0.5 -0.333333,0.333333 -0.5,0.7350317 -0.5,1.2070312 0,0.4859996 0.166667,0.8940368 0.5,1.2207032 0.333333,0.3266663 0.7363182,0.4902344 1.2089844,0.4902344 0.4719995,-10e-8 0.8756514,-0.1635681 1.2089844,-0.4902344 0.333333,-0.3266664 0.5,-0.7272192 0.5,-1.1992188 0,-0.4859995 -0.166667,-0.8951826 -0.5,-1.2285156 C 4.3131514,3.541667 3.9094995,3.375 3.4375,3.375 Z M 8.0429688,3.7929688 C 7.7096358,3.7929687 7.4104841,3.9235003 7.1464844,4.1875 6.8824846,4.4508331 6.75,4.7486983 6.75,5.0820312 6.75,5.4293642 6.8824846,5.7360003 7.1464844,6 7.4104841,6.2639997 7.7096358,6.3964844 8.0429688,6.3964844 H 17.021484 C 17.354817,6.3964844 17.653969,6.2639997 17.917969,6 18.181302,5.7360003 18.3125,5.4293642 18.3125,5.0820312 18.3125,4.7486983 18.181302,4.4508331 17.917969,4.1875 17.653969,3.9235003 17.354817,3.7929688 17.021484,3.7929688 Z M 3.4375,8.2714844 c -0.4726662,0 -0.8756514,0.166667 -1.2089844,0.5 -0.333333,0.333333 -0.5,0.7350317 -0.5,1.2070312 0,0.4859994 0.166667,0.8920834 0.5,1.2187504 0.333333,0.326666 0.7363182,0.490234 1.2089844,0.490234 0.4719995,0 0.8756514,-0.163568 1.2089844,-0.490234 0.333333,-0.326667 0.5,-0.725266 0.5,-1.197266 0,-0.4859995 -0.166667,-0.8951826 -0.5,-1.2285156 -0.333333,-0.333333 -0.7369849,-0.5 -1.2089844,-0.5 z M 8.0429688,8.6875 c -0.333333,0 -0.6324847,0.1311982 -0.8964844,0.3945312 C 6.8824846,9.346031 6.75,9.6451826 6.75,9.9785156 c 0,0.3473334 0.1324846,0.6539694 0.3964844,0.9179684 0.2639997,0.264 0.5631514,0.396485 0.8964844,0.396485 H 12.582031 C 12.667811,11.029759 12.810428,10.78417 13,10.615234 c 0.314158,-0.280616 0.764135,-0.439453 1.171875,-0.439453 h 0.46875 c 0.407741,0 0.855765,0.158985 1.169922,0.439453 0.189414,0.168797 0.331535,0.414214 0.416015,0.677735 h 0.794922 c 0.333333,0 0.632485,-0.132485 0.896485,-0.396485 0.263333,-0.263999 0.394531,-0.570635 0.394531,-0.9179684 0,-0.333333 -0.131198,-0.6324846 -0.394531,-0.8964844 C 17.653969,8.8186982 17.354817,8.6875 17.021484,8.6875 Z M 3.4375,13.146484 c -0.4726662,0 -0.8756514,0.166667 -1.2089844,0.5 -0.333333,0.333333 -0.5,0.735032 -0.5,1.207032 0,0.485999 0.166667,0.892083 0.5,1.21875 0.333333,0.325999 0.7363182,0.490234 1.2089844,0.490234 0.4719995,0 0.8756514,-0.164235 1.2089844,-0.490234 0.333333,-0.326667 0.5,-0.725266 0.5,-1.197266 0,-0.486 -0.166667,-0.895183 -0.5,-1.228516 -0.333333,-0.333333 -0.7369849,-0.5 -1.2089844,-0.5 z M 8.0429688,13.5625 c -0.333333,0 -0.6324847,0.130532 -0.8964844,0.394531 C 6.8824846,14.221031 6.75,14.520183 6.75,14.853516 c 0,0.347333 0.1324846,0.653969 0.3964844,0.917968 0.2639997,0.264 0.5631514,0.396485 0.8964844,0.396485 H 10.03125 C 9.985538,15.92966 9.986027,15.678358 10.04492,15.455078 10.12589,15.148084 10.389523,14.941651 10.626951,14.732422 10.380403,14.52554 10.114609,14.310259 10.025389,13.998047 9.986266,13.860916 9.972079,13.712745 9.974607,13.5625 Z m 10.2500002,1.083984 c -0.03323,0.02743 -0.06681,0.05476 -0.09961,0.08203 0.03855,0.03356 0.07792,0.06815 0.117188,0.101562 -0.0012,-0.06277 -0.007,-0.123307 -0.01758,-0.183594 z"
transform="translate(-1.7285156,-3.375)" /><path
transform="translate(-1.7285156,-3.375)"/>
<path
style="color:#000000;fill:#40d29f;stroke-width:2;paint-order:stroke markers fill;fill-opacity:1"
d="m 12.442996,14.874619 q -0.295876,0 -0.505045,-0.186837 -0.209662,-0.186838 -0.209662,-0.451125 v -1.440446 l -1.16293,0.620023 q -0.265504,0.127774 -0.541296,0.06389 -0.2753016,-0.06389 -0.4183406,-0.282664 l -0.244932,-0.382867 q -0.142553,-0.227969 -0.07642,-0.47869 0.06613,-0.250722 0.321348,-0.387241 L 10.779424,11.33783 9.5856344,10.736185 q -0.255217,-0.136961 -0.326737,-0.38724 -0.07153,-0.250722 0.07153,-0.478691 l 0.265013,-0.373676 q 0.153328,-0.227967 0.4340186,-0.296228 0.28069,-0.0687 0.52562,0.06827 l 1.173216,0.610833 V 8.439007 q 0,-0.264287 0.209662,-0.451125 0.209169,-0.186837 0.505047,-0.186837 h 0.469287 q 0.295874,0 0.505047,0.186837 0.209659,0.186838 0.209659,0.451125 v 1.440446 l 1.173216,-0.620024 q 0.255218,-0.127774 0.525622,-0.05908 0.270404,0.06827 0.423731,0.277851 l 0.285589,0.401242 q 0.153327,0.227969 0.07642,0.478254 -0.07642,0.25072 -0.341923,0.387677 l -1.183505,0.592455 1.173707,0.610833 q 0.24493,0.118573 0.331635,0.378052 0.08671,0.259911 -0.06662,0.478692 l -0.265012,0.392052 q -0.153326,0.21878 -0.423729,0.291853 -0.270405,0.07263 -0.525621,-0.06389 l -1.183504,-0.629204 v 1.440446 q 0,0.264286 -0.20966,0.451125 -0.209172,0.186837 -0.505048,0.186837 z"
id="path6912" /></svg>
id="path6912"/></svg>

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs7612" />
id="defs7612"/>
<sodipodi:namedview
id="namedview7610"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg7608" />
inkscape:current-layer="svg7608"/>
<path
d="M 7.666,9.479 6.479,8.271 Q 6.104,7.916 5.604,7.916 q -0.5,0 -0.875,0.375 -0.375,0.375 -0.375,0.865 0,0.489 0.375,0.865 l 2,2.02 q 0.416,0.396 0.927,0.396 0.51,0 0.906,-0.396 L 12.833,7.75 Q 13.166,7.416 13.052,6.958 12.937,6.5 12.833,6.041 12.458,5.666 11.968,5.666 q -0.489,0 -0.864,0.375 z m 1.167,8.187 q -1.854,0 -3.458,-0.687 Q 3.771,16.291 2.573,15.093 1.375,13.895 0.687,12.291 0,10.687 0,8.833 0,6.958 0.687,5.364 1.375,3.771 2.573,2.573 3.771,1.375 5.375,0.687 6.979,0 8.833,0 q 1.875,0 3.469,0.687 1.593,0.688 2.791,1.886 1.198,1.198 1.886,2.791 0.687,1.594 0.687,3.469 0,1.854 -0.687,3.458 -0.688,1.604 -1.886,2.802 -1.198,1.198 -2.791,1.886 -1.594,0.687 -3.469,0.687 z"
id="path7606"
style="fill:#46c0e1;fill-opacity:1" />
style="fill:#46c0e1;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -11,7 +11,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs16" />
id="defs16"/>
<sodipodi:namedview
id="namedview14"
pagecolor="#ffffff"
@ -30,9 +30,9 @@
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg12" />
inkscape:current-layer="svg12"/>
<path
d="m 12.709,15.063 q -0.771,0 -1.313,-0.521 -0.541,-0.521 -0.562,-1.271 V 12.604 H 9.376 q -0.792,0 -1.344,-0.552 Q 7.48,11.5 7.48,10.73 V 4.313 H 6.021 V 4.938 Q 6.021,5.709 5.469,6.23 4.917,6.75 4.146,6.75 H 1.876 Q 1.105,6.75 0.553,6.198 0,5.646 0,4.875 v -3 Q 0,1.104 0.553,0.552 1.105,0 1.876,0 h 2.27 q 0.771,0 1.323,0.521 0.552,0.521 0.552,1.271 v 0.646 h 4.813 V 1.792 q 0,-0.75 0.552,-1.271 Q 11.938,0 12.709,0 H 15 q 0.771,0 1.323,0.552 0.553,0.552 0.553,1.323 v 3 q 0,0.771 -0.553,1.323 Q 15.771,6.75 15,6.75 H 12.709 Q 11.938,6.75 11.386,6.23 10.834,5.709 10.834,4.938 V 4.313 H 9.376 v 6.417 h 1.458 v -0.626 q 0,-0.77 0.552,-1.291 0.552,-0.521 1.323,-0.521 H 15 q 0.771,0 1.323,0.552 0.553,0.552 0.553,1.323 v 3.021 q 0,0.771 -0.553,1.323 -0.552,0.552 -1.323,0.552 z"
id="path10"
style="fill:#c689ff;fill-opacity:1" />
style="fill:#c689ff;fill-opacity:1"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -1,7 +1,8 @@
## A node in the behavior tree. Every node must return `SUCCESS`, `FAILURE` or
## `RUNNING` when ticked.
@tool
class_name BeehaveNode extends Node
class_name BeehaveNode
extends Node
enum {
SUCCESS,

@ -1,14 +1,14 @@
## Controls the flow of execution of the entire behavior tree.
@tool
@icon("../icons/tree.svg")
class_name BeehaveTree extends Node
class_name BeehaveTree
extends Node
enum {
SUCCESS,
FAILURE,
RUNNING
}
signal tree_enabled
signal tree_disabled
@ -28,11 +28,11 @@ signal tree_disabled
return enabled
## An optional node path this behavior tree should apply to.
@export_node_path var actor_node_path : NodePath
@export_node_path var actor_node_path: NodePath
## Custom blackboard node. An internal blackboard will be used
## if no blackboard is provided explicitly.
@export var blackboard:Blackboard:
@export var blackboard: Blackboard:
set(b):
blackboard = b
if blackboard and _internal_blackboard:
@ -61,14 +61,14 @@ signal tree_disabled
BeehaveDebuggerMessages.unregister_tree(get_instance_id())
var actor : Node
var status : int = -1
var actor: Node
var status: int = -1
var _internal_blackboard: Blackboard
var _process_time_metric_name : String
var _process_time_metric_value : float = 0.0
var _process_time_metric_name: String
var _process_time_metric_value: float = 0.0
var _can_send_message: bool = false
func init() -> void:
if Engine.is_editor_hint():
return
@ -141,7 +141,7 @@ func tick() -> int:
func _get_configuration_warnings() -> PackedStringArray:
var warnings:PackedStringArray = []
var warnings: PackedStringArray = []
if get_children().any(func(x): return not (x is BeehaveNode)):
warnings.append("All children of this node should inherit from BeehaveNode class.")
@ -174,6 +174,7 @@ func get_last_condition_status() -> String:
return "RUNNING"
return ""
## interrupts this tree if anything was running
func interrupt() -> void:
if self.get_child_count() != 0:

@ -1,8 +1,8 @@
## A Composite node controls the flow of execution of its children in a specific manner.
@tool
@icon("../../icons/category_composite.svg")
class_name Composite extends BeehaveNode
class_name Composite
extends BeehaveNode
var running_child: BeehaveNode = null

@ -1,5 +1,6 @@
@tool
class_name RandomizedComposite extends Composite
class_name RandomizedComposite
extends Composite
const WEIGHTS_PREFIX = "Weights/"

@ -4,8 +4,8 @@
## If a child returns `RUNNING` it will tick again.
@tool
@icon("../../icons/selector.svg")
class_name SelectorComposite extends Composite
class_name SelectorComposite
extends Composite
var last_execution_index: int = 0

@ -3,12 +3,14 @@
## will be executed in a random order.
@tool
@icon("../../icons/selector_random.svg")
class_name SelectorRandomComposite extends RandomizedComposite
class_name SelectorRandomComposite
extends RandomizedComposite
## A shuffled list of the children that will be executed in reverse order.
var _children_bag: Array[Node] = []
var c: Node
func _ready() -> void:
super()
if random_seed == 0:

@ -4,7 +4,8 @@
## If a child returns `RUNNING` it will restart.
@tool
@icon("../../icons/selector_reactive.svg")
class_name SelectorReactiveComposite extends Composite
class_name SelectorReactiveComposite
extends Composite
func tick(actor: Node, blackboard: Blackboard) -> int:
for c in get_children():

@ -5,8 +5,8 @@
## In case a child returns `RUNNING` this node will tick again.
@tool
@icon("../../icons/sequence.svg")
class_name SequenceComposite extends Composite
class_name SequenceComposite
extends Composite
var successful_index: int = 0

@ -3,11 +3,11 @@
## will be executed in a random order.
@tool
@icon("../../icons/sequence_random.svg")
class_name SequenceRandomComposite extends RandomizedComposite
class_name SequenceRandomComposite
extends RandomizedComposite
# Emitted whenever the children are shuffled.
signal reset(new_order: Array[Node])
## Whether the sequence should start where it left off after a previous failure.
@export var resume_on_failure: bool = false
## Whether the sequence should start where it left off after a previous interruption.

@ -5,8 +5,8 @@
## In case a child returns `RUNNING` this node will restart.
@tool
@icon("../../icons/sequence_reactive.svg")
class_name SequenceReactiveComposite extends Composite
class_name SequenceReactiveComposite
extends Composite
var successful_index: int = 0
@ -52,6 +52,7 @@ func interrupt(actor: Node, blackboard: Blackboard) -> void:
_reset()
super(actor, blackboard)
func _reset() -> void:
successful_index = 0

@ -5,8 +5,8 @@
## In case a child returns `RUNNING` this node will restart.
@tool
@icon("../../icons/sequence_reactive.svg")
class_name SequenceStarComposite extends Composite
class_name SequenceStarComposite
extends Composite
var successful_index: int = 0

@ -2,8 +2,8 @@
## Must only have one child.
@tool
@icon("../../icons/category_decorator.svg")
class_name Decorator extends BeehaveNode
class_name Decorator
extends BeehaveNode
var running_child: BeehaveNode = null

@ -1,8 +1,8 @@
## A Failer node will always return a `FAILURE` status code.
@tool
@icon("../../icons/failer.svg")
class_name AlwaysFailDecorator extends Decorator
class_name AlwaysFailDecorator
extends Decorator
func tick(actor: Node, blackboard: Blackboard) -> int:
var c = get_child(0)

@ -2,8 +2,8 @@
## code or `SUCCESS` in case its child returns a `FAILURE` status code.
@tool
@icon("../../icons/inverter.svg")
class_name InverterDecorator extends Decorator
class_name InverterDecorator
extends Decorator
func tick(actor: Node, blackboard: Blackboard) -> int:
var c = get_child(0)

@ -2,11 +2,13 @@
## maximum ticks is reached, it will return a `FAILURE` status code.
@tool
@icon("../../icons/limiter.svg")
class_name LimiterDecorator extends Decorator
class_name LimiterDecorator
extends Decorator
@onready var cache_key = 'limiter_%s' % self.get_instance_id()
@export var max_count : float = 0
@export var max_count: float = 0
func tick(actor: Node, blackboard: Blackboard) -> int:
var child = self.get_child(0)

@ -1,8 +1,8 @@
## A succeeder node will always return a `SUCCESS` status code.
@tool
@icon("../../icons/succeeder.svg")
class_name AlwaysSucceedDecorator extends Decorator
class_name AlwaysSucceedDecorator
extends Decorator
func tick(actor: Node, blackboard: Blackboard) -> int:
var c = get_child(0)

@ -3,7 +3,8 @@
## every time before the node runs.
@tool
@icon("../../icons/limiter.svg")
class_name TimeLimiterDecorator extends Decorator
class_name TimeLimiterDecorator
extends Decorator
@export var wait_time: = 0.0

@ -4,8 +4,8 @@
## action is completed.
@tool
@icon("../../icons/action.svg")
class_name ActionLeaf extends Leaf
class_name ActionLeaf
extends Leaf
func get_class_name() -> Array[StringName]:
var classes := super()

@ -2,8 +2,8 @@
## Returns [code]FAILURE[/code] if any of the expression fails or the
## comparison operation returns [code]false[/code], otherwise it returns [code]SUCCESS[/code].
@tool
class_name BlackboardCompareCondition extends ConditionLeaf
class_name BlackboardCompareCondition
extends ConditionLeaf
enum Operators {
EQUAL,
@ -13,22 +13,21 @@ enum Operators {
GREATER_EQUAL,
LESS_EQUAL,
}
## Expression represetning left operand.
## This value can be any valid GDScript expression.
## In order to use the existing blackboard keys for comparison,
## use get_value("key_name") e.g. get_value("direction").length()
@export_placeholder(EXPRESSION_PLACEHOLDER) var left_operand: String = ""
## Comparison operator.
@export_enum("==", "!=", ">", "<", ">=", "<=") var operator: int = 0
## Expression represetning right operand.
## This value can be any valid GDScript expression.
## In order to use the existing blackboard keys for comparison,
## use get_value("key_name") e.g. get_value("direction").length()
@export_placeholder(EXPRESSION_PLACEHOLDER) var right_operand: String = ""
@onready var _left_expression: Expression = _parse_expression(left_operand)
@onready var _right_expression: Expression = _parse_expression(right_operand)

@ -1,8 +1,8 @@
## Erases the specified key from the blackboard.
## Returns [code]FAILURE[/code] if expression execution fails, otherwise [code]SUCCESS[/code].
@tool
class_name BlackboardEraseAction extends ActionLeaf
class_name BlackboardEraseAction
extends ActionLeaf
## Expression representing a blackboard key.
@export_placeholder(EXPRESSION_PLACEHOLDER) var key: String = ""

@ -1,8 +1,8 @@
## Returns [code]FAILURE[/code] if expression execution fails or the specified key doesn't exist.
## Returns [code]SUCCESS[/code] if blackboard has the specified key.
@tool
class_name BlackboardHasCondition extends ConditionLeaf
class_name BlackboardHasCondition
extends ConditionLeaf
## Expression representing a blackboard key.
@export_placeholder(EXPRESSION_PLACEHOLDER) var key: String = ""

@ -1,15 +1,15 @@
## Sets the specified key to the specified value.
## Returns [code]FAILURE[/code] if expression execution fails, otherwise [code]SUCCESS[/code].
@tool
class_name BlackboardSetAction extends ActionLeaf
class_name BlackboardSetAction
extends ActionLeaf
## Expression representing a blackboard key.
@export_placeholder(EXPRESSION_PLACEHOLDER) var key: String = ""
## Expression representing a blackboard value to assign to the specified key.
@export_placeholder(EXPRESSION_PLACEHOLDER) var value: String = ""
@onready var _key_expression: Expression = _parse_expression(key)
@onready var _value_expression: Expression = _parse_expression(value)

@ -2,8 +2,8 @@
## a single simple condition. They should never return `RUNNING`.
@tool
@icon("../../icons/condition.svg")
class_name ConditionLeaf extends Leaf
class_name ConditionLeaf
extends Leaf
func get_class_name() -> Array[StringName]:
var classes := super()

@ -1,8 +1,8 @@
## Base class for all leaf nodes of the tree.
@tool
@icon("../../icons/category_leaf.svg")
class_name Leaf extends BeehaveNode
class_name Leaf
extends BeehaveNode
const EXPRESSION_PLACEHOLDER: String = "Insert an expression..."

@ -1,7 +1,7 @@
[plugin]
name="Beehave"
description="🐝 Behavior Tree addon for Godot Engine"
author="bitbrain"
version="2.7.6"
script="plugin.gd"
name = "Beehave"
description = "🐝 Behavior Tree addon for Godot Engine"
author = "bitbrain"
version = "2.7.6"
script = "plugin.gd"

@ -5,6 +5,7 @@ const BeehaveEditorDebugger := preload("debug/debugger.gd")
var editor_debugger: BeehaveEditorDebugger
var frames: RefCounted
func _init():
name = "BeehavePlugin"
add_autoload_singleton("BeehaveGlobalMetrics", "res://addons/beehave/metrics/beehave_global_metrics.gd")

@ -1,7 +1,6 @@
@tool
class_name BeehaveUtils
static func get_plugin() -> EditorPlugin:
var tree: SceneTree = Engine.get_main_loop()
return tree.get_root().get_child(0).get_node_or_null("BeehavePlugin")

@ -2,7 +2,6 @@ extends Object
const PLUGIN_BUNDLE_NAME: StringName = "aseprite_importers"
const ASEPRITE_EXECUTABLE_PATH_SETTING_NAME: StringName = PLUGIN_BUNDLE_NAME + "/aseprite_executable_path"
enum CompressMode {
LOSSLESS = 0,
LOSSY = 1,
@ -16,8 +15,7 @@ const COMPRESS_MODES_NAMES: PackedStringArray = [
"VRAM Compressed",
"VRAM Uncompressed",
"Basis Universal",
]
]
# ONLY FOR VRAM_COMPRESSED
enum HdrCompression {
DISABLED = 0,
@ -28,8 +26,7 @@ const HDR_COMPRESSION_NAMES: PackedStringArray = [
"Disabled",
"Opaque Only",
"Always",
]
]
# EXCEPT LOSSLESS
enum NormalMap {
DETECT = 0,
@ -40,8 +37,7 @@ const NORMAL_MAP_NAMES: PackedStringArray = [
"Detect",
"Enable",
"Disabled",
]
]
enum ChannelPack {
SRGB_FRIENDLY = 0,
OPTIMIZED = 1,
@ -49,8 +45,7 @@ enum ChannelPack {
const CHANNEL_PACK_NAMES: PackedStringArray = [
"sRGB Friendly",
"Optimized",
]
]
enum Roughness {
DETECT = 0,
DISABLED = 1,
@ -68,8 +63,7 @@ const ROUGHNESS_NAMES: PackedStringArray = [
"Blue",
"Alpha",
"Gray",
]
]
enum CompressMode3D {
DISABLED = 0,
VRAM_COMPRESSED = 1,
@ -79,10 +73,10 @@ const COMPRESS_MODE_3D_NAMES: PackedStringArray = [
"Disabled",
"VRAM Compressed",
"Basis Universal",
]
]
const EMPTY_CALLABLE: Callable = Callable()
static func create_option(
name: String,
default_value: Variant,
@ -90,7 +84,7 @@ static func create_option(
hint_string: String = "",
usage: PropertyUsageFlags = PROPERTY_USAGE_NONE,
get_is_visible: Callable = EMPTY_CALLABLE
) -> Dictionary:
) -> Dictionary:
var option_data: Dictionary = {
name = name,
default_value = default_value,
@ -110,8 +104,7 @@ const SPRITESHEET_BORDER_TYPES: PackedStringArray = [
"None",
"Transparent",
"Extruded",
]
]
enum AnimationDirection {
FORWARD = 0,
REVERSE = 1,
@ -122,14 +115,12 @@ const ASEPRITE_OUTPUT_ANIMATION_DIRECTIONS: PackedStringArray = [
"forward", "reverse", "pingpong", "pingpong_reverse" ]
const PRESET_OPTIONS_ANIMATION_DIRECTIONS: PackedStringArray = [
"Forward", "Reverse", "Ping-pong", "Ping-pong reverse" ]
enum SpritesheetLayout {
PACKED = 0,
BY_ROWS = 1,
BY_COLUMNS = 2,
}
const SPRITESHEET_LAYOUTS: PackedStringArray = ["Packed", "By rows", "By columns"]
const OPTION_SPRITESHEET_BORDER_TYPE: String = "spritesheet/border_type"
const OPTION_SPRITESHEET_TRIM: String = "spritesheet/trim"
const OPTION_SPRITESHEET_IGNORE_EMPTY: String = "spritesheet/ignore_empty"
@ -148,7 +139,6 @@ const SPRITESHEET_FIXED_ROWS_COUNT: String = "spritesheet/fixed_rows_count"
const SPRITESHEET_FIXED_COLUMNS_COUNT: String = "spritesheet/fixed_columns_count"
class ParsedAnimationOptions:
var border_type: BorderType
var trim: bool
@ -161,6 +151,8 @@ class ParsedAnimationOptions:
var default_animation_direction: AnimationDirection
var default_animation_repeat_count: int
var animation_autoplay_name: String
func _init(options: Dictionary) -> void:
border_type = options[OPTION_SPRITESHEET_BORDER_TYPE]
trim = options[OPTION_SPRITESHEET_TRIM]
@ -175,6 +167,7 @@ class ParsedAnimationOptions:
default_animation_repeat_count = options[OPTION_ANIMATION_DEFAULT_REPEAT_COUNT]
animation_autoplay_name = options[OPTION_ANIMATION_AUTOPLAY_NAME].strip_edges().strip_escapes()
static func create_common_animation_options() -> Array[Dictionary]:
return [
create_option(OPTION_SPRITESHEET_LAYOUT, SpritesheetLayout.PACKED, PROPERTY_HINT_ENUM, ",".join(SPRITESHEET_LAYOUTS), PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED ),
@ -183,12 +176,15 @@ static func create_common_animation_options() -> Array[Dictionary]:
create_option(SPRITESHEET_FIXED_COLUMNS_COUNT, 1, PROPERTY_HINT_RANGE, "1,32,1,or_greater", PROPERTY_USAGE_EDITOR,
func(options): return options[OPTION_SPRITESHEET_LAYOUT] == SpritesheetLayout.BY_ROWS),
create_option(OPTION_SPRITESHEET_BORDER_TYPE, BorderType.None, PROPERTY_HINT_ENUM, ",".join(SPRITESHEET_BORDER_TYPES), PROPERTY_USAGE_EDITOR),
create_option(OPTION_SPRITESHEET_TRIM, false, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR,
func(options): return options[OPTION_SPRITESHEET_LAYOUT] != SpritesheetLayout.PACKED),
create_option(OPTION_SPRITESHEET_TRIM, false, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR,
func(options): return options[OPTION_SPRITESHEET_LAYOUT] != SpritesheetLayout.PACKED),
create_option(OPTION_SPRITESHEET_IGNORE_EMPTY, false, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR),
create_option(OPTION_SPRITESHEET_MERGE_DUPLICATES, false, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR),
create_option(OPTION_ANIMATION_DEFAULT_NAME, "default", PROPERTY_HINT_PLACEHOLDER_TEXT, "default", PROPERTY_USAGE_EDITOR),
create_option(OPTION_ANIMATION_DEFAULT_DIRECTION, AnimationDirection.FORWARD, PROPERTY_HINT_ENUM, ",".join(PRESET_OPTIONS_ANIMATION_DIRECTIONS), PROPERTY_USAGE_EDITOR),
create_option(OPTION_ANIMATION_DEFAULT_REPEAT_COUNT, 0, PROPERTY_HINT_RANGE, "0,32,1,or_greater", PROPERTY_USAGE_EDITOR),
create_option(OPTION_ANIMATION_AUTOPLAY_NAME, "", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR),
]
create_option(OPTION_SPRITESHEET_MERGE_DUPLICATES, false, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR),
create_option(OPTION_ANIMATION_DEFAULT_NAME, "default", PROPERTY_HINT_PLACEHOLDER_TEXT, "default", PROPERTY_USAGE_EDITOR),
create_option(OPTION_ANIMATION_DEFAULT_DIRECTION, AnimationDirection.FORWARD, PROPERTY_HINT_ENUM, ",".join(PRESET_OPTIONS_ANIMATION_DIRECTIONS), PROPERTY_USAGE_EDITOR),
create_option(OPTION_ANIMATION_DEFAULT_REPEAT_COUNT, 0, PROPERTY_HINT_RANGE, "0,32,1,or_greater", PROPERTY_USAGE_EDITOR),
create_option(OPTION_ANIMATION_AUTOPLAY_NAME, "", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR),
]

@ -13,9 +13,11 @@ func set_preset(name: StringName, options: Array[Dictionary]) -> void:
__option_visibility_checkers[option.name] = option_visibility_checker
_presets[name] = preset
func _init(parent_plugin: EditorPlugin) -> void:
super(parent_plugin)
class ExportResult:
var error: Error
var error_message: String
@ -24,25 +26,31 @@ class ExportResult:
var texture: Texture2D
var spritesheet_metadata: SpritesheetMetadata
class FrameData:
var region_rect: Rect2i
var region_rect_offset: Vector2i
var duration_ms: int
class AnimationTag:
var name: String
var frames: Array[FrameData]
var duration_ms: int
var looped: bool
class SpritesheetMetadata:
var source_size: Vector2i
var spritesheet_size: Vector2i
var animation_tags: Array[AnimationTag]
class TrackFrame:
var duration_ms: int
var value: Variant
func _init(duration_ms: int, value: Variant) -> void:
self.duration_ms = duration_ms
self.value = value
@ -51,7 +59,8 @@ const __sheet_types_by_spritesheet_layout: Dictionary = {
Common.SpritesheetLayout.PACKED: "packed",
Common.SpritesheetLayout.BY_ROWS: "rows",
Common.SpritesheetLayout.BY_COLUMNS: "columns",
}
}
func _export_texture(source_file: String, options: Common.ParsedAnimationOptions, image_options: Dictionary, gen_files: Array[String]) -> ExportResult:
var export_result = ExportResult.new()
@ -88,7 +97,7 @@ func _export_texture(source_file: String, options: Common.ParsedAnimationOptions
] + variable_options + [
"--sheet", global_png_path,
"--data", global_data_path,
"--inner-padding","1",
"--inner-padding", "1",
ProjectSettings.globalize_path(source_file)
])
@ -171,18 +180,18 @@ func _export_texture(source_file: String, options: Common.ParsedAnimationOptions
# This is a working way to reuse a previously imported resource. Don't change it!
var texture: Texture2D = ResourceLoader.load(png_path, "Texture2D", ResourceLoader.CACHE_MODE_REPLACE) as Texture2D
export_result.texture = texture
export_result.raw_output = data
export_result.parsed_json = json
export_result.spritesheet_metadata = spritesheet_metadata
return export_result
static func _create_animation_player(
spritesheet_metadata: SpritesheetMetadata,
track_value_getters_by_property_path: Dictionary,
animation_autoplay_name: String = ""
) -> AnimationPlayer:
) -> AnimationPlayer:
var animation_player: AnimationPlayer = AnimationPlayer.new()
animation_player.name = "AnimationPlayer"
var animation_library: AnimationLibrary = AnimationLibrary.new()
@ -199,9 +208,9 @@ static func _create_animation_player(
animation.loop_mode = Animation.LOOP_LINEAR if animation_tag.looped else Animation.LOOP_NONE
animation_library.add_animation(animation_tag.name, animation)
animation_player.add_animation_library("", animation_library)
animation_player.add_animation_library("", animation_library)
if not animation_autoplay_name.is_empty():
if not animation_autoplay_name.is_empty():
if animation_player.has_animation(animation_autoplay_name):
animation_player.autoplay = animation_autoplay_name
else:
@ -210,31 +219,40 @@ static func _create_animation_player(
return animation_player
static func __create_track(
animation: Animation,
property_path: NodePath,
animation_tag: AnimationTag,
track_value_getter: Callable # func(fd: FrameData) -> Variant for each fd in animation_tag.frames
) -> int:
animation: Animation,
property_path: NodePath,
animation_tag: AnimationTag,
track_value_getter: Callable # func(fd: FrameData) -> Variant for each fd in animation_tag.frames
) -> int:
var track_index = animation.add_track(Animation.TYPE_VALUE)
animation.track_set_path(track_index, property_path)
animation.value_track_set_update_mode(track_index, Animation.UPDATE_DISCRETE)
animation.track_set_interpolation_loop_wrap(track_index, false)
animation.track_set_interpolation_type(track_index, Animation.INTERPOLATION_NEAREST)
var track_frames = animation_tag.frames.map(
animation.track_set_path(track_index, property_path)
animation.value_track_set_update_mode(track_index, Animation.UPDATE_DISCRETE)
animation.track_set_interpolation_loop_wrap(track_index, false)
animation.track_set_interpolation_type(track_index, Animation.INTERPOLATION_NEAREST)
var track_frames = animation_tag.frames.map(
func (frame_data: FrameData):
return TrackFrame.new(
frame_data.duration_ms,
track_value_getter.call(frame_data)))
track_value_getter.call(frame_data)
))
var transition: float = 1
var track_length_ms: int = 0
var previous_track_frame: TrackFrame = null
for track_frame in track_frames:
var track_length_ms: int = 0
var previous_track_frame: TrackFrame = null
for
track_frame in track_frames:
if previous_track_frame == null or track_frame.value != previous_track_frame.value:
animation.track_insert_key(track_index,
track_length_ms * 0.001, track_frame.value, transition)
previous_track_frame = track_frame
track_length_ms += track_frame.duration_ms
track_length_ms += track_frame.duration_ms
return track_index

@ -4,9 +4,7 @@ extends EditorImportPlugin
# Base class for all nested import plugins
const Common = preload("../common.gd")
var _parent_plugin: EditorPlugin
var _import_order: int = 0
var _importer_name: String = ""
var _priority: float = 1
@ -17,12 +15,15 @@ var _visible_name: String
var _presets: Dictionary
var __option_visibility_checkers: Dictionary
func _init(parent_plugin: EditorPlugin) -> void:
_parent_plugin = parent_plugin
func _get_import_options(path: String, preset_index: int) -> Array[Dictionary]:
return _presets.values()[preset_index] as Array[Dictionary]
func _get_option_visibility(path: String, option_name: StringName, options: Dictionary) -> bool:
var option_visibility_checker: Callable = __option_visibility_checkers.get(option_name, Common.EMPTY_CALLABLE)
if option_visibility_checker:
@ -33,33 +34,43 @@ func _get_option_visibility(path: String, option_name: StringName, options: Dict
else:
return true
func _get_import_order() -> int:
return _import_order
func _get_importer_name() -> String:
return _importer_name
func _get_preset_count() -> int:
return _presets.size()
func _get_preset_name(preset_index: int) -> String:
return _presets.keys()[preset_index]
func _get_priority() -> float:
return _priority
func _get_recognized_extensions() -> PackedStringArray:
return _recognized_extensions
func _get_resource_type() -> String:
return _resource_type
func _get_save_extension() -> String:
return _save_extension
func _get_visible_name() -> String:
return _visible_name
func _import(source_file: String, save_path: String, options: Dictionary,
platform_variants: Array[String], gen_files: Array[String]) -> Error:
platform_variants: Array[String], gen_files: Array[String]) -> Error:
return ERR_UNCONFIGURED

@ -12,9 +12,10 @@ func _init(parent_plugin: EditorPlugin) -> void:
set_preset("Animation", [])
func _import(source_file: String, save_path: String, options: Dictionary,
platform_variants: Array[String], gen_files: Array[String]) -> Error:
print("importing:",source_file)
platform_variants: Array[String], gen_files: Array[String]) -> Error:
print("importing:", source_file)
var status: Error = OK
var parsed_options = Common.ParsedAnimationOptions.new(options)
var export_result: ExportResult = _export_texture(source_file, parsed_options, options, gen_files)
@ -46,6 +47,7 @@ func _import(source_file: String, save_path: String, options: Dictionary,
Util.refresh_all_animation_by_sprite_frames(sprite_frames_res)
return status
static func update_sprite_frames(export_result: ExportResult, sprite_frames: SpriteFrames, animation_autoplay_name: String = "") -> Error:
var spritesheet_metadata: SpritesheetMetadata = export_result.spritesheet_metadata
var exported_animation_names: Array = export_result.spritesheet_metadata.animation_tags.map(

@ -3,15 +3,13 @@ extends EditorPlugin
const PLUGIN_SCRIPTS: Array[GDScript] = [
preload("editor_import_plugins/sprite_frames.gd"),
]
]
const Common = preload("common.gd")
const ImportPlugin = preload("editor_import_plugins/_animation_importer_base.gd")
var __import_plugins: Array[ImportPlugin]
var common_options: Array[Dictionary] = Common.create_common_animation_options()
func _enter_tree() -> void:
__register_project_setting(
Common.ASEPRITE_EXECUTABLE_PATH_SETTING_NAME, "",
@ -22,11 +20,13 @@ func _enter_tree() -> void:
add_import_plugin(import_plugin)
__import_plugins.append(import_plugin)
func _exit_tree() -> void:
for import_plugin in __import_plugins:
remove_import_plugin(import_plugin)
__import_plugins.clear()
func __register_project_setting(name: StringName, initial_value, type: int, hint: int, hint_string: String = "") -> void:
if not ProjectSettings.has_setting(name):
ProjectSettings.set_setting(name, initial_value)

@ -1,7 +1,7 @@
[plugin]
name="Aseprite Importers"
description="A bundle of plug-ins for importing Aesprite files into different types of Godot resources"
author="Nikolay Lebedev aka nklbdev"
version="1.0.0"
script="editor_plugin.gd"
name = "Aseprite Importers"
description = "A bundle of plug-ins for importing Aesprite files into different types of Godot resources"
author = "Nikolay Lebedev aka nklbdev"
version = "1.0.0"
script = "editor_plugin.gd"

@ -2,8 +2,15 @@
Copyright 2022 Gennady "Don Tnowe" Krupenyov
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -1,6 +1,5 @@
@tool
extends Control
func _ready():
modulate = get_theme_color("accent_color", "Editor")

@ -1,7 +1,7 @@
@tool
extends Button
@export var icon_name := "Node" :
@export var icon_name := "Node":
set(v):
icon_name = v
if has_theme_icon(v, "EditorIcons"):

@ -2,26 +2,22 @@
extends Control
signal grid_updated()
const TablesPluginSettingsClass := preload("res://addons/resources_spreadsheet_view/settings_grid.gd")
@export @onready var node_folder_path: LineEdit = $"HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path"
@export @onready var node_recent_paths: OptionButton = $"HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths"
@export @onready var node_table_root: GridContainer = $"HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid"
@export @onready var node_columns: HBoxContainer = $"HeaderContentSplit/VBoxContainer/Columns/Columns"
@export @onready var node_page_manager: Control = $"HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages"
@export @onready var node_folder_path : LineEdit = $"HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path"
@export @onready var node_recent_paths : OptionButton = $"HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths"
@export @onready var node_table_root : GridContainer = $"HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid"
@export @onready var node_columns : HBoxContainer = $"HeaderContentSplit/VBoxContainer/Columns/Columns"
@export @onready var node_page_manager : Control = $"HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages"
@onready var _on_cell_gui_input : Callable = $"InputHandler"._on_cell_gui_input
@onready var _on_cell_gui_input: Callable = $"InputHandler"._on_cell_gui_input
@onready var _selection := $"SelectionManager"
var editor_interface : Object
var editor_plugin : EditorPlugin
var editor_interface: Object
var editor_plugin: EditorPlugin
var current_path := ""
var save_data_path : String = get_script().resource_path.get_base_dir() + "/saved_state.json"
var save_data_path: String = get_script().resource_path.get_base_dir() + "/saved_state.json"
var sorting_by := ""
var sorting_reverse := false
var columns := []
var column_types := []
var column_hints := []
@ -30,10 +26,8 @@ var rows := []
var remembered_paths := {}
var remembered_paths_total_count := 0
var table_functions_dict := {}
var search_cond : RefCounted
var io : RefCounted
var search_cond: RefCounted
var io: RefCounted
var first_row := 0
var last_row := 0
@ -74,13 +68,13 @@ func _on_filesystem_changed():
break
func _get_file_count_recursive(path : String) -> int:
var editor_fs : EditorFileSystem = editor_interface.get_resource_filesystem()
func _get_file_count_recursive(path: String) -> int:
var editor_fs: EditorFileSystem = editor_interface.get_resource_filesystem()
var path_dir := editor_fs.get_filesystem_path(path)
if !path_dir: return 0
var file_total_count := 0
var folder_stack : Array[EditorFileSystemDirectory] = [path_dir]
var folder_stack: Array[EditorFileSystemDirectory] = [path_dir]
while folder_stack.size() > 0:
path_dir = folder_stack.pop_back()
file_total_count += path_dir.get_file_count()
@ -90,7 +84,7 @@ func _get_file_count_recursive(path : String) -> int:
return file_total_count
func display_folder(folderpath : String, sort_by : String = "", sort_reverse : bool = false, force_rebuild : bool = false, is_echo : bool = false):
func display_folder(folderpath: String, sort_by: String = "", sort_reverse: bool = false, force_rebuild: bool = false, is_echo: bool = false):
if folderpath == "": return # Root folder resources tend to have MANY properties.
$"HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Label".visible = false
if folderpath.get_extension() == "":
@ -118,11 +112,11 @@ func display_folder(folderpath : String, sort_by : String = "", sort_reverse : b
grid_updated.emit()
func refresh(force_rebuild : bool = true):
func refresh(force_rebuild: bool = true):
display_folder(current_path, sorting_by, sorting_reverse, force_rebuild)
func _load_resources_from_path(path : String, sort_by : String, sort_reverse : bool):
func _load_resources_from_path(path: String, sort_by: String, sort_reverse: bool):
if path.ends_with("/"):
io = ResourceTablesEditFormatTres.new()
@ -158,7 +152,7 @@ func fill_property_data(res):
_selection.initialize_editors(column_values, column_types, column_hints)
func insert_row_sorted(res : Resource, rows : Array, sort_by : String, sort_reverse : bool):
func insert_row_sorted(res: Resource, rows: Array, sort_by: String, sort_reverse: bool):
if search_cond != null and !search_cond.can_show(res, rows.size()):
return
@ -186,13 +180,13 @@ func compare_values(a, b) -> bool:
func _set_sorting(sort_by):
var sort_reverse : bool = !(sorting_by != sort_by or sorting_reverse)
var sort_reverse: bool = !(sorting_by != sort_by or sorting_reverse)
sorting_reverse = sort_reverse
display_folder(current_path, sort_by, sort_reverse)
sorting_by = sort_by
func _update_table(columns_changed : bool):
func _update_table(columns_changed: bool):
if columns_changed:
node_table_root.columns = columns.size()
for x in node_table_root.get_children():
@ -214,16 +208,16 @@ func _update_table(columns_changed : bool):
)
func _update_row_range(first : int, last : int, color_rows : bool):
func _update_row_range(first: int, last: int, color_rows: bool):
for i in last - first:
_update_row(first + i, color_rows)
func _update_row(row_index : int, color_rows : bool = true):
var current_node : Control
func _update_row(row_index: int, color_rows: bool = true):
var current_node: Control
var next_color := Color.WHITE
var column_editors : Array = _selection.column_editors
var res_path : String = rows[row_index].resource_path.get_basename().substr(current_path.length())
var column_editors: Array = _selection.column_editors
var res_path: String = rows[row_index].resource_path.get_basename().substr(current_path.length())
for i in columns.size():
if node_table_root.get_child_count() <= (row_index - first_row) * columns.size() + i:
current_node = column_editors[i].create_cell(self)
@ -252,14 +246,14 @@ func save_data():
var file = FileAccess.open(save_data_path, FileAccess.WRITE)
file.store_string(JSON.stringify(
{
"recent_paths" : node_recent_paths.recent_paths,
"hidden_columns" : node_columns.hidden_columns,
"table_functions" : table_functions_dict,
"recent_paths": node_recent_paths.recent_paths,
"hidden_columns": node_columns.hidden_columns,
"table_functions": table_functions_dict,
}
, " "))
func _on_path_text_submitted(new_text : String = ""):
func _on_path_text_submitted(new_text: String = ""):
if new_text != "":
current_path = new_text
display_folder(new_text, "", false, true)
@ -268,7 +262,7 @@ func _on_path_text_submitted(new_text : String = ""):
refresh()
func _on_FileDialog_dir_selected(dir : String):
func _on_FileDialog_dir_selected(dir: String):
node_folder_path.text = dir
display_folder(dir)
@ -277,7 +271,7 @@ func get_selected_column() -> int:
return _selection.get_cell_column(_selection.edited_cells[0])
func select_column(column_index : int):
func select_column(column_index: int):
_selection.deselect_all_cells()
_selection.select_cell(node_table_root.get_child(column_index))
_selection.select_cells_to(node_table_root.get_child(
@ -286,7 +280,7 @@ func select_column(column_index : int):
)
func set_edited_cells_values(new_cell_values : Array):
func set_edited_cells_values(new_cell_values: Array):
var edited_rows = _selection.get_edited_rows()
var column = _selection.get_cell_column(_selection.edited_cells[0])
var edited_cells_resources = _get_row_resources(edited_rows)
@ -317,7 +311,9 @@ func set_edited_cells_values(new_cell_values : Array):
new_cell_values.duplicate()
)
editor_plugin.undo_redo.commit_action(true)
# editor_interface.get_resource_filesystem().scan()
# editor_interface.get_resource_filesystem().scan()
func rename_row(row, new_name):
@ -327,7 +323,7 @@ func rename_row(row, new_name):
refresh()
func duplicate_selected_rows(new_name : String):
func duplicate_selected_rows(new_name: String):
io.duplicate_rows(_get_row_resources(_selection.get_edited_rows()), new_name)
refresh()
@ -347,9 +343,9 @@ func get_last_selected_row():
func get_edited_cells_values() -> Array:
var cells : Array = _selection.edited_cells.duplicate()
var column_index : int = _selection.get_cell_column(_selection.edited_cells[0])
var cell_editor : Object = _selection.column_editors[column_index]
var cells: Array = _selection.edited_cells.duplicate()
var column_index: int = _selection.get_cell_column(_selection.edited_cells[0])
var cell_editor: Object = _selection.column_editors[column_index]
var result := []
result.resize(cells.size())
@ -359,7 +355,7 @@ func get_edited_cells_values() -> Array:
return result
func _update_resources(update_rows : Array, update_row_indices : Array[int], update_column : int, values : Array):
func _update_resources(update_rows: Array, update_row_indices: Array[int], update_column: int, values: Array):
var column_editor = _selection.column_editors[update_column]
for i in update_rows.size():
var row = update_row_indices[i]

@ -1,36 +1,44 @@
class_name ResourceTablesEditFormat
extends RefCounted
var editor_view : Control
var editor_view: Control
## Override to define reading behaviour.
func get_value(entry, key : String):
func get_value(entry, key: String):
pass
## Override to define writing behaviour. This is NOT supposed to save - use `save_entries`.
func set_value(entry, key : String, value, index : int):
func set_value(entry, key: String, value, index: int):
pass
## Override to define how the data gets saved.
func save_entries(all_entries : Array, indices : Array):
func save_entries(all_entries: Array, indices: Array):
pass
## Override to allow editing rows from the Inspector.
func create_resource(entry) -> Resource:
return Resource.new()
## Override to define duplication behaviour. `name_input` should be a suffix if multiple entries, and full name if one.
func duplicate_rows(rows : Array, name_input : String):
func duplicate_rows(rows: Array, name_input: String):
pass
## Override to define removal behaviour.
func delete_rows(rows : Array):
func delete_rows(rows: Array):
pass
## Override with `return true` if `resource_path` is defined and the Rename butoon should show.
func has_row_names():
return false
## Override to define import behaviour. Must return the `rows` value for the editor view.
func import_from_path(folderpath : String, insert_func : Callable, sort_by : String, sort_reverse : bool = false) -> Array:
func import_from_path(folderpath: String, insert_func: Callable, sort_by: String, sort_reverse: bool = false) -> Array:
return []

@ -6,16 +6,16 @@ var csv_rows = []
var resource_original_positions = {}
func get_value(entry, key : String):
func get_value(entry, key: String):
return entry.get(key)
func set_value(entry, key : String, value, index : int):
func set_value(entry, key: String, value, index: int):
entry.set(key, value)
csv_rows[resource_original_positions[entry]] = import_data.resource_to_strings(entry)
func save_entries(all_entries : Array, indices : Array, repeat : bool = true):
func save_entries(all_entries: Array, indices: Array, repeat: bool = true):
if timer == null or timer.time_left <= 0.0:
var space_after_delimeter = import_data.delimeter.ends_with(" ")
var file = FileAccess.open(import_data.edited_path, FileAccess.WRITE)
@ -36,7 +36,7 @@ func create_resource(entry) -> Resource:
return entry
func duplicate_rows(rows : Array, name_input : String):
func duplicate_rows(rows: Array, name_input: String):
for x in rows:
var new_res = x.duplicate()
var index = resource_original_positions[x]
@ -61,19 +61,19 @@ func has_row_names():
return false
func _bump_row_indices(from : int, increment : int = 1):
func _bump_row_indices(from: int, increment: int = 1):
for k in resource_original_positions:
if resource_original_positions[k] >= from:
resource_original_positions[k] += increment
func import_from_path(path : String, insert_func : Callable, sort_by : String, sort_reverse : bool = false) -> Array:
func import_from_path(path: String, insert_func: Callable, sort_by: String, sort_reverse: bool = false) -> Array:
import_data = load(path)
var file = FileAccess.open(import_data.edited_path, FileAccess.READ)
csv_rows = ResourceTablesImportFormatCsv.import_as_arrays(import_data)
var rows := []
var res : Resource
var res: Resource
resource_original_positions.clear()
for i in csv_rows.size():
if import_data.remove_first_row and i == 0:

@ -1,18 +1,18 @@
class_name ResourceTablesEditFormatTres
extends ResourceTablesEditFormat
var timer : SceneTreeTimer
var timer: SceneTreeTimer
func get_value(entry, key : String):
func get_value(entry, key: String):
return entry[key]
func set_value(entry, key : String, value, index : int):
func set_value(entry, key: String, value, index: int):
entry[key] = value
func save_entries(all_entries : Array, indices : Array, repeat : bool = true):
func save_entries(all_entries: Array, indices: Array, repeat: bool = true):
# No need to save. Resources are saved with Ctrl+S
# (likely because plugin.edit_resource is called to show inspector)
return
@ -22,7 +22,7 @@ func create_resource(entry) -> Resource:
return entry
func duplicate_rows(rows : Array, name_input : String):
func duplicate_rows(rows: Array, name_input: String):
if rows.size() == 1:
var new_row = rows[0].duplicate()
new_row.resource_path = rows[0].resource_path.get_base_dir() + "/" + name_input + ".tres"
@ -36,7 +36,7 @@ func duplicate_rows(rows : Array, name_input : String):
ResourceSaver.save(new_row)
func rename_row(row, new_name : String):
func rename_row(row, new_name: String):
var new_row = row
DirAccess.open("res://").remove(row.resource_path)
new_row.resource_path = row.resource_path.get_base_dir() + "/" + new_name + ".tres"
@ -52,15 +52,15 @@ func has_row_names():
return true
func import_from_path(folderpath : String, insert_func : Callable, sort_by : String, sort_reverse : bool = false) -> Array:
func import_from_path(folderpath: String, insert_func: Callable, sort_by: String, sort_reverse: bool = false) -> Array:
var rows := []
var dir := DirAccess.open(folderpath)
if dir == null: return []
var cur_dir_types : Dictionary = {}
var cur_dir_types: Dictionary = {}
var file_stack : Array[String] = []
var folder_stack : Array[String] = [folderpath]
var file_stack: Array[String] = []
var folder_stack: Array[String] = [folderpath]
while folder_stack.size() > 0:
folderpath = folder_stack.pop_back()
@ -71,8 +71,8 @@ func import_from_path(folderpath : String, insert_func : Callable, sort_by : Str
for x in DirAccess.get_directories_at(folderpath):
folder_stack.append(folderpath.path_join(x))
var loaded_res : Array[Resource] = []
var res : Resource = null
var loaded_res: Array[Resource] = []
var res: Resource = null
loaded_res.resize(file_stack.size())
for i in file_stack.size():
res = null
@ -88,7 +88,7 @@ func import_from_path(folderpath : String, insert_func : Callable, sort_by : Str
var most_count_count := 0
var most_count_is_base_class := false
for k in cur_dir_types:
var v : int = cur_dir_types[k]
var v: int = cur_dir_types[k]
if v > most_count_count || (v >= most_count_count && most_count_is_base_class):
most_count_key = k
most_count_count = v

@ -1,12 +1,11 @@
class_name ResourceTablesExportFormatCsv
extends RefCounted
static func can_edit_path(path : String):
static func can_edit_path(path: String):
return path.ends_with(".csv")
static func export_to_file(entries_array : Array, column_names : Array, into_path : String, import_data):
static func export_to_file(entries_array: Array, column_names: Array, into_path: String, import_data):
var file = FileAccess.open(into_path, FileAccess.WRITE)
var line = PackedStringArray()

@ -1,8 +1,7 @@
class_name ResourceTablesImportFormatCsv
extends RefCounted
static func can_edit_path(path : String):
static func can_edit_path(path: String):
return path.ends_with(".csv")

@ -1,9 +1,9 @@
@tool
extends Control
@export var prop_list_item_scene : PackedScene
@export var formats_export : Array[Script]
@export var formats_import : Array[Script]
@export var prop_list_item_scene: PackedScene
@export var formats_export: Array[Script]
@export var formats_import: Array[Script]
@onready var editor_view := $"../../.."
@onready var filename_options := $"Import/Margins/Scroll/Box/Grid/UseAsFilename"
@ -13,9 +13,8 @@ extends Control
var format_extension := ".csv"
var entries := []
var property_used_as_filename := 0
var import_data : ResourceTablesImport
var import_data: ResourceTablesImport
func _ready():
@ -47,7 +46,7 @@ func _on_create_file_pressed():
file_dialog.invalidate()
func _on_file_selected(path : String):
func _on_file_selected(path: String):
import_data = ResourceTablesImport.new()
import_data.initialize(path)
_reset_controls()
@ -57,7 +56,7 @@ func _on_file_selected(path : String):
position = Vector2.ZERO
func _open_dialog(path : String):
func _open_dialog(path: String):
classname_field.text = import_data.edited_path.get_file().get_basename()\
.capitalize().replace(" ", "")
import_data.script_classname = classname_field.text
@ -127,7 +126,7 @@ func _export_tres_folder():
DirAccess.open("res://").make_dir_recursive(import_data.edited_path.get_basename())
import_data.prop_used_as_filename = import_data.prop_names[property_used_as_filename]
var new_res : Resource
var new_res: Resource
for i in entries.size():
if import_data.remove_first_row and i == 0:
continue
@ -153,8 +152,8 @@ func _on_import_edit_pressed():
await get_tree().process_frame
editor_view.display_folder(import_data.resource_path)
editor_view.node_columns.hidden_columns[editor_view.current_path] = {
"resource_path" : true,
"resource_local_to_scene" : true,
"resource_path": true,
"resource_local_to_scene": true,
}
editor_view.save_data()
await get_tree().process_frame
@ -175,13 +174,13 @@ func _on_export_csv_pressed():
# Input controls
func _on_classname_field_text_changed(new_text : String):
func _on_classname_field_text_changed(new_text: String):
import_data.script_classname = new_text.replace(" ", "")
func _on_remove_first_row_toggled(button_pressed : bool):
func _on_remove_first_row_toggled(button_pressed: bool):
import_data.remove_first_row = button_pressed
# $"Export/Box2/Button".button_pressed = true
# $"Export/Box2/Button".button_pressed = true
$"Export/Box3/CheckBox".button_pressed = button_pressed
@ -189,19 +188,19 @@ func _on_filename_options_item_selected(index):
property_used_as_filename = index
func _on_list_item_type_selected(type : int, index : int):
func _on_list_item_type_selected(type: int, index: int):
import_data.prop_types[index] = type
func _on_list_item_name_changed(name : String, index : int):
func _on_list_item_name_changed(name: String, index: int):
import_data.prop_names[index] = name.replace(" ", "")
func _on_export_delimeter_pressed(del : String):
func _on_export_delimeter_pressed(del: String):
import_data.delimeter = del + import_data.delimeter.substr(1)
func _on_export_space_toggled(button_pressed : bool):
func _on_export_space_toggled(button_pressed: bool):
import_data.delimeter = (
import_data.delimeter[0]
if !button_pressed else

@ -1,12 +1,11 @@
@tool
extends HBoxContainer
func display(name : String, type : int):
func display(name: String, type: int):
$"LineEdit".text = name
$"OptionButton".selected = type
func connect_all_signals(to : Object, index : int, prefix : String = "_on_list_item_"):
func connect_all_signals(to: Object, index: int, prefix: String = "_on_list_item_"):
$"LineEdit".text_changed.connect(Callable(to, prefix + "name_changed").bind(index))
$"OptionButton".item_selected.connect(Callable(to, prefix + "type_selected").bind(index))

@ -12,38 +12,32 @@ enum PropType {
ENUM,
MAX,
}
enum NameCasing {
ALL_LOWER,
CAPS_WORD_EXCEPT_FIRST,
CAPS_WORD,
ALL_CAPS,
}
const SUFFIX := "_spreadsheet_import.tres"
const TYPE_MAP := {
TYPE_STRING : PropType.STRING,
TYPE_FLOAT : PropType.FLOAT,
TYPE_BOOL : PropType.BOOL,
TYPE_INT : PropType.INT,
TYPE_OBJECT : PropType.OBJECT,
TYPE_COLOR : PropType.COLOR,
}
@export var prop_types : Array
@export var prop_names : Array
TYPE_STRING: PropType.STRING,
TYPE_FLOAT: PropType.FLOAT,
TYPE_BOOL: PropType.BOOL,
TYPE_INT: PropType.INT,
TYPE_OBJECT: PropType.OBJECT,
TYPE_COLOR: PropType.COLOR,
}
@export var prop_types: Array
@export var prop_names: Array
@export var edited_path := "res://"
@export var prop_used_as_filename := ""
@export var script_classname := ""
@export var remove_first_row := true
@export var new_script : GDScript
@export var view_script : Script = ResourceTablesEditFormatCsv
@export var new_script: GDScript
@export var view_script: Script = ResourceTablesEditFormatCsv
@export var delimeter := ";"
@export var enum_format : Array = [NameCasing.CAPS_WORD, " ", "Yes", "No"]
@export var uniques : Dictionary
@export var enum_format: Array = [NameCasing.CAPS_WORD, " ", "Yes", "No"]
@export var uniques: Dictionary
func initialize(path):
@ -57,7 +51,7 @@ func save():
ResourceSaver.save.call_deferred(self)
func string_to_property(string : String, col_index : int):
func string_to_property(string: String, col_index: int):
match prop_types[col_index]:
PropType.STRING:
return string
@ -88,7 +82,7 @@ func string_to_property(string : String, col_index : int):
return int(uniques[col_index][string.capitalize().replace(" ", "_").to_upper()])
func property_to_string(value, col_index : int) -> String:
func property_to_string(value, col_index: int) -> String:
if value == null: return ""
if col_index == 0:
if prop_names[col_index] == "resource_path":
@ -122,7 +116,7 @@ func property_to_string(value, col_index : int) -> String:
return str(value)
func create_property_line_for_prop(col_index : int) -> String:
func create_property_line_for_prop(col_index: int) -> String:
var result = "@export var " + prop_names[col_index] + " :"
match prop_types[col_index]:
PropType.STRING:
@ -156,7 +150,7 @@ func create_property_line_for_prop(col_index : int) -> String:
return ""
func _escape_forbidden_enum_names(string : String) -> String:
func _escape_forbidden_enum_names(string: String) -> String:
if ClassDB.class_exists(string):
return string + "_"
@ -191,10 +185,10 @@ func create_enum_for_prop(col_index) -> String:
func generate_script(entries, has_classname = true) -> GDScript:
var source = ""
# if has_classname and script_classname != "":
# source = "class_name " + script_classname + " \r\nextends Resource\r\n\r\n"
#
# else:
# if has_classname and script_classname != "":
# source = "class_name " + script_classname + " \r\nextends Resource\r\n\r\n"
#
# else:
source = "extends Resource\r\n\r\n"
# Enums
@ -214,7 +208,7 @@ func generate_script(entries, has_classname = true) -> GDScript:
return created_script
func strings_to_resource(strings : Array):
func strings_to_resource(strings: Array):
var new_res = new_script.new()
for j in min(prop_names.size(), strings.size()):
new_res.set(prop_names[j], string_to_property(strings[j], j))
@ -225,7 +219,7 @@ func strings_to_resource(strings : Array):
return new_res
func resource_to_strings(res : Resource):
func resource_to_strings(res: Resource):
var strings := []
strings.resize(prop_names.size())
for i in prop_names.size():
@ -234,7 +228,7 @@ func resource_to_strings(res : Resource):
return PackedStringArray(strings)
func get_uniques(entries : Array) -> Dictionary:
func get_uniques(entries: Array) -> Dictionary:
var result = {}
for i in prop_types.size():
if prop_types[i] == PropType.ENUM:
@ -253,7 +247,7 @@ func get_uniques(entries : Array) -> Dictionary:
return result
static func change_name_to_format(name : String, case : int, delim : String):
static func change_name_to_format(name: String, case: int, delim: String):
var string = name.capitalize().replace(" ", delim)
if case == NameCasing.ALL_LOWER:
return string.to_lower()
@ -268,7 +262,7 @@ static func change_name_to_format(name : String, case : int, delim : String):
return string.to_upper()
static func get_resource_property_types(res : Resource, properties : Array) -> Array:
static func get_resource_property_types(res: Resource, properties: Array) -> Array:
var result = []
result.resize(properties.size())
result.fill(PropType.STRING)
@ -280,7 +274,7 @@ static func get_resource_property_types(res : Resource, properties : Array) -> A
if x["hint"] == PROPERTY_HINT_ENUM:
var enum_values = x["hint_string"].split(",")
for i in enum_values.size():
var index_found : int = enum_values[i].find(":")
var index_found: int = enum_values[i].find(":")
if index_found == -1: continue
enum_values[i] = enum_values[i].left(index_found)

@ -2,22 +2,21 @@
extends Control
const TablesPluginSettingsClass := preload("res://addons/resources_spreadsheet_view/settings_grid.gd")
@export var table_header_scene: PackedScene
@export var table_header_scene : PackedScene
@export @onready var editor_view : Control = $"../../../.."
@export @onready var hide_columns_button : BaseButton = $"../../MenuStrip/VisibleCols"
@export @onready var grid : GridContainer = $"../../../MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid"
@export @onready var editor_view: Control = $"../../../.."
@export @onready var hide_columns_button: BaseButton = $"../../MenuStrip/VisibleCols"
@export @onready var grid: GridContainer = $"../../../MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid"
var hidden_columns := {}
var columns := []:
set(v):
columns = v
for x in get_children():
x.queue_free()
var new_node : Control
var new_node: Control
for x in v:
new_node = table_header_scene.instantiate()
add_child(new_node)
@ -42,13 +41,13 @@ func update():
_update_column_sizes()
func hide_column(column_index : int):
func hide_column(column_index: int):
hidden_columns[editor_view.current_path][editor_view.columns[column_index]] = true
editor_view.save_data()
update()
func select_column(column_index : int):
func select_column(column_index: int):
editor_view.select_column(column_index)
@ -64,9 +63,9 @@ func _update_column_sizes():
editor_view.refresh()
return
var clip_text : bool = ProjectSettings.get_setting(TablesPluginSettingsClass.PREFIX + "clip_headers")
var clip_text: bool = ProjectSettings.get_setting(TablesPluginSettingsClass.PREFIX + "clip_headers")
var min_width := 0
var cell : Control
var cell: Control
for i in column_headers.size():
var header = column_headers[i]
@ -104,17 +103,21 @@ func _update_hidden_columns():
if !hidden_columns.has(current_path):
hidden_columns[current_path] = {
"resource_local_to_scene" : true,
"resource_name" : true,
}
"resource_local_to_scene": true,
"resource_name": true,
}
editor_view.save_data()
var visible_column_count = 0
for i in columns.size():
var visible_column_count = 0
for
i in columns.size():
var column_visible = !hidden_columns[current_path].has(columns[i])
get_child(i).visible = column_visible
for j in rows_shown:
get_child(i).visible = column_visible
for j in rows_shown:
grid.get_child(j * columns.size() + i).visible = column_visible
if column_visible:
@ -123,6 +126,9 @@ func _update_hidden_columns():
grid.columns = visible_column_count
func _on_h_scroll_changed(value):
position.x = -value
@ -138,7 +144,7 @@ func _on_visible_cols_about_to_popup():
popup.set_item_checked(i, not hidden_columns[current_path].has(columns[i]))
func _on_visible_cols_id_pressed(id : int):
func _on_visible_cols_id_pressed(id: int):
var current_path = editor_view.current_path
var popup = hide_columns_button.get_popup()
if popup.is_item_checked(id):

@ -1,10 +1,11 @@
@tool
extends Control
@export var editor_view_path : NodePath
@export var editor_view_path: NodePath
@export_enum("Filter", "Process", "Sort") var mode := 0
@export var title := ""
@export var default_text := "":
set(v):
default_text = v
@ -12,6 +13,7 @@ extends Control
await ready
_textfield.text = v
@export_multiline var default_text_ml := "":
set(v):
default_text_ml = v
@ -19,18 +21,18 @@ extends Control
await ready
_textfield_ml.text = v
@export var function_save_key := ""
var _textfield : LineEdit
var _textfield_ml : TextEdit
var _togglable_popup : PopupPanel
var _saved_function_index_label : Label
@export var function_save_key := ""
var _saved_functions : Array = []
var _textfield: LineEdit
var _textfield_ml: TextEdit
var _togglable_popup: PopupPanel
var _saved_function_index_label: Label
var _saved_functions: Array = []
var _saved_function_selected := -1
func load_saved_functions(func_dict : Dictionary):
func load_saved_functions(func_dict: Dictionary):
if !func_dict.has(function_save_key):
func_dict[function_save_key] = [default_text_ml]
@ -88,7 +90,6 @@ func _ready():
move_button_r.pressed.connect(_on_saved_function_bumped.bind(+1))
func _on_expand_pressed():
_togglable_popup.popup(Rect2i(_textfield.get_screen_position(), Vector2(size.x, 256.0)))
@ -99,7 +100,7 @@ func _on_text_submitted():
get_node(editor_view_path).save_data.call_deferred()
func _get_script_source_code(first_line : String):
func _get_script_source_code(first_line: String):
var new_text := ""
if !_togglable_popup.visible:
new_text = _textfield.text
@ -139,7 +140,7 @@ func _table_process():
var new_script_instance = new_script.new()
var values = editor_view.get_edited_cells_values()
var edited_rows : Array[int] = editor_view._selection.get_edited_rows()
var edited_rows: Array[int] = editor_view._selection.get_edited_rows()
var edited_resources := edited_rows.map(func(x): return editor_view.rows[x])
for i in values.size():
values[i] = new_script_instance.get_result(values[i], editor_view.rows[edited_rows[i]], edited_resources, i)
@ -147,7 +148,7 @@ func _table_process():
editor_view.set_edited_cells_values(values)
func _on_saved_function_selected(new_index : int):
func _on_saved_function_selected(new_index: int):
if new_index < 0:
new_index = 0
@ -169,5 +170,5 @@ func _on_saved_function_selected(new_index : int):
get_node(editor_view_path).save_data.call_deferred()
func _on_saved_function_bumped(increment : int):
func _on_saved_function_bumped(increment: int):
_on_saved_function_selected(_saved_function_selected + increment)

@ -4,12 +4,11 @@ extends Node
const TablesPluginEditorViewClass = preload("res://addons/resources_spreadsheet_view/editor_view.gd")
const TablesPluginSelectionManagerClass = preload("res://addons/resources_spreadsheet_view/main_screen/selection_manager.gd")
const TextEditingUtilsClass := preload("res://addons/resources_spreadsheet_view/text_editing_utils.gd")
@onready var editor_view: TablesPluginEditorViewClass = get_parent()
@onready var selection: TablesPluginSelectionManagerClass = get_node("../SelectionManager")
@onready var editor_view : TablesPluginEditorViewClass = get_parent()
@onready var selection : TablesPluginSelectionManagerClass = get_node("../SelectionManager")
func _on_cell_gui_input(event : InputEvent, cell : Control):
func _on_cell_gui_input(event: InputEvent, cell: Control):
if event is InputEventMouseButton:
editor_view.grab_focus()
if event.button_index == MOUSE_BUTTON_RIGHT and event.pressed:
@ -35,7 +34,7 @@ func _on_cell_gui_input(event : InputEvent, cell : Control):
selection.select_cell(cell)
func _gui_input(event : InputEvent):
func _gui_input(event: InputEvent):
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_RIGHT and event.is_pressed():
selection.rightclick_cells()
@ -46,7 +45,7 @@ func _gui_input(event : InputEvent):
selection.deselect_all_cells()
func _input(event : InputEvent):
func _input(event: InputEvent):
if !event is InputEventKey or !event.pressed:
return
@ -67,7 +66,7 @@ func _input(event : InputEvent):
editor_view.editor_interface.get_resource_filesystem().scan()
func _key_specific_action(event : InputEvent):
func _key_specific_action(event: InputEvent):
var column = selection.get_cell_column(selection.edited_cells[0])
var ctrl_pressed := Input.is_key_pressed(KEY_CTRL)
@ -145,7 +144,7 @@ func _key_specific_action(event : InputEvent):
selection.queue_redraw()
func _move_selection_on_grid(move_h : int, move_v : int):
func _move_selection_on_grid(move_h: int, move_v: int):
var selected_cells := selection.edited_cells.duplicate()
var child_count := editor_view.node_table_root.get_child_count()
var new_child_index := 0

@ -18,7 +18,7 @@ func load_paths(paths):
selected = 0
func add_path_to_recent(path : String, is_loading : bool = false):
func add_path_to_recent(path: String, is_loading: bool = false):
if path in recent_paths: return
var idx_in_array := recent_paths.find(path)
@ -48,7 +48,7 @@ func remove_selected_path_from_recent():
editor_view.save_data()
func _on_item_selected(index : int):
func _on_item_selected(index: int):
editor_view.current_path = recent_paths[index]
editor_view.node_folder_path.text = recent_paths[index]
editor_view.refresh()

@ -6,19 +6,17 @@ enum {
EDITBOX_RENAME,
EDITBOX_DELETE,
}
const TextEditingUtilsClass := preload("res://addons/resources_spreadsheet_view/text_editing_utils.gd")
const TablesPluginSettingsClass := preload("res://addons/resources_spreadsheet_view/settings_grid.gd")
@export @onready var editor_view := $"../.."
@export @onready var selection := $"../../SelectionManager"
@onready var editbox_node := $"Control/ColorRect/Popup"
@onready var editbox_label : Label = editbox_node.get_node("Panel/VBoxContainer/Label")
@onready var editbox_input : LineEdit = editbox_node.get_node("Panel/VBoxContainer/LineEdit")
@onready var editbox_label: Label = editbox_node.get_node("Panel/VBoxContainer/Label")
@onready var editbox_input: LineEdit = editbox_node.get_node("Panel/VBoxContainer/LineEdit")
var cell : Control
var editbox_action : int
var cell: Control
var editbox_action: int
func _ready():
@ -38,7 +36,7 @@ func _on_grid_cells_selected(cells):
open(cells, true, true)
func open(cells : Array, pin_to_cell : bool = false, from_leftclick : bool = false):
func open(cells: Array, pin_to_cell: bool = false, from_leftclick: bool = false):
if cells.size() == 0 or (from_leftclick and !ProjectSettings.get_setting(TablesPluginSettingsClass.PREFIX + "context_menu_on_leftclick")):
hide()
cell = null
@ -66,7 +64,7 @@ func close():
pass
func _input(event : InputEvent):
func _input(event: InputEvent):
if !editor_view.is_visible_in_tree():
close()
return
@ -95,7 +93,6 @@ func _input(event : InputEvent):
return
func _on_Duplicate_pressed():
_show_editbox(EDITBOX_DUPLICATE)

@ -3,23 +3,20 @@ extends Control
signal cells_selected(cells)
signal cells_rightclicked(cells)
const EditorViewClass = preload("res://addons/resources_spreadsheet_view/editor_view.gd")
@export var cell_editor_classes: Array[Script] = []
@export var cell_editor_classes : Array[Script] = []
@export @onready var node_property_editors : VBoxContainer = $"../HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors"
@export @onready var scrollbar : ScrollContainer = $"../HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll"
@onready var editor_view : EditorViewClass = get_parent()
@export @onready var node_property_editors: VBoxContainer = $"../HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors"
@export @onready var scrollbar: ScrollContainer = $"../HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll"
var edited_cells : Array = []
var edited_cells_text : Array = []
var edit_cursor_positions : Array[int] = []
@onready var editor_view: EditorViewClass = get_parent()
var all_cell_editors : Array = []
var column_editors : Array[Object] = []
var inspector_resource : Resource
var edited_cells: Array = []
var edited_cells_text: Array = []
var edit_cursor_positions: Array[int] = []
var all_cell_editors: Array = []
var column_editors: Array[Object] = []
var inspector_resource: Resource
func _ready():
@ -52,8 +49,8 @@ func _draw():
var char_size := Vector2(0, font.get_ascent(font_size))
var cursor_pos := Vector2(label_padding_left, 0)
var cell_text : String = edited_cells_text[i]
var cell : Control = edited_cells[i]
var cell_text: String = edited_cells_text[i]
var cell: Control = edited_cells[i]
if cell is Label and cell.horizontal_alignment == HORIZONTAL_ALIGNMENT_RIGHT:
cursor_pos.x += cell.size.x - font.get_multiline_string_size(edited_cells[i].text, HORIZONTAL_ALIGNMENT_RIGHT, -1, font_size).x
@ -94,7 +91,7 @@ func deselect_all_cells():
_selection_changed()
func deselect_cell(cell : Control):
func deselect_cell(cell: Control):
var idx := edited_cells.find(cell)
if idx == -1: return
@ -107,7 +104,7 @@ func deselect_cell(cell : Control):
_selection_changed()
func select_cell(cell : Control):
func select_cell(cell: Control):
var column_index := get_cell_column(cell)
if can_select_cell(cell):
_add_cell_to_selection(cell)
@ -120,7 +117,7 @@ func select_cell(cell : Control):
_selection_changed()
func select_cells(cells : Array):
func select_cells(cells: Array):
var last_selectible = null
for x in cells:
if can_select_cell(x):
@ -131,7 +128,7 @@ func select_cells(cells : Array):
select_cell(last_selectible)
func select_cells_to(cell : Control):
func select_cells_to(cell: Control):
var column_index := get_cell_column(cell)
if column_index != get_cell_column(edited_cells[edited_cells.size() - 1]):
return
@ -143,7 +140,7 @@ func select_cells_to(cell : Control):
row_end += edge_shift
for i in range(row_start, row_end, edge_shift):
var cur_cell : Control = editor_view.node_table_root.get_child(i * editor_view.columns.size() + column_index)
var cur_cell: Control = editor_view.node_table_root.get_child(i * editor_view.columns.size() + column_index)
if !cur_cell.visible:
# When search is active, some cells will be hidden.
continue
@ -162,7 +159,7 @@ func rightclick_cells():
cells_rightclicked.emit(edited_cells)
func can_select_cell(cell : Control) -> bool:
func can_select_cell(cell: Control) -> bool:
if edited_cells.size() == 0:
return true
@ -175,16 +172,16 @@ func can_select_cell(cell : Control) -> bool:
return !cell in edited_cells
func get_cell_column(cell : Control) -> int:
func get_cell_column(cell: Control) -> int:
return cell.get_index() % editor_view.columns.size()
func get_cell_row(cell : Control) -> int:
func get_cell_row(cell: Control) -> int:
return cell.get_index() / editor_view.columns.size() + editor_view.first_row
func get_edited_rows() -> Array[int]:
var rows : Array[int] = []
var rows: Array[int] = []
rows.resize(edited_cells.size())
for i in rows.size():
rows[i] = get_cell_row(edited_cells[i])
@ -197,7 +194,7 @@ func _selection_changed():
cells_selected.emit(edited_cells)
func _add_cell_to_selection(cell : Control):
func _add_cell_to_selection(cell: Control):
var column_editor = column_editors[get_cell_column(cell)]
column_editor.set_selected(cell, true)
edited_cells.append(cell)
@ -210,13 +207,13 @@ func _update_selected_cells_text():
if edited_cells_text.size() == 0:
return
var column_dtype : int = editor_view.column_types[get_cell_column(edited_cells[0])]
var column_dtype: int = editor_view.column_types[get_cell_column(edited_cells[0])]
for i in edited_cells.size():
edited_cells_text[i] = editor_view.try_convert(edited_cells[i].text, column_dtype)
edit_cursor_positions[i] = edited_cells_text[i].length()
func _try_open_docks(cell : Control):
func _try_open_docks(cell: Control):
var column_index = get_cell_column(cell)
var row = editor_view.rows[get_cell_row(cell)]
var column = editor_view.columns[column_index]
@ -228,7 +225,7 @@ func _try_open_docks(cell : Control):
x.get_node(x.path_property_name).text = column
func _on_inspector_property_edited(property : String):
func _on_inspector_property_edited(property: String):
if !editor_view.is_visible_in_tree(): return
if inspector_resource == null: return

@ -1,10 +1,10 @@
@tool
extends HBoxContainer
var manager : Control
var manager: Control
func set_label(label : String):
func set_label(label: String):
$"Button".text = label.capitalize()
$"Button".tooltip_text = label + "\nClick to sort."
@ -26,7 +26,7 @@ func _on_main_gui_input(event):
popup.visible = false
func _on_list_id_pressed(id : int):
func _on_list_id_pressed(id: int):
if id == 0:
manager.select_column(get_index())

@ -1,7 +1,7 @@
@tool
extends HBoxContainer
@export @onready var node_editor_view_root : Control = $"../../../.."
@export @onready var node_editor_view_root: Control = $"../../../.."
var rows_per_page := 50
var current_page := 0

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save