paint: cleanup

This commit is contained in:
luboslenco
2026-07-16 11:42:51 +02:00
parent 1ca2026e6e
commit ed99af9873
11 changed files with 20 additions and 29 deletions
+1 -1
View File
@@ -522,7 +522,7 @@ void base_init() {
draw_font_init(g_font);
}
ui_nodes_enum_texts = base_combo_enum_texts;
ui_nodes_enum_texts = base_combo_enum_texts;
ui_nodes_enum_textures = base_combo_enum_textures;
gc_root(ui_nodes_enum_texts);
+1 -3
View File
@@ -34,6 +34,4 @@ void *boolean_node_create(ui_node_t *raw, f32_array_t *args) {
return n;
}
void boolean_node_init() {
}
void boolean_node_init() {}
+1 -3
View File
@@ -59,6 +59,4 @@ void *color_node_create(ui_node_t *raw, f32_array_t *args) {
return n;
}
void color_node_init() {
}
void color_node_init() {}
+1 -3
View File
@@ -34,6 +34,4 @@ void *integer_node_create(ui_node_t *raw, f32_array_t *args) {
return n;
}
void integer_node() {
}
void integer_node() {}
+1 -3
View File
@@ -16,6 +16,4 @@ void *null_node_create(ui_node_t *raw, f32_array_t *args) {
return n;
}
void null_node_init() {
}
void null_node_init() {}
+1 -3
View File
@@ -34,6 +34,4 @@ void *string_node_create(ui_node_t *raw, f32_array_t *args) {
return n;
}
void string_node_init() {
}
void string_node_init() {}
+2 -2
View File
@@ -205,8 +205,8 @@ void project_new(bool reset_layers) {
g_context->picker_paint_mask = false;
g_context->picker_viewport_mask = false;
g_context->material = g_project->_->materials->buffer[0];
ui_nodes_hwnd->redraws = 2;
g_context->material = g_project->_->materials->buffer[0];
ui_nodes_hwnd->redraws = 2;
gc_unroot(ui_nodes_group_stack);
ui_nodes_group_stack = any_array_create_from_raw((void *[]){}, 0);
gc_root(ui_nodes_group_stack);
+1 -1
View File
@@ -113,7 +113,7 @@ node_shader_context_t *make_mesh_run(material_t *data, i32 layer_pass) {
node_shader_add_constant(kong, "VP: float4x4", "_view_proj_matrix");
kong->frag_wposition = true;
i32 texture_count = 0;
i32 texture_count = 0;
node_shader_write_vert(kong, "output.pos = constants.VP * float4(output.wposition.xyz, 1.0);");
node_shader_write_vert(kong, "output.tex_coord = input.tex;");
+3 -2
View File
@@ -61,7 +61,8 @@ void render_path_base_begin() {
}
// Match projection matrix jitter
bool skip_taa = g_context->split_view || (g_context->viewport_mode == VIEWPORT_MODE_PATH_TRACE && g_context->tool != TOOL_TYPE_COLORID) || g_context->camera_type == CAMERA_TYPE_ORTHOGRAPHIC ||
bool skip_taa = g_context->split_view || (g_context->viewport_mode == VIEWPORT_MODE_PATH_TRACE && g_context->tool != TOOL_TYPE_COLORID) ||
g_context->camera_type == CAMERA_TYPE_ORTHOGRAPHIC ||
((g_context->tool == TOOL_TYPE_CLONE || g_context->tool == TOOL_TYPE_BLUR) && g_context->pdirty > 0);
if (skip_taa || g_config->brush_live) {
@@ -146,7 +147,7 @@ void render_path_base_draw_split(void (*draw_commands)(void)) {
bool use_live_layer = g_context->tool == TOOL_TYPE_MATERIAL;
bool path_trace = g_context->viewport_mode == VIEWPORT_MODE_PATH_TRACE && g_context->tool != TOOL_TYPE_COLORID;
path_trace ? render_path_raytrace_draw(use_live_layer) : draw_commands();
path_trace ? render_path_raytrace_draw(use_live_layer) : draw_commands();
g_context->view_index = g_context->view_index == 0 ? 1 : 0;
transform_set_matrix(cam->base->transform, camera_views[g_context->view_index]);
+3 -3
View File
@@ -51,9 +51,9 @@ void render_path_raytrace_commands(bool use_live_layer) {
bool is_live = g_config->brush_live && render_path_paint_live_layer_drawn > 0 && render_path_paint_live_layer != NULL;
if (g_context->pdirty > 0 || g_context->rtdirty > 0 || is_live) {
slot_layer_t *layer = g_context->layer;
gpu_texture_t *_texpaint = layer->texpaint;
gpu_texture_t *_texpaint_nor = layer->texpaint_nor;
gpu_texture_t *_texpaint_pack = layer->texpaint_pack;
gpu_texture_t *_texpaint = layer->texpaint;
gpu_texture_t *_texpaint_nor = layer->texpaint_nor;
gpu_texture_t *_texpaint_pack = layer->texpaint_pack;
if (is_live) {
layer->texpaint = render_path_paint_live_layer->texpaint;
if (slot_layer_is_layer(layer)) {
+5 -5
View File
@@ -443,11 +443,11 @@ void ui_header_draw_tool_properties() {
if (g_context->tool == TOOL_TYPE_BRUSH && g_config->workflow == WORKFLOW_SCULPT) {
ui_handle_t *sculpt_handle = ui_handle(__ID__);
string_array_t *mode_combo = any_array_create_from_raw(
(void *[]){
tr("Draw"),
tr("Grab"),
},
2);
(void *[]){
tr("Draw"),
tr("Grab"),
},
2);
g_context->brush_sculpt = ui_combo(sculpt_handle, mode_combo, tr("Mode"), false, UI_ALIGN_LEFT, true);
if (sculpt_handle->changed) {
make_material_parse_paint_material(true);