Removed UI for point cache users.
[blender.git] / release / scripts / startup / bl_ui / properties_grease_pencil_common.py
index 59c05c192fdb8f4adeca80c4104d3aa51d765dad..013f4e648547f5157d5047ca0d2e43cb0116cfaf 100644 (file)
@@ -28,7 +28,7 @@ def gpencil_stroke_placement_settings(context, layout):
     elif context.space_data.type == 'SEQUENCE_EDITOR':
         propname = "gpencil_stroke_placement_sequencer_preview"
     elif context.space_data.type == 'IMAGE_EDITOR':
-        propname = "gpencil_stroke_placement_image_edit"
+        propname = "gpencil_stroke_placement_image_editor"
     else:
         propname = "gpencil_stroke_placement_view2d"
 
@@ -89,7 +89,7 @@ class GreasePencilDrawingToolsPanel:
                 row.prop(context.tool_settings, "grease_pencil_source", expand=True)
             elif context.space_data.type == 'CLIP_EDITOR':
                 row.prop(context.space_data, "grease_pencil_source", expand=True)
-        
+
         col.separator()
         col.separator()
 
@@ -179,7 +179,6 @@ class GreasePencilStrokeSculptPanel:
     bl_label = "Sculpt Strokes"
     bl_category = "Grease Pencil"
     bl_region_type = 'TOOLS'
-    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -192,11 +191,11 @@ class GreasePencilStrokeSculptPanel:
     @staticmethod
     def draw(self, context):
         layout = self.layout
-        
+
         settings = context.tool_settings.gpencil_sculpt
         tool = settings.tool
         brush = settings.brush
-        
+
         layout.column().prop(settings, "tool", expand=True)
 
         col = layout.column()
@@ -208,8 +207,16 @@ class GreasePencilStrokeSculptPanel:
 
         layout.separator()
 
-        if settings.tool in {'THICKNESS', 'PINCH', 'TWIST'}:
+        if settings.tool == 'THICKNESS':
             layout.row().prop(brush, "direction", expand=True)
+        elif settings.tool == 'PINCH':
+            row = layout.row(align=True)
+            row.prop_enum(brush, "direction", 'ADD', text="Pinch")
+            row.prop_enum(brush, "direction", 'SUBTRACT', text="Inflate")
+        elif settings.tool == 'TWIST':
+            row = layout.row(align=True)
+            row.prop_enum(brush, "direction", 'SUBTRACT', text="CW")
+            row.prop_enum(brush, "direction", 'ADD', text="CCW")
 
         layout.separator()
         layout.prop(settings, "use_select_mask")
@@ -386,7 +393,7 @@ class GPENCIL_PIE_sculpt(Menu):
 
         # W - Launch Sculpt Mode
         col = pie.column()
-        #col.label("Tool:")
+        # col.label("Tool:")
         col.prop(settings, "tool", text="")
         col.operator("gpencil.brush_paint", text="Sculpt", icon='SCULPTMODE_HLT')
 
@@ -395,7 +402,7 @@ class GPENCIL_PIE_sculpt(Menu):
         col.prop(brush, "size", slider=True)
         row = col.row(align=True)
         row.prop(brush, "strength", slider=True)
-       # row.prop(brush, "use_pressure_strength", text="", icon_only=True)
+        # row.prop(brush, "use_pressure_strength", text="", icon_only=True)
         col.prop(brush, "use_falloff")
 
         # S - Change Brush Type Shortcuts
@@ -408,7 +415,7 @@ class GPENCIL_PIE_sculpt(Menu):
         row = pie.row()
         row.prop_enum(settings, "tool", value='SMOOTH')
         row.prop_enum(settings, "tool", value='THICKNESS')
-        row.prop_enum(settings, "tool", value='RANDOMISE')
+        row.prop_enum(settings, "tool", value='RANDOMIZE')
 
 
 ###############################
@@ -615,6 +622,13 @@ class GreasePencilDataPanel:
         row.prop(gpl, "after_color", text="")
         sub.prop(gpl, "ghost_after_range", text="After")
 
+        # Smooth and subdivide new strokes
+        layout.separator()
+        col = layout.column(align=True)
+        col.label(text="New Stroke Quality:")
+        col.prop(gpl, "pen_smooth_factor")
+        col.prop(gpl, "pen_subdivision_steps")
+
 
 class GreasePencilToolsPanel:
     # subclass must set