svn merge ^/trunk/blender -r42778:42839
[blender.git] / source / blender / editors / object / object_modifier.c
index a140888a602a9450c6ba62d5ed3fa26ca799cec4..c5de274c464214dc70fa55807bf58e582a91d909 100644 (file)
@@ -655,7 +655,7 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
 static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
 {      
        Object *ob= ED_object_active_context(C);
-       EnumPropertyItem *item= NULL, *md_item;
+       EnumPropertyItem *item= NULL, *md_item, *group_item= NULL;
        ModifierTypeInfo *mti;
        int totitem= 0, a;
        
@@ -675,6 +675,17 @@ static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr)
                           (ob->type==OB_MESH && (mti->flags & eModifierTypeFlag_AcceptsMesh))))
                                continue;
                }
+               else {
+                       group_item= md_item;
+                       md_item= NULL;
+
+                       continue;
+               }
+
+               if(group_item) {
+                       RNA_enum_item_add(&item, &totitem, group_item);
+                       group_item= NULL;
+               }
 
                RNA_enum_item_add(&item, &totitem, md_item);
        }