diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 11:16:27 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 11:16:27 +0300 |
commit | bccc10db9a90d365c353baebf443fde2030ce970 (patch) | |
tree | 2c2e1fd94b29667a809f8d7285d049f5ff5d424d /indra/newview/llmodelpreview.cpp | |
parent | 531cd34f670170ade57f8813fe48012b61a1d3c2 (diff) | |
parent | bb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff) |
Merge branch 'main' into marchcat/x-b-merge
# Conflicts:
# autobuild.xml
# indra/cmake/ConfigurePkgConfig.cmake
# indra/cmake/ICU4C.cmake
# indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp
# indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h
# indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h
# indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp
# indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h
# indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
# indra/newview/llappviewerlinux_api.h
# indra/newview/llappviewerlinux_api_dbus.cpp
# indra/newview/llappviewerlinux_api_dbus.h
# indra/newview/llfloateremojipicker.cpp
# indra/newview/lloutfitslist.cpp
Diffstat (limited to 'indra/newview/llmodelpreview.cpp')
-rw-r--r-- | indra/newview/llmodelpreview.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 0cfa5f3402..92545cf008 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -446,13 +446,13 @@ void LLModelPreview::rebuildUploadData() // That's ok, but might not what they wanted. Use default_physics_shape if found. std::ostringstream out; out << "No physics model specified for " << instance.mLabel; - if (mDefaultPhysicsShapeP) + if (mDefaultPhysicsShapeP.notNull()) { out << " - using: " << DEFAULT_PHYSICS_MESH_NAME; lod_model = mDefaultPhysicsShapeP; } LL_WARNS() << out.str() << LL_ENDL; - LLFloaterModelPreview::addStringToLog(out, !mDefaultPhysicsShapeP); // Flash log tab if no default. + LLFloaterModelPreview::addStringToLog(out, mDefaultPhysicsShapeP.isNull()); // Flash log tab if no default. } if (lod_model) @@ -1083,8 +1083,9 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) if (loaded_lod == LLModel::LOD_PHYSICS) { // Explicitly loading physics. See if there is a default mesh. LLMatrix4 ignored_transform; // Each mesh that uses this will supply their own. - mDefaultPhysicsShapeP = nullptr; - FindModel(mScene[loaded_lod], DEFAULT_PHYSICS_MESH_NAME + getLodSuffix(loaded_lod), mDefaultPhysicsShapeP, ignored_transform); + LLModel* out_model = nullptr; + FindModel(mScene[loaded_lod], DEFAULT_PHYSICS_MESH_NAME + getLodSuffix(loaded_lod), out_model, ignored_transform); + mDefaultPhysicsShapeP = out_model; mWarnOfUnmatchedPhyicsMeshes = true; } BOOL legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching"); @@ -2785,7 +2786,7 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) LLVertexBuffer* vb = NULL; - + U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; @@ -3336,9 +3337,9 @@ BOOL LLModelPreview::render() LLQuaternion av_rot = camera_rot; F32 camera_distance = show_skin_weight ? SKIN_WEIGHT_CAMERA_DISTANCE : mCameraDistance; LLViewerCamera::getInstance()->setOriginAndLookAt( - target_pos + ((LLVector3(camera_distance, 0.f, 0.f) + offset) * av_rot), // camera - LLVector3::z_axis, // up - target_pos); // point of interest + target_pos + ((LLVector3(camera_distance, 0.f, 0.f) + offset) * av_rot), // camera + LLVector3::z_axis, // up + target_pos); // point of interest z_near = llclamp(z_far * 0.001f, 0.001f, 0.1f); @@ -3404,7 +3405,7 @@ BOOL LLModelPreview::render() LLMatrix4 mat = instance.mTransform; gGL.multMatrix((GLfloat*)mat.mMatrix); - + U32 num_models = mVertexBuffer[mPreviewLOD][model].size(); for (U32 i = 0; i < num_models; ++i) { @@ -3675,9 +3676,9 @@ BOOL LLModelPreview::render() bool pelvis_recalc = false; LLViewerCamera::getInstance()->setOriginAndLookAt( - target_pos + ((LLVector3(camera_distance, 0.f, 0.f) + offset) * av_rot), // camera - LLVector3::z_axis, // up - target_pos); // point of interest + target_pos + ((LLVector3(camera_distance, 0.f, 0.f) + offset) * av_rot), // camera + LLVector3::z_axis, // up + target_pos); // point of interest for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter) { @@ -3831,22 +3832,22 @@ BOOL LLModelPreview::render() void LLModelPreview::renderGroundPlane(float z_offset) { // Not necesarilly general - beware - but it seems to meet the needs of LLModelPreview::render - gGL.diffuseColor3f( 1.0f, 0.0f, 1.0f ); + gGL.diffuseColor3f( 1.0f, 0.0f, 1.0f ); - gGL.begin(LLRender::LINES); - gGL.vertex3fv(mGroundPlane[0].mV); - gGL.vertex3fv(mGroundPlane[1].mV); + gGL.begin(LLRender::LINES); + gGL.vertex3fv(mGroundPlane[0].mV); + gGL.vertex3fv(mGroundPlane[1].mV); - gGL.vertex3fv(mGroundPlane[1].mV); - gGL.vertex3fv(mGroundPlane[2].mV); + gGL.vertex3fv(mGroundPlane[1].mV); + gGL.vertex3fv(mGroundPlane[2].mV); - gGL.vertex3fv(mGroundPlane[2].mV); - gGL.vertex3fv(mGroundPlane[3].mV); + gGL.vertex3fv(mGroundPlane[2].mV); + gGL.vertex3fv(mGroundPlane[3].mV); - gGL.vertex3fv(mGroundPlane[3].mV); - gGL.vertex3fv(mGroundPlane[0].mV); + gGL.vertex3fv(mGroundPlane[3].mV); + gGL.vertex3fv(mGroundPlane[0].mV); - gGL.end(); + gGL.end(); } |