diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index b350956047c..28b96f3b08b 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -131,13 +131,23 @@ static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *UN { Scene *scene= CTX_data_scene(C); Object *ob= (scene->basact)? scene->basact->object: NULL; +#if 0 PTCacheEdit *edit = PE_get_current(scene, ob); - - if(edit && edit->psys) { - if(edit->psys->flag & PSYS_GLOBAL_HAIR) + ParticleSystem *psys= edit ? edit->psys : NULL; +#else + /* use this rather than PE_get_current() - because the editing cache is + * dependant on the cache being updated which can happen after this UI + * draws causing a glitch [#28883] */ + ParticleSystem *psys= psys_get_current(ob); +#endif + + if(psys) { + if(psys->flag & PSYS_GLOBAL_HAIR) { return particle_edit_disconnected_hair_brush_items; - else + } + else { return particle_edit_hair_brush_items; + } } return particle_edit_cache_brush_items; |