Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/smoke.c
| Show First 20 Lines • Show All 3,346 Lines • ▼ Show 20 Lines | if ((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) { | ||||
| BLI_rw_mutex_unlock(smd->domain->fluid_mutex); | BLI_rw_mutex_unlock(smd->domain->fluid_mutex); | ||||
| } | } | ||||
| /* return generated geometry for adaptive domain */ | /* return generated geometry for adaptive domain */ | ||||
| Mesh *result; | Mesh *result; | ||||
| if (smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && | if (smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && | ||||
| smd->domain->flags & MOD_SMOKE_ADAPTIVE_DOMAIN && smd->domain->base_res[0]) { | smd->domain->flags & MOD_SMOKE_ADAPTIVE_DOMAIN && smd->domain->base_res[0]) { | ||||
| result = createDomainGeometry(smd->domain, ob); | result = createDomainGeometry(smd->domain, ob); | ||||
| BKE_mesh_copy_settings(result, me); | |||||
| } | } | ||||
| else { | else { | ||||
| result = BKE_mesh_copy_for_eval(me, false); | result = BKE_mesh_copy_for_eval(me, false); | ||||
| } | } | ||||
| /* XXX This is really not a nice hack, but until root of the problem is understood, | |||||
| * this should be an acceptable workaround I think. | /* Smoke simulation needs a texture space relative to the adaptive domain bounds, not the | ||||
| * See T58492 for details on the issue. */ | * original mesh. So recompute it at this point in the modifier stack. See T58492. */ | ||||
| result->texflag |= ME_AUTOSPACE; | BKE_mesh_texspace_calc(result); | ||||
| return result; | return result; | ||||
| } | } | ||||
| static float calc_voxel_transp( | static float calc_voxel_transp( | ||||
| float *result, float *input, int res[3], int *pixel, float *tRay, float correct) | float *result, float *input, int res[3], int *pixel, float *tRay, float correct) | ||||
| { | { | ||||
| const size_t index = smoke_get_index(pixel[0], res[0], pixel[1], res[1], pixel[2]); | const size_t index = smoke_get_index(pixel[0], res[0], pixel[1], res[1], pixel[2]); | ||||
| ▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines | |||||