diff options
Diffstat (limited to 'source/blender/src/buttons_object.c')
-rw-r--r-- | source/blender/src/buttons_object.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 7081e7540ac..2fe7b758eb6 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -1428,21 +1428,27 @@ static void object_panel_deflectors(Object *ob) } if(ob->pd) { + PartDeflect *pd= ob->pd; + uiBlockBeginAlign(block); + uiDefButS(block, ROW, REDRAWVIEW3D, "None", 10,160,50,20, &pd->forcefield, 1.0, 0, 0, 0, "No force"); + uiDefButS(block, ROW, REDRAWVIEW3D, "Wind", 60,160,50,20, &pd->forcefield, 1.0, PFIELD_WIND, 0, 0, "Constant force applied in direction of Object Z axis"); + uiDefButS(block, ROW, REDRAWVIEW3D, "Force field", 110,160,100,20, &pd->forcefield, 1.0, PFIELD_FORCE, 0, 0, "Object center attracts or repels particles"); + uiDefButS(block, ROW, REDRAWVIEW3D, "Vortex field", 210,160,100,20, &pd->forcefield, 1.0, PFIELD_VORTEX, 0, 0, "Particles swirl around Z-axis of the object"); - uiDefButS(block, ROW, REDRAWVIEW3D, "None", 10,160,200,20, &ob->pd->forcefield, 1.0, 0, 0, 0, "No force"); - uiDefButS(block, ROW, REDRAWVIEW3D, "Force field", 10,140,200,20, &ob->pd->forcefield, 1.0, PFIELD_FORCE, 0, 0, "Object center attracts or repels particles"); - uiDefButS(block, ROW, REDRAWVIEW3D, "Vortex field", 10,120,200,20, &ob->pd->forcefield, 1.0, PFIELD_VORTEX, 0, 0, "Particles swirl around Z-axis of the object"); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, REDRAWVIEW3D, "Strength: ", 10,130,150,20, &pd->f_strength, -1000, 1000, 1000, 0, "Strength of force field"); + uiDefButF(block, NUM, REDRAWVIEW3D, "Fall-off: ", 160,130,150,20, &pd->f_power, 0, 10, 100, 0, "Falloff power (real gravitational fallof = 2)"); + uiDefButBitS(block, TOG, PFIELD_USEMAX, REDRAWVIEW3D, "Use MaxDist", 10,110,150,20, &pd->flag, 0.0, 0, 0, 0, "Use a maximum distance for the field to work"); + uiDefButF(block, NUM, REDRAWVIEW3D, "MaxDist: ", 160,110,150,20, &pd->maxdist, 0, 1000.0, 100, 0, "Maximum distance for the field to work"); - uiDefButF(block, NUM, REDRAWVIEW3D, "Strength: ", 10,100,200,20, &ob->pd->f_strength, -1000, 1000, 1000, 0, "Strength of force field"); - uiDefButF(block, NUM, REDRAWVIEW3D, "Fall-off: ", 10,80,200,20, &ob->pd->f_power, 0, 10, 100, 0, "Falloff power (real gravitational fallof = 2)"); /* only meshes collide now */ if(ob->type==OB_MESH) { uiBlockBeginAlign(block); - uiDefButS(block, TOG|BIT|0, B_DIFF, "Deflection",10,50,200,20, &ob->pd->deflect, 0, 0, 0, 0, "Deflects particles based on collision"); - uiDefButF(block, NUM, B_DIFF, "Damping: ", 10,30,200,20, &ob->pd->pdef_damp, 0.0, 1.0, 10, 0, "Amount of damping during particle collision"); - uiDefButF(block, NUM, B_DIFF, "Rnd Damping: ", 10,10,200,20, &ob->pd->pdef_rdamp, 0.0, 1.0, 10, 0, "Random variation of damping"); - uiDefButF(block, NUM, B_DIFF, "Permeability: ", 10,-10,200,20, &ob->pd->pdef_perm, 0.0, 1.0, 10, 0, "Chance that the particle will pass through the mesh"); + uiDefButS(block, TOG|BIT|0, B_DIFF, "Deflection",10,50,200,20, &pd->deflect, 0, 0, 0, 0, "Deflects particles based on collision"); + uiDefButF(block, NUM, B_DIFF, "Damping: ", 10,30,200,20, &pd->pdef_damp, 0.0, 1.0, 10, 0, "Amount of damping during particle collision"); + uiDefButF(block, NUM, B_DIFF, "Rnd Damping: ", 10,10,200,20, &pd->pdef_rdamp, 0.0, 1.0, 10, 0, "Random variation of damping"); + uiDefButF(block, NUM, B_DIFF, "Permeability: ", 10,-10,200,20, &pd->pdef_perm, 0.0, 1.0, 10, 0, "Chance that the particle will pass through the mesh"); } uiBlockEndAlign(block); } |