Switching Grease Pencil material slot link to Object and back to Data corrupts material #64896
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#64896
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:
9efe117535
, master, 2018-05-20Short description of error
For normal objects switching a material slot link to Object and back to Data will result in the material to reappear in the slot. For Grease Pencil objects the material in the slot will point to
0xcccc...
. This causes blender to crash while rendering the viewport.Exact steps for others to reproduce the error
Added subscriber: @matc
Added subscriber: @brecht
@brecht I have been doing debug and I have seen the problem is when retry the material.
The material is recovered using
You can find the code in BKE_gpencil_object_material_get_from_brush()
IIRC you told me the function give_current_material() Is used to get the mat for Data and for Objet mode, but in this case, the function is returning NaN. I have checked and the Object parameter is correct and the ob->actcol=1, so not sure why this is not working... at least the function could return NULL intead of garbage data.
Any idea?
I have seen this in the console, not sure if related or not:
Could be that the problem is in
DepsgraphNodeBuilder::build_object_data_geometry
where only materials are handled which are returned bygive_current_material
. When setting a link to Object, then the material inob->data
is ignored. But I'm not sure how this wouldn't have caused problems with the default cube.This would fix the problem:
Added subscriber: @lichtwerk
@lichtwerk I don't know what to do here... maybe you need reassign to someone that knows how to fix it, because it looks something outside Gpencil code.
Added subscriber: @antoniov
Closed as duplicate of #63757
Closed by error. This has been fixed in #66293