Regression: Removing shape keys via python iteration messes up normals #115572
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#115572
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.42
Blender Version
Broken: version: 4.0.0, branch: blender-v4.0-release, commit date: 2023-11-13 17:26, hash:
878f71061b8e
Worked: 3.6.5
Caused by
383a145a19
Short description of error
This is the strangest bug but this is EXTREMELY important for my workflow, as for many others as Keymesh add-on cannot properly function without this issue getting a fix.
When you apply shape keys with
bpy.ops.object.shape_key_remove(all=True, apply_mix=True)
it gives wrong normals in 4.0. I don't even know what to call it. It looks completely flat, even though shape is the same it seems.When I use transfer mesh data operator (with any random object active) and randomly check-uncheck some boxes, it returns correct normals, but I can't get that to work with python, and its impossible to do it by hand on amount of objects I'm working on.
3.6
4.0
Exact steps for others to reproduce the error
I am attaching a blend file with test example. There is a cube with shape key. In Text editor there is a script that copies object and mesh on each frame in some range, aligns them next to each other, and applies shape keys on each of them.
Open file with 3.6 and 4.0, and run script in both. In 3.6 normals will be correctly kept. In 4.0 it will be completely flat.
I hope fix can be found quickly, this feature is imperative for my studios work
Can confirm, will check
Note: as a (temporary) workaround, going in and out of editmode recalculates the normals correctly
A workaround in 4.0 seems to be calling
Mesh.update()
after callingbpy.ops.object.shape_key_remove(all=True, apply_mix=True)
.Thank you both you saved my deadline! :D But prominent fix is still needed
Caused by
383a145a19
CC @HooglyBoogly
Possible fix in !115580