Ver Fonte

Cleanup ifdefs

luboslenco há 10 meses atrás
pai
commit
4c44b4f14b

+ 3 - 0
armorlab/sources/render_path_paint.ts

@@ -329,3 +329,6 @@ function render_path_paint_set_plane_mesh() {
 
 function render_path_paint_restore_plane_mesh() {
 }
+
+function render_path_paint_dilate(base: bool, nor_pack: bool) {
+}

+ 0 - 6
armorlab/sources/render_path_preview.ts

@@ -1,6 +0,0 @@
-
-function render_path_preview_commands_preview() {
-}
-
-function render_path_preview_commands_decal() {
-}

+ 0 - 8
armorlab/sources/slot_brush.ts

@@ -1,8 +0,0 @@
-type slot_brush_t = {
-	nodes?: ui_nodes_t;
-	canvas?: ui_node_canvas_t;
-	image?: image_t; // 200px
-	image_icon?: image_t; // 50px
-	preview_ready?: bool;
-	id?: i32;
-};

+ 0 - 9
armorlab/sources/slot_font.ts

@@ -1,9 +0,0 @@
-
-type slot_font_t = {
-	image?: image_t; // 200px
-	preview_ready?: bool;
-	id?: i32;
-	font?: g2_font_t;
-	name?: string;
-	file?: string;
-};

+ 0 - 26
armorlab/sources/slot_layer.ts

@@ -1,26 +0,0 @@
-
-type slot_layer_t = {
-    id?: i32;
-    texpaint: image_t;
-    texpaint_nor: image_t;
-    texpaint_pack: image_t;
-
-    decal_mat: mat4_t;
-    parent?: slot_layer_t;
-    fill_layer?: slot_material_t;
-};
-
-function slot_layer_get_object_mask(raw: slot_layer_t): i32 {
-	return 0;
-}
-
-function slot_layer_create(ext: string = "", type: layer_slot_type_t = layer_slot_type_t.LAYER, parent: slot_layer_t = null): slot_layer_t {
-    return null;
-}
-
-function slot_layer_clear(raw: slot_layer_t, base_color: i32 = 0x00000000, base_image: image_t = null, occlusion: f32 = 1.0, roughness: f32 = base_default_rough, metallic: f32 = 0.0) {
-}
-
-function slot_layer_is_mask(raw: slot_layer_t): bool {
-    return false;
-}

+ 0 - 11
armorlab/sources/slot_material.ts

@@ -1,11 +0,0 @@
-
-type slot_material_t = {
-	nodes?: ui_nodes_t;
-	canvas?: ui_node_canvas_t;
-	preview_ready?: bool;
-	data?: material_data_t;
-};
-
-function slot_material_create(m: material_data_t = null, c: ui_node_canvas_t = null): slot_material_t {
-	return null;
-}

+ 3 - 0
armorsculpt/sources/tab_layers.ts

@@ -420,3 +420,6 @@ function tab_layers_can_drop_new_layer(position: i32): bool {
 	}
 	return true;
 }
+
+function tab_layers_make_mask_preview_rgba32(l: slot_layer_t) {
+}

Diff do ficheiro suprimidas por serem muito extensas
+ 427 - 413
base/sources/base.ts


+ 0 - 12
base/sources/box_export.ts

@@ -8,7 +8,6 @@ let box_export_preset: export_preset_t = null;
 let box_export_channels: string[] = ["base_r", "base_g", "base_b", "height", "metal", "nor_r", "nor_g", "nor_g_directx", "nor_b", "occ", "opac", "rough", "smooth", "emis", "subs", "0.0", "1.0"];
 let box_export_color_spaces: string[] = ["linear", "srgb"];
 
-///if (is_paint || is_lab)
 function box_export_show_textures() {
 	ui_box_show_custom(function (ui: ui_t) {
 
@@ -33,9 +32,7 @@ function box_export_show_textures() {
 
 	}, 540, 310);
 }
-///end
 
-///if is_paint
 function box_export_show_bake_material() {
 	ui_box_show_custom(function (ui: ui_t) {
 
@@ -53,11 +50,9 @@ function box_export_show_bake_material() {
 
 	}, 540, 310);
 }
-///end
 
 let _box_export_bake_material: bool;
 
-///if (is_paint || is_lab)
 function box_export_tab_export_textures(ui: ui_t, title: string, bake_material: bool = false) {
 	let tab_vertical: bool = config_raw.touch_ui;
 	if (ui_tab(box_export_htab, title, tab_vertical)) {
@@ -326,9 +321,7 @@ function box_export_tab_presets(ui: ui_t) {
 		}
 	}
 }
-///end
 
-///if is_paint
 function box_export_tab_atlases(ui: ui_t) {
 	let tab_vertical: bool = config_raw.touch_ui;
 	if (ui_tab(box_export_htab, tr("Atlases"), tab_vertical)) {
@@ -351,7 +344,6 @@ function box_export_tab_atlases(ui: ui_t) {
 		}
 	}
 }
-///end
 
 function box_export_show_mesh() {
 	box_export_mesh_handle.position = context_raw.export_mesh_index;
@@ -441,7 +433,6 @@ function box_export_tab_export_mesh(ui: ui_t, htab: ui_handle_t) {
 	}
 }
 
-///if (is_paint || is_sculpt)
 function box_export_show_material() {
 	ui_box_show_custom(function (ui: ui_t) {
 		let htab: ui_handle_t = ui_handle(__ID__);
@@ -503,9 +494,7 @@ function box_export_show_brush() {
 		}
 	});
 }
-///end
 
-///if (is_paint || is_lab)
 function box_export_fetch_presets() {
 	box_export_files = file_read_directory(path_data() + path_sep + "export_presets");
 	for (let i: i32 = 0; i < box_export_files.length; ++i) {
@@ -558,4 +547,3 @@ function box_export_preset_to_json(p: export_preset_t): string {
 	json_encode_end_array();
 	return json_encode_end();
 }
-///end

+ 0 - 4
base/sources/config.ts

@@ -96,9 +96,7 @@ function config_save() {
 	json_encode_bool("brush_angle_reject", config_raw.brush_angle_reject);
 	json_encode_i32("dilate", config_raw.dilate);
 	json_encode_i32("dilate_radius", config_raw.dilate_radius);
-	///if is_lab
 	json_encode_bool("gpu_inference", config_raw.gpu_inference);
-	///end
 	let config_json: string = json_encode_end();
 
 	let buffer: buffer_t = sys_string_to_buffer(config_json);
@@ -454,7 +452,5 @@ type config_t = {
 	dilate?: i32;
 	dilate_radius?: i32;
 
-	///if is_lab
 	gpu_inference?: bool;
-	///end
 };

+ 12 - 28
base/sources/context.ts

@@ -339,11 +339,7 @@ function context_create(): context_t {
 	c.brush_can_unlock = false;
 	c.camera_type = camera_type_t.PERSPECTIVE;
 	c.cam_handle = ui_handle_create();
-	///if is_forge
-	c.vxao_ext = 2.0;
-	///else
 	c.vxao_ext = 1.0;
-	///end
 	c.vxao_offset = 1.5;
 	c.vxao_aperture = 1.2;
 	c.texture_export_path = "";
@@ -510,7 +506,6 @@ function context_use_deferred(): bool {
 	///end
 }
 
-///if (is_paint || is_sculpt)
 function context_select_material(i: i32) {
 	if (project_materials.length <= i) {
 		return;
@@ -597,7 +592,6 @@ function context_set_layer(l: slot_layer_t) {
 	ui_base_hwnds[tab_area_t.SIDEBAR0].redraws = 2;
 	ui_view2d_hwnd.redraws = 2;
 }
-///end
 
 function context_select_tool(i: i32) {
 	context_raw.tool = i;
@@ -679,7 +673,10 @@ function context_select_paint_object(o: mesh_object_t) {
 }
 
 function context_main_object(): mesh_object_t {
-	///if (is_paint || is_sculpt)
+	///if is_lab
+	return project_paint_objects[0];
+	///end
+
 	for (let i: i32 = 0; i < project_paint_objects.length; ++i) {
 		let po: mesh_object_t = project_paint_objects[i];
 		if (po.base.children.length > 0) {
@@ -687,31 +684,22 @@ function context_main_object(): mesh_object_t {
 		}
 	}
 	return project_paint_objects[0];
-	///end
-
-	///if is_lab
-	return project_paint_objects[0];
-	///end
 }
 
 function context_layer_filter_used(): bool {
-	///if (is_paint || is_sculpt)
-	return context_raw.layer_filter > 0 && context_raw.layer_filter <= project_paint_objects.length;
-	///end
-
 	///if is_lab
 	return true;
 	///end
+
+	return context_raw.layer_filter > 0 && context_raw.layer_filter <= project_paint_objects.length;
 }
 
 function context_object_mask_used(): bool {
-	///if (is_paint || is_sculpt)
-	return slot_layer_get_object_mask(context_raw.layer) > 0 && slot_layer_get_object_mask(context_raw.layer) <= project_paint_objects.length;
-	///end
-
 	///if is_lab
 	return false;
 	///end
+
+	return slot_layer_get_object_mask(context_raw.layer) > 0 && slot_layer_get_object_mask(context_raw.layer) <= project_paint_objects.length;
 }
 
 function context_in_viewport(): bool {
@@ -720,18 +708,16 @@ function context_in_viewport(): bool {
 }
 
 function context_in_paint_area(): bool {
-	///if (is_paint || is_sculpt)
+	///if is_lab
+	return context_in_viewport();
+	///end
+
 	let right: i32 = app_w();
 	if (ui_view2d_show) {
 		right += ui_view2d_ww;
 	}
 	return mouse_view_x() > 0 && mouse_view_x() < right &&
 		   mouse_view_y() > 0 && mouse_view_y() < app_h();
-	///end
-
-	///if is_lab
-	return context_in_viewport();
-	///end
 }
 
 function context_in_layers(): bool {
@@ -867,7 +853,6 @@ function context_set_swatch(s: swatch_color_t) {
 	context_raw.swatch = s;
 }
 
-///if is_lab
 function context_run_brush(from: i32) {
 	let left: f32 = 0.0;
 	let right: f32 = 1.0;
@@ -980,4 +965,3 @@ function context_update() {
 
 	context_parse_brush_inputs();
 }
-///end

+ 0 - 9
base/sources/export_arm.ts

@@ -265,12 +265,6 @@ function export_arm_export_node(n: ui_node_t, assets: asset_t[] = null) {
 	// }
 }
 
-///if is_lab
-function export_arm_run_material(path: string) {
-}
-///end
-
-///if (is_paint || is_sculpt)
 function export_arm_run_material(path: string) {
 	if (!ends_with(path, ".arm")) {
 		path += ".arm";
@@ -340,7 +334,6 @@ function export_arm_run_material(path: string) {
 	let buffer: buffer_t = util_encode_project(raw);
 	iron_file_save_bytes(path, buffer, buffer.length + 1);
 }
-///end
 
 ///if (arm_metal || arm_vulkan)
 function export_arm_bgra_swap(buffer: buffer_t): buffer_t {
@@ -353,7 +346,6 @@ function export_arm_bgra_swap(buffer: buffer_t): buffer_t {
 }
 ///end
 
-///if (is_paint || is_sculpt)
 function export_arm_run_brush(path: string) {
 	if (!ends_with(path, ".arm")) {
 		path += ".arm";
@@ -407,7 +399,6 @@ function export_arm_run_brush(path: string) {
 	let buffer: buffer_t = util_encode_project(raw);
 	iron_file_save_bytes(path, buffer, buffer.length + 1);
 }
-///end
 
 function export_arm_assets_to_files(project_path: string, assets: asset_t[]): string[] {
 	let texture_files: string[] = [];

+ 0 - 2
base/sources/export_texture.ts

@@ -111,7 +111,6 @@ function export_texture_run(path: string, bake_material: bool = false) {
 	ui_files_last_path = "";
 }
 
-///if is_paint
 function export_texture_run_bake_material(path: string) {
 	if (render_path_paint_live_layer == null) {
 		render_path_paint_live_layer = slot_layer_create("_live");
@@ -150,7 +149,6 @@ function export_texture_run_bake_material(path: string) {
 	let layers: slot_layer_t[] = [render_path_paint_live_layer];
 	export_texture_run_layers(path, layers, "", true);
 }
-///end
 
 function export_texture_run_layers(path: string, layers: slot_layer_t[], object_name: string = "", bake_material: bool = false) {
 

+ 0 - 6
base/sources/history.ts

@@ -475,7 +475,6 @@ function history_edit_nodes(canvas: ui_node_canvas_t, canvas_group: i32 = -1) {
 	step.canvas = util_clone_canvas(canvas);
 }
 
-///if (is_paint || is_sculpt)
 function history_paint() {
 	let is_mask: bool = slot_layer_is_mask(context_raw.layer);
 	history_copy_to_undo(context_raw.layer.id, history_undo_i, is_mask);
@@ -616,7 +615,6 @@ function history_delete_material_group(group: node_group_t) {
 	step.canvas_group = array_index_of(project_material_groups, group);
 	step.canvas = util_clone_canvas(group.canvas);
 }
-///end
 
 function history_push(name: string): step_t {
 	///if (arm_windows || arm_linux || arm_macos)
@@ -674,7 +672,6 @@ function history_push(name: string): step_t {
 	return history_steps[history_steps.length - 1];
 }
 
-///if (is_paint || is_sculpt)
 function history_redo_merge_layers() {
 	history_copy_merging_layers();
 }
@@ -723,7 +720,6 @@ function history_copy_to_undo(from_id: i32, to_id: i32, is_mask: bool) {
 	}
 	history_undo_i = (history_undo_i + 1) % config_raw.undo_steps;
 }
-///end
 
 function history_get_canvas(step: step_t): ui_node_canvas_t {
 	///if (is_paint || is_sculpt)
@@ -781,7 +777,6 @@ type step_t = {
 	name?: string;
 	canvas?: ui_node_canvas_t; // Node history
 	canvas_group?: i32;
-	///if (is_paint || is_sculpt)
 	layer?: i32;
 	layer_type?: layer_slot_type_t;
 	layer_parent?: i32;
@@ -793,5 +788,4 @@ type step_t = {
 	layer_blending?: i32;
 	prev_order?: i32; // Previous layer position
 	canvas_type?: i32;
-	///end
 };

+ 0 - 4
base/sources/import_asset.ts

@@ -53,12 +53,10 @@ function import_asset_run(path: string, drop_x: f32 = -1.0, drop_y: f32 = -1.0,
 			ui_nodes_hwnd.redraws = 2;
 		}
 
-		///if is_paint
 		if (context_raw.tool == workspace_tool_t.COLORID && project_asset_names.length == 1) {
 			ui_header_handle.redraws = 2;
 			context_raw.ddirty = 2;
 		}
-		///end
 	}
 	else if (path_is_project(path)) {
 		import_arm_run_project(path);
@@ -69,14 +67,12 @@ function import_asset_run(path: string, drop_x: f32 = -1.0, drop_y: f32 = -1.0,
 	else if (path_is_gimp_color_palette(path)) {
 		import_gpl_run(path, false);
 	}
-	///if is_paint
 	else if (path_is_font(path)) {
 		import_font_run(path);
 	}
 	else if (path_is_folder(path)) {
 		import_folder_run(path);
 	}
-	///end
 	else {
 		if (context_enable_import_plugin(path)) {
 			import_asset_run(path, drop_x, drop_y, show_box);

+ 0 - 0
armorpaint/sources/import_folder.ts → base/sources/import_folder.ts


+ 0 - 4
base/sources/import_font.ts

@@ -1,6 +1,4 @@
 
-///if (is_paint || is_sculpt)
-
 function import_font_run(path: string) {
 	for (let i: i32 = 0; i < project_fonts.length; ++i) {
 		let f: slot_font_t = project_fonts[i];
@@ -33,5 +31,3 @@ function import_font_run(path: string) {
 
 	ui_base_hwnds[tab_area_t.STATUS].redraws = 2;
 }
-
-///end

+ 5 - 8
base/sources/project.ts

@@ -9,21 +9,20 @@ let project_material_groups: node_group_t[] = [];
 let project_paint_objects: mesh_object_t[] = null;
 let project_asset_map: map_t<i32, any> = map_create(); // image_t | font_t
 let project_mesh_list: string[] = null;
-///if (is_paint || is_sculpt)
+
 let project_materials: slot_material_t[] = null;
 let project_brushes: slot_brush_t[] = null;
 let project_layers: slot_layer_t[] = null;
 let project_fonts: slot_font_t[] = null;
 let project_atlas_objects: i32[] = null;
 let project_atlas_names: string[] = null;
-///end
-///if is_lab
-let project_material_data: material_data_t = null; ////
-let project_materials: slot_material_t[] = null; ////
+
+// lab
+let project_material_data: material_data_t = null;
 let project_nodes: ui_nodes_t;
 let project_canvas: ui_node_canvas_t;
 let project_default_canvas: buffer_t = null;
-///end
+
 
 function project_open() {
 	ui_files_show("arm", false, false, function (path: string) {
@@ -636,7 +635,6 @@ function project_get_image(asset: asset_t): image_t {
 	return asset != null ? map_get(project_asset_map, asset.id) : null;
 }
 
-///if (is_paint || is_sculpt)
 function project_get_used_atlases(): string[] {
 	if (project_atlas_objects == null) {
 		return null;
@@ -679,7 +677,6 @@ function project_get_atlas_objects(object_mask: i32): mesh_object_t[] {
 	}
 	return visibles;
 }
-///end
 
 function project_packed_asset_exists(packed_assets: packed_asset_t[], name: string): bool {
 	for (let i: i32 = 0; i < packed_assets.length; ++i) {

+ 0 - 0
armorpaint/sources/render_path_preview.ts → base/sources/render_path_preview.ts


+ 0 - 2
base/sources/render_path_raytrace.ts

@@ -23,9 +23,7 @@ let render_path_raytrace_ext: string = ".metal";
 let render_path_raytrace_ext: string = ".spirv";
 ///end
 
-///if is_lab
 let render_path_raytrace_last_texpaint: image_t = null;
-///end
 
 function render_path_raytrace_init() {
 }

+ 0 - 0
armorpaint/sources/slot_brush.ts → base/sources/slot_brush.ts


+ 0 - 0
armorpaint/sources/slot_font.ts → base/sources/slot_font.ts


+ 2 - 7
armorpaint/sources/slot_layer.ts → base/sources/slot_layer.ts

@@ -76,14 +76,11 @@ function slot_layer_create(ext: string = "", type: layer_slot_type_t = layer_slo
 	else if (type == layer_slot_type_t.LAYER) {
 		let id: i32 = (raw.id + 1);
 		raw.name = "Layer " + id;
-		///if is_paint
 		let format: string = base_bits_handle.position == texture_bits_t.BITS8  ? "RGBA32" :
 							 base_bits_handle.position == texture_bits_t.BITS16 ? "RGBA64" :
 																				  "RGBA128";
-		///end
-
 		///if is_sculpt
-		let format: string = "RGBA128";
+		format = "RGBA128";
 		///end
 
 		{
@@ -386,15 +383,13 @@ function slot_layer_resize_and_set_bits(raw: slot_layer_t) {
 	}
 
 	if (slot_layer_is_layer(raw)) {
-		///if is_paint
 		let format: tex_format_t =
 			base_bits_handle.position == texture_bits_t.BITS8  ? tex_format_t.RGBA32 :
 			base_bits_handle.position == texture_bits_t.BITS16 ? tex_format_t.RGBA64 :
 			tex_format_t.RGBA128;
-		///end
 
 		///if is_sculpt
-		let format: tex_format_t = tex_format_t.RGBA128;
+		format = tex_format_t.RGBA128;
 		///end
 
 		let _texpaint: image_t = raw.texpaint;

+ 0 - 0
armorpaint/sources/slot_material.ts → base/sources/slot_material.ts


+ 0 - 0
armorpaint/sources/tab_layers.ts → base/sources/tab_layers.ts


+ 0 - 2
base/sources/tab_meshes.ts

@@ -172,7 +172,6 @@ function tab_meshes_draw(htab: ui_handle_t) {
 	}
 }
 
-///if is_lab
 function tab_meshes_set_default_mesh(name: string) {
 	let mo: mesh_object_t = null;
 	if (name == ".Plane" || name == ".Sphere") {
@@ -212,4 +211,3 @@ function tab_meshes_set_default_mesh(name: string) {
 	render_path_raytrace_ready = false;
 	///end
 }
-///end

+ 7 - 8
base/sources/ui_base.ts

@@ -17,18 +17,23 @@ type tab_draw_t = {
 type tab_draw_array_t = tab_draw_t[];
 let ui_base_hwnd_tabs: tab_draw_array_t[] = ui_base_init_hwnd_tabs();
 
-///if (is_paint || is_sculpt)
+///if is_lab
+let ui_base_default_sidebar_mini_w: i32 = 0;
+let ui_base_default_sidebar_full_w: i32 = 0;
+///else
 let ui_base_default_sidebar_mini_w: i32 = 56;
 let ui_base_default_sidebar_full_w: i32 = 280;
+///end
+
 ///if (arm_android || arm_ios)
 let ui_base_default_sidebar_w: i32 = ui_base_default_sidebar_mini_w;
 ///else
 let ui_base_default_sidebar_w: i32 = ui_base_default_sidebar_full_w;
 ///end
+
 let ui_base_tabx: i32 = 0;
 let ui_base_hminimized: ui_handle_t = ui_handle_create();
 let ui_base_sidebar_mini_w: i32 = ui_base_default_sidebar_mini_w;
-///end
 
 function ui_base_init_hwnds(): ui_handle_t[] {
 	let hwnds: ui_handle_t[] = [ui_handle_create(), ui_handle_create(), ui_handle_create()];
@@ -1198,11 +1203,8 @@ function ui_base_update_ui() {
 		///end
 		context_raw.brush_blend_dirty = true; // Update brush mask
 
-		///if (is_paint || is_sculpt)
 		context_raw.layer_preview_dirty = true; // Update layer preview
-		///end
 
-		///if is_paint
 		// New color id picked, update fill layer
 		if (context_raw.tool == workspace_tool_t.COLORID && context_raw.layer.fill_layer != null) {
 			app_notify_on_next_frame(function () {
@@ -1210,10 +1212,8 @@ function ui_base_update_ui() {
 				make_material_parse_paint_material(false);
 			});
 		}
-		///end
 	}
 
-	///if is_paint
 	if (context_raw.layers_preview_dirty) {
 		context_raw.layers_preview_dirty = false;
 		context_raw.layer_preview_dirty = false;
@@ -1258,7 +1258,6 @@ function ui_base_update_ui() {
 		g2_end();
 		ui_base_hwnds[tab_area_t.SIDEBAR0].redraws = 2;
 	}
-	///end
 
 	let undo_pressed: bool = operator_shortcut(map_get(config_keymap, "edit_undo"));
 	let redo_pressed: bool = operator_shortcut(map_get(config_keymap, "edit_redo")) ||

+ 0 - 2
base/sources/ui_menu.ts

@@ -102,9 +102,7 @@ function ui_menu_render() {
 			ui_menu_separator(ui);
 			///if (is_paint || is_lab)
 			if (ui_menu_button(ui, tr("Export Textures..."), map_get(config_keymap, "file_export_textures_as"))) {
-				///if is_paint
 				context_raw.layers_export = export_mode_t.VISIBLE;
-				///end
 				box_export_show_textures();
 			}
 			if (ui_menu_button(ui, tr("Export Swatches..."))) {

+ 0 - 2
base/sources/ui_menubar.ts

@@ -4,10 +4,8 @@ let ui_menubar_workspace_handle: ui_handle_t = ui_handle_create();
 let ui_menubar_menu_handle: ui_handle_t = ui_handle_create();
 let ui_menubar_w: i32 = ui_menubar_default_w;
 
-///if is_lab
 let _ui_menubar_saved_camera: mat4_t = mat4_nan();
 let _ui_menubar_plane: mesh_object_t = null;
-///end
 
 function ui_menubar_init() {
 	ui_menubar_workspace_handle.layout = ui_layout_t.HORIZONTAL;

+ 0 - 2
base/sources/ui_nodes.ts

@@ -485,11 +485,9 @@ function ui_nodes_get_canvas(groups: bool = false): ui_node_canvas_t {
 	///end
 }
 
-///if (is_paint || is_sculpt)
 function ui_nodes_get_canvas_material(): ui_node_canvas_t {
 	return context_raw.material.canvas;
 }
-///end
 
 function ui_nodes_get_nodes(): ui_nodes_t {
 	///if (is_paint || is_sculpt)

+ 4 - 0
base/sources/ui_toolbar.ts

@@ -1,5 +1,9 @@
 
+///if is_lab
+let ui_toolbar_default_w: i32 = 0;
+///else
 let ui_toolbar_default_w: i32 = 36;
+///end
 
 let ui_toolbar_handle: ui_handle_t = ui_handle_create();
 let ui_toolbar_w: i32 = ui_toolbar_default_w;

+ 0 - 6
base/sources/ui_view2d.ts

@@ -1,12 +1,10 @@
 
-///if (is_paint || is_sculpt)
 let ui_view2d_pipe: pipeline_t;
 let ui_view2d_channel_loc: kinc_const_loc_t;
 let ui_view2d_text_input_hover: bool = false;
 let ui_view2d_uvmap_show: bool = false;
 let ui_view2d_tex_type: paint_tex_t = paint_tex_t.BASE;
 let ui_view2d_layer_mode: view_2d_layer_mode_t = view_2d_layer_mode_t.SELECTED;
-///end
 
 ///if (is_paint || is_sculpt)
 let ui_view2d_type: view_2d_type_t = view_2d_type_t.LAYER;
@@ -139,10 +137,8 @@ function ui_view2d_render() {
 		// Texture
 		let tex: image_t = null;
 
-		///if (is_paint || is_sculpt)
 		let l: slot_layer_t = context_raw.layer;
 		let channel: i32 = 0;
-		///end
 
 		let tw: f32 = ui_view2d_ww * 0.95 * ui_view2d_pan_scale;
 		let tx: f32 = ui_view2d_ww / 2 - tw / 2 + ui_view2d_pan_x;
@@ -169,7 +165,6 @@ function ui_view2d_render() {
 
 			///end
 		}
-		///if is_paint
 		else if (ui_view2d_type == view_2d_type_t.LAYER) {
 			let layer: slot_layer_t = l;
 
@@ -212,7 +207,6 @@ function ui_view2d_render() {
 		else if (ui_view2d_type == view_2d_type_t.FONT) {
 			tex = context_raw.font.image;
 		}
-		///end
 
 		let th: f32 = tw;
 		if (tex != null) {

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff