Regression: STL importer "Unit Scale" bug. #125070

Closed
opened 2024-07-19 12:56:22 +02:00 by bartus · 8 comments
Contributor

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: Quadro K2000M/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 425.91

Blender Version
Broken: version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: a51f293548ad
Worked: 4.1.0 (legacy STL import)

Short description of error
"Unit Scale" implementation in the new STL importer is bugged: it's reapplied instead of being reversed.

Exact steps for others to reproduce the error

  1. Start default cube scene
  2. Set "Unit Scene" to value other then '1'
  3. Export default cube to STL with "Unit Scale" option enabled
  4. Import resulting STL with "Unit Scale" enabled: it get scaled by "Unit Scale" squared.

Expected behavior
Importing STL with "Unit Scale" enabled should inverse, not reapply the scale factor.

Previous implementation reference: https://projects.blender.org/blender/blender-addons/src/commit/b42d68627734cb18af0e6f41537063984313a284/io_mesh_stl/init.py#L110
Fixed with: #124718

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: Quadro K2000M/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 425.91 **Blender Version** Broken: version: 4.2.0, branch: blender-v4.2-release, commit date: 2024-07-16 06:20, hash: `a51f293548ad` Worked: 4.1.0 (legacy STL import) **Short description of error** "Unit Scale" implementation in the new STL importer is bugged: it's reapplied instead of being reversed. **Exact steps for others to reproduce the error** 1. Start default cube scene 2. Set "Unit Scene" to value other then '1' 3. Export default cube to STL with "Unit Scale" option enabled 4. Import resulting STL with "Unit Scale" enabled: it get scaled by "Unit Scale" squared. **Expected behavior** Importing STL with "Unit Scale" enabled should inverse, not reapply the scale factor. Previous implementation reference: [https://projects.blender.org/blender/blender-addons/src/commit/b42d68627734cb18af0e6f41537063984313a284/io_mesh_stl/__init__.py#L110](https://projects.blender.org/blender/blender-addons/src/commit/b42d68627734cb18af0e6f41537063984313a284/io_mesh_stl/__init__.py#L110 ) Fixed with: #124718
bartus added the
Type
Report
Severity
Normal
Status
Needs Triage
labels 2024-07-19 12:56:23 +02:00
Iliya Katushenock changed title from STL importer "Unit Scale" bug. to Regression: STL importer "Unit Scale" bug. 2024-07-19 13:16:42 +02:00
Iliya Katushenock added the
Interest
Pipeline, Assets & IO
label 2024-07-19 13:16:47 +02:00
Member

Same is probably true for PLY

Same is probably true for PLY

Same is probably true for PLY

Please add fixes to backport if them works

> Same is probably true for PLY Please add fixes to backport if them works
Member

Same is probably true for PLY

Please add fixes to backport if them works

This should either get added to !124718 or a new PR made, dropping a fix here as attachment will fly under the radar
See https://developer.blender.org/docs/handbook/contributing/pull_requests/

> > Same is probably true for PLY > > Please add fixes to backport if them works This should either get added to !124718 or a new PR made, dropping a fix here as attachment will fly under the radar See https://developer.blender.org/docs/handbook/contributing/pull_requests/
Member

Can confirm btw.

Can confirm btw.
Philipp Oeser added
Status
Confirmed
Severity
High
and removed
Status
Needs Triage
Severity
Normal
labels 2024-07-22 09:12:33 +02:00
Jesse Yurkovich added
Module
Pipeline, Assets & IO
and removed
Interest
Pipeline, Assets & IO
labels 2024-07-27 22:49:13 +02:00
Author
Contributor

@RomanKuz-4 yep, same issue arise in ply, been wandering if other format that doesn't implement unit system should also comes with "Unit scale" option?

@RomanKuz-4 yep, same issue arise in ply, been wandering if other format that doesn't implement unit system should also comes with "Unit scale" option?

@deadpin are you working on that one, or do you know if anybody else is currently?

@deadpin are you working on that one, or do you know if anybody else is currently?

I'll help review and get these changes in for both STL and PLY.

I'll help review and get these changes in for both STL and PLY.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-08-13 19:23:20 +02:00

Committed with both STL and PLY fixes and added to the backporting list. Thank you for doing the investigation and making the initial fix @bartus.

Committed with both STL and PLY fixes and added to the backporting list. Thank you for doing the investigation and making the initial fix @bartus.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#125070
No description provided.