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:
authorTon Roosendaal <ton@blender.org>2004-06-26 22:18:11 +0400
committerTon Roosendaal <ton@blender.org>2004-06-26 22:18:11 +0400
commite750478ce3ed4427a468ec77513a60916b9cf9e4 (patch)
treef73e5bae5e23b83ced64347bd0077eef95389f32 /source/blender/src/editipo.c
parent263d0823d3fb28088dd5e0042deb7f27676a125c (diff)
The revised patch from Leon for new particle effects.
New is that objects can have a force field, and Meshes can even deflect (collide) particles. This is in a new sub-menu in Object buttons F7 The full instructions where on the web, Leon mailed it me and I will put it in CMS tomorrow. For those who like to play with it now, here are demo files: http://download.blender.org/demo/test/ Quite some changes where in the integration though... so previous created particle deflectors will not work. Changes to mention now are: - gravity is renamed to 'force field' - force field and deflector options are in Object now, not in Mesh - the options also have its own struct, doesnt add to Object by default - force fields are possible for all object types, but only work on center. So empty objects are typical for it. Work to do: - add draw method in 3d win to denote forcefield objects - check on the UI (panel with different size?) - add 'recalc' button in deflector panel
Diffstat (limited to 'source/blender/src/editipo.c')
-rw-r--r--source/blender/src/editipo.c50
1 files changed, 46 insertions, 4 deletions
diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c
index ae62978c63c..1a2af081914 100644
--- a/source/blender/src/editipo.c
+++ b/source/blender/src/editipo.c
@@ -236,6 +236,21 @@ void getname_ob_ei(int nr, char *str, int colipo)
case OB_COL_A:
strcpy(str, "ColA");
break;
+ case OB_PD_FSTR:
+ strcpy(str, "FStreng");
+ break;
+ case OB_PD_FFALL:
+ strcpy(str, "FFall");
+ break;
+ case OB_PD_SDAMP:
+ strcpy(str, "Damping");
+ break;
+ case OB_PD_RDAMP:
+ strcpy(str, "RDamp");
+ break;
+ case OB_PD_PERM:
+ strcpy(str, "Perm");
+ break;
default:
str[0]= 0;
}
@@ -3789,13 +3804,40 @@ void common_insertkey()
insertkey(id, map+MAP_SIZE_Y);
insertkey(id, map+MAP_SIZE_Z);
}
-
+
}
}
}
- else if(G.buts->mainb==CONTEXT_EDITING) {
- ob= OBACT;
- if(ob && ob->type==OB_CAMERA) {
+ else if(G.buts->mainb==CONTEXT_OBJECT) {
+ int tab= G.buts->tab[CONTEXT_OBJECT];
+ if(tab==TAB_OBJECT_EFFECTS) {
+ ob= OBACT;
+ if(ob && ob->type==OB_MESH) {
+ id= (ID *) (ob);
+ if(id) {
+ event= pupmenu("Insert Key %t|Surface Damping%x0|Random Damping%x1|Permeability%x2|Force Strength%x3|Force Falloff%x4");
+ if(event== -1) return;
+
+ if(event==0) {
+ insertkey(id, OB_PD_SDAMP);
+ }
+ if(event==1) {
+ insertkey(id, OB_PD_RDAMP);
+ }
+ if(event==2) {
+ insertkey(id, OB_PD_PERM);
+ }
+ if(event==3) {
+ insertkey(id, OB_PD_FSTR);
+ }
+ if(event==4) {
+ insertkey(id, OB_PD_FFALL);
+ }
+
+ }
+ }
+ }
+ else if(ob && ob->type==OB_CAMERA) {
id= G.buts->lockpoin;
if(id) {
event= pupmenu("Insert Key %t|Lens%x0|Clipping%x1");