Page MenuHome

Check if GPencil object is in edit mode
AbandonedPublic

Authored by Antonio Vazquez (antoniov) on Jun 13 2019, 8:02 PM.

Details

Summary

This check is to round with a circle the outliner icon when is in Edit mode

Diff Detail

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Jun 13 2019, 8:31 PM
Brecht Van Lommel (brecht) added inline comments.
source/blender/editors/space_outliner/outliner_draw.c
120–125

I think this can be simplified to:

if (id_type == ID_GD && obact && obact->data == id) {
  bGPdata *gpd = (bGPdata *)id;
  return GPENCIL_EDIT_MODE(gpd);
}

Comparing name to check if it's the same datablock is wrong in case there are linked datablocks with the same name, and it's simpler to compare pointers anyway.

This revision now requires changes to proceed.Jun 13 2019, 8:31 PM

Already committed with @Brecht Van Lommel (brecht) suggestions.