Commit: 1c85a74c4436f8ab5d6d0292e9c2ffafe13962a4
Author: Antonio Vazquez
Date:   Fri Jun 8 17:42:27 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB1c85a74c4436f8ab5d6d0292e9c2ffafe13962a4

WIP: Add parameter to multisample

===================================================================

M       release/scripts/startup/bl_ui/space_userpref.py
M       source/blender/makesdna/DNA_userdef_types.h
M       source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py 
b/release/scripts/startup/bl_ui/space_userpref.py
index a480fa433e1..5ce967a38cb 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -544,6 +544,10 @@ class USERPREF_PT_system(Panel):
             col.separator()
         col.prop(system, "use_region_overlap")
 
+        col.separator()
+        col.label(text="Grease Pencil Options:")
+        col.prop(system, "gpencil_multi_sample", text="")
+
         col.separator()
 
         col.label(text="Text Draw Options:")
diff --git a/source/blender/makesdna/DNA_userdef_types.h 
b/source/blender/makesdna/DNA_userdef_types.h
index 17f520fdfa9..32c5e9ab592 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -601,7 +601,9 @@ typedef struct UserDef {
        struct WalkNavigation walk_navigation;
 
        short opensubdiv_compute_type;
-       char pad5[6];
+       short gpencil_multisamples;     /* eMultiSample_Type, amount of samples 
for Grease Pencil */
+
+       char pad5[4];
 } UserDef;
 
 extern UserDef U; /* from blenkernel blender.c */
@@ -902,7 +904,7 @@ typedef enum eNdof_Flag {
 
 #define NDOF_PIXELS_PER_SECOND 600.0f
 
-/* UserDef.ogl_multisamples */
+/* UserDef.ogl_multisamples and gpencil_multisamples */
 typedef enum eMultiSample_Type {
        USER_MULTISAMPLE_NONE   = 0,
        USER_MULTISAMPLE_2      = 2,
diff --git a/source/blender/makesrna/intern/rna_userdef.c 
b/source/blender/makesrna/intern/rna_userdef.c
index 1cd3a8b83d7..5ccb5ce399c 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4381,6 +4381,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
                                 "Enable OpenGL multi-sampling, only for 
systems that support it, requires restart");
        RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
 
+       /* grease pencil anti-aliasing */
+       prop = RNA_def_property(srna, "gpencil_multi_sample", PROP_ENUM, 
PROP_NONE);
+       RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_multisamples");
+       RNA_def_property_enum_items(prop, multi_sample_levels);
+       RNA_def_property_ui_text(prop, "Gpencil MultiSample",
+               "Enable Grease Pencil OpenGL multi-sampling, only for systems 
that support it");
+       RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
+
        prop = RNA_def_property(srna, "use_region_overlap", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "uiflag2", 
USER_REGION_OVERLAP);
        RNA_def_property_ui_text(prop, "Region Overlap",

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to