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:
authorJacques Lucke <jacques@blender.org>2022-07-19 16:49:29 +0300
committerJacques Lucke <jacques@blender.org>2022-07-19 16:49:45 +0300
commit2232855b50e90ef49d07df8ee4e3e0d0efb2cc4c (patch)
tree4b388598fe3de9af7e7169dd06892250b5631baf /source/blender/editors/object
parent95fd7c3679566e87ceff7a6df8b24a8da33534ab (diff)
Curves: align surface and curves object in Empty Hair operator
Without this, symmetry does not work by default when the surface object was not at the same location as the 3d cursor.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc
index 35d23edfbf0..a8e11afba65 100644
--- a/source/blender/editors/object/object_add.cc
+++ b/source/blender/editors/object/object_add.cc
@@ -2071,16 +2071,16 @@ static int object_curves_empty_hair_add_exec(bContext *C, wmOperator *op)
Scene *scene = CTX_data_scene(C);
ushort local_view_bits;
- blender::float3 loc, rot;
if (!ED_object_add_generic_get_opts(
- C, op, 'Z', loc, rot, nullptr, nullptr, &local_view_bits, nullptr)) {
+ C, op, 'Z', nullptr, nullptr, nullptr, nullptr, &local_view_bits, nullptr)) {
return OPERATOR_CANCELLED;
}
Object *surface_ob = CTX_data_active_object(C);
BLI_assert(surface_ob != nullptr);
- Object *curves_ob = ED_object_add_type(C, OB_CURVES, nullptr, loc, rot, false, local_view_bits);
+ Object *curves_ob = ED_object_add_type(C, OB_CURVES, nullptr, nullptr, nullptr, false, local_view_bits);
+ BKE_object_apply_mat4(curves_ob, surface_ob->obmat, false, false);
/* Set surface object. */
Curves *curves_id = static_cast<Curves *>(curves_ob->data);