diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-11-27 01:09:57 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-11-27 01:09:57 +0300 |
commit | 7da56f4a9ba0bdd0cdcd40b8ca6e69d776d26abe (patch) | |
tree | 663c13aae5606937571ac1e7a4c77ca2866e75dd /source/blender/src/drawview.c | |
parent | 121dab1bcd9467bd8e11d0a82e83a1621758fd8e (diff) | |
parent | 770291b9ea1ec03d98b6bae4fd2a2d3f0091be41 (diff) |
Particles
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
Diffstat (limited to 'source/blender/src/drawview.c')
-rw-r--r-- | source/blender/src/drawview.c | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 5ae9c43987c..c00c3ddf157 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -71,6 +71,7 @@ #include "DNA_meshdata_types.h" #include "DNA_meta_types.h" #include "DNA_object_types.h" +#include "DNA_particle_types.h" #include "DNA_screen_types.h" #include "DNA_scene_types.h" #include "DNA_space_types.h" @@ -101,6 +102,7 @@ #include "BKE_main.h" #include "BKE_mesh.h" #include "BKE_object.h" +#include "BKE_particle.h" #include "BKE_scene.h" #include "BKE_texture.h" #include "BKE_utildefines.h" @@ -110,6 +112,7 @@ #include "BIF_editgroup.h" #include "BIF_editarmature.h" #include "BIF_editmesh.h" +#include "BIF_editparticle.h" #include "BIF_gl.h" #include "BIF_glutil.h" #include "BIF_interface.h" @@ -2224,7 +2227,6 @@ void do_viewbuts(unsigned short event) } } - static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT { uiBlock *block; @@ -2245,8 +2247,16 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl); uiSetPanelHandler(VIEW3D_HANDLER_OBJECT); // for close and esc - if(!uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 318, 204)) - return; + if((G.f & G_SCULPTMODE) && !G.obedit) { + if(!uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 425, 234)) + return; + } else if(G.f & G_PARTICLEEDIT && !G.obedit){ + if(!uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 318, 234)) + return; + } else { + if(!uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 318, 204)) + return; + } uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); @@ -2262,16 +2272,18 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT uiButSetFunc(bt, test_idbutton_cb, ob->id.name, NULL); #endif - uiBlockBeginAlign(block); - uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_OBJECTPANELPARENT, "Par:", 160, 180, 140, 20, &ob->parent, "Parent Object"); - if((ob->parent) && (ob->partype == PARBONE)) { - bt= uiDefBut(block, TEX, B_OBJECTPANELPARENT, "ParBone:", 160, 160, 140, 20, ob->parsubstr, 0, 30, 0, 0, ""); - uiButSetCompleteFunc(bt, autocomplete_bone, (void *)ob->parent); - } - else { - strcpy(ob->parsubstr, ""); + if((G.f & G_PARTICLEEDIT)==0) { + uiBlockBeginAlign(block); + uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_OBJECTPANELPARENT, "Par:", 160, 180, 140, 20, &ob->parent, "Parent Object"); + if((ob->parent) && (ob->partype == PARBONE)) { + bt= uiDefBut(block, TEX, B_OBJECTPANELPARENT, "ParBone:", 160, 160, 140, 20, ob->parsubstr, 0, 30, 0, 0, ""); + uiButSetCompleteFunc(bt, autocomplete_bone, (void *)ob->parent); + } + else { + strcpy(ob->parsubstr, ""); + } + uiBlockEndAlign(block); } - uiBlockEndAlign(block); } lim= 10000.0f*MAX2(1.0, G.vd->grid); @@ -2305,6 +2317,9 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT else if(G.f & G_SCULPTMODE) { uiNewPanelTitle(block, "Sculpt Properties"); sculptmode_draw_interface_tools(block,10,150); + } else if(G.f & G_PARTICLEEDIT){ + uiNewPanelTitle(block, "Particle Edit Properties"); + particle_edit_buttons(block); } else { BoundBox *bb = NULL; @@ -2771,6 +2786,7 @@ void drawview3dspace(ScrArea *sa, void *spacedata) for(SETLOOPER(G.scene->set, base)) object_handle_update(base->object); // bke_object.h } + for(base= G.scene->base.first; base; base= base->next) object_handle_update(base->object); // bke_object.h @@ -2906,7 +2922,8 @@ void drawview3dspace(ScrArea *sa, void *spacedata) if(G.moving) { BIF_drawConstraint(); - if(G.obedit) BIF_drawPropCircle(); // only editmode has proportional edit + if(G.obedit || (G.f & G_PARTICLEEDIT)) + BIF_drawPropCircle(); // only editmode and particles have proportional edit BIF_drawSnap(); } @@ -3008,6 +3025,17 @@ void drawview3dspace(ScrArea *sa, void *spacedata) } retopo_draw_paint_lines(); + if(!G.obedit && OBACT && G.f&G_PARTICLEEDIT && area_is_active_area(v3d->area)){ + ParticleSystem *psys = PE_get_current(OBACT); + ParticleEditSettings *pset = PE_settings(); + + short c[2]; + if(psys && psys->edit && pset->brushtype>=0){ + getmouseco_areawin(c); + fdrawXORcirc((float)c[0], (float)c[1], (float)pset->brush[pset->brushtype].size); + } + } + if(v3d->persp>1) drawviewborder(); if(v3d->flag2 & V3D_FLYMODE) drawviewborder_flymode(); if(!(G.f & G_PLAYANIM)) drawcursor(v3d); |