diff options
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 387d10d538b..2668846284d 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -1331,7 +1331,12 @@ static int duplicate_particle_systems_exec(bContext *C, wmOperator *op) const bool duplicate_settings = RNA_boolean_get(op->ptr, "use_duplicate_settings"); Scene *scene = CTX_data_scene(C); Object *ob = ED_object_active_context(C); + /* Context pointer is only valid in the Properties Editor. */ ParticleSystem *psys = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data; + if (psys == NULL) { + psys = psys_get_current(ob); + } + copy_particle_systems_to_object( C, scene, ob, psys, ob, PAR_COPY_SPACE_OBJECT, duplicate_settings); return OPERATOR_FINISHED; |