diff --git a/paint/assets/icons.png b/paint/assets/icons.png index 2c8b1a3d..d08cf991 100755 Binary files a/paint/assets/icons.png and b/paint/assets/icons.png differ diff --git a/paint/assets/icons05x.png b/paint/assets/icons05x.png index ff6edce8..9dad758c 100755 Binary files a/paint/assets/icons05x.png and b/paint/assets/icons05x.png differ diff --git a/paint/assets/icons2x.png b/paint/assets/icons2x.png index df62c312..0fb51e0d 100755 Binary files a/paint/assets/icons2x.png and b/paint/assets/icons2x.png differ diff --git a/paint/sources/base.c b/paint/sources/base.c index 04dfd063..af33bdda 100644 --- a/paint/sources/base.c +++ b/paint/sources/base.c @@ -259,7 +259,7 @@ void base_update(void *_) { g_context->ddirty = 0; } - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { if (keyboard_down("control") && keyboard_started("d")) { sim_duplicate(); } @@ -366,7 +366,7 @@ void base_render(void *_) { base_init_undo_layers(); } - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { sim_init(); sim_update(); } @@ -1207,12 +1207,12 @@ void ui_base_update(void *_) { else if (operator_shortcut(any_map_get(config_keymap, "tool_bake"), SHORTCUT_TYPE_STARTED)) { context_select_tool(TOOL_TYPE_BAKE); } - else if (operator_shortcut(any_map_get(config_keymap, "tool_gizmo"), SHORTCUT_TYPE_STARTED)) { - context_select_tool(TOOL_TYPE_GIZMO); - } else if (operator_shortcut(any_map_get(config_keymap, "tool_material"), SHORTCUT_TYPE_STARTED)) { context_select_tool(TOOL_TYPE_MATERIAL); } + else if (operator_shortcut(any_map_get(config_keymap, "tool_cursor"), SHORTCUT_TYPE_STARTED)) { + context_select_tool(TOOL_TYPE_CURSOR); + } else if (operator_shortcut(any_map_get(config_keymap, "swap_brush_eraser"), SHORTCUT_TYPE_STARTED)) { context_select_tool(g_context->tool == TOOL_TYPE_BRUSH ? TOOL_TYPE_ERASER : TOOL_TYPE_BRUSH); } @@ -1738,7 +1738,7 @@ void base_init() { if (args_player) { sys_notify_on_next_frame(&base_init_on_start_arm, NULL); - g_context->tool = TOOL_TYPE_GIZMO; + g_context->tool = TOOL_TYPE_CURSOR; make_material_parse_paint_material(true); g_config->workspace = WORKSPACE_PLAYER; base_update_workspace(); diff --git a/paint/sources/enums.h b/paint/sources/enums.h index c672700b..04f25550 100644 --- a/paint/sources/enums.h +++ b/paint/sources/enums.h @@ -234,7 +234,7 @@ typedef enum { TOOL_TYPE_PICKER = 10, TOOL_TYPE_BAKE = 11, TOOL_TYPE_MATERIAL = 12, - TOOL_TYPE_GIZMO = 13, + TOOL_TYPE_CURSOR = 13, } tool_type_t; typedef enum { @@ -319,7 +319,7 @@ typedef enum { ICON_PROPERTIES = 19, ICON_FOLDER_OPEN = 20, ICON_EMPTY = 21, - ICON_GIZMO = 22, + ICON_CURSOR = 22, ICON_MATERIAL = 23, ICON_MENU = 24, ICON_FILE_NEW = 25, @@ -382,7 +382,7 @@ typedef enum { ICON_LABEL = 82, ICON_ACCOUNT = 83, ICON_ARROW_UP_LEFT = 84, - ICON_ATTACHMENT = 85, + ICON_GIZMO = 85, ICON_BLOCK = 86, ICON_LANDSCAPE = 87, ICON_CHAT = 88, diff --git a/paint/sources/gizmo.c b/paint/sources/gizmo.c index 9e13957a..46b5fe12 100644 --- a/paint/sources/gizmo.c +++ b/paint/sources/gizmo.c @@ -7,7 +7,7 @@ quat_t gizmo_q = (quat_t){0.0, 0.0, 0.0, 1.0}; quat_t gizmo_q0 = (quat_t){0.0, 0.0, 0.0, 1.0}; void gizmo_update() { - bool is_object = g_context->tool == TOOL_TYPE_GIZMO; + bool is_object = g_context->tool == TOOL_TYPE_CURSOR; bool is_decal = base_is_decal_layer(); object_t *gizmo = g_context->gizmo; @@ -19,7 +19,7 @@ void gizmo_update() { object_t *paint_object = g_context->paint_object->base; - if (g_context->tool == TOOL_TYPE_GIZMO && g_context->selected_object != NULL) { + if (g_context->tool == TOOL_TYPE_CURSOR && g_context->selected_object != NULL) { paint_object = g_context->selected_object; } diff --git a/paint/sources/import_asset.c b/paint/sources/import_asset.c index 615271e2..cebe0591 100644 --- a/paint/sources/import_asset.c +++ b/paint/sources/import_asset.c @@ -35,7 +35,7 @@ void import_asset_run(char *path, f32 drop_x, f32 drop_y, bool show_box, bool hd } if (path_is_mesh(path)) { - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { // project_import_mesh_box(path, false, false, tab_meshes_import_mesh_done); project_import_mesh_box(path, false, false, tab_scene_import_mesh_done); } diff --git a/paint/sources/import_mesh.c b/paint/sources/import_mesh.c index ebd1219d..98469c9f 100644 --- a/paint/sources/import_mesh.c +++ b/paint/sources/import_mesh.c @@ -193,7 +193,7 @@ char *_import_mesh_number_ext(i32 i) { void _import_mesh_add_mesh(raw_mesh_t *mesh) { mesh_data_t *raw = import_mesh_raw_mesh(mesh); - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { util_mesh_pack_uvs(mesh->texa); } diff --git a/paint/sources/keymap.c b/paint/sources/keymap.c index acec3bf1..da7c5957 100644 --- a/paint/sources/keymap.c +++ b/paint/sources/keymap.c @@ -99,7 +99,7 @@ any_map_t *keymap_get_default() { any_map_set(keymap, "tool_colorid", "c"); any_map_set(keymap, "tool_picker", "v"); any_map_set(keymap, "tool_bake", "k"); - any_map_set(keymap, "tool_gizmo", ""); + any_map_set(keymap, "tool_cursor", ""); any_map_set(keymap, "tool_material", ""); any_map_set(keymap, "swap_brush_eraser", ""); return keymap; diff --git a/paint/sources/kickstart.c b/paint/sources/kickstart.c index ab9f24ec..0382ca00 100644 --- a/paint/sources/kickstart.c +++ b/paint/sources/kickstart.c @@ -113,7 +113,7 @@ void _kickstart() { _tr("Picker"), _tr("Bake"), _tr("Material"), - _tr("Gizmo"), + _tr("Cursor"), }, 14); gc_root(ui_toolbar_tool_names); diff --git a/paint/sources/make_paint.c b/paint/sources/make_paint.c index 20d36369..f73b2567 100644 --- a/paint/sources/make_paint.c +++ b/paint/sources/make_paint.c @@ -336,7 +336,7 @@ node_shader_context_t *make_paint_run(material_t *data, material_context_t *matc node_shader_write_frag(kong, "var opacity: float = mat_opacity;"); } - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { node_shader_write_frag(kong, "opacity = 1.0;"); } else { @@ -506,7 +506,7 @@ node_shader_context_t *make_paint_run(material_t *data, material_context_t *matc node_shader_write_frag(kong, "output[0] = float4((basecol * t_blur + sample_undo.rgb * sample_undo.a * (1.0 - t_blur)) / max(out_a, 0.0000001), out_a);"); } - else if (g_context->material->paint_opac_mode == OPACITY_MODE_TRANSLUC || g_context->tool == TOOL_TYPE_GIZMO || g_context->layer->fill_layer != NULL) { + else if (g_context->material->paint_opac_mode == OPACITY_MODE_TRANSLUC || g_context->tool == TOOL_TYPE_CURSOR || g_context->layer->fill_layer != NULL) { node_shader_write_frag(kong, string("output[0] = float4(%s, %s);", make_material_blend_mode(kong, g_context->brush_blending, "sample_undo.rgb", "basecol", "str"), "mat_opacity")); } diff --git a/paint/sources/render_path_paint.c b/paint/sources/render_path_paint.c index 1747659f..522b5c2d 100644 --- a/paint/sources/render_path_paint.c +++ b/paint/sources/render_path_paint.c @@ -535,8 +535,8 @@ bool render_path_paint_paint_enabled() { bool fill_layer = g_context->layer->fill_layer != NULL && g_context->tool != TOOL_TYPE_PICKER && g_context->tool != TOOL_TYPE_MATERIAL && g_context->tool != TOOL_TYPE_COLORID; bool group_layer = slot_layer_is_group(g_context->layer); - bool gizmo = g_context->tool == TOOL_TYPE_GIZMO; - return !fill_layer && !group_layer && !g_context->foreground_event && !gizmo; + bool cursor = g_context->tool == TOOL_TYPE_CURSOR; + return !fill_layer && !group_layer && !g_context->foreground_event && !cursor; } void render_path_paint_live_brush_dirty() { diff --git a/paint/sources/render_path_raytrace.c b/paint/sources/render_path_raytrace.c index 6dac930f..6134309b 100644 --- a/paint/sources/render_path_raytrace.c +++ b/paint/sources/render_path_raytrace.c @@ -16,7 +16,7 @@ void render_path_raytrace_commands(bool use_live_layer) { render_path_raytrace_init_shader = true; } char *ext = ""; - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { ext = "forge_"; } char *mode = g_config->pathtrace_mode == PATHTRACE_MODE_FAST ? "core" : "full"; @@ -111,7 +111,7 @@ void render_path_raytrace_commands(bool use_live_layer) { // g_context->ddirty = 1; // _RENDER - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { g_context->ddirty = 1; } } @@ -123,7 +123,7 @@ void render_path_raytrace_build_data() { mesh_object_t *mo = !context_layer_filter_used() ? g_context->merged_object : g_context->paint_object; - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { render_path_raytrace_transform = mo->base->transform->world_unpack; } else { @@ -162,7 +162,7 @@ void render_path_raytrace_raytrace_init(char *shader_name, bool build) { { _gpu_raytrace_as_init(); - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { for (i32 i = 0; i < project_paint_objects->length; ++i) { mesh_object_t *po = project_paint_objects->buffer[i]; if (!po->base->visible) { diff --git a/paint/sources/slot_layer.c b/paint/sources/slot_layer.c index f6c4b6d9..2522e9cf 100644 --- a/paint/sources/slot_layer.c +++ b/paint/sources/slot_layer.c @@ -1237,7 +1237,7 @@ void layers_create_fill_layer_on_next_frame(void *_) { } void layers_create_fill_layer(uv_type_t uv_type, mat4_t decal_mat, i32 position) { - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { return; } @@ -1570,7 +1570,7 @@ slot_layer_t *layers_flatten(bool height_to_normal, slot_layer_t_array_t *layers draw_set_pipeline(NULL); draw_end(); - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { // Do not multiply basecol by alpha draw_begin(layers_expa, false, 0); // Copy to temp draw_set_pipeline(pipes_copy); diff --git a/paint/sources/ui_header.c b/paint/sources/ui_header.c index 76775be4..cc756fda 100644 --- a/paint/sources/ui_header.c +++ b/paint/sources/ui_header.c @@ -636,7 +636,7 @@ void ui_header_draw_tool_properties() { } } } - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { // if (!sim_running && ui_button("Play")) { // sim_play(); // g_context.selected_object = scene_camera.base; diff --git a/paint/sources/uniforms_ext.c b/paint/sources/uniforms_ext.c index 9f9e8cad..80740ec1 100644 --- a/paint/sources/uniforms_ext.c +++ b/paint/sources/uniforms_ext.c @@ -73,7 +73,7 @@ f32 uniforms_ext_f32_link(object_t *object, material_data_t *mat, char *link) { return val; } else if (string_equals(link, "_brush_scale")) { - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { i32 atlas_w = config_get_scene_atlas_res(); i32 item_w = config_get_layer_res(); i32 atlas_stride = atlas_w / (float)item_w; diff --git a/paint/sources/util_mesh.c b/paint/sources/util_mesh.c index 969c10f8..0187c1a6 100644 --- a/paint/sources/util_mesh.c +++ b/paint/sources/util_mesh.c @@ -36,7 +36,7 @@ mesh_object_t_array_t *util_mesh_get_unique() { void util_mesh_merge(mesh_object_t_array_t *paint_objects) { if (paint_objects == NULL) { - if (g_context->tool == TOOL_TYPE_GIZMO) { + if (g_context->tool == TOOL_TYPE_CURSOR) { paint_objects = util_mesh_get_unique(); } else {