Skip to content

Commit ad8a9e5

Browse files
committed
Refactor auto_segments to auto_segmentation
1 parent 02723e0 commit ad8a9e5

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

SymmetricCircle.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_radius(self):
5757
def set_radius(self, value):
5858
self['radius'] = value
5959

60-
if self.auto_segments:
60+
if self.auto_segmentation:
6161
self['segments'] = calculate_segments(self)
6262

6363

@@ -67,16 +67,16 @@ def get_segments(self):
6767

6868

6969
def set_segments(self, value):
70-
if not self.auto_segments:
70+
if not self.auto_segmentation:
7171
self['segments'] = value // 4 * 4
7272

7373

74-
def get_auto_segments(self):
75-
return self.get('auto_segments', False)
74+
def get_auto_segmentation(self):
75+
return self.get('auto_segmentation', False)
7676

7777

78-
def set_auto_segments(self, value):
79-
self['auto_segments'] = value
78+
def set_auto_segmentation(self, value):
79+
self['auto_segmentation'] = value
8080

8181
if value:
8282
self['segments'] = calculate_segments(self)
@@ -89,7 +89,7 @@ def get_max_trunc_radius(self):
8989
def set_max_trunc_radius(self, value):
9090
self['max_trunc_radius'] = value
9191

92-
if self.auto_segments:
92+
if self.auto_segmentation:
9393
self['segments'] = calculate_segments(self)
9494

9595

@@ -109,13 +109,13 @@ class SymmetricCircle(Operator):
109109
min=4, soft_max=1000, step=4, default=32,
110110
get=get_segments, set=set_segments
111111
)
112-
auto_segments: BoolProperty(name='Auto segments',
113-
description='Automatic calculation of the optimal number of segments for the specified radius truncation tolerance ' \
114-
'when used modifier Subdiv relative to original radius. This option has restricted maximum to 1000 segments',
115-
get=get_auto_segments, set=set_auto_segments
112+
auto_segmentation: BoolProperty(name='Auto segmentation',
113+
description='Automatic calculation of the optimal number of segments for the specified radius truncation tolerance ' \
114+
'when used modifier Subdiv relative to original radius. This option has restricted maximum to 1000 segments',
115+
get=get_auto_segmentation, set=set_auto_segmentation
116116
)
117117
max_trunc_radius: FloatProperty(name='Maximum truncation tolerance by radius',
118-
description='Maximum truncation tolerance by radius when use the option Auto segments',
118+
description='Maximum truncation tolerance by radius when use the option Auto segmentation',
119119
default=0.00025, soft_min=0.0001, soft_max=10, step=0.001, precision=2,
120120
subtype='DISTANCE', # unit='CAMERA'
121121
get=get_max_trunc_radius, set=set_max_trunc_radius
@@ -209,12 +209,12 @@ def draw(self, context):
209209

210210
row = col.row(align=True, heading='Segments')
211211
row.prop(self, 'segments', text='')
212-
row.active = True if not self.auto_segments else False
212+
row.active = True if not self.auto_segmentation else False
213213

214214
row = col.row(align=True)
215-
row.prop(self, 'auto_segments')
215+
row.prop(self, 'auto_segmentation')
216216
row_right = row.row(align=True)
217-
row_right.active = self.auto_segments
217+
row_right.active = self.auto_segmentation
218218
row_right.prop(self, 'max_trunc_radius', text='')
219219
col.separator()
220220

0 commit comments

Comments
 (0)