Merge branch 'master' into blender2.8
[blender.git] / release / scripts / startup / bl_ui / properties_data_modifier.py
index 23ab644cba16e5ebcbecf422c97de0e75ec64666..329b8785aecb821d90ef16aae2051387cb69d84f 100644 (file)
@@ -32,6 +32,11 @@ class ModifierButtonsPanel:
 class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
     bl_label = "Modifiers"
 
+    @classmethod
+    def poll(cls, context):
+        ob = context.object
+        return ob and ob.type != 'GPENCIL'
+
     def draw(self, context):
         layout = self.layout
 
@@ -140,6 +145,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "use_only_vertices")
         col.prop(md, "use_clamp_overlap")
         col.prop(md, "loop_slide")
+        col.prop(md, "mark_seam")
+        col.prop(md, "mark_sharp")
 
         layout.label(text="Limit Method:")
         layout.row().prop(md, "limit_method", expand=True)
@@ -152,6 +159,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         layout.label(text="Width Method:")
         layout.row().prop(md, "offset_type", expand=True)
 
+        layout.label(text="Normal Mode")
+        layout.row().prop(md, "hnmode", expand=True)
+        layout.prop(md, "hn_strength")
+        layout.prop(md, "set_wn_strength")
+
     def BOOLEAN(self, layout, ob, md):
         split = layout.split()
 
@@ -213,12 +225,12 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
                 layout.prop(md, "eval_factor")
 
         layout.label(text="Axis Mapping:")
-        split = layout.split(percentage=0.5, align=True)
+        split = layout.split(factor=0.5, align=True)
         split.alert = (md.forward_axis[-1] == md.up_axis[-1])
-        split.label("Forward/Up Axis:")
+        split.label(text="Forward/Up Axis:")
         split.prop(md, "forward_axis", text="")
         split.prop(md, "up_axis", text="")
-        split = layout.split(percentage=0.5)
+        split = layout.split(factor=0.5)
         split.label(text="Flip Axis:")
         row = split.row()
         row.prop(md, "flip_axis")
@@ -240,12 +252,12 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             box.row().prop(md, "read_data")
 
     def CAST(self, layout, ob, md):
-        split = layout.split(percentage=0.25)
+        split = layout.split(factor=0.25)
 
         split.label(text="Cast Type:")
         split.prop(md, "cast_type", text="")
 
-        split = layout.split(percentage=0.25)
+        split = layout.split(factor=0.25)
 
         col = split.column()
         col.prop(md, "use_x")
@@ -312,7 +324,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             row.prop(md, "vertex_group_factor")
 
             col.prop(md, "use_collapse_triangulate")
-            row = col.split(percentage=0.75)
+            row = col.split(factor=0.75)
             row.prop(md, "use_symmetry")
             row.prop(md, "symmetry_axis", text="")
 
@@ -322,13 +334,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         else:  # decimate_type == 'DISSOLVE':
             layout.prop(md, "angle_limit")
             layout.prop(md, "use_dissolve_boundaries")
-            layout.label("Delimit:")
+            layout.label(text="Delimit:")
             row = layout.row()
             row.prop(md, "delimit")
             layout_info = layout
 
-        layout_info.label(text=iface_("Face Count: {:,}".format(md.face_count)),
-                          translate=False)
+        layout_info.label(
+            text=iface_("Face Count: {:,}".format(md.face_count)),
+            translate=False,
+        )
 
     def DISPLACE(self, layout, ob, md):
         has_texture = (md.texture is not None)
@@ -357,7 +371,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             col.prop(md, "texture_coords_object", text="")
         elif md.texture_coords == 'UV' and ob.type == 'MESH':
             col.label(text="UV Map:")
-            col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
+            col.prop_search(md, "uv_layer", ob.data, "uv_layers", text="")
 
         layout.separator()
 
@@ -389,7 +403,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         sub.active = bool(md.vertex_group)
         sub.prop(md, "protect")
         col.label(text="Particle UV")
-        col.prop_search(md, "particle_uv", ob.data, "uv_textures", text="")
+        col.prop_search(md, "particle_uv", ob.data, "uv_layers", text="")
 
         col = split.column()
         col.prop(md, "use_edge_cut")
@@ -466,7 +480,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
     def LAPLACIANSMOOTH(self, layout, ob, md):
         layout.prop(md, "iterations")
 
-        split = layout.split(percentage=0.25)
+        split = layout.split(factor=0.25)
 
         col = split.column()
         col.label(text="Axis:")
@@ -555,7 +569,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             layout.operator("object.meshdeform_bind", text="Bind")
 
     def MIRROR(self, layout, ob, md):
-        split = layout.split(percentage=0.25)
+        split = layout.split(factor=0.25)
 
         col = split.column()
         col.label(text="Axis:")
@@ -601,6 +615,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "levels", text="Preview")
         col.prop(md, "sculpt_levels", text="Sculpt")
         col.prop(md, "render_levels", text="Render")
+        if hasattr(md, "quality"):
+            col.prop(md, "quality")
 
         col = split.column()
 
@@ -609,7 +625,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.operator("object.multires_higher_levels_delete", text="Delete Higher")
         col.operator("object.multires_reshape", text="Reshape")
         col.operator("object.multires_base_apply", text="Apply Base")
-        col.prop(md, "use_subsurf_uv")
+        col.prop(md, "uv_smooth", text="")
         col.prop(md, "show_only_control_edges")
 
         layout.separator()
@@ -627,7 +643,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
     def OCEAN(self, layout, ob, md):
         if not bpy.app.build_options.mod_oceansim:
-            layout.label("Built without OceanSim modifier")
+            layout.label(text="Built without OceanSim modifier")
             return
 
         layout.prop(md, "geometry_mode")
@@ -651,7 +667,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "size")
         col.prop(md, "spatial_size")
 
-        layout.label("Waves:")
+        layout.label(text="Waves:")
 
         split = layout.split()
 
@@ -682,7 +698,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         col = split.column()
         col.active = md.use_foam
-        col.label("Foam Data Layer Name:")
+        col.label(text="Foam Data Layer Name:")
         col.prop(md, "foam_layer_name", text="")
 
         layout.separator()
@@ -812,6 +828,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.label(text="Mode:")
         col.prop(md, "wrap_method", text="")
 
+        if md.wrap_method in {'PROJECT', 'NEAREST_SURFACEPOINT'}:
+            col.prop(md, "wrap_mode", text="")
+
         if md.wrap_method == 'PROJECT':
             split = layout.split()
             col = split.column()
@@ -819,7 +838,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             col = split.column()
 
             col.prop(md, "project_limit", text="Limit")
-            split = layout.split(percentage=0.25)
+            split = layout.split(factor=0.25)
 
             col = split.column()
             col.label(text="Axis:")
@@ -832,15 +851,16 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             col.prop(md, "use_negative_direction")
             col.prop(md, "use_positive_direction")
 
+            subcol = col.column()
+            subcol.active = md.use_negative_direction and md.cull_face != 'OFF'
+            subcol.prop(md, "use_invert_cull")
+
             col = split.column()
             col.label(text="Cull Faces:")
             col.prop(md, "cull_face", expand=True)
 
             layout.prop(md, "auxiliary_target")
 
-        elif md.wrap_method == 'NEAREST_SURFACEPOINT':
-            layout.prop(md, "use_keep_above_surface")
-
     def SIMPLE_DEFORM(self, layout, ob, md):
 
         layout.row().prop(md, "deform_method", expand=True)
@@ -884,7 +904,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         layout.label(text="Settings are inside the Physics tab")
 
     def SMOOTH(self, layout, ob, md):
-        split = layout.split(percentage=0.25)
+        split = layout.split(factor=0.25)
 
         col = split.column()
         col.label(text="Axis:")
@@ -942,7 +962,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.label(text="Material Index Offset:")
 
         sub = col.column()
-        row = sub.split(align=True, percentage=0.4)
+        row = sub.split(factor=0.4, align=True)
         row.prop(md, "material_offset", text="")
         row = row.row(align=True)
         row.active = md.use_rim
@@ -956,7 +976,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col = split.column()
 
         scene = context.scene
-        engine = scene.render.engine
+        engine = context.engine
         show_adaptive_options = (
             engine == 'CYCLES' and md == ob.modifiers[-1] and
             scene.cycles.feature_set == 'EXPERIMENTAL'
@@ -974,28 +994,28 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             col.label(text="Subdivisions:")
             col.prop(md, "levels", text="View")
             col.prop(md, "render_levels", text="Render")
+            if hasattr(md, "quality"):
+                col.prop(md, "quality")
 
         col = split.column()
         col.label(text="Options:")
 
         sub = col.column()
         sub.active = (not show_adaptive_options) or (not ob.cycles.use_adaptive_subdivision)
-        sub.prop(md, "use_subsurf_uv")
+        sub.prop(md, "uv_smooth", text="")
 
         col.prop(md, "show_only_control_edges")
-        if hasattr(md, "use_opensubdiv"):
-            col.prop(md, "use_opensubdiv")
 
         if show_adaptive_options and ob.cycles.use_adaptive_subdivision:
             col = layout.column(align=True)
             col.scale_y = 0.6
             col.separator()
-            col.label("Final Dicing Rate:")
+            col.label(text="Final Dicing Rate:")
             col.separator()
 
             render = max(scene.cycles.dicing_rate * ob.cycles.dicing_rate, 0.1)
             preview = max(scene.cycles.preview_dicing_rate * ob.cycles.dicing_rate, 0.1)
-            col.label(f"Render {render:10.2f} px, Preview {preview:10.2f} px")
+            col.label(text=f"Render {render:.2f} px, Preview {preview:.2f} px")
 
     def SURFACE(self, layout, ob, md):
         layout.label(text="Settings are inside the Physics tab")
@@ -1019,18 +1039,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
     def UV_PROJECT(self, layout, ob, md):
         split = layout.split()
-
         col = split.column()
-        col.label(text="Image:")
-        col.prop(md, "image", text="")
-
-        col = split.column()
-        col.label(text="UV Map:")
-        col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
+        col.prop_search(md, "uv_layer", ob.data, "uv_layers")
+        col.separator()
 
-        split = layout.split()
-        col = split.column()
-        col.prop(md, "use_image_override")
         col.prop(md, "projector_count", text="Projectors")
         for proj in md.projectors:
             col.prop(proj, "object", text="")
@@ -1084,7 +1096,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         if md.texture_coords == 'OBJECT':
             layout.prop(md, "texture_coords_object", text="Object")
         elif md.texture_coords == 'UV' and ob.type == 'MESH':
-            layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
+            layout.prop_search(md, "uv_layer", ob.data, "uv_layers")
 
     def WAVE(self, layout, ob, md):
         split = layout.split()
@@ -1123,14 +1135,14 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         layout.prop(md, "start_position_object")
         layout.prop_search(md, "vertex_group", ob, "vertex_groups")
-        split = layout.split(percentage=0.33)
+        split = layout.split(factor=0.33)
         col = split.column()
         col.label(text="Texture")
         col = split.column()
         col.template_ID(md, "texture", new="texture.new")
         layout.prop(md, "texture_coords")
         if md.texture_coords == 'UV' and ob.type == 'MESH':
-            layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
+            layout.prop_search(md, "uv_layer", ob.data, "uv_layers")
         elif md.texture_coords == 'OBJECT':
             layout.prop(md, "texture_coords_object")
 
@@ -1148,7 +1160,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
     def REMESH(self, layout, ob, md):
         if not bpy.app.build_options.mod_remesh:
-            layout.label("Built without Remesh modifier")
+            layout.label(text="Built without Remesh modifier")
             return
 
         layout.prop(md, "mode")
@@ -1170,17 +1182,17 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
     def vertex_weight_mask(layout, ob, md):
         layout.label(text="Influence/Mask Options:")
 
-        split = layout.split(percentage=0.4)
+        split = layout.split(factor=0.4)
         split.label(text="Global Influence:")
         split.prop(md, "mask_constant", text="")
 
         if not md.mask_texture:
-            split = layout.split(percentage=0.4)
+            split = layout.split(factor=0.4)
             split.label(text="Vertex Group Mask:")
             split.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="")
 
         if not md.mask_vertex_group:
-            split = layout.split(percentage=0.4)
+            split = layout.split(factor=0.4)
             split.label(text="Texture Mask:")
             split.template_ID(md, "mask_texture", new="texture.new")
             if md.mask_texture:
@@ -1197,7 +1209,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
                 if md.mask_tex_mapping == 'OBJECT':
                     layout.prop(md, "mask_tex_map_object", text="Object")
                 elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH':
-                    layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures")
+                    layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_layers")
 
     def VERTEX_WEIGHT_EDIT(self, layout, ob, md):
         split = layout.split()
@@ -1366,7 +1378,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         col = split.column()
         col.label(text="UV Map:")
-        col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
+        col.prop_search(md, "uv_layer", ob.data, "uv_layers", text="")
 
     def WIREFRAME(self, layout, ob, md):
         has_vgroup = bool(md.vertex_group)
@@ -1409,7 +1421,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         layout.separator()
 
-        split = layout.split(0.333)
+        split = layout.split(factor=0.333)
         split.prop(md, "use_vert_data")
         use_vert = md.use_vert_data
         row = split.row()
@@ -1417,7 +1429,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         row.prop(md, "vert_mapping", text="")
         if use_vert:
             col = layout.column(align=True)
-            split = col.split(0.333, align=True)
+            split = col.split(factor=0.333, align=True)
             sub = split.column(align=True)
             sub.prop(md, "data_types_verts")
             sub = split.column(align=True)
@@ -1426,11 +1438,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             row.label(icon='RIGHTARROW')
             row.prop(md, "layers_vgroup_select_dst", text="")
             row = sub.row(align=True)
-            row.label("", icon='NONE')
+            row.label(text="", icon='NONE')
 
         layout.separator()
 
-        split = layout.split(0.333)
+        split = layout.split(factor=0.333)
         split.prop(md, "use_edge_data")
         use_edge = md.use_edge_data
         row = split.row()
@@ -1438,13 +1450,13 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         row.prop(md, "edge_mapping", text="")
         if use_edge:
             col = layout.column(align=True)
-            split = col.split(0.333, align=True)
+            split = col.split(factor=0.333, align=True)
             sub = split.column(align=True)
             sub.prop(md, "data_types_edges")
 
         layout.separator()
 
-        split = layout.split(0.333)
+        split = layout.split(factor=0.333)
         split.prop(md, "use_loop_data")
         use_loop = md.use_loop_data
         row = split.row()
@@ -1452,12 +1464,12 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         row.prop(md, "loop_mapping", text="")
         if use_loop:
             col = layout.column(align=True)
-            split = col.split(0.333, align=True)
+            split = col.split(factor=0.333, align=True)
             sub = split.column(align=True)
             sub.prop(md, "data_types_loops")
             sub = split.column(align=True)
             row = sub.row(align=True)
-            row.label("", icon='NONE')
+            row.label(text="", icon='NONE')
             row = sub.row(align=True)
             row.prop(md, "layers_vcol_select_src", text="")
             row.label(icon='RIGHTARROW')
@@ -1470,7 +1482,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         layout.separator()
 
-        split = layout.split(0.333)
+        split = layout.split(factor=0.333)
         split.prop(md, "use_poly_data")
         use_poly = md.use_poly_data
         row = split.row()
@@ -1478,7 +1490,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         row.prop(md, "poly_mapping", text="")
         if use_poly:
             col = layout.column(align=True)
-            split = col.split(0.333, align=True)
+            split = col.split(factor=0.333, align=True)
             sub = split.column(align=True)
             sub.prop(md, "data_types_polys")
 
@@ -1536,7 +1548,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         row.prop(md, "use_direction_parallel")
 
         subcol = col.column(align=True)
-        subcol.label("Mix Mode:")
+        subcol.label(text="Mix Mode:")
         subcol.prop(md, "mix_mode", text="")
         subcol.prop(md, "mix_factor")
         row = subcol.row(align=True)
@@ -1573,9 +1585,592 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         if md.rest_source == 'BIND':
             layout.operator("object.correctivesmooth_bind", text="Unbind" if is_bind else "Bind")
 
+    def WEIGHTED_NORMAL(self, layout, ob, md):
+        layout.label(text="Weighting Mode:")
+        split = layout.split(align=True)
+        col = split.column(align=True)
+        col.prop(md, "mode", text="")
+        col.prop(md, "weight", text="Weight")
+        col.prop(md, "keep_sharp")
+
+        col = split.column(align=True)
+        row = col.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        row.active = bool(md.vertex_group)
+        row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
+        col.prop(md, "thresh", text="Threshold")
+        col.prop(md, "face_influence")
+
+
+class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
+    bl_label = "Modifiers"
+
+    def check_conflicts(self, layout, ob):
+        for md in ob.grease_pencil_modifiers:
+            if md.type == 'GP_TIME':
+                row = layout.row()
+                row.label(text="Build and Time Offset modifier not compatible", icon='ERROR')
+                break
+
+    @classmethod
+    def poll(cls, context):
+        ob = context.object
+        return ob and ob.type == 'GPENCIL'
+
+    def draw(self, context):
+        layout = self.layout
+
+        ob = context.object
+
+        layout.operator_menu_enum("object.gpencil_modifier_add", "type")
+
+        for md in ob.grease_pencil_modifiers:
+            box = layout.template_greasepencil_modifier(md)
+            if box:
+                # match enum type to our functions, avoids a lookup table.
+                getattr(self, md.type)(box, ob, md)
+
+    # the mt.type enum is (ab)used for a lookup on function names
+    # ...to avoid lengthy if statements
+    # so each type must have a function here.
+
+    def GP_NOISE(self, layout, ob, md):
+        gpd = ob.data
+        split = layout.split()
+
+        col = split.column()
+        row = col.row(align=True)
+        row.prop(md, "factor")
+        row.prop(md, "random", text="", icon='TIME', toggle=True)
+        row = col.row()
+        row.enabled = md.random
+        row.prop(md, "step")
+        col.prop(md, "full_stroke")
+        col.prop(md, "move_extreme")
+
+        row = layout.row(align=True)
+        row.label(text="Affect:")
+        row = layout.row(align=True)
+        row.prop(md, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True)
+        row.prop(md, "use_edit_strength", text="Strength", icon='COLOR', toggle=True)
+        row.prop(md, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
+        row.prop(md, "use_edit_uv", text="UV", icon='MOD_UVPROJECT', toggle=True)
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Vertex Group:")
+        row = col.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_SMOOTH(self, layout, ob, md):
+        gpd = ob.data
+        col = layout.column()
+        col.prop(md, "factor")
+        col.prop(md, "step")
+
+        col.label(text="Affect:")
+        row = col.row(align=True)
+        row.prop(md, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True)
+        row.prop(md, "use_edit_strength", text="Strength", icon='COLOR', toggle=True)
+        row.prop(md, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
+        row.prop(md, "use_edit_uv", text="UV", icon='MOD_UVPROJECT', toggle=True)
+
+        col.separator()
+        col.label(text="Vertex Group:")
+        row = col.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_SUBDIV(self, layout, ob, md):
+        gpd = ob.data
+        split = layout.split()
+
+        col = split.column()
+        row = col.row(align=True)
+        row.prop(md, "level")
+        row.prop(md, "simple", text="", icon='PARTICLE_POINT')
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_SIMPLIFY(self, layout, ob, md):
+        gpd = ob.data
+
+        row = layout.row()
+        row.prop(md, "mode")
+
+        split = layout.split()
+
+        col = split.column()
+        col.label(text="Settings:")
+        row = col.row(align=True)
+        row.enabled = md.mode == 'FIXED'
+        row.prop(md, "step")
+
+        row = col.row(align=True)
+        row.enabled = not md.mode == 'FIXED'
+        row.prop(md, "factor")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_THICK(self, layout, ob, md):
+        gpd = ob.data
+        split = layout.split()
+
+        col = split.column()
+        row = col.row(align=True)
+        row.prop(md, "thickness")
+
+        col.prop(md, "normalize_thickness")
+
+        if not md.normalize_thickness:
+            split = layout.split()
+            col = split.column()
+            col.prop(md, "use_custom_curve")
+
+            if md.use_custom_curve:
+                col.template_curve_mapping(md, "curve")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Vertex Group:")
+        row = col.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_TINT(self, layout, ob, md):
+        gpd = ob.data
+        split = layout.split()
+
+        col = split.column()
+        col.prop(md, "color")
+        col.prop(md, "factor")
+
+        row = layout.row()
+        row.prop(md, "create_materials")
+        row.prop(md, "modify_color")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_TIME(self, layout, ob, md):
+        gpd = ob.data
+
+        row = layout.row()
+        row.prop(md, "mode", text="Mode")
+
+        row = layout.row()
+        if md.mode == 'FIX':
+            txt = "Frame"
+        else:
+            txt = "Frame Offset"
+        row.prop(md, "offset", text=txt)
+
+        row = layout.row()
+        row.enabled = md.mode != 'FIX'
+        row.prop(md, "frame_scale")
+
+        row = layout.row()
+        row.enabled = md.mode != 'FIX'
+        row.prop(md, "use_keep_loop")
+
+        row = layout.row()
+        row.label(text="Layer:")
+        row = layout.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_COLOR(self, layout, ob, md):
+        gpd = ob.data
+        split = layout.split()
+
+        col = split.column()
+        col.label(text="Color:")
+        col.prop(md, "hue", text="H")
+        col.prop(md, "saturation", text="S")
+        col.prop(md, "value", text="V")
+
+        row = layout.row()
+        row.prop(md, "create_materials")
+        row.prop(md, "modify_color")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_OPACITY(self, layout, ob, md):
+        gpd = ob.data
+        split = layout.split()
+
+        col = split.column()
+        col.label(text="Opacity:")
+        col.prop(md, "factor")
+
+        row = layout.row()
+        row.prop(md, "create_materials")
+        row.prop(md, "modify_color")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Vertex Group:")
+        row = col.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_ARRAY(self, layout, ob, md):
+        gpd = ob.data
+
+        col = layout.column()
+        col.prop(md, "count")
+
+        split = layout.split()
+        col = split.column()
+        col.label(text="Offset:")
+        col.prop(md, "offset", text="")
+        col.prop(md, "offset_object", text="Object")
+
+        col = split.column()
+        col.label(text="Shift:")
+        col.prop(md, "shift", text="")
+
+        split = layout.split()
+        col = split.column()
+        col.label(text="Rotation:")
+        col.prop(md, "rotation", text="")
+        col.separator()
+        row = col.row(align=True)
+        row.prop(md, "random_rot", text="", icon='TIME', toggle=True)
+        row.prop(md, "rot_factor", text="")
+
+        col = split.column()
+        col.label(text="Scale:")
+        col.prop(md, "scale", text="")
+        col.separator()
+        row = col.row(align=True)
+        row.prop(md, "random_scale", text="", icon='TIME', toggle=True)
+        row.prop(md, "scale_factor", text="")
+
+        col = layout.column()
+        col.prop(md, "replace_material", text="Material")
+        col.prop(md, "keep_on_top", text="Keep original stroke on top")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_BUILD(self, layout, ob, md):
+        gpd = ob.data
+
+        split = layout.split()
+
+        col = split.column()
+        self.check_conflicts(col, ob)
+
+        col.prop(md, "mode")
+        if md.mode == 'CONCURRENT':
+            col.prop(md, "concurrent_time_alignment")
+
+        col.separator()
+        col.prop(md, "transition")
+        sub = col.column(align=True)
+        sub.prop(md, "start_delay")
+        sub.prop(md, "length")
+
+        col = layout.column(align=True)
+        col.prop(md, "use_restrict_frame_range")
+        sub = col.column(align=True)
+        sub.active = md.use_restrict_frame_range
+        sub.prop(md, "frame_start", text="Start")
+        sub.prop(md, "frame_end", text="End")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_LATTICE(self, layout, ob, md):
+        gpd = ob.data
+        split = layout.split()
+
+        col = split.column()
+        col.label(text="Object:")
+        col.prop(md, "object", text="")
+
+        layout.prop(md, "strength", slider=True)
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Vertex Group:")
+        row = col.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_MIRROR(self, layout, ob, md):
+        gpd = ob.data
+
+        row = layout.row(align=True)
+        row.prop(md, "x_axis")
+        row.prop(md, "y_axis")
+        row.prop(md, "z_axis")
+
+        layout.label(text="Object:")
+        layout.prop(md, "object", text="")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_HOOK(self, layout, ob, md):
+        gpd = ob.data
+        split = layout.split()
+
+        col = split.column()
+        col.label(text="Object:")
+        col.prop(md, "object", text="")
+        if md.object and md.object.type == 'ARMATURE':
+            col.label(text="Bone:")
+            col.prop_search(md, "subtarget", md.object.data, "bones", text="")
+
+        use_falloff = (md.falloff_type != 'NONE')
+
+        layout.separator()
+
+        row = layout.row(align=True)
+        if use_falloff:
+            row.prop(md, "falloff_radius")
+        row.prop(md, "strength", slider=True)
+        layout.prop(md, "falloff_type")
+
+        col = layout.column()
+        if use_falloff:
+            if md.falloff_type == 'CURVE':
+                col.template_curve_mapping(md, "falloff_curve")
+
+        split = layout.split()
+
+        col = split.column()
+        col.prop(md, "use_falloff_uniform")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Vertex Group:")
+        row = col.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_OFFSET(self, layout, ob, md):
+        gpd = ob.data
+        col = layout.column()
+
+        col.prop(md, "location")
+        col.prop(md, "scale")
+        col.prop(md, "rotation")
+
+        col = layout.column()
+        col.separator()
+        col.label(text="Vertex Group:")
+        row = col.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Material:")
+        row = col.row(align=True)
+        row.prop(md, "pass_index", text="Pass")
+        row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+        col.label(text="Layer:")
+        row = col.row(align=True)
+        row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+        row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+        row = layout.row(align=True)
+        row.prop(md, "layer_pass", text="Pass")
+        row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
+    def GP_ARMATURE(self, layout, ob, md):
+        split = layout.split()
+
+        col = split.column()
+        col.label(text="Object:")
+        col.prop(md, "object", text="")
+        # col.prop(md, "use_deform_preserve_volume")
+
+        col = split.column()
+        col.label(text="Bind To:")
+        col.prop(md, "use_vertex_groups", text="Vertex Groups")
+        col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
+
+        layout.separator()
+
+        row = layout.row(align=True)
+        row.label(text="Vertex Group:")
+        row = layout.row(align=True)
+        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+        sub = row.row(align=True)
+        sub.active = bool(md.vertex_group)
+        sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
+
 
 classes = (
     DATA_PT_modifiers,
+    DATA_PT_gpencil_modifiers,
 )
 
 if __name__ == "__main__":  # only for live edit.