Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-03-01 03:03:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-01 03:03:51 +0300
commitfbb8672da459a027a7dd3ccb798b2f5db1c73c59 (patch)
tree1478a36908c3afb614e75ef7fac605589b7c753b /release
parentc4f562476806f06a67b807cd03a9419082ae03e3 (diff)
replace operator options bl_undo and bl_register with bl_options
eg. bl_options = {'REGISTER', 'UNDO', 'BLOCKING', 'GRAB_POINTER'} This didnt exist when operators were originally wrapped.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/addons/add_mesh_gears.py3
-rw-r--r--release/scripts/op/add_armature_human.py3
-rw-r--r--release/scripts/op/add_mesh_torus.py3
-rw-r--r--release/scripts/op/image.py3
-rw-r--r--release/scripts/op/mesh.py6
-rw-r--r--release/scripts/op/object.py15
-rw-r--r--release/scripts/op/object_align.py3
-rw-r--r--release/scripts/op/object_randomize_transform.py3
-rw-r--r--release/scripts/op/screen_play_rendered_anim.py3
-rw-r--r--release/scripts/op/sequencer.py3
-rw-r--r--release/scripts/op/uv.py3
-rw-r--r--release/scripts/op/uvcalc_follow_active.py4
-rw-r--r--release/scripts/op/uvcalc_smart_project.py4
-rw-r--r--release/scripts/op/vertexpaint_dirt.py3
-rw-r--r--release/scripts/op/wm.py20
-rw-r--r--release/scripts/ui/properties_data_armature_rigify.py3
-rw-r--r--release/scripts/ui/space_console.py2
17 files changed, 30 insertions, 54 deletions
diff --git a/release/scripts/addons/add_mesh_gears.py b/release/scripts/addons/add_mesh_gears.py
index 45d5f9317e3..fc6f1e6e499 100644
--- a/release/scripts/addons/add_mesh_gears.py
+++ b/release/scripts/addons/add_mesh_gears.py
@@ -259,8 +259,7 @@ class AddGear(bpy.types.Operator):
'''Add a gear mesh.'''
bl_idname = "mesh.gear_add"
bl_label = "Add Gear"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
number_of_teeth = IntProperty(name="Number of Teeth",
description="Number of teeth on the gear",
diff --git a/release/scripts/op/add_armature_human.py b/release/scripts/op/add_armature_human.py
index e70798a1d3a..1944e73de1b 100644
--- a/release/scripts/op/add_armature_human.py
+++ b/release/scripts/op/add_armature_human.py
@@ -586,8 +586,7 @@ class AddHuman(bpy.types.Operator):
'''Add an advanced human metarig base'''
bl_idname = "object.armature_human_advanced_add"
bl_label = "Add Humanoid (advanced metarig)"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
bpy.ops.object.armature_add()
diff --git a/release/scripts/op/add_mesh_torus.py b/release/scripts/op/add_mesh_torus.py
index 4dae80cd9d6..e7c7ac86ee6 100644
--- a/release/scripts/op/add_mesh_torus.py
+++ b/release/scripts/op/add_mesh_torus.py
@@ -78,8 +78,7 @@ class AddTorus(bpy.types.Operator):
'''Add a torus mesh'''
bl_idname = "mesh.primitive_torus_add"
bl_label = "Add Torus"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
major_radius = FloatProperty(name="Major Radius",
description="Radius from the origin to the center of the cross sections",
diff --git a/release/scripts/op/image.py b/release/scripts/op/image.py
index 9cf335be714..ea5177b1503 100644
--- a/release/scripts/op/image.py
+++ b/release/scripts/op/image.py
@@ -24,8 +24,7 @@ class SaveDirty(bpy.types.Operator):
'''Select object matching a naming pattern'''
bl_idname = "image.save_dirty"
bl_label = "Save Dirty"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
unique_paths = set()
diff --git a/release/scripts/op/mesh.py b/release/scripts/op/mesh.py
index 5eda8187f00..3989e51b6ca 100644
--- a/release/scripts/op/mesh.py
+++ b/release/scripts/op/mesh.py
@@ -26,8 +26,7 @@ class MeshSelectInteriorFaces(bpy.types.Operator):
bl_idname = "mesh.faces_select_interior"
bl_label = "Select Interior Faces"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
def poll(self, context):
ob = context.active_object
@@ -68,8 +67,7 @@ class MeshMirrorUV(bpy.types.Operator):
'''Copy mirror UV coordinates on the X axis based on a mirrored mesh'''
bl_idname = "mesh.faces_miror_uv"
bl_label = "Copy Mirrored UV coords"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
def poll(self, context):
ob = context.active_object
diff --git a/release/scripts/op/object.py b/release/scripts/op/object.py
index b9bd3cb6459..5ff25a47b2f 100644
--- a/release/scripts/op/object.py
+++ b/release/scripts/op/object.py
@@ -26,8 +26,7 @@ class SelectPattern(bpy.types.Operator):
'''Select object matching a naming pattern'''
bl_idname = "object.select_pattern"
bl_label = "Select Pattern"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
pattern = StringProperty(name="Pattern", description="Name filter using '*' and '?' wildcard chars", maxlen=32, default="*")
case_sensitive = BoolProperty(name="Case Sensitive", description="Do a case sensitive compare", default=False)
@@ -79,8 +78,7 @@ class SelectCamera(bpy.types.Operator):
'''Select object matching a naming pattern'''
bl_idname = "object.select_camera"
bl_label = "Select Camera"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
def poll(self, context):
return context.scene.camera is not None
@@ -100,8 +98,7 @@ class SelectHierarchy(bpy.types.Operator):
'''Select object relative to the active objects position in the hierarchy'''
bl_idname = "object.select_hierarchy"
bl_label = "Select Hierarchy"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
direction = EnumProperty(items=(
('PARENT', "Parent", ""),
@@ -143,8 +140,7 @@ class SubdivisionSet(bpy.types.Operator):
bl_idname = "object.subdivision_set"
bl_label = "Subdivision Set"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
level = IntProperty(name="Level",
default=1, min=-100, max=100, soft_min=-6, soft_max=6)
@@ -207,8 +203,7 @@ class ShapeTransfer(bpy.types.Operator):
bl_idname = "object.shape_key_transfer"
bl_label = "Transfer Shape Key"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
mode = EnumProperty(items=(
('OFFSET', "Offset", "Apply the relative positional offset"),
diff --git a/release/scripts/op/object_align.py b/release/scripts/op/object_align.py
index 5abef11b980..c5fcc3d2a32 100644
--- a/release/scripts/op/object_align.py
+++ b/release/scripts/op/object_align.py
@@ -235,8 +235,7 @@ class AlignObjects(bpy.types.Operator):
'''Align Objects'''
bl_idname = "object.align"
bl_label = "Align Objects"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
align_mode = bpy.props.EnumProperty(items=(
('OPT_1', "Negative Sides", ""),
diff --git a/release/scripts/op/object_randomize_transform.py b/release/scripts/op/object_randomize_transform.py
index 71961404a69..3d3feb66424 100644
--- a/release/scripts/op/object_randomize_transform.py
+++ b/release/scripts/op/object_randomize_transform.py
@@ -83,8 +83,7 @@ class RandomizeLocRotSize(bpy.types.Operator):
'''Randomize objects loc/rot/scale'''
bl_idname = "object.randomize_transform"
bl_label = "Randomize Transform"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
random_seed = IntProperty(name="Random Seed",
description="Seed value for the random generator",
diff --git a/release/scripts/op/screen_play_rendered_anim.py b/release/scripts/op/screen_play_rendered_anim.py
index 53742ed41b1..17087183c7d 100644
--- a/release/scripts/op/screen_play_rendered_anim.py
+++ b/release/scripts/op/screen_play_rendered_anim.py
@@ -64,8 +64,7 @@ class PlayRenderedAnim(bpy.types.Operator):
'''Plays back rendered frames/movies using an external player.'''
bl_idname = "screen.play_rendered_anim"
bl_label = "Play Rendered Animation"
- bl_register = True
- bl_undo = False
+ bl_options = {'REGISTER'}
def execute(self, context):
scene = context.scene
diff --git a/release/scripts/op/sequencer.py b/release/scripts/op/sequencer.py
index cab8a373fed..51bb96442e9 100644
--- a/release/scripts/op/sequencer.py
+++ b/release/scripts/op/sequencer.py
@@ -25,8 +25,7 @@ class SequencerCrossfadeSounds(bpy.types.Operator):
bl_idname = "sequencer.crossfade_sounds"
bl_label = "Crossfade sounds"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
def poll(self, context):
if context.scene and context.scene.sequence_editor and context.scene.sequence_editor.active_strip:
diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py
index 35a20a002a8..f22db9d87a8 100644
--- a/release/scripts/op/uv.py
+++ b/release/scripts/op/uv.py
@@ -27,8 +27,7 @@ class ExportUVLayout(bpy.types.Operator):
bl_idname = "uv.export_layout"
bl_label = "Export UV Layout"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
path = StringProperty(name="File Path", description="File path used for exporting the SVG file", maxlen=1024, default="")
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
diff --git a/release/scripts/op/uvcalc_follow_active.py b/release/scripts/op/uvcalc_follow_active.py
index 0befcdc6829..a76bd0d3a98 100644
--- a/release/scripts/op/uvcalc_follow_active.py
+++ b/release/scripts/op/uvcalc_follow_active.py
@@ -242,9 +242,7 @@ class FollowActiveQuads(bpy.types.Operator):
'''Follow UVs from active quads along continuous face loops'''
bl_idname = "uv.follow_active_quads"
bl_label = "Follow Active Quads"
-
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
mode = bpy.props.EnumProperty(items=(("EVEN", "Even", "Space all UVs evently"), ("LENGTH", "Length", "Average space UVs edge length of each loop")),
name="Edge Length Mode",
diff --git a/release/scripts/op/uvcalc_smart_project.py b/release/scripts/op/uvcalc_smart_project.py
index 7fe0d1e5d60..c88faae2818 100644
--- a/release/scripts/op/uvcalc_smart_project.py
+++ b/release/scripts/op/uvcalc_smart_project.py
@@ -1115,9 +1115,7 @@ class SmartProject(bpy.types.Operator):
'''This script projection unwraps the selected faces of a mesh. it operates on all selected mesh objects, and can be used unwrap selected faces, or all faces.'''
bl_idname = "uv.smart_project"
bl_label = "Smart UV Project"
-
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
angle_limit = FloatProperty(name="Angle Limit",
description="lower for more projection groups, higher for less distortion.",
diff --git a/release/scripts/op/vertexpaint_dirt.py b/release/scripts/op/vertexpaint_dirt.py
index 42987dbc4be..f2c2d5bd864 100644
--- a/release/scripts/op/vertexpaint_dirt.py
+++ b/release/scripts/op/vertexpaint_dirt.py
@@ -148,8 +148,7 @@ class VertexPaintDirt(bpy.types.Operator):
bl_idname = "mesh.vertex_paint_dirt"
bl_label = "Dirty Vertex Colors"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
blur_strength = FloatProperty(name="Blur Strength", description="Blur strength per iteration", default=1.0, min=0.01, max=1.0)
blur_iterations = IntProperty(name="Blur Iterations", description="Number times to blur the colors. (higher blurs more)", default=1, min=0, max=40)
diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py
index c70e80cdfe8..216cb57537e 100644
--- a/release/scripts/op/wm.py
+++ b/release/scripts/op/wm.py
@@ -78,7 +78,7 @@ class WM_OT_context_set_boolean(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_boolean"
bl_label = "Context Set Boolean"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
value = BoolProperty(name="Value",
@@ -91,7 +91,7 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_int"
bl_label = "Context Set"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
value = IntProperty(name="Value", description="Assign value", default=0)
@@ -104,7 +104,7 @@ class WM_OT_context_set_float(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_float"
bl_label = "Context Set Float"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
value = FloatProperty(name="Value",
@@ -118,7 +118,7 @@ class WM_OT_context_set_string(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_string"
bl_label = "Context Set String"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
value = StringProperty(name="Value",
@@ -131,7 +131,7 @@ class WM_OT_context_set_enum(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_enum"
bl_label = "Context Set Enum"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
value = StringProperty(name="Value",
@@ -145,7 +145,7 @@ class WM_OT_context_set_value(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_value"
bl_label = "Context Set Value"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
value = StringProperty(name="Value",
@@ -163,7 +163,7 @@ class WM_OT_context_toggle(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_toggle"
bl_label = "Context Toggle"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
@@ -182,7 +182,7 @@ class WM_OT_context_toggle_enum(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_toggle_enum"
bl_label = "Context Toggle Values"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
value_1 = StringProperty(name="Value", \
@@ -209,7 +209,7 @@ class WM_OT_context_cycle_int(bpy.types.Operator):
vertex keys, groups' etc.'''
bl_idname = "wm.context_cycle_int"
bl_label = "Context Int Cycle"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
reverse = rna_reverse_prop
@@ -243,7 +243,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_cycle_enum"
bl_label = "Context Enum Cycle"
- bl_undo = True
+ bl_options = {'UNDO'}
path = rna_path_prop
reverse = rna_reverse_prop
diff --git a/release/scripts/ui/properties_data_armature_rigify.py b/release/scripts/ui/properties_data_armature_rigify.py
index 38109c1520a..99df79ed970 100644
--- a/release/scripts/ui/properties_data_armature_rigify.py
+++ b/release/scripts/ui/properties_data_armature_rigify.py
@@ -252,8 +252,7 @@ class AsScript(bpy.types.Operator):
bl_idname = "pose.metarig_to_script"
bl_label = "Write Metarig to Script"
- bl_register = True
- bl_undo = True
+ bl_options = {'REGISTER', 'UNDO'}
path = StringProperty(name="File Path", description="File path used for exporting the Armature file", maxlen=1024, default="")
diff --git a/release/scripts/ui/space_console.py b/release/scripts/ui/space_console.py
index 37de6bacad2..512af350a47 100644
--- a/release/scripts/ui/space_console.py
+++ b/release/scripts/ui/space_console.py
@@ -119,7 +119,6 @@ class ConsoleExec(bpy.types.Operator):
'''Execute the current console line as a python expression'''
bl_idname = "console.execute"
bl_label = "Console Execute"
- bl_register = False
def execute(self, context):
sc = context.space_data
@@ -138,7 +137,6 @@ class ConsoleAutocomplete(bpy.types.Operator):
'''Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one'''
bl_idname = "console.autocomplete"
bl_label = "Console Autocomplete"
- bl_register = False
def poll(self, context):
return context.space_data.console_type != 'REPORT'