[Bf-blender-cvs] [363cf1152fc] master: Cleanup: use bool, style

Campbell Barton noreply at git.blender.org
Sat Dec 29 00:24:18 CET 2018


Commit: 363cf1152fcbbe5fcd1a0b07833c1cf0370dba74
Author: Campbell Barton
Date:   Sat Dec 29 10:04:39 2018 +1100
Branches: master
https://developer.blender.org/rB363cf1152fcbbe5fcd1a0b07833c1cf0370dba74

Cleanup: use bool, style

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

M	source/blender/alembic/intern/abc_curves.cc
M	source/blender/makesrna/intern/rna_internal.h
M	source/blender/makesrna/intern/rna_layer.c
M	source/blender/makesrna/intern/rna_render.c
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/alembic/intern/abc_curves.cc b/source/blender/alembic/intern/abc_curves.cc
index fa5e2214836..9501c643e32 100644
--- a/source/blender/alembic/intern/abc_curves.cc
+++ b/source/blender/alembic/intern/abc_curves.cc
@@ -448,7 +448,7 @@ Mesh *AbcCurveReader::read_mesh(Mesh *existing_mesh,
 
 	if (same_topology) {
 		Nurb *nurbs = static_cast<Nurb *>(curve->nurb.first);
-		for (curve_idx=0; nurbs; nurbs = nurbs->next, ++curve_idx) {
+		for (curve_idx = 0; nurbs; nurbs = nurbs->next, ++curve_idx) {
 			const int num_in_alembic = (*num_vertices)[curve_idx];
 			const int num_in_blender = nurbs->pntsu;
 
@@ -465,7 +465,7 @@ Mesh *AbcCurveReader::read_mesh(Mesh *existing_mesh,
 	}
 	else {
 		Nurb *nurbs = static_cast<Nurb *>(curve->nurb.first);
-		for (curve_idx=0; nurbs; nurbs = nurbs->next, ++curve_idx) {
+		for (curve_idx = 0; nurbs; nurbs = nurbs->next, ++curve_idx) {
 			const int totpoint = (*num_vertices)[curve_idx];
 
 			if (nurbs->bp) {
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 6e69de774e9..54d8adc4588 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -224,7 +224,7 @@ void rna_def_mtex_common(struct BlenderRNA *brna, struct StructRNA *srna, const
                          const char *activeset, const char *activeeditable, const char *structname,
                          const char *structname_slots, const char *update, const char *update_index);
 void rna_def_texpaint_slots(struct BlenderRNA *brna, struct StructRNA *srna);
-void rna_def_view_layer_common(struct StructRNA *srna, int scene);
+void rna_def_view_layer_common(struct StructRNA *srna, bool scene);
 
 void rna_def_actionbone_group_common(struct StructRNA *srna, int update_flag, const char *update_cb);
 void rna_ActionGroup_colorset_set(struct PointerRNA *ptr, int value);
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index 28b0b686bfc..c84c59287a5 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -381,7 +381,7 @@ void RNA_def_view_layer(BlenderRNA *brna)
 	RNA_def_struct_path_func(srna, "rna_ViewLayer_path");
 	RNA_def_struct_idprops_func(srna, "rna_ViewLayer_idprops");
 
-	rna_def_view_layer_common(srna, 1);
+	rna_def_view_layer_common(srna, true);
 
 	func = RNA_def_function(srna, "update_render_passes", "rna_ViewLayer_update_render_passes");
 	RNA_def_function_ui_description(func, "Requery the enabled render passes from the render engine");
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 9836dfdfbc9..b549664139f 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -906,7 +906,7 @@ static void rna_def_render_layer(BlenderRNA *brna)
 
 	RNA_define_verify_sdna(0);
 
-	rna_def_view_layer_common(srna, 0);
+	rna_def_view_layer_common(srna, false);
 
 	prop = RNA_def_property(srna, "passes", PROP_COLLECTION, PROP_NONE);
 	RNA_def_property_struct_type(prop, "RenderPass");
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index f3f5371b458..e36a124073d 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3221,7 +3221,7 @@ static void rna_def_unit_settings(BlenderRNA *brna)
 	RNA_def_property_update(prop, NC_WINDOW, NULL);
 }
 
-void rna_def_view_layer_common(StructRNA *srna, int scene)
+void rna_def_view_layer_common(StructRNA *srna, const bool scene)
 {
 	PropertyRNA *prop;
 
@@ -3239,7 +3239,7 @@ void rna_def_view_layer_common(StructRNA *srna, int scene)
 		RNA_def_property_struct_type(prop, "Material");
 		RNA_def_property_flag(prop, PROP_EDITABLE);
 		RNA_def_property_ui_text(prop, "Material Override",
-								 "Material to override all other materials in this view layer");
+		                         "Material to override all other materials in this view layer");
 		RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_material_override_update");
 
 		prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED);



More information about the Bf-blender-cvs mailing list