Grease Pencil Dope Sheet can fail to display active GP object #68597

Closed
opened 2019-08-13 06:34:12 +02:00 by Sam Brubaker · 11 comments

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!

GP_active_object_bug.blend

How to reproduce

  • Open the attached file (with UI loading enabled)
  • In object mode, select the GP Monkey
  • tap A to deselect monkey
  • Tab into edit mode

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.

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! [GP_active_object_bug.blend](https://archive.blender.org/developer/F7661269/GP_active_object_bug.blend) How to reproduce - Open the attached file (with UI loading enabled) - In object mode, select the GP Monkey - tap A to deselect monkey - Tab into edit mode # 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.
Author

Added subscriber: @rocketman

Added subscriber: @rocketman
Antonio Vazquez self-assigned this 2019-08-13 15:53:39 +02:00
Member

Added subscribers: @WilliamReynish, @JacquesLucke

Added subscribers: @WilliamReynish, @JacquesLucke
Member

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.

@WilliamReynish, is there any reason for why the active object should not be handled as selected objects in this context?

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. @WilliamReynish, is there any reason for why the active object should not be handled as selected objects in this context?
Member

Ooops, you were faster :D

Ooops, you were faster :D

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.

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.

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.

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 Only`is implemented for Annotations mainly.

@JacquesLucke Do you agree with the proposed fix?

@JacquesLucke Do you agree with the proposed fix?
Member

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.
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.

This issue was referenced by blender/blender@c9acc5faad

This issue was referenced by blender/blender@c9acc5faad08422e07be59fc160a028a45b7440c

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author

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

This issue does not appear to be fixed in 2.93 or 3.0, so I'm going to re-open a new report.
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender-addons#68597
No description provided.