[Bf-blender-cvs] [aa25207c441] soc-2019-npr: Cleanup: make format
YimingWu
noreply at git.blender.org
Mon Jul 8 15:35:14 CEST 2019
Commit: aa25207c441b45fa6a1db54fda1af4d24a217c41
Author: YimingWu
Date: Mon Jul 8 21:34:32 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rBaa25207c441b45fa6a1db54fda1af4d24a217c41
Cleanup: make format
===================================================================
M source/blender/blenloader/intern/versioning_280.c
M source/blender/draw/engines/lanpr/lanpr_dpix.c
M source/blender/draw/engines/lanpr/lanpr_engine.c
M source/blender/draw/engines/lanpr/lanpr_ops.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index b4b54f96f20..b9ce9eb90cc 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3530,7 +3530,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
sce->lanpr.enable_intersections = 1;
/* default world background color */
- copy_v3_fl(sce->lanpr.background_color,0.051);
+ copy_v3_fl(sce->lanpr.background_color, 0.051);
sce->lanpr.background_color[3] = 1;
sce->lanpr.use_world_background = 1;
diff --git a/source/blender/draw/engines/lanpr/lanpr_dpix.c b/source/blender/draw/engines/lanpr/lanpr_dpix.c
index a4ac78a659b..49e1baf9ede 100644
--- a/source/blender/draw/engines/lanpr/lanpr_dpix.c
+++ b/source/blender/draw/engines/lanpr/lanpr_dpix.c
@@ -476,7 +476,8 @@ void lanpr_dpix_draw_scene(LANPR_TextureList *txl,
float clear_depth = 1.0f;
uint clear_stencil = 0xFF;
int is_persp = 1;
- float use_background_color[4] = {0.0f ,0.0f,0.0f,1.0f};;
+ float use_background_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
+ ;
if (!lanpr->active_layer) {
return; /* return early in case we don't have line layers. DPIX only use the first layer. */
@@ -517,11 +518,12 @@ void lanpr_dpix_draw_scene(LANPR_TextureList *txl,
pd->dpix_znear = camera ? ((Camera *)camera->data)->clip_start : v3d->clip_start;
pd->dpix_zfar = camera ? ((Camera *)camera->data)->clip_end : v3d->clip_end;
- if(lanpr->use_world_background){
- copy_v3_v3(use_background_color,&scene->world->horr);
+ if (lanpr->use_world_background) {
+ copy_v3_v3(use_background_color, &scene->world->horr);
use_background_color[3] = 1;
- }else{
- copy_v3_v3(use_background_color,lanpr->background_color);
+ }
+ else {
+ copy_v3_v3(use_background_color, lanpr->background_color);
}
GPU_point_size(1);
diff --git a/source/blender/draw/engines/lanpr/lanpr_engine.c b/source/blender/draw/engines/lanpr/lanpr_engine.c
index 8a0f3ca12be..819c1ea743a 100644
--- a/source/blender/draw/engines/lanpr/lanpr_engine.c
+++ b/source/blender/draw/engines/lanpr/lanpr_engine.c
@@ -465,10 +465,10 @@ static void lanpr_cache_populate(void *vedata, Object *ob)
struct GPUBatch *geom = DRW_cache_object_surface_get(ob);
if (geom) {
- if(dpix_ok = (lanpr->master_mode == LANPR_MASTER_MODE_DPIX && lanpr->active_layer &&
- !lanpr_share.dpix_shader_error)){
+ if (dpix_ok = (lanpr->master_mode == LANPR_MASTER_MODE_DPIX && lanpr->active_layer &&
+ !lanpr_share.dpix_shader_error)) {
usage = lanpr_object_collection_usage_check(draw_ctx->scene->master_collection, ob);
- if(usage == OBJECT_FEATURE_LINE_EXCLUDE){
+ if (usage == OBJECT_FEATURE_LINE_EXCLUDE) {
return;
}
}
@@ -478,10 +478,10 @@ static void lanpr_cache_populate(void *vedata, Object *ob)
if (dpix_ok) {
/* usage already set */
- if(usage == OBJECT_FEATURE_LINE_OCCLUSION_ONLY){
+ if (usage == OBJECT_FEATURE_LINE_OCCLUSION_ONLY) {
return;
}
-
+
int idx = pd->begin_index;
if (lanpr->reloaded) {
pd->begin_index = lanpr_feed_atlas_data_obj(vedata,
diff --git a/source/blender/draw/engines/lanpr/lanpr_ops.c b/source/blender/draw/engines/lanpr/lanpr_ops.c
index 5290e726e48..bb0e3d000a2 100644
--- a/source/blender/draw/engines/lanpr/lanpr_ops.c
+++ b/source/blender/draw/engines/lanpr/lanpr_ops.c
@@ -4001,7 +4001,7 @@ void lanpr_viewport_draw_offline_result(LANPR_TextureList *txl,
float clear_col[4] = {0.0f, 0.0f, 0.0f, 0.0f};
float clear_depth = 1.0f;
uint clear_stencil = 0xFF;
- float use_background_color[4] = {0.0f ,0.0f,0.0f,1.0f};
+ float use_background_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
@@ -4021,11 +4021,12 @@ void lanpr_viewport_draw_offline_result(LANPR_TextureList *txl,
camera = scene->camera;
}
- if(lanpr->use_world_background){
- copy_v3_v3(use_background_color,&scene->world->horr);
+ if (lanpr->use_world_background) {
+ copy_v3_v3(use_background_color, &scene->world->horr);
use_background_color[3] = 1;
- }else{
- copy_v3_v3(use_background_color,lanpr->background_color);
+ }
+ else {
+ copy_v3_v3(use_background_color, lanpr->background_color);
}
GPU_framebuffer_bind(fbl->dpix_transform);
@@ -4099,8 +4100,8 @@ void lanpr_software_draw_scene(void *vedata, GPUFrameBuffer *dfb, int is_render)
View3D *v3d = draw_ctx->v3d;
float indentity_mat[4][4];
static float normal_object_direction[3] = {0, 0, 1};
- float use_background_color[4]={0.0f ,0.0f,0.0f,1.0f};
- static float camdx,camdy,camzoom;
+ float use_background_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
+ static float camdx, camdy, camzoom;
if (is_render) {
lanpr_rebuild_all_command(lanpr);
@@ -4119,11 +4120,12 @@ void lanpr_software_draw_scene(void *vedata, GPUFrameBuffer *dfb, int is_render)
uint clear_stencil = 0xFF;
eGPUFrameBufferBits clear_bits = GPU_DEPTH_BIT | GPU_COLOR_BIT;
- if(lanpr->use_world_background){
- copy_v3_v3(use_background_color,&scene->world->horr);
+ if (lanpr->use_world_background) {
+ copy_v3_v3(use_background_color, &scene->world->horr);
use_background_color[3] = 1;
- }else{
- copy_v3_v3(use_background_color,lanpr->background_color);
+ }
+ else {
+ copy_v3_v3(use_background_color, lanpr->background_color);
}
GPU_framebuffer_bind(fbl->software_ms);
@@ -4146,12 +4148,13 @@ void lanpr_software_draw_scene(void *vedata, GPUFrameBuffer *dfb, int is_render)
DRW_view_default_set(view);
DRW_view_set_active(view);
- RegionView3D* rv3d = v3d?draw_ctx->rv3d:NULL;
- if(rv3d){
+ RegionView3D *rv3d = v3d ? draw_ctx->rv3d : NULL;
+ if (rv3d) {
camdx = rv3d->camdx;
camdy = rv3d->camdy;
camzoom = BKE_screen_view3d_zoom_to_fac(rv3d->camzoom);
- }else{
+ }
+ else {
camdx = camdy = 0.0f;
camzoom = 1.0f;
}
@@ -4400,9 +4403,10 @@ int lanpr_compute_feature_lines_internal(Depsgraph *depsgraph, int intersectons_
return OPERATOR_FINISHED;
}
-bool lanpr_camera_exists(struct bContext*c){
- Scene* s = CTX_data_scene(c);
- return s->camera?true:false;
+bool lanpr_camera_exists(struct bContext *c)
+{
+ Scene *s = CTX_data_scene(c);
+ return s->camera ? true : false;
}
/* seems we don't quite need this operator... */
@@ -4488,7 +4492,7 @@ LANPR_LineLayer *lanpr_new_line_layer(SceneLANPR *lanpr)
ll->qi_begin = ll->qi_end = max_occ + 1;
ll->use_same_style = 1;
ll->thickness = 1.0f;
- copy_v3_fl(ll->color,0.8);
+ copy_v3_fl(ll->color, 0.8);
ll->color[3] = 1.0f;
ll->enable_contour = 1;
ll->enable_crease = 1;
@@ -4682,13 +4686,13 @@ int lanpr_auto_create_line_layer_exec(struct bContext *C, struct wmOperator *op)
ll = lanpr_new_line_layer(lanpr);
ll->thickness = 0.9;
- copy_v3_fl(ll->color,0.6);
+ copy_v3_fl(ll->color, 0.6);
lanpr_enable_all_line_types_exec(C, op);
ll = lanpr_new_line_layer(lanpr);
ll->thickness = 0.7;
- copy_v3_fl(ll->color,0.5);
+ copy_v3_fl(ll->color, 0.5);
lanpr_enable_all_line_types_exec(C, op);
More information about the Bf-blender-cvs
mailing list