diff options
author | Thomas Dinges <blender@dingto.org> | 2010-09-11 03:39:43 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2010-09-11 03:39:43 +0400 |
commit | cd4fb20b73edac8ecc5c05240acb49003e216d61 (patch) | |
tree | c8159bce60984cc200fa3b1dcdd95d755f43d34d /release/scripts | |
parent | 40bf22e9557eeacdd408a38687e182b16ed83538 (diff) |
Patch [#23759] more replace self.properties.foo --> self.foo for bf-extensions/trunk/py/scripts
by Filiciss Muhgue (filiciss). Thanks a lot!
Part 1: Trunk, second part of patch will be committed to Extensions.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/io/netrender/__init__.py | 2 | ||||
-rw-r--r-- | release/scripts/op/io_mesh_ply/__init__.py | 11 | ||||
-rw-r--r-- | release/scripts/op/io_scene_fbx/__init__.py | 10 | ||||
-rw-r--r-- | release/scripts/op/io_scene_obj/__init__.py | 22 | ||||
-rw-r--r-- | release/scripts/op/io_shape_mdd/__init__.py | 16 | ||||
-rw-r--r-- | release/scripts/ui/properties_data_armature_rigify.py | 8 |
6 files changed, 34 insertions, 35 deletions
diff --git a/release/scripts/io/netrender/__init__.py b/release/scripts/io/netrender/__init__.py index 52921770910..241bb7eba85 100644 --- a/release/scripts/io/netrender/__init__.py +++ b/release/scripts/io/netrender/__init__.py @@ -56,5 +56,5 @@ def register(): def unregister(): import bpy - bpy.types.Scene.RemoveProperty("network_render") + del bpy.types.Scene.network_render diff --git a/release/scripts/op/io_mesh_ply/__init__.py b/release/scripts/op/io_mesh_ply/__init__.py index c174b16f46c..18820dea549 100644 --- a/release/scripts/op/io_mesh_ply/__init__.py +++ b/release/scripts/op/io_mesh_ply/__init__.py @@ -44,21 +44,20 @@ class ExportPLY(bpy.types.Operator, ExportHelper): return context.active_object != None def execute(self, context): - filepath = self.properties.filepath + filepath = self.filepath filepath = bpy.path.ensure_ext(filepath, self.filename_ext) import io_mesh_ply.export_ply return io_mesh_ply.export_ply.save(self, context, **self.properties) def draw(self, context): layout = self.layout - props = self.properties row = layout.row() - row.prop(props, "use_modifiers") - row.prop(props, "use_normals") + row.prop(self.properties, "use_modifiers") + row.prop(self.properties, "use_normals") row = layout.row() - row.prop(props, "use_uv_coords") - row.prop(props, "use_colors") + row.prop(self.properties, "use_uv_coords") + row.prop(self.properties, "use_colors") def menu_func(self, context): diff --git a/release/scripts/op/io_scene_fbx/__init__.py b/release/scripts/op/io_scene_fbx/__init__.py index 5eb48868dd8..d1bf5e168e4 100644 --- a/release/scripts/op/io_scene_fbx/__init__.py +++ b/release/scripts/op/io_scene_fbx/__init__.py @@ -69,7 +69,7 @@ class ExportFBX(bpy.types.Operator, ExportHelper): def execute(self, context): import math from mathutils import Matrix - if not self.properties.filepath: + if not self.filepath: raise Exception("filepath not set") mtx4_x90n = Matrix.Rotation(-math.pi / 2.0, 4, 'X') @@ -77,12 +77,12 @@ class ExportFBX(bpy.types.Operator, ExportHelper): mtx4_z90n = Matrix.Rotation(-math.pi / 2.0, 4, 'Z') GLOBAL_MATRIX = Matrix() - GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self.properties.TX_SCALE - if self.properties.TX_XROT90: + GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self.TX_SCALE + if self.TX_XROT90: GLOBAL_MATRIX = mtx4_x90n * GLOBAL_MATRIX - if self.properties.TX_YROT90: + if self.TX_YROT90: GLOBAL_MATRIX = mtx4_y90n * GLOBAL_MATRIX - if self.properties.TX_ZROT90: + if self.TX_ZROT90: GLOBAL_MATRIX = mtx4_z90n * GLOBAL_MATRIX import io_scene_fbx.export_fbx diff --git a/release/scripts/op/io_scene_obj/__init__.py b/release/scripts/op/io_scene_obj/__init__.py index d3791d1cd95..7220084cc7e 100644 --- a/release/scripts/op/io_scene_obj/__init__.py +++ b/release/scripts/op/io_scene_obj/__init__.py @@ -57,17 +57,17 @@ class ImportOBJ(bpy.types.Operator, ImportHelper): import io_scene_obj.import_obj return io_scene_obj.import_obj.load(self, context, **self.properties) ''' - load_obj(self.properties.filepath, + load_obj(self.filepath, context, - self.properties.CLAMP_SIZE, - self.properties.CREATE_FGONS, - self.properties.CREATE_SMOOTH_GROUPS, - self.properties.CREATE_EDGES, - self.properties.SPLIT_OBJECTS, - self.properties.SPLIT_GROUPS, - self.properties.ROTATE_X90, - self.properties.IMAGE_SEARCH, - self.properties.POLYGROUPS) + self.CLAMP_SIZE, + self.CREATE_FGONS, + self.CREATE_SMOOTH_GROUPS, + self.CREATE_EDGES, + self.SPLIT_OBJECTS, + self.SPLIT_GROUPS, + self.ROTATE_X90, + self.IMAGE_SEARCH, + self.POLYGROUPS) ''' return {'FINISHED'} @@ -113,7 +113,7 @@ class ExportOBJ(bpy.types.Operator, ExportHelper): def execute(self, context): import io_scene_obj.export_obj - print(self.properties.keys()) + print(self.keys()) return io_scene_obj.export_obj.save(self, context, **self.properties) diff --git a/release/scripts/op/io_shape_mdd/__init__.py b/release/scripts/op/io_shape_mdd/__init__.py index 0af4af92b7c..9e54477afbb 100644 --- a/release/scripts/op/io_shape_mdd/__init__.py +++ b/release/scripts/op/io_shape_mdd/__init__.py @@ -49,8 +49,8 @@ class ImportMDD(bpy.types.Operator, ImportHelper): # initialize from scene if unset scene = context.scene - if not self.properties.is_property_set("frame_start"): - self.properties.frame_start = scene.frame_current + if not self.frame_start: + self.frame_start = scene.frame_current import io_shape_mdd.import_mdd return io_shape_mdd.import_mdd.load(self, context, **self.properties) @@ -83,12 +83,12 @@ class ExportMDD(bpy.types.Operator, ExportHelper): def execute(self, context): # initialize from scene if unset scene = context.scene - if not self.properties.is_property_set("frame_start"): - self.properties.frame_start = scene.frame_start - if not self.properties.is_property_set("frame_end"): - self.properties.frame_end = scene.frame_end - if not self.properties.is_property_set("fps"): - self.properties.fps = scene.render.fps + if not self.frame_start: + self.frame_start = scene.frame_start + if not self.frame_end: + self.frame_end = scene.frame_end + if not self.fps: + self.fps = scene.render.fps import io_shape_mdd.export_mdd return io_shape_mdd.export_mdd.save(self, context, **self.properties) diff --git a/release/scripts/ui/properties_data_armature_rigify.py b/release/scripts/ui/properties_data_armature_rigify.py index ef96e094928..f7961821277 100644 --- a/release/scripts/ui/properties_data_armature_rigify.py +++ b/release/scripts/ui/properties_data_armature_rigify.py @@ -187,8 +187,8 @@ class Sample(bpy.types.Operator): def execute(self, context): import rigify reload(rigify) - final = (self.properties.metarig_type == "") - objects = rigify.generate_test(context, metarig_type=self.properties.metarig_type, GENERATE_FINAL=final) + final = (self.metarig_type == "") + objects = rigify.generate_test(context, metarig_type=self.metarig_type, GENERATE_FINAL=final) if len(objects) > 1: for i, (obj_meta, obj_gen) in enumerate(objects): @@ -238,7 +238,7 @@ class AsScript(bpy.types.Operator): reload(rigify_utils) obj = context.object code = rigify_utils.write_meta_rig(obj) - path = self.properties.filepath + path = self.filepath file = open(path, "w") file.write(code) file.close() @@ -248,7 +248,7 @@ class AsScript(bpy.types.Operator): def invoke(self, context, event): import os obj = context.object - self.properties.filepath = os.path.splitext(bpy.data.filepath)[0] + "-" + bpy.path.clean_name(obj.name) + ".py" + self.filepath = os.path.splitext(bpy.data.filepath)[0] + "-" + bpy.path.clean_name(obj.name) + ".py" wm = context.window_manager wm.add_fileselect(self) return {'RUNNING_MODAL'} |