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:
authorNBurn <7nburn@gmail.com>2019-01-18 00:48:54 +0300
committerNBurn <7nburn@gmail.com>2019-01-18 00:48:54 +0300
commitaeabdc02a83a976b2f594cd66873c6d2b537e669 (patch)
tree3ac5922be25219ab666aae4b8d04002bce2e70a6 /mesh_tissue
parentba97e19e5b3df449784a4cc4ed89ce7b511ec3e4 (diff)
Update Add-ons class properties to annotations
This should take care of most of the class property conversions to use the new annotation format (colon instead of equals) for assignment. There may still be a few edge cases that were missed.
Diffstat (limited to 'mesh_tissue')
-rw-r--r--mesh_tissue/colors_groups_exchanger.py38
-rw-r--r--mesh_tissue/dual_mesh.py8
-rw-r--r--mesh_tissue/lattice.py28
-rw-r--r--mesh_tissue/tessellate_numpy.py108
-rw-r--r--mesh_tissue/uv_to_mesh.py8
5 files changed, 95 insertions, 95 deletions
diff --git a/mesh_tissue/colors_groups_exchanger.py b/mesh_tissue/colors_groups_exchanger.py
index 9b48b2fa..a511e951 100644
--- a/mesh_tissue/colors_groups_exchanger.py
+++ b/mesh_tissue/colors_groups_exchanger.py
@@ -65,27 +65,27 @@ class vertex_colors_to_vertex_groups(Operator):
bl_description = ("Convert the active Vertex Color into a Vertex Group")
bl_options = {'REGISTER', 'UNDO'}
- red = BoolProperty(
+ red: BoolProperty(
name="Red Channel",
default=False,
description="Convert Red Channel"
)
- green = BoolProperty(
+ green: BoolProperty(
name="Green Channel",
default=False,
description="Convert Green Channel"
)
- blue = BoolProperty(
+ blue: BoolProperty(
name="Blue Channel",
default=False,
description="Convert Blue Channel"
)
- value = BoolProperty(
+ value: BoolProperty(
name="Value Channel",
default=True,
description="Convert Value Channel"
)
- invert = BoolProperty(
+ invert: BoolProperty(
name="Invert",
default=False,
description="Invert all Color Channels"
@@ -184,7 +184,7 @@ class vertex_group_to_vertex_colors(Operator):
bl_description = ("Convert the active Vertex Group into a Vertex Color")
bl_options = {'REGISTER', 'UNDO'}
- channel = EnumProperty(
+ channel: EnumProperty(
items=[('Blue', 'Blue Channel', 'Convert to Blue Channel'),
('Green', 'Green Channel', 'Convert to Green Channel'),
('Red', 'Red Channel', 'Convert to Red Channel'),
@@ -196,7 +196,7 @@ class vertex_group_to_vertex_colors(Operator):
options={'LIBRARY_EDITABLE'}
)
- invert = BoolProperty(
+ invert: BoolProperty(
name="Invert",
default=False,
description="Invert Color Channel"
@@ -282,26 +282,26 @@ class curvature_to_vertex_groups(Operator):
"mesh. Is based on Dirty Vertex Color")
bl_options = {'REGISTER', 'UNDO'}
- invert = BoolProperty(
+ invert: BoolProperty(
name="Invert",
default=False,
description="Invert Values"
)
- blur_strength = FloatProperty(
+ blur_strength: FloatProperty(
name="Blur Strength",
default=1,
min=0.001,
max=1,
description="Blur strength per iteration"
)
- blur_iterations = IntProperty(
+ blur_iterations: IntProperty(
name="Blur Iterations",
default=1,
min=0,
max=40,
description="Number of times to blur the values"
)
- min_angle = FloatProperty(
+ min_angle: FloatProperty(
name="Min Angle",
default=0,
min=0,
@@ -309,7 +309,7 @@ class curvature_to_vertex_groups(Operator):
subtype='ANGLE',
description="Minimum angle"
)
- max_angle = FloatProperty(
+ max_angle: FloatProperty(
name="Max Angle",
default=pi,
min=pi / 2,
@@ -317,7 +317,7 @@ class curvature_to_vertex_groups(Operator):
subtype='ANGLE',
description="Maximum angle"
)
- invert = BoolProperty(
+ invert: BoolProperty(
name="Invert",
default=False,
description="Invert the curvature map"
@@ -362,7 +362,7 @@ class face_area_to_vertex_groups(Operator):
"faces")
bl_options = {'REGISTER', 'UNDO'}
- invert = BoolProperty(
+ invert: BoolProperty(
name="Invert",
default=False,
description="Invert Values"
@@ -425,35 +425,35 @@ class harmonic_weight(Operator):
bl_description = "Create an harmonic variation of the active Vertex Group"
bl_options = {'REGISTER', 'UNDO'}
- freq = FloatProperty(
+ freq: FloatProperty(
name="Frequency",
default=20,
soft_min=0,
soft_max=100,
description="Wave frequency"
)
- amp = FloatProperty(
+ amp: FloatProperty(
name="Amplitude",
default=1,
soft_min=0,
soft_max=10,
description="Wave amplitude"
)
- midlevel = FloatProperty(
+ midlevel: FloatProperty(
name="Midlevel",
default=0,
min=-1,
max=1,
description="Midlevel"
)
- add = FloatProperty(
+ add: FloatProperty(
name="Add",
default=0,
min=-1,
max=1,
description="Add to the Weight"
)
- mult = FloatProperty(
+ mult: FloatProperty(
name="Multiply",
default=0,
min=0,
diff --git a/mesh_tissue/dual_mesh.py b/mesh_tissue/dual_mesh.py
index 3b20e138..97f0123e 100644
--- a/mesh_tissue/dual_mesh.py
+++ b/mesh_tissue/dual_mesh.py
@@ -55,7 +55,7 @@ class dual_mesh(Operator):
bl_description = ("Convert a generic mesh into a polygonal mesh")
bl_options = {'REGISTER', 'UNDO'}
- quad_method = EnumProperty(
+ quad_method: EnumProperty(
items=[('BEAUTY', 'Beauty',
'Split the quads in nice triangles, slower method'),
('FIXED', 'Fixed',
@@ -70,7 +70,7 @@ class dual_mesh(Operator):
default="FIXED",
options={'LIBRARY_EDITABLE'}
)
- polygon_method = EnumProperty(
+ polygon_method: EnumProperty(
items=[
('BEAUTY', 'Beauty', 'Arrange the new triangles evenly'),
('CLIP', 'Clip',
@@ -80,12 +80,12 @@ class dual_mesh(Operator):
default="BEAUTY",
options={'LIBRARY_EDITABLE'}
)
- preserve_borders = BoolProperty(
+ preserve_borders: BoolProperty(
name="Preserve Borders",
default=True,
description="Preserve original borders"
)
- apply_modifiers = BoolProperty(
+ apply_modifiers: BoolProperty(
name="Apply Modifiers",
default=True,
description="Apply object's modifiers"
diff --git a/mesh_tissue/lattice.py b/mesh_tissue/lattice.py
index 737b4c87..73f4c33c 100644
--- a/mesh_tissue/lattice.py
+++ b/mesh_tissue/lattice.py
@@ -173,80 +173,80 @@ class lattice_along_surface(Operator):
"Lattice's topology")
bl_options = {'REGISTER', 'UNDO'}
- set_parent = BoolProperty(
+ set_parent: BoolProperty(
name="Set Parent",
default=True,
description="Automatically set the Lattice as parent"
)
- flipNormals = BoolProperty(
+ flipNormals: BoolProperty(
name="Flip Normals",
default=False,
description="Flip normals direction"
)
- swapUV = BoolProperty(
+ swapUV: BoolProperty(
name="Swap UV",
default=False,
description="Flip grid's U and V"
)
- flipU = BoolProperty(
+ flipU: BoolProperty(
name="Flip U",
default=False,
description="Flip grid's U")
- flipV = BoolProperty(
+ flipV: BoolProperty(
name="Flip V",
default=False,
description="Flip grid's V"
)
- flipW = BoolProperty(
+ flipW: BoolProperty(
name="Flip W",
default=False,
description="Flip grid's W"
)
- use_groups = BoolProperty(
+ use_groups: BoolProperty(
name="Vertex Group",
default=False,
description="Use active Vertex Group for lattice's thickness"
)
- high_quality_lattice = BoolProperty(
+ high_quality_lattice: BoolProperty(
name="High quality",
default=True,
description="Increase the the subdivisions in normal direction for a "
"more correct result"
)
- hide_lattice = BoolProperty(
+ hide_lattice: BoolProperty(
name="Hide Lattice",
default=True,
description="Automatically hide the Lattice object"
)
- scale_x = FloatProperty(
+ scale_x: FloatProperty(
name="Scale X",
default=1,
min=0.001,
max=1,
description="Object scale"
)
- scale_y = FloatProperty(
+ scale_y: FloatProperty(
name="Scale Y", default=1,
min=0.001,
max=1,
description="Object scale"
)
- scale_z = FloatProperty(
+ scale_z: FloatProperty(
name="Scale Z",
default=1,
min=0.001,
max=1,
description="Object scale"
)
- thickness = FloatProperty(
+ thickness: FloatProperty(
name="Thickness",
default=1,
soft_min=0,
soft_max=5,
description="Lattice thickness"
)
- displace = FloatProperty(
+ displace: FloatProperty(
name="Displace",
default=0,
soft_min=-1,
diff --git a/mesh_tissue/tessellate_numpy.py b/mesh_tissue/tessellate_numpy.py
index d2361cb4..f6fb97c0 100644
--- a/mesh_tissue/tessellate_numpy.py
+++ b/mesh_tissue/tessellate_numpy.py
@@ -432,24 +432,24 @@ def store_parameters(operator, ob):
class tissue_tessellate_prop(PropertyGroup):
- generator = StringProperty()
- component = StringProperty()
- offset = FloatProperty()
- zscale = FloatProperty(default=1)
- merge = BoolProperty()
- merge_thres = FloatProperty()
- gen_modifiers = BoolProperty()
- com_modifiers = BoolProperty()
- mode = StringProperty()
- rotation_mode = StringProperty()
- scale_mode = StringProperty()
- fill_mode = StringProperty()
- bool_random = BoolProperty()
- random_seed = IntProperty()
- vertexgroup = StringProperty()
- bool_vertex_group = BoolProperty()
- bool_selection = BoolProperty()
- bool_shapekeys = BoolProperty()
+ generator: StringProperty()
+ component: StringProperty()
+ offset: FloatProperty()
+ zscale: FloatProperty(default=1)
+ merge: BoolProperty()
+ merge_thres: FloatProperty()
+ gen_modifiers: BoolProperty()
+ com_modifiers: BoolProperty()
+ mode: StringProperty()
+ rotation_mode: StringProperty()
+ scale_mode: StringProperty()
+ fill_mode: StringProperty()
+ bool_random: BoolProperty()
+ random_seed: IntProperty()
+ vertexgroup: StringProperty()
+ bool_vertex_group: BoolProperty()
+ bool_selection: BoolProperty()
+ bool_shapekeys: BoolProperty()
class tessellate(Operator):
@@ -459,23 +459,23 @@ class tessellate(Operator):
"faces, adapting the shape to the different faces")
bl_options = {'REGISTER', 'UNDO'}
- object_name = StringProperty(
+ object_name: StringProperty(
name="",
description="Name of the generated object"
)
- zscale = FloatProperty(
+ zscale: FloatProperty(
name="Scale",
default=1,
soft_min=0,
soft_max=10,
description="Scale factor for the component thickness"
)
- scale_mode = EnumProperty(
+ scale_mode: EnumProperty(
items=(('CONSTANT', "Constant", ""), ('ADAPTIVE', "Proportional", "")),
default='CONSTANT',
name="Z-Scale according to faces size"
)
- offset = FloatProperty(
+ offset: FloatProperty(
name="Surface Offset",
default=0,
min=-1, max=1,
@@ -483,77 +483,77 @@ class tessellate(Operator):
soft_max=1,
description="Surface offset"
)
- mode = EnumProperty(
+ mode: EnumProperty(
items=(('CONSTANT', "Constant", ""), ('ADAPTIVE', "Adaptive", "")),
default='ADAPTIVE',
name="Component Mode"
)
- rotation_mode = EnumProperty(
+ rotation_mode: EnumProperty(
items=(('RANDOM', "Random", ""),
('UV', "Active UV", ""),
('DEFAULT', "Default", "")),
default='DEFAULT',
name="Component Rotation"
)
- fill_mode = EnumProperty(
+ fill_mode: EnumProperty(
items=(('QUAD', "Quad", ""), ('FAN', "Fan", "")),
default='QUAD',
name="Fill Mode"
)
- gen_modifiers = BoolProperty(
+ gen_modifiers: BoolProperty(
name="Generator Modifiers",
default=False,
description="Apply modifiers to base object"
)
- com_modifiers = BoolProperty(
+ com_modifiers: BoolProperty(
name="Component Modifiers",
default=False,
description="Apply modifiers to component object"
)
- merge = BoolProperty(
+ merge: BoolProperty(
name="Merge",
default=False,
description="Merge vertices in adjacent duplicates"
)
- merge_thres = FloatProperty(
+ merge_thres: FloatProperty(
name="Distance",
default=0.001,
soft_min=0,
soft_max=10,
description="Limit below which to merge vertices"
)
- generator = StringProperty(
+ generator: StringProperty(
name="",
description="Base object for the tessellation"
)
- component = StringProperty(
+ component: StringProperty(
name="",
description="Component object for the tessellation"
)
- bool_random = BoolProperty(
+ bool_random: BoolProperty(
name="Randomize",
default=False,
description="Randomize component rotation"
)
- random_seed = IntProperty(
+ random_seed: IntProperty(
name="Seed",
default=0,
soft_min=0,
soft_max=10,
description="Random seed"
)
- bool_vertex_group = BoolProperty(
+ bool_vertex_group: BoolProperty(
name="Map Vertex Group",
default=False,
description="Map the active "
"Vertex Group from the Base object to generated geometry"
)
- bool_selection = BoolProperty(
+ bool_selection: BoolProperty(
name="On selected Faces",
default=False,
description="Create Tessellation only on selected faces"
)
- bool_shapekeys = BoolProperty(
+ bool_shapekeys: BoolProperty(
name="Use Shape Keys",
default=False,
description="Use component's active Shape Key according to "
@@ -1046,23 +1046,23 @@ class settings_tessellate(Operator):
"Allow also to change tessellation's parameters")
bl_options = {'REGISTER', 'UNDO'}
- object_name = StringProperty(
+ object_name: StringProperty(
name="",
description="Name of the generated object"
)
- zscale = FloatProperty(
+ zscale: FloatProperty(
name="Scale",
default=1,
soft_min=0,
soft_max=10,
description="Scale factor for the component thickness"
)
- scale_mode = EnumProperty(
+ scale_mode: EnumProperty(
items=(('CONSTANT', "Constant", ""), ('ADAPTIVE', "Proportional", "")),
default='ADAPTIVE',
name="Scale variation"
)
- offset = FloatProperty(
+ offset: FloatProperty(
name="Surface Offset",
default=0,
min=-1, max=1,
@@ -1070,76 +1070,76 @@ class settings_tessellate(Operator):
soft_max=1,
description="Surface offset"
)
- mode = EnumProperty(
+ mode: EnumProperty(
items=(('CONSTANT', "Constant", ""), ('ADAPTIVE', "Adaptive", "")),
default='ADAPTIVE',
name="Component Mode"
)
- rotation_mode = EnumProperty(
+ rotation_mode: EnumProperty(
items=(('RANDOM', "Random", ""), ('UV', "Active UV", ""),
('DEFAULT', "Default", "")),
default='DEFAULT',
name="Component Rotation"
)
- fill_mode = EnumProperty(
+ fill_mode: EnumProperty(
items=(('QUAD', "Quad", ""), ('FAN', "Fan", "")),
default='QUAD',
name="Fill Mode"
)
- gen_modifiers = BoolProperty(
+ gen_modifiers: BoolProperty(
name="Generator Modifiers",
default=False,
description="Apply modifiers to base object"
)
- com_modifiers = BoolProperty(
+ com_modifiers: BoolProperty(
name="Component Modifiers",
default=False,
description="Apply modifiers to component object"
)
- merge = BoolProperty(
+ merge: BoolProperty(
name="Merge",
default=False,
description="Merge vertices in adjacent duplicates"
)
- merge_thres = FloatProperty(
+ merge_thres: FloatProperty(
name="Distance",
default=0.001,
soft_min=0,
soft_max=10,
description="Limit below which to merge vertices"
)
- generator = StringProperty(
+ generator: StringProperty(
name="",
description="Base object for the tessellation"
)
- component = StringProperty(
+ component: StringProperty(
name="",
description="Component object for the tessellation"
)
- bool_random = BoolProperty(
+ bool_random: BoolProperty(
name="Randomize",
default=False,
description="Randomize component rotation"
)
- random_seed = IntProperty(
+ random_seed: IntProperty(
name="Seed",
default=0,
soft_min=0,
soft_max=10,
description="Random seed"
)
- bool_vertex_group = BoolProperty(
+ bool_vertex_group: BoolProperty(
name="Map Vertex Group",
default=False,
description="Map on generated "
"geometry the active Vertex Group from the base object"
)
- bool_selection = BoolProperty(
+ bool_selection: BoolProperty(
name="On selected Faces",
default=False,
description="Create Tessellation only on select faces"
)
- bool_shapekeys = BoolProperty(
+ bool_shapekeys: BoolProperty(
name="Use Shape Keys",
default=False,
description="Use component's active Shape Key according to active "
diff --git a/mesh_tissue/uv_to_mesh.py b/mesh_tissue/uv_to_mesh.py
index f502c147..928fa3f5 100644
--- a/mesh_tissue/uv_to_mesh.py
+++ b/mesh_tissue/uv_to_mesh.py
@@ -53,22 +53,22 @@ class uv_to_mesh(Operator):
bl_description = ("Create a new Mesh based on active UV")
bl_options = {'REGISTER', 'UNDO'}
- apply_modifiers = BoolProperty(
+ apply_modifiers: BoolProperty(
name="Apply Modifiers",
default=False,
description="Apply object's modifiers"
)
- vertex_groups = BoolProperty(
+ vertex_groups: BoolProperty(
name="Keep Vertex Groups",
default=False,
description="Transfer all the Vertex Groups"
)
- materials = BoolProperty(
+ materials: BoolProperty(
name="Keep Materials",
default=True,
description="Transfer all the Materials"
)
- auto_scale = BoolProperty(
+ auto_scale: BoolProperty(
name="Resize",
default=True,
description="Scale the new object in order to preserve the average surface area"