Fluid: Removed wireframe drawtype setter for fluid domains
Fluid domains with (auto-generated) particle systems were set to wireframe drawtype automatically. This was a convenience feature that made particles visible immediately. As the auto switching is sometimes a bit annoying though this has been removed. Instead, the Quick Liquid Operator switches the viewport shading type to wireframe.
This commit is contained in:
@@ -466,6 +466,13 @@ class QuickLiquid(Operator):
|
||||
self.report({'ERROR'}, "Select at least one mesh object")
|
||||
return {'CANCELLED'}
|
||||
|
||||
# set shading type to wireframe so that liquid particles are visible
|
||||
for area in bpy.context.screen.areas:
|
||||
if area.type == 'VIEW_3D':
|
||||
for space in area.spaces:
|
||||
if space.type == 'VIEW_3D':
|
||||
space.shading.type = 'WIREFRAME'
|
||||
|
||||
for obj in mesh_objects:
|
||||
fake_context["object"] = obj
|
||||
# make each selected object a liquid flow
|
||||
|
||||
@@ -152,22 +152,6 @@ static bool rna_Fluid_parts_exists(PointerRNA *ptr, int ptype)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void rna_Fluid_draw_type_update(Main *UNUSED(bmain),
|
||||
Scene *UNUSED(scene),
|
||||
struct PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data;
|
||||
|
||||
/* Wireframe mode more convenient when particles present */
|
||||
if (settings->particle_type == 0) {
|
||||
ob->dt = OB_SOLID;
|
||||
}
|
||||
else {
|
||||
ob->dt = OB_WIRE;
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_Fluid_flip_parts_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
@@ -194,7 +178,6 @@ static void rna_Fluid_flip_parts_update(Main *bmain, Scene *scene, PointerRNA *p
|
||||
rna_Fluid_parts_delete(ptr, PART_FLUID_FLIP);
|
||||
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_FLIP;
|
||||
}
|
||||
rna_Fluid_draw_type_update(NULL, NULL, ptr);
|
||||
rna_Fluid_update(bmain, scene, ptr);
|
||||
}
|
||||
|
||||
@@ -218,7 +201,6 @@ static void rna_Fluid_spray_parts_update(Main *bmain, Scene *UNUSED(scene), Poin
|
||||
rna_Fluid_parts_delete(ptr, PART_FLUID_SPRAY);
|
||||
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_SPRAY;
|
||||
}
|
||||
rna_Fluid_draw_type_update(NULL, NULL, ptr);
|
||||
}
|
||||
|
||||
static void rna_Fluid_bubble_parts_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
||||
@@ -241,7 +223,6 @@ static void rna_Fluid_bubble_parts_update(Main *bmain, Scene *UNUSED(scene), Poi
|
||||
rna_Fluid_parts_delete(ptr, PART_FLUID_BUBBLE);
|
||||
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_BUBBLE;
|
||||
}
|
||||
rna_Fluid_draw_type_update(NULL, NULL, ptr);
|
||||
}
|
||||
|
||||
static void rna_Fluid_foam_parts_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
||||
@@ -264,7 +245,6 @@ static void rna_Fluid_foam_parts_update(Main *bmain, Scene *UNUSED(scene), Point
|
||||
rna_Fluid_parts_delete(ptr, PART_FLUID_FOAM);
|
||||
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_FOAM;
|
||||
}
|
||||
rna_Fluid_draw_type_update(NULL, NULL, ptr);
|
||||
}
|
||||
|
||||
static void rna_Fluid_tracer_parts_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
||||
@@ -287,7 +267,6 @@ static void rna_Fluid_tracer_parts_update(Main *bmain, Scene *UNUSED(scene), Poi
|
||||
rna_Fluid_parts_delete(ptr, PART_FLUID_TRACER);
|
||||
mmd->domain->particle_type &= ~FLUID_DOMAIN_PARTICLE_TRACER;
|
||||
}
|
||||
rna_Fluid_draw_type_update(NULL, NULL, ptr);
|
||||
}
|
||||
|
||||
static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
@@ -422,7 +401,6 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR
|
||||
// sanity check, should not occur
|
||||
printf("ERROR: Unexpected combined export setting encountered!");
|
||||
}
|
||||
rna_Fluid_draw_type_update(NULL, NULL, ptr);
|
||||
}
|
||||
|
||||
static void rna_Fluid_cachetype_mesh_set(struct PointerRNA *ptr, int value)
|
||||
|
||||
Reference in New Issue
Block a user