diff --git a/add_mesh_3d_function_surface.py b/add_mesh_3d_function_surface.py index 6c061b183538463e428c1357ea6da7eea75e83c4..c4abc8381696e635e7e4d21802971444d5546004 100644 --- a/add_mesh_3d_function_surface.py +++ b/add_mesh_3d_function_surface.py @@ -120,16 +120,6 @@ safe_dict = dict([(k, globals().get(k, None)) for k in safe_list]) # op ... The operator that should be used. # op_args ... A dictionary with valid Blender # properties (operator arguments/parameters). -def store_recall_properties(ob, op, op_args): - if ob and op and op_args: - recall_properties = {} - - # Add the operator identifier and op parameters to the properties. - recall_properties['op'] = op.bl_idname - recall_properties['args'] = op_args - - # Store new recall properties. - ob['recall'] = recall_properties # calculates the matrix for the new object @@ -405,16 +395,6 @@ class AddZFunctionSurface(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Z Function", edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "equation": equation, - "div_x": div_x, - "div_y": div_y, - "size_x": size_x, - "size_y": size_y} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -620,22 +600,6 @@ class AddXYZFunctionSurface(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "XYZ Function", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "x_eq": props.x_eq, - "y_eq": props.y_eq, - "z_eq": props.z_eq, - "range_u_min": props.range_u_min, - "range_u_max": props.range_u_max, - "range_u_step": props.range_u_step, - "wrap_u": props.wrap_u, - "range_v_min": props.range_v_min, - "range_v_max": props.range_v_max, - "range_v_step": props.range_v_step, - "wrap_v": props.wrap_v} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): diff --git a/add_mesh_extras.py b/add_mesh_extras.py index 371db3b494907c70cc24eb40dfa846d058ae3613..230efa0d0cc33630415020a6b1be4b3604636d72 100644 --- a/add_mesh_extras.py +++ b/add_mesh_extras.py @@ -34,26 +34,6 @@ bl_addon_info = { 'func=detail&aid=22457&group_id=153&atid=469', 'category': 'Add Mesh'} -# Stores the values of a list of properties and the -# operator id in a property group ('recall_op') inside the object. -# Could (in theory) be used for non-objects. -# Note: Replaces any existing property group with the same name! -# ob ... Object to store the properties in. -# op ... The operator that should be used. -# op_args ... A dictionary with valid Blender -# properties (operator arguments/parameters). -def store_recall_properties(ob, op, op_args): - if ob and op and op_args: - recall_properties = {} - - # Add the operator identifier and op parameters to the properties. - recall_properties['op'] = op.bl_idname - recall_properties['args'] = op_args - - # Store new recall properties. - ob['recall'] = recall_properties - - # calculates the matrix for the new object # depending on user pref def align_matrix(context): @@ -562,13 +542,6 @@ class AddSqorus(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Sqorus", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "hole_size": props.hole_size, - "subdivide": props.subdivide} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -615,14 +588,6 @@ class AddWedge(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Wedge", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "size_x": props.size_x, - "size_y": props.size_y, - "size_z": props.size_z} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -676,15 +641,6 @@ class AddSpindle(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Spindle", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "segments": props.segments, - "radius": props.radius, - "height": props.height, - "cap_height": props.cap_height} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -737,15 +693,6 @@ class AddStar(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Star", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "points": props.points, - "outer_radius": props.outer_radius, - "innter_radius": props.innter_radius, - "height": props.height} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -783,14 +730,6 @@ class AddTrapezohedron(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Trapazohedron", props.edit, self.align_matrix) - - # store recall properties in object - recall_args_list = { - "edit": True, - "segments" : props.segments, - "radius" : props.radius, - "height": props.height} - store_recall_properties(obj,self,recall_args_list) return {'FINISHED'} diff --git a/add_mesh_gears.py b/add_mesh_gears.py index ca8f7bcab529af2531aa9e9d0a3d6b62b2ea2fab..f329de9114400973ef3ff80f8349fec1c471025c 100644 --- a/add_mesh_gears.py +++ b/add_mesh_gears.py @@ -82,26 +82,6 @@ def align_matrix(context): align_matrix = loc * rot return align_matrix -# Stores the values of a list of properties and the -# operator id in a property group ('recall_op') inside the object. -# Could (in theory) be used for non-objects. -# Note: Replaces any existing property group with the same name! -# ob ... Object to store the properties in. -# op ... The operator that should be used. -# op_args ... A dictionary with valid Blender -# properties (operator arguments/parameters). -def store_recall_properties(ob, op, op_args): - if ob and op and op_args: - recall_properties = {} - - # Add the operator identifier and op parameters to the properties. - recall_properties['op'] = op.bl_idname - recall_properties['args'] = op_args - - # Store new recall properties. - ob['recall'] = recall_properties - - # Create a new mesh (object) from verts/edges/faces. # verts/edges/faces ... List of vertices/edges/faces for the # new mesh (as used in from_pydata). @@ -805,21 +785,6 @@ class AddGear(bpy.types.Operator): # Actually create the mesh object from this geometry data. obj = create_mesh_object(context, verts, [], faces, "Gear", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "number_of_teeth": props.number_of_teeth, - "radius": props.radius, - "addendum": props.addendum, - "dedendum": props.dedendum, - "angle": props.angle, - "base": props.base, - "width": props.width, - "skew": props.skew, - "conangle": props.conangle, - "crown": props.crown} - store_recall_properties(obj, self, recall_args_list) - # Create vertex groups from stored vertices. tipGroup = obj.add_vertex_group('Tips') for vert in verts_tip: @@ -928,20 +893,6 @@ class AddWormGear(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Worm Gear", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "number_of_teeth": props.number_of_teeth, - "number_of_rows": props.number_of_rows, - "radius": props.radius, - "addendum": props.addendum, - "dedendum": props.dedendum, - "angle": props.angle, - "row_height": props.row_height, - "skew": props.skew, - "crown": props.crown} - store_recall_properties(obj, self, recall_args_list) - # Create vertex groups from stored vertices. tipGroup = obj.add_vertex_group('Tips') for vert in verts_tip: diff --git a/add_mesh_gemstones.py b/add_mesh_gemstones.py index 000a2062b4d52725a4478ea2b1aa7d01c7b7b44c..c307e2f1eef1e15f2b35d199d409c6adf29bb9d0 100644 --- a/add_mesh_gemstones.py +++ b/add_mesh_gemstones.py @@ -34,27 +34,6 @@ bl_addon_info = { 'func=detail&aid=21432&group_id=153&atid=469', 'category': 'Add Mesh'} - -# Stores the values of a list of properties and the -# operator id in a property group ('recall_op') inside the object. -# Could (in theory) be used for non-objects. -# Note: Replaces any existing property group with the same name! -# ob ... Object to store the properties in. -# op ... The operator that should be used. -# op_args ... A dictionary with valid Blender -# properties (operator arguments/parameters). -def store_recall_properties(ob, op, op_args): - if ob and op and op_args: - recall_properties = {} - - # Add the operator identifier and op parameters to the properties. - recall_properties['op'] = op.bl_idname - recall_properties['args'] = op_args - - # Store new recall properties. - ob['recall'] = recall_properties - - # calculates the matrix for the new object # depending on user pref def align_matrix(context): @@ -389,16 +368,6 @@ class AddDiamond(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Diamond", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "segments": props.segments, - "girdle_radius": props.girdle_radius, - "table_radius": props.table_radius, - "crown_height": props.crown_height, - "pavilion_height": props.pavilion_height} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -458,16 +427,6 @@ class AddGem(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Gem", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "segments": props.segments, - "pavilion_radius": props.pavilion_radius, - "crown_radius": props.crown_radius, - "pavilion_height": props.pavilion_height, - "crown_height": props.crown_height} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): diff --git a/add_mesh_pipe_joint.py b/add_mesh_pipe_joint.py index 6b31d0d94ebf0054ff9fefe16e5a85bf9c773ad8..04f368d7be1ee94c92f905edc60f52669228444e 100644 --- a/add_mesh_pipe_joint.py +++ b/add_mesh_pipe_joint.py @@ -124,27 +124,6 @@ rotation_matrix = mathutils.RotationMatrix(-math.pi/2, 4, 'x') mesh.transform(rotation_matrix) """ - -# Stores the values of a list of properties and the -# operator id in a property group ('recall_op') inside the object. -# Could (in theory) be used for non-objects. -# Note: Replaces any existing property group with the same name! -# ob ... Object to store the properties in. -# op ... The operator that should be used. -# op_args ... A dictionary with valid Blender -# properties (operator arguments/parameters). -def store_recall_properties(ob, op, op_args): - if ob and op and op_args: - recall_properties = {} - - # Add the operator identifier and op parameters to the properties. - recall_properties['op'] = op.bl_idname - recall_properties['args'] = op_args - - # Store new recall properties. - ob['recall'] = recall_properties - - # Apply view rotation to objects if "Align To" for # new objects was set to "VIEW" in the User Preference. # Is now handled in the invoke functions @@ -422,17 +401,6 @@ class AddElbowJoint(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Elbow Joint", edit, self.align_matrix) - - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "radius": radius, - "div": div, - "angle": angle, - "startLength": startLength, - "endLength": endLength} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -624,17 +592,6 @@ class AddTeeJoint(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Tee Joint", edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "radius": radius, - "div": div, - "angle": angle, - "startLength": startLength, - "endLength": endLength, - "branchLength": branchLength} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -841,18 +798,6 @@ class AddWyeJoint(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Wye Joint", edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "radius": radius, - "div": div, - "angle1": angle1, - "angle2": angle2, - "startLength": startLength, - "branch1Length": branch1Length, - "branch2Length": branch2Length} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -1121,20 +1066,6 @@ class AddCrossJoint(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "Cross Joint", edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "radius": radius, - "div": div, - "angle1": angle1, - "angle2": angle2, - "angle3": angle3, - "startLength": startLength, - "branch1Length": branch1Length, - "branch2Length": branch2Length, - "branch3Length": branch3Length} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): @@ -1304,15 +1235,6 @@ class AddNJoint(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "N Joint", edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "radius": radius, - "div": div, - "number": number, - "length": length} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event): diff --git a/add_mesh_solid.py b/add_mesh_solid.py index c73f3c060c08738e42b8bb2db4b60e6d8a687091..d828d52b639a9e91a1d0eab7c1c62dae2da16628 100644 --- a/add_mesh_solid.py +++ b/add_mesh_solid.py @@ -18,26 +18,6 @@ bl_addon_info = { 'func=detail&aid=22405&group_id=153&atid=469', 'category': 'Add Mesh'} -# Stores the values of a list of properties and the -# operator id in a property group ('recall_op') inside the object. -# Could (in theory) be used for non-objects. -# Note: Replaces any existing property group with the same name! -# ob ... Object to store the properties in. -# op ... The operator that should be used. -# op_args ... A dictionary with valid Blender -# properties (operator arguments/parameters). -def store_recall_properties(ob, op, op_args): - if ob and op and op_args: - recall_properties = {} - - # Add the operator identifier and op parameters to the properties. - recall_properties['op'] = op.bl_idname - recall_properties['args'] = op_args - - # Store new recall properties. - ob['recall'] = recall_properties - - # Apply view rotation to objects if "Align To" for # new objects was set to "VIEW" in the User Preference. def apply_object_align(context, ob): @@ -794,17 +774,6 @@ class Solids(bpy.types.Operator): bpy.ops.mesh.normals_make_consistent() bpy.ops.object.mode_set(mode=current_mode) - # store recall properties in object - recall_args_list = { - "edit": True, - "source" : props.source, - "size" : props.size, - "vTrunc": props.vTrunc, - "eTrunc": props.eTrunc, - "dual": props.dual, - "snub": props.snub} - store_recall_properties(obj,self,recall_args_list) - # turn undo back on bpy.context.user_preferences.edit.global_undo = True diff --git a/add_mesh_twisted_torus.py b/add_mesh_twisted_torus.py index f471998179f3df42bd8ef7ab92d970d1ccaf2ffc..03c8a1f31844936610061a90f83a31d9b461a846 100644 --- a/add_mesh_twisted_torus.py +++ b/add_mesh_twisted_torus.py @@ -61,27 +61,6 @@ import mathutils from mathutils import * from math import cos, sin, pi - -# Stores the values of a list of properties and the -# operator id in a property group ('recall_op') inside the object. -# Could (in theory) be used for non-objects. -# Note: Replaces any existing property group with the same name! -# ob ... Object to store the properties in. -# op ... The operator that should be used. -# op_args ... A dictionary with valid Blender -# properties (operator arguments/parameters). -def store_recall_properties(ob, op, op_args): - if ob and op and op_args: - recall_properties = {} - - # Add the operator identifier and op parameters to the properties. - recall_properties['op'] = op.bl_idname - recall_properties['args'] = op_args - - # Store new recall properties. - ob['recall'] = recall_properties - - # calculates the matrix for the new object # depending on user pref def align_matrix(context): @@ -371,19 +350,6 @@ class AddTwistedTorus(bpy.types.Operator): obj = create_mesh_object(context, verts, [], faces, "TwistedTorus", props.edit, self.align_matrix) - # Store 'recall' properties in the object. - recall_args_list = { - "edit": True, - "major_radius": props.major_radius, - "minor_radius": props.minor_radius, - "major_segments": props.major_segments, - "minor_segments": props.minor_segments, - "twists": props.twists, - "use_abso": props.use_abso, - "abso_major_rad": props.abso_major_rad, - "abso_minor_rad": props.abso_minor_rad} - store_recall_properties(obj, self, recall_args_list) - return {'FINISHED'} def invoke(self, context, event):