Object mode select grouped operator (Shift+G and Select manu)
[blender.git] / source / blender / editors / space_view3d / space_view3d.c
index e52d28864390bd7d5b68a3192b7351a682ca90b5..9b6b70eb396d577668db618e9939c055768886b4 100644 (file)
@@ -675,6 +675,22 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
                
                return 1;
        }
+       else if(CTX_data_equals(member, "selectable_objects") || CTX_data_equals(member, "selectable_bases")) {
+               int selectable_objects= CTX_data_equals(member, "selectable_objects");
+
+               for(base=scene->base.first; base; base=base->next) {
+                       if(base->lay & v3d->lay) {
+                               if((base->object->restrictflag & OB_RESTRICT_VIEW)==0 && (base->object->restrictflag & OB_RESTRICT_SELECT)==0) {
+                                       if(selectable_objects)
+                                               CTX_data_id_list_add(result, &base->object->id);
+                                       else
+                                               CTX_data_list_add(result, &scene->id, &RNA_UnknownType, base);
+                               }
+                       }
+               }
+               
+               return 1;
+       }
        else if(CTX_data_equals(member, "active_base")) {
                if(scene->basact && (scene->basact->lay & v3d->lay))
                        if((scene->basact->object->restrictflag & OB_RESTRICT_VIEW)==0)