forked from bartvdbraak/blender
Minor particle system fixes:
- Changed some tooltips. - Refresh with reactors and shared particle settings. - Copying of child particles.
This commit is contained in:
parent
d1e1332e07
commit
7806a44134
@ -1056,6 +1056,7 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
|
||||
psysn->effectors.first= psysn->effectors.last= 0;
|
||||
|
||||
psysn->pathcachebufs.first = psysn->pathcachebufs.last = NULL;
|
||||
psysn->childcachebufs.first = psysn->childcachebufs.last = NULL;
|
||||
psysn->reactevents.first = psysn->reactevents.last = NULL;
|
||||
psysn->renderdata = NULL;
|
||||
|
||||
|
@ -3013,9 +3013,14 @@ void do_effects_panels(unsigned short event)
|
||||
case B_PART_INIT_CHILD:
|
||||
case B_PART_RECALC_CHILD:
|
||||
if(psys) {
|
||||
Base *base;
|
||||
Object *bob;
|
||||
ParticleSystem *bpsys;
|
||||
int flush;
|
||||
|
||||
nr=0;
|
||||
for(psys=ob->particlesystem.first; psys; psys=psys->next){
|
||||
if(ELEM(psys->part->draw_as,PART_DRAW_OB,PART_DRAW_GR))
|
||||
for(bpsys=ob->particlesystem.first; bpsys; bpsys=bpsys->next){
|
||||
if(ELEM(bpsys->part->draw_as,PART_DRAW_OB,PART_DRAW_GR))
|
||||
nr++;
|
||||
}
|
||||
if(nr)
|
||||
@ -3023,6 +3028,21 @@ void do_effects_panels(unsigned short event)
|
||||
else
|
||||
ob->transflag &= ~OB_DUPLIPARTS;
|
||||
|
||||
if(psys->part->type==PART_REACTOR)
|
||||
if(psys->target_ob)
|
||||
DAG_object_flush_update(G.scene, psys->target_ob, OB_RECALC_DATA);
|
||||
|
||||
for(base = G.scene->base.first; base; base= base->next) {
|
||||
bob= base->object;
|
||||
flush= 0;
|
||||
for(bpsys=bob->particlesystem.first; bpsys; bpsys=bpsys->next)
|
||||
if(bpsys->part==psys->part)
|
||||
flush= 1;
|
||||
|
||||
if(flush)
|
||||
DAG_object_flush_update(G.scene, bob, OB_RECALC_DATA);
|
||||
}
|
||||
|
||||
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWBUTSOBJECT, 0);
|
||||
|
@ -3288,7 +3288,7 @@ static void material_panel_map_to(Object *ob, Material *ma, int from_nodes)
|
||||
//uiButSetFunc(but, particle_recalc_material, ma, NULL);
|
||||
but=uiDefButBitS(block, TOG3, MAP_PA_KINK, B_MAT_PARTICLE, "Kink", 70,160,60,19, &(mtex->pmapto), 0, 0, 0, 0, "Causes the texture to affect the kink of child particles");
|
||||
//uiButSetFunc(but, particle_recalc_material, ma, NULL);
|
||||
but=uiDefButBitS(block, TOG3, MAP_PA_LENGTH, B_MAT_PARTICLE, "Length",130,160,60,19, &(mtex->pmapto), 0, 0, 0, 0, "Causes the texture to affect the length of particles");
|
||||
but=uiDefButBitS(block, TOG3, MAP_PA_LENGTH, B_MAT_PARTICLE, "Length",130,160,60,19, &(mtex->pmapto), 0, 0, 0, 0, "Causes the texture to affect the length of child particles");
|
||||
//uiButSetFunc(but, particle_recalc_material, ma, NULL);
|
||||
but=uiDefButBitS(block, TOG3, MAP_PA_CLUMP, B_MAT_PARTICLE, "Clump", 190,160,60,19, &(mtex->pmapto), 0, 0, 0, 0, "Causes the texture to affect the clump of child particles");
|
||||
//uiButSetFunc(but, particle_recalc_material, ma, NULL);
|
||||
|
@ -5727,11 +5727,11 @@ void view3d_buttons(void)
|
||||
}
|
||||
else if(G.f & G_PARTICLEEDIT) {
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefIconButBitS(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Path edit mode (Ctrl Tab 1)");
|
||||
uiDefIconButBitS(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Path edit mode");
|
||||
xco+= XIC;
|
||||
uiDefIconButBitS(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Point select mode (Ctrl Tab 2)");
|
||||
uiDefIconButBitS(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Point select mode");
|
||||
xco+= XIC;
|
||||
uiDefIconButBitS(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Tip select mode (Ctrl Tab 3)");
|
||||
uiDefIconButBitS(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Tip select mode");
|
||||
xco+= XIC;
|
||||
uiBlockEndAlign(block);
|
||||
if(G.vd->drawtype > OB_WIRE) {
|
||||
|
Loading…
Reference in New Issue
Block a user