Show material preview in 2d view when using material tool
This commit is contained in:
@@ -1806,9 +1806,7 @@ function ui_base_render_cursor() {
|
||||
context_raw.view_index = -1;
|
||||
|
||||
if (context_raw.brush_stencil_image != null &&
|
||||
context_raw.tool != tool_type_t.BAKE &&
|
||||
context_raw.tool != tool_type_t.PICKER &&
|
||||
context_raw.tool != tool_type_t.MATERIAL &&
|
||||
context_raw.tool != tool_type_t.COLORID) {
|
||||
let r: rect_t = ui_base_get_brush_stencil_rect();
|
||||
if (!operator_shortcut(map_get(config_keymap, "stencil_hide"), shortcut_type_t.DOWN)) {
|
||||
|
||||
@@ -255,6 +255,7 @@ function layers_update_fill_layers() {
|
||||
|
||||
context_raw.tool = tool_type_t.FILL;
|
||||
context_raw.fill_type_handle.position = fill_type_t.OBJECT;
|
||||
render_path_paint_set_plane_mesh();
|
||||
make_material_parse_paint_material(false);
|
||||
context_raw.pdirty = 1;
|
||||
render_path_paint_use_live_layer(true);
|
||||
@@ -265,7 +266,9 @@ function layers_update_fill_layers() {
|
||||
context_raw.fill_type_handle.position = _fill_type;
|
||||
context_raw.pdirty = 0;
|
||||
context_raw.rdirty = 2;
|
||||
render_path_paint_restore_plane_mesh();
|
||||
make_material_parse_paint_material();
|
||||
ui_view2d_hwnd.redraws = 2;
|
||||
|
||||
if (current != null) draw_begin(current);
|
||||
return;
|
||||
|
||||
@@ -124,7 +124,6 @@ function ui_view2d_render() {
|
||||
|
||||
// Texture
|
||||
let tex: gpu_texture_t = null;
|
||||
|
||||
let l: slot_layer_t = context_raw.layer;
|
||||
let channel: i32 = 0;
|
||||
|
||||
@@ -145,6 +144,10 @@ function ui_view2d_render() {
|
||||
layer = render_path_paint_live_layer;
|
||||
}
|
||||
|
||||
if (context_raw.tool == tool_type_t.MATERIAL) {
|
||||
layer = render_path_paint_live_layer;
|
||||
}
|
||||
|
||||
if (ui_view2d_layer_mode == view_2d_layer_mode_t.VISIBLE) {
|
||||
let current: gpu_texture_t = _draw_current;
|
||||
let in_use: bool = gpu_in_use;
|
||||
|
||||
Reference in New Issue
Block a user