Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-09-24 07:50:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-24 07:50:13 +0400
commit212a9312393781839d016532ba6e340b45387ee8 (patch)
treed9e03b1942e0cdc4fe54d702ee86232d80418120 /add_curve_torus_knots.py
parentb28d300ccd5cf8bce2843317fc3f7ca3dd0f99b9 (diff)
use the operator rather then its properties for drawing the UI, now its supported in the api.
Diffstat (limited to 'add_curve_torus_knots.py')
-rw-r--r--add_curve_torus_knots.py41
1 files changed, 19 insertions, 22 deletions
diff --git a/add_curve_torus_knots.py b/add_curve_torus_knots.py
index 1bf47cda..7c370c5e 100644
--- a/add_curve_torus_knots.py
+++ b/add_curve_torus_knots.py
@@ -238,38 +238,37 @@ class torus_knot_plus(bpy.types.Operator):
##### DRAW #####
def draw(self, context):
- props = self.properties
layout = self.layout
# general options
col = layout.column()
- #col.prop(props, 'KnotType') waits for more knottypes
+ #col.prop(self, 'KnotType') waits for more knottypes
col.label(text="Torus Knot Parameters")
# Parameters
box = layout.box()
- box.prop(props, 'torus_res')
- box.prop(props, 'torus_w')
- box.prop(props, 'torus_h')
- box.prop(props, 'torus_p')
- box.prop(props, 'torus_q')
- box.prop(props, 'options_plus')
- if props.options_plus:
- box.prop(props, 'torus_u')
- box.prop(props, 'torus_v')
- box.prop(props, 'torus_rounds')
+ box.prop(self, 'torus_res')
+ box.prop(self, 'torus_w')
+ box.prop(self, 'torus_h')
+ box.prop(self, 'torus_p')
+ box.prop(self, 'torus_q')
+ box.prop(self, 'options_plus')
+ if self.options_plus:
+ box.prop(self, 'torus_u')
+ box.prop(self, 'torus_v')
+ box.prop(self, 'torus_rounds')
# surface Options
col = layout.column()
col.label(text="Geometry Options")
box = layout.box()
- box.prop(props, 'geo_surf')
- if props.geo_surf:
- box.prop(props, 'geo_bDepth')
- box.prop(props, 'geo_bRes')
- box.prop(props, 'geo_extrude')
- #box.prop(props, 'geo_width') # not really good
- box.prop(props, 'geo_res')
+ box.prop(self, 'geo_surf')
+ if self.geo_surf:
+ box.prop(self, 'geo_bDepth')
+ box.prop(self, 'geo_bRes')
+ box.prop(self, 'geo_extrude')
+ #box.prop(self, 'geo_width') # not really good
+ box.prop(self, 'geo_res')
##### POLL #####
@classmethod
@@ -281,14 +280,12 @@ class torus_knot_plus(bpy.types.Operator):
# turn off undo
undo = bpy.context.user_preferences.edit.use_global_undo
bpy.context.user_preferences.edit.use_global_undo = False
-
- props = self.properties
if not self.options_plus:
self.torus_rounds = self.torus_p
# main function
- main(context, props, self.align_matrix)
+ main(context, self, self.align_matrix)
# restore pre operator undo state
bpy.context.user_preferences.edit.use_global_undo = undo