Fix #104730: Suppress using anonymous UV layers for rendering #105192

Closed
Martijn Versteegh wants to merge 5 commits from Baardaap/blender:suppressrenderingofanonymouslayers into main

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

When an object has no UV layers and an anonymous UV layer is created,
the anonymous layer gets set as the default (render) layer. This is
very confusing because it then uses a hidden anonmous layer for
rendering. This patch suppresses the usage of anonymous layers for
rendering.

When an object has no UV layers and an anonymous UV layer is created, the anonymous layer gets set as the default (render) layer. This is very confusing because it then uses a hidden anonmous layer for rendering. This patch suppresses the usage of anonymous layers for rendering.
Martijn Versteegh added 1 commit 2023-02-24 21:03:53 +01:00
f70ec0aa02 Fix 104730: Suppress using anonymous UV layers for rendering.
When an object has no UV layers and an anonymous UV layer is created,
the anonymous layer gets set as the default (render) layer. This is
very confusing because it then uses a hidden anonmous layer for
rendering. This patch suppresses the usage of anonymous layers for
rendering.
Brecht Van Lommel changed title from Fix 104730: Suppress using anonymous UV layers for rendering. to Fix #104730: Suppress using anonymous UV layers for rendering. 2023-02-24 21:06:36 +01:00
Author
Member

I could maybe add the patch to set the first created named to the default render layer. Because when somehow now a named layer is created first, before an anonymous layer, it will be set as the default render layer while if it is created second, then it isn't. Which might be confusing.

But that should probably be a separate patch.

I could maybe add the patch to set the first created named to the default render layer. Because when somehow now a named layer is created first, *before* an anonymous layer, it will be set as the default render layer while if it is created second, then it isn't. Which might be confusing. But that should probably be a separate patch.

This is only for Eevee and Workbench. Is the anonymous layer already ignored by Cycles and the Python API?

This is only for Eevee and Workbench. Is the anonymous layer already ignored by Cycles and the Python API?
Author
Member

For the python api, yes: (#104783)

For cycles: I was wondering about that. I tested cycles expecting it to need extra changes. But it seemed to work as expected.

But now that you say the same as what I was expecting, I'll double-check it.

Maybe I made a mistake testing cycles.

For the python api, yes: (#104783) For cycles: I was wondering about that. I tested cycles expecting it to need extra changes. But it seemed to work as expected. But now that you say the same as what I was expecting, I'll double-check it. Maybe I made a mistake testing cycles.

Cycles should be fine then as it is using the RNA API just like the Python API.

Cycles should be fine then as it is using the RNA API just like the Python API.
Author
Member

Ah, I see. Cycles gets the uv layers via the python interface. So that was already fixed.

Ah, I see. Cycles gets the uv layers via the python interface. So that was already fixed.
Hans Goudey changed title from Fix #104730: Suppress using anonymous UV layers for rendering. to Fix #104730: Suppress using anonymous UV layers for rendering 2023-03-03 23:05:48 +01:00
Hans Goudey requested review from Jacques Lucke 2023-03-07 16:54:49 +01:00
Hans Goudey requested review from Hans Goudey 2023-03-07 16:54:49 +01:00
Martijn Versteegh added this to the 3.5 milestone 2023-03-08 11:54:38 +01:00
Martijn Versteegh added 1 commit 2023-03-08 18:40:24 +01:00
Brecht Van Lommel approved these changes 2023-03-10 13:21:22 +01:00
Hans Goudey requested changes 2023-03-10 14:02:39 +01:00
Hans Goudey left a comment
Member

This seems reasonable. Though did you look into removing anonymous attributes on evaluated objects? That seemed like a reasonable solution too. Mainly just curious, I don't have much of an opinion.

This seems reasonable. Though did you look into removing anonymous attributes on evaluated objects? That seemed like a reasonable solution too. Mainly just curious, I don't have much of an opinion.
@ -506,6 +508,8 @@ void CustomData_set_layer_stencil_index(struct CustomData *data, int type, int n
void CustomData_set_layer_flag(struct CustomData *data, int type, int flag);
void CustomData_clear_layer_flag(struct CustomData *data, int type, int flag);
Member

Looks like clang format is missing here

Looks like clang format is missing here
@ -2689,0 +2690,4 @@
{
const int layer_index = data->typemap[type];
BLI_assert(customdata_typemap_is_valid(data));
BLI_assert(data->layers[layer_index + n].type == type);
Member

Can this be implemented with CustomData_get_layer_index_n?

Can this be implemented with `CustomData_get_layer_index_n`?
Baardaap marked this conversation as resolved
Author
Member

This seems reasonable. Though did you look into removing anonymous attributes on evaluated objects? That seemed like a reasonable solution too. Mainly just curious, I don't have much of an opinion.

Jacques mentioned something about removing anonymous layers from evaluated objects being a problem with the viewer node/spreadsheet (involving lazy evaluation? can't remember exactly). So I decided to go this route.

> This seems reasonable. Though did you look into removing anonymous attributes on evaluated objects? That seemed like a reasonable solution too. Mainly just curious, I don't have much of an opinion. Jacques mentioned something about removing anonymous layers from evaluated objects being a problem with the viewer node/spreadsheet (involving lazy evaluation? can't remember exactly). So I decided to go this route.
Member

Jacques mentioned something about removing anonymous layers from evaluated objects being a problem with the viewer node/spreadsheet (involving lazy evaluation? can't remember exactly). So I decided to go this route.

He mentioned that as a problem for a possible future version of the viewer node-- not how it works right now. Currently it uses an attribute with the .viewer name. That reasoning is fine with me though.

> Jacques mentioned something about removing anonymous layers from evaluated objects being a problem with the viewer node/spreadsheet (involving lazy evaluation? can't remember exactly). So I decided to go this route. He mentioned that as a problem for a possible future version of the viewer node-- not how it works right now. Currently it uses an attribute with the `.viewer` name. That reasoning is fine with me though.
Martijn Versteegh added 3 commits 2023-03-14 16:58:15 +01:00
Hans Goudey approved these changes 2023-03-14 17:00:23 +01:00
Author
Member

merged as aca3039740

merged as https://projects.blender.org/blender/blender/commit/aca3039740e55a9f67b177c93aea60040c17733a

Pull request closed

Sign in to join this conversation.
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#105192
No description provided.