[Bf-blender-cvs] [95d6c01] master: Fix T40756 Select Linked by Particle System matches ignores selected psys.

Lukas Tönne noreply at git.blender.org
Mon Jun 23 08:29:40 CEST 2014


Commit: 95d6c014780a980ed9f1552edd4196ceefbce9b6
Author: Lukas Tönne
Date:   Mon Jun 23 08:20:35 2014 +0200
https://developer.blender.org/rB95d6c014780a980ed9f1552edd4196ceefbce9b6

Fix T40756 Select Linked by Particle System matches ignores selected
psys.

This is inconsistent with other comparable cases like materials, where
the active slot is used to define matching objects.

===================================================================

M	source/blender/editors/object/object_select.c

===================================================================

diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index b1a7840..a5a96c6 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -315,22 +315,20 @@ static bool object_select_all_by_dup_group(bContext *C, Object *ob)
 
 static bool object_select_all_by_particle(bContext *C, Object *ob)
 {
+	ParticleSystem *psys_act = psys_get_current(ob);
 	bool changed = false;
 
 	CTX_DATA_BEGIN (C, Base *, base, visible_bases)
 	{
 		if ((base->flag & SELECT) == 0) {
-			/* loop through other, then actives particles*/
+			/* loop through other particles*/
 			ParticleSystem *psys;
-			ParticleSystem *psys_act;
-
+			
 			for (psys = base->object->particlesystem.first; psys; psys = psys->next) {
-				for (psys_act = ob->particlesystem.first; psys_act; psys_act = psys_act->next) {
-					if (psys->part == psys_act->part) {
-						base->flag |= SELECT;
-						changed = true;
-						break;
-					}
+				if (psys->part == psys_act->part) {
+					base->flag |= SELECT;
+					changed = true;
+					break;
 				}
 
 				if (base->flag & SELECT) {




More information about the Bf-blender-cvs mailing list