[Bf-blender-cvs] [7eaf00bfb09] blender2.8: Cleanup: style
Campbell Barton
noreply at git.blender.org
Wed Aug 22 02:05:45 CEST 2018
Commit: 7eaf00bfb09f5e5a5b0c57d7df7093970aff137e
Author: Campbell Barton
Date: Wed Aug 22 10:10:12 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB7eaf00bfb09f5e5a5b0c57d7df7093970aff137e
Cleanup: style
===================================================================
M source/blender/blenkernel/BKE_subdiv.h
M source/blender/blenkernel/intern/constraint.c
M source/blender/blenkernel/intern/gpencil_modifier.c
M source/blender/blenkernel/intern/subdiv_displacement_multires.c
M source/blender/draw/engines/gpencil/gpencil_cache_utils.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/workbench/workbench_render.c
M source/blender/draw/intern/DRW_render.h
M source/blender/draw/intern/draw_anim_viz.c
M source/blender/draw/intern/draw_common.c
M source/blender/draw/modes/edit_armature_mode.c
M source/blender/draw/modes/edit_curve_mode.c
M source/blender/draw/modes/edit_lattice_mode.c
M source/blender/draw/modes/object_mode.c
M source/blender/draw/modes/pose_mode.c
M source/blender/editors/mask/mask_draw.c
M source/blender/editors/mesh/editmesh_extrude.c
M source/blender/editors/screen/screen_edit.c
M source/blender/editors/space_outliner/outliner_dragdrop.c
M source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c
M source/blender/python/mathutils/mathutils_Matrix.c
M source/blender/python/mathutils/mathutils_Quaternion.c
M source/blender/python/mathutils/mathutils_Vector.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h
index 887eff6e7dc..9f8a0f261e6 100644
--- a/source/blender/blenkernel/BKE_subdiv.h
+++ b/source/blender/blenkernel/BKE_subdiv.h
@@ -211,7 +211,7 @@ void BKE_subdiv_eval_displacement(
Subdiv *subdiv,
const int ptex_face_index,
const float u, const float v,
- const float dPdu[3], const float dPdv[3],
+ const float dPdu[3], const float dPdv[3],
float r_D[3]);
void BKE_subdiv_eval_final_point(
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 2a28f333f41..4674b2c7554 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -635,7 +635,7 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m
/* apply full transformation of the segment if requested */
if (full_bbone) {
int index = floorf(fac);
- CLAMP(index, 0, pchan->bone->segments-1);
+ CLAMP(index, 0, pchan->bone->segments - 1);
mul_m4_m4m4(tempmat, pchan->pose_mat, bbone[index].mat);
}
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index 6f6051dfa7c..3b0c86a1832 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -407,10 +407,10 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer *g
/* some modifiers could require a recalc of fill triangulation data */
if (gpd->flag & GP_DATA_STROKE_FORCE_RECALC) {
if (ELEM(md->type,
- eGpencilModifierType_Hook,
- eGpencilModifierType_Lattice,
- eGpencilModifierType_Offset)) {
-
+ eGpencilModifierType_Hook,
+ eGpencilModifierType_Lattice,
+ eGpencilModifierType_Offset))
+ {
gps->flag |= GP_STROKE_RECALC_CACHES;
}
}
diff --git a/source/blender/blenkernel/intern/subdiv_displacement_multires.c b/source/blender/blenkernel/intern/subdiv_displacement_multires.c
index 8f0048a3ed4..7eb47a70588 100644
--- a/source/blender/blenkernel/intern/subdiv_displacement_multires.c
+++ b/source/blender/blenkernel/intern/subdiv_displacement_multires.c
@@ -23,7 +23,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/blenkernel/intern/subdiv_displacement.c
+/** \file blender/blenkernel/intern/subdiv_displacement_multires.c
* \ingroup bke
*/
@@ -118,7 +118,7 @@ static int displacement_get_grid_and_coord(
SubdivDisplacement *displacement,
const int ptex_face_index, const float u, const float v,
const MDisps **r_displacement_grid,
- float *grid_u, float *grid_v)
+ float *grid_u, float *grid_v)
{
MultiresDisplacementData *data = displacement->user_data;
const PolyCornerIndex *poly_corner =
@@ -432,8 +432,8 @@ void BKE_subdiv_displacement_attach_from_multires(
SubdivDisplacement *displacement = MEM_callocN(sizeof(SubdivDisplacement),
"multires displacement");
displacement->user_data = MEM_callocN(sizeof(MultiresDisplacementData),
- "multires displacement data");
- displacement_init_data(displacement, object, mmd);
+ "multires displacement data");
+ displacement_init_data(displacement, object, mmd);
displacement_init_functions(displacement);
/* Finish. */
subdiv->displacement_evaluator = displacement;
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
index 8ae650a21eb..835cc2cfe57 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -46,7 +46,7 @@ static bool gpencil_check_ob_duplicated(tGPencilObjectCache *cache_array, int gp
for (int i = 0; i < gp_cache_used + 1; i++) {
tGPencilObjectCache *cache_elem = &cache_array[i];
if (STREQ(cache_elem->ob_name, ob->id.name) &&
- (cache_elem->is_dup_ob == false))
+ (cache_elem->is_dup_ob == false))
{
return true;
}
@@ -54,8 +54,9 @@ static bool gpencil_check_ob_duplicated(tGPencilObjectCache *cache_array, int gp
return false;
}
-static bool gpencil_check_datablock_duplicated(tGPencilObjectCache *cache_array, int gp_cache_used,
- Object *ob, bGPdata *gpd)
+static bool gpencil_check_datablock_duplicated(
+ tGPencilObjectCache *cache_array, int gp_cache_used,
+ Object *ob, bGPdata *gpd)
{
if (gp_cache_used == 0) {
return false;
@@ -64,7 +65,7 @@ static bool gpencil_check_datablock_duplicated(tGPencilObjectCache *cache_array,
for (int i = 0; i < gp_cache_used + 1; i++) {
tGPencilObjectCache *cache_elem = &cache_array[i];
if (!STREQ(cache_elem->ob_name, ob->id.name) &&
- (cache_elem->gpd == gpd))
+ (cache_elem->gpd == gpd))
{
return true;
}
@@ -109,8 +110,9 @@ tGPencilObjectCache *gpencil_object_cache_add(
copy_m4_m4(cache_elem->obmat, ob->obmat);
cache_elem->idx = *gp_cache_used;
- cache_elem->is_dup_onion = gpencil_check_datablock_duplicated(cache_array, *gp_cache_used,
- ob, cache_elem->gpd);
+ cache_elem->is_dup_onion = gpencil_check_datablock_duplicated(
+ cache_array, *gp_cache_used,
+ ob, cache_elem->gpd);
/* save FXs */
cache_elem->pixfactor = cache_elem->gpd->pixfactor;
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 16412dda3f8..858a20dbbc3 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -744,7 +744,7 @@ static void gpencil_draw_strokes(
GpencilBatchCache *cache, GPENCIL_e_data *e_data, void *vedata, ToolSettings *ts, Object *ob,
bGPdata *gpd, bGPDlayer *gpl, bGPDframe *src_gpf, bGPDframe *derived_gpf,
const float opacity, const float tintcolor[4],
- const bool custonion, tGPencilObjectCache *cache_ob)
+ const bool custonion, tGPencilObjectCache *cache_ob)
{
GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl;
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
@@ -866,19 +866,19 @@ static void gpencil_draw_strokes(
if ((fillgrp) && (!stl->storage->simplify_fill)) {
gpencil_add_fill_shgroup(
cache, fillgrp, ob, gpl, derived_gpf, gps,
- tintcolor, false, custonion);
+ tintcolor, false, custonion);
}
/* stroke */
if (strokegrp) {
gpencil_add_stroke_shgroup(
cache, strokegrp, ob, gpl, derived_gpf, gps,
- opacity, tintcolor, false, custonion);
+ opacity, tintcolor, false, custonion);
}
}
/* edit points (only in edit mode and not play animation not render) */
if ((draw_ctx->obact == ob) && (src_gps) &&
- (!playing) && (!is_render) && (!cache_ob->is_dup_ob))
+ (!playing) && (!is_render) && (!cache_ob->is_dup_ob))
{
if (!stl->g_data->shgrps_edit_line) {
stl->g_data->shgrps_edit_line = DRW_shgroup_create(e_data->gpencil_line_sh, psl->edit_pass);
@@ -1156,8 +1156,9 @@ static void gpencil_draw_onionskins(
}
/* populate a datablock for multiedit (no onions, no modifiers) */
-void DRW_gpencil_populate_multiedit(GPENCIL_e_data *e_data, void *vedata, Scene *scene, Object *ob,
- tGPencilObjectCache *cache_ob)
+void DRW_gpencil_populate_multiedit(
+ GPENCIL_e_data *e_data, void *vedata, Scene *scene, Object *ob,
+ tGPencilObjectCache *cache_ob)
{
bGPdata *gpd = (bGPdata *)ob->data;
bGPDframe *gpf = NULL;
@@ -1204,9 +1205,9 @@ void DRW_gpencil_populate_multiedit(GPENCIL_e_data *e_data, void *vedata, Scene
/* helper for populate a complete grease pencil datablock */
void DRW_gpencil_populate_datablock(
- GPENCIL_e_data *e_data, void *vedata,
- Scene *scene, Object *ob,
- tGPencilObjectCache *cache_ob)
+ GPENCIL_e_data *e_data, void *vedata,
+ Scene *scene, Object *ob,
+ tGPencilObjectCache *cache_ob)
{
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
@@ -1246,7 +1247,7 @@ void DRW_gpencil_populate_datablock(
gpl->runtime.derived_data = (GHash *)BLI_ghash_str_new(gpl->info);
}
- if (BLI_ghash_haskey(gpl->runtime.derived_data,ob->id.name)) {
+ if (BLI_ghash_haskey(gpl->runtime.derived_data, ob->id.name)) {
derived_gpf = BLI_ghash_lookup(gpl->runtime.derived_data, ob->id.name);
}
else {
@@ -1285,12 +1286,12 @@ void DRW_gpencil_populate_datablock(
* with instances
*/
if ((!cache_ob->is_dup_onion) && (gpd->flag & GP_DATA_SHOW_ONIONSKINS) &&
- (do_onion) && (gpl->onion_flag & GP_LAYER_ONIONSKIN) &&
- ((!playing) || (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)) &&
- (!cache_ob->is_dup_ob) && (orig_id->us <= 1))
+ (do_onion) && (gpl->onion_flag & GP_LAYER_ONIONSKIN) &&
+ ((!playing) || (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)) &&
+ (!cache_ob->is_dup_ob) && (orig_id->us <= 1))
{
if (((!stl->storage->is_render) && (overlay)) ||
- ((stl->storage->is_render) && (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)))
+ ((stl->storage->is_render) && (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)))
{
gpencil_draw_onionskins(cache, e_data, vedata, ob, gpd, gpl, gpf);
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 90543c47c1b..bdca3a350cd 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -517,8 +517,9 @@ static void gpencil_add_draw_data(void *vedata, Object *ob)
/* save init shading group */
cache_ob->init_grp = stl->storage->shgroup_id;
- DRW_gpencil_populate_datablock(&e_data, vedata, scene, ob,
- cache_ob);
+ DRW_gpencil_populate_datablock(
+ &e_data, vedata, scene, ob,
+ cache_ob);
/* save end shading group */
cache_ob->end_grp = stl->storage->shgroup_id - 1;
@@
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list