Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-20 09:52:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-20 09:52:56 +0300
commit12eb29fe355bc17dacf094e8e9d6edc1d8b877f0 (patch)
treeb4297f5992c2263dbc3f986f20bc3edad99af4b0 /source
parent96a3a628613bfd592aea5fcdfbb196bb61dfacb7 (diff)
Cleanup: whitespace, duplicate includes
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_studiolight.h2
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c37
-rw-r--r--source/blender/blenkernel/intern/collection.c7
-rw-r--r--source/blender/blenkernel/intern/icons.c3
-rw-r--r--source/blender/blenkernel/intern/layer.c5
-rw-r--r--source/blender/blenkernel/intern/mball.c4
-rw-r--r--source/blender/blenkernel/intern/studiolight.c32
-rw-r--r--source/blender/blenlib/intern/math_geom.c2
-rw-r--r--source/blender/blenloader/intern/versioning_280.c163
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.h2
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c3
-rw-r--r--source/blender/draw/intern/draw_manager.c2
-rw-r--r--source/blender/draw/intern/draw_manager_exec.c3
-rw-r--r--source/blender/draw/modes/pose_mode.c2
-rw-r--r--source/blender/editors/mesh/editmesh_add_manipulator.c2
-rw-r--r--source/blender/editors/mesh/editmesh_intersect.c2
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c8
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c5
-rw-r--r--source/blender/makesrna/intern/rna_layer.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c1
-rw-r--r--source/blender/makesrna/intern/rna_space.c8
23 files changed, 154 insertions, 147 deletions
diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h
index 33c2af668b2..863aab37f39 100644
--- a/source/blender/blenkernel/BKE_studiolight.h
+++ b/source/blender/blenkernel/BKE_studiolight.h
@@ -73,7 +73,7 @@ typedef struct StudioLight
void BKE_studiolight_init(void);
void BKE_studiolight_free(void);
-struct StudioLight *BKE_studiolight_find(const char* name);
+struct StudioLight *BKE_studiolight_find(const char *name);
struct StudioLight *BKE_studiolight_findindex(int index);
unsigned int *BKE_studiolight_preview(StudioLight *sl, int icon_size);
const struct ListBase *BKE_studiolight_listbase(void);
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index bcb45b199d2..602dd4c965b 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1295,8 +1295,9 @@ static Mesh *create_orco_mesh(Object *ob, Mesh *me, BMEditMesh *em, int layer)
mesh = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
}
else {
- BKE_id_copy_ex(NULL, &me->id, (ID**)&mesh,
- LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
+ BKE_id_copy_ex(
+ NULL, &me->id, (ID **)&mesh,
+ LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
}
orco = get_orco_coords_dm(ob, em, layer, &free);
@@ -1984,7 +1985,7 @@ static void mesh_ensure_display_normals(Mesh *mesh)
*/
/* BLI_assert((CustomData_has_layer(&mesh->pdata, CD_NORMAL) == false)); */
- if(mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL || !CustomData_has_layer(&mesh->pdata, CD_NORMAL)) {
+ if (mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL || !CustomData_has_layer(&mesh->pdata, CD_NORMAL)) {
float (*face_nors)[3] = NULL;
face_nors = MEM_malloc_arrayN(mesh->totpoly, sizeof(*face_nors), "face_nors");
@@ -1993,9 +1994,9 @@ static void mesh_ensure_display_normals(Mesh *mesh)
/* calculate face normals */
BKE_mesh_calc_normals_poly(
- mesh->mvert, NULL, mesh->totvert, mesh->mloop, mesh->mpoly,
- mesh->totloop, mesh->totpoly, face_nors,
- only_face_normals);
+ mesh->mvert, NULL, mesh->totvert, mesh->mloop, mesh->mpoly,
+ mesh->totloop, mesh->totpoly, face_nors,
+ only_face_normals);
CustomData_add_layer(&mesh->pdata, CD_NORMAL, CD_ASSIGN, face_nors, mesh->totpoly);
@@ -2127,8 +2128,9 @@ static void mesh_calc_modifiers(
* coordinates (vpaint, etc.)
*/
if (r_deform_mesh) {
- BKE_id_copy_ex(NULL, &me->id, (ID**)r_deform_mesh,
- LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
+ BKE_id_copy_ex(
+ NULL, &me->id, (ID **)r_deform_mesh,
+ LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
/* XXX: Is build_shapekey_layers ever even true? This should have crashed long ago... */
BLI_assert(!build_shapekey_layers);
@@ -2269,8 +2271,9 @@ static void mesh_calc_modifiers(
}
}
else {
- BKE_id_copy_ex(NULL, &me->id, (ID**)&mesh,
- LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
+ BKE_id_copy_ex(
+ NULL, &me->id, (ID **)&mesh,
+ LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
ASSERT_IS_VALID_MESH(mesh);
// XXX: port to Mesh if build_shapekey_layers can ever be true
@@ -2439,8 +2442,9 @@ static void mesh_calc_modifiers(
#endif
}
else {
- BKE_id_copy_ex(NULL, &me->id, (ID**)&final_mesh,
- LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
+ BKE_id_copy_ex(
+ NULL, &me->id, (ID **)&final_mesh,
+ LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
//if (build_shapekey_layers) {
// add_shapekey_layers(final_mesh, me, ob);
@@ -2521,11 +2525,12 @@ static void mesh_calc_modifiers_dm(
{
Mesh *deform_mesh = NULL, *final_mesh = NULL;
- mesh_calc_modifiers(depsgraph, scene, ob, inputVertexCos, useRenderParams, useDeform,
- need_mapping, dataMask, index, useCache, build_shapekey_layers, allow_gpu,
- (r_deformdm ? &deform_mesh : NULL), &final_mesh);
+ mesh_calc_modifiers(
+ depsgraph, scene, ob, inputVertexCos, useRenderParams, useDeform,
+ need_mapping, dataMask, index, useCache, build_shapekey_layers, allow_gpu,
+ (r_deformdm ? &deform_mesh : NULL), &final_mesh);
- if(deform_mesh) {
+ if (deform_mesh) {
*r_deformdm = CDDM_from_mesh_ex(deform_mesh, CD_DUPLICATE);
BKE_id_free(NULL, deform_mesh);
}
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 5ba4a1196b8..215477e66cc 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -313,7 +313,8 @@ bool BKE_collection_is_animated(Collection *collection, Object *UNUSED(parent))
* you can draw everything, leaves tags in objects to signal it needs further updating */
/* note: does not work for derivedmesh and render... it recreates all again in convertblender.c */
-void BKE_collection_handle_recalc_and_update(struct Depsgraph *depsgraph, Scene *scene, Object *UNUSED(parent), Collection *collection)
+void BKE_collection_handle_recalc_and_update(
+ struct Depsgraph *depsgraph, Scene *scene, Object *UNUSED(parent), Collection *collection)
{
/* only do existing tags, as set by regular depsgraph */
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(collection, object)
@@ -323,7 +324,7 @@ void BKE_collection_handle_recalc_and_update(struct Depsgraph *depsgraph, Scene
}
}
FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
- }
+}
/* **************** Object List Cache *******************/
@@ -508,7 +509,7 @@ Collection *BKE_collection_object_find(Main *bmain, Collection *collection, Obje
collection = collection->id.next;
else
collection = bmain->collection.first;
-
+
while (collection) {
if (BKE_collection_has_object(collection, ob))
return collection;
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 8476bb6b66d..bfd4e07606f 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -806,7 +806,8 @@ struct Icon_Geom *BKE_icon_geom_from_file(const char *filename)
/** \name Studio Light Icon
* \{ */
-int BKE_icon_ensure_studio_light(struct StudioLight *sl) {
+int BKE_icon_ensure_studio_light(struct StudioLight *sl)
+{
int icon_id = get_next_free_id();
icon_create(icon_id, ICON_DATA_STUDIOLIGHT, sl);
return icon_id;
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 685c007da6b..461d332dcf5 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -349,8 +349,9 @@ static void layer_collections_copy_data(ListBase *layer_collections_dst, const L
const LayerCollection *layer_collection_src = layer_collections_src->first;
while (layer_collection_dst != NULL) {
- layer_collections_copy_data(&layer_collection_dst->layer_collections,
- &layer_collection_src->layer_collections);
+ layer_collections_copy_data(
+ &layer_collection_dst->layer_collections,
+ &layer_collection_src->layer_collections);
layer_collection_dst = layer_collection_dst->next;
layer_collection_src = layer_collection_src->next;
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 7fc289f8bf2..2f85bfedcf2 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -317,7 +317,7 @@ bool BKE_mball_is_basis_for(Object *ob1, Object *ob2)
bool BKE_mball_is_any_selected(const MetaBall *mb)
{
for (const MetaElem *ml = mb->editelems->first; ml != NULL; ml = ml->next) {
- if(ml->flag & SELECT) {
+ if (ml->flag & SELECT) {
return true;
}
}
@@ -327,7 +327,7 @@ bool BKE_mball_is_any_selected(const MetaBall *mb)
bool BKE_mball_is_any_unselected(const MetaBall *mb)
{
for (const MetaElem *ml = mb->editelems->first; ml != NULL; ml = ml->next) {
- if((ml->flag & SELECT) == 0) {
+ if ((ml->flag & SELECT) == 0) {
return true;
}
}
diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c
index baecbd90bc5..7942cbaab71 100644
--- a/source/blender/blenkernel/intern/studiolight.c
+++ b/source/blender/blenkernel/intern/studiolight.c
@@ -83,11 +83,11 @@ static void direction_to_equirectangular(float r[2], const float dir[3])
static void equirectangular_to_direction(float r[3], float u, float v)
{
- float phi = (-(M_PI * 2))*u + M_PI;
- float theta = -M_PI*v + M_PI;
+ float phi = (-(M_PI * 2)) * u + M_PI;
+ float theta = -M_PI * v + M_PI;
float sin_theta = sinf(theta);
- r[0] = sin_theta*cosf(phi);
- r[1] = sin_theta*sinf(phi);
+ r[0] = sin_theta * cosf(phi);
+ r[1] = sin_theta * sinf(phi);
r[2] = cosf(theta);
}
@@ -120,7 +120,7 @@ static void studiolight_calculate_directional_diffuse_light(ImBuf *ibuf, float c
add_v3_v3(totcol, col);
}
}
- mul_v3_v3fl(color, totcol, 1.0/(steps*steps));
+ mul_v3_v3fl(color, totcol, 1.0 / (steps * steps));
}
static void studiolight_calculate_diffuse_light(StudioLight *sl)
@@ -138,7 +138,7 @@ static void studiolight_calculate_diffuse_light(StudioLight *sl)
copy_v3_fl(sl->diffuse_light[STUDIOLIGHT_Z_NEG], 0.0f);
if (sl->flag & STUDIOLIGHT_EXTERNAL_FILE) {
- ImBuf* ibuf = NULL;
+ ImBuf *ibuf = NULL;
ibuf = IMB_loadiffname(sl->path, 0, NULL);
if (ibuf) {
IMB_float_from_rect(ibuf);
@@ -177,7 +177,7 @@ static void studiolight_calculate_light_direction(StudioLight *sl)
sl->light_direction[2] = -1.0f;
if ((sl->flag & STUDIOLIGHT_EXTERNAL_FILE) && (sl->flag & STUDIOLIGHT_ORIENTATION_WORLD)) {
- ImBuf* ibuf = NULL;
+ ImBuf *ibuf = NULL;
ibuf = IMB_loadiffname(sl->path, 0, NULL);
if (ibuf) {
IMB_float_from_rect(ibuf);
@@ -204,7 +204,7 @@ static void studiolight_calculate_light_direction(StudioLight *sl)
sl->flag |= STUDIOLIGHT_LIGHT_DIRECTION_CALCULATED;
}
-static void studiolight_add_files_from_datafolder(const int folder_id, const char* subfolder, int flag)
+static void studiolight_add_files_from_datafolder(const int folder_id, const char *subfolder, int flag)
{
StudioLight *sl;
struct direntry *dir;
@@ -248,11 +248,10 @@ static int studiolight_cmp(const void *a, const void *b)
const int flagorder1 = studiolight_flag_cmp_order(sl1);
const int flagorder2 = studiolight_flag_cmp_order(sl2);
- if (flagorder1 < flagorder2){
+ if (flagorder1 < flagorder2) {
return -1;
}
- else if (flagorder1 > flagorder2)
- {
+ else if (flagorder1 > flagorder2) {
return 1;
}
else {
@@ -290,13 +289,12 @@ void BKE_studiolight_init(void)
void BKE_studiolight_free(void)
{
struct StudioLight *sl;
- while((sl = (StudioLight*)BLI_pophead(&studiolights)))
- {
+ while ((sl = BLI_pophead(&studiolights))) {
studiolight_free(sl);
}
}
-struct StudioLight *BKE_studiolight_find(const char* name)
+struct StudioLight *BKE_studiolight_find(const char *name)
{
LISTBASE_FOREACH(StudioLight *, sl, &studiolights) {
if (STREQLEN(sl->name, name, FILE_MAXFILE)) {
@@ -304,7 +302,7 @@ struct StudioLight *BKE_studiolight_find(const char* name)
}
}
/* When not found, use the default studio light */
- return (StudioLight*)studiolights.first;
+ return studiolights.first;
}
struct StudioLight *BKE_studiolight_findindex(int index)
@@ -315,7 +313,7 @@ struct StudioLight *BKE_studiolight_findindex(int index)
}
}
/* When not found, use the default studio light */
- return (StudioLight*)studiolights.first;
+ return studiolights.first;
}
const struct ListBase *BKE_studiolight_listbase(void)
@@ -377,7 +375,7 @@ unsigned int *BKE_studiolight_preview(StudioLight *sl, int icon_size)
void BKE_studiolight_ensure_flag(StudioLight *sl, int flag)
{
- if ((sl->flag & flag) == flag){
+ if ((sl->flag & flag) == flag) {
return;
}
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index a72cbb67883..0f98a648259 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -2322,7 +2322,7 @@ int isect_aabb_planes_v3(
return ISECT_AABB_PLANE_BEHIND_ANY;
}
else if ((ret != ISECT_AABB_PLANE_CROSS_ANY) &&
- (plane_point_side_v3(planes[i], bb_near) < 0.0f))
+ (plane_point_side_v3(planes[i], bb_near) < 0.0f))
{
ret = ISECT_AABB_PLANE_CROSS_ANY;
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 43302408dc4..c3bf632fe6e 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -456,8 +456,9 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene)
/* Note usually this would do slow collection syncing for view layers,
* but since no view layers exists yet at this point it's fast. */
- BKE_collection_object_add(bmain,
- collections[collection_index].collections[layer], base->object);
+ BKE_collection_object_add(
+ bmain,
+ collections[collection_index].collections[layer], base->object);
}
if (base->flag & SELECT) {
@@ -478,23 +479,23 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene)
CollectionChild *hide_child = BLI_findptr(&collection_parent->children, collections[DO_VERSION_COLLECTION_HIDE].collections[layer], offsetof(CollectionChild, collection));
if ((collections[DO_VERSION_COLLECTION_HIDE].created & (1 << layer)) &&
- (hide_child != collection_parent->children.first))
+ (hide_child != collection_parent->children.first))
{
BLI_listbase_swaplinks(
- &collection_parent->children,
- hide_child,
- collection_parent->children.first);
+ &collection_parent->children,
+ hide_child,
+ collection_parent->children.first);
}
CollectionChild *hide_all_child = BLI_findptr(&collection_parent->children, collections[DO_VERSION_COLLECTION_HIDE_ALL].collections[layer], offsetof(CollectionChild, collection));
if ((collections[DO_VERSION_COLLECTION_HIDE_ALL].created & (1 << layer)) &&
- (hide_all_child != collection_parent->children.last))
+ (hide_all_child != collection_parent->children.last))
{
BLI_listbase_swaplinks(
- &collection_parent->children,
- hide_all_child,
- collection_parent->children.last);
+ &collection_parent->children,
+ hide_all_child,
+ collection_parent->children.last);
}
child_parent = child_parent->next;
@@ -515,20 +516,20 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene)
/* It is up to the external engine to handle
* its own doversion in this case. */
BKE_override_view_layer_int_add(
- view_layer,
- ID_SCE,
- "samples",
- srl->samples);
+ view_layer,
+ ID_SCE,
+ "samples",
+ srl->samples);
}
if (srl->mat_override) {
have_override = true;
BKE_override_view_layer_datablock_add(
- view_layer,
- ID_MA,
- "self",
- (ID *)srl->mat_override);
+ view_layer,
+ ID_MA,
+ "self",
+ (ID *)srl->mat_override);
}
if (srl->layflag & SCE_LAY_DISABLE) {
@@ -565,26 +566,26 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene)
}
}
else if ((scene->lay & srl->lay & ~(srl->lay_exclude) & (1 << layer)) ||
- (srl->lay_zmask & (scene->lay | srl->lay_exclude) & (1 << layer)))
+ (srl->lay_zmask & (scene->lay | srl->lay_exclude) & (1 << layer)))
{
if (srl->lay_zmask & (1 << layer)) {
have_override = true;
BKE_override_layer_collection_boolean_add(
- lc,
- ID_OB,
- "cycles.is_holdout",
- true);
+ lc,
+ ID_OB,
+ "cycles.is_holdout",
+ true);
}
if ((srl->lay & (1 << layer)) == 0) {
have_override = true;
BKE_override_layer_collection_boolean_add(
- lc,
- ID_OB,
- "cycles_visibility.camera",
- false);
+ lc,
+ ID_OB,
+ "cycles_visibility.camera",
+ false);
}
}
@@ -1254,60 +1255,60 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
if (!DNA_struct_find(fd->filesdna, "SceneEEVEE")) {
for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
- /* First set the default for all the properties. */
-
- scene->eevee.gi_diffuse_bounces = 3;
- scene->eevee.gi_cubemap_resolution = 512;
- scene->eevee.gi_visibility_resolution = 32;
-
- scene->eevee.taa_samples = 16;
- scene->eevee.taa_render_samples = 64;
-
- scene->eevee.sss_samples = 7;
- scene->eevee.sss_jitter_threshold = 0.3f;
-
- scene->eevee.ssr_quality = 0.25f;
- scene->eevee.ssr_max_roughness = 0.5f;
- scene->eevee.ssr_thickness = 0.2f;
- scene->eevee.ssr_border_fade = 0.075f;
- scene->eevee.ssr_firefly_fac = 10.0f;
-
- scene->eevee.volumetric_start = 0.1f;
- scene->eevee.volumetric_end = 100.0f;
- scene->eevee.volumetric_tile_size = 8;
- scene->eevee.volumetric_samples = 64;
- scene->eevee.volumetric_sample_distribution = 0.8f;
- scene->eevee.volumetric_light_clamp = 0.0f;
- scene->eevee.volumetric_shadow_samples = 16;
-
- scene->eevee.gtao_distance = 0.2f;
- scene->eevee.gtao_factor = 1.0f;
- scene->eevee.gtao_quality = 0.25f;
-
- scene->eevee.bokeh_max_size = 100.0f;
- scene->eevee.bokeh_threshold = 1.0f;
-
- copy_v3_fl(scene->eevee.bloom_color, 1.0f);
- scene->eevee.bloom_threshold = 0.8f;
- scene->eevee.bloom_knee = 0.5f;
- scene->eevee.bloom_intensity = 0.8f;
- scene->eevee.bloom_radius = 6.5f;
- scene->eevee.bloom_clamp = 1.0f;
-
- scene->eevee.motion_blur_samples = 8;
- scene->eevee.motion_blur_shutter = 1.0f;
-
- scene->eevee.shadow_method = SHADOW_ESM;
- scene->eevee.shadow_cube_size = 512;
- scene->eevee.shadow_cascade_size = 1024;
-
- scene->eevee.flag =
- SCE_EEVEE_VOLUMETRIC_LIGHTS |
- SCE_EEVEE_VOLUMETRIC_COLORED |
- SCE_EEVEE_GTAO_BENT_NORMALS |
- SCE_EEVEE_GTAO_BOUNCE |
- SCE_EEVEE_TAA_REPROJECTION |
- SCE_EEVEE_SSR_HALF_RESOLUTION;
+ /* First set the default for all the properties. */
+
+ scene->eevee.gi_diffuse_bounces = 3;
+ scene->eevee.gi_cubemap_resolution = 512;
+ scene->eevee.gi_visibility_resolution = 32;
+
+ scene->eevee.taa_samples = 16;
+ scene->eevee.taa_render_samples = 64;
+
+ scene->eevee.sss_samples = 7;
+ scene->eevee.sss_jitter_threshold = 0.3f;
+
+ scene->eevee.ssr_quality = 0.25f;
+ scene->eevee.ssr_max_roughness = 0.5f;
+ scene->eevee.ssr_thickness = 0.2f;
+ scene->eevee.ssr_border_fade = 0.075f;
+ scene->eevee.ssr_firefly_fac = 10.0f;
+
+ scene->eevee.volumetric_start = 0.1f;
+ scene->eevee.volumetric_end = 100.0f;
+ scene->eevee.volumetric_tile_size = 8;
+ scene->eevee.volumetric_samples = 64;
+ scene->eevee.volumetric_sample_distribution = 0.8f;
+ scene->eevee.volumetric_light_clamp = 0.0f;
+ scene->eevee.volumetric_shadow_samples = 16;
+
+ scene->eevee.gtao_distance = 0.2f;
+ scene->eevee.gtao_factor = 1.0f;
+ scene->eevee.gtao_quality = 0.25f;
+
+ scene->eevee.bokeh_max_size = 100.0f;
+ scene->eevee.bokeh_threshold = 1.0f;
+
+ copy_v3_fl(scene->eevee.bloom_color, 1.0f);
+ scene->eevee.bloom_threshold = 0.8f;
+ scene->eevee.bloom_knee = 0.5f;
+ scene->eevee.bloom_intensity = 0.8f;
+ scene->eevee.bloom_radius = 6.5f;
+ scene->eevee.bloom_clamp = 1.0f;
+
+ scene->eevee.motion_blur_samples = 8;
+ scene->eevee.motion_blur_shutter = 1.0f;
+
+ scene->eevee.shadow_method = SHADOW_ESM;
+ scene->eevee.shadow_cube_size = 512;
+ scene->eevee.shadow_cascade_size = 1024;
+
+ scene->eevee.flag =
+ SCE_EEVEE_VOLUMETRIC_LIGHTS |
+ SCE_EEVEE_VOLUMETRIC_COLORED |
+ SCE_EEVEE_GTAO_BENT_NORMALS |
+ SCE_EEVEE_GTAO_BOUNCE |
+ SCE_EEVEE_TAA_REPROJECTION |
+ SCE_EEVEE_SSR_HALF_RESOLUTION;
/* If the file is pre-2.80 move on. */
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
index fec30160622..dbfaff4dc18 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@ -194,7 +194,7 @@ struct DepsgraphRelationBuilder
const char *description,
bool check_unique = false);
- void build_id(ID* id);
+ void build_id(ID *id);
void build_layer_collections(ListBase *lb);
void build_view_layer(Scene *scene, ViewLayer *view_layer);
void build_collection(Object *object, Collection *collection);
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index a9c2941eb22..1dcc8d0ec6d 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -339,7 +339,8 @@ void workbench_materials_engine_init(WORKBENCH_Data *vedata)
if (NORMAL_ENCODING_ENABLED()) {
e_data.normal_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RG16, &draw_engine_workbench_solid);
- } else {
+ }
+ else {
e_data.normal_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA32F, &draw_engine_workbench_solid);
}
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 3e7790b421f..eab79eb16ad 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -239,7 +239,7 @@ bool DRW_check_psys_visible_within_active_context(
}
if ((part->childtype == 0) &&
(psys->flag & PSYS_HAIR_DYNAMICS &&
- psys->pointcache->flag & PTCACHE_BAKED)==0)
+ psys->pointcache->flag & PTCACHE_BAKED) == 0)
{
return false;
}
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c
index 78ac96e41b2..acf9938ad73 100644
--- a/source/blender/draw/intern/draw_manager_exec.c
+++ b/source/blender/draw/intern/draw_manager_exec.c
@@ -108,7 +108,8 @@ void drw_state_set(DRWState state)
DRW_STATE_WRITE_STENCIL | DRW_STATE_WRITE_STENCIL_SHADOW))
{
if ((state & (DRW_STATE_WRITE_DEPTH | DRW_STATE_WRITE_COLOR |
- DRW_STATE_WRITE_STENCIL | DRW_STATE_WRITE_STENCIL_SHADOW)) != 0) {
+ DRW_STATE_WRITE_STENCIL | DRW_STATE_WRITE_STENCIL_SHADOW)) != 0)
+ {
glDisable(GL_RASTERIZER_DISCARD);
}
else {
diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c
index f138704cced..464c56f4761 100644
--- a/source/blender/draw/modes/pose_mode.c
+++ b/source/blender/draw/modes/pose_mode.c
@@ -250,7 +250,7 @@ static void POSE_draw_scene(void *vedata)
return;
}
- if(bone_selection_overlay) {
+ if (bone_selection_overlay) {
GPU_framebuffer_bind(dfbl->default_fb);
DRW_draw_pass(psl->bone_selection);
GPU_framebuffer_bind(dfbl->depth_only_fb);
diff --git a/source/blender/editors/mesh/editmesh_add_manipulator.c b/source/blender/editors/mesh/editmesh_add_manipulator.c
index 65e12e673af..bfeccfe33a4 100644
--- a/source/blender/editors/mesh/editmesh_add_manipulator.c
+++ b/source/blender/editors/mesh/editmesh_add_manipulator.c
@@ -154,7 +154,7 @@ static void manipulator_mesh_placement_update_from_op(ManipulatorPlacementGroup
UNUSED_VARS(op);
/* For now don't read back from the operator. */
#if 0
- RNA_property_float_get_array(op->ptr, man->data.prop_matrix, &man->cage->matrix_offset[0][0]);
+ RNA_property_float_get_array(op->ptr, man->data.prop_matrix, &man->cage->matrix_offset[0][0]);
#endif
}
diff --git a/source/blender/editors/mesh/editmesh_intersect.c b/source/blender/editors/mesh/editmesh_intersect.c
index 4d76dba4c3a..ad76f0c66f1 100644
--- a/source/blender/editors/mesh/editmesh_intersect.c
+++ b/source/blender/editors/mesh/editmesh_intersect.c
@@ -788,7 +788,7 @@ static int edbm_face_split_by_edges_exec(bContext *C, wmOperator *UNUSED(op))
/* check we're in the correct corner (works with convex loops too) */
if (angle_signed_on_axis_v3v3v3_v3(l->prev->v->co, l->v->co, v_other->co, l->f->no) <
- angle_signed_on_axis_v3v3v3_v3(l->prev->v->co, l->v->co, l->next->v->co, l->f->no))
+ angle_signed_on_axis_v3v3v3_v3(l->prev->v->co, l->v->co, l->next->v->co, l->f->no))
{
dot_best = dot_test;
l_best = l;
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 3782b9e2c10..0c13c900dee 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -899,7 +899,7 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
/* cancel if nothing was done */
if ((totedge_orig == em->bm->totedge) &&
- (totface_orig == em->bm->totface))
+ (totface_orig == em->bm->totface))
{
EDBM_op_finish(em, &bmop, op, true);
continue;
@@ -908,8 +908,8 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
/* normally we would want to leave the new geometry selected,
* but being able to press F many times to add geometry is too useful! */
if (ele_desel &&
- (BMO_slot_buffer_count(bmop.slots_out, "faces.out") == 1) &&
- (ele_desel_face = BMO_slot_buffer_get_first(bmop.slots_out, "faces.out")))
+ (BMO_slot_buffer_count(bmop.slots_out, "faces.out") == 1) &&
+ (ele_desel_face = BMO_slot_buffer_get_first(bmop.slots_out, "faces.out")))
{
edbm_add_edge_face_exec__tricky_finalize_sel(em->bm, ele_desel, ele_desel_face);
}
@@ -1461,7 +1461,7 @@ static int edbm_vert_connect_path_exec(bContext *C, wmOperator *op)
/* when there is only 2 vertices, we can ignore selection order */
if (is_pair) {
- if(!edbm_connect_vert_pair(em, op)) {
+ if (!edbm_connect_vert_pair(em, op)) {
failed_connect_len++;
}
continue;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index a2e91761a38..364a85c4248 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1645,7 +1645,7 @@ static void move_to_collection_menu_create(bContext *UNUSED(C), uiLayout *layout
uiItemIntO(layout,
name,
ICON_NONE,
- menu->ot->idname,
+ menu->ot->idname,
"collection_index",
menu->index);
uiItemS(layout);
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 9bb3871c247..c44345a168b 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -88,11 +88,11 @@ Collection *outliner_collection_from_tree_element(const TreeElement *te)
return lc->collection;
}
else if (ELEM(tselem->type, TSE_SCENE_COLLECTION_BASE, TSE_VIEW_COLLECTION_BASE)) {
- Scene *scene = (Scene*)tselem->id;
+ Scene *scene = (Scene *)tselem->id;
return BKE_collection_master(scene);
}
else if (tselem->type == 0 && te->idcode == ID_GR) {
- return (Collection*)tselem->id;
+ return (Collection *)tselem->id;
}
return NULL;
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 58ab8f3735e..393b40d1097 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1525,7 +1525,7 @@ BLI_INLINE void outliner_add_collection_objects(
}
static TreeElement *outliner_add_collection_recursive(
- SpaceOops *soops, Collection *collection, TreeElement *ten)
+ SpaceOops *soops, Collection *collection, TreeElement *ten)
{
outliner_add_collection_init(ten, collection);
@@ -1805,7 +1805,8 @@ static TreeElement *outliner_find_first_desired_element_at_y(
bool (*callback_test)(TreeElement *);
if ((soops->outlinevis == SO_VIEW_LAYER) &&
- (soops->filter & SO_FILTER_NO_COLLECTION)) {
+ (soops->filter & SO_FILTER_NO_COLLECTION))
+ {
callback_test = test_object_callback;
}
else {
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index 61bf5ceab8e..10739150a40 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -191,7 +191,7 @@ static void rna_ObjectBase_select_update(Main *UNUSED(bmain), Scene *UNUSED(scen
static void rna_LayerCollection_use_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Scene *scene = (Scene *)ptr->id.data;
- LayerCollection *lc = (LayerCollection*)ptr->data;
+ LayerCollection *lc = (LayerCollection *)ptr->data;
ViewLayer *view_layer = BKE_view_layer_find_from_collection(scene, lc);
BKE_layer_collection_sync(scene, view_layer);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 2e1935f7bf3..1c8e48b94df 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -508,7 +508,6 @@ static const EnumPropertyItem transform_orientation_items[] = {
#include "ED_image.h"
#include "ED_scene.h"
-#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index e34989be5af..8b440ad6f4a 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -276,8 +276,6 @@ const EnumPropertyItem rna_enum_file_sort_items[] = {
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
-#include "BLI_math.h"
-
#include "BKE_animsys.h"
#include "BKE_brush.h"
#include "BKE_colortools.h"
@@ -711,7 +709,7 @@ static int rna_View3DShading_studio_light_orientation_get(PointerRNA *ptr)
{
View3D *v3d = (View3D *)ptr->data;
StudioLight *sl = BKE_studiolight_find(v3d->shading.studio_light);
- return sl->flag & (STUDIOLIGHT_ORIENTATION_WORLD|STUDIOLIGHT_ORIENTATION_CAMERA);
+ return sl->flag & (STUDIOLIGHT_ORIENTATION_WORLD | STUDIOLIGHT_ORIENTATION_CAMERA);
}
static void rna_View3DShading_studio_light_orientation_set(PointerRNA *UNUSED(ptr), int UNUSED(value))
{
@@ -739,10 +737,10 @@ static const EnumPropertyItem *rna_View3DShading_studio_light_itemf(
EnumPropertyItem *lastitem;
int totitem = 0;
- LISTBASE_FOREACH(StudioLight*, sl, BKE_studiolight_listbase()) {
+ LISTBASE_FOREACH(StudioLight *, sl, BKE_studiolight_listbase()) {
if (totitem < NUM_STUDIO_LIGHT_ITEMS) {
RNA_enum_items_add_value(&item, &totitem, rna_enum_studio_light_items, totitem);
- lastitem = &item[totitem-1];
+ lastitem = &item[totitem - 1];
lastitem->value = sl->index;
lastitem->icon = sl->icon_id;
lastitem->name = sl->name;