Maniphest T72481

Grease pencil can't be instanciated using collection instance
Closed, DuplicateBUG

Assigned To
None
Authored By
Yannick Castaing (0_BoUBoU_0)
Dec 16 2019, 7:18 PM
Tags
  • BF Blender
  • Grease Pencil
Subscribers
Antonio Vazquez (antoniov)
Clément Foucault (fclem)
Germano Cavalcante (mano-wii)
Jacques Lucke (JacquesLucke)
Yannick Castaing (0_BoUBoU_0)

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.60

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: rB26bd5ebd42e3
Worked: (optional)

Short description of error
When we are making more than one link of a same collection, from another scene, if this collection contains one grease pencil, this one can't be dupplicated, unlike other stuff (like geometry, or whatever).
(Maybe it's due to the fact that grease pencil is animated, but if animation playback is disabled, it shouldn't be a problem).

Exact steps for others to reproduce the error

  • create a scene
  • create a grease pencil monkey inside the default collection, which we can rename "plouf"
  • create a new scene
  • add the collection "plouf" as a collection instance
  • dupplicate or add again the collection "plouf"

the grease pencil is disappearing from the first instance of plouf, and goes to the second instance of plouf, whereas they are the the same


Event Timeline

Yannick Castaing (0_BoUBoU_0) created this task.Dec 16 2019, 7:18 PM
Germano Cavalcante (mano-wii) lowered the priority of this task from 90 to 50.Dec 18 2019, 1:38 PM
Germano Cavalcante (mano-wii) added a project: Grease Pencil.
Germano Cavalcante (mano-wii) added a subscriber: Germano Cavalcante (mano-wii).

Similar to T63563, but in this case the stroke is visible.

Dalai Felinto (dfelinto) added a project: Tracker Curfew.Dec 23 2019, 1:39 PM
Jacques Lucke (JacquesLucke) removed a project: Tracker Curfew.EditedJan 22 2020, 3:04 PM
Jacques Lucke (JacquesLucke) changed the subtype of this task from "Report" to "Bug".
Jacques Lucke (JacquesLucke) added a subscriber: Jacques Lucke (JacquesLucke).

When I try to open this file I get a stack-use-after-scope error when accessing ob->... in GPENCIL_draw_scene.

I found that the issue is that the pointer to ob is stored in a cache in GPENCIL_cache_populate. However, in this case, ob points to an object that lives on the stack in DEGObjectIterData.temp_dupli_object created by DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN in DRW_draw_render_loop_ex.

This seems to be a deeper issue in the way grease pencil object duplis are drawn, but I don't understand the full context here...

@Clément Foucault (fclem), Should GPENCIL_cache_populate be allowed to store pointers to objects passed into it?

Jacques Lucke (JacquesLucke) added a subscriber: Clément Foucault (fclem).Jan 22 2020, 3:09 PM
Antonio Vazquez (antoniov) added a subscriber: Antonio Vazquez (antoniov).EditedJan 22 2020, 4:04 PM

@Jacques Lucke (JacquesLucke) In the refactor of the gpencil engine we have changed totally how this works, so don't think this will be a problem in the future.

Clément Foucault (fclem) closed this task as a duplicate of T66293: GPencil: Redesign Blend modes and cleanup Drawing Engine.Jan 23 2020, 12:03 PM