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:
authorCampbell Barton <ideasman42@gmail.com>2008-01-25 00:32:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-01-25 00:32:36 +0300
commit64109d8a0d0bd5dbb5a87aa37397a8f4c575e03c (patch)
treee88713964ec3c7639a5910bf1a7be156b555060d /source/blender/src/editobject.c
parent04512c7306c73e6dfce037562f74733d94e777f7 (diff)
Select linked particles (Shift+L)
Diffstat (limited to 'source/blender/src/editobject.c')
-rw-r--r--source/blender/src/editobject.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 2e96ea464fa..4e90fbac5ac 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -5142,7 +5142,7 @@ void selectlinks_menu(void)
/* If you modify this menu, please remember to update view3d_select_linksmenu
* in header_view3d.c and the menu in toolbox.c
*/
- nr= pupmenu("Select Linked%t|Object Ipo%x1|ObData%x2|Material%x3|Texture%x4|DupliGroup%x5");
+ nr= pupmenu("Select Linked%t|Object Ipo%x1|ObData%x2|Material%x3|Texture%x4|DupliGroup%x5|ParticleSystem%x6");
if (nr <= 0) return;
@@ -5165,6 +5165,7 @@ void selectlinks(int nr)
* Current Material: 3
* Current Texture: 4
* DupliGroup: 5
+ * PSys: 6
*/
@@ -5190,6 +5191,9 @@ void selectlinks(int nr)
else if(nr==5) {
if(ob->dup_group==NULL) return;
}
+ else if(nr==6) {
+ if(ob->particlesystem.first==NULL) return;
+ }
else return;
base= FIRSTBASE;
@@ -5218,6 +5222,7 @@ void selectlinks(int nr)
if(tex==mat1->mtex[b]->tex) {
base->flag |= SELECT;
changed = 1;
+ break;
}
}
}
@@ -5230,6 +5235,25 @@ void selectlinks(int nr)
changed = 1;
}
}
+ else if(nr==6) {
+ /* loop through other, then actives 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 = 1;
+ break;
+ }
+ }
+
+ if (base->flag & SELECT) {
+ break;
+ }
+ }
+ }
base->object->flag= base->flag;
}
base= base->next;