Commit: ec017861b6fe9ce15b5eec88536aa457a5c99984
Author: Antonioya
Date:   Sat Nov 3 16:18:54 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBec017861b6fe9ce15b5eec88536aa457a5c99984

GP: Fix update problems with Grid Canvas

The grid canvas was not updated when changed parameters

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

M       source/blender/makesrna/intern/rna_gpencil.c

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

diff --git a/source/blender/makesrna/intern/rna_gpencil.c 
b/source/blender/makesrna/intern/rna_gpencil.c
index 470694352f9..c6bf4317064 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1309,7 +1309,7 @@ static void rna_def_gpencil_grid(BlenderRNA *brna)
        RNA_def_property_range(prop, 0.01f, FLT_MAX);
        RNA_def_property_float_default(prop, 1.0f);
        RNA_def_property_ui_text(prop, "Grid Scale", "Grid scale");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+       RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, 
"rna_GPencil_update");
 
        prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
        RNA_def_property_float_sdna(prop, NULL, "color");
@@ -1317,27 +1317,27 @@ static void rna_def_gpencil_grid(BlenderRNA *brna)
        RNA_def_property_range(prop, 0.0f, 1.0f);
        RNA_def_property_float_array_default(prop, default_grid_color);
        RNA_def_property_ui_text(prop, "Grid Color", "Color for grid lines");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+       RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, 
"rna_GPencil_update");
 
        prop = RNA_def_property(srna, "lines", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "lines");
        RNA_def_property_range(prop, 0, INT_MAX);
        RNA_def_property_int_default(prop, GP_DEFAULT_GRID_LINES);
        RNA_def_property_ui_text(prop, "Grid Subdivisions", "Number of 
subdivisions in each side of symmetry line");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+       RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, 
"rna_GPencil_update");
 
        prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "offset");
        RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
        RNA_def_property_array(prop, 2);
        RNA_def_property_ui_text(prop, "Offset", "Offset of the canvas");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+       RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, 
"rna_GPencil_update");
 
        prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "axis");
        RNA_def_property_enum_items(prop, rna_enum_gpencil_grid_axis_items);
        RNA_def_property_ui_text(prop, "Canvas Plane", "Axis to display grid");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+       RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, 
"rna_GPencil_update");
 }
 
 static void rna_def_gpencil_data(BlenderRNA *brna)

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

Reply via email to