Page MenuHome

GPencil: Fix T42895 - refactor object/scene data behaviour

Authored by Julian Eisel (Severin) on Dec 15 2014, 2:31 AM.



GPencil: Fix T42895 - refactor object/scene data behaviour

This is a proper fix for T42774 and fixes T42895. It basically changes two things:

  • fix logic in ED_gpencil_data_get_pointers_direct
  • make sure active scene greace pencil layers are always drawn

plus some picky whitespace cleanups

I stumbled over a few other minor gpencil things I'd like to fix before the release, will look at them soon.
(@Joshua Leung (aligorith), sorry for working on your baby, but it is kind of fun ;) )

Diff Detail

Event Timeline

Julian Eisel (Severin) retitled this revision from to GPencil: Fix T42895 - refactor object/scene data behaviour.
Julian Eisel (Severin) updated this object.
Julian Eisel (Severin) set the repository for this revision to rB Blender.
Joshua Leung (aligorith) requested changes to this revision.Dec 15 2014, 4:54 AM
Joshua Leung (aligorith) edited edge metadata.
Joshua Leung (aligorith) added inline comments.

This will be problematic.

Grease Pencil can be used from editors other than the 3D view (namely, sequencer preview, image editor, nodes editor, and clip editor). The drawings made in the 3d view and attached to the scene are not suitable for use in any other editor. So, doing this is not really the best way of doing what is essentially a 3d view feature.

This revision now requires changes to proceed.Dec 15 2014, 4:54 AM

Agree here. Wanted to test that before submitting, but got distracted :/ Lesson learned: don't submit diffs after 2AM :S
Working on a fix atm.

Julian Eisel (Severin) edited edge metadata.

Addressing the Editor conflict.
Plus adding the needed drawing code for enhanced source drawing in Clip Editor - the logic behind still needs to be fixed

@Joshua Leung (aligorith), BTW, I'd also like to propose renaming the "Source" to something more descriptive, e.g. "Stroke Parent"

Sorry, I should have gotten back to you earlier about this.

IMO, this is the wrong fix.

At the very least though, there are 2 critical issues here:

  1. You've taken the function which should do nothing but draw a single Grease Pencil datablock (draw_gpd_data), and you've gone and stubbed extra context fudging crap into it so it now draws _2_of these. That's bad from a clean API perspective.
  1. If you're going to have both scene and object gpencil data drawn at once, the scene should get drawn first. Think about this from an artist's perpective: if you've got a set painted via the scene level, the object level will likely contain overlays (e.g. popouts or extra characters only used sometimes) or other annotations (e.g. notes on where it should be moving) which are likely to be about the object in question, so you'd want these to appearover the top (or else, they just get buried by the scene strokes).

Let's be optimistic and say "at least it works better now" :P Anyway good points you are making, changing shouldn't be a big deal, though. I'll commit a patch addressing this issues, but will check with you if I can catch you before BCon5 starts (will be in ~1.5h :D)