Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2007-11-27 01:09:57 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-11-27 01:09:57 +0300
commit7da56f4a9ba0bdd0cdcd40b8ca6e69d776d26abe (patch)
tree663c13aae5606937571ac1e7a4c77ca2866e75dd /source/blender/src/editobject.c
parent121dab1bcd9467bd8e11d0a82e83a1621758fd8e (diff)
parent770291b9ea1ec03d98b6bae4fd2a2d3f0091be41 (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/editobject.c')
-rw-r--r--source/blender/src/editobject.c59
1 files changed, 54 insertions, 5 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 3e316d578ab..995606282c3 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -80,6 +80,7 @@
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
#include "DNA_texture_types.h"
+#include "DNA_particle_types.h"
#include "DNA_property_types.h"
#include "DNA_userdef_types.h"
#include "DNA_view3d_types.h"
@@ -118,6 +119,7 @@
#include "BKE_mesh.h"
#include "BKE_nla.h"
#include "BKE_object.h"
+#include "BKE_particle.h"
#include "BKE_property.h"
#include "BKE_sca.h"
#include "BKE_scene.h"
@@ -134,6 +136,7 @@
#include "BIF_editlattice.h"
#include "BIF_editmesh.h"
#include "BIF_editoops.h"
+#include "BIF_editparticle.h"
#include "BIF_editview.h"
#include "BIF_editarmature.h"
#include "BIF_gl.h"
@@ -183,11 +186,22 @@
/* --------------------------------- */
+void exit_paint_modes(void)
+{
+ if(G.f & G_VERTEXPAINT) set_vpaint();
+ if(G.f & G_TEXTUREPAINT) set_texturepaint();
+ if(G.f & G_WEIGHTPAINT) set_wpaint();
+ if(G.f & G_SCULPTMODE) set_sculptmode();
+ if(G.f & G_PARTICLEEDIT) PE_set_particle_edit();
+
+ G.f &= ~(G_VERTEXPAINT+G_TEXTUREPAINT+G_WEIGHTPAINT+G_SCULPTMODE+G_PARTICLEEDIT);
+}
+
void add_object_draw(int type) /* for toolbox or menus, only non-editmode stuff */
{
Object *ob;
- G.f &= ~(G_VERTEXPAINT+G_TEXTUREPAINT+G_WEIGHTPAINT+G_SCULPTMODE);
+ exit_paint_modes();
setcursor_space(SPACE_VIEW3D, CURSOR_STD);
if ELEM3(curarea->spacetype, SPACE_VIEW3D, SPACE_BUTS, SPACE_INFO) {
@@ -262,8 +276,6 @@ void delete_obj(int ok)
if(G.obedit) return;
if(G.scene->id.lib) return;
- if(G.f & G_SCULPTMODE) set_sculptmode();
-
base= FIRSTBASE;
while(base) {
Base *nbase= base->next;
@@ -280,6 +292,8 @@ void delete_obj(int ok)
}
}
+ exit_paint_modes();
+
if(base->object->type==OB_LAMP) islamp= 1;
#ifdef WITH_VERSE
if(base->object->vnode) b_verse_delete_object(base->object);
@@ -307,7 +321,6 @@ void delete_obj(int ok)
}
countall();
- G.f &= ~(G_VERTEXPAINT+G_TEXTUREPAINT+G_WEIGHTPAINT);
setcursor_space(SPACE_VIEW3D, CURSOR_STD);
if(islamp) reshadeall_displist(); /* only frees displist */
@@ -2275,6 +2288,39 @@ void special_editmenu(void)
pose_adds_vgroups(ob, (nr == 2));
}
}
+ else if(G.f & G_PARTICLEEDIT) {
+ ParticleSystem *psys = PE_get_current(ob);
+ ParticleEditSettings *pset = PE_settings();
+
+ if(!psys)
+ return;
+
+ if(G.scene->selectmode & SCE_SELECT_POINT)
+ nr= pupmenu("Specials%t|Rekey%x1|Subdivide%x2|Select First%x3|Select Last%x4");
+ else
+ nr= pupmenu("Specials%t|Rekey%x1");
+
+ switch(nr) {
+ case 1:
+ if(button(&pset->totrekey, 2, 100, "Number of Keys:")==0) return;
+ waitcursor(1);
+ PE_rekey();
+ break;
+ case 2:
+ PE_subdivide();
+ break;
+ case 3:
+ PE_select_root();
+ break;
+ case 4:
+ PE_select_tip();
+ break;
+ }
+
+ DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
+
+ if(nr>0) waitcursor(0);
+ }
else {
Base *base, *base_select= NULL;
@@ -5351,7 +5397,10 @@ void mirrormenu(void)
short mode = 0;
- if (G.obedit==0) {
+ if(G.f & G_PARTICLEEDIT) {
+ PE_mirror_x(0);
+ }
+ else if (G.obedit==0) {
mode=pupmenu("Mirror Axis %t|X Local%x4|Y Local%x5|Z Local%x6|");
if (mode==-1) return; /* return */