[Bf-blender-cvs] [196e3920f7f] master: Use 'show_' prefix convention for composition guides

William Reynish noreply at git.blender.org
Thu Mar 21 16:05:34 CET 2019


Commit: 196e3920f7fd6e721b1b0273d23eff3db2a085b6
Author: William Reynish
Date:   Thu Mar 21 16:05:32 2019 +0100
Branches: master
https://developer.blender.org/rB196e3920f7fd6e721b1b0273d23eff3db2a085b6

Use 'show_' prefix convention for composition guides

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

M	release/scripts/startup/bl_ui/properties_data_camera.py
M	source/blender/makesrna/intern/rna_camera.c

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

diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index 1aea73a48eb..1183e458370 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -396,14 +396,14 @@ class DATA_PT_camera_display_composition_guides(CameraButtonsPanel, Panel):
 
         flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False)
 
-        flow.prop(cam, "composition_center")
-        flow.prop(cam, "composition_center_diagonal")
-        flow.prop(cam, "composition_thirds")
-        flow.prop(cam, "composition_golden")
-        flow.prop(cam, "composition_golden_tria_a")
-        flow.prop(cam, "composition_golden_tria_b")
-        flow.prop(cam, "composition_harmony_tri_a")
-        flow.prop(cam, "composition_harmony_tri_b")
+        flow.prop(cam, "show_composition_center")
+        flow.prop(cam, "show_composition_center_diagonal")
+        flow.prop(cam, "show_composition_thirds")
+        flow.prop(cam, "show_composition_golden")
+        flow.prop(cam, "show_composition_golden_tria_a")
+        flow.prop(cam, "show_composition_golden_tria_b")
+        flow.prop(cam, "show_composition_harmony_tri_a")
+        flow.prop(cam, "show_composition_harmony_tri_b")
 
 
 class DATA_PT_camera_display_passepartout(CameraButtonsPanel, Panel):
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 627055518e9..f9d794a3d77 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -561,42 +561,42 @@ void RNA_def_camera(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface");
 
 	/* dtx */
-	prop = RNA_def_property(srna, "composition_center", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_composition_center", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "dtx", CAM_DTX_CENTER);
 	RNA_def_property_ui_text(prop, "Center", "Display center composition guide inside the camera view");
 	RNA_def_property_update(prop, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, NULL);
 
-	prop = RNA_def_property(srna, "composition_center_diagonal", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_composition_center_diagonal", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "dtx", CAM_DTX_CENTER_DIAG);
 	RNA_def_property_ui_text(prop, "Center Diagonal", "Display diagonal center composition guide inside the camera view");
 	RNA_def_property_update(prop, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, NULL);
 
-	prop = RNA_def_property(srna, "composition_thirds", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_composition_thirds", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "dtx", CAM_DTX_THIRDS);
 	RNA_def_property_ui_text(prop, "Thirds", "Display rule of thirds composition guide inside the camera view");
 	RNA_def_property_update(prop, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, NULL);
 
-	prop = RNA_def_property(srna, "composition_golden", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_composition_golden", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "dtx", CAM_DTX_GOLDEN);
 	RNA_def_property_ui_text(prop, "Golden Ratio", "Display golden ratio composition guide inside the camera view");
 	RNA_def_property_update(prop, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, NULL);
 
-	prop = RNA_def_property(srna, "composition_golden_tria_a", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_composition_golden_tria_a", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "dtx", CAM_DTX_GOLDEN_TRI_A);
 	RNA_def_property_ui_text(prop, "Golden Triangle A", "Display golden triangle A composition guide inside the camera view");
 	RNA_def_property_update(prop, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, NULL);
 
-	prop = RNA_def_property(srna, "composition_golden_tria_b", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_composition_golden_tria_b", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "dtx", CAM_DTX_GOLDEN_TRI_B);
 	RNA_def_property_ui_text(prop, "Golden Triangle B", "Display golden triangle B composition guide inside the camera view");
 	RNA_def_property_update(prop, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, NULL);
 
-	prop = RNA_def_property(srna, "composition_harmony_tri_a", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_composition_harmony_tri_a", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "dtx", CAM_DTX_HARMONY_TRI_A);
 	RNA_def_property_ui_text(prop, "Harmonious Triangle A", "Display harmony A composition guide inside the camera view");
 	RNA_def_property_update(prop, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, NULL);
 
-	prop = RNA_def_property(srna, "composition_harmony_tri_b", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_composition_harmony_tri_b", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "dtx", CAM_DTX_HARMONY_TRI_B);
 	RNA_def_property_ui_text(prop, "Harmonious Triangle B", "Display harmony B composition guide inside the camera view");
 	RNA_def_property_update(prop, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, NULL);



More information about the Bf-blender-cvs mailing list