Maniphest T68597

Grease Pencil Dope Sheet can fail to display active GP object
Closed, Resolved

Assigned To
Antonio Vazquez (antoniov)
Authored By
Sam Brubaker (rocketman)
Aug 13 2019, 6:34 AM
Tags
  • Add-ons (Community)
Subscribers
Jacques Lucke (JacquesLucke)
Sam Brubaker (rocketman)
William Reynish (billreynish)

Description

Version: 2.80 stable (linux 64)

Like other Dope Sheet modes, the Grease Pencil Dope Sheet can be made to only display the keyframes/channels of selected objects, by using the "show_only_selected" option. This works as expected. However, an object can be not selected, but still active. In this context, it is possible to enter edit/draw/sculpt mode for a grease pencil object that is not selected, leading to an issue where the user may find themselves editing a GP object with no animation data visible in the dope sheet!

How to reproduce

  1. Open the attached file (with UI loading enabled)
  2. In object mode, select the GP Monkey
  3. tap A to deselect monkey
  4. Tab into edit mode
  5. Observe how the dope sheet does not display any info about Suzanne

It's pretty easy to run into this issue accidentally. Technically it makes sense, but from a design perspective, it is not helpful for the "show_only_selected" feature to hide an active GP object, especially if the user can still enter edit/draw/sculpt mode for that object.

Revisions and Commits

rB Blender

Event Timeline

Sam Brubaker (rocketman) created this task.Aug 13 2019, 6:34 AM
Antonio Vazquez (antoniov) claimed this task.Aug 13 2019, 3:53 PM
Antonio Vazquez (antoniov) lowered the priority of this task from 90 to 50.
Jacques Lucke (JacquesLucke) added subscribers: William Reynish (billreynish), Jacques Lucke (JacquesLucke).Aug 13 2019, 3:56 PM

Changing this would probably mean that the active object should always to handled as selected in the context of this setting (so also for bones etc.). I'm not sure if there is any good reason for the current behavior. I agree it does make sense to show the active as well as the selected objects.

@William Reynish (billreynish), is there any reason for why the active object should not be handled as selected objects in this context?

Jacques Lucke (JacquesLucke) added a comment.Aug 13 2019, 3:56 PM

Ooops, you were faster :D

Antonio Vazquez (antoniov) added a comment.Aug 13 2019, 4:04 PM

There is one point here. The Dopesheet is reused for Annotations and this is not related to Active Object, so we need be careful about that.

Antonio Vazquez (antoniov) added a comment.Aug 13 2019, 4:49 PM

Proposed fix (now when you enter in any mode, the object is always dsiplayed in Dopesheet):

diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 625a52fc800..5e0a4c70157 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1830,12 +1830,13 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
         }
 
         /* check selection and object type filters */
-        if ((ads->filterflag & ADS_FILTER_ONLYSEL) &&
-            !((base->flag & BASE_SELECTED) /*|| (base == scene->basact)*/)) {
-          /* only selected should be shown */
-          continue;
+        if (ob->mode == OB_MODE_OBJECT) {
+          if ((ads->filterflag & ADS_FILTER_ONLYSEL) &&
+              !((base->flag & BASE_SELECTED) /*|| (base == scene->basact)*/)) {
+            /* only selected should be shown */
+            continue;
+          }
         }
-
         /* check if object belongs to the filtering group if option to filter
          * objects by the grouped status is on
          * - used to ease the process of doing multiple-character choreographies

I have seen the Active Onlyis implemented for Annotations mainly.

Antonio Vazquez (antoniov) added a comment.Aug 14 2019, 8:47 AM

@Jacques Lucke (JacquesLucke) Do you agree with the proposed fix?

Jacques Lucke (JacquesLucke) added a comment.Aug 14 2019, 9:30 AM

It does make sense. Two notes however:

  • You should also update the comment.
  • The commented out (base == scene->basact) seems to have solved the same problem. Either remove this code, or use it again.
Antonio Vazquez (antoniov) changed the task status from Unknown Status to Resolved by committing rBc9acc5faad08: Fix T68597: GPencil Dope Sheet can fail to display active GP object.Aug 14 2019, 10:32 AM
Antonio Vazquez (antoniov) added a commit: rBc9acc5faad08: Fix T68597: GPencil Dope Sheet can fail to display active GP object.
Sam Brubaker (rocketman) added a comment.Dec 7 2021, 7:44 PM

This issue does not appear to be fixed in 2.93 or 3.0, so I'm going to re-open a new report.