diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-12-17 00:58:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-12-17 00:58:43 +0300 |
commit | 831b85efb2f83927e41b938f49ae4d2d5f42d720 (patch) | |
tree | 20dc0c11d9256a1a56e77b728ac2b90cebeee777 /source/blender/editors | |
parent | 4f1abcb06f94be97d2e2ca44c7799fb2cdc4369c (diff) |
Cleanup: clang-format
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 9 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 48 |
2 files changed, 31 insertions, 26 deletions
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') { |