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
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c25
-rw-r--r--source/blender/editors/transform/transform_snap_object.c17
-rw-r--r--source/blender/gpu/intern/gpu_material.c3
-rw-r--r--source/blender/makesdna/DNA_genfile.h2
4 files changed, 29 insertions, 18 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index cc7531b9783..1305b76b5ad 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1145,7 +1145,9 @@ static void calc_area_normal_and_center(
/* Return modified brush strength. Includes the direction of the brush, positive
* values pull vertices, negative values push. Uses tablet pressure and a
* special multiplier found experimentally to scale the strength factor. */
-static float brush_strength(const Sculpt *sd, const StrokeCache *cache, const float feather, const UnifiedPaintSettings *ups)
+static float brush_strength(
+ const Sculpt *sd, const StrokeCache *cache,
+ const float feather, const UnifiedPaintSettings *ups)
{
const Scene *scene = cache->vc->scene;
const Brush *brush = BKE_paint_brush((Paint *)&sd->paint);
@@ -3985,7 +3987,9 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss)
}
/* Initialize the stroke cache invariants from operator properties */
-static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSession *ss, wmOperator *op, const float mouse[2])
+static void sculpt_update_cache_invariants(
+ bContext *C, Sculpt *sd, SculptSession *ss,
+ wmOperator *op, const float mouse[2])
{
StrokeCache *cache = MEM_callocN(sizeof(StrokeCache), "stroke cache");
Scene *scene = CTX_data_scene(C);
@@ -4448,7 +4452,9 @@ static void sculpt_raycast_detail_cb(PBVHNode *node, void *data_v, float *tmin)
}
}
-static float sculpt_raycast_init(ViewContext *vc, const float mouse[2], float ray_start[3], float ray_end[3], float ray_normal[3], bool original)
+static float sculpt_raycast_init(
+ ViewContext *vc, const float mouse[2],
+ float ray_start[3], float ray_end[3], float ray_normal[3], bool original)
{
float obimat[4][4];
float dist;
@@ -4956,8 +4962,9 @@ void sculpt_dyntopo_node_layers_add(SculptSession *ss)
cd_node_layer_index = CustomData_get_named_layer_index(&ss->bm->vdata, CD_PROP_INT, layer_id);
}
- ss->cd_vert_node_offset = CustomData_get_n_offset(&ss->bm->vdata, CD_PROP_INT,
- cd_node_layer_index - CustomData_get_layer_index(&ss->bm->vdata, CD_PROP_INT));
+ ss->cd_vert_node_offset = CustomData_get_n_offset(
+ &ss->bm->vdata, CD_PROP_INT,
+ cd_node_layer_index - CustomData_get_layer_index(&ss->bm->vdata, CD_PROP_INT));
ss->bm->vdata.layers[cd_node_layer_index].flag |= CD_FLAG_TEMPORARY;
@@ -4967,8 +4974,9 @@ void sculpt_dyntopo_node_layers_add(SculptSession *ss)
cd_node_layer_index = CustomData_get_named_layer_index(&ss->bm->pdata, CD_PROP_INT, layer_id);
}
- ss->cd_face_node_offset = CustomData_get_n_offset(&ss->bm->pdata, CD_PROP_INT,
- cd_node_layer_index - CustomData_get_layer_index(&ss->bm->pdata, CD_PROP_INT));
+ ss->cd_face_node_offset = CustomData_get_n_offset(
+ &ss->bm->pdata, CD_PROP_INT,
+ cd_node_layer_index - CustomData_get_layer_index(&ss->bm->pdata, CD_PROP_INT));
ss->bm->pdata.layers[cd_node_layer_index].flag |= CD_FLAG_TEMPORARY;
}
@@ -5667,7 +5675,8 @@ static void SCULPT_OT_sample_detail_size(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- RNA_def_int_array(ot->srna, "location", 2, NULL, 0, SHRT_MAX, "Location", "Screen Coordinates of sampling", 0, SHRT_MAX);
+ RNA_def_int_array(ot->srna, "location", 2, NULL, 0, SHRT_MAX,
+ "Location", "Screen Coordinates of sampling", 0, SHRT_MAX);
}
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index dc7f5e9ad58..36a064e6265 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -236,7 +236,8 @@ typedef struct PreDefProject {
float dist_px_sq;
} PreDefProject;
-static void precalc_project(PreDefProject *projectdefs, const ARegion *ar,
+static void precalc_project(
+ PreDefProject *projectdefs, const ARegion *ar,
const float dist_px, float obmat[4][4])
{
float (*pmat)[4] = ((RegionView3D *)ar->regiondata)->persmat;
@@ -266,7 +267,8 @@ static float dist_px_to_dist3d_or_tangent(const ARegion *ar, const float dist_px
return 2 * (dist_px / ar->winy) / rv3d->winmat[1][1];
}
-static const float *get_vert_co(const BVHTreeFromMeshType *meshdata, const int index) {
+static const float *get_vert_co(const BVHTreeFromMeshType *meshdata, const int index)
+{
switch (meshdata->type) {
case SNAP_MESH:
{
@@ -284,7 +286,8 @@ static const float *get_vert_co(const BVHTreeFromMeshType *meshdata, const int i
return NULL;
}
-static void copy_vert_no(const BVHTreeFromMeshType *meshdata, const int index, float r_no[3]) {
+static void copy_vert_no(const BVHTreeFromMeshType *meshdata, const int index, float r_no[3])
+{
switch (meshdata->type) {
case SNAP_MESH:
{
@@ -1363,7 +1366,7 @@ static bool snapDerivedMesh(
copy_v3_v3(ray_org_local, ray_origin);
mul_m4_v3(imat, ray_org_local);
- BVHTreeFromMeshType treedata_type = {.userdata = treedata,.type = SNAP_MESH};
+ BVHTreeFromMeshType treedata_type = {.userdata = treedata, .type = SNAP_MESH};
if (is_persp) {
Object_Nearest2dPrecalc neasrest_precalc;
@@ -1654,8 +1657,8 @@ static bool snapEditMesh(
hit.dist = local_depth;
if (BLI_bvhtree_ray_cast(
- treedata->tree, ray_start_local, ray_normal_local, 0.0f,
- &hit, treedata->raycast_callback, treedata) != -1)
+ treedata->tree, ray_start_local, ray_normal_local, 0.0f,
+ &hit, treedata->raycast_callback, treedata) != -1)
{
hit.dist += len_diff;
hit.dist /= local_scale;
@@ -1795,7 +1798,7 @@ static bool snapObject(
retval = snapEditMesh(
sctx, ob, em, obmat, ob_index,
snap_to, mval, is_persp,
- ray_origin, ray_start, ray_normal,depth_range,
+ ray_origin, ray_start, ray_normal, depth_range,
ray_depth, dist_px,
r_loc, r_no, r_index,
r_hit_list);
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 0f95107c018..98a2ceb472e 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1745,8 +1745,7 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)
(GPU_link_changed(shi->refl) || ma->ref != 0.0f))
{
if (world->aocolor != WO_AOPLAIN) {
- if (!(is_zero_v3(&world->horr) & is_zero_v3(&world->zenr)))
- {
+ if (!(is_zero_v3(&world->horr) & is_zero_v3(&world->zenr))) {
GPUNodeLink *fcol, *f;
GPU_link(mat, "math_multiply", shi->amb, shi->refl, &f);
GPU_link(mat, "math_multiply", f, GPU_uniform(&world->ao_env_energy), &f);
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
index bc127ac2c82..0e34792e624 100644
--- a/source/blender/makesdna/DNA_genfile.h
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -89,7 +89,7 @@ void DNA_sdna_current_free(void);
int DNA_struct_find_nr_ex(const struct SDNA *sdna, const char *str, unsigned int *index_last);
int DNA_struct_find_nr(const struct SDNA *sdna, const char *str);
void DNA_struct_switch_endian(const struct SDNA *oldsdna, int oldSDNAnr, char *data);
-char *DNA_struct_get_compareflags(const struct SDNA *sdna, const struct SDNA*newsdna);
+char *DNA_struct_get_compareflags(const struct SDNA *sdna, const struct SDNA *newsdna);
void *DNA_struct_reconstruct(
const struct SDNA *newsdna, const struct SDNA *oldsdna,
char *compflags, int oldSDNAnr, int blocks, void *data);