[Bf-blender-cvs] [692f20604c4] temp-lanpr-review: Run clang-format on all changed files
Julian Eisel
noreply at git.blender.org
Wed Nov 27 15:38:58 CET 2019
Commit: 692f20604c4146b081003c6f5dccb4178ef42cc5
Author: Julian Eisel
Date: Wed Nov 27 15:35:17 2019 +0100
Branches: temp-lanpr-review
https://developer.blender.org/rB692f20604c4146b081003c6f5dccb4178ef42cc5
Run clang-format on all changed files
===================================================================
M source/blender/blenkernel/intern/collection.c
M source/blender/blenkernel/intern/library_query.c
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/versioning_280.c
M source/blender/blenloader/intern/writefile.c
M source/blender/draw/engines/lanpr/lanpr_cpu.c
M source/blender/draw/engines/lanpr/lanpr_engine.c
M source/blender/draw/intern/draw_manager_texture.c
M source/blender/editors/include/ED_lanpr.h
M source/blender/editors/lanpr/lanpr_cpu.c
M source/blender/editors/lanpr/lanpr_util.c
M source/blender/editors/render/render_update.c
M source/blender/editors/space_api/spacetypes.c
M source/blender/editors/space_buttons/buttons_context.c
M source/blender/makesdna/DNA_collection_types.h
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesrna/intern/rna_collection.c
M source/blender/makesrna/intern/rna_scene.c
M source/blender/makesrna/intern/rna_space.c
M source/blender/python/intern/bpy_app_build_options.c
===================================================================
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 398894d24b1..44fb108bac7 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -127,7 +127,7 @@ void BKE_collection_free(Collection *collection)
BKE_collection_object_cache_free(collection);
/* Remove LANPR configurations */
- if(collection->lanpr){
+ if (collection->lanpr) {
MEM_freeN(collection->lanpr);
collection->lanpr = NULL;
}
@@ -235,9 +235,9 @@ void BKE_collection_copy_data(Main *bmain,
}
/* Copy LANPR configurations */
- if((collection_src->lanpr != NULL) && (collection_dst->lanpr == NULL)){
- CollectionLANPR* lanpr = MEM_callocN(sizeof(CollectionLANPR), "Duplicated CollectionLANPR");
- collection_dst->lanpr = lanpr;
+ if ((collection_src->lanpr != NULL) && (collection_dst->lanpr == NULL)) {
+ CollectionLANPR *lanpr = MEM_callocN(sizeof(CollectionLANPR), "Duplicated CollectionLANPR");
+ collection_dst->lanpr = lanpr;
}
memcpy(collection_dst->lanpr, collection_src->lanpr, sizeof(CollectionLANPR));
}
@@ -380,9 +380,9 @@ Collection *BKE_collection_duplicate(Main *bmain,
BKE_main_collection_sync(bmain);
/* Copy LANPR configurations */
- if((collection->lanpr != NULL) && (collection_new->lanpr == NULL)){
- CollectionLANPR* lanpr = MEM_callocN(sizeof(CollectionLANPR), "Duplicated CollectionLANPR");
- collection_new->lanpr = lanpr;
+ if ((collection->lanpr != NULL) && (collection_new->lanpr == NULL)) {
+ CollectionLANPR *lanpr = MEM_callocN(sizeof(CollectionLANPR), "Duplicated CollectionLANPR");
+ collection_new->lanpr = lanpr;
}
memcpy(collection_new->lanpr, collection->lanpr, sizeof(CollectionLANPR));
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index c0bd6e05c44..bda1cac80e4 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -493,7 +493,7 @@ static void library_foreach_ID_link(Main *bmain,
CALLBACK_INVOKE(child->collection, IDWALK_CB_USER);
}
- if(scene->master_collection->lanpr){
+ if (scene->master_collection->lanpr) {
CALLBACK_INVOKE(scene->master_collection->lanpr->target, IDWALK_CB_USER);
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index fbc25e80c94..cde8f42a756 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6279,7 +6279,7 @@ static void lib_link_collection_data(FileData *fd, Library *lib, Collection *col
child->collection = newlibadr_us(fd, lib, child->collection);
}
- if(collection->lanpr){
+ if (collection->lanpr) {
collection->lanpr->target = newlibadr_us(fd, lib, collection->lanpr->target);
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 191fc81b190..4cc07d070df 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3977,7 +3977,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
br->pose_smooth_iterations = 4;
}
}
-
+
if (!DNA_struct_find(fd->filesdna, "SceneLANPR")) {
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 47c565213be..ce5e7078e2d 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2384,7 +2384,7 @@ static void write_collection_nolib(WriteData *wd, Collection *collection)
writestruct(wd, DATA, CollectionChild, 1, child);
}
- if((collection->flag & COLLECTION_CONFIGURED_FOR_LANPR) && (collection->lanpr!=NULL)){
+ if ((collection->flag & COLLECTION_CONFIGURED_FOR_LANPR) && (collection->lanpr != NULL)) {
writestruct(wd, DATA, CollectionLANPR, 1, collection->lanpr);
}
}
diff --git a/source/blender/draw/engines/lanpr/lanpr_cpu.c b/source/blender/draw/engines/lanpr/lanpr_cpu.c
index da605e219c6..b8a9e0da03c 100644
--- a/source/blender/draw/engines/lanpr/lanpr_cpu.c
+++ b/source/blender/draw/engines/lanpr/lanpr_cpu.c
@@ -288,7 +288,7 @@ void lanpr_software_draw_scene(void *vedata, GPUFrameBuffer *dfb, int is_render)
DRW_STATE_DEPTH_LESS_EQUAL);
rb = lanpr_share.render_buffer_shared;
rb->chain_shgrp = DRW_shgroup_create(lanpr_share.software_chaining_shader,
- psl->software_pass);
+ psl->software_pass);
ED_lanpr_calculate_normal_object_vector(ll, normal_object_direction);
@@ -400,7 +400,8 @@ void lanpr_software_draw_scene(void *vedata, GPUFrameBuffer *dfb, int is_render)
rb->chain_shgrp, "taper_r_strength", (lanpr->flags & LANPR_SAME_TAPER) ? tls : trs, 1);
/* need to add component enable/disable option. */
- DRW_shgroup_call(rb->chain_shgrp, lanpr_share.render_buffer_shared->chain_draw_batch, NULL);
+ DRW_shgroup_call(
+ rb->chain_shgrp, lanpr_share.render_buffer_shared->chain_draw_batch, NULL);
/* debug purpose */
/* DRW_draw_pass(psl->color_pass); */
/* DRW_draw_pass(psl->color_pass); */
diff --git a/source/blender/draw/engines/lanpr/lanpr_engine.c b/source/blender/draw/engines/lanpr/lanpr_engine.c
index 6dbe0bdf880..ad1c605f11a 100644
--- a/source/blender/draw/engines/lanpr/lanpr_engine.c
+++ b/source/blender/draw/engines/lanpr/lanpr_engine.c
@@ -141,7 +141,7 @@ void DRW_scene_lanpr_freecache(Scene *sce)
ll->batch = NULL;
}
}
- if(lanpr_share.render_buffer_shared && lanpr_share.render_buffer_shared->scene == sce){
+ if (lanpr_share.render_buffer_shared && lanpr_share.render_buffer_shared->scene == sce) {
ED_lanpr_destroy_render_data(lanpr_share.render_buffer_shared);
}
}
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c
index 96f69d21ea5..9a885d47eeb 100644
--- a/source/blender/draw/intern/draw_manager_texture.c
+++ b/source/blender/draw/intern/draw_manager_texture.c
@@ -164,8 +164,12 @@ void DRW_texture_ensure_fullscreen_2D_multisample(GPUTexture **tex,
}
}
-void DRW_texture_ensure_2D_multisample(
- GPUTexture **tex, int w, int h, eGPUTextureFormat format, int samples, DRWTextureFlag UNUSED(flags))
+void DRW_texture_ensure_2D_multisample(GPUTexture **tex,
+ int w,
+ int h,
+ eGPUTextureFormat format,
+ int samples,
+ DRWTextureFlag UNUSED(flags))
{
if (*(tex) == NULL) {
*(tex) = GPU_texture_create_2d_multisample(w, h, format, NULL, samples, NULL);
diff --git a/source/blender/editors/include/ED_lanpr.h b/source/blender/editors/include/ED_lanpr.h
index 50ae61d5650..44c54b8d6d8 100644
--- a/source/blender/editors/include/ED_lanpr.h
+++ b/source/blender/editors/include/ED_lanpr.h
@@ -25,7 +25,7 @@
#define __ED_LANPR_H__
#ifndef WITH_LANPR
-# error LANPR code included in non-LANPR-enabled build
+# error LANPR code included in non-LANPR-enabled build
#endif
#include "BLI_listbase.h"
@@ -341,7 +341,6 @@ typedef enum LANPR_CullState {
LANPR_CULL_DISCARD = 2,
} LANPR_CullState;
-
/** Controls how many lines a worker thread is processing at one request.
* There's no significant performance impact on choosing different values.
* Don't make it too small so that the worker thread won't request too many times. */
@@ -367,14 +366,14 @@ typedef struct LANPR_RenderTaskInfo {
} LANPR_RenderTaskInfo;
-/** Bounding area diagram:
- *
+/** Bounding area diagram:
+ *
* +----+ <----U (Upper edge Y value)
* | |
* +----+ <----B (Bottom edge Y value)
* ^ ^
* L R (Left/Right edge X value)
- *
+ *
* Example structure when subdividing 1 bounding areas:
* 1 area can be divided into 4 smaller children to
* accomodate image areas with denser triangle distribution.
@@ -385,7 +384,7 @@ typedef struct LANPR_RenderTaskInfo {
* +-----+-----+
* lp/rp/up/bp is the list for
* storing pointers to adjacent bounding areas.
-*/
+ */
typedef struct LANPR_BoundingArea {
double l, r, u, b;
double cx, cy;
@@ -567,7 +566,9 @@ int ED_lanpr_max_occlusion_in_line_layers(struct SceneLANPR *lanpr);
LANPR_LineLayer *ED_lanpr_new_line_layer(struct SceneLANPR *lanpr);
LANPR_BoundingArea *ED_lanpr_get_point_bounding_area(LANPR_RenderBuffer *rb, double x, double y);
-LANPR_BoundingArea *ED_lanpr_get_point_bounding_area_deep(LANPR_RenderBuffer *rb, double x, double y);
+LANPR_BoundingArea *ED_lanpr_get_point_bounding_area_deep(LANPR_RenderBuffer *rb,
+ double x,
+ double y);
void ED_lanpr_post_frame_update_external(struct Scene *s, struct Depsgraph *dg);
diff --git a/source/blender/editors/lanpr/lanpr_cpu.c b/source/blender/editors/lanpr/lanpr_cpu.c
index 6beccb11594..825bb51bf11 100644
--- a/source/blender/editors/lanpr/lanpr_cpu.c
+++ b/source/blender/editors/lanpr/lanpr_cpu.c
@@ -595,13 +595,13 @@ static void lanpr_calculate_single_line_occlusion(LANPR_RenderBuffer *rb,
Object *c = rb->scene->camera;
double l, r;
double k = (rl->r->fbcoord[1] - rl->l->fbcoord[1]) /
- (rl->r->fbcoord[0] - rl->l->fbcoord[0] + 1e-30);
+ (rl->r->fbcoord[0] - rl->l->fbcoord[0] + 1e-30);
int positive_x = (rl->r->fbcoord[0] - rl->l->fbcoord[0]) > 0 ?
- 1 :
- (rl->r->fbcoord[0] == rl->l->fbcoord[0] ? 0 : -1);
+ 1 :
+ (rl->r->fbcoord[0] == rl->l->fbcoord[0] ? 0 : -1);
int positive_y = (rl->r->fbcoord[1] - rl->l->fbcoord[1]) > 0 ?
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list