From 7fb70a4041ef1152eb34a7506ea2b6f671e76042 Mon Sep 17 00:00:00 2001 From: Luca Bonavita Date: Sat, 8 Jan 2011 19:20:04 +0000 Subject: == Tracker urls formatting == READ THIS TO AVOID A LOT OF WORK! New way of linking to tracker pages: just use the parameter "aid" (artifact ID), to avoid a lot of manual updates later in wiki and svn. Example: ========= OLD WAY TO LINK TO TRACKER ----------------------------- Complete url of a script in Upload http://projects.blender.org/tracker/index.php?func=detail&aid=25349&group_id=153&atid=467 If we move this in contrib this url will become http://projects.blender.org/tracker/index.php?func=detail&aid=25349&group_id=153&atid=468 467 becomes 468, so we have to update this in wiki page. Later on, when this moves into Trunk, the url will become http://projects.blender.org/tracker/index.php?func=detail&aid=25349&group_id=153&atid=469 468 becomes 469, so we have to update the url in wiki page and svn. Annoying! NEW WAY TO LINK TO TRACKER ----------------------------- Best way to link to tracker page is using: http://projects.blender.org/tracker/index.php?func=detail&aid=25349 Use "func=detail" Use "aid" (which is the "artifact ID") DON'T use "group_id" (which is the project ID, bf-extensions is project 153) DON'T use "atid" (which is the "artifacts tracker ID") Like this, the url is unique, and we will avoid to update wiki pages and svn after moving pages [[Split portion of a mixed commit.]] --- object_add_chain.py | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'object_add_chain.py') diff --git a/object_add_chain.py b/object_add_chain.py index 9f3bfbd7..d93f5df5 100644 --- a/object_add_chain.py +++ b/object_add_chain.py @@ -28,7 +28,7 @@ bl_addon_info = { "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\ "Scripts/Object/Add_Chain", "tracker_url": "https://projects.blender.org/tracker/index.php?"\ - "func=detail&aid=22203&group_id=153&atid=469", + "func=detail&aid=22203", "category": "Object"} import bpy @@ -37,10 +37,12 @@ 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), + layers=(True, False, False, False, False, False, False, False, False, + False, False, False, False, False, False, False, False, False, + False, False)) ##Changes name of Empty to rot_link adds variable emp emp = bpy.context.object @@ -50,19 +52,21 @@ False)) 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), + layers=(True, False, False, False, False, False, False, False, False, + False, False, False, False, False, False, False, False, False, False, + False)) ##Change Curve name to deform adds variable curv curv = bpy.context.object curv.name = "deform" ##Inserts Torus primitive - bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, -major_segments=12, minor_segments=4, use_abso=False, abso_major_rad=1, -abso_minor_rad=0.5) + bpy.ops.mesh.primitive_torus_add( + major_radius=1, minor_radius=0.25, major_segments=12, minor_segments=4, + use_abso=False, abso_major_rad=1, abso_minor_rad=0.5) ##Positions Torus primitive to center of scene bpy.context.active_object.location = [0, 0, 0] @@ -88,11 +92,12 @@ abso_minor_rad=0.5) bpy.ops.object.editmode_toggle() ##Translate curve object - bpy.ops.transform.translate(value=(2, 0, 0), constraint_axis=(True, False, False), -constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', -proportional_edit_falloff='SMOOTH', proportional_size=1, snap=False, -snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=False, snap_normal=(0, 0, 0), -release_confirm=False) + bpy.ops.transform.translate( + value=(2, 0, 0), constraint_axis=(True, False, False), + constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', + proportional_edit_falloff='SMOOTH', proportional_size=1, snap=False, + snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=False, + snap_normal=(0, 0, 0), release_confirm=False) ##Toggle into objectmode bpy.ops.object.editmode_toggle() -- cgit v1.2.3