diff --git a/actions/modify.action.inc b/actions/modify.action.inc
index cfba3c3..c2a655c 100644
--- a/actions/modify.action.inc
+++ b/actions/modify.action.inc
@@ -114,7 +114,7 @@ function views_bulk_operations_modify_action_form($context, &$form_state) {
 
   $info = entity_get_info($entity_type);
   $properties = _views_bulk_operations_modify_action_get_properties($entity_type, $context['settings']['display_values']);
-  $bundles = _views_bulk_operations_modify_action_get_bundles($entity_type, $context['settings']['display_values']);
+  $bundles = _views_bulk_operations_modify_action_get_bundles($entity_type, $context);
 
   $form['#attached']['css'][] = drupal_get_path('module', 'views_bulk_operations') . '/css/modify.action.css';
   $form['#tree'] = TRUE;
@@ -450,19 +450,29 @@ function _views_bulk_operations_modify_action_get_properties($entity_type, $disp
  * (through the action settings) then only bundles that have at least one field
  * selected are returned.
  *
- * @todo Make it consult the view passed through $context, and if it has a
- * filter on the bundle key, use the selected values.
- *
  * @param $entity_type
  *   The entity type whose bundles will be fetched.
- * @param $display_values
- *   An admin-provided list of properties and fields that should be displayed
- *   for editing, used to filter the returned list of bundles.
+ * @param $context
+ *   The VBO context variable.
  */
-function _views_bulk_operations_modify_action_get_bundles($entity_type, $display_values) {
+function _views_bulk_operations_modify_action_get_bundles($entity_type, $context) {
   $info = entity_get_info($entity_type);
+  $view = $context['view'];
+  $display_values = $context['settings']['display_values'];
+  $bundle_key = $info['bundle keys']['bundle'];
   $filtered_bundles = array();
 
+  if (isset($view->filter[$bundle_key])) {
+    if (!empty($view->filter[$bundle_key]->value)) {
+      foreach (array_keys($info['bundles']) as $bundle_name) {
+        $bundle_filters = $view->filter[$bundle_key]->value;
+        if (!in_array($bundle_name, $bundle_filters)) {
+          unset($info['bundles'][$bundle_name]);
+        }
+      }
+    }
+  }
+
   foreach ($info['bundles'] as $bundle_name => $bundle) {
     $instances = field_info_instances($entity_type, $bundle_name);
     // Ignore bundles that don't have any field instances attached.
