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>2019-12-17 00:58:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-12-17 00:58:43 +0300
commit831b85efb2f83927e41b938f49ae4d2d5f42d720 (patch)
tree20dc0c11d9256a1a56e77b728ac2b90cebeee777 /source
parent4f1abcb06f94be97d2e2ca44c7799fb2cdc4369c (diff)
Cleanup: clang-format
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/modifier.c4
-rw-r--r--source/blender/editors/interface/interface_templates.c9
-rw-r--r--source/blender/editors/physics/physics_fluid.c48
-rw-r--r--source/blender/makesdna/DNA_fluid_types.h7
4 files changed, 36 insertions, 32 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index f51cf2bc2b4..a784be9c645 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -108,9 +108,7 @@ void BKE_modifier_init(void)
const ModifierTypeInfo *modifierType_getInfo(ModifierType type)
{
/* type unsigned, no need to check < 0 */
- if (type < NUM_MODIFIER_TYPES && modifier_types[type] &&
- modifier_types[type]->name[0] != '\0')
- {
+ if (type < NUM_MODIFIER_TYPES && modifier_types[type] && modifier_types[type]->name[0] != '\0') {
return modifier_types[type];
}
else {
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index de37219e009..2c93f35e02a 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1820,12 +1820,9 @@ static int modifier_can_delete(ModifierData *md)
/* fluid particle modifier can't be deleted here */
if (md->type == eModifierType_ParticleSystem) {
short particle_type = ((ParticleSystemModifierData *)md)->psys->part->type;
- if (particle_type == PART_FLUID ||
- particle_type == PART_FLUID_FLIP ||
- particle_type == PART_FLUID_FOAM ||
- particle_type == PART_FLUID_SPRAY ||
- particle_type == PART_FLUID_BUBBLE ||
- particle_type == PART_FLUID_BUBBLE) {
+ if (particle_type == PART_FLUID || particle_type == PART_FLUID_FLIP ||
+ particle_type == PART_FLUID_FOAM || particle_type == PART_FLUID_SPRAY ||
+ particle_type == PART_FLUID_BUBBLE || particle_type == PART_FLUID_BUBBLE) {
return 0;
}
}
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 5c52bde7c4e..17c560bf90e 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -108,40 +108,52 @@ typedef struct FluidJob {
int *pause_frame;
} FluidJob;
-static inline bool fluid_is_bake_all(FluidJob *job) {
+static inline bool fluid_is_bake_all(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_BAKE_ALL));
}
-static inline bool fluid_is_bake_data(FluidJob *job) {
+static inline bool fluid_is_bake_data(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_BAKE_DATA));
}
-static inline bool fluid_is_bake_noise(FluidJob *job) {
+static inline bool fluid_is_bake_noise(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_BAKE_NOISE));
}
-static inline bool fluid_is_bake_mesh(FluidJob *job) {
+static inline bool fluid_is_bake_mesh(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_BAKE_MESH));
}
-static inline bool fluid_is_bake_particle(FluidJob *job) {
+static inline bool fluid_is_bake_particle(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_BAKE_PARTICLES));
}
-static inline bool fluid_is_bake_guiding(FluidJob *job) {
+static inline bool fluid_is_bake_guiding(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_BAKE_GUIDING));
}
-static inline bool fluid_is_free_all(FluidJob *job) {
+static inline bool fluid_is_free_all(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_FREE_ALL));
}
-static inline bool fluid_is_free_data(FluidJob *job) {
+static inline bool fluid_is_free_data(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_FREE_DATA));
}
-static inline bool fluid_is_free_noise(FluidJob *job) {
+static inline bool fluid_is_free_noise(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_FREE_NOISE));
}
-static inline bool fluid_is_free_mesh(FluidJob *job) {
+static inline bool fluid_is_free_mesh(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_FREE_MESH));
}
-static inline bool fluid_is_free_particles(FluidJob *job) {
+static inline bool fluid_is_free_particles(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_FREE_PARTICLES));
}
-static inline bool fluid_is_free_guiding(FluidJob *job) {
+static inline bool fluid_is_free_guiding(FluidJob *job)
+{
return (STREQ(job->type, FLUID_JOB_FREE_GUIDING));
}
@@ -338,10 +350,8 @@ static void fluid_bake_endjob(void *customdata)
* Report for ended bake and how long it took */
if (job->success) {
/* Show bake info */
- WM_reportf(RPT_INFO,
- "Fluid: %s complete! (%.2f)",
- job->name,
- PIL_check_seconds_timer() - job->start);
+ WM_reportf(
+ RPT_INFO, "Fluid: %s complete! (%.2f)", job->name, PIL_check_seconds_timer() - job->start);
}
else {
if (mds->error != NULL && mds->error[0] != '\0') {
@@ -442,10 +452,8 @@ static void fluid_free_endjob(void *customdata)
* Report for ended free job and how long it took */
if (job->success) {
/* Show free job info */
- WM_reportf(RPT_INFO,
- "Fluid: %s complete! (%.2f)",
- job->name,
- PIL_check_seconds_timer() - job->start);
+ WM_reportf(
+ RPT_INFO, "Fluid: %s complete! (%.2f)", job->name, PIL_check_seconds_timer() - job->start);
}
else {
if (mds->error != NULL && mds->error[0] != '\0') {
diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h
index f9e1487bb39..f0957d7c736 100644
--- a/source/blender/makesdna/DNA_fluid_types.h
+++ b/source/blender/makesdna/DNA_fluid_types.h
@@ -255,12 +255,13 @@ typedef struct FluidDomainSettings {
struct GPUTexture *tex_velocity_y;
struct GPUTexture *tex_velocity_z;
struct Object *guiding_parent;
- struct FluidDomainVertexVelocity *mesh_velocities; /* Vertex velocities of simulated fluid mesh. */
+ /** Vertex velocities of simulated fluid mesh. */
+ struct FluidDomainVertexVelocity *mesh_velocities;
struct EffectorWeights *effector_weights;
/* Domain object data. */
- float
- p0[3]; /* Start point of BB in local space (includes sub-cell shift for adaptive domain). */
+ float p0[3]; /* Start point of BB in local space
+ * (includes sub-cell shift for adaptive domain). */
float p1[3]; /* End point of BB in local space. */
float dp0[3]; /* Difference from object center to grid start point. */
float cell_size[3]; /* Size of simulation cell in local space. */