File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,13 @@ def calculate_segments(self):
4646 for i in subsurf_radius_trunc_values .items ():
4747 if round (self .radius * 1000 * i [1 ], 2 ) <= self .max_trunc_radius * 1000 :
4848 return i [0 ]
49-
50- return list (subsurf_radius_trunc_values .keys ())[- 1 ] # default value, limit the maximum value of calculate segments
49+
50+ # NOTE: Здесь нет возможности отправить сообщение юзеру об ограничении.
51+ # self это какой-то экземпляр bpy.types.MESH_OT_symmetric_circle_add который не позволяет вызвать self.report()
52+ # Если проверять на ограничение сегментов в SymmetricCircle, где доступен self.report() то будет избыточная проверка
53+ # в каждом цикле, а не только тогда когда изменяется свойство segments. Проверка в методе SymmetricCircle.execute() это overhead.
54+
55+ return list (subsurf_radius_trunc_values .keys ())[- 1 ] # limit reached
5156
5257
5358def get_radius (self ):
@@ -191,7 +196,7 @@ def execute(self, context):
191196 if context .mode == 'OBJECT' :
192197 bm .to_mesh (blender_mesh ) # from bmesh to object mesh (context.object.data)
193198 elif context .mode == 'EDIT_MESH' :
194- bmesh .update_edit_mesh (blender_mesh , False ) # from bmesh to edit mesh (current edited mesh, copy of source mesh)
199+ bmesh .update_edit_mesh (mesh = blender_mesh , loop_triangles = False ) # from bmesh to edit mesh (current edited mesh, copy of source mesh)
195200
196201 # bm.clear()
197202 # bm.free()
You can’t perform that action at this time.
0 commit comments