forked from bartvdbraak/blender
py style change only - make property definitions consistent
This commit is contained in:
parent
3a81f23e09
commit
90d19ad883
@ -88,36 +88,62 @@ class AddTorus(Operator):
|
|||||||
bl_label = "Add Torus"
|
bl_label = "Add Torus"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
major_radius = FloatProperty(name="Major Radius",
|
major_radius = FloatProperty(
|
||||||
|
name="Major Radius",
|
||||||
description=("Radius from the origin to the "
|
description=("Radius from the origin to the "
|
||||||
"center of the cross sections"),
|
"center of the cross sections"),
|
||||||
default=1.0, min=0.01, max=100.0)
|
min=0.01, max=100.0,
|
||||||
minor_radius = FloatProperty(name="Minor Radius",
|
default=1.0,
|
||||||
|
)
|
||||||
|
minor_radius = FloatProperty(
|
||||||
|
name="Minor Radius",
|
||||||
description="Radius of the torus' cross section",
|
description="Radius of the torus' cross section",
|
||||||
default=0.25, min=0.01, max=100.0)
|
min=0.01, max=100.0,
|
||||||
major_segments = IntProperty(name="Major Segments",
|
default=0.25,
|
||||||
|
)
|
||||||
|
major_segments = IntProperty(
|
||||||
|
name="Major Segments",
|
||||||
description="Number of segments for the main ring of the torus",
|
description="Number of segments for the main ring of the torus",
|
||||||
default=48, min=3, max=256)
|
min=3, max=256,
|
||||||
minor_segments = IntProperty(name="Minor Segments",
|
default=48,
|
||||||
|
)
|
||||||
|
minor_segments = IntProperty(
|
||||||
|
name="Minor Segments",
|
||||||
description="Number of segments for the minor ring of the torus",
|
description="Number of segments for the minor ring of the torus",
|
||||||
default=12, min=3, max=256)
|
min=3, max=256,
|
||||||
use_abso = BoolProperty(name="Use Int+Ext Controls",
|
default=12,
|
||||||
|
)
|
||||||
|
use_abso = BoolProperty(
|
||||||
|
name="Use Int+Ext Controls",
|
||||||
description="Use the Int / Ext controls for torus dimensions",
|
description="Use the Int / Ext controls for torus dimensions",
|
||||||
default=False)
|
default=False,
|
||||||
abso_major_rad = FloatProperty(name="Exterior Radius",
|
)
|
||||||
|
abso_major_rad = FloatProperty(
|
||||||
|
name="Exterior Radius",
|
||||||
description="Total Exterior Radius of the torus",
|
description="Total Exterior Radius of the torus",
|
||||||
default=1.0, min=0.01, max=100.0)
|
min=0.01, max=100.0,
|
||||||
abso_minor_rad = FloatProperty(name="Inside Radius",
|
default=1.0,
|
||||||
|
)
|
||||||
|
abso_minor_rad = FloatProperty(
|
||||||
|
name="Inside Radius",
|
||||||
description="Total Interior Radius of the torus",
|
description="Total Interior Radius of the torus",
|
||||||
default=0.5, min=0.01, max=100.0)
|
min=0.01, max=100.0,
|
||||||
|
default=0.5,
|
||||||
|
)
|
||||||
|
|
||||||
# generic transform props
|
# generic transform props
|
||||||
view_align = BoolProperty(name="Align to View",
|
view_align = BoolProperty(
|
||||||
default=False)
|
name="Align to View",
|
||||||
location = FloatVectorProperty(name="Location",
|
default=False,
|
||||||
subtype='TRANSLATION')
|
)
|
||||||
rotation = FloatVectorProperty(name="Rotation",
|
location = FloatVectorProperty(
|
||||||
subtype='EULER')
|
name="Location",
|
||||||
|
subtype='TRANSLATION',
|
||||||
|
)
|
||||||
|
rotation = FloatVectorProperty(
|
||||||
|
name="Rotation",
|
||||||
|
subtype='EULER',
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
|
||||||
|
@ -74,11 +74,11 @@ class MeshMirrorUV(Operator):
|
|||||||
bl_label = "Copy Mirrored UV coords"
|
bl_label = "Copy Mirrored UV coords"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
direction = EnumProperty(items=(
|
direction = EnumProperty(
|
||||||
('POSITIVE', "Positive", ""),
|
name="Axis Direction",
|
||||||
('NEGATIVE', "Negative", "")),
|
items=(('POSITIVE', "Positive", ""),
|
||||||
name="Axis Direction",
|
('NEGATIVE', "Negative", "")),
|
||||||
description="")
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -195,8 +195,12 @@ class SubdivisionSet(Operator):
|
|||||||
bl_label = "Subdivision Set"
|
bl_label = "Subdivision Set"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
level = IntProperty(name="Level",
|
level = IntProperty(
|
||||||
default=1, min=-100, max=100, soft_min=-6, soft_max=6)
|
name="Level",
|
||||||
|
min=-100, max=100,
|
||||||
|
soft_min=-6, soft_max=6,
|
||||||
|
default=1,
|
||||||
|
)
|
||||||
|
|
||||||
relative = BoolProperty(
|
relative = BoolProperty(
|
||||||
name="Relative",
|
name="Relative",
|
||||||
|
@ -351,33 +351,34 @@ class AlignObjects(Operator):
|
|||||||
description=("Enables high quality calculation of the "
|
description=("Enables high quality calculation of the "
|
||||||
"bounding box for perfect results on complex "
|
"bounding box for perfect results on complex "
|
||||||
"shape meshes with rotation/scale (Slow)"),
|
"shape meshes with rotation/scale (Slow)"),
|
||||||
default=True)
|
default=True,
|
||||||
|
)
|
||||||
align_mode = EnumProperty(items=(
|
align_mode = EnumProperty(
|
||||||
('OPT_1', "Negative Sides", ""),
|
name="Align Mode:",
|
||||||
('OPT_2', "Centers", ""),
|
items=(('OPT_1', "Negative Sides", ""),
|
||||||
('OPT_3', "Positive Sides", "")),
|
('OPT_2', "Centers", ""),
|
||||||
name="Align Mode:",
|
('OPT_3', "Positive Sides", ""),
|
||||||
description="",
|
),
|
||||||
default='OPT_2')
|
default='OPT_2',
|
||||||
|
)
|
||||||
relative_to = EnumProperty(items=(
|
relative_to = EnumProperty(
|
||||||
('OPT_1', "Scene Origin", ""),
|
name="Relative To:",
|
||||||
('OPT_2', "3D Cursor", ""),
|
items=(('OPT_1', "Scene Origin", ""),
|
||||||
('OPT_3', "Selection", ""),
|
('OPT_2', "3D Cursor", ""),
|
||||||
('OPT_4', "Active", "")),
|
('OPT_3', "Selection", ""),
|
||||||
name="Relative To:",
|
('OPT_4', "Active", ""),
|
||||||
description="",
|
),
|
||||||
default='OPT_4')
|
default='OPT_4',
|
||||||
|
)
|
||||||
align_axis = EnumProperty(items=(
|
align_axis = EnumProperty(
|
||||||
('X', "X", ""),
|
name="Align",
|
||||||
('Y', "Y", ""),
|
description="Align to axis",
|
||||||
('Z', "Z", ""),
|
items=(('X', "X", ""),
|
||||||
),
|
('Y', "Y", ""),
|
||||||
name="Align",
|
('Z', "Z", ""),
|
||||||
description="Align to axis",
|
),
|
||||||
options={'ENUM_FLAG'})
|
options={'ENUM_FLAG'},
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -51,19 +51,25 @@ class QuickFur(Operator):
|
|||||||
bl_label = "Quick Fur"
|
bl_label = "Quick Fur"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
density = EnumProperty(items=(
|
density = EnumProperty(
|
||||||
('LIGHT', "Light", ""),
|
name="Fur Density",
|
||||||
('MEDIUM', "Medium", ""),
|
items=(('LIGHT', "Light", ""),
|
||||||
('HEAVY', "Heavy", "")),
|
('MEDIUM', "Medium", ""),
|
||||||
name="Fur Density",
|
('HEAVY', "Heavy", "")),
|
||||||
description="",
|
default='MEDIUM',
|
||||||
default='MEDIUM')
|
)
|
||||||
|
view_percentage = IntProperty(
|
||||||
view_percentage = IntProperty(name="View %",
|
name="View %",
|
||||||
default=10, min=1, max=100, soft_min=1, soft_max=100)
|
min=1, max=100,
|
||||||
|
soft_min=1, soft_max=100,
|
||||||
length = FloatProperty(name="Length",
|
default=10,
|
||||||
default=0.1, min=0.001, max=100, soft_min=0.01, soft_max=10)
|
)
|
||||||
|
length = FloatProperty(
|
||||||
|
name="Length",
|
||||||
|
min=0.001, max=100,
|
||||||
|
soft_min=0.01, soft_max=10,
|
||||||
|
default=0.1,
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
fake_context = bpy.context.copy()
|
fake_context = bpy.context.copy()
|
||||||
@ -110,31 +116,50 @@ class QuickExplode(Operator):
|
|||||||
bl_label = "Quick Explode"
|
bl_label = "Quick Explode"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
style = EnumProperty(items=(
|
style = EnumProperty(
|
||||||
('EXPLODE', "Explode", ""),
|
name="Explode Style",
|
||||||
('BLEND', "Blend", "")),
|
items=(('EXPLODE', "Explode", ""),
|
||||||
name="Explode Style",
|
('BLEND', "Blend", "")),
|
||||||
description="",
|
default='EXPLODE',
|
||||||
default='EXPLODE')
|
)
|
||||||
|
amount = IntProperty(
|
||||||
|
name="Amount of pieces",
|
||||||
|
min=2, max=10000,
|
||||||
|
soft_min=2, soft_max=10000,
|
||||||
|
default=100,
|
||||||
|
)
|
||||||
|
frame_duration = IntProperty(
|
||||||
|
name="Duration",
|
||||||
|
min=1, max=300000,
|
||||||
|
soft_min=1, soft_max=10000,
|
||||||
|
default=50,
|
||||||
|
)
|
||||||
|
|
||||||
amount = IntProperty(name="Amount of pieces",
|
frame_start = IntProperty(
|
||||||
default=100, min=2, max=10000, soft_min=2, soft_max=10000)
|
name="Start Frame",
|
||||||
|
min=1, max=300000,
|
||||||
|
soft_min=1, soft_max=10000,
|
||||||
|
default=1,
|
||||||
|
)
|
||||||
|
frame_end = IntProperty(
|
||||||
|
name="End Frame",
|
||||||
|
min=1, max=300000,
|
||||||
|
soft_min=1, soft_max=10000,
|
||||||
|
default=10,
|
||||||
|
)
|
||||||
|
|
||||||
frame_duration = IntProperty(name="Duration",
|
velocity = FloatProperty(
|
||||||
default=50, min=1, max=300000, soft_min=1, soft_max=10000)
|
name="Outwards Velocity",
|
||||||
|
min=0, max=300000,
|
||||||
|
soft_min=0, soft_max=10,
|
||||||
|
default=1,
|
||||||
|
)
|
||||||
|
|
||||||
frame_start = IntProperty(name="Start Frame",
|
fade = BoolProperty(
|
||||||
default=1, min=1, max=300000, soft_min=1, soft_max=10000)
|
name="Fade",
|
||||||
|
description="Fade the pieces over time.",
|
||||||
frame_end = IntProperty(name="End Frame",
|
default=True,
|
||||||
default=10, min=1, max=300000, soft_min=1, soft_max=10000)
|
)
|
||||||
|
|
||||||
velocity = FloatProperty(name="Outwards Velocity",
|
|
||||||
default=1, min=0, max=300000, soft_min=0, soft_max=10)
|
|
||||||
|
|
||||||
fade = BoolProperty(name="Fade",
|
|
||||||
description="Fade the pieces over time.",
|
|
||||||
default=True)
|
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
fake_context = bpy.context.copy()
|
fake_context = bpy.context.copy()
|
||||||
@ -272,12 +297,11 @@ class QuickSmoke(Operator):
|
|||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
style = EnumProperty(
|
style = EnumProperty(
|
||||||
|
name="Smoke Style",
|
||||||
items=(('STREAM', "Stream", ""),
|
items=(('STREAM', "Stream", ""),
|
||||||
('PUFF', "Puff", ""),
|
('PUFF', "Puff", ""),
|
||||||
('FIRE', "Fire", ""),
|
('FIRE', "Fire", ""),
|
||||||
),
|
),
|
||||||
name="Smoke Style",
|
|
||||||
description="",
|
|
||||||
default='STREAM',
|
default='STREAM',
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -390,19 +414,16 @@ class QuickFluid(Operator):
|
|||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
style = EnumProperty(
|
style = EnumProperty(
|
||||||
|
name="Fluid Style",
|
||||||
items=(('INFLOW', "Inflow", ""),
|
items=(('INFLOW', "Inflow", ""),
|
||||||
('BASIC', "Basic", ""),
|
('BASIC', "Basic", "")),
|
||||||
),
|
default='BASIC',
|
||||||
name="Fluid Style",
|
)
|
||||||
description="",
|
|
||||||
default='BASIC',
|
|
||||||
)
|
|
||||||
initial_velocity = FloatVectorProperty(
|
initial_velocity = FloatVectorProperty(
|
||||||
name="Initial Velocity",
|
name="Initial Velocity",
|
||||||
description="Initial velocity of the fluid",
|
description="Initial velocity of the fluid",
|
||||||
|
min=-100.0, max=100.0,
|
||||||
default=(0.0, 0.0, 0.0),
|
default=(0.0, 0.0, 0.0),
|
||||||
min=-100.0,
|
|
||||||
max=100.0,
|
|
||||||
subtype='VELOCITY',
|
subtype='VELOCITY',
|
||||||
)
|
)
|
||||||
show_flows = BoolProperty(
|
show_flows = BoolProperty(
|
||||||
|
@ -145,9 +145,12 @@ class RandomizeLocRotSize(Operator):
|
|||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
'''scale_min = FloatProperty(name="Minimun Scale Factor",
|
'''scale_min = FloatProperty(
|
||||||
description="Lowest scale percentage possible",
|
name="Minimun Scale Factor",
|
||||||
default=0.15, min=-1.0, max=1.0, precision=3)'''
|
description="Lowest scale percentage possible",
|
||||||
|
min=-1.0, max=1.0, precision=3,
|
||||||
|
default=0.15,
|
||||||
|
)'''
|
||||||
|
|
||||||
scale = FloatVectorProperty(
|
scale = FloatVectorProperty(
|
||||||
name="Scale",
|
name="Scale",
|
||||||
|
@ -82,8 +82,12 @@ class SequencerCutMulticam(Operator):
|
|||||||
bl_label = "Cut multicam"
|
bl_label = "Cut multicam"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
camera = IntProperty(name="Camera",
|
camera = IntProperty(
|
||||||
default=1, min=1, max=32, soft_min=1, soft_max=32)
|
name="Camera",
|
||||||
|
min=1, max=32,
|
||||||
|
soft_min=1, soft_max=32,
|
||||||
|
default=1,
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -552,7 +552,6 @@ class LightMapPack(Operator):
|
|||||||
|
|
||||||
PREF_CONTEXT = bpy.props.EnumProperty(
|
PREF_CONTEXT = bpy.props.EnumProperty(
|
||||||
name="Selection",
|
name="Selection",
|
||||||
description="",
|
|
||||||
items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"),
|
items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"),
|
||||||
("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"),
|
("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"),
|
||||||
("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop")
|
("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop")
|
||||||
|
@ -1110,17 +1110,24 @@ class SmartProject(Operator):
|
|||||||
bl_label = "Smart UV Project"
|
bl_label = "Smart UV Project"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
angle_limit = FloatProperty(name="Angle Limit",
|
angle_limit = FloatProperty(
|
||||||
|
name="Angle Limit",
|
||||||
description="lower for more projection groups, higher for less distortion",
|
description="lower for more projection groups, higher for less distortion",
|
||||||
default=66.0, min=1.0, max=89.0)
|
min=1.0, max=89.0,
|
||||||
|
default=66.0,
|
||||||
island_margin = FloatProperty(name="Island Margin",
|
)
|
||||||
|
island_margin = FloatProperty(
|
||||||
|
name="Island Margin",
|
||||||
description="Margin to reduce bleed from adjacent islands",
|
description="Margin to reduce bleed from adjacent islands",
|
||||||
default=0.0, min=0.0, max=1.0)
|
min=0.0, max=1.0,
|
||||||
|
default=0.0,
|
||||||
user_area_weight = FloatProperty(name="Area Weight",
|
)
|
||||||
|
user_area_weight = FloatProperty(
|
||||||
|
name="Area Weight",
|
||||||
description="Weight projections vector by faces with larger areas",
|
description="Weight projections vector by faces with larger areas",
|
||||||
default=0.0, min=0.0, max=1.0)
|
min=0.0, max=1.0,
|
||||||
|
default=0.0,
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -151,11 +151,35 @@ class VertexPaintDirt(Operator):
|
|||||||
bl_label = "Dirty Vertex Colors"
|
bl_label = "Dirty Vertex Colors"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
blur_strength = FloatProperty(name="Blur Strength", description="Blur strength per iteration", default=1.0, min=0.01, max=1.0)
|
blur_strength = FloatProperty(
|
||||||
blur_iterations = IntProperty(name="Blur Iterations", description="Number times to blur the colors. (higher blurs more)", default=1, min=0, max=40)
|
name="Blur Strength",
|
||||||
clean_angle = FloatProperty(name="Highlight Angle", description="Less then 90 limits the angle used in the tonal range", default=180.0, min=0.0, max=180.0)
|
description="Blur strength per iteration",
|
||||||
dirt_angle = FloatProperty(name="Dirt Angle", description="Less then 90 limits the angle used in the tonal range", default=0.0, min=0.0, max=180.0)
|
min=0.01, max=1.0,
|
||||||
dirt_only = BoolProperty(name="Dirt Only", description="Dont calculate cleans for convex areas", default=False)
|
default=1.0,
|
||||||
|
)
|
||||||
|
blur_iterations = IntProperty(
|
||||||
|
name="Blur Iterations",
|
||||||
|
description="Number times to blur the colors. (higher blurs more)",
|
||||||
|
min=0, max=40,
|
||||||
|
default=1,
|
||||||
|
)
|
||||||
|
clean_angle = FloatProperty(
|
||||||
|
name="Highlight Angle",
|
||||||
|
description="Less then 90 limits the angle used in the tonal range",
|
||||||
|
min=0.0, max=180.0,
|
||||||
|
default=180.0,
|
||||||
|
)
|
||||||
|
dirt_angle = FloatProperty(
|
||||||
|
name="Dirt Angle",
|
||||||
|
description="Less then 90 limits the angle used in the tonal range",
|
||||||
|
min=0.0, max=180.0,
|
||||||
|
default=0.0,
|
||||||
|
)
|
||||||
|
dirt_only = BoolProperty(
|
||||||
|
name="Dirt Only",
|
||||||
|
description="Dont calculate cleans for convex areas",
|
||||||
|
default=False,
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
import time
|
import time
|
||||||
|
@ -557,14 +557,12 @@ class WM_OT_context_set_id(Operator):
|
|||||||
|
|
||||||
doc_id = StringProperty(
|
doc_id = StringProperty(
|
||||||
name="Doc ID",
|
name="Doc ID",
|
||||||
description="",
|
|
||||||
maxlen=1024,
|
maxlen=1024,
|
||||||
options={'HIDDEN'},
|
options={'HIDDEN'},
|
||||||
)
|
)
|
||||||
|
|
||||||
doc_new = StringProperty(
|
doc_new = StringProperty(
|
||||||
name="Edit Description",
|
name="Edit Description",
|
||||||
description="",
|
|
||||||
maxlen=1024,
|
maxlen=1024,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -102,7 +102,10 @@ def register():
|
|||||||
items.extend([(cat, cat, "") for cat in sorted(items_unique)])
|
items.extend([(cat, cat, "") for cat in sorted(items_unique)])
|
||||||
return items
|
return items
|
||||||
|
|
||||||
WindowManager.addon_search = StringProperty(name="Search", description="Search within the selected filter")
|
WindowManager.addon_search = StringProperty(
|
||||||
|
name="Search",
|
||||||
|
description="Search within the selected filter",
|
||||||
|
)
|
||||||
WindowManager.addon_filter = EnumProperty(
|
WindowManager.addon_filter = EnumProperty(
|
||||||
items=addon_filter_items,
|
items=addon_filter_items,
|
||||||
name="Category",
|
name="Category",
|
||||||
|
@ -141,7 +141,11 @@ class ConsoleLanguage(Operator):
|
|||||||
'''Set the current language for this console'''
|
'''Set the current language for this console'''
|
||||||
bl_idname = "console.language"
|
bl_idname = "console.language"
|
||||||
bl_label = "Console Language"
|
bl_label = "Console Language"
|
||||||
language = StringProperty(name="Language", maxlen=32, default="")
|
|
||||||
|
language = StringProperty(
|
||||||
|
name="Language",
|
||||||
|
maxlen=32,
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
sc = context.space_data
|
sc = context.space_data
|
||||||
|
@ -1106,7 +1106,10 @@ class WM_OT_addon_disable(Operator):
|
|||||||
bl_idname = "wm.addon_disable"
|
bl_idname = "wm.addon_disable"
|
||||||
bl_label = "Disable Add-On"
|
bl_label = "Disable Add-On"
|
||||||
|
|
||||||
module = StringProperty(name="Module", description="Module name of the addon to disable")
|
module = StringProperty(
|
||||||
|
name="Module",
|
||||||
|
description="Module name of the addon to disable",
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
addon_utils.disable(self.module)
|
addon_utils.disable(self.module)
|
||||||
@ -1118,16 +1121,35 @@ class WM_OT_addon_install(Operator):
|
|||||||
bl_idname = "wm.addon_install"
|
bl_idname = "wm.addon_install"
|
||||||
bl_label = "Install Add-On..."
|
bl_label = "Install Add-On..."
|
||||||
|
|
||||||
overwrite = BoolProperty(name="Overwrite", description="Remove existing addons with the same ID", default=True)
|
overwrite = BoolProperty(
|
||||||
|
name="Overwrite",
|
||||||
|
description="Remove existing addons with the same ID",
|
||||||
|
default=True,
|
||||||
|
)
|
||||||
target = EnumProperty(
|
target = EnumProperty(
|
||||||
name="Target Path",
|
name="Target Path",
|
||||||
items=(('DEFAULT', "Default", ""),
|
items=(('DEFAULT', "Default", ""),
|
||||||
('PREFS', "User Prefs", "")))
|
('PREFS', "User Prefs", "")),
|
||||||
|
)
|
||||||
|
|
||||||
filepath = StringProperty(name="File Path", description="File path to write file to")
|
filepath = StringProperty(
|
||||||
filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
|
name="File Path",
|
||||||
filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
|
description="File path to write file to",
|
||||||
filter_glob = StringProperty(default="*.py;*.zip", options={'HIDDEN'})
|
)
|
||||||
|
filter_folder = BoolProperty(
|
||||||
|
name="Filter folders",
|
||||||
|
default=True,
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
filter_python = BoolProperty(
|
||||||
|
name="Filter python",
|
||||||
|
default=True,
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
filter_glob = StringProperty(
|
||||||
|
default="*.py;*.zip",
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _module_remove(path_addons, module):
|
def _module_remove(path_addons, module):
|
||||||
@ -1264,7 +1286,10 @@ class WM_OT_addon_remove(Operator):
|
|||||||
bl_idname = "wm.addon_remove"
|
bl_idname = "wm.addon_remove"
|
||||||
bl_label = "Remove Add-On"
|
bl_label = "Remove Add-On"
|
||||||
|
|
||||||
module = StringProperty(name="Module", description="Module name of the addon to remove")
|
module = StringProperty(
|
||||||
|
name="Module",
|
||||||
|
description="Module name of the addon to remove",
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def path_from_addon(module):
|
def path_from_addon(module):
|
||||||
@ -1312,7 +1337,10 @@ class WM_OT_addon_expand(Operator):
|
|||||||
bl_idname = "wm.addon_expand"
|
bl_idname = "wm.addon_expand"
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
module = StringProperty(name="Module", description="Module name of the addon to expand")
|
module = StringProperty(
|
||||||
|
name="Module",
|
||||||
|
description="Module name of the addon to expand",
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
module_name = self.module
|
module_name = self.module
|
||||||
|
@ -533,12 +533,31 @@ class WM_OT_keyconfig_import(Operator):
|
|||||||
bl_idname = "wm.keyconfig_import"
|
bl_idname = "wm.keyconfig_import"
|
||||||
bl_label = "Import Key Configuration..."
|
bl_label = "Import Key Configuration..."
|
||||||
|
|
||||||
filepath = StringProperty(name="File Path", description="Filepath to write file to", default="keymap.py")
|
filepath = StringProperty(
|
||||||
filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
|
name="File Path",
|
||||||
filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
|
description="Filepath to write file to",
|
||||||
filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
|
default="keymap.py",
|
||||||
|
)
|
||||||
keep_original = BoolProperty(name="Keep original", description="Keep original file after copying to configuration folder", default=True)
|
filter_folder = BoolProperty(
|
||||||
|
name="Filter folders",
|
||||||
|
default=True,
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
filter_text = BoolProperty(
|
||||||
|
name="Filter text",
|
||||||
|
default=True,
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
filter_python = BoolProperty(
|
||||||
|
name="Filter python",
|
||||||
|
default=True,
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
keep_original = BoolProperty(
|
||||||
|
name="Keep original",
|
||||||
|
description="Keep original file after copying to configuration folder",
|
||||||
|
default=True,
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
@ -580,10 +599,26 @@ class WM_OT_keyconfig_export(Operator):
|
|||||||
bl_idname = "wm.keyconfig_export"
|
bl_idname = "wm.keyconfig_export"
|
||||||
bl_label = "Export Key Configuration..."
|
bl_label = "Export Key Configuration..."
|
||||||
|
|
||||||
filepath = StringProperty(name="File Path", description="Filepath to write file to", default="keymap.py")
|
filepath = StringProperty(
|
||||||
filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
|
name="File Path",
|
||||||
filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
|
description="Filepath to write file to",
|
||||||
filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
|
default="keymap.py",
|
||||||
|
)
|
||||||
|
filter_folder = BoolProperty(
|
||||||
|
name="Filter folders",
|
||||||
|
default=True,
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
filter_text = BoolProperty(
|
||||||
|
name="Filter text",
|
||||||
|
default=True,
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
filter_python = BoolProperty(
|
||||||
|
name="Filter python",
|
||||||
|
default=True,
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
if not self.filepath:
|
if not self.filepath:
|
||||||
@ -673,7 +708,10 @@ class WM_OT_keymap_restore(Operator):
|
|||||||
bl_idname = "wm.keymap_restore"
|
bl_idname = "wm.keymap_restore"
|
||||||
bl_label = "Restore Key Map(s)"
|
bl_label = "Restore Key Map(s)"
|
||||||
|
|
||||||
all = BoolProperty(name="All Keymaps", description="Restore all keymaps to default")
|
all = BoolProperty(
|
||||||
|
name="All Keymaps",
|
||||||
|
description="Restore all keymaps to default",
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
wm = context.window_manager
|
wm = context.window_manager
|
||||||
@ -693,7 +731,10 @@ class WM_OT_keyitem_restore(Operator):
|
|||||||
bl_idname = "wm.keyitem_restore"
|
bl_idname = "wm.keyitem_restore"
|
||||||
bl_label = "Restore Key Map Item"
|
bl_label = "Restore Key Map Item"
|
||||||
|
|
||||||
item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove")
|
item_id = IntProperty(
|
||||||
|
name="Item Identifier",
|
||||||
|
description="Identifier of the item to remove",
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
@ -737,7 +778,10 @@ class WM_OT_keyitem_remove(Operator):
|
|||||||
bl_idname = "wm.keyitem_remove"
|
bl_idname = "wm.keyitem_remove"
|
||||||
bl_label = "Remove Key Map Item"
|
bl_label = "Remove Key Map Item"
|
||||||
|
|
||||||
item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove")
|
item_id = IntProperty(
|
||||||
|
name="Item Identifier",
|
||||||
|
description="Identifier of the item to remove",
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -45,10 +45,12 @@ class OBJECT_OT_add_object(bpy.types.Operator, AddObjectHelper):
|
|||||||
bl_description = "Create a new Mesh Object"
|
bl_description = "Create a new Mesh Object"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
scale = FloatVectorProperty(name='scale',
|
scale = FloatVectorProperty(
|
||||||
default=(1.0, 1.0, 1.0),
|
name='scale',
|
||||||
subtype='TRANSLATION',
|
default=(1.0, 1.0, 1.0),
|
||||||
description='scaling')
|
subtype='TRANSLATION',
|
||||||
|
description='scaling',
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
|
||||||
|
@ -24,18 +24,26 @@ class ExportSomeData(bpy.types.Operator, ExportHelper):
|
|||||||
# ExportHelper mixin class uses this
|
# ExportHelper mixin class uses this
|
||||||
filename_ext = ".txt"
|
filename_ext = ".txt"
|
||||||
|
|
||||||
filter_glob = StringProperty(default="*.txt", options={'HIDDEN'})
|
filter_glob = StringProperty(
|
||||||
|
default="*.txt",
|
||||||
|
options={'HIDDEN'},
|
||||||
|
)
|
||||||
|
|
||||||
# List of operator properties, the attributes will be assigned
|
# List of operator properties, the attributes will be assigned
|
||||||
# to the class instance from the operator settings before calling.
|
# to the class instance from the operator settings before calling.
|
||||||
use_setting = BoolProperty(name="Example Boolean", description="Example Tooltip", default=True)
|
use_setting = BoolProperty(
|
||||||
|
name="Example Boolean",
|
||||||
|
description="Example Tooltip",
|
||||||
|
default=True,
|
||||||
|
)
|
||||||
|
|
||||||
type = EnumProperty(items=(('OPT_A', "First Option", "Description one"),
|
type = EnumProperty(
|
||||||
('OPT_B', "Second Option", "Description two."),
|
name="Example Enum",
|
||||||
),
|
description="Choose between two items",
|
||||||
name="Example Enum",
|
items=(('OPT_A', "First Option", "Description one"),
|
||||||
description="Choose between two items",
|
('OPT_B', "Second Option", "Description two.")),
|
||||||
default='OPT_A')
|
default='OPT_A',
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
|
@ -43,25 +43,38 @@ class AddBox(bpy.types.Operator):
|
|||||||
bl_label = "Add Box"
|
bl_label = "Add Box"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
width = FloatProperty(name="Width",
|
width = FloatProperty(
|
||||||
|
name="Width",
|
||||||
description="Box Width",
|
description="Box Width",
|
||||||
default=1.0, min=0.01, max=100.0)
|
min=0.01, max=100.0,
|
||||||
|
default=1.0,
|
||||||
height = FloatProperty(name="Height",
|
)
|
||||||
|
height = FloatProperty(
|
||||||
|
name="Height",
|
||||||
description="Box Height",
|
description="Box Height",
|
||||||
default=1.0, min=0.01, max=100.0)
|
min=0.01, max=100.0,
|
||||||
|
default=1.0,
|
||||||
depth = FloatProperty(name="Depth",
|
)
|
||||||
|
depth = FloatProperty(
|
||||||
|
name="Depth",
|
||||||
description="Box Depth",
|
description="Box Depth",
|
||||||
default=1.0, min=0.01, max=100.0)
|
min=0.01, max=100.0,
|
||||||
|
default=1.0,
|
||||||
|
)
|
||||||
|
|
||||||
# generic transform props
|
# generic transform props
|
||||||
view_align = BoolProperty(name="Align to View",
|
view_align = BoolProperty(
|
||||||
default=False)
|
name="Align to View",
|
||||||
location = FloatVectorProperty(name="Location",
|
default=False,
|
||||||
subtype='TRANSLATION')
|
)
|
||||||
rotation = FloatVectorProperty(name="Rotation",
|
location = FloatVectorProperty(
|
||||||
subtype='EULER')
|
name="Location",
|
||||||
|
subtype='TRANSLATION',
|
||||||
|
)
|
||||||
|
rotation = FloatVectorProperty(
|
||||||
|
name="Rotation",
|
||||||
|
subtype='EULER',
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@ class ViewOperator(bpy.types.Operator):
|
|||||||
bl_idname = "view3d.modal_operator"
|
bl_idname = "view3d.modal_operator"
|
||||||
bl_label = "Simple View Operator"
|
bl_label = "Simple View Operator"
|
||||||
|
|
||||||
offset = FloatVectorProperty(name="Offset", size=3)
|
offset = FloatVectorProperty(
|
||||||
|
name="Offset",
|
||||||
|
size=3,
|
||||||
|
)
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
v3d = context.space_data
|
v3d = context.space_data
|
||||||
|
Loading…
Reference in New Issue
Block a user