[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3224] contrib/py/scripts/addons: SVN maintenance.

gsr b3d gsr.b3d at infernal-iceberg.com
Fri Apr 6 01:19:56 CEST 2012


Revision: 3224
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3224
Author:   gsrb3d
Date:     2012-04-05 23:19:56 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
SVN maintenance.

Modified Paths:
--------------
    contrib/py/scripts/addons/add_curve_objects/__init__.py
    contrib/py/scripts/addons/add_curve_objects/add_curve_rectangle_259.py
    contrib/py/scripts/addons/add_curve_objects/add_curve_spirals.py
    contrib/py/scripts/addons/add_curve_objects/cotejrp1_particle_tracer.py
    contrib/py/scripts/addons/add_curve_objects/cotejrp1_string_it.py
    contrib/py/scripts/addons/add_mesh_chain_rope/oscurart_rope_maker.py
    contrib/py/scripts/addons/space_view3d_paint_bprojection.py

Property Changed:
----------------
    contrib/py/scripts/addons/add_curve_objects/__init__.py
    contrib/py/scripts/addons/add_curve_objects/add_curve_rectangle_259.py
    contrib/py/scripts/addons/add_curve_objects/add_curve_spirals.py
    contrib/py/scripts/addons/add_curve_objects/cotejrp1_particle_tracer.py
    contrib/py/scripts/addons/add_curve_objects/cotejrp1_string_it.py
    contrib/py/scripts/addons/object_mangle_tools.py

Modified: contrib/py/scripts/addons/add_curve_objects/__init__.py
===================================================================
--- contrib/py/scripts/addons/add_curve_objects/__init__.py	2012-04-05 16:26:02 UTC (rev 3223)
+++ contrib/py/scripts/addons/add_curve_objects/__init__.py	2012-04-05 23:19:56 UTC (rev 3224)
@@ -1,89 +1,89 @@
-# ##### 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-# Contributed to by
-# meta-androcto #
-
-bl_info = {
-    "name": "Curve Objects",
-    "author": "Multiple Authors",
-    "version": (0, 1),
-    "blender": (2, 6, 3),
-    "location": "View3D > Add > Curve > Curve Objects",
-    "description": "Add extra curve object types",
-    "warning": "",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Add Curve"}
-
-
-if "bpy" in locals():
-    import imp
-    imp.reload(add_curve_rectangle_259)
-    imp.reload(add_curve_spirals)
-    imp.reload(cotejrp1_particle_tracer)
-    imp.reload(cotejrp1_string_it)
-
-else:
-    from . import add_curve_rectangle_259
-    from . import add_curve_spirals
-    from . import cotejrp1_particle_tracer
-    from . import cotejrp1_string_it
-
-import bpy
-
-
-class INFO_MT_curve_extras_add(bpy.types.Menu):
-    # Define the "Extras" menu
-    bl_idname = "INFO_MT_curve_extra_objects_add"
-    bl_label = "Curve Objects"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("curve.rectangle",
-            text="Rectangle")
-        layout.operator("curve.spirals",
-            text="Spirals")
-        layout.operator("curve.particle_tracer",
-            text="Particle Tracer")
-        layout.operator("curve.string_it_operator",
-            text="String It")
-
-
-# Register all operators and panels
-
-# Define "Extras" menu
-def menu_func(self, context):
-    self.layout.menu("INFO_MT_curve_extra_objects_add", icon="PLUGIN")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    # Add "Extras" menu to the "Add Mesh" menu
-    bpy.types.INFO_MT_curve_add.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    # Remove "Extras" menu from the "Add Mesh" menu.
-    bpy.types.INFO_MT_curve_add.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
+# ##### 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+# Contributed to by
+# meta-androcto #
+
+bl_info = {
+    "name": "Curve Objects",
+    "author": "Multiple Authors",
+    "version": (0, 1),
+    "blender": (2, 6, 3),
+    "location": "View3D > Add > Curve > Curve Objects",
+    "description": "Add extra curve object types",
+    "warning": "",
+    "wiki_url": "",
+    "tracker_url": "",
+    "category": "Add Curve"}
+
+
+if "bpy" in locals():
+    import imp
+    imp.reload(add_curve_rectangle_259)
+    imp.reload(add_curve_spirals)
+    imp.reload(cotejrp1_particle_tracer)
+    imp.reload(cotejrp1_string_it)
+
+else:
+    from . import add_curve_rectangle_259
+    from . import add_curve_spirals
+    from . import cotejrp1_particle_tracer
+    from . import cotejrp1_string_it
+
+import bpy
+
+
+class INFO_MT_curve_extras_add(bpy.types.Menu):
+    # Define the "Extras" menu
+    bl_idname = "INFO_MT_curve_extra_objects_add"
+    bl_label = "Curve Objects"
+
+    def draw(self, context):
+        layout = self.layout
+        layout.operator_context = 'INVOKE_REGION_WIN'
+        layout.operator("curve.rectangle",
+            text="Rectangle")
+        layout.operator("curve.spirals",
+            text="Spirals")
+        layout.operator("curve.particle_tracer",
+            text="Particle Tracer")
+        layout.operator("curve.string_it_operator",
+            text="String It")
+
+
+# Register all operators and panels
+
+# Define "Extras" menu
+def menu_func(self, context):
+    self.layout.menu("INFO_MT_curve_extra_objects_add", icon="PLUGIN")
+
+
+def register():
+    bpy.utils.register_module(__name__)
+
+    # Add "Extras" menu to the "Add Mesh" menu
+    bpy.types.INFO_MT_curve_add.append(menu_func)
+
+
+def unregister():
+    bpy.utils.unregister_module(__name__)
+
+    # Remove "Extras" menu from the "Add Mesh" menu.
+    bpy.types.INFO_MT_curve_add.remove(menu_func)
+
+if __name__ == "__main__":
+    register()


Property changes on: contrib/py/scripts/addons/add_curve_objects/__init__.py
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: contrib/py/scripts/addons/add_curve_objects/add_curve_rectangle_259.py
===================================================================
--- contrib/py/scripts/addons/add_curve_objects/add_curve_rectangle_259.py	2012-04-05 16:26:02 UTC (rev 3223)
+++ contrib/py/scripts/addons/add_curve_objects/add_curve_rectangle_259.py	2012-04-05 23:19:56 UTC (rev 3224)
@@ -1,244 +1,244 @@
-'''# ##### 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-bl_info = {
-    "name": "Rectangle",
-    "author": "Carbonic Wolf",
-    "version": (1,1),
-    "blender": (2, 5, 9),
-    "api": 39933,
-    "location": "View3D > Add > Curve",
-    "description": "Add rectangle",
-    "warning": "",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Add Curve"}
-    
- '''   
-##------------------------------------------------------------
-#### import modules
-import bpy
-from bpy.props import *
-from mathutils import *
-from math import *
-
-##------------------------------------------------------------
-# calculates the matrix for the new object
-# depending on user pref
-def align_matrix(context):
-    loc = Matrix.Translation(context.scene.cursor_location)
-    obj_align = context.user_preferences.edit.object_align
-    if (context.space_data.type == 'VIEW_3D'
-        and obj_align == 'VIEW'):
-        rot = context.space_data.region_3d.view_matrix.rotation_part().invert().resize4x4()
-    else:
-        rot = Matrix()
-    align_matrix = loc * rot
-    return align_matrix
-
-##------------------------------------------------------------
-#### Curve creation functions
-# sets bezierhandles to auto
-def setBezierHandles(obj, mode = 'AUTOMATIC'):
-    scene = bpy.context.scene
-    if obj.type != 'CURVE':
-        return
-    scene.objects.active = obj
-    bpy.ops.object.mode_set(mode='EDIT', toggle=True)
-    bpy.ops.curve.select_all(action='SELECT')
-    bpy.ops.curve.handle_type_set(type=mode)
-    bpy.ops.object.mode_set(mode='OBJECT', toggle=True)
-
-##------------------------------------------------------------
-#### Curve creation functions
-
-# get array of vertcoordinates acording to splinetype
-def vertsToPoints(Verts):
-    vertArray = []
-
-    for v in Verts:
-        vertArray += v
-
-    return vertArray
-
-# create new CurveObject from vertarray and splineType
-def createCurve(vertArray, props, align_matrix):
-    # options to vars
-    splineType = 'BEZIER'
-    name = 'rectangle'
-
-    # create curve
-    scene = bpy.context.scene
-    newCurve = bpy.data.curves.new(name, type = 'CURVE') # curvedatablock
-    newSpline = newCurve.splines.new(type = splineType)  # spline
-
-    # create spline from vertarray
-    newSpline.bezier_points.add(int(len(vertArray)*0.33))
-    newSpline.bezier_points.foreach_set('co', vertArray)
-
-    # Curve settings
-    newCurve.dimensions = '2D'
-    newSpline.use_cyclic_u = True
-    newSpline.use_endpoint_u = True
-    newSpline.order_u = 4
-
-    # create object with newCurve
-    new_obj = bpy.data.objects.new(name, newCurve)  # object
-    scene.objects.link(new_obj)                     # place in active scene
-    new_obj.select = True                           # set as selected
-    scene.objects.active = new_obj                  # set as active
-    new_obj.matrix_world = align_matrix             # apply matrix
-
-    setBezierHandles(new_obj, 'VECTOR')
-
-    return
-
-########################################################################
-#######################  Definitions ###################################
-########################################################################
-
-#### rectangle
-def rectangle_Curve(rectangle_w=2, rectangle_l=2, rectangle_r=1):
-    newPoints = []
-    x=rectangle_w/2
-    y=rectangle_l/2
-    r=rectangle_r/2
-    
-    if r>0:
-       newPoints.append([-x+r,y,0])

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list