[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2792] contrib/py/scripts/addons: adding btrace by Liero & crazycourier to contrib/py/scripts/addons/btrace

Brendon Murphy meta.androcto1 at gmail.com
Mon Dec 19 13:46:46 CET 2011


Revision: 2792
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2792
Author:   meta-androcto
Date:     2011-12-19 12:46:34 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
adding btrace by Liero & crazycourier to contrib/py/scripts/addons/btrace

Added Paths:
-----------
    contrib/py/scripts/addons/btrace/
    contrib/py/scripts/addons/btrace/__init__.py
    contrib/py/scripts/addons/btrace/bTrace.py

Added: contrib/py/scripts/addons/btrace/__init__.py
===================================================================
--- contrib/py/scripts/addons/btrace/__init__.py	                        (rev 0)
+++ contrib/py/scripts/addons/btrace/__init__.py	2011-12-19 12:46:34 UTC (rev 2792)
@@ -0,0 +1,58 @@
+#BEGIN GPL LICENSE BLOCK
+
+#This program is free software; you can redistribute it and/or
+#modify it under the terms of the GNU General Public License
+#as published by the Free Software Foundation; either version 2
+#of the License, or (at your option) any later version.
+
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
+#GNU General Public License for more details.
+
+#You should have received a copy of the GNU General Public License
+#along with this program; if not, write to the Free Software Foundation,
+#Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+#END GPL LICENCE BLOCK
+
+bl_info = {
+    'name': "bTrace",
+    'author': "liero, crazycourier, Atom, Meta-Androcto",
+    'version': (1, 0, ),
+    'blender': (2, 6, 4),
+    'location': "View3D > Tools",
+    'description': "Tools for converting/animating objects/particles into curves",
+    'warning': "Still under development, bug reports appreciated",
+    'wiki_url': "",
+    'tracker_url': "",
+    'category': "Mesh"
+    }
+
+import bpy
+from .bTrace import *
+from bpy.props import *
+
+classes = [TracerProperties,
+    addTracerObjectPanel,
+    OBJECT_OT_convertcurve,
+    OBJECT_OT_objecttrace,
+    OBJECT_OT_objectconnect,
+    OBJECT_OT_writing,
+    OBJECT_OT_particletrace,
+    OBJECT_OT_traceallparticles,
+    OBJECT_OT_curvegrow,
+    OBJECT_OT_reset,
+    OBJECT_OT_fcnoise,
+    Selection]
+
+def register():
+    for c in classes:
+        bpy.utils.register_class(c)
+    bpy.types.WindowManager.curve_tracer = bpy.props.PointerProperty(type=TracerProperties)
+def unregister():
+    for c in classes:
+        bpy.utils.unregister_class(c)
+    del bpy.types.WindowManager.curve_tracer
+if __name__ == "__main__":
+    register()
\ No newline at end of file

Added: contrib/py/scripts/addons/btrace/bTrace.py
===================================================================
--- contrib/py/scripts/addons/btrace/bTrace.py	                        (rev 0)
+++ contrib/py/scripts/addons/btrace/bTrace.py	2011-12-19 12:46:34 UTC (rev 2792)
@@ -0,0 +1,1111 @@
+#BEGIN GPL LICENSE BLOCK
+
+#This program is free software; you can redistribute it and/or
+#modify it under the terms of the GNU General Public License
+#as published by the Free Software Foundation; either version 2
+#of the License, or (at your option) any later version.
+
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
+#GNU General Public License for more details.
+
+#You should have received a copy of the GNU General Public License
+#along with this program; if not, write to the Free Software Foundation,
+#Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+#END GPL LICENCE BLOCK
+
+bl_info = {
+    'name': "bTrace",
+    'author': "liero, crazycourier, Atom, Meta-Androcto, MacKracken",
+    'version': (1, 0, ),
+    'blender': (2, 6, 4),
+    'location': "View3D > Tools",
+    'description': "Tools for converting/animating objects/particles into curves",
+    'warning': "Still under development, bug reports appreciated",
+    'wiki_url': "",
+    'tracker_url': "",
+    'category': "Mesh"
+    }
+
+#### TO DO LIST ####
+### [   ]  Make grow animation happen to all selected, not just current
+### [   ]  Adjust bevel radius for grow curve
+### [   ]  Add Smooth option to curves
+### [   ] Fix F-Curve Time Scale
+### [   ] Grease Pencil doesn't show if nothing selected
+    
+    
+import bpy
+from bpy.props import *
+
+# Class to define properties
+class TracerProperties(bpy.types.PropertyGroup):
+    p = bpy.props
+    enabled = p.IntProperty(default=0)
+    # Object Curve Settings
+    TRcurve_spline = p.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")
+    TRcurve_handle = p.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")
+    TRcurve_resolution = p.IntProperty(name="Bevel Resolution" , min=1, max=32, default=4, description="Adjust the Bevel resolution")
+    TRcurve_depth = p.FloatProperty(name="Bevel Depth", min=0.0, max=100.0, default=0.125, description="Adjust the Bevel depth")
+    TRcurve_u = p.IntProperty(name="Resolution U", min=0, max=64, default=12, description="Adjust the Surface resolution")
+    TRcurve_join = p.BoolProperty(name="Join Curves", default=False, description="Join all the curves after they have been created")
+    # Option to Duplicate Mesh
+    TRobject_duplicate = p.BoolProperty(name="Apply to Copy", default=False, description="Apply curve to a copy of object")
+    # Distort Mesh options
+    TRdistort_modscale = p.IntProperty(name="Modulation Scale", default=2, description="Add a scale to modulate the curve at random points, set to 0 to disable")
+    TRdistort_noise = p.FloatProperty(name="Mesh Noise", min=0.0, max=50.0, default=0.00, description="Adjust noise added to mesh before adding curve")
+    # Particle Options    
+    TRparticle_step = p.IntProperty(name="Step Size", min=1, max=50, default=5, description="Sample one every this number of frames")
+    TRparticle_auto = p.BoolProperty(name='Auto Frame Range', default=True, description='Calculate Frame Range from particles life')
+    TRparticle_f_start = p.IntProperty( name='Start Frame', min=1, max=5000, default=1, description='Start frame')
+    TRparticle_f_end = p.IntProperty( name='End Frame', min=1, max=5000, default=250, description='End frame')
+    # F-Curve Modifier Properties
+    TRfcnoise_rot = p.BoolProperty(name="Rotation", default=False, description="Affect Rotation")
+    TRfcnoise_loc = p.BoolProperty(name="Location", default=True, description="Affect Location")
+    TRfcnoise_scale = p.BoolProperty(name="Scale", default=False, description="Affect Scale")
+    TRfcnoise_amp = p.IntProperty(name="Amp", min=1, max=500, default=5, description="Adjust the amplitude")
+    TRfcnoise_timescale = p.FloatProperty(name="Time Scale", min=1, max=500, default=50, description="Adjust the time scale")
+    TRfcnoise_key = p.BoolProperty(name="Add Keyframe", default=True, description="Keyframe is needed for tool, this adds a LocRotScale keyframe")
+    # Toolbar Settings/Options Booleans
+    TRcurve_settings = p.BoolProperty(name="Curve Settings", default=False, description="Change the settings for the created curve")
+    TRparticle_settings = p.BoolProperty(name="Particle Settings", default=False, description="Show the settings for the created curve")
+    TRanimation_settings = p.BoolProperty(name="Animation Settings", default=False, description="Show the settings for the Animations")
+    TRdistort_curve = p.BoolProperty(name="Add Distortion", default=False, description="Set options to distort the final curve")
+    TRconnect_noise = p.BoolProperty(name="F-Curve Noise", default=False, description="Adds F-Curve Noise Modifier to selected objects")
+    TRsettings_objectTrace = p.BoolProperty(name="Object Trace Settings", default=False, description="Trace selected mesh object with a curve")
+    TRsettings_objectsConnect = p.BoolProperty(name="Objects Connect Settings", default=False, description="Connect objects with a curve controlled by hooks")
+    TRsettings_particleTrace = p.BoolProperty(name="Particle Trace Settings", default=False, description="Trace particle path with a  curve")
+    TRsettings_particleConnect = p.BoolProperty(name="Particle Connect Settings", default=False, description="Connect particles with a curves and animated over particle lifetime")
+    TRsettings_growCurve = p.BoolProperty(name="Grow Curve Settings", default=False, description="Animate curve bevel over time by keyframing points radius")
+    TRsettings_fcurve = p.BoolProperty(name="F-Curve Settings", default=False, description="F-Curve Settings")
+    # Toolbar Tool show/hide booleans
+    TRtool_objectTrace = p.BoolProperty(name="Object Trace", default=False, description="Trace selected mesh object with a curve")
+    TRtool_objectsConnect = p.BoolProperty(name="Objects Connect", default=False, description="Connect objects with a curve controlled by hooks")
+    TRtool_particleTrace = p.BoolProperty(name="Particle Trace", default=False, description="Trace particle path with a  curve")
+    TRtool_particleConnect = p.BoolProperty(name="Particle Connect", default=False, description="Connect particles with a curves and animated over particle lifetime")
+    TRtool_growCurve = p.BoolProperty(name="Grow Curve", default=False, description="Animate curve bevel over time by keyframing points radius")
+    TRtool_handwrite = p.BoolProperty(name="Handwriting", default=False, description="Create and Animate curve using the grease pencil")
+    TRtool_fcurve = p.BoolProperty(name="F-Curve Noise", default=False, description="Add F-Curve noise to selected objects")
+    # Animation Options
+    TRanim_auto = p.BoolProperty(name='Auto Frame Range', default=True, description='Automatically calculate Frame Range')
+    TRanim_f_start = p.IntProperty(name='Start', min=1, max=2500, default=1, description='Start frame / Hidden object')
+    TRanim_length = p.IntProperty(name='Duration', min=1, soft_max=1000, max=2500, default=100, description='Animation Length')
+    TRanim_f_fade = p.IntProperty(name='Fade After', min=0, soft_max=250, max=2500, default=10, description='Fade after this frames / Zero means no fade')

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list