Grease Pencil: "Set Material Node" in Geometry Nodes doesn't transfer material settings for "Line Art" Masks #100435

Closed
opened 2022-08-16 11:42:55 +02:00 by Christoph Werner · 14 comments

System Information
Version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: bcfdb14560, type: release
build date: 2022-08-02, 23:41:46
platform: 'Windows-10-10.0.22000-SP0'

Broken: Blender including versions 3.0 - 3.2.2
Worked: Never

Short description of error
When setting / replacing materials via Geometry Nodes that include Grease Pencil Line Art mask settings, the settings are ignored by Grease Pencil or deleted by Geometry Nodes.

Important: If you set or replace the very same material with itself, then all works!

Exact steps for others to reproduce the error
See screenshot and example scene for reproduction.

Example file:
GN_GPencil_LineArt_Error.blend

Screenshot:
image.png

**System Information** Version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: bcfdb14560e7, type: release build date: 2022-08-02, 23:41:46 platform: 'Windows-10-10.0.22000-SP0' Broken: Blender including versions 3.0 - 3.2.2 Worked: Never **Short description of error** When setting / replacing materials via Geometry Nodes that include Grease Pencil Line Art mask settings, the settings are ignored by Grease Pencil or deleted by Geometry Nodes. **Important:** If you set or replace the very same material with itself, then all works! **Exact steps for others to reproduce the error** See screenshot and example scene for reproduction. **Example file:** [GN_GPencil_LineArt_Error.blend](https://archive.blender.org/developer/F13393091/GN_GPencil_LineArt_Error.blend) **Screenshot:** ![image.png](https://archive.blender.org/developer/F13393081/image.png)

Added subscriber: @ChristophWerner

Added subscriber: @ChristophWerner
Member

Added subscriber: @ChengduLittleA

Added subscriber: @ChengduLittleA
YimingWu self-assigned this 2022-08-16 11:46:55 +02:00
Member

I'll take a look. :)

I'll take a look. :)

In #100435#1404407, @ChengduLittleA wrote:
I'll take a look. :)

Great. Thank you!
Seem to be a basic problem with geometry nodes replacing materials based on object data.

> In #100435#1404407, @ChengduLittleA wrote: > I'll take a look. :) Great. Thank you! Seem to be a basic problem with geometry nodes replacing materials based on object data.
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Looks like by adding two material slots in the original object could resolve the issue.

I'm trying if changing BKE_object_material_get to BKE_object_material_get_eval would resolve the issue without requiring extra modification on the user side.

Looks like by adding two material slots in the original object could resolve the issue. I'm trying if changing `BKE_object_material_get` to `BKE_object_material_get_eval` would resolve the issue without requiring extra modification on the user side.

In #100435#1404416, @ChengduLittleA wrote:
Looks like by adding two material slots in the original object could resolve the issue.

I'm trying if changing BKE_object_material_get to BKE_object_material_get_eval would resolve the issue without requiring extra modification on the user side.

Yes, but this solution works with local objects only. Seem not to work with linked data that has an override.

> In #100435#1404416, @ChengduLittleA wrote: > Looks like by adding two material slots in the original object could resolve the issue. > > I'm trying if changing `BKE_object_material_get` to `BKE_object_material_get_eval` would resolve the issue without requiring extra modification on the user side. Yes, but this solution works with local objects only. Seem not to work with linked data that has an override.

This issue was referenced by accf38c1d1

This issue was referenced by accf38c1d1d9c2b34f8e30ee1f1cbbf3cdfb69f6
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Now it should work fine in 3.3. Should I apply this to 3.2 as well? @PratikPB2123

Now it should work fine in 3.3. Should I apply this to 3.2 as well? @PratikPB2123
Member

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges
Member

No need :)
3.2.2 was the last corrective release.


In #98661#1401821, @ThomasDinges wrote:
Also closing this one, since there won't be another 3.2.x release.

No need :) 3.2.2 was the last corrective release. - - - > In #98661#1401821, @ThomasDinges wrote: > Also closing this one, since there won't be another 3.2.x release.
Member

OK Thanks! :)

OK Thanks! :)
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
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#100435
No description provided.