[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43364] trunk/blender/release/scripts/ startup: fix own bug [#29875] Due to operators now reusing there last-used settings, some UI options are more or less broken (esp.

Campbell Barton ideasman42 at gmail.com
Sat Jan 14 07:30:44 CET 2012


Revision: 43364
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43364
Author:   campbellbarton
Date:     2012-01-14 06:30:27 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
fix own bug [#29875] Due to operators now reusing there last-used settings, some UI options are more or less broken (esp. in shortcuts and menu entries)

also prefer *.select_all rather then *.select_inverse operators, since this is an option for select_all.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_operators/wm.py
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
    trunk/blender/release/scripts/startup/bl_ui/properties_render.py
    trunk/blender/release/scripts/startup/bl_ui/space_clip.py
    trunk/blender/release/scripts/startup/bl_ui/space_dopesheet.py
    trunk/blender/release/scripts/startup/bl_ui/space_graph.py
    trunk/blender/release/scripts/startup/bl_ui/space_image.py
    trunk/blender/release/scripts/startup/bl_ui/space_nla.py
    trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
    trunk/blender/release/scripts/startup/bl_ui/space_time.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py

Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/wm.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -1178,7 +1178,7 @@
         return {'CANCELLED'}
 
 
-class WM_OT_blenderplayer_start(bpy.types.Operator):
+class WM_OT_blenderplayer_start(Operator):
     '''Launch the Blenderplayer with the current blendfile'''
     bl_idname = "wm.blenderplayer_start"
     bl_label = "Start"

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -56,6 +56,7 @@
             layout.active = fluid.use
 
         if fluid.type == 'DOMAIN':
+            # odd formatting here so translation script can extract string
             layout.operator("fluid.bake", text="Bake (Req. Memory:" + " %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
             split = layout.split()
 

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_render.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_render.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_render.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -551,7 +551,7 @@
         layout.separator()
 
         # Audio:
-        if ffmpeg.format not in {'MP3'}:
+        if ffmpeg.format != 'MP3':
             layout.prop(ffmpeg, "audio_codec", text="Audio Codec")
 
         row = layout.row()

Modified: trunk/blender/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -166,26 +166,20 @@
 
         row = layout.row(align=True)
 
-        props = row.operator("clip.track_markers", text="", icon='FRAME_PREV')
-        props.backwards = True
+        row.operator("clip.track_markers", text="", icon='FRAME_PREV').backwards = True
         props = row.operator("clip.track_markers", text="",
-             icon='PLAY_REVERSE')
+                             icon='PLAY_REVERSE')
         props.backwards = True
         props.sequence = True
-        props = row.operator("clip.track_markers", text="", icon='PLAY')
-        props.sequence = True
+        row.operator("clip.track_markers", text="", icon='PLAY').sequence = True
         row.operator("clip.track_markers", text="", icon='FRAME_NEXT')
 
         col = layout.column(align=True)
-        props = col.operator("clip.clear_track_path", text="Clear After")
-        props.action = 'REMAINED'
+        col.operator("clip.clear_track_path", text="Clear After").action = 'REMAINED'
 
-        props = col.operator("clip.clear_track_path", text="Clear Before")
-        props.action = 'UPTO'
+        col.operator("clip.clear_track_path", text="Clear Before").action = 'UPTO'
+        col.operator("clip.clear_track_path", text="Clear").action = 'ALL'
 
-        props = col.operator("clip.clear_track_path", text="Clear")
-        props.action = 'ALL'
-
         layout.operator("clip.join_tracks", text="Join")
 
 
@@ -484,8 +478,7 @@
         label = bpy.types.CLIP_MT_camera_presets.bl_label
         row.menu('CLIP_MT_camera_presets', text=label)
         row.operator("clip.camera_preset_add", text="", icon='ZOOMIN')
-        props = row.operator("clip.camera_preset_add", text="", icon='ZOOMOUT')
-        props.remove_active = True
+        row.operator("clip.camera_preset_add", text="", icon='ZOOMOUT').remove_active = True
 
         row = layout.row(align=True)
         sub = row.split(percentage=0.65)
@@ -938,7 +931,7 @@
 
         layout.separator()
 
-        layout.operator("clip.select_all", text="Select/Deselect all")
+        layout.operator("clip.select_all", text="Select/Deselect all").action = 'TOGGLE'
         layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
 
         layout.menu("CLIP_MT_select_grouped")
@@ -963,12 +956,9 @@
     def draw(self, context):
         layout = self.layout
 
-        props = layout.operator("clip.disable_markers", text="Enable Markers")
-        props.action = 'ENABLE'
+        layout.operator("clip.disable_markers", text="Enable Markers").action = 'ENABLE'
+        layout.operator("clip.disable_markers", text="Disable markers").action = 'DISABLE'
 
-        props = layout.operator("clip.disable_markers", text="Disable markers")
-        props.action = 'DISABLE'
-
         layout.separator()
         layout.operator("clip.set_origin")
 

Modified: trunk/blender/release/scripts/startup/bl_ui/space_dopesheet.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_dopesheet.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_ui/space_dopesheet.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -179,11 +179,11 @@
         layout = self.layout
 
         # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
-        layout.operator("action.select_all_toggle")
+        layout.operator("action.select_all_toggle").invert = False
         layout.operator("action.select_all_toggle", text="Invert Selection").invert = True
 
         layout.separator()
-        layout.operator("action.select_border")
+        layout.operator("action.select_border").axis_range = False
         layout.operator("action.select_border", text="Border Axis Range").axis_range = True
 
         layout.separator()

Modified: trunk/blender/release/scripts/startup/bl_ui/space_graph.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_graph.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_ui/space_graph.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -111,7 +111,7 @@
         layout = self.layout
 
         # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
-        layout.operator("graph.select_all_toggle")
+        layout.operator("graph.select_all_toggle").invert = False
         layout.operator("graph.select_all_toggle", text="Invert Selection").invert = True
 
         layout.separator()

Modified: trunk/blender/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_image.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_ui/space_image.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -85,7 +85,7 @@
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("uv.select_border")
+        layout.operator("uv.select_border").pinned = False
         layout.operator("uv.select_border").pinned = True
 
         layout.separator()
@@ -184,7 +184,7 @@
         layout = self.layout
 
         layout.operator("uv.reveal")
-        layout.operator("uv.hide", text="Hide Selected")
+        layout.operator("uv.hide", text="Hide Selected").unselected = False
         layout.operator("uv.hide", text="Hide Unselected").unselected = True
 
 

Modified: trunk/blender/release/scripts/startup/bl_ui/space_nla.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_nla.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_ui/space_nla.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -86,11 +86,11 @@
         layout = self.layout
 
         # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
-        layout.operator("nla.select_all_toggle")
+        layout.operator("nla.select_all_toggle").invert = False
         layout.operator("nla.select_all_toggle", text="Invert Selection").invert = True
 
         layout.separator()
-        layout.operator("nla.select_border")
+        layout.operator("nla.select_border").axis_range = False
         layout.operator("nla.select_border", text="Border Axis Range").axis_range = True
 
         layout.separator()
@@ -165,7 +165,7 @@
         layout.operator("nla.meta_remove")
 
         layout.separator()
-        layout.operator("nla.tracks_add")
+        layout.operator("nla.tracks_add").above_selected = False
         layout.operator("nla.tracks_add", text="Add Tracks Above Selected").above_selected = True
 
 

Modified: trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2012-01-14 04:42:41 UTC (rev 43363)
+++ trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2012-01-14 06:30:27 UTC (rev 43364)
@@ -285,7 +285,7 @@
         layout.separator()
         layout.operator("sequencer.lock")
         layout.operator("sequencer.unlock")
-        layout.operator("sequencer.mute")
+        layout.operator("sequencer.mute").unselected = False
         layout.operator("sequencer.unmute")
 
         layout.operator("sequencer.mute", text="Mute Deselected Strips").unselected = True
@@ -625,6 +625,7 @@
         layout = self.layout
 
         strip = act_strip(context)
+        sound = strip.sound
 
         layout.template_ID(strip, "sound", open="sound.open")
 
@@ -632,12 +633,12 @@
         layout.prop(strip, "filepath", text="")
 
         row = layout.row()
-        if strip.sound.packed_file:
+        if sound.packed_file:
             row.operator("sound.unpack", icon='PACKAGE', text="Unpack")
         else:
             row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack")
 
-        row.prop(strip.sound, "use_memory_cache")
+        row.prop(sound, "use_memory_cache")
 
         layout.prop(strip, "waveform")
         layout.prop(strip, "volume")


@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list