Fix smoke clipping being ignored by Cycles and not being editable after baking.

The value worked in 2.7, but not with copy-on-write in 2.8.
This commit is contained in:
2019-01-24 19:44:43 +01:00
parent 7b48e04b6e
commit 6d58339973
3 changed files with 9 additions and 3 deletions

View File

@@ -96,16 +96,20 @@ class PHYSICS_PT_smoke_settings(PhysicButtonsPanel, Panel):
domain = md.domain_settings
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
flow.enabled = (not domain.point_cache.is_baked)
col = flow.column()
col.enabled = (not domain.point_cache.is_baked)
col.prop(domain, "resolution_max", text="Resolution Divisions")
col.prop(domain, "time_scale", text="Time Scale")
col.separator()
col = flow.column()
col.prop(domain, "collision_extents", text="Border Collisions")
sub = col.row()
sub.enabled = (not domain.point_cache.is_baked)
sub.prop(domain, "collision_extents", text="Border Collisions")
# This can be tweaked after baking, for render.
col.prop(domain, "clipping", text="Empty Space")
elif md.smoke_type == 'FLOW':

View File

@@ -681,6 +681,8 @@ void smokeModifier_copy(const struct SmokeModifierData *smd, struct SmokeModifie
if (sds->coba) {
tsds->coba = MEM_dupallocN(sds->coba);
}
tsds->clipping = sds->clipping;
}
else if (tsmd->flow) {
SmokeFlowSettings *tsfs = tsmd->flow;

View File

@@ -926,7 +926,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Clipping",
"Value under which voxels are considered empty space to optimize caching or rendering");
"Value under which voxels are considered empty space to optimize caching and rendering");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, NULL);
}