Properties Editor: Grease Pencil and pinning fixes
authorDalai Felinto <dfelinto@gmail.com>
Thu, 7 Mar 2019 14:55:03 +0000 (14:55 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Thu, 7 Mar 2019 20:28:25 +0000 (20:28 +0000)
commit92d185faebeac60ec2591c2a7c0f870e7726593d
tree4e49a15d3c4e3f0c45cd9089fdf4567084b4e26e
parent81a09628c29d788affb0686e9ebdce7dc6a09d2d
Properties Editor: Grease Pencil and pinning fixes

The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.

Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.

This would lead to all sort of pinning problems:

* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.

* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.

* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.

I also sanitized the name of the panels, their inheritance and poll
functions.

Reviewers: antoniov, brecht

Subscribers: billrey

Differential Revision: https://developer.blender.org/D4470
intern/cycles/blender/addon/ui.py
release/scripts/startup/bl_ui/properties_data_gpencil.py
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_material_gpencil.py
source/blender/editors/space_buttons/buttons_context.c