forked from bartvdbraak/blender
Fix #20803: convert button in particle modifier didn't work
for creating duplis yet.
This commit is contained in:
parent
50e324c5d0
commit
5fe3524ab1
@ -797,8 +797,10 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
|
|||||||
if (md->type==eModifierType_ParticleSystem) {
|
if (md->type==eModifierType_ParticleSystem) {
|
||||||
ParticleSystem *psys= ((ParticleSystemModifierData *)md)->psys;
|
ParticleSystem *psys= ((ParticleSystemModifierData *)md)->psys;
|
||||||
|
|
||||||
if (!(ob->mode & OB_MODE_PARTICLE_EDIT)) {
|
if (!(ob->mode & OB_MODE_PARTICLE_EDIT) && psys->pathcache) {
|
||||||
if(ELEM3(psys->part->ren_as, PART_DRAW_PATH, PART_DRAW_GR, PART_DRAW_OB) && psys->pathcache)
|
if(ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB))
|
||||||
|
uiItemO(row, "Convert", 0, "OBJECT_OT_duplicates_make_real");
|
||||||
|
else if(psys->part->ren_as == PART_DRAW_PATH)
|
||||||
uiItemO(row, "Convert", 0, "OBJECT_OT_modifier_convert");
|
uiItemO(row, "Convert", 0, "OBJECT_OT_modifier_convert");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1152,7 +1152,6 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
|
|||||||
ot->idname= "OBJECT_OT_duplicates_make_real";
|
ot->idname= "OBJECT_OT_duplicates_make_real";
|
||||||
|
|
||||||
/* api callbacks */
|
/* api callbacks */
|
||||||
ot->invoke= WM_operator_confirm;
|
|
||||||
ot->exec= object_duplicates_make_real_exec;
|
ot->exec= object_duplicates_make_real_exec;
|
||||||
|
|
||||||
ot->poll= ED_operator_scene_editable;
|
ot->poll= ED_operator_scene_editable;
|
||||||
|
@ -265,10 +265,6 @@ int ED_object_modifier_convert(ReportList *reports, Scene *scene, Object *ob, Mo
|
|||||||
psys=((ParticleSystemModifierData *)md)->psys;
|
psys=((ParticleSystemModifierData *)md)->psys;
|
||||||
part= psys->part;
|
part= psys->part;
|
||||||
|
|
||||||
if(part->ren_as == PART_DRAW_GR || part->ren_as == PART_DRAW_OB) {
|
|
||||||
; // XXX make_object_duplilist_real(NULL);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(part->ren_as != PART_DRAW_PATH || psys->pathcache == 0)
|
if(part->ren_as != PART_DRAW_PATH || psys->pathcache == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -339,7 +335,6 @@ int ED_object_modifier_convert(ReportList *reports, Scene *scene, Object *ob, Mo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
DAG_scene_sort(scene);
|
DAG_scene_sort(scene);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user