Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-11-03 19:40:33 +0300
committerHans Goudey <h.goudey@me.com>2022-11-03 19:40:33 +0300
commitf4e261bfed553c98f6e987dc84591ecc680e1ebb (patch)
tree4fd7816190c0b3af1c8a25e686d1a17e951fd3ab /source/blender/editors/object/object_remesh.cc
parent0c79e9df4b88f6a063e7437943e6560b89fbd749 (diff)
parent41c692ee2f0f5a92d6162e65652e6f8d399df1a9 (diff)
Merge branch 'master' into refactor-mesh-position-generic
Diffstat (limited to 'source/blender/editors/object/object_remesh.cc')
-rw-r--r--source/blender/editors/object/object_remesh.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_remesh.cc b/source/blender/editors/object/object_remesh.cc
index 7a70831c750..501adaf7506 100644
--- a/source/blender/editors/object/object_remesh.cc
+++ b/source/blender/editors/object/object_remesh.cc
@@ -297,7 +297,7 @@ static void voxel_size_edit_draw(const bContext *C, ARegion * /*ar*/, void *arg)
uint pos3d = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
GPU_matrix_push();
- GPU_matrix_mul(cd->active_object->obmat);
+ GPU_matrix_mul(cd->active_object->object_to_world);
/* Draw Rect */
immUniformColor4f(0.9f, 0.9f, 0.9f, 0.8f);
@@ -495,10 +495,10 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
float view_normal[3] = {0.0f, 0.0f, 1.0f};
/* Calculate the view normal. */
- invert_m4_m4(active_object->imat, active_object->obmat);
+ invert_m4_m4(active_object->world_to_object, active_object->object_to_world);
copy_m3_m4(mat, rv3d->viewinv);
mul_m3_v3(mat, view_normal);
- copy_m3_m4(mat, active_object->imat);
+ copy_m3_m4(mat, active_object->world_to_object);
mul_m3_v3(mat, view_normal);
normalize_v3(view_normal);
@@ -536,7 +536,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
/* Project the selected face in the previous step of the Bounding Box. */
for (int i = 0; i < 4; i++) {
float preview_plane_world_space[3];
- mul_v3_m4v3(preview_plane_world_space, active_object->obmat, cd->preview_plane[i]);
+ mul_v3_m4v3(preview_plane_world_space, active_object->object_to_world, cd->preview_plane[i]);
ED_view3d_project_v2(region, preview_plane_world_space, preview_plane_proj[i]);
}
@@ -583,7 +583,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
/* Invert object scale. */
float scale[3];
- mat4_to_size(scale, active_object->obmat);
+ mat4_to_size(scale, active_object->object_to_world);
invert_v3(scale);
size_to_mat4(scale_mat, scale);
@@ -594,7 +594,7 @@ static int voxel_size_edit_invoke(bContext *C, wmOperator *op, const wmEvent *ev
/* Scale the text to constant viewport size. */
float text_pos_word_space[3];
- mul_v3_m4v3(text_pos_word_space, active_object->obmat, text_pos);
+ mul_v3_m4v3(text_pos_word_space, active_object->object_to_world, text_pos);
const float pixelsize = ED_view3d_pixel_size(rv3d, text_pos_word_space);
scale_m4_fl(scale_mat, pixelsize * 0.5f);
mul_m4_m4_post(cd->text_mat, scale_mat);