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:
authorMatt Ebb <matt@mke3.net>2010-06-22 06:29:52 +0400
committerMatt Ebb <matt@mke3.net>2010-06-22 06:29:52 +0400
commit1d6c2f214be060f54457d65e8afdf7df8fe93b92 (patch)
tree1a73ba062b1b8575f424c15f332d75605f88a8b7 /source/blender/editors/physics/particle_object.c
parent6a1d8d8e04f315355d46d9abf41762945f9c47fd (diff)
Timeline addition: Display cached frames
This started off doing pointcache debugging but it's also very useful for users too. Previously it was very hard to see the state of the system when you're working caches such as physics point cache - is it baked? which frames are cached? is it out of date? Now, for better feedback, cached frames are drawn for the active object at the bottom of the timeline - a semitransparent area shows the entire cache extents, and more solid blocks on top show the frames that are cached. Darker versions indicate it's using a disk cache. It can be disabled in general in the timeline View -> Caches menu, or by each individual system that can be shown. There's still a bit to do on this, behaviour needs to be clarified still eg. deciding what shows when it's out of date, or when it's been played back but not cached, etc. etc. Part of this is due to a lack of definition in the point cache system itself, so we should try and clean up/clarify this behaviour and what it means to users, at the same time. Also would be interested in extending this to other caches such as fluid cache, sequencer memory cache etc. in the future, too.
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r--source/blender/editors/physics/particle_object.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index d8ca65fa8c9..059805fdf2d 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -69,7 +69,9 @@ static int particle_system_add_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
object_add_particle_system(scene, ob, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob);
return OPERATOR_FINISHED;
}
@@ -107,7 +109,8 @@ static int particle_system_remove_exec(bContext *C, wmOperator *op)
if(scene->basact && scene->basact->object==ob)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob);
return OPERATOR_FINISHED;
}
@@ -166,7 +169,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *op)
DAG_scene_sort(scene);
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -214,7 +217,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *op)
DAG_scene_sort(scene);
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -262,7 +265,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *op)
DAG_scene_sort(scene);
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -300,7 +303,7 @@ static int target_move_up_exec(bContext *C, wmOperator *op)
BLI_insertlink(&psys->targets, pt->prev->prev, pt);
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
break;
}
}
@@ -338,7 +341,7 @@ static int target_move_down_exec(bContext *C, wmOperator *op)
BLI_insertlink(&psys->targets, pt->next, pt);
DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
break;
}
}
@@ -376,7 +379,7 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *op)
BLI_remlink(&part->dupliweights, dw);
BLI_insertlink(&part->dupliweights, dw->prev->prev, dw);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
break;
}
}
@@ -415,7 +418,7 @@ static int copy_particle_dupliob_exec(bContext *C, wmOperator *op)
dw->flag |= PART_DUPLIW_CURRENT;
BLI_addhead(&part->dupliweights, dw);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
break;
}
}
@@ -461,7 +464,7 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *op)
if(dw)
dw->flag |= PART_DUPLIW_CURRENT;
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
return OPERATOR_FINISHED;
}
@@ -498,7 +501,7 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *op)
BLI_remlink(&part->dupliweights, dw);
BLI_insertlink(&part->dupliweights, dw->next, dw);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL);
break;
}
}
@@ -590,7 +593,7 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op)
disconnect_hair(scene, ob, psys);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}
@@ -729,7 +732,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op)
connect_hair(scene, ob, psys);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
return OPERATOR_FINISHED;
}