WIP: Fix #104730: Make first visible CustomData layer active #104739

Draft
Martijn Versteegh wants to merge 6 commits from Baardaap/blender:activatefirstnonhiddenlayer into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

When creating a CustomData layer with a name not starting with a dot
while all existing layers of the same type have names which do start
with a dot make the new layer the active/render/mask/clone layer.

It can be confusing if the render layers is a hidden/anonymous layer.

When creating a CustomData layer with a name not starting with a dot while all existing layers of the same type have names which do start with a dot make the new layer the active/render/mask/clone layer. It can be confusing if the render layers is a hidden/anonymous layer.
Martijn Versteegh added the
Interest
Geometry Nodes
Interest
Core
labels 2023-02-14 13:21:45 +01:00
Hans Goudey was assigned by Martijn Versteegh 2023-02-14 13:21:45 +01:00
Martijn Versteegh added 1 commit 2023-02-14 13:21:47 +01:00
2e69a2b9af Fix #104730: Make first visible CustomData layer active
When creating a CustomData layer with a name not starting with a dot
while all existing layers of the same type have names which do start
with a dot make the new layer the active/render/mask/clone layer.

It can be confusing if the render layers is a hidden/anonymous layer.
Author
Member

It's not really a satisfactory fix for this issue. I'm open to better ideas.

It's not really a satisfactory fix for this issue. I'm open to better ideas.

Active slot switching node - open design. This looks like a partial private solution.

Active slot switching node - open design. This looks like a partial private solution.
Author
Member

Also, when not connecting a Texture Coordinate or UV Map node, I think the implicit uvmap is still taken from the original object and not the evaluated object. But I need to investigate that more.

Also, when not connecting a `Texture Coordinate` or `UV Map` node, I think the implicit uvmap is still taken from the original object and not the evaluated object. But I need to investigate that more.
Author
Member

Active slot switching node - open design. This looks like a partial private solution.

Yes, probably. But even when that node exists it is imo very undesirable that an anonymous uv map can be the active/render/mask/clone layer. This needs some thinking/designing I guess.

> Active slot switching node - open design. This looks like a partial private solution. Yes, probably. But even when that node exists it is imo very undesirable that an anonymous uv map can be the active/render/mask/clone layer. This needs some thinking/designing I guess.
Martijn Versteegh changed title from Fix #104730: Make first visible CustomData layer active to WIP Fix #104730: Make first visible CustomData layer active 2023-02-14 14:14:23 +01:00
Martijn Versteegh added 1 commit 2023-02-14 14:52:18 +01:00
Brecht Van Lommel added this to the Modeling project 2023-02-15 09:51:15 +01:00
Author
Member

Also, when not connecting a Texture Coordinate or UV Map node, I think the implicit uvmap is still taken from the original object and not the evaluated object. But I need to investigate that more.

This turns out to not be true. However when an anonymous layer is the only uvmap on a mesh it will still be considered the render/active/etc layer and thus used for rendering. WHich behaves somewhat unexpected. Maybe an anonymous layers should just never be active/render/etc and the active(etc) layer should just be set to -1 if there are only anonymous layers.

> Also, when not connecting a `Texture Coordinate` or `UV Map` node, I think the implicit uvmap is still taken from the original object and not the evaluated object. But I need to investigate that more. This turns out to not be true. However when an anonymous layer is the *only* uvmap on a mesh it will still be considered the render/active/etc layer and thus used for rendering. WHich behaves somewhat unexpected. Maybe an anonymous layers should just never be active/render/etc and the active(etc) layer should just be set to -1 if there are only anonymous layers.
Martijn Versteegh added 2 commits 2023-02-16 14:42:17 +01:00
Hans Goudey changed title from WIP Fix #104730: Make first visible CustomData layer active to WIP: Fix #104730: Make first visible CustomData layer active 2023-02-16 14:51:35 +01:00
Hans Goudey removed their assignment 2023-02-16 18:56:29 +01:00
Author
Member

A better solution is maybe to remove anonymous layers from evaluated objects. (and update the 'active/render' layers as needed. (as discussed in the chat)

A better solution is maybe to remove anonymous layers from evaluated objects. (and update the 'active/render' layers as needed. (as discussed in the chat)
Author
Member

I think this should maybe still be useful to add after #105192, maybe after some reworking.

I think this should maybe still be useful to add after #105192, maybe after some reworking.
Member

The referenced bug is closed, can this PR be closed as well?

The referenced bug is closed, can this PR be closed as well?
Author
Member

Not sure yet. Part of this fix didn't make it into what was merged. We might need some discussion if it's still needed.

The part that was merged suppresses the usage of anonymous layers for rendering, which prevents the most confusing behavior, but the anonymous layer can still be the 'render' layer or the 'active' layer.

I think it would be a good idea to set the first 'nonanonymous' layer to the active/render/clone layer. But maybe that should wait till the whole system of which layer is 'active' is changed to name based like with the color attributes?.

Not sure yet. Part of this fix didn't make it into what was merged. We might need some discussion if it's still needed. The part that was merged suppresses the usage of anonymous layers for rendering, which prevents the most confusing behavior, but the anonymous layer can still be the 'render' layer or the 'active' layer. I think it would be a good idea to set the first 'nonanonymous' layer to the active/render/clone layer. But maybe that should wait till the whole system of which layer is 'active' is changed to name based like with the color attributes?.
This pull request has changes conflicting with the target branch.
  • source/blender/blenkernel/intern/customdata.cc

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u activatefirstnonhiddenlayer:Baardaap-activatefirstnonhiddenlayer
git checkout Baardaap-activatefirstnonhiddenlayer
Sign in to join this conversation.
No reviewers
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
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#104739
No description provided.