diff options
-rw-r--r-- | add_curve_aceous_galore.py | 264 | ||||
-rw-r--r-- | add_curve_torus_knots.py | 82 | ||||
-rw-r--r-- | add_mesh_3d_function_surface.py | 37 | ||||
-rw-r--r-- | add_mesh_BoltFactory/Boltfactory.py | 98 | ||||
-rw-r--r-- | add_mesh_ant_landscape.py | 204 | ||||
-rw-r--r-- | add_mesh_extras.py | 47 | ||||
-rw-r--r-- | add_mesh_gears.py | 84 | ||||
-rw-r--r-- | add_mesh_gemstones.py | 26 | ||||
-rw-r--r-- | add_mesh_pipe_joint.py | 72 | ||||
-rw-r--r-- | add_mesh_solid.py | 39 | ||||
-rw-r--r-- | add_mesh_twisted_torus.py | 21 | ||||
-rw-r--r-- | curve_simplify.py | 88 | ||||
-rw-r--r-- | io_anim_camera.py | 8 | ||||
-rw-r--r-- | io_export_directx_x.py | 24 | ||||
-rw-r--r-- | io_import_images_as_planes.py | 41 | ||||
-rw-r--r-- | io_import_scene_lwo.py | 10 | ||||
-rw-r--r-- | io_import_scene_mhx.py | 56 | ||||
-rw-r--r-- | io_import_scene_unreal_psk.py | 4 | ||||
-rw-r--r-- | io_mesh_raw/export_raw.py | 2 | ||||
-rw-r--r-- | io_mesh_raw/import_raw.py | 4 | ||||
-rw-r--r-- | io_mesh_stl/__init__.py | 6 | ||||
-rw-r--r-- | mesh_relax.py | 4 | ||||
-rw-r--r-- | mesh_surface_sketch.py | 2 | ||||
-rw-r--r-- | render_renderfarmfi.py | 2 | ||||
-rw-r--r-- | space_view3d_materials_utils.py | 10 | ||||
-rw-r--r-- | space_view3d_panel_measure.py | 3 | ||||
-rw-r--r-- | space_view3d_property_chart.py | 8 |
27 files changed, 608 insertions, 638 deletions
diff --git a/add_curve_aceous_galore.py b/add_curve_aceous_galore.py index 9de8c015..d06f7fb0 100644 --- a/add_curve_aceous_galore.py +++ b/add_curve_aceous_galore.py @@ -21,7 +21,7 @@ bl_addon_info = { 'author': 'Jimmy Hazevoet, testscreenings', 'version': (0,1), 'blender': (2, 5, 3), - 'api': 31667, + 'api': 31847, 'location': 'Add Curve menu', 'description': 'adds many types of curves', 'warning': '', # used for warning icon and text in addons panel @@ -621,10 +621,10 @@ def vertsToPoints(Verts, splineType): return vertArray # create new CurveObject from vertarray and splineType -def createCurve(vertArray, props, align_matrix): +def createCurve(vertArray, self, align_matrix): # options to vars - splineType = props.outputType # output splineType 'POLY' 'NURBS' 'BEZIER' - name = props.GalloreType # GalloreType as name + splineType = self.outputType # output splineType 'POLY' 'NURBS' 'BEZIER' + name = self.GalloreType # GalloreType as name # create curve scene = bpy.context.scene @@ -641,10 +641,10 @@ def createCurve(vertArray, props, align_matrix): newSpline.use_endpoint_u = True # set curveOptions - newCurve.dimensions = props.shape - newSpline.use_cyclic_u = props.use_cyclic_u - newSpline.use_endpoint_u = props.endp_u - newSpline.order_u = props.order_u + newCurve.dimensions = self.shape + newSpline.use_cyclic_u = self.use_cyclic_u + newSpline.use_endpoint_u = self.endp_u + newSpline.order_u = self.order_u # create object with newCurve new_obj = bpy.data.objects.new(name, newCurve) # object @@ -655,89 +655,89 @@ def createCurve(vertArray, props, align_matrix): # set bezierhandles if splineType == 'BEZIER': - setBezierHandles(new_obj, props.handleType) + setBezierHandles(new_obj, self.handleType) return ##------------------------------------------------------------ # Main Function -def main(context, props, align_matrix): +def main(context, self, align_matrix): # deselect all objects bpy.ops.object.select_all(action='DESELECT') # options - galType = props.GalloreType - splineType = props.outputType - innerRadius = props.innerRadius - middleRadius = props.middleRadius - outerRadius = props.outerRadius + galType = self.GalloreType + splineType = self.outputType + innerRadius = self.innerRadius + middleRadius = self.middleRadius + outerRadius = self.outerRadius # get verts if galType == 'Profile': - verts = ProfileCurve(props.ProfileCurveType, - props.ProfileCurvevar1, - props.ProfileCurvevar2) + verts = ProfileCurve(self.ProfileCurveType, + self.ProfileCurvevar1, + self.ProfileCurvevar2) if galType == 'Miscellaneous': - verts = MiscCurve(props.MiscCurveType, - props.MiscCurvevar1, - props.MiscCurvevar2, - props.MiscCurvevar3) + verts = MiscCurve(self.MiscCurveType, + self.MiscCurvevar1, + self.MiscCurvevar2, + self.MiscCurvevar3) if galType == 'Flower': - verts = FlowerCurve(props.petals, + verts = FlowerCurve(self.petals, innerRadius, outerRadius, - props.petalWidth) + self.petalWidth) if galType == 'Star': - verts = StarCurve(props.starPoints, + verts = StarCurve(self.starPoints, innerRadius, outerRadius, - props.starTwist) + self.starTwist) if galType == 'Arc': - verts = ArcCurve(props.arcSides, - props.startAngle, - props.endAngle, + verts = ArcCurve(self.arcSides, + self.startAngle, + self.endAngle, innerRadius, outerRadius, - props.arcType) + self.arcType) if galType == 'Cogwheel': - verts = CogCurve(props.teeth, + verts = CogCurve(self.teeth, innerRadius, middleRadius, outerRadius, - props.bevel) + self.bevel) if galType == 'Nsided': - verts = nSideCurve(props.Nsides, + verts = nSideCurve(self.Nsides, outerRadius) ''' if galType == 'Splat': - verts = SplatCurve(props.splatSides, - props.splatScale, - props.seed, - props.basis, + verts = SplatCurve(self.splatSides, + self.splatScale, + self.seed, + self.basis, outerRadius) ''' if galType == 'Helix': - verts = HelixCurve(props.helixPoints, - props.helixHeight, - props.helixStart, - props.helixEnd, - props.helixWidth, - props.helix_a, - props.helix_b) + verts = HelixCurve(self.helixPoints, + self.helixHeight, + self.helixStart, + self.helixEnd, + self.helixWidth, + self.helix_a, + self.helix_b) if galType == 'Cycloid': - verts = CycloidCurve(props.cycloPoints, - props.cyclo_d, - props.cycloType, - props.cyclo_a, - props.cyclo_b, - props.cycloStart, - props.cycloEnd) + verts = CycloidCurve(self.cycloPoints, + self.cyclo_d, + self.cycloType, + self.cyclo_a, + self.cyclo_b, + self.cycloStart, + self.cycloEnd) # turn verts into array vertArray = vertsToPoints(verts, splineType) # create object - createCurve(vertArray, props, align_matrix) + createCurve(vertArray, self, align_matrix) return @@ -968,99 +968,98 @@ class Curveaceous_galore(bpy.types.Operator): ##### DRAW ##### def draw(self, context): - props = self.properties layout = self.layout # general options col = layout.column() - col.prop(props, 'GalloreType') - col.label(text=props.GalloreType+" Options") + col.prop(self.properties, 'GalloreType') + col.label(text=self.GalloreType+" Options") # options per GalloreType box = layout.box() - if props.GalloreType == 'Profile': - box.prop(props, 'ProfileCurveType') - box.prop(props, 'ProfileCurvevar1') - box.prop(props, 'ProfileCurvevar2') - if props.GalloreType == 'Miscellaneous': - box.prop(props, 'MiscCurveType') - box.prop(props, 'MiscCurvevar1') - box.prop(props, 'MiscCurvevar2') - #box.prop(props, 'MiscCurvevar3') # doesn't seem to do anything - if props.GalloreType == 'Flower': - box.prop(props, 'petals') - box.prop(props, 'petalWidth') - box.prop(props, 'innerRadius') - box.prop(props, 'outerRadius') - if props.GalloreType == 'Star': - box.prop(props, 'starPoints') - box.prop(props, 'starTwist') - box.prop(props, 'innerRadius') - box.prop(props, 'outerRadius') - if props.GalloreType == 'Arc': - box.prop(props, 'arcSides') - box.prop(props, 'arcType') # has only one Type? - box.prop(props, 'startAngle') - box.prop(props, 'endAngle') - box.prop(props, 'innerRadius') # doesn't seem to do anything - box.prop(props, 'outerRadius') - if props.GalloreType == 'Cogwheel': - box.prop(props, 'teeth') - box.prop(props, 'bevel') - box.prop(props, 'innerRadius') - box.prop(props, 'middleRadius') - box.prop(props, 'outerRadius') - if props.GalloreType == 'Nsided': - box.prop(props, 'Nsides') - box.prop(props, 'outerRadius', text='Radius') + if self.GalloreType == 'Profile': + box.prop(self.properties, 'ProfileCurveType') + box.prop(self.properties, 'ProfileCurvevar1') + box.prop(self.properties, 'ProfileCurvevar2') + if self.GalloreType == 'Miscellaneous': + box.prop(self.properties, 'MiscCurveType') + box.prop(self.properties, 'MiscCurvevar1') + box.prop(self.properties, 'MiscCurvevar2') + #box.prop(self.properties, 'MiscCurvevar3') # doesn't seem to do anything + if self.GalloreType == 'Flower': + box.prop(self.properties, 'petals') + box.prop(self.properties, 'petalWidth') + box.prop(self.properties, 'innerRadius') + box.prop(self.properties, 'outerRadius') + if self.GalloreType == 'Star': + box.prop(self.properties, 'starPoints') + box.prop(self.properties, 'starTwist') + box.prop(self.properties, 'innerRadius') + box.prop(self.properties, 'outerRadius') + if self.GalloreType == 'Arc': + box.prop(self.properties, 'arcSides') + box.prop(self.properties, 'arcType') # has only one Type? + box.prop(self.properties, 'startAngle') + box.prop(self.properties, 'endAngle') + box.prop(self.properties, 'innerRadius') # doesn't seem to do anything + box.prop(self.properties, 'outerRadius') + if self.GalloreType == 'Cogwheel': + box.prop(self.properties, 'teeth') + box.prop(self.properties, 'bevel') + box.prop(self.properties, 'innerRadius') + box.prop(self.properties, 'middleRadius') + box.prop(self.properties, 'outerRadius') + if self.GalloreType == 'Nsided': + box.prop(self.properties, 'Nsides') + box.prop(self.properties, 'outerRadius', text='Radius') ''' - if props.GalloreType == 'Splat': - box.prop(props, 'splatSides') - box.prop(props, 'outerRadius') - box.prop(props, 'splatScale') - box.prop(props, 'seed') - box.prop(props, 'basis') + if self.GalloreType == 'Splat': + box.prop(self.properties, 'splatSides') + box.prop(self.properties, 'outerRadius') + box.prop(self.properties, 'splatScale') + box.prop(self.properties, 'seed') + box.prop(self.properties, 'basis') ''' - if props.GalloreType == 'Helix': - box.prop(props, 'helixPoints') - box.prop(props, 'helixHeight') - box.prop(props, 'helixWidth') - box.prop(props, 'helixStart') - box.prop(props, 'helixEnd') - box.prop(props, 'helix_a') - box.prop(props, 'helix_b') - if props.GalloreType == 'Cycloid': - box.prop(props, 'cycloPoints') - #box.prop(props, 'cycloType') # needs the other types first - box.prop(props, 'cycloStart') - box.prop(props, 'cycloEnd') - box.prop(props, 'cyclo_a') - box.prop(props, 'cyclo_b') - box.prop(props, 'cyclo_d') + if self.GalloreType == 'Helix': + box.prop(self.properties, 'helixPoints') + box.prop(self.properties, 'helixHeight') + box.prop(self.properties, 'helixWidth') + box.prop(self.properties, 'helixStart') + box.prop(self.properties, 'helixEnd') + box.prop(self.properties, 'helix_a') + box.prop(self.properties, 'helix_b') + if self.GalloreType == 'Cycloid': + box.prop(self.properties, 'cycloPoints') + #box.prop(self.properties, 'cycloType') # needs the other types first + box.prop(self.properties, 'cycloStart') + box.prop(self.properties, 'cycloEnd') + box.prop(self.properties, 'cyclo_a') + box.prop(self.properties, 'cyclo_b') + box.prop(self.properties, 'cyclo_d') col = layout.column() col.label(text="Output Curve Type") row = layout.row() - row.prop(props, 'outputType', expand=True) + row.prop(self.properties, 'outputType', expand=True) col = layout.column() col.label(text="Curve Options") # output options box = layout.box() - if props.outputType == 'NURBS': - box.row().prop(props, 'shape', expand=True) - #box.prop(props, 'use_cyclic_u') - #box.prop(props, 'endp_u') - box.prop(props, 'order_u') + if self.outputType == 'NURBS': + box.row().prop(self.properties, 'shape', expand=True) + #box.prop(self.properties, 'use_cyclic_u') + #box.prop(self.properties, 'endp_u') + box.prop(self.properties, 'order_u') - if props.outputType == 'POLY': - box.row().prop(props, 'shape', expand=True) - #box.prop(props, 'use_cyclic_u') + if self.outputType == 'POLY': + box.row().prop(self.properties, 'shape', expand=True) + #box.prop(self.properties, 'use_cyclic_u') - if props.outputType == 'BEZIER': - box.row().prop(props, 'shape', expand=True) - box.row().prop(props, 'handleType', expand=True) - #box.prop(props, 'use_cyclic_u') + if self.outputType == 'BEZIER': + box.row().prop(self.properties, 'shape', expand=True) + box.row().prop(self.properties, 'handleType', expand=True) + #box.prop(self.properties, 'use_cyclic_u') ##### POLL ##### @@ -1075,20 +1074,19 @@ class Curveaceous_galore(bpy.types.Operator): bpy.context.user_preferences.edit.use_global_undo = False # deal with 2D - 3D curve differences - props = self.properties - if props.GalloreType in ['Helix', 'Cycloid']: - props.shape = '3D' + if self.GalloreType in ['Helix', 'Cycloid']: + self.shape = '3D' #else: - #props.shape = '2D' # someone decide if we want this + #self.shape = '2D' # someone decide if we want this - if props.GalloreType in ['Helix']: - props.use_cyclic_u = False + if self.GalloreType in ['Helix']: + self.use_cyclic_u = False else: - props.use_cyclic_u = True + self.use_cyclic_u = True # main function - main(context, props, self.align_matrix) + main(context, self, self.align_matrix) # restore pre operator undo state bpy.context.user_preferences.edit.use_global_undo = undo diff --git a/add_curve_torus_knots.py b/add_curve_torus_knots.py index 2f13ac84..af9733e2 100644 --- a/add_curve_torus_knots.py +++ b/add_curve_torus_knots.py @@ -22,7 +22,7 @@ bl_addon_info = { "author": "testscreenings", "version": (0,1), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "View3D > Add > Curve", "description": "Adds many types of knots", "warning": "", @@ -68,7 +68,7 @@ def vertsToPoints(Verts): return vertArray # create new CurveObject from vertarray and splineType -def createCurve(vertArray, props, align_matrix): +def createCurve(vertArray, self, align_matrix): # options to vars splineType = 'NURBS' name = 'Torus_Knot' @@ -89,14 +89,14 @@ def createCurve(vertArray, props, align_matrix): newSpline.use_endpoint_u = True newSpline.order_u = 4 - if props.geo_surf: - newCurve.bevel_depth = props.geo_bDepth - newCurve.bevel_resolution = props.geo_bRes + if self.geo_surf: + newCurve.bevel_depth = self.geo_bDepth + newCurve.bevel_resolution = self.geo_bRes newCurve.use_fill_front = False newCurve.use_fill_back = False - newCurve.extrude = props.geo_extrude - newCurve.offset = props.geo_width - newCurve.resolution_u = props.geo_res + newCurve.extrude = self.geo_extrude + newCurve.offset = self.geo_width + newCurve.resolution_u = self.geo_res # create object with newCurve new_obj = bpy.data.objects.new(name, newCurve) # object @@ -132,26 +132,26 @@ def Torus_Knot_Curve(p=2, q=3, w=1, res=24, formula=0, h=1, u=1 ,v=1, rounds=2): ##------------------------------------------------------------ # Main Function -def main(context, props, align_matrix): +def main(context, self, align_matrix): # deselect all objects bpy.ops.object.select_all(action='DESELECT') # get verts - verts = Torus_Knot_Curve(props.torus_p, - props.torus_q, - props.torus_w, - props.torus_res, - props.torus_formula, - props.torus_h, - props.torus_u, - props.torus_v, - props.torus_rounds) + verts = Torus_Knot_Curve(self.torus_p, + self.torus_q, + self.torus_w, + self.torus_res, + self.torus_formula, + self.torus_h, + self.torus_u, + self.torus_v, + self.torus_rounds) # turn verts into array vertArray = vertsToPoints(verts) # create object - createCurve(vertArray, props, align_matrix) + createCurve(vertArray, self, align_matrix) return @@ -238,38 +238,37 @@ class torus_knot_plus(bpy.types.Operator): ##### DRAW ##### def draw(self, context): - props = self.properties layout = self.layout # general options col = layout.column() - #col.prop(props, 'KnotType') waits for more knottypes + #col.prop(self.properties, 'KnotType') waits for more knottypes col.label(text="Torus Knot Parameters") # Parameters box = layout.box() - box.prop(props, 'torus_res') - box.prop(props, 'torus_w') - box.prop(props, 'torus_h') - box.prop(props, 'torus_p') - box.prop(props, 'torus_q') - box.prop(props, 'options_plus') - if props.options_plus: - box.prop(props, 'torus_u') - box.prop(props, 'torus_v') - box.prop(props, 'torus_rounds') + box.prop(self.properties, 'torus_res') + box.prop(self.properties, 'torus_w') + box.prop(self.properties, 'torus_h') + box.prop(self.properties, 'torus_p') + box.prop(self.properties, 'torus_q') + box.prop(self.properties, 'options_plus') + if self.options_plus: + box.prop(self.properties, 'torus_u') + box.prop(self.properties, 'torus_v') + box.prop(self.properties, 'torus_rounds') # surface Options col = layout.column() col.label(text="Geometry Options") box = layout.box() - box.prop(props, 'geo_surf') - if props.geo_surf: - box.prop(props, 'geo_bDepth') - box.prop(props, 'geo_bRes') - box.prop(props, 'geo_extrude') - #box.prop(props, 'geo_width') # not really good - box.prop(props, 'geo_res') + box.prop(self.properties, 'geo_surf') + if self.geo_surf: + box.prop(self.properties, 'geo_bDepth') + box.prop(self.properties, 'geo_bRes') + box.prop(self.properties, 'geo_extrude') + #box.prop(self.properties, 'geo_width') # not really good + box.prop(self.properties, 'geo_res') ##### POLL ##### @classmethod @@ -282,13 +281,12 @@ class torus_knot_plus(bpy.types.Operator): undo = bpy.context.user_preferences.edit.use_global_undo bpy.context.user_preferences.edit.use_global_undo = False - props = self.properties - if not props.options_plus: - props.torus_rounds = props.torus_p + if not self.options_plus: + self.torus_rounds = self.torus_p # main function - main(context, props, self.align_matrix) + main(context, self, self.align_matrix) # restore pre operator undo state bpy.context.user_preferences.edit.use_global_undo = undo diff --git a/add_mesh_3d_function_surface.py b/add_mesh_3d_function_surface.py index 0b1db521..dd45b826 100644 --- a/add_mesh_3d_function_surface.py +++ b/add_mesh_3d_function_surface.py @@ -338,12 +338,12 @@ class AddZFunctionSurface(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - edit = self.properties.edit - equation = self.properties.equation - div_x = self.properties.div_x - div_y = self.properties.div_y - size_x = self.properties.size_x - size_y = self.properties.size_y + edit = self.edit + equation = self.equation + div_x = self.div_x + div_y = self.div_y + size_x = self.size_x + size_y = self.size_y verts = [] faces = [] @@ -580,27 +580,26 @@ class AddXYZFunctionSurface(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - props = self.properties verts, faces = xyz_function_surface_faces( self, - props.x_eq, - props.y_eq, - props.z_eq, - props.range_u_min, - props.range_u_max, - props.range_u_step, - props.wrap_u, - props.range_v_min, - props.range_v_max, - props.range_v_step, - props.wrap_v) + self.x_eq, + self.y_eq, + self.z_eq, + self.range_u_min, + self.range_u_max, + self.range_u_step, + self.wrap_u, + self.range_v_min, + self.range_v_max, + self.range_v_step, + self.wrap_v) if not verts: return {'CANCELLED'} obj = create_mesh_object(context, verts, [], faces, - "XYZ Function", props.edit, self.align_matrix) + "XYZ Function", self.edit, self.align_matrix) return {'FINISHED'} diff --git a/add_mesh_BoltFactory/Boltfactory.py b/add_mesh_BoltFactory/Boltfactory.py index 27c0d8cc..6a629758 100644 --- a/add_mesh_BoltFactory/Boltfactory.py +++ b/add_mesh_BoltFactory/Boltfactory.py @@ -208,64 +208,63 @@ class add_mesh_bolt(bpy.types.Operator): def draw(self, context): - props = self.properties layout = self.layout col = layout.column() #ENUMS - col.prop(props, 'bf_Model_Type') - col.prop(props, 'bf_presets') + col.prop(self.properties, 'bf_Model_Type') + col.prop(self.properties, 'bf_presets') col.separator() #Bit - if props.bf_Model_Type == 'bf_Model_Bolt': - col.prop(props, 'bf_Bit_Type') - if props.bf_Bit_Type == 'bf_Bit_None': + if self.bf_Model_Type == 'bf_Model_Bolt': + col.prop(self.properties, 'bf_Bit_Type') + if self.bf_Bit_Type == 'bf_Bit_None': DoNothing = 1; - elif props.bf_Bit_Type == 'bf_Bit_Allen': - col.prop(props,'bf_Allen_Bit_Depth') - col.prop(props,'bf_Allen_Bit_Flat_Distance') - elif props.bf_Bit_Type == 'bf_Bit_Philips': - col.prop(props,'bf_Phillips_Bit_Depth') - col.prop(props,'bf_Philips_Bit_Dia') + elif self.bf_Bit_Type == 'bf_Bit_Allen': + col.prop(self.properties,'bf_Allen_Bit_Depth') + col.prop(self.properties,'bf_Allen_Bit_Flat_Distance') + elif self.bf_Bit_Type == 'bf_Bit_Philips': + col.prop(self.properties,'bf_Phillips_Bit_Depth') + col.prop(self.properties,'bf_Philips_Bit_Dia') col.separator() #Head - if props.bf_Model_Type == 'bf_Model_Bolt': - col.prop(props, 'bf_Head_Type') - if props.bf_Head_Type == 'bf_Head_Hex': - col.prop(props, 'bf_Hex_Head_Height') - col.prop(props, 'bf_Hex_Head_Flat_Distance') - elif props.bf_Head_Type == 'bf_Head_Cap': - col.prop(props,'bf_Cap_Head_Height') - col.prop(props,'bf_Cap_Head_Dia') - elif props.bf_Head_Type == 'bf_Head_Dome': - col.prop(props,'bf_Dome_Head_Dia') - elif props.bf_Head_Type == 'bf_Head_Pan': - col.prop(props,'bf_Pan_Head_Dia') - elif props.bf_Head_Type == 'bf_Head_CounterSink': - col.prop(props,'bf_CounterSink_Head_Dia') + if self.bf_Model_Type == 'bf_Model_Bolt': + col.prop(self.properties, 'bf_Head_Type') + if self.bf_Head_Type == 'bf_Head_Hex': + col.prop(self.properties, 'bf_Hex_Head_Height') + col.prop(self.properties, 'bf_Hex_Head_Flat_Distance') + elif self.bf_Head_Type == 'bf_Head_Cap': + col.prop(self.properties,'bf_Cap_Head_Height') + col.prop(self.properties,'bf_Cap_Head_Dia') + elif self.bf_Head_Type == 'bf_Head_Dome': + col.prop(self.properties,'bf_Dome_Head_Dia') + elif self.bf_Head_Type == 'bf_Head_Pan': + col.prop(self.properties,'bf_Pan_Head_Dia') + elif self.bf_Head_Type == 'bf_Head_CounterSink': + col.prop(self.properties,'bf_CounterSink_Head_Dia') col.separator() #Shank - if props.bf_Model_Type == 'bf_Model_Bolt': + if self.bf_Model_Type == 'bf_Model_Bolt': col.label(text='Shank') - col.prop(props, 'bf_Shank_Length') - col.prop(props, 'bf_Shank_Dia') + col.prop(self.properties, 'bf_Shank_Length') + col.prop(self.properties, 'bf_Shank_Dia') col.separator() #Nut - if props.bf_Model_Type == 'bf_Model_Nut': - col.prop(props, 'bf_Nut_Type') - col.prop(props,'bf_Hex_Nut_Height') - col.prop(props,'bf_Hex_Nut_Flat_Distance') + if self.bf_Model_Type == 'bf_Model_Nut': + col.prop(self.properties, 'bf_Nut_Type') + col.prop(self.properties,'bf_Hex_Nut_Height') + col.prop(self.properties,'bf_Hex_Nut_Flat_Distance') #Thread col.label(text='Thread') - if props.bf_Model_Type == 'bf_Model_Bolt': - col.prop(props,'bf_Thread_Length') - col.prop(props,'bf_Major_Dia') - col.prop(props,'bf_Minor_Dia') - col.prop(props,'bf_Pitch') - col.prop(props,'bf_Crest_Percent') - col.prop(props,'bf_Root_Percent') + if self.bf_Model_Type == 'bf_Model_Bolt': + col.prop(self.properties,'bf_Thread_Length') + col.prop(self.properties,'bf_Major_Dia') + col.prop(self.properties,'bf_Minor_Dia') + col.prop(self.properties,'bf_Pitch') + col.prop(self.properties,'bf_Crest_Percent') + col.prop(self.properties,'bf_Root_Percent') @@ -278,21 +277,20 @@ class add_mesh_bolt(bpy.types.Operator): def execute(self, context): #print('EXECUTING...') - props = self.properties - if not self.last_preset or props.bf_presets != self.last_preset: - #print('setting Preset', props.bf_presets) - setProps(props, props.bf_presets, self.presetsPath) - props.bf_Phillips_Bit_Depth = float(Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)) + if not self.last_preset or self.bf_presets != self.last_preset: + #print('setting Preset', self.bf_presets) + setProps(self.properties, self.bf_presets, self.presetsPath) + self.bf_Phillips_Bit_Depth = float(Get_Phillips_Bit_Height(self.bf_Philips_Bit_Dia)) - self.last_preset = props.bf_presets + self.last_preset = self.bf_presets - #props.bf_Phillips_Bit_Depth = float(Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)) - #props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia*(1.82/5.6) - #props.bf_Minor_Dia = props.bf_Major_Dia - (1.082532 * props.bf_Pitch) + #self.bf_Phillips_Bit_Depth = float(Get_Phillips_Bit_Height(self.bf_Philips_Bit_Dia)) + #self.bf_Philips_Bit_Dia = self.bf_Pan_Head_Dia*(1.82/5.6) + #self.bf_Minor_Dia = self.bf_Major_Dia - (1.082532 * self.bf_Pitch) - Create_New_Mesh(props, context, self.align_matrix) + Create_New_Mesh(self.properties, context, self.align_matrix) return {'FINISHED'} diff --git a/add_mesh_ant_landscape.py b/add_mesh_ant_landscape.py index b1b42612..9ab3e14d 100644 --- a/add_mesh_ant_landscape.py +++ b/add_mesh_ant_landscape.py @@ -738,94 +738,92 @@ class landscape_add(bpy.types.Operator): ###------------------------------------------------------------ # Draw def draw(self, context): - props = self.properties layout = self.layout box = layout.box() - box.prop(props, 'AutoUpdate') - box.prop(props, 'SphereMesh') - box.prop(props, 'SmoothMesh') - box.prop(props, 'Subdivision') - box.prop(props, 'MeshSize') + box.prop(self.properties, 'AutoUpdate') + box.prop(self.properties, 'SphereMesh') + box.prop(self.properties, 'SmoothMesh') + box.prop(self.properties, 'Subdivision') + box.prop(self.properties, 'MeshSize') box = layout.box() - box.prop(props, 'NoiseType') - if props.NoiseType != '7': - box.prop(props, 'BasisType') - box.prop(props, 'RandomSeed') - box.prop(props, 'NoiseSize') - if props.NoiseType == '0': - box.prop(props, 'NoiseDepth') - box.prop(props, 'mDimension') - box.prop(props, 'mLacunarity') - if props.NoiseType == '1': - box.prop(props, 'NoiseDepth') - box.prop(props, 'mDimension') - box.prop(props, 'mLacunarity') - box.prop(props, 'mOffset') - box.prop(props, 'mGain') - if props.NoiseType == '2': - box.prop(props, 'NoiseDepth') - box.prop(props, 'mDimension') - box.prop(props, 'mLacunarity') - box.prop(props, 'mOffset') - box.prop(props, 'mGain') - if props.NoiseType == '3': - box.prop(props, 'NoiseDepth') - box.prop(props, 'mDimension') - box.prop(props, 'mLacunarity') - box.prop(props, 'mOffset') - if props.NoiseType == '4': - box.prop(props, 'NoiseDepth') - box.prop(props, 'mDimension') - box.prop(props, 'mLacunarity') - if props.NoiseType == '5': - box.prop(props, 'NoiseDepth') - box.prop(props, 'HardNoise') - if props.NoiseType == '6': - box.prop(props, 'VLBasisType') - box.prop(props, 'Distortion') - if props.NoiseType == '7': - box.prop(props, 'MarbleShape') - box.prop(props, 'MarbleBias') - box.prop(props, 'MarbleSharp') - box.prop(props, 'Distortion') - box.prop(props, 'NoiseDepth') - box.prop(props, 'HardNoise') - if props.NoiseType == '8': - box.prop(props, 'NoiseDepth') - box.prop(props, 'mDimension') - box.prop(props, 'mLacunarity') - box.prop(props, 'mOffset') - box.prop(props, 'Distortion') - if props.NoiseType == '9': - box.prop(props, 'NoiseDepth') - box.prop(props, 'mDimension') - box.prop(props, 'mLacunarity') - box.prop(props, 'mOffset') - box.prop(props, 'Distortion') + box.prop(self.properties, 'NoiseType') + if self.NoiseType != '7': + box.prop(self.properties, 'BasisType') + box.prop(self.properties, 'RandomSeed') + box.prop(self.properties, 'NoiseSize') + if self.NoiseType == '0': + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'mDimension') + box.prop(self.properties, 'mLacunarity') + if self.NoiseType == '1': + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'mDimension') + box.prop(self.properties, 'mLacunarity') + box.prop(self.properties, 'mOffset') + box.prop(self.properties, 'mGain') + if self.NoiseType == '2': + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'mDimension') + box.prop(self.properties, 'mLacunarity') + box.prop(self.properties, 'mOffset') + box.prop(self.properties, 'mGain') + if self.NoiseType == '3': + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'mDimension') + box.prop(self.properties, 'mLacunarity') + box.prop(self.properties, 'mOffset') + if self.NoiseType == '4': + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'mDimension') + box.prop(self.properties, 'mLacunarity') + if self.NoiseType == '5': + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'HardNoise') + if self.NoiseType == '6': + box.prop(self.properties, 'VLBasisType') + box.prop(self.properties, 'Distortion') + if self.NoiseType == '7': + box.prop(self.properties, 'MarbleShape') + box.prop(self.properties, 'MarbleBias') + box.prop(self.properties, 'MarbleSharp') + box.prop(self.properties, 'Distortion') + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'HardNoise') + if self.NoiseType == '8': + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'mDimension') + box.prop(self.properties, 'mLacunarity') + box.prop(self.properties, 'mOffset') + box.prop(self.properties, 'Distortion') + if self.NoiseType == '9': + box.prop(self.properties, 'NoiseDepth') + box.prop(self.properties, 'mDimension') + box.prop(self.properties, 'mLacunarity') + box.prop(self.properties, 'mOffset') + box.prop(self.properties, 'Distortion') box = layout.box() - box.prop(props, 'Invert') - box.prop(props, 'Height') - box.prop(props, 'Offset') - box.prop(props, 'Plateaulevel') - box.prop(props, 'Sealevel') - if props.SphereMesh == False: - box.prop(props, 'Falloff') - box.prop(props, 'StrataType') - if props.StrataType != '0': - box.prop(props, 'Strata') + box.prop(self.properties, 'Invert') + box.prop(self.properties, 'Height') + box.prop(self.properties, 'Offset') + box.prop(self.properties, 'Plateaulevel') + box.prop(self.properties, 'Sealevel') + if self.SphereMesh == False: + box.prop(self.properties, 'Falloff') + box.prop(self.properties, 'StrataType') + if self.StrataType != '0': + box.prop(self.properties, 'Strata') ###------------------------------------------------------------ # Execute def execute(self, context): - props = self.properties - edit = props.edit + edit = self.edit #mesh update - if props.AutoUpdate != 0: + if self.AutoUpdate != 0: # turn off undo undo = bpy.context.user_preferences.edit.use_global_undo @@ -836,51 +834,51 @@ class landscape_add(bpy.types.Operator): # options options = [ - props.RandomSeed, #0 - props.NoiseSize, #1 - props.NoiseType, #2 - props.BasisType, #3 - props.VLBasisType, #4 - props.Distortion, #5 - props.HardNoise, #6 - props.NoiseDepth, #7 - props.mDimension, #8 - props.mLacunarity, #9 - props.mOffset, #10 - props.mGain, #11 - props.MarbleBias, #12 - props.MarbleSharp, #13 - props.MarbleShape, #14 - props.Invert, #15 - props.Height, #16 - props.Offset, #17 - props.Falloff, #18 - props.Sealevel, #19 - props.Plateaulevel, #20 - props.Strata, #21 - props.StrataType, #22 - props.SphereMesh #23 + self.RandomSeed, #0 + self.NoiseSize, #1 + self.NoiseType, #2 + self.BasisType, #3 + self.VLBasisType, #4 + self.Distortion, #5 + self.HardNoise, #6 + self.NoiseDepth, #7 + self.mDimension, #8 + self.mLacunarity, #9 + self.mOffset, #10 + self.mGain, #11 + self.MarbleBias, #12 + self.MarbleSharp, #13 + self.MarbleShape, #14 + self.Invert, #15 + self.Height, #16 + self.Offset, #17 + self.Falloff, #18 + self.Sealevel, #19 + self.Plateaulevel, #20 + self.Strata, #21 + self.StrataType, #22 + self.SphereMesh #23 ] # Main function - if props.SphereMesh !=0: + if self.SphereMesh !=0: # sphere - verts, faces = sphere_gen( props.Subdivision, props.MeshSize, options ) + verts, faces = sphere_gen( self.Subdivision, self.MeshSize, options ) else: # grid - verts, faces = grid_gen( props.Subdivision, props.MeshSize, options ) + verts, faces = grid_gen( self.Subdivision, self.MeshSize, options ) # create mesh object obj = create_mesh_object(context, verts, [], faces, "Landscape", edit, self.align_matrix) # sphere, remove doubles - if props.SphereMesh !=0: + if self.SphereMesh !=0: bpy.ops.object.mode_set(mode='EDIT') bpy.ops.mesh.remove_doubles(limit=0.0001) bpy.ops.object.mode_set(mode='OBJECT') # Shade smooth - if props.SmoothMesh !=0: + if self.SmoothMesh !=0: bpy.ops.object.shade_smooth() # restore pre operator undo state diff --git a/add_mesh_extras.py b/add_mesh_extras.py index 1df801b2..ec38b343 100644 --- a/add_mesh_extras.py +++ b/add_mesh_extras.py @@ -533,16 +533,15 @@ class AddSqorus(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - props = self.properties # Create mesh geometry verts, faces = add_sqorus( - props.hole_size, - props.subdivide) + self.hole_size, + self.subdivide) # Create mesh object (and meshdata) obj = create_mesh_object(context, verts, [], faces, "Sqorus", - props.edit, self.align_matrix) + self.edit, self.align_matrix) return {'FINISHED'} @@ -580,15 +579,14 @@ class AddWedge(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - props = self.properties verts, faces = add_wedge( - props.size_x, - props.size_y, - props.size_z) + self.size_x, + self.size_y, + self.size_z) obj = create_mesh_object(context, verts, [], faces, "Wedge", - props.edit, self.align_matrix) + self.edit, self.align_matrix) return {'FINISHED'} @@ -632,16 +630,15 @@ class AddSpindle(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - props = self.properties verts, faces = add_spindle( - props.segments, - props.radius, - props.height, - props.cap_height) + self.segments, + self.radius, + self.height, + self.cap_height) obj = create_mesh_object(context, verts, [], faces, "Spindle", - props.edit, self.align_matrix) + self.edit, self.align_matrix) return {'FINISHED'} @@ -684,16 +681,15 @@ class AddStar(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - props = self.properties verts, faces = add_star( - props.points, - props.outer_radius, - props.innter_radius, - props.height) + self.points, + self.outer_radius, + self.innter_radius, + self.height) obj = create_mesh_object(context, verts, [], faces, "Star", - props.edit, self.align_matrix) + self.edit, self.align_matrix) return {'FINISHED'} @@ -724,14 +720,13 @@ class AddTrapezohedron(bpy.types.Operator): options={'HIDDEN'}) align_matrix = Matrix() def execute(self,context): - props = self.properties # generate mesh - verts,faces = trapezohedron(props.segments, - props.radius, - props.height) + verts,faces = trapezohedron(self.segments, + self.radius, + self.height) obj = create_mesh_object(context, verts, [], faces, "Trapazohedron", - props.edit, self.align_matrix) + self.edit, self.align_matrix) return {'FINISHED'} diff --git a/add_mesh_gears.py b/add_mesh_gears.py index 6063b035..0cf6bfcd 100644 --- a/add_mesh_gears.py +++ b/add_mesh_gears.py @@ -749,41 +749,39 @@ class AddGear(bpy.types.Operator): align_matrix = mathutils.Matrix() def draw(self, context): - props = self.properties layout = self.layout box = layout.box() - box.prop(props, 'number_of_teeth') + box.prop(self.properties, 'number_of_teeth') box = layout.box() - box.prop(props, 'radius') - box.prop(props, 'width') - box.prop(props, 'base') + box.prop(self.properties, 'radius') + box.prop(self.properties, 'width') + box.prop(self.properties, 'base') box = layout.box() - box.prop(props, 'dedendum') - box.prop(props, 'addendum') + box.prop(self.properties, 'dedendum') + box.prop(self.properties, 'addendum') box = layout.box() - box.prop(props, 'angle') - box.prop(props, 'skew') - box.prop(props, 'conangle') - box.prop(props, 'crown') + box.prop(self.properties, 'angle') + box.prop(self.properties, 'skew') + box.prop(self.properties, 'conangle') + box.prop(self.properties, 'crown') def execute(self, context): - props = self.properties verts, faces, verts_tip, verts_valley = add_gear( - props.number_of_teeth, - props.radius, - props.addendum, - props.dedendum, - props.base, - radians(props.angle), - width=props.width, - skew=radians(props.skew), - conangle=radians(props.conangle), - crown=props.crown) + self.number_of_teeth, + self.radius, + self.addendum, + self.dedendum, + self.base, + radians(self.angle), + width=self.width, + skew=radians(self.skew), + conangle=radians(self.conangle), + crown=self.crown) # Actually create the mesh object from this geometry data. - obj = create_mesh_object(context, verts, [], faces, "Gear", props.edit, self.align_matrix) + obj = create_mesh_object(context, verts, [], faces, "Gear", self.edit, self.align_matrix) # Create vertex groups from stored vertices. tipGroup = obj.vertex_groups.new('Tips') @@ -858,38 +856,36 @@ class AddWormGear(bpy.types.Operator): align_matrix = mathutils.Matrix() def draw(self, context): - props = self.properties layout = self.layout box = layout.box() - box.prop(props, 'number_of_teeth') - box.prop(props, 'number_of_rows') - box.prop(props, 'radius') - box.prop(props, 'row_height') + box.prop(self.properties, 'number_of_teeth') + box.prop(self.properties, 'number_of_rows') + box.prop(self.properties, 'radius') + box.prop(self.properties, 'row_height') box = layout.box() - box.prop(props, 'addendum') - box.prop(props, 'dedendum') + box.prop(self.properties, 'addendum') + box.prop(self.properties, 'dedendum') box = layout.box() - box.prop(props, 'angle') - box.prop(props, 'skew') - box.prop(props, 'crown') + box.prop(self.properties, 'angle') + box.prop(self.properties, 'skew') + box.prop(self.properties, 'crown') def execute(self, context): - props = self.properties verts, faces, verts_tip, verts_valley = add_worm( - props.number_of_teeth, - props.number_of_rows, - props.radius, - props.addendum, - props.dedendum, - radians(props.angle), - width=props.row_height, - skew=radians(props.skew), - crown=props.crown) + self.number_of_teeth, + self.number_of_rows, + self.radius, + self.addendum, + self.dedendum, + radians(self.angle), + width=self.row_height, + skew=radians(self.skew), + crown=self.crown) # Actually create the mesh object from this geometry data. obj = create_mesh_object(context, verts, [], faces, "Worm Gear", - props.edit, self.align_matrix) + self.edit, self.align_matrix) # Create vertex groups from stored vertices. tipGroup = obj.vertex_groups.new('Tips') diff --git a/add_mesh_gemstones.py b/add_mesh_gemstones.py index 984734e6..432879c0 100644 --- a/add_mesh_gemstones.py +++ b/add_mesh_gemstones.py @@ -360,15 +360,14 @@ class AddDiamond(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - props = self.properties - verts, faces = add_diamond(props.segments, - props.girdle_radius, - props.table_radius, - props.crown_height, - props.pavilion_height) + verts, faces = add_diamond(self.segments, + self.girdle_radius, + self.table_radius, + self.crown_height, + self.pavilion_height) obj = create_mesh_object(context, verts, [], faces, - "Diamond", props.edit, self.align_matrix) + "Diamond", self.edit, self.align_matrix) return {'FINISHED'} @@ -417,17 +416,16 @@ class AddGem(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - props = self.properties # create mesh verts, faces = add_gem( - props.pavilion_radius, - props.crown_radius, - props.segments, - props.pavilion_height, - props.crown_height) + self.pavilion_radius, + self.crown_radius, + self.segments, + self.pavilion_height, + self.crown_height) - obj = create_mesh_object(context, verts, [], faces, "Gem", props.edit, self.align_matrix) + obj = create_mesh_object(context, verts, [], faces, "Gem", self.edit, self.align_matrix) return {'FINISHED'} diff --git a/add_mesh_pipe_joint.py b/add_mesh_pipe_joint.py index 76650814..673edf74 100644 --- a/add_mesh_pipe_joint.py +++ b/add_mesh_pipe_joint.py @@ -355,15 +355,15 @@ class AddElbowJoint(bpy.types.Operator): align_matrix = mathutils.Matrix() def execute(self, context): - edit = self.properties.edit + edit = self.edit - radius = self.properties.radius - div = self.properties.div + radius = self.radius + div = self.div - angle = self.properties.angle + angle = self.angle - startLength = self.properties.startLength - endLength = self.properties.endLength + startLength = self.startLength + endLength = self.endLength verts = [] faces = [] @@ -480,16 +480,16 @@ class AddTeeJoint(bpy.types.Operator): align_matrix = mathutils.Matrix() def execute(self, context): - edit = self.properties.edit + edit = self.edit - radius = self.properties.radius - div = self.properties.div + radius = self.radius + div = self.div - angle = self.properties.angle + angle = self.angle - startLength = self.properties.startLength - endLength = self.properties.endLength - branchLength = self.properties.branchLength + startLength = self.startLength + endLength = self.endLength + branchLength = self.branchLength if (div % 2): # Odd vertice number not supported (yet). @@ -677,17 +677,17 @@ class AddWyeJoint(bpy.types.Operator): align_matrix = mathutils.Matrix() def execute(self, context): - edit = self.properties.edit + edit = self.edit - radius = self.properties.radius - div = self.properties.div + radius = self.radius + div = self.div - angle1 = self.properties.angle1 - angle2 = self.properties.angle2 + angle1 = self.angle1 + angle2 = self.angle2 - startLength = self.properties.startLength - branch1Length = self.properties.branch1Length - branch2Length = self.properties.branch2Length + startLength = self.startLength + branch1Length = self.branch1Length + branch2Length = self.branch2Length if (div % 2): # Odd vertice number not supported (yet). @@ -896,19 +896,19 @@ class AddCrossJoint(bpy.types.Operator): align_matrix = mathutils.Matrix() def execute(self, context): - edit = self.properties.edit + edit = self.edit - radius = self.properties.radius - div = self.properties.div + radius = self.radius + div = self.div - angle1 = self.properties.angle1 - angle2 = self.properties.angle2 - angle3 = self.properties.angle3 + angle1 = self.angle1 + angle2 = self.angle2 + angle3 = self.angle3 - startLength = self.properties.startLength - branch1Length = self.properties.branch1Length - branch2Length = self.properties.branch2Length - branch3Length = self.properties.branch3Length + startLength = self.startLength + branch1Length = self.branch1Length + branch2Length = self.branch2Length + branch3Length = self.branch3Length if (div % 2): # Odd vertice number not supported (yet). return {'CANCELLED'} @@ -1131,11 +1131,11 @@ class AddNJoint(bpy.types.Operator): align_matrix = mathutils.Matrix() def execute(self, context): - edit = self.properties.edit - radius = self.properties.radius - div = self.properties.div - number = self.properties.number - length = self.properties.length + edit = self.edit + radius = self.radius + div = self.div + number = self.number + length = self.length if (div % 2): # Odd vertice number not supported (yet). diff --git a/add_mesh_solid.py b/add_mesh_solid.py index 0822250a..be29e658 100644 --- a/add_mesh_solid.py +++ b/add_mesh_solid.py @@ -746,40 +746,39 @@ class Solids(bpy.types.Operator): # that mesh ops are undoable and entire script acts as one operator bpy.context.user_preferences.edit.use_global_undo = False - props = self.properties #if preset, set preset - if props.preset != "0": - using = self.p[props.preset] - props.source = using[0] - props.vTrunc = using[1] - props.eTrunc = using[2] - props.dual = using[3] - props.snub = using[4] - props.preset = "0" + if self.preset != "0": + using = self.p[self.preset] + self.source = using[0] + self.vTrunc = using[1] + self.eTrunc = using[2] + self.dual = using[3] + self.snub = using[4] + self.preset = "0" # generate mesh - verts,faces = createSolid(props.source, - props.vTrunc, - props.eTrunc, - props.dual, - props.snub) + verts,faces = createSolid(self.source, + self.vTrunc, + self.eTrunc, + self.dual, + self.snub) # turn n-gons in quads and tri's faces = createPolys(faces) # resize to normal size, or if keepSize, make sure all verts are of length 'size' - if props.keepSize: - rad = props.size/verts[0].length - else: rad = props.size + if self.keepSize: + rad = self.size/verts[0].length + else: rad = self.size verts = [i*rad for i in verts] # generate object - obj = create_mesh_object(context,verts,[],faces,"Solid",props.edit) + obj = create_mesh_object(context,verts,[],faces,"Solid",self.edit) # vertices will be on top of each other in some cases, # so remove doubles then - if ((props.vTrunc == 1) and (props.eTrunc == 0)) or (props.eTrunc == 1): + if ((self.vTrunc == 1) and (self.eTrunc == 0)) or (self.eTrunc == 1): current_mode = obj.mode if current_mode == 'OBJECT': bpy.ops.object.mode_set(mode='EDIT') @@ -788,7 +787,7 @@ class Solids(bpy.types.Operator): bpy.ops.object.mode_set(mode=current_mode) # snub duals suck, so make all normals point outwards - if props.dual and (props.snub != "0"): + if self.dual and (self.snub != "0"): current_mode = obj.mode if current_mode == 'OBJECT': bpy.ops.object.mode_set(mode='EDIT') diff --git a/add_mesh_twisted_torus.py b/add_mesh_twisted_torus.py index c2a598ec..fe390636 100644 --- a/add_mesh_twisted_torus.py +++ b/add_mesh_twisted_torus.py @@ -322,23 +322,22 @@ class AddTwistedTorus(bpy.types.Operator): align_matrix = Matrix() def execute(self, context): - props = self.properties - if props.use_abso == True: - extra_helper = (props.abso_major_rad - props.abso_minor_rad) * 0.5 - props.major_radius = props.abso_minor_rad + extra_helper - props.minor_radius = extra_helper + if self.use_abso == True: + extra_helper = (self.abso_major_rad - self.abso_minor_rad) * 0.5 + self.major_radius = self.abso_minor_rad + extra_helper + self.minor_radius = extra_helper verts, faces = add_twisted_torus( - props.major_radius, - props.minor_radius, - props.major_segments, - props.minor_segments, - props.twists) + self.major_radius, + self.minor_radius, + self.major_segments, + self.minor_segments, + self.twists) # Actually create the mesh object from this geometry data. obj = create_mesh_object(context, verts, [], faces, "TwistedTorus", - props.edit, self.align_matrix) + self.edit, self.align_matrix) return {'FINISHED'} diff --git a/curve_simplify.py b/curve_simplify.py index f723b99d..e3e6a8ca 100644 --- a/curve_simplify.py +++ b/curve_simplify.py @@ -21,7 +21,7 @@ bl_addon_info = { "author": "testscreenings", "version": (1,), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "Toolshelf > search > simplify curves", "description": "This script simplifies 3D curves and fcurves", "warning": "", @@ -399,31 +399,29 @@ class GRAPH_OT_simplify(bpy.types.Operator): ''' Remove curvature mode as long as it isnn't significantly improved def draw(self, context): - props = self.properties layout = self.layout col = layout.column() col.label('Mode:') - col.prop(props, 'mode', expand=True) - if self.properties.mode == 'distance': + col.prop(self.properties, 'mode', expand=True) + if self.mode == 'distance': box = layout.box() - box.label(props.mode, icon='ARROW_LEFTRIGHT') - box.prop(props, 'error', expand=True) - if self.properties.mode == 'curvature': + box.label(self.mode, icon='ARROW_LEFTRIGHT') + box.prop(self.properties, 'error', expand=True) + if self.mode == 'curvature': box = layout.box() box.label('degree', icon='SMOOTHCURVE') - box.prop(props, 'pointsNr', expand=True) + box.prop(self.properties, 'pointsNr', expand=True) box.label('threshold', icon='PARTICLE_PATH') - box.prop(props, 'k_thresh', expand=True) + box.prop(self.properties, 'k_thresh', expand=True) box.label('distance', icon='ARROW_LEFTRIGHT') - box.prop(props, 'dis_error', expand=True) + box.prop(self.properties, 'dis_error', expand=True) col = layout.column() ''' def draw(self, context): - props = self.properties layout = self.layout col = layout.column() - col.prop(props, 'error', expand=True) + col.prop(self.properties, 'error', expand=True) ## Check for animdata @classmethod @@ -443,13 +441,13 @@ class GRAPH_OT_simplify(bpy.types.Operator): #print("------START------") options = [ - self.properties.mode, #0 - self.properties.mode, #1 - self.properties.k_thresh, #2 - self.properties.pointsNr, #3 - self.properties.error, #4 - self.properties.degreeOut, #6 - self.properties.dis_error] #7 + self.mode, #0 + self.mode, #1 + self.k_thresh, #2 + self.pointsNr, #3 + self.error, #4 + self.degreeOut, #6 + self.dis_error] #7 obj = context.active_object @@ -515,40 +513,38 @@ class CURVE_OT_simplify(bpy.types.Operator): ''' Remove curvature mode as long as it isnn't significantly improved def draw(self, context): - props = self.properties layout = self.layout col = layout.column() col.label('Mode:') - col.prop(props, 'mode', expand=True) - if self.properties.mode == 'distance': + col.prop(self.properties, 'mode', expand=True) + if self.mode == 'distance': box = layout.box() - box.label(props.mode, icon='ARROW_LEFTRIGHT') - box.prop(props, 'error', expand=True) - if self.properties.mode == 'curvature': + box.label(self.mode, icon='ARROW_LEFTRIGHT') + box.prop(self.properties, 'error', expand=True) + if self.mode == 'curvature': box = layout.box() box.label('degree', icon='SMOOTHCURVE') - box.prop(props, 'pointsNr', expand=True) + box.prop(self.properties, 'pointsNr', expand=True) box.label('threshold', icon='PARTICLE_PATH') - box.prop(props, 'k_thresh', expand=True) + box.prop(self.properties, 'k_thresh', expand=True) box.label('distance', icon='ARROW_LEFTRIGHT') - box.prop(props, 'dis_error', expand=True) + box.prop(self.properties, 'dis_error', expand=True) col = layout.column() col.separator() - col.prop(props, 'output', text='Output', icon='OUTLINER_OB_CURVE') - if props.output == 'NURBS': - col.prop(props, 'degreeOut', expand=True) - col.prop(props, 'keepShort', expand=True) + col.prop(self.properties, 'output', text='Output', icon='OUTLINER_OB_CURVE') + if self.output == 'NURBS': + col.prop(self.properties, 'degreeOut', expand=True) + col.prop(self.properties, 'keepShort', expand=True) ''' def draw(self, context): - props = self.properties layout = self.layout col = layout.column() - col.prop(props, 'error', expand=True) - col.prop(props, 'output', text='Output', icon='OUTLINER_OB_CURVE') - if props.output == 'NURBS': - col.prop(props, 'degreeOut', expand=True) - col.prop(props, 'keepShort', expand=True) + col.prop(self.properties, 'error', expand=True) + col.prop(self.properties, 'output', text='Output', icon='OUTLINER_OB_CURVE') + if self.output == 'NURBS': + col.prop(self.properties, 'degreeOut', expand=True) + col.prop(self.properties, 'keepShort', expand=True) ## Check for curve @@ -562,14 +558,14 @@ class CURVE_OT_simplify(bpy.types.Operator): #print("------START------") options = [ - self.properties.mode, #0 - self.properties.output, #1 - self.properties.k_thresh, #2 - self.properties.pointsNr, #3 - self.properties.error, #4 - self.properties.degreeOut, #5 - self.properties.dis_error, #6 - self.properties.keepShort] #7 + self.mode, #0 + self.output, #1 + self.k_thresh, #2 + self.pointsNr, #3 + self.error, #4 + self.degreeOut, #5 + self.dis_error, #6 + self.keepShort] #7 bpy.context.user_preferences.edit.use_global_undo = False diff --git a/io_anim_camera.py b/io_anim_camera.py index 50951226..582ae507 100644 --- a/io_anim_camera.py +++ b/io_anim_camera.py @@ -23,7 +23,7 @@ bl_addon_info = { "author": "Campbell Barton", "version": (0,1), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "File > Export > Camera Animation", "description": "Export Cameras & Markers", "warning": "", @@ -134,12 +134,12 @@ class CameraExporter(bpy.types.Operator): default=True) def execute(self, context): - writeCameras(context, self.properties.filepath, self.properties.frame_start, self.properties.frame_end, self.properties.show_only_selected) + writeCameras(context, self.filepath, self.frame_start, self.frame_end, self.show_only_selected) return {'FINISHED'} def invoke(self, context, event): - self.properties.frame_start = context.scene.frame_start - self.properties.frame_end = context.scene.frame_end + self.frame_start = context.scene.frame_start + self.frame_end = context.scene.frame_end wm = context.window_manager wm.add_fileselect(self) diff --git a/io_export_directx_x.py b/io_export_directx_x.py index e32f542a..9d13e69c 100644 --- a/io_export_directx_x.py +++ b/io_export_directx_x.py @@ -20,7 +20,7 @@ bl_addon_info = { "author": "Chris Foster (Kira Vakaan)", "version": (1,6), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "File > Export", "description": "Export to the DirectX Model Format (.x)", "warning": "", @@ -1112,22 +1112,22 @@ class DirectXExporter(bpy.types.Operator): def execute(self, context): #Append .x if needed - FilePath = self.properties.filepath + FilePath = self.filepath if not FilePath.lower().endswith(".x"): FilePath += ".x" Config = DirectXExporterSettings(context, FilePath, - CoordinateSystem=self.properties.CoordinateSystem, - RotateX=self.properties.RotateX, - FlipNormals=self.properties.FlipNormals, - ApplyModifiers=self.properties.ApplyModifiers, - IncludeFrameRate=self.properties.IncludeFrameRate, - ExportTextures=self.properties.ExportTextures, - ExportArmatures=self.properties.ExportArmatures, - ExportAnimation=self.properties.ExportAnimation, - ExportMode=self.properties.ExportMode, - Verbose=self.properties.Verbose) + CoordinateSystem=self.CoordinateSystem, + RotateX=self.RotateX, + FlipNormals=self.FlipNormals, + ApplyModifiers=self.ApplyModifiers, + IncludeFrameRate=self.IncludeFrameRate, + ExportTextures=self.ExportTextures, + ExportArmatures=self.ExportArmatures, + ExportAnimation=self.ExportAnimation, + ExportMode=self.ExportMode, + Verbose=self.Verbose) ExportDirectX(Config) return {"FINISHED"} diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py index 50dd2cff..7fc94bea 100644 --- a/io_import_images_as_planes.py +++ b/io_import_images_as_planes.py @@ -21,7 +21,7 @@ bl_addon_info = { "author": "Florian Meyer (testscreenings)", "version": (0,7), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "File > Import > Images as Planes", "description": "Imports images and creates planes with the appropriate aspect ratio. The images are mapped to the planes.", "warning": "", @@ -445,44 +445,43 @@ class ImportImagesAsPlanes(bpy.types.Operator): default=500) def draw(self, context): - props = self.properties layout = self.layout box = layout.box() box.label('Filter:', icon='FILTER') - box.prop(props, 'fromDirectory') - box.prop(props, 'extension', icon='FILE_IMAGE') + box.prop(self.properties, 'fromDirectory') + box.prop(self.properties, 'extension', icon='FILE_IMAGE') box = layout.box() box.label('Material mappings:', icon='MATERIAL') - box.prop(props, 'use_shadeless') - box.prop(props, 'transp') - box.prop(props, 'use_premultiply') - box.prop(props, 'transp_method', expand=True) + box.prop(self.properties, 'use_shadeless') + box.prop(self.properties, 'transp') + box.prop(self.properties, 'use_premultiply') + box.prop(self.properties, 'transp_method', expand=True) box = layout.box() box.label('Plane dimensions:', icon='ARROW_LEFTRIGHT') - box.prop(props, 'useDim') - box.prop(props, 'factor', expand=True) + box.prop(self.properties, 'useDim') + box.prop(self.properties, 'factor', expand=True) def execute(self, context): # File Path - filepath = self.properties.filepath - filename = self.properties.filename - directory = self.properties.directory + filepath = self.filepath + filename = self.filename + directory = self.directory filePath = (filepath, filename, directory) # General Options - fromDirectory = self.properties.fromDirectory - extension = self.properties.extension + fromDirectory = self.fromDirectory + extension = self.extension options = {'dir': fromDirectory, 'ext': extension} # Mapping alphavalue = 1 - transp = self.properties.transp + transp = self.transp if transp: alphavalue = 0 - shadeless = self.properties.use_shadeless - transp_method = self.properties.transp_method - premultiply = self.properties.use_premultiply + shadeless = self.use_shadeless + transp_method = self.transp_method + premultiply = self.use_premultiply mapping = ([shadeless, transp, @@ -492,8 +491,8 @@ class ImportImagesAsPlanes(bpy.types.Operator): premultiply]) # Use Pixelsdimensions - useDim = self.properties.useDim - factor = self.properties.factor + useDim = self.useDim + factor = self.factor dimension = (useDim, factor) # Call Main Function diff --git a/io_import_scene_lwo.py b/io_import_scene_lwo.py index c2d75f97..3923e9d5 100644 --- a/io_import_scene_lwo.py +++ b/io_import_scene_lwo.py @@ -23,7 +23,7 @@ bl_addon_info= { "author": "Ken Nign (Ken9)", "version": (1, 2), "blender": (2, 5, 3), - "api": 31744, + "api": 31847, "location": "File > Import > LightWave Object (.lwo)", "description": "Imports a LWO file including any UV, Morph and Color maps. Can convert Skelegons to an Armature.", "warning": "", @@ -1221,11 +1221,11 @@ class IMPORT_OT_lwo(bpy.types.Operator): SKEL_TO_ARM= BoolProperty(name="Create Armature", description="Create an armature from an embedded Skelegon rig", default=True) def execute(self, context): - load_lwo(self.properties.filepath, + load_lwo(self.filepath, context, - self.properties.ADD_SUBD_MOD, - self.properties.LOAD_HIDDEN, - self.properties.SKEL_TO_ARM) + self.ADD_SUBD_MOD, + self.LOAD_HIDDEN, + self.SKEL_TO_ARM) return {'FINISHED'} def invoke(self, context, event): diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py index bc637c9e..a99f17d0 100644 --- a/io_import_scene_mhx.py +++ b/io_import_scene_mhx.py @@ -21,7 +21,7 @@ bl_addon_info = { "author": "Thomas Larsson", "version": (0,9,5), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "File > Import", "description": "Import files in the MakeHuman eXchange format (.mhx)", "warning": "Alpha version", @@ -2123,20 +2123,20 @@ class IMPORT_OT_makehuman_mhx(bpy.types.Operator): def execute(self, context): global toggle - O_Mesh = T_Mesh if self.properties.mesh else 0 - O_Armature = T_Armature if self.properties.armature else 0 - O_Proxy = T_Proxy if self.properties.proxy else 0 - O_Replace = T_Replace if self.properties.replace else 0 - O_Face = T_Face if self.properties.face else 0 - O_Shape = T_Shape if self.properties.shape else 0 - O_Symm = T_Symm if self.properties.symm else 0 - #O_Preset = T_Preset if self.properties.preset else 0 + O_Mesh = T_Mesh if self.mesh else 0 + O_Armature = T_Armature if self.armature else 0 + O_Proxy = T_Proxy if self.proxy else 0 + O_Replace = T_Replace if self.replace else 0 + O_Face = T_Face if self.face else 0 + O_Shape = T_Shape if self.shape else 0 + O_Symm = T_Symm if self.symm else 0 + #O_Preset = T_Preset if self.preset else 0 toggle = O_Mesh | O_Armature | O_Proxy | T_ArmIK | T_LegIK | O_Replace | O_Face | O_Shape | O_Symm | T_MHX - readMhxFile(self.properties.filepath, - (self.properties.footRig, - self.properties.fingerRig)) + readMhxFile(self.filepath, + (self.footRig, + self.fingerRig)) return {'FINISHED'} def invoke(self, context, event): @@ -2183,22 +2183,22 @@ class MakeHumanFingerPanel(bpy.types.Panel): def registerPanels(): - bpy.types.Object.FloatProperty(attr="PArmIK_L", name="L arm - IK", default = 0, min = 0.0, max = 1.0) - bpy.types.Object.FloatProperty(attr="PArmIK_R", name="R arm - IK", default = 0, min = 0.0, max = 1.0) - bpy.types.Object.FloatProperty(attr="PLegIK_L", name="L leg - IK", default = 0, min = 0.0, max = 1.0) - bpy.types.Object.FloatProperty(attr="PLegIK_R", name="R leg - IK", default = 0, min = 0.0, max = 1.0) - - bpy.types.Object.FloatProperty(attr="PHandLocal_L", name="L hand - Loc", default = 0, min = 0.0, max = 1.0) - bpy.types.Object.FloatProperty(attr="PHandLocal_R", name="R hand - Loc", default = 0, min = 0.0, max = 1.0) - bpy.types.Object.FloatProperty(attr="PFootLocal_L", name="L foot - Loc", default = 0, min = 0.0, max = 1.0) - bpy.types.Object.FloatProperty(attr="PFootLocal_R", name="R foot - Loc", default = 0, min = 0.0, max = 1.0) - - bpy.types.PoseBone.FloatProperty(attr="MHCone", name="Cone", default = 0, min = -0.5, max = 1.0) - bpy.types.PoseBone.FloatProperty(attr="MHRelax", name="Relax", default = 0, min = -0.5, max = 1.0) - bpy.types.PoseBone.FloatProperty(attr="MHCurl", name="Curl", default = 0, min = -0.5, max = 1.0) - bpy.types.PoseBone.FloatProperty(attr="MHLean", name="Lean", default = 0, min = -1.0, max = 1.0) - bpy.types.PoseBone.FloatProperty(attr="MHScrunch", name="Scrunch", default = 0, min = -0.5, max = 1.0) - bpy.types.PoseBone.FloatProperty(attr="MHSpread", name="Spread", default = 0, min = -0.5, max = 1.0) + bpy.types.Object.PArmIK_L = FloatProperty(name="L arm - IK", default = 0, min = 0.0, max = 1.0) + bpy.types.Object.PArmIK_R = FloatProperty(name="R arm - IK", default = 0, min = 0.0, max = 1.0) + bpy.types.Object.PLegIK_L = FloatProperty(name="L leg - IK", default = 0, min = 0.0, max = 1.0) + bpy.types.Object.PLegIK_R = FloatProperty(name="R leg - IK", default = 0, min = 0.0, max = 1.0) + + bpy.types.Object.PHandLocal_L = FloatProperty(name="L hand - Loc", default = 0, min = 0.0, max = 1.0) + bpy.types.Object.PHandLocal_R = FloatProperty(name="R hand - Loc", default = 0, min = 0.0, max = 1.0) + bpy.types.Object.PFootLocal_L = FloatProperty(name="L foot - Loc", default = 0, min = 0.0, max = 1.0) + bpy.types.Object.PFootLocal_R = FloatProperty(name="R foot - Loc", default = 0, min = 0.0, max = 1.0) + + bpy.types.PoseBone.MHCone = FloatProperty(name="Cone", default = 0, min = -0.5, max = 1.0) + bpy.types.PoseBone.MHRelax = FloatProperty(name="Relax", default = 0, min = -0.5, max = 1.0) + bpy.types.PoseBone.MHCurl = FloatProperty(name="Curl", default = 0, min = -0.5, max = 1.0) + bpy.types.PoseBone.MHLean = FloatProperty(name="Lean", default = 0, min = -1.0, max = 1.0) + bpy.types.PoseBone.MHScrunch = FloatProperty(name="Scrunch", default = 0, min = -0.5, max = 1.0) + bpy.types.PoseBone.MHSpread = FloatProperty(name="Spread", default = 0, min = -0.5, max = 1.0) bpy.types.register(MakeHumanFKIKPanel) bpy.types.register(MakeHumanFingerPanel) diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py index 0c2e878b..8ef69852 100644 --- a/io_import_scene_unreal_psk.py +++ b/io_import_scene_unreal_psk.py @@ -21,7 +21,7 @@ bl_addon_info = { "author": "Darknet", "version": (2,0), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "File > Import ", "description": "Import Unreal Engine (.psk)", "warning": "", @@ -576,7 +576,7 @@ class IMPORT_OT_psk(bpy.types.Operator): filepath = StringProperty(name="File Path", description="Filepath used for importing the OBJ file", maxlen= 1024, default= "") def execute(self, context): - getInputFilename(self.properties.filepath) + getInputFilename(self.filepath) return {'FINISHED'} def invoke(self, context, event): diff --git a/io_mesh_raw/export_raw.py b/io_mesh_raw/export_raw.py index 59f06f9d..59881564 100644 --- a/io_mesh_raw/export_raw.py +++ b/io_mesh_raw/export_raw.py @@ -101,7 +101,7 @@ class RawExporter(bpy.types.Operator): triangulate = BoolProperty(name="Triangulate", description="Triangulate quads.", default=True) def execute(self, context): - export_raw(self.properties.filepath, self.properties.apply_modifiers, self.properties.triangulate) + export_raw(self.filepath, self.apply_modifiers, self.triangulate) return {'FINISHED'} def invoke(self, context, event): diff --git a/io_mesh_raw/import_raw.py b/io_mesh_raw/import_raw.py index d6b70e0b..1cbf0a31 100644 --- a/io_mesh_raw/import_raw.py +++ b/io_mesh_raw/import_raw.py @@ -128,9 +128,9 @@ class RawImporter(bpy.types.Operator): def execute(self, context): #convert the filename to an object name - objName = bpy.path.display_name(self.properties.filename) + objName = bpy.path.display_name(self.filename) - mesh = readMesh(self.properties.filepath, objName) + mesh = readMesh(self.filepath, objName) addMeshObj(mesh, objName) return {'FINISHED'} diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py index 96e8fc32..40f8a363 100644 --- a/io_mesh_stl/__init__.py +++ b/io_mesh_stl/__init__.py @@ -80,7 +80,7 @@ class StlImporter(bpy.types.Operator): directory = StringProperty() def execute(self, context): - paths = (os.path.join(self.properties.directory, name.name) for name in self.properties.files) + paths = (os.path.join(self.directory, name.name) for name in self.files) for path in paths: objName = bpy.path.display_name(path.split("\\")[-1].split("/")[-1]) @@ -125,10 +125,10 @@ class StlExporter(bpy.types.Operator): def execute(self, context): faces = itertools.chain.from_iterable( - blender_utils.faces_from_mesh(ob, self.properties.apply_modifiers) + blender_utils.faces_from_mesh(ob, self.apply_modifiers) for ob in context.selected_objects) - stl_utils.write_stl(self.properties.filepath, faces, self.properties.ascii) + stl_utils.write_stl(self.filepath, faces, self.ascii) return {'FINISHED'} diff --git a/mesh_relax.py b/mesh_relax.py index 1a971a93..a9e476b7 100644 --- a/mesh_relax.py +++ b/mesh_relax.py @@ -26,7 +26,7 @@ bl_addon_info = { "author": "Fabian Fricke", "version": (1,1), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "View3D > Specials > Relax ", "description": "Relax the selected verts while retaining the shape", "warning": "", @@ -107,7 +107,7 @@ class Relax(bpy.types.Operator): return (obj and obj.type == 'MESH') def execute(self, context): - for i in range(0,self.properties.iterations): + for i in range(0,self.iterations): relax_mesh(context) return {'FINISHED'} diff --git a/mesh_surface_sketch.py b/mesh_surface_sketch.py index 41bc79c7..46f2f21d 100644 --- a/mesh_surface_sketch.py +++ b/mesh_surface_sketch.py @@ -21,7 +21,7 @@ bl_addon_info = { "author": "Eclectiel", "version": (0,8), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "View3D > EditMode > ToolShelf", "description": "Draw meshes and re-topologies with Grease Pencil", "warning": "Beta", diff --git a/render_renderfarmfi.py b/render_renderfarmfi.py index 34998a8e..2cc28a30 100644 --- a/render_renderfarmfi.py +++ b/render_renderfarmfi.py @@ -21,7 +21,7 @@ bl_addon_info = { "author": "Nathan Letwory <nathan@letworyinteractive.com>, Jesse Kaukonen <jesse.kaukonen@gmail.com>", "version": (3,), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "Render > Engine > Renderfarm.fi", "description": "Send .blend as session to http://www.renderfarm.fi to render", "warning": "", diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py index 5d680eae..2b928607 100644 --- a/space_view3d_materials_utils.py +++ b/space_view3d_materials_utils.py @@ -518,7 +518,7 @@ class VIEW3D_OT_assign_material(bpy.types.Operator): return context.active_object != None def execute(self, context): - mn = self.properties.matname + mn = self.matname print(mn) assign_mat(mn) cleanmatslots() @@ -568,7 +568,7 @@ class VIEW3D_OT_select_material_by_name(bpy.types.Operator): return context.active_object != None def execute(self, context): - mn = self.properties.matname + mn = self.matname select_material_by_name(mn) return {'FINISHED'} @@ -596,9 +596,9 @@ class VIEW3D_OT_replace_material(bpy.types.Operator): return context.active_object != None def execute(self, context): - m1 = self.properties.matorg - m2 = self.properties.matrep - all = self.properties.all_objects + m1 = self.matorg + m2 = self.matrep + all = self.all_objects replace_material(m1,m2,all) return {'FINISHED'} diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py index c5df0a03..30a6127e 100644 --- a/space_view3d_panel_measure.py +++ b/space_view3d_panel_measure.py @@ -707,15 +707,12 @@ class VIEW3D_PT_measure(bpy.types.Panel): # Define a temporary attribute for the distance value bpy.types.Scene.measure_panel_dist = bpy.props.FloatProperty( name="Distance", - attr="measure_panel_dist", precision=PRECISION, unit="LENGTH") bpy.types.Scene.measure_panel_area1 = bpy.props.FloatProperty( - attr="measure_panel_area1", precision=PRECISION, unit="AREA") bpy.types.Scene.measure_panel_area2 = bpy.props.FloatProperty( - attr="measure_panel_area2", precision=PRECISION, unit="AREA") diff --git a/space_view3d_property_chart.py b/space_view3d_property_chart.py index 290b2941..557bdf80 100644 --- a/space_view3d_property_chart.py +++ b/space_view3d_property_chart.py @@ -23,7 +23,7 @@ bl_addon_info = { "author": "Campbell Barton (ideasman42)", "version": (0,1), "blender": (2, 5, 3), - "api": 31667, + "api": 31847, "location": "Tool Shelf", "description": "Edit arbitrary selected properties for objects of the same type", "warning": "", @@ -185,7 +185,7 @@ def _property_chart_copy(self, context): if not obj: return - data_path = self.properties.data_path + data_path = self.data_path # quick & nasty method! for obj_iter in selected_objects: @@ -211,8 +211,8 @@ class CopyPropertyChart(bpy.types.Operator): def execute(self, context): # so attributes are found for '_property_chart_data_get()' - self.context_data_path_active = self.properties.data_path_active - self.context_data_path_selected = self.properties.data_path_selected + self.context_data_path_active = self.data_path_active + self.context_data_path_selected = self.data_path_selected _property_chart_copy(self, context) |