Auto Smooth versioning modifiers appearing on Append #119447
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119447
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?
Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-03-12 22:12, hash:
443ea628c5c8
Worked: I think this wasn't happening on the previous buildbot 4.2 build, so, the one from 13 March.
Short description of error
Some objects of our character keeps getting new Auto Smooth modifiers added to it whenever they are appended to another file.
Exact steps for others to reproduce the error
This is currently breaking our pipeline so an urgent fix would be nice.
Hi, auto smooth versioning code for link/append is added in
3c3f1e6d62
I'll work on this tomorrow morning. If someone else gets to it first that's okay though of course.
I'll check. I think we can get the library file version from lapp_context then skip the versioning if > 400
I'm not sure how this situation has occurred. AFAICS, we're already clearing
ME_AUTOSMOOTH_LEGACY
flag from the mesh when file withold autosmooth
is loaded and saved in 4.1/4.2.If I open your file in 4.0 then
auto smooth
toggle is enabled. Maybe !119449 is not requiredHans Goudey referenced this issue2024-03-14 15:44:34 +01:00
@Mets do you have the version of this file before opening & saving in recent Blender? What we need to understand here is why the conversion of these meshes from legacy auto-smooth to modifier did not happen...
To be clear, given current state of data, the behavior of the append code is correct and totally expected.
Yep, I have versions going back to Nov 17, each version being saved with some blender version that was latest nightly build at that time.
But for the life of me I can't find the date of the original autosmooth versioning commit, and its date... ;_; plz help
89e3ba4e25
was the original commit introducing the versioning (October 20)b0cb58ca0e
fixed the versioning to clear the auto smooth setting from versioned objects (November 26)If the versioning to 4.1 happened between those two commits, the new modifier wouldn't have been added but the old "hidden" auto smooth flag would still be set. That's how we would have got into this situation.
I still think it's better to be safe and not process existing objects like is done in #119467.
Let's use this task as central info point?
Known issues so far
AUTOSMOOTH
flag set, even though some of the Object IDs using them may have been converted and already have the expected modifier instead.There are at least two ways to reach this situation: some in-dev versions of Blender would not clear the autosmooth flag after conversion, and some objects using linked meshes from other library.
Proposed solutions
#2 is trivial to fix (see !119471), but imho the best way to address it is to systematically clear the
AUTOSMOOTH
flag on all meshes after running conversion. This will also solve (most of) #1 issues (some linking-related scenarii are not solvable at all imho, but think they are rare enough in practice, that we can accept the 'loss of autosmooth data' for them).#3 IMHO should not be too hard to solve? Code could simply lookup in existing nodetrees one that would match (based on name, or whast is in the node tree, and its library), before creating a new one?
#4 is (relatively) trivial to fix now in
main
, using the newBKE_id_new_in_lib
functions. In 4.1, I can only think of creating a local nodetree, assigning the library to it, and re-running the uniquename/sorting code (BKE_id_new_name_validate
) on it to ensure it ends up where it should and does have a unique name in the library namespace.Thanks so much for writing that all down. I agree with your points and it sounds like a good plan. I'll work on implementing this tomorrow morning.
5bfe6ad8f8
Just to clarify, in this case the modifier will be added again to these objects since the flag wasn't cleared properly by the initial versioning and the modifiers were removed in the meantime. After that everything should work properly though.