[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1015] trunk/py/scripts/addons: Patch [ #23759] more replace self.properties.foo --> self.foo for bf-extensions/ trunk/py/scripts
Thomas Dinges
dingto at gmx.de
Sat Sep 11 01:40:32 CEST 2010
Revision: 1015
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1015
Author: dingto
Date: 2010-09-11 01:40:32 +0200 (Sat, 11 Sep 2010)
Log Message:
-----------
Patch [#23759] more replace self.properties.foo --> self.foo for bf-extensions/trunk/py/scripts
by Filiciss Muhgue (filiciss). Thanks a lot!
Part 2: Extensions
Modified Paths:
--------------
trunk/py/scripts/addons/add_curve_aceous_galore.py
trunk/py/scripts/addons/add_curve_torus_knots.py
trunk/py/scripts/addons/add_mesh_3d_function_surface.py
trunk/py/scripts/addons/add_mesh_BoltFactory/Boltfactory.py
trunk/py/scripts/addons/add_mesh_BoltFactory/original_script_add_mesh_bolt.py
trunk/py/scripts/addons/add_mesh_ant_landscape.py
trunk/py/scripts/addons/add_mesh_extras.py
trunk/py/scripts/addons/add_mesh_gears.py
trunk/py/scripts/addons/add_mesh_gemstones.py
trunk/py/scripts/addons/add_mesh_pipe_joint.py
trunk/py/scripts/addons/add_mesh_solid.py
trunk/py/scripts/addons/add_mesh_twisted_torus.py
trunk/py/scripts/addons/curve_simplify.py
trunk/py/scripts/addons/io_anim_camera.py
trunk/py/scripts/addons/io_export_directx_x.py
trunk/py/scripts/addons/io_import_images_as_planes.py
trunk/py/scripts/addons/io_import_scene_lwo.py
trunk/py/scripts/addons/io_import_scene_mhx.py
trunk/py/scripts/addons/io_import_scene_unreal_psk.py
trunk/py/scripts/addons/io_mesh_raw/export_raw.py
trunk/py/scripts/addons/io_mesh_raw/import_raw.py
trunk/py/scripts/addons/io_mesh_stl/__init__.py
trunk/py/scripts/addons/mesh_relax.py
trunk/py/scripts/addons/mesh_surface_sketch.py
trunk/py/scripts/addons/render_renderfarmfi.py
trunk/py/scripts/addons/space_view3d_materials_utils.py
trunk/py/scripts/addons/space_view3d_panel_measure.py
trunk/py/scripts/addons/space_view3d_property_chart.py
Modified: trunk/py/scripts/addons/add_curve_aceous_galore.py
===================================================================
--- trunk/py/scripts/addons/add_curve_aceous_galore.py 2010-09-10 22:45:38 UTC (rev 1014)
+++ trunk/py/scripts/addons/add_curve_aceous_galore.py 2010-09-10 23:40:32 UTC (rev 1015)
@@ -21,7 +21,7 @@
'author': 'Jimmy Hazevoet, testscreenings',
'version': (0,1),
'blender': (2, 5, 3),
- 'api': 31667,
+ 'api': 31847,
'location': 'Add Curve menu',
'description': 'adds many types of curves',
'warning': '', # used for warning icon and text in addons panel
@@ -621,10 +621,10 @@
return vertArray
# create new CurveObject from vertarray and splineType
-def createCurve(vertArray, props, align_matrix):
+def createCurve(vertArray, self, align_matrix):
# options to vars
- splineType = props.outputType # output splineType 'POLY' 'NURBS' 'BEZIER'
- name = props.GalloreType # GalloreType as name
+ splineType = self.outputType # output splineType 'POLY' 'NURBS' 'BEZIER'
+ name = self.GalloreType # GalloreType as name
# create curve
scene = bpy.context.scene
@@ -641,10 +641,10 @@
newSpline.use_endpoint_u = True
# set curveOptions
- newCurve.dimensions = props.shape
- newSpline.use_cyclic_u = props.use_cyclic_u
- newSpline.use_endpoint_u = props.endp_u
- newSpline.order_u = props.order_u
+ newCurve.dimensions = self.shape
+ newSpline.use_cyclic_u = self.use_cyclic_u
+ newSpline.use_endpoint_u = self.endp_u
+ newSpline.order_u = self.order_u
# create object with newCurve
new_obj = bpy.data.objects.new(name, newCurve) # object
@@ -655,89 +655,89 @@
# set bezierhandles
if splineType == 'BEZIER':
- setBezierHandles(new_obj, props.handleType)
+ setBezierHandles(new_obj, self.handleType)
return
##------------------------------------------------------------
# Main Function
-def main(context, props, align_matrix):
+def main(context, self, align_matrix):
# deselect all objects
bpy.ops.object.select_all(action='DESELECT')
# options
- galType = props.GalloreType
- splineType = props.outputType
- innerRadius = props.innerRadius
- middleRadius = props.middleRadius
- outerRadius = props.outerRadius
+ galType = self.GalloreType
+ splineType = self.outputType
+ innerRadius = self.innerRadius
+ middleRadius = self.middleRadius
+ outerRadius = self.outerRadius
# get verts
if galType == 'Profile':
- verts = ProfileCurve(props.ProfileCurveType,
- props.ProfileCurvevar1,
- props.ProfileCurvevar2)
+ verts = ProfileCurve(self.ProfileCurveType,
+ self.ProfileCurvevar1,
+ self.ProfileCurvevar2)
if galType == 'Miscellaneous':
- verts = MiscCurve(props.MiscCurveType,
- props.MiscCurvevar1,
- props.MiscCurvevar2,
- props.MiscCurvevar3)
+ verts = MiscCurve(self.MiscCurveType,
+ self.MiscCurvevar1,
+ self.MiscCurvevar2,
+ self.MiscCurvevar3)
if galType == 'Flower':
- verts = FlowerCurve(props.petals,
+ verts = FlowerCurve(self.petals,
innerRadius,
outerRadius,
- props.petalWidth)
+ self.petalWidth)
if galType == 'Star':
- verts = StarCurve(props.starPoints,
+ verts = StarCurve(self.starPoints,
innerRadius,
outerRadius,
- props.starTwist)
+ self.starTwist)
if galType == 'Arc':
- verts = ArcCurve(props.arcSides,
- props.startAngle,
- props.endAngle,
+ verts = ArcCurve(self.arcSides,
+ self.startAngle,
+ self.endAngle,
innerRadius,
outerRadius,
- props.arcType)
+ self.arcType)
if galType == 'Cogwheel':
- verts = CogCurve(props.teeth,
+ verts = CogCurve(self.teeth,
innerRadius,
middleRadius,
outerRadius,
- props.bevel)
+ self.bevel)
if galType == 'Nsided':
- verts = nSideCurve(props.Nsides,
+ verts = nSideCurve(self.Nsides,
outerRadius)
'''
if galType == 'Splat':
- verts = SplatCurve(props.splatSides,
- props.splatScale,
- props.seed,
- props.basis,
+ verts = SplatCurve(self.splatSides,
+ self.splatScale,
+ self.seed,
+ self.basis,
outerRadius)
'''
if galType == 'Helix':
- verts = HelixCurve(props.helixPoints,
- props.helixHeight,
- props.helixStart,
- props.helixEnd,
- props.helixWidth,
- props.helix_a,
- props.helix_b)
+ verts = HelixCurve(self.helixPoints,
+ self.helixHeight,
+ self.helixStart,
+ self.helixEnd,
+ self.helixWidth,
+ self.helix_a,
+ self.helix_b)
if galType == 'Cycloid':
- verts = CycloidCurve(props.cycloPoints,
- props.cyclo_d,
- props.cycloType,
- props.cyclo_a,
- props.cyclo_b,
- props.cycloStart,
- props.cycloEnd)
+ verts = CycloidCurve(self.cycloPoints,
+ self.cyclo_d,
+ self.cycloType,
+ self.cyclo_a,
+ self.cyclo_b,
+ self.cycloStart,
+ self.cycloEnd)
# turn verts into array
vertArray = vertsToPoints(verts, splineType)
# create object
- createCurve(vertArray, props, align_matrix)
+ createCurve(vertArray, self, align_matrix)
return
@@ -968,99 +968,98 @@
##### DRAW #####
def draw(self, context):
- props = self.properties
layout = self.layout
# general options
col = layout.column()
- col.prop(props, 'GalloreType')
- col.label(text=props.GalloreType+" Options")
+ col.prop(self.properties, 'GalloreType')
+ col.label(text=self.GalloreType+" Options")
# options per GalloreType
box = layout.box()
- if props.GalloreType == 'Profile':
- box.prop(props, 'ProfileCurveType')
- box.prop(props, 'ProfileCurvevar1')
- box.prop(props, 'ProfileCurvevar2')
- if props.GalloreType == 'Miscellaneous':
- box.prop(props, 'MiscCurveType')
- box.prop(props, 'MiscCurvevar1')
- box.prop(props, 'MiscCurvevar2')
- #box.prop(props, 'MiscCurvevar3') # doesn't seem to do anything
- if props.GalloreType == 'Flower':
- box.prop(props, 'petals')
- box.prop(props, 'petalWidth')
- box.prop(props, 'innerRadius')
- box.prop(props, 'outerRadius')
- if props.GalloreType == 'Star':
- box.prop(props, 'starPoints')
- box.prop(props, 'starTwist')
- box.prop(props, 'innerRadius')
- box.prop(props, 'outerRadius')
- if props.GalloreType == 'Arc':
- box.prop(props, 'arcSides')
- box.prop(props, 'arcType') # has only one Type?
- box.prop(props, 'startAngle')
- box.prop(props, 'endAngle')
- box.prop(props, 'innerRadius') # doesn't seem to do anything
- box.prop(props, 'outerRadius')
- if props.GalloreType == 'Cogwheel':
- box.prop(props, 'teeth')
- box.prop(props, 'bevel')
- box.prop(props, 'innerRadius')
- box.prop(props, 'middleRadius')
- box.prop(props, 'outerRadius')
- if props.GalloreType == 'Nsided':
- box.prop(props, 'Nsides')
- box.prop(props, 'outerRadius', text='Radius')
+ if self.GalloreType == 'Profile':
+ box.prop(self.properties, 'ProfileCurveType')
+ box.prop(self.properties, 'ProfileCurvevar1')
+ box.prop(self.properties, 'ProfileCurvevar2')
+ if self.GalloreType == 'Miscellaneous':
+ box.prop(self.properties, 'MiscCurveType')
+ box.prop(self.properties, 'MiscCurvevar1')
+ box.prop(self.properties, 'MiscCurvevar2')
+ #box.prop(self.properties, 'MiscCurvevar3') # doesn't seem to do anything
+ if self.GalloreType == 'Flower':
+ box.prop(self.properties, 'petals')
+ box.prop(self.properties, 'petalWidth')
+ box.prop(self.properties, 'innerRadius')
+ box.prop(self.properties, 'outerRadius')
+ if self.GalloreType == 'Star':
+ box.prop(self.properties, 'starPoints')
+ box.prop(self.properties, 'starTwist')
+ box.prop(self.properties, 'innerRadius')
+ box.prop(self.properties, 'outerRadius')
+ if self.GalloreType == 'Arc':
+ box.prop(self.properties, 'arcSides')
+ box.prop(self.properties, 'arcType') # has only one Type?
+ box.prop(self.properties, 'startAngle')
+ box.prop(self.properties, 'endAngle')
+ box.prop(self.properties, 'innerRadius') # doesn't seem to do anything
+ box.prop(self.properties, 'outerRadius')
+ if self.GalloreType == 'Cogwheel':
+ box.prop(self.properties, 'teeth')
+ box.prop(self.properties, 'bevel')
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list