From fc7a52831037977d3f286c119987679913426850 Mon Sep 17 00:00:00 2001 From: redstrate <54911369+redstrate@users.noreply.github.com> Date: Mon, 17 Aug 2020 10:51:54 -0400 Subject: [PATCH] Correctly orientate sphere in material thumbnails --- tools/common/src/commoneditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/common/src/commoneditor.cpp b/tools/common/src/commoneditor.cpp index 364e062..ff9609e 100755 --- a/tools/common/src/commoneditor.cpp +++ b/tools/common/src/commoneditor.cpp @@ -825,6 +825,8 @@ GFXTexture* CommonEditor::get_material_preview(Material& material) { scene.add(sphere).mesh = assetm->get(file::app_domain / "models" / "sphere.model"); scene.get(sphere).materials.push_back(assetm->get(file::app_domain / material.path)); // we throw away our material handle here :-( + scene.get(sphere).rotation = euler_to_quat(Vector3(radians(90.0f), 0, 0)); + return generate_common_preview(scene, Vector3(0, 0, 3)); }