Cleanup: clang-format
This commit is contained in:
parent
4f1abcb06f
commit
831b85efb2
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue