[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3093] contrib/py/scripts/addons/btrace : Added new operator/tool: Mesh Follow.
Scott Wood
scott at thewooddesign.com
Tue Mar 13 05:27:29 CET 2012
Revision: 3093
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3093
Author: crazycourier
Date: 2012-03-13 04:27:15 +0000 (Tue, 13 Mar 2012)
Log Message:
-----------
Added new operator/tool: Mesh Follow.
On an animated mesh, this traces verts, edges or faces along the animation path with a curve.
Renamed bTrace to Btrace
Modified Paths:
--------------
contrib/py/scripts/addons/btrace/__init__.py
contrib/py/scripts/addons/btrace/bTrace.py
Modified: contrib/py/scripts/addons/btrace/__init__.py
===================================================================
--- contrib/py/scripts/addons/btrace/__init__.py 2012-03-13 02:21:50 UTC (rev 3092)
+++ contrib/py/scripts/addons/btrace/__init__.py 2012-03-13 04:27:15 UTC (rev 3093)
@@ -43,7 +43,8 @@
OBJECT_OT_traceallparticles,
OBJECT_OT_curvegrow,
OBJECT_OT_reset,
- OBJECT_OT_fcnoise]
+ OBJECT_OT_fcnoise,
+ OBJECT_OT_meshfollow]
def register():
for c in classes:
Modified: contrib/py/scripts/addons/btrace/bTrace.py
===================================================================
--- contrib/py/scripts/addons/btrace/bTrace.py 2012-03-13 02:21:50 UTC (rev 3092)
+++ contrib/py/scripts/addons/btrace/bTrace.py 2012-03-13 04:27:15 UTC (rev 3093)
@@ -17,16 +17,16 @@
#END GPL LICENCE BLOCK
bl_info = {
- 'name': "bTrace",
+ 'name': "Btrace",
'author': "liero, crazycourier, Atom, Meta-Androcto, MacKracken",
'version': (1, 1, ),
- 'blender': (2, 61, 1),
+ 'blender': (2, 62),
'location': "View3D > Tools",
'description': "Tools for converting/animating objects/particles into curves",
'warning': "Still under development, bug reports appreciated",
'wiki_url': "",
'tracker_url': "http://projects.blender.org/tracker/?func=detail&atid=468&aid=29563&group_id=153",
- 'category': "Mesh"
+ 'category': "Add Curve"
}
#### TO DO LIST ####
@@ -42,7 +42,7 @@
curve_spline = EnumProperty(name="Spline", items=(("POLY", "Poly", "Use Poly spline type"), ("NURBS", "Nurbs", "Use Nurbs spline type"), ("BEZIER", "Bezier", "Use Bezier spline type")), description="Choose which type of spline to use when curve is created", default="BEZIER")
curve_handle = EnumProperty(name="Handle", items=(("ALIGNED", "Aligned", "Use Aligned Handle Type"), ("AUTOMATIC", "Automatic", "Use Auto Handle Type"), ("FREE_ALIGN", "Free Align", "Use Free Handle Type"), ("VECTOR", "Vector", "Use Vector Handle Type")), description="Choose which type of handle to use when curve is created", default="VECTOR")
curve_resolution = IntProperty(name="Bevel Resolution" , min=1, max=32, default=4, description="Adjust the Bevel resolution")
- curve_depth = FloatProperty(name="Bevel Depth", min=0.0, max=100.0, default=0.125, description="Adjust the Bevel depth")
+ curve_depth = FloatProperty(name="Bevel Depth", min=0.0, max=100.0, default=0.02, description="Adjust the Bevel depth")
curve_u = IntProperty(name="Resolution U", min=0, max=64, default=12, description="Adjust the Surface resolution")
curve_join = BoolProperty(name="Join Curves", default=False, description="Join all the curves after they have been created")
curve_smooth = BoolProperty(name="Smooth", default=True, description="Render curve smooth")
@@ -71,15 +71,18 @@
connect_noise = BoolProperty(name="F-Curve Noise", default=False, description="Adds F-Curve Noise Modifier to selected objects")
settings_objectTrace = BoolProperty(name="Object Trace Settings", default=False, description="Trace selected mesh object with a curve")
settings_objectsConnect = BoolProperty(name="Objects Connect Settings", default=False, description="Connect objects with a curve controlled by hooks")
+ settings_objectTrace = BoolProperty(name="Object Trace Settings", default=False, description="Trace selected mesh object with a curve")
respect_order = BoolProperty(name="Order", default=False, description="Remember order objects were selected")
settings_particleTrace = BoolProperty(name="Particle Trace Settings", default=False, description="Trace particle path with a curve")
settings_particleConnect = BoolProperty(name="Particle Connect Settings", default=False, description="Connect particles with a curves and animated over particle lifetime")
settings_growCurve = BoolProperty(name="Grow Curve Settings", default=False, description="Animate curve bevel over time by keyframing points radius")
settings_fcurve = BoolProperty(name="F-Curve Settings", default=False, description="F-Curve Settings")
+ settings_meshfollow = BoolProperty(name="Mesh Follow Settings", default=False, description="Mesh Follow Settings")
# Toolbar Tool show/hide booleans
tool_objectTrace = BoolProperty(name="Object Trace", default=False, description="Trace selected mesh object with a curve")
tool_objectsConnect = BoolProperty(name="Objects Connect", default=False, description="Connect objects with a curve controlled by hooks")
tool_particleTrace = BoolProperty(name="Particle Trace", default=False, description="Trace particle path with a curve")
+ tool_meshFollow = BoolProperty(name="Mesh Follow", default=False, description="Follow selection items on animated mesh object")
tool_particleConnect = BoolProperty(name="Particle Connect", default=False, description="Connect particles with a curves and animated over particle lifetime")
tool_growCurve = BoolProperty(name="Grow Curve", default=False, description="Animate curve bevel over time by keyframing points radius")
tool_handwrite = BoolProperty(name="Handwriting", default=False, description="Create and Animate curve using the grease pencil")
@@ -100,9 +103,23 @@
items=(("CONTI", "Continuous", "Create a continuous curve using verts from mesh"), ("EDGEALL", "All Edges", "Create a curve from every edge in a mesh")),
description="Choose which type of spline to use when curve is created", default="CONTI")
convert_joinbefore = BoolProperty(name="Join objects before convert", default=False, description='Join all selected mesh to one object before converting to mesh')
+ # Mesh Follow Options
+ fol_mesh_select = EnumProperty(name="Mesh type to spawn curves",
+ items=(("VERTS", "Vertices", "Create the curve using verts from mesh"), ("FACES", "Faces", "Create the curve using faces from mesh")),
+ description="Choose which type of spline to use when curve is created", default="VERTS")
+ fol_edge_select = BoolProperty(name='Edge', default=False, description='Grow from edges')
+ fol_vert_select = BoolProperty(name='Vertex', default=False, description='Grow from verts')
+ fol_face_select = BoolProperty(name='Face', default=True, description='Grow from faces')
+ fol_mesh_type = EnumProperty(name='Mesh type', default='VERTS', description='Mesh feature to draw cruves from', items=(
+ ("VERTS", "Verts", ""), ("EDGES", "Edges", ""), ("FACES", "Faces", "")
+ ))
+ fol_start_frame = IntProperty(name="Start Frame", min=1, max=2500, default=1, description="Start frame for range to trace")
+ fol_end_frame = IntProperty(name="End Frame", min=1, max=2500, default=250, description="End frame for range to trace")
+ fol_perc_verts = FloatProperty(name="Reduce selection by", min=0.001, max=1.000, default=0.5, description="percentage of total verts to trace")
+ fol_sel_option = EnumProperty(name="Selection type", items=(("RANDOM", "Random", "Follow Random items"), ("CUSTOM", "Custom", "Follow selected items"), ("ALL", "All", "Follow all items")),
+ description="Choose which objects to follow", default="RANDOM")
-
-############################
+############################
## Draw Brush panel in Toolbar
############################
class addTracerObjectPanel(bpy.types.Panel):
@@ -113,9 +130,9 @@
def draw(self, context):
layout = self.layout
- bTrace=bpy.context.window_manager.curve_tracer
+ bTrace = bpy.context.window_manager.curve_tracer
obj = bpy.context.object
-
+
############################
## Curve options
############################
@@ -272,6 +289,68 @@
row = box.row()
row.prop(bTrace,'anim_tails')
row.prop(bTrace,'anim_keepr')
+
+ ############################
+ ### Mesh Follow
+ ############################
+ tool_meshFollow, settings_meshfollow, fol_edge_select, fol_vert_select, fol_face_select, fol_sel_option, fol_perc_verts = bTrace.tool_meshFollow, bTrace.settings_meshfollow, bTrace.fol_edge_select, bTrace.fol_vert_select, bTrace.fol_face_select, bTrace.fol_sel_option, bTrace.fol_perc_verts
+ box = self.layout.box()
+ row = box.row ()
+ ObjectConnText = "Show: Mesh Follow"
+ if tool_meshFollow:
+ ObjectConnText="Hide: Mesh Follow"
+ else:
+ ObjectConnText="Show: Mesh Follow"
+ row.prop(bTrace, "tool_meshFollow", text=ObjectConnText, icon="DRIVER")
+ if tool_meshFollow:
+ row = box.row ()
+ row.label(text="Mesh Follow", icon="DRIVER")
+ row.operator("object.btmeshfollow", text="Run!", icon="PLAY")
+ row = box.row()
+ row.prop(bTrace, "settings_meshfollow", icon='MODIFIER', text='Settings')
+ row.label(text="")
+ if settings_meshfollow:
+ row = box.row(align=True)
+ row.label(text="Mesh Type/Select Options", icon="VERTEXSEL")
+ col = box.column(align=True)
+ row = col.row(align=True)
+ row.prop(bTrace, "fol_mesh_type", expand=True)
+ row = col.row(align=True)
+ row.prop(bTrace, "fol_sel_option", expand=True)
+ row = box.row()
+ if fol_sel_option == 'RANDOM':
+ row.label("Random Selection")
+ row.prop(bTrace, "fol_perc_verts", text="")
+ if fol_sel_option == 'CUSTOM':
+ row.label("Custom Selection: Choose in Edit Mode")
+ if fol_sel_option == 'ALL':
+ row.label("Select All")
+ row = box.row()
+ row.label("Time Options", icon="TIME")
+ col = box.column(align=True)
+ col.prop(bTrace, "particle_step")
+ row = col.row(align=True)
+ row.prop(bTrace, "fol_start_frame")
+ row.prop(bTrace, "fol_end_frame")
+ # Grow settings here
+ row = box.row()
+ row.prop(bTrace, "animate", text="Add Grow Curve Animation")
+ if animate:
+ box.label(text='Frame Animation Settings:')
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list