diff options
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/dynamicpaint_ops.c | 4 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 9 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 16 |
4 files changed, 15 insertions, 20 deletions
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 1ce90849a88..41238eb171b 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -405,7 +405,7 @@ static void dynamicPaint_bakeImageSequence(DynamicPaintBakeJob *job) /* primary output layer */ if (surface->flags & MOD_DPAINT_OUT1) { /* set filepath */ - BLI_join_dirfile( + BLI_path_join( filepath, sizeof(filepath), surface->image_output_path, surface->output_name); BLI_path_frame(filepath, frame, 4); @@ -415,7 +415,7 @@ static void dynamicPaint_bakeImageSequence(DynamicPaintBakeJob *job) /* secondary output */ if (surface->flags & MOD_DPAINT_OUT2 && surface->type == MOD_DPAINT_SURFACE_T_PAINT) { /* set filepath */ - BLI_join_dirfile( + BLI_path_join( filepath, sizeof(filepath), surface->image_output_path, surface->output_name2); BLI_path_frame(filepath, frame, 4); diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 761a6702c6f..e6d0aca7902 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3533,7 +3533,7 @@ static void PE_mirror_x(Depsgraph *depsgraph, Scene *scene, Object *ob, int tagg } const bool use_dm_final_indices = (psys->part->use_modifier_stack && - !psmd_eval->mesh_final->runtime.deformed_only); + !BKE_mesh_is_deformed_only(psmd_eval->mesh_final)); /* NOTE: this is not nice to use tessfaces but hard to avoid since pa->num uses tessfaces */ BKE_mesh_tessface_ensure(me); @@ -4353,7 +4353,7 @@ static void brush_add_count_iter(void *__restrict iter_data_v, 0, 0, 0)) { - if (psys->part->use_modifier_stack && !psmd_eval->mesh_final->runtime.deformed_only) { + if (psys->part->use_modifier_stack && !BKE_mesh_is_deformed_only(psmd_eval->mesh_final)) { add_pars[iter].num = add_pars[iter].num_dmcache; add_pars[iter].num_dmcache = DMCACHE_ISCHILD; } @@ -4430,7 +4430,7 @@ static int brush_add(const bContext *C, PEData *data, short number) timestep = psys_get_timestep(&sim); - if (psys->part->use_modifier_stack || psmd_eval->mesh_final->runtime.deformed_only) { + if (psys->part->use_modifier_stack || BKE_mesh_is_deformed_only(psmd_eval->mesh_final)) { mesh = psmd_eval->mesh_final; } else { diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 08db03db0e9..210757173eb 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -732,7 +732,7 @@ static bool remap_hair_emitter(Depsgraph *depsgraph, invert_m4_m4(to_imat, to_mat); const bool use_dm_final_indices = (target_psys->part->use_modifier_stack && - !target_psmd->mesh_final->runtime.deformed_only); + !BKE_mesh_is_deformed_only(target_psmd->mesh_final)); if (use_dm_final_indices || !target_psmd->mesh_original) { mesh = target_psmd->mesh_final; @@ -1204,9 +1204,7 @@ static bool copy_particle_systems_to_object(const bContext *C, #undef PSYS_FROM_FIRST #undef PSYS_FROM_NEXT - if (duplicate_settings) { - DEG_relations_tag_update(bmain); - } + DEG_relations_tag_update(bmain); DEG_id_tag_update(&ob_to->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, ob_to); return true; @@ -1269,8 +1267,7 @@ static int copy_particle_systems_exec(bContext *C, wmOperator *op) CTX_DATA_END; if (changed_tot > 0) { - Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); - DEG_graph_tag_relations_update(depsgraph); + DEG_relations_tag_update(CTX_data_main(C)); } if ((changed_tot == 0 && fail == 0) || fail) { diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 07e8f5c5743..314796e96e4 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -368,7 +368,7 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, BKE_spacedata_draw_locks(true); if (fluid_is_bake_noise(job) || fluid_is_bake_all(job)) { - BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_NOISE, NULL); + BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_NOISE); BLI_path_abs(temp_dir, relbase); BLI_dir_create_recursive(temp_dir); /* Create 'noise' subdir if it does not exist already */ fds->cache_flag &= ~(FLUID_DOMAIN_BAKED_NOISE | FLUID_DOMAIN_OUTDATED_NOISE); @@ -376,7 +376,7 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, job->pause_frame = &fds->cache_frame_pause_noise; } if (fluid_is_bake_mesh(job) || fluid_is_bake_all(job)) { - BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_MESH, NULL); + BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_MESH); BLI_path_abs(temp_dir, relbase); BLI_dir_create_recursive(temp_dir); /* Create 'mesh' subdir if it does not exist already */ fds->cache_flag &= ~(FLUID_DOMAIN_BAKED_MESH | FLUID_DOMAIN_OUTDATED_MESH); @@ -384,8 +384,7 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, job->pause_frame = &fds->cache_frame_pause_mesh; } if (fluid_is_bake_particle(job) || fluid_is_bake_all(job)) { - BLI_path_join( - temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_PARTICLES, NULL); + BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_PARTICLES); BLI_path_abs(temp_dir, relbase); /* Create 'particles' subdir if it does not exist already */ @@ -396,7 +395,7 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, job->pause_frame = &fds->cache_frame_pause_particles; } if (fluid_is_bake_guiding(job) || fluid_is_bake_all(job)) { - BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_GUIDE, NULL); + BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_GUIDE); BLI_path_abs(temp_dir, relbase); BLI_dir_create_recursive(temp_dir); /* Create 'guiding' subdir if it does not exist already */ fds->cache_flag &= ~(FLUID_DOMAIN_BAKED_GUIDE | FLUID_DOMAIN_OUTDATED_GUIDE); @@ -404,11 +403,11 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, job->pause_frame = &fds->cache_frame_pause_guide; } if (fluid_is_bake_data(job) || fluid_is_bake_all(job)) { - BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_CONFIG, NULL); + BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_CONFIG); BLI_path_abs(temp_dir, relbase); BLI_dir_create_recursive(temp_dir); /* Create 'config' subdir if it does not exist already */ - BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_DATA, NULL); + BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_DATA); BLI_path_abs(temp_dir, relbase); BLI_dir_create_recursive(temp_dir); /* Create 'data' subdir if it does not exist already */ fds->cache_flag &= ~(FLUID_DOMAIN_BAKED_DATA | FLUID_DOMAIN_OUTDATED_DATA); @@ -416,8 +415,7 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, job->pause_frame = &fds->cache_frame_pause_data; if (fds->flags & FLUID_DOMAIN_EXPORT_MANTA_SCRIPT) { - BLI_path_join( - temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_SCRIPT, NULL); + BLI_path_join(temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_SCRIPT); BLI_path_abs(temp_dir, relbase); BLI_dir_create_recursive(temp_dir); /* Create 'script' subdir if it does not exist already */ } |