diff options
author | Brendon Murphy <meta.androcto1@gmail.com> | 2011-05-04 13:36:01 +0400 |
---|---|---|
committer | Brendon Murphy <meta.androcto1@gmail.com> | 2011-05-04 13:36:01 +0400 |
commit | d7b87f2e2b8b9d98a2a8d83c5af93b9210622d39 (patch) | |
tree | 7c17dada6fbdd931d50290e6e69b09bc889503eb /object_add_chain.py | |
parent | 28ed349f43678319afc780b0f56b0a673fe8380f (diff) |
fix for active layers & align to view errors.
thanks to jawra for the updates.
Diffstat (limited to 'object_add_chain.py')
-rw-r--r-- | object_add_chain.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/object_add_chain.py b/object_add_chain.py index 3699460b..a173af27 100644 --- a/object_add_chain.py +++ b/object_add_chain.py @@ -37,12 +37,8 @@ def Add_Chain(): ##Adds Empty to scene - bpy.ops.object.add( - type='EMPTY', view_align=False, enter_editmode=False, location=(0, 0, 0), - rotation=(0, 0, 0), - layers=(True, False, False, False, False, False, False, False, False, - False, False, False, False, False, False, False, False, False, - False, False)) + bpy.ops.object.add(type='EMPTY', view_align=False, enter_editmode=False, location=(0, 0, 0), +rotation=(0, 0, 0),) ##Changes name of Empty to rot_link adds variable emp emp = bpy.context.object @@ -52,12 +48,7 @@ def Add_Chain(): emp.rotation_euler = [1.570796, 0, 0] ##Adds Curve Path to scene - bpy.ops.curve.primitive_nurbs_path_add( - view_align=False, enter_editmode=False, location=(0, 0, 0), - rotation=(0, 0, 0), - layers=(True, False, False, False, False, False, False, False, False, - False, False, False, False, False, False, False, False, False, False, - False)) + bpy.ops.curve.primitive_nurbs_path_add( view_align=False, enter_editmode=False, location=(0, 0, 0), rotation=(0, 0, 0),) ##Change Curve name to deform adds variable curv curv = bpy.context.object @@ -70,6 +61,10 @@ def Add_Chain(): ##Positions Torus primitive to center of scene bpy.context.active_object.location = [0, 0, 0] + + ##Reseting Torus rotation in case of 'Align to view' option enabled + bpy.context.active_object.rotation_euler = [0, 0, 0] + ##Changes Torus name to chain adds variable tor tor = bpy.context.object |