Revision: 43836
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43836
Author:   campbellbarton
Date:     2012-02-02 04:59:30 +0000 (Thu, 02 Feb 2012)
Log Message:
-----------
internal cleanup, check.

* remove duplicate operator, wasnt used.
* added check for duplicate types for CTest.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_channels_edit.c
    trunk/blender/source/tests/bl_run_operators.py

Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_edit.c 
2012-02-02 04:43:35 UTC (rev 43835)
+++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c 
2012-02-02 04:59:30 UTC (rev 43836)
@@ -1529,7 +1529,7 @@
        return OPERATOR_FINISHED;
 }
 
-
+/* duplicate of 'ANIM_OT_channels_setting_toggle' for menu title only, weak! */
 static void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
 {
        /* identifiers */
@@ -1551,7 +1551,7 @@
                /* setting to set */
        ot->prop= RNA_def_enum(ot->srna, "type", 
prop_animchannel_settings_types, 0, "Type", "");
 }
-
+/* duplicate of 'ANIM_OT_channels_setting_toggle' for menu title only, weak! */
 static void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
 {
        /* identifiers */
@@ -1574,28 +1574,6 @@
        ot->prop= RNA_def_enum(ot->srna, "type", 
prop_animchannel_settings_types, 0, "Type", "");
 }
 
-static void ANIM_OT_channels_setting_invert (wmOperatorType *ot)
-{
-       /* identifiers */
-       ot->name= "Invert Channel Setting";
-       ot->idname= "ANIM_OT_channels_setting_toggle";
-       ot->description= "Invert specified setting on all selected animation 
channels";
-       
-       /* api callbacks */
-       ot->invoke= WM_menu_invoke;
-       ot->exec= animchannels_setflag_exec;
-       ot->poll= animedit_poll_channels_active;
-       
-       /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-       
-       /* props */
-               /* flag-setting mode */
-       RNA_def_enum(ot->srna, "mode", prop_animchannel_setflag_types, 
ACHANNEL_SETFLAG_INVERT, "Mode", "");
-               /* setting to set */
-       ot->prop= RNA_def_enum(ot->srna, "type", 
prop_animchannel_settings_types, 0, "Type", "");
-}
-
 static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
 {
        /* identifiers */
@@ -2401,7 +2379,6 @@
        
        WM_operatortype_append(ANIM_OT_channels_setting_enable);
        WM_operatortype_append(ANIM_OT_channels_setting_disable);
-       WM_operatortype_append(ANIM_OT_channels_setting_invert);
        WM_operatortype_append(ANIM_OT_channels_setting_toggle);
        
        WM_operatortype_append(ANIM_OT_channels_delete);

Modified: trunk/blender/source/tests/bl_run_operators.py
===================================================================
--- trunk/blender/source/tests/bl_run_operators.py      2012-02-02 04:43:35 UTC 
(rev 43835)
+++ trunk/blender/source/tests/bl_run_operators.py      2012-02-02 04:59:30 UTC 
(rev 43836)
@@ -137,7 +137,25 @@
     bpy.ops.object.mode_set(mode='WEIGHT_PAINT')
 
 
+def bpy_check_type_duplicates():
+    # non essential sanity check
+    bl_types = dir(bpy.types)
+    bl_types_unique = set(bl_types)
+    
+    if len(bl_types) != len(bl_types_unique):
+        print("Error, found duplicates in 'bpy.types'")
+        for t in sorted(bl_types_unique):
+            tot = bl_types.count(t)
+            if tot > 1:
+                print("    '%s', %d" % (t, tot))
+        import sys
+        sys.exit(1)
+
+
 def main():
+
+    bpy_check_type_duplicates()
+
     # bpy.ops.wm.read_factory_settings()
     import bpy
     operators = []

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to