[Bf-blender-cvs] [f06884b18ab] blender2.8: Cleanup: style, duplicate includes
Campbell Barton
noreply at git.blender.org
Tue Jul 31 12:12:29 CEST 2018
Commit: f06884b18ab5b619975689a0670f8f0f14f9c318
Author: Campbell Barton
Date: Tue Jul 31 20:11:55 2018 +1000
Branches: blender2.8
https://developer.blender.org/rBf06884b18ab5b619975689a0670f8f0f14f9c318
Cleanup: style, duplicate includes
===================================================================
M source/blender/blenkernel/BKE_gpencil_modifier.h
M source/blender/blenkernel/intern/gpencil.c
M source/blender/blenkernel/intern/gpencil_modifier.c
M source/blender/blenkernel/intern/object.c
M source/blender/blenkernel/intern/subdiv_mesh.c
M source/blender/blenloader/intern/versioning_280.c
M source/blender/depsgraph/DEG_depsgraph.h
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M source/blender/draw/engines/gpencil/gpencil_cache_utils.c
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
M source/blender/draw/engines/gpencil/gpencil_engine.h
M source/blender/draw/engines/gpencil/gpencil_render.c
M source/blender/draw/engines/gpencil/gpencil_shader_fx.c
M source/blender/editors/animation/anim_channels_defines.c
M source/blender/editors/animation/anim_filter.c
M source/blender/editors/gpencil/annotate_draw.c
M source/blender/editors/gpencil/drawgpencil.c
M source/blender/editors/gpencil/gpencil_brush.c
M source/blender/editors/gpencil/gpencil_data.c
M source/blender/editors/gpencil/gpencil_edit.c
M source/blender/editors/gpencil/gpencil_fill.c
M source/blender/editors/gpencil/gpencil_intern.h
M source/blender/editors/gpencil/gpencil_ops.c
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/editors/gpencil/gpencil_primitive.c
M source/blender/editors/gpencil/gpencil_utils.c
M source/blender/editors/include/UI_interface.h
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/object/object_add.c
M source/blender/editors/object/object_modes.c
M source/blender/editors/object/object_modifier.c
M source/blender/editors/space_buttons/space_buttons.c
M source/blender/editors/space_view3d/view3d_gizmo_ruler.c
M source/blender/editors/space_view3d/view3d_select.c
M source/blender/editors/transform/transform.c
M source/blender/editors/transform/transform_snap_object.c
M source/blender/gpencil_modifiers/MOD_gpencil_modifiertypes.h
M source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
M source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
M source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c
M source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
M source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
M source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
M source/blender/makesdna/DNA_gpencil_modifier_types.h
M source/blender/makesdna/DNA_shader_fx_types.h
M source/blender/makesrna/intern/rna_gpencil.c
M source/blender/makesrna/intern/rna_gpencil_modifier.c
M source/blender/makesrna/intern/rna_shader_fx.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h
index cd6b6540012..be27560bbf2 100644
--- a/source/blender/blenkernel/BKE_gpencil_modifier.h
+++ b/source/blender/blenkernel/BKE_gpencil_modifier.h
@@ -22,7 +22,7 @@
#ifndef __BKE_GPENCIL_MODIFIER_H__
#define __BKE_GPENCIL_MODIFIER_H__
-/** \file BKE_greasepencil_modifier.h
+/** \file BKE_gpencil_modifier.h
* \ingroup bke
*/
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index de3f891f9f9..c86f39f1d55 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -546,7 +546,7 @@ void BKE_gpencil_stroke_weights_duplicate(bGPDstroke *gps_src, bGPDstroke *gps_d
}
BLI_assert(gps_src->totpoints == gps_dst->totpoints);
- if ((gps_src->dvert == NULL) || (gps_dst->dvert == NULL)){
+ if ((gps_src->dvert == NULL) || (gps_dst->dvert == NULL)) {
return;
}
@@ -1050,7 +1050,7 @@ Material *BKE_gpencil_get_material_from_brush(Brush *brush)
Material *ma = NULL;
if ((brush != NULL) && (brush->gpencil_settings != NULL) &&
- (brush->gpencil_settings->material != NULL))
+ (brush->gpencil_settings->material != NULL))
{
ma = brush->gpencil_settings->material;
}
@@ -1076,7 +1076,7 @@ Material *BKE_gpencil_material_ensure(Main *bmain, Object *ob)
assign_material(bmain, ob, ma, ob->totcol, BKE_MAT_ASSIGN_EXISTING);
}
else if (ma->gp_style == NULL) {
- BKE_material_init_gpencil_settings(ma);
+ BKE_material_init_gpencil_settings(ma);
}
return ma;
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index 2ba738902a0..3c2196afb18 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -384,8 +384,7 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer *g
const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
for (md = ob->greasepencil_modifiers.first; md; md = md->next) {
- if (GPENCIL_MODIFIER_ACTIVE(md, is_render))
- {
+ if (GPENCIL_MODIFIER_ACTIVE(md, is_render)) {
const GpencilModifierTypeInfo *mti = BKE_gpencil_modifierType_getInfo(md->type);
if (GPENCIL_MODIFIER_EDIT(md, is_edit)) {
@@ -407,8 +406,7 @@ void BKE_gpencil_geometry_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer
const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
for (md = ob->greasepencil_modifiers.first; md; md = md->next) {
- if (GPENCIL_MODIFIER_ACTIVE(md, is_render))
- {
+ if (GPENCIL_MODIFIER_ACTIVE(md, is_render)) {
const GpencilModifierTypeInfo *mti = BKE_gpencil_modifierType_getInfo(md->type);
if (GPENCIL_MODIFIER_EDIT(md, is_edit)) {
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 9c7ce7698f7..41c23c46c44 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3821,24 +3821,18 @@ bool BKE_object_modifier_gpencil_use_time(Object *ob, GpencilModifierData *md)
/* action - check for F-Curves with paths containing 'grease_pencil_modifiers[' */
if (adt->action) {
- for (fcu = (FCurve *)adt->action->curves.first;
- fcu != NULL;
- fcu = (FCurve *)fcu->next)
- {
- if (fcu->rna_path && strstr(fcu->rna_path, pattern))
+ for (fcu = adt->action->curves.first; fcu != NULL; fcu = fcu->next) {
+ if (fcu->rna_path && strstr(fcu->rna_path, pattern)) {
return true;
+ }
}
}
- /* This here allows modifier properties to get driven and still update properly
- *
- */
- for (fcu = (FCurve *)adt->drivers.first;
- fcu != NULL;
- fcu = (FCurve *)fcu->next)
- {
- if (fcu->rna_path && strstr(fcu->rna_path, pattern))
+ /* This here allows modifier properties to get driven and still update properly */
+ for (fcu = adt->drivers.first; fcu != NULL; fcu = fcu->next) {
+ if (fcu->rna_path && strstr(fcu->rna_path, pattern)) {
return true;
+ }
}
}
@@ -3862,22 +3856,14 @@ bool BKE_object_shaderfx_use_time(Object *ob, ShaderFxData *fx)
/* action - check for F-Curves with paths containing string[' */
if (adt->action) {
- for (fcu = (FCurve *)adt->action->curves.first;
- fcu != NULL;
- fcu = (FCurve *)fcu->next)
- {
+ for (fcu = adt->action->curves.first; fcu != NULL; fcu = fcu->next) {
if (fcu->rna_path && strstr(fcu->rna_path, pattern))
return true;
}
}
- /* This here allows properties to get driven and still update properly
- *
- */
- for (fcu = (FCurve *)adt->drivers.first;
- fcu != NULL;
- fcu = (FCurve *)fcu->next)
- {
+ /* This here allows properties to get driven and still update properly */
+ for (fcu = adt->drivers.first; fcu != NULL; fcu = fcu->next) {
if (fcu->rna_path && strstr(fcu->rna_path, pattern))
return true;
}
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c
index 895d527ea5c..db7366a2414 100644
--- a/source/blender/blenkernel/intern/subdiv_mesh.c
+++ b/source/blender/blenkernel/intern/subdiv_mesh.c
@@ -277,7 +277,7 @@ static void subdiv_mesh_ctx_init_offsets(SubdivMeshContext *ctx)
num_ptex_faces_per_poly *
(num_inner_edges_per_ptex_face_get(
no_quad_patch_resolution - 1) +
- (no_quad_patch_resolution - 2) +
+ (no_quad_patch_resolution - 2) +
num_subdiv_vertices_per_coarse_edge);
if (no_quad_patch_resolution >= 3) {
edge_offset += coarse_poly->totloop;
@@ -2193,7 +2193,7 @@ static void subdiv_copy_poly_data(const SubdivMeshContext *ctx,
static void subdiv_create_polys(SubdivMeshContext *ctx, int poly_index)
{
const int resolution = ctx->settings->resolution;
- const int start_poly_index = ctx->subdiv_polygon_offset[poly_index];
+ const int start_poly_index = ctx->subdiv_polygon_offset[poly_index];
/* Base/coarse mesh information. */
const Mesh *coarse_mesh = ctx->coarse_mesh;
const MPoly *coarse_mpoly = coarse_mesh->mpoly;
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 93577315b1c..d2a1cc1f4f1 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -846,7 +846,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (ntree->type == NTREE_SHADER) {
for (bNode *node = ntree->nodes.first; node; node = node->next) {
if (node->type == 194 /* SH_NODE_EEVEE_METALLIC */ &&
- STREQ(node->idname, "ShaderNodeOutputMetallic"))
+ STREQ(node->idname, "ShaderNodeOutputMetallic"))
{
BLI_strncpy(node->idname, "ShaderNodeEeveeMetallic", sizeof(node->idname));
error |= NTREE_DOVERSION_NEED_OUTPUT;
@@ -858,14 +858,14 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
else if (node->type == 196 /* SH_NODE_OUTPUT_EEVEE_MATERIAL */ &&
- STREQ(node->idname, "ShaderNodeOutputEeveeMaterial"))
+ STREQ(node->idname, "ShaderNodeOutputEeveeMaterial"))
{
node->type = SH_NODE_OUTPUT_MATERIAL;
BLI_strncpy(node->idname, "ShaderNodeOutputMaterial", sizeof(node->idname));
}
else if (node->type == 194 /* SH_NODE_EEVEE_METALLIC */ &&
- STREQ(node->idname, "ShaderNodeEeveeMetallic"))
+ STREQ(node->idname, "ShaderNodeEeveeMetallic"))
{
node->type = SH_NODE_BSDF_PRINCIPLED;
BLI_strncpy(node->idname, "ShaderNodeBsdfPrincipled", sizeof(node->idname));
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index 2e566752a6f..7d827f48f9c 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -239,9 +239,9 @@ void DEG_make_inactive(struct Depsgraph *depsgraph);
void DEG_debug_print_begin(struct Depsgraph *depsgraph);
void DEG_debug_print_eval(struct Depsgraph *depsgraph,
- const char* function_name,
- const char* object_name,
- const void* object_address);
+ const char *function_name,
+ const char *object_name,
+ const void *object_address);
void DEG_debug_print_eval_subdata(struct Depsgraph *depsgraph,
const char *function_name,
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index c9a00b0bf0f..1d01b3e987b 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2005,22 +2005,22 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata)
TimeSourceKey time_key;
ComponentKey geometry_key(obdata, DEG_NODE_TYPE_GEOMETRY);
add_relation(time_key,
- geometry_key,
- "GP Frame Change");
+ geometry_key,
+ "GP Frame Change");
/* Geometry cache also needs to be recalculated when Material
- * settings change (e.g. when fill.opacity changes on/off,
- * we need to rebuild the bGPDstroke->triangles caches)
- */
+ * settings change (e.g. when fill.opacity changes on/off,
+ * we need to rebuild the bGPDstroke->triangles caches)
+ */
for (int i = 0; i < gpd->totcol; i++) {
Material *ma = gpd->mat[i];
if ((ma != NULL) && (ma->gp_style != NULL)) {
OperationKey material_key(&ma->id,
- DEG_NODE_TYPE_SHADING,
- DEG_OPCODE_MATERIAL_UPDATE);
+ DEG_NODE_TYPE_SHADING,
+ DEG_OPCODE_MATERIAL_UPDATE);
add_relation(material_key,
- geometry_key,
- "Material -> GP Data");
+ geometry_key,
+ "Material -> GP Data");
}
}
break;
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/ble
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list