2.5: Various Fixes
[blender.git] / source / blender / editors / armature / editarmature.c
index 9c9be51f01083651202952a1799e0534f02a4bd3..97bf3492f7c93c2b47fb5c0b83609d4f6a0116e9 100644 (file)
@@ -110,7 +110,7 @@ static void adduplicate() {}
 /* **************** tools on Editmode Armature **************** */
 
 /* Sync selection to parent for connected children */
-static void armature_sync_selection(ListBase *edbo)
+void ED_armature_sync_selection(ListBase *edbo)
 {
        EditBone *ebo;
        
@@ -1435,7 +1435,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
 
        }
 
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
 
        /* BIF_undo_push("Select connected"); */
 
@@ -1668,7 +1668,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *op)
        }
        
        
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
 
        WM_event_add_notifier(C, NC_OBJECT, obedit);
 
@@ -1742,7 +1742,7 @@ void deselectall_armature(Object *obedit, int toggle, int doundo)
                }
        }
        
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
        if (doundo) {
                if (sel==1) BIF_undo_push("Select All");
                else BIF_undo_push("Deselect All");
@@ -1814,7 +1814,7 @@ void mouse_armature(bContext *C, short mval[2], int extend)
                                nearBone->flag |= selmask;
                }
                
-               armature_sync_selection(arm->edbo);
+               ED_armature_sync_selection(arm->edbo);
                
                if(nearBone) {
                        /* then now check for active status */
@@ -1957,9 +1957,9 @@ void auto_align_ebone_tocursor(Scene *scene, View3D *v3d, EditBone *ebone)
 
 
 static EnumPropertyItem prop_calc_roll_types[] = {
-       {0, "GLOBALUP", "Z-Axis Up", ""},
-       {1, "CURSOR", "Z-Axis to Cursor", ""},
-       {0, NULL, NULL, NULL}
+       {0, "GLOBALUP", 0, "Z-Axis Up", ""},
+       {1, "CURSOR", 0, "Z-Axis to Cursor", ""},
+       {0, NULL, 0, NULL, NULL}
 };
 
 static int armature_calc_roll_exec(bContext *C, wmOperator *op) 
@@ -2246,7 +2246,7 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *op)
                
        }
        
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
 
        WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, obedit);
        
@@ -2508,7 +2508,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
        if (CTX_DATA_COUNT(C, selected_bones) == 0)
          return OPERATOR_CANCELLED;
        
-       armature_sync_selection(arm->edbo); // XXX why is this needed?
+       ED_armature_sync_selection(arm->edbo); // XXX why is this needed?
 
        preEditBoneDuplicate(arm->edbo);
 
@@ -3058,7 +3058,7 @@ void merge_armature(Scene *scene)
        }
        
        /* undo + updates */
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
        BIF_undo_push("Merge Bones");
 }
 
@@ -3080,7 +3080,7 @@ void hide_selected_armature_bones(Scene *scene)
                        }
                }
        }
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
        BIF_undo_push("Hide Bones");
 }
 
@@ -3100,7 +3100,7 @@ void hide_unselected_armature_bones(Scene *scene)
                        }
                }
        }
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
        BIF_undo_push("Hide Unselected Bones");
 }
 
@@ -3118,7 +3118,7 @@ void show_all_armature_bones(Scene *scene)
                        }
                }
        }
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
        BIF_undo_push("Reveal Bones");
 }
 
@@ -3251,7 +3251,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
        if (totbone==0) return OPERATOR_CANCELLED;
        
        /* Transform the endpoints */
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
 
        return OPERATOR_FINISHED;
 }
@@ -3489,9 +3489,9 @@ static int armature_subdivs_exec(bContext *C, wmOperator *op)
 void ARMATURE_OT_subdivs(wmOperatorType *ot)
 {
        static EnumPropertyItem type_items[]= {
-               {0, "SIMPLE", "Simple", ""},
-               {1, "MULTI", "Multi", ""},
-               {0, NULL, NULL}};
+               {0, "SIMPLE", 0, "Simple", ""},
+               {1, "MULTI", 0, "Multi", ""},
+               {0, NULL, 0, NULL, NULL}};
 
        /* identifiers */
        ot->name= "subdivs";
@@ -3669,9 +3669,9 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo
 }
 
 static EnumPropertyItem prop_editarm_make_parent_types[] = {
-       {ARM_PAR_CONNECT, "CONNECTED", "Connected", ""},
-       {ARM_PAR_OFFSET, "OFFSET", "Keep Offset", ""},
-       {0, NULL, NULL, NULL}
+       {ARM_PAR_CONNECT, "CONNECTED", 0, "Connected", ""},
+       {ARM_PAR_OFFSET, "OFFSET", 0, "Keep Offset", ""},
+       {0, NULL, 0, NULL, NULL}
 };
 
 static int armature_parent_set_exec(bContext *C, wmOperator *op) 
@@ -3785,9 +3785,9 @@ void ARMATURE_OT_parent_set(wmOperatorType *ot)
 }
 
 static EnumPropertyItem prop_editarm_clear_parent_types[] = {
-       {1, "CLEAR", "Clear Parent", ""},
-       {2, "DISCONNECT", "Disconnect Bone", ""},
-       {0, NULL, NULL, NULL}
+       {1, "CLEAR", 0, "Clear Parent", ""},
+       {2, "DISCONNECT", 0, "Disconnect Bone", ""},
+       {0, NULL, 0, NULL, NULL}
 };
 
 static void editbone_clear_parent(EditBone *ebone, int mode)
@@ -3812,7 +3812,7 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op)
        }
        CTX_DATA_END;
        
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
 
        /* note, notifier might evolve */
        WM_event_add_notifier(C, NC_OBJECT, ob);
@@ -3963,7 +3963,7 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
                }
        }
        
-       armature_sync_selection(arm->edbo);
+       ED_armature_sync_selection(arm->edbo);
        
        WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
        
@@ -3973,9 +3973,9 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
 void ARMATURE_OT_select_hierarchy(wmOperatorType *ot)
 {
        static EnumPropertyItem direction_items[]= {
-       {BONE_SELECT_PARENT, "PARENT", "Select Parent", ""},
-       {BONE_SELECT_CHILD, "CHILD", "Select Child", ""},
-       {0, NULL, NULL, NULL}
+       {BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""},
+       {BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""},
+       {0, NULL, 0, NULL, NULL}
        };
        
        /* identifiers */