1# ##### BEGIN GPL LICENSE BLOCK #####
2#
3#  This program is free software; you can redistribute it and/or
4#  modify it under the terms of the GNU General Public License
5#  as published by the Free Software Foundation; either version 2
6#  of the License, or (at your option) any later version.
7#
8#  This program is distributed in the hope that it will be useful,
9#  but WITHOUT ANY WARRANTY; without even the implied warranty of
10#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11#  GNU General Public License for more details.
12#
13#  You should have received a copy of the GNU General Public License
14#  along with this program; if not, write to the Free Software Foundation,
15#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16#
17# ##### END GPL LICENSE BLOCK #####
18
19# <pep8 compliant>
20from bpy.types import Panel
21
22
23class ShaderFxButtonsPanel:
24    bl_space_type = 'PROPERTIES'
25    bl_region_type = 'WINDOW'
26    bl_context = "shaderfx"
27
28
29class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
30    bl_label = "Effects"
31    bl_options = {'HIDE_HEADER'}
32
33    # Unused: always show for now.
34
35    # @classmethod
36    # def poll(cls, context):
37    #     ob = context.object
38    #     return ob and ob.type == 'GPENCIL'
39
40    def draw(self, context):
41        layout = self.layout
42        layout.operator_menu_enum("object.shaderfx_add", "type")
43        layout.template_shaderfx()
44
45
46classes = (
47    DATA_PT_shader_fx,
48)
49
50if __name__ == "__main__":  # only for live edit.
51    from bpy.utils import register_class
52    for cls in classes:
53        register_class(cls)
54