[Bf-extensions-cvs] [9dc19735] blender2.8: Python: use fields
Campbell Barton
noreply at git.blender.org
Thu Jul 12 15:10:37 CEST 2018
Commit: 9dc19735c32dcec30d03516365c2cee8a4b4ddc6
Author: Campbell Barton
Date: Thu Jul 12 15:09:15 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBA9dc19735c32dcec30d03516365c2cee8a4b4ddc6
Python: use fields
===================================================================
M blender_id/__init__.py
M bone_selection_sets.py
M depsgraph_debug.py
M development_icon_get.py
M io_coat3D/__init__.py
M io_curve_svg/__init__.py
M node_wrangler.py
M space_view3d_pie_menus/__init__.py
===================================================================
diff --git a/blender_id/__init__.py b/blender_id/__init__.py
index 0289b424..7d369bbd 100644
--- a/blender_id/__init__.py
+++ b/blender_id/__init__.py
@@ -179,26 +179,26 @@ def token_expires() -> typing.Optional[datetime.datetime]:
class BlenderIdPreferences(AddonPreferences):
bl_idname = __name__
- error_message = StringProperty(
+ error_message: StringProperty(
name='Error Message',
default='',
- options={'HIDDEN', 'SKIP_SAVE'}
+ options={'HIDDEN', 'SKIP_SAVE'},
)
- ok_message = StringProperty(
+ ok_message: StringProperty(
name='Message',
default='',
- options={'HIDDEN', 'SKIP_SAVE'}
+ options={'HIDDEN', 'SKIP_SAVE'},
)
- blender_id_username = StringProperty(
+ blender_id_username: StringProperty(
name='E-mail address',
default='',
- options={'HIDDEN', 'SKIP_SAVE'}
+ options={'HIDDEN', 'SKIP_SAVE'},
)
- blender_id_password = StringProperty(
+ blender_id_password: StringProperty(
name='Password',
default='',
options={'HIDDEN', 'SKIP_SAVE'},
- subtype='PASSWORD'
+ subtype='PASSWORD',
)
def reset_messages(self):
diff --git a/bone_selection_sets.py b/bone_selection_sets.py
index f0af60db..fcc4b70c 100644
--- a/bone_selection_sets.py
+++ b/bone_selection_sets.py
@@ -50,12 +50,12 @@ from bpy.props import (
# Note: bones are stored by name, this means that if the bone is renamed,
# there can be problems. However, bone renaming is unlikely during animation
class SelectionEntry(PropertyGroup):
- name = StringProperty(name="Bone Name")
+ name: StringProperty(name="Bone Name")
class SelectionSet(PropertyGroup):
- name = StringProperty(name="Set Name")
- bone_ids = CollectionProperty(type=SelectionEntry)
+ name: StringProperty(name="Set Name")
+ bone_ids: CollectionProperty(type=SelectionEntry)
# UI Panel w/ UIList ##########################################################
@@ -210,7 +210,7 @@ class POSE_OT_selection_set_move(NeedSelSetPluginOperator):
bl_description = "Move the active Selection Set up/down the list of sets"
bl_options = {'UNDO', 'REGISTER'}
- direction = EnumProperty(
+ direction: EnumProperty(
name="Move Direction",
description="Direction to move the active Selection Set: UP (default) or DOWN",
items=[
@@ -334,10 +334,11 @@ class POSE_OT_selection_set_select(NeedSelSetPluginOperator):
bl_description = "Add Selection Set bones to current selection"
bl_options = {'UNDO', 'REGISTER'}
- selection_set_index = IntProperty(
+ selection_set_index: IntProperty(
name='Selection Set Index',
default=-1,
- description='Which Selection Set to select; -1 uses the active Selection Set')
+ description='Which Selection Set to select; -1 uses the active Selection Set',
+ )
def execute(self, context):
arm = context.object
diff --git a/depsgraph_debug.py b/depsgraph_debug.py
index 7d59cf24..76f25290 100644
--- a/depsgraph_debug.py
+++ b/depsgraph_debug.py
@@ -48,12 +48,12 @@ def _get_depsgraph(context):
# Save data from depsgraph to a specified file.
class SCENE_OT_depsgraph_save_common:
- filepath = StringProperty(
- name="File Path",
- description="Filepath used for saving the file",
- maxlen=1024,
- subtype='FILE_PATH',
- )
+ filepath: StringProperty(
+ name="File Path",
+ description="Filepath used for saving the file",
+ maxlen=1024,
+ subtype='FILE_PATH',
+ )
def _getExtension(self, context):
return ""
@@ -86,8 +86,10 @@ class SCENE_OT_depsgraph_save_common:
pass
-class SCENE_OT_depsgraph_relations_graphviz(Operator,
- SCENE_OT_depsgraph_save_common):
+class SCENE_OT_depsgraph_relations_graphviz(
+ Operator,
+ SCENE_OT_depsgraph_save_common,
+):
bl_idname = "scene.depsgraph_relations_graphviz"
bl_label = "Save Depsgraph"
bl_description = "Save current scene's dependency graph to a graphviz file"
@@ -102,8 +104,10 @@ class SCENE_OT_depsgraph_relations_graphviz(Operator,
return True
-class SCENE_OT_depsgraph_stats_gnuplot(Operator,
- SCENE_OT_depsgraph_save_common):
+class SCENE_OT_depsgraph_stats_gnuplot(
+ Operator,
+ SCENE_OT_depsgraph_save_common,
+):
bl_idname = "scene.depsgraph_stats_gnuplot"
bl_label = "Save Depsgraph Stats"
bl_description = "Save current scene's evaluaiton stats to gnuplot file"
diff --git a/development_icon_get.py b/development_icon_get.py
index 3e20d899..3fc7f9b4 100644
--- a/development_icon_get.py
+++ b/development_icon_get.py
@@ -154,50 +154,61 @@ class IV_Preferences(bpy.types.AddonPreferences):
def set_panel_filter(self, value):
self.panel_icons.filter = value
- panel_filter = bpy.props.StringProperty(
+ panel_filter: bpy.props.StringProperty(
description="Filter",
default="",
get=lambda s: s.panel_icons.filter,
set=set_panel_filter,
- options={'TEXTEDIT_UPDATE'})
- show_panel_icons = bpy.props.BoolProperty(
+ options={'TEXTEDIT_UPDATE'},
+ )
+ show_panel_icons: bpy.props.BoolProperty(
name="Show Icons",
- description="Show icons", default=True)
- show_history = bpy.props.BoolProperty(
+ description="Show icons", default=True,
+ )
+ show_history: bpy.props.BoolProperty(
name="Show History",
- description="Show history", default=True)
- show_brush_icons = bpy.props.BoolProperty(
+ description="Show history", default=True,
+ )
+ show_brush_icons: bpy.props.BoolProperty(
name="Show Brush Icons",
description="Show brush icons", default=True,
- update=update_icons)
- show_matcap_icons = bpy.props.BoolProperty(
+ update=update_icons,
+ )
+ show_matcap_icons: bpy.props.BoolProperty(
name="Show Matcap Icons",
description="Show matcap icons", default=True,
- update=update_icons)
- show_colorset_icons = bpy.props.BoolProperty(
+ update=update_icons,
+ )
+ show_colorset_icons: bpy.props.BoolProperty(
name="Show Colorset Icons",
description="Show colorset icons", default=True,
- update=update_icons)
- copy_on_select = bpy.props.BoolProperty(
+ update=update_icons,
+ )
+ copy_on_select: bpy.props.BoolProperty(
name="Copy Icon On Click",
- description="Copy icon on click", default=True)
- close_on_select = bpy.props.BoolProperty(
+ description="Copy icon on click", default=True,
+ )
+ close_on_select: bpy.props.BoolProperty(
name="Close Popup On Click",
description=(
"Close the popup on click.\n"
"Not supported by some windows (User Preferences, Render)"
),
- default=False)
- auto_focus_filter = bpy.props.BoolProperty(
+ default=False,
+ )
+ auto_focus_filter: bpy.props.BoolProperty(
name="Auto Focus Input Field",
- description="Auto focus input field", default=True)
- show_panel = bpy.props.BoolProperty(
+ description="Auto focus input field", default=True,
+ )
+ show_panel: bpy.props.BoolProperty(
name="Show Panel",
- description="Show the panel in the Text Editor", default=True)
- show_header = bpy.props.BoolProperty(
+ description="Show the panel in the Text Editor", default=True,
+ )
+ show_header: bpy.props.BoolProperty(
name="Show Header",
description="Show the header in the Python Console",
- default=True)
+ default=True,
+ )
def draw(self, context):
layout = self.layout
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index 42bcbfb0..ea9b5d9a 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -56,207 +56,207 @@ def register():
bpy.coat3D['kuva'] = 1
class ObjectCoat3D(PropertyGroup):
- objpath = StringProperty(
+ objpath: StringProperty(
name="Object_Path"
- )
- applink_address = StringProperty(
+ )
+ applink_address: StringProperty(
name="Object_Applink_address"
- )
- applink_name = StringProperty(
+ )
+ applink_name: StringProperty(
name="Applink object name"
- )
- applink_group = StringProperty(
+ )
+ applink_group: StringProperty(
name="Applink group"
)
- applink_skip = StringProperty(
+ applink_skip: StringProperty(
name="Object_Applink_Update",
default="False"
)
- applink_firsttime = BoolProperty(
+ applink_firsttime: BoolProperty(
name="FirstTime",
description="FirstTime",
default=True
)
- coatpath = StringProperty(
+ coatpath: StringProperty(
name="Coat_Path"
- )
- objectdir = StringProperty(
+ )
+ objectdir: StringProperty(
name="ObjectPath",
subtype="FILE_PATH"
- )
- objecttime = StringProperty(
+ )
+ objecttime: StringProperty(
name="ObjectTime",
subtype="FILE_PATH"
- )
- texturefolder = StringProperty(
+ )
+ texturefolder: StringProperty(
name="Texture folder:",
subtype="DIR_PATH"
- )
- path3b = StringProperty(
+ )
+ path3b: StringProperty(
name="3B Path",
subtype="FILE_PATH"
- )
- export_on = BoolProperty(
+ )
+ export_on: BoolProperty(
name="Export_On",
description="Add Modifiers and export",
default=False
- )
- dime = FloatVectorProperty(
+ )
+ dime: FloatVectorProperty(
name="dime",
description="Dimension"
- )
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list