From 63d96b8ca06440ee74bec7636ef7b88f6ec5b676 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Tue, 9 Mar 2010 03:42:20 +0000 Subject: Fix for: [#20937] Add brush doesnt work when disconnected hair option is enabled. Really not much to fix, since it's just not supposed to work. Removed the non-working brushes (add and puff) from the brush list while hair is disconnected. --- source/blender/editors/physics/particle_object.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/physics/particle_object.c') diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index d72357a38b1..0a2c8a5b4a7 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -526,6 +526,7 @@ void PARTICLE_OT_dupliob_move_down(wmOperatorType *ot) static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) { ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys); + ParticleEditSettings *pset= PE_settings(scene); ParticleData *pa; PTCacheEdit *edit; PTCacheEditPoint *point; @@ -565,6 +566,9 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) psys->flag |= PSYS_GLOBAL_HAIR; + if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_PUFF)) + pset->brushtype = PE_BRUSH_NONE; + PE_update_object(scene, ob, 0); } -- cgit v1.2.3 From 42ac4a3e7d118ce4bc86e2b5152db64829c9ec1c Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Sun, 21 Mar 2010 01:14:04 +0000 Subject: Fix syntax for ID keyword. --- source/blender/editors/physics/particle_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/physics/particle_object.c') diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 0a2c8a5b4a7..049f09f9901 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -1,5 +1,5 @@ /** - * $Id: + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * -- cgit v1.2.3 From f743b583bf6e44bbaea59ff811623a6916a92b47 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 Mar 2010 14:09:09 +0000 Subject: more lint includes Only source/blender/editors/ dir, should not give errors on different platforms Only removing: UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h --- source/blender/editors/physics/particle_object.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'source/blender/editors/physics/particle_object.c') diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 049f09f9901..d8ca65fa8c9 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -32,10 +32,7 @@ #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" -#include "DNA_object_types.h" -#include "DNA_particle_types.h" #include "DNA_scene_types.h" -#include "DNA_windowmanager_types.h" #include "BLI_math.h" #include "BLI_listbase.h" -- cgit v1.2.3 From 1d6c2f214be060f54457d65e8afdf7df8fe93b92 Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Tue, 22 Jun 2010 02:29:52 +0000 Subject: 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. --- source/blender/editors/physics/particle_object.c | 29 +++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'source/blender/editors/physics/particle_object.c') 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; } -- cgit v1.2.3