luboslenco 1 mese fa
parent
commit
6162007b36
2 ha cambiato i file con 12 aggiunte e 19 eliminazioni
  1. 11 11
      base/sources/ts/enums.ts
  2. 1 8
      paint/sources/ui_header_ext.ts

+ 11 - 11
base/sources/ts/enums.ts

@@ -6,17 +6,17 @@ enum dilate_type_t {
 
 enum bake_type_t {
 	INIT = -1,
-	AO = 0,
-	CURVATURE = 1,
-	NORMAL = 2,
-	NORMAL_OBJECT = 3,
-	HEIGHT = 4,
-	DERIVATIVE = 5,
-	POSITION = 6,
-	TEXCOORD = 7,
-	MATERIALID = 8,
-	OBJECTID = 9,
-	VERTEX_COLOR = 10,
+	CURVATURE = 0,
+	NORMAL = 1,
+	NORMAL_OBJECT = 2,
+	HEIGHT = 3,
+	DERIVATIVE = 4,
+	POSITION = 5,
+	TEXCOORD = 6,
+	MATERIALID = 7,
+	OBJECTID = 8,
+	VERTEX_COLOR = 9,
+	AO = 10,
 	LIGHTMAP = 11,
 	BENT_NORMAL = 12,
 	THICKNESS = 13,

+ 1 - 8
paint/sources/ui_header_ext.ts

@@ -166,7 +166,6 @@ function ui_header_draw_tool_properties() {
 			bake_handle.position = context_raw.bake_type;
 		}
 		let bakes: string[] = [
-			tr("AO"),
 			tr("Curvature"),
 			tr("Normal"),
 			tr("Object Normal"),
@@ -179,20 +178,14 @@ function ui_header_draw_tool_properties() {
 			tr("Vertex Color"),
 		];
 		if (gpu_raytrace_supported()) {
+			array_push(bakes, tr("AO"));
 			array_push(bakes, tr("Lightmap"));
 			array_push(bakes, tr("Bent Normal"));
 			array_push(bakes, tr("Thickness"));
 		}
-		else {
-			array_shift(bakes); // Remove AO
-		}
 
 		context_raw.bake_type = ui_combo(bake_handle, bakes, tr("Bake"));
 
-		if (!gpu_raytrace_supported()) {
-			context_raw.bake_type += 1; // Offset for removed AO
-		}
-
 		if (rt_bake) {
 			let samples_handle: ui_handle_t = ui_handle(__ID__);
 			if (samples_handle.init) {