Fix some RNA/scene issuess with unified paint settings.
[blender.git] / source / blender / makesrna / intern / rna_scene.c
index af0e8d58e1419f1439a36a6de2d26ccee951cf1f..fab272e2d33bba7773f0466170324fc73da72aa4 100644 (file)
@@ -1627,6 +1627,7 @@ static void rna_def_unified_paint_settings(BlenderRNA  *brna)
        srna= RNA_def_struct(brna, "UnifiedPaintSettings", NULL);
        RNA_def_struct_ui_text(srna, "Unified Paint Settings", "Overrides for some of the active brush's settings");
 
+       /* high-level flags to enable or disable unified paint settings */
        prop= RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_SIZE);
        RNA_def_property_ui_text(prop, "Use Unified Radius",
@@ -1637,11 +1638,13 @@ static void rna_def_unified_paint_settings(BlenderRNA  *brna)
        RNA_def_property_ui_text(prop, "Use Unified Strength",
                                 "Instead of per-brush strength, the strength is shared across brushes");
 
+       /* unified paint settings that override the equivalent settings
+          from the active brush */
        prop= RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
        RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS*10);
        RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, 0);
        RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
-       
+
        prop= RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
        RNA_def_property_range(prop, 0.001, FLT_MAX);
        RNA_def_property_ui_range(prop, 0.001, 1, 0, 0);
@@ -1653,6 +1656,20 @@ static void rna_def_unified_paint_settings(BlenderRNA  *brna)
        RNA_def_property_range(prop, 0.0f, 10.0f);
        RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 0.001);
        RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied");
+
+       prop= RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE);
+       RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
+       RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size");
+
+       prop= RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE);
+       RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
+       RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength");
+
+       prop= RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_LOCK_SIZE);
+       RNA_def_property_ui_text(prop, "Use Blender Units", "When locked brush stays same size relative to object; when unlocked brush size is given in pixels");
 }
 
 static void rna_def_unit_settings(BlenderRNA  *brna)