lab fixes
This commit is contained in:
Binary file not shown.
@@ -167,7 +167,7 @@ function photo_to_pbr_node_get_as_image(self: photo_to_pbr_node_t, from: i32): i
|
||||
}
|
||||
|
||||
///if (arm_metal || arm_vulkan)
|
||||
function photo_to_pbr_node_bgra_swap(buffer: buffer_t) {
|
||||
function photo_to_pbr_node_bgra_swap(buffer: buffer_t): buffer_t {
|
||||
let u8a: buffer_t = buffer;
|
||||
for (let i: i32 = 0; i < math_floor(buffer.length / 4); ++i) {
|
||||
let r: i32 = u8a[i * 4];
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
type slot_layer_t = {
|
||||
id?: i32;
|
||||
texpaint: image_t;
|
||||
texpaint_nor: image_t;
|
||||
texpaint_pack: image_t;
|
||||
|
||||
+11
-42
@@ -43,15 +43,9 @@ type context_t = {
|
||||
parse_vcols?: bool;
|
||||
|
||||
select_time?: f32;
|
||||
///if (arm_direct3d12 || arm_vulkan || arm_metal)
|
||||
pathtrace_mode?: path_trace_mode_t;
|
||||
///end
|
||||
viewport_mode?: viewport_mode_t;
|
||||
///if (arm_android || arm_ios)
|
||||
render_mode?: render_mode_t;
|
||||
///else
|
||||
render_mode?: render_mode_t;
|
||||
///end
|
||||
|
||||
viewport_shader?: any; // JSValue * -> (ns: node_shader_t)=>void;
|
||||
hscale_was_changed?: bool;
|
||||
@@ -96,11 +90,7 @@ type context_t = {
|
||||
hbloom?: ui_handle_t;
|
||||
hsupersample?: ui_handle_t;
|
||||
hvxao?: ui_handle_t;
|
||||
///if is_forge
|
||||
vxao_ext?: f32;
|
||||
///else
|
||||
vxao_ext?: f32;
|
||||
///end
|
||||
vxao_offset?: f32;
|
||||
vxao_aperture?: f32;
|
||||
texture_export_path?: string;
|
||||
@@ -108,7 +98,6 @@ type context_t = {
|
||||
camera_controls?: camera_controls_t;
|
||||
pen_painting_only?: bool;
|
||||
|
||||
///if (is_paint || is_sculpt)
|
||||
material?: slot_material_t;
|
||||
layer?: slot_layer_t;
|
||||
brush?: slot_brush_t;
|
||||
@@ -162,17 +151,6 @@ type context_t = {
|
||||
text_tool_image?: image_t;
|
||||
text_tool_text?: string;
|
||||
particle_material?: material_data_t;
|
||||
///if arm_physics
|
||||
particle_physics?: bool;
|
||||
particle_hit_x?: f32;
|
||||
particle_hit_y?: f32;
|
||||
particle_hit_z?: f32;
|
||||
last_particle_hit_x?: f32;
|
||||
last_particle_hit_y?: f32;
|
||||
last_particle_hit_z?: f32;
|
||||
particle_timer?: tween_anim_t;
|
||||
paint_body?: physics_body_t;
|
||||
///end
|
||||
|
||||
layer_filter?: i32;
|
||||
brush_output_node_inst?: brush_output_node_t;
|
||||
@@ -232,12 +210,7 @@ type context_t = {
|
||||
brush_scale?: f32;
|
||||
brush_angle?: f32;
|
||||
brush_angle_handle?: ui_handle_t;
|
||||
///if is_paint
|
||||
brush_hardness?: f32;
|
||||
///end
|
||||
///if is_sculpt
|
||||
brush_hardness?: f32;
|
||||
///end
|
||||
brush_lazy_radius?: f32;
|
||||
brush_lazy_step?: f32;
|
||||
brush_lazy_x?: f32;
|
||||
@@ -268,34 +241,30 @@ type context_t = {
|
||||
last_htab0_pos?: i32;
|
||||
maximized_sidebar_width?: i32;
|
||||
drag_dest?: i32;
|
||||
///end
|
||||
|
||||
///if is_lab
|
||||
material?: slot_material_t; ////
|
||||
layer?: slot_layer_t; ////
|
||||
tool?: workspace_tool_t;
|
||||
|
||||
color_picker_previous_tool?: workspace_tool_t;
|
||||
|
||||
brush_radius?: f32;
|
||||
brush_radius_handle?: ui_handle_t;
|
||||
brush_scale?: f32;
|
||||
|
||||
coords?: vec4_t;
|
||||
start_x?: f32;
|
||||
start_y?: f32;
|
||||
|
||||
// Brush ruler
|
||||
lock_begin?: bool;
|
||||
lock_x?: bool;
|
||||
lock_y?: bool;
|
||||
lock_start_x?: f32;
|
||||
lock_start_y?: f32;
|
||||
registered?: bool;
|
||||
///end
|
||||
|
||||
///if is_forge
|
||||
selected_object?: object_t;
|
||||
|
||||
///if arm_physics
|
||||
particle_physics?: bool;
|
||||
particle_hit_x?: f32;
|
||||
particle_hit_y?: f32;
|
||||
particle_hit_z?: f32;
|
||||
last_particle_hit_x?: f32;
|
||||
last_particle_hit_y?: f32;
|
||||
last_particle_hit_z?: f32;
|
||||
particle_timer?: tween_anim_t;
|
||||
paint_body?: physics_body_t;
|
||||
///end
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,9 @@ let history_steps: step_t[];
|
||||
let history_undo_i: i32 = 0; // Undo layer
|
||||
let history_undos: i32 = 0; // Undos available
|
||||
let history_redos: i32 = 0; // Redos available
|
||||
///if (is_paint || is_sculpt)
|
||||
let history_push_undo: bool = false; // Store undo on next paint
|
||||
let history_undo_layers: slot_layer_t[] = null;
|
||||
///end
|
||||
///if is_sculpt
|
||||
let history_push_undo2: bool = false;
|
||||
///end
|
||||
|
||||
function history_undo() {
|
||||
if (history_undos > 0) {
|
||||
|
||||
@@ -59,7 +59,7 @@ function render_path_raytrace_commands(use_live_layer: bool) {
|
||||
}
|
||||
|
||||
///if is_lab
|
||||
let l: any = base_flatten(true);
|
||||
let l: slot_layer_t = base_flatten(true);
|
||||
if (l.texpaint != render_path_raytrace_last_texpaint) {
|
||||
render_path_raytrace_last_texpaint = l.texpaint;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
///if (is_paint || is_sculpt)
|
||||
|
||||
function util_particle_init() {
|
||||
if (context_raw.particle_material != null) return;
|
||||
|
||||
@@ -114,5 +112,3 @@ function util_particle_init_mesh() {
|
||||
}
|
||||
|
||||
///end
|
||||
|
||||
///end
|
||||
|
||||
Reference in New Issue
Block a user