Fix #112231: Workbench: Texture support in sculpt mode

This commit is contained in:
Miguel Pozo 2023-09-12 18:48:34 +02:00
parent 306723c6bf
commit b7ba7663a7
1 changed files with 8 additions and 6 deletions

View File

@ -334,12 +334,14 @@ class Instance {
mat.base_color = batch.debug_color();
}
draw_mesh(ob_ref,
mat,
batch.batch,
handle,
object_state.image_paint_override,
object_state.override_sampler_state);
::Image *image = nullptr;
ImageUser *iuser = nullptr;
GPUSamplerState sampler_state = GPUSamplerState::default_sampler();
if (object_state.color_type == V3D_SHADING_TEXTURE_COLOR) {
get_material_image(ob_ref.object, batch.material_slot, image, iuser, sampler_state);
}
draw_mesh(ob_ref, mat, batch.batch, handle, image, sampler_state);
}
}
else {