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
path: root/source
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-04-30 05:22:21 +0400
committerMatt Ebb <matt@mke3.net>2010-04-30 05:22:21 +0400
commit53dbc1efdfe26a6a4a6097559b8f65ffba92af48 (patch)
tree25c2516068a1ce91e9a35cdb4c779a2af00380df /source
parent12a7c8f699ed5ddaa76930606ef1f43d5d38f498 (diff)
Fix [#22207] Selecting Roots also selects hidden
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/physics/particle_edit.c27
-rw-r--r--source/blender/editors/physics/physics_intern.h4
-rw-r--r--source/blender/editors/physics/physics_ops.c4
3 files changed, 21 insertions, 14 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index c298ccc2f5c..6ec744ad027 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -1380,11 +1380,14 @@ int PE_mouse_particles(bContext *C, short *mval, int extend)
static void select_root(PEData *data, int point_index)
{
+ if (data->edit->points[point_index].flag & PEP_HIDE)
+ return;
+
data->edit->points[point_index].keys->flag |= PEK_SELECT;
data->edit->points[point_index].flag |= PEP_EDIT_RECALC; /* redraw selection only */
}
-static int select_first_exec(bContext *C, wmOperator *op)
+static int select_roots_exec(bContext *C, wmOperator *op)
{
PEData data;
@@ -1397,14 +1400,14 @@ static int select_first_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void PARTICLE_OT_select_first(wmOperatorType *ot)
+void PARTICLE_OT_select_roots(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select First";
- ot->idname= "PARTICLE_OT_select_first";
+ ot->name= "Select Roots";
+ ot->idname= "PARTICLE_OT_select_roots";
/* api callbacks */
- ot->exec= select_first_exec;
+ ot->exec= select_roots_exec;
ot->poll= PE_poll;
/* flags */
@@ -1416,11 +1419,15 @@ void PARTICLE_OT_select_first(wmOperatorType *ot)
static void select_tip(PEData *data, int point_index)
{
PTCacheEditPoint *point = data->edit->points + point_index;
+
+ if (point->flag & PEP_HIDE)
+ return;
+
point->keys[point->totkey - 1].flag |= PEK_SELECT;
point->flag |= PEP_EDIT_RECALC; /* redraw selection only */
}
-static int select_last_exec(bContext *C, wmOperator *op)
+static int select_tips_exec(bContext *C, wmOperator *op)
{
PEData data;
@@ -1433,14 +1440,14 @@ static int select_last_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void PARTICLE_OT_select_last(wmOperatorType *ot)
+void PARTICLE_OT_select_tips(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select Last";
- ot->idname= "PARTICLE_OT_select_last";
+ ot->name= "Select Tips";
+ ot->idname= "PARTICLE_OT_select_tips";
/* api callbacks */
- ot->exec= select_last_exec;
+ ot->exec= select_tips_exec;
ot->poll= PE_poll;
/* flags */
diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h
index aa3a2e22e31..b3d11810c43 100644
--- a/source/blender/editors/physics/physics_intern.h
+++ b/source/blender/editors/physics/physics_intern.h
@@ -37,8 +37,8 @@ struct wmOperatorType;
/* particle_edit.c */
void PARTICLE_OT_select_all(struct wmOperatorType *ot);
-void PARTICLE_OT_select_first(struct wmOperatorType *ot);
-void PARTICLE_OT_select_last(struct wmOperatorType *ot);
+void PARTICLE_OT_select_roots(struct wmOperatorType *ot);
+void PARTICLE_OT_select_tips(struct wmOperatorType *ot);
void PARTICLE_OT_select_linked(struct wmOperatorType *ot);
void PARTICLE_OT_select_less(struct wmOperatorType *ot);
void PARTICLE_OT_select_more(struct wmOperatorType *ot);
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
index 4bdac8ff3e8..5a51c36cd09 100644
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@ -43,8 +43,8 @@
static void operatortypes_particle(void)
{
WM_operatortype_append(PARTICLE_OT_select_all);
- WM_operatortype_append(PARTICLE_OT_select_first);
- WM_operatortype_append(PARTICLE_OT_select_last);
+ WM_operatortype_append(PARTICLE_OT_select_roots);
+ WM_operatortype_append(PARTICLE_OT_select_tips);
WM_operatortype_append(PARTICLE_OT_select_linked);
WM_operatortype_append(PARTICLE_OT_select_less);
WM_operatortype_append(PARTICLE_OT_select_more);