subtype support for properties in bpy.props.

This commit is contained in:
2010-02-01 22:04:33 +00:00
parent 26cfe812f8
commit 039d087171
18 changed files with 413 additions and 104 deletions

View File

@@ -1122,7 +1122,7 @@ class Export3DS(bpy.types.Operator):
# filename = StringProperty(name="File Name", description="File name used for exporting the 3DS file", maxlen= 1024, default= ""),
path = StringProperty(name="File Path", description="File path used for exporting the 3DS file", maxlen= 1024, default= "")
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, hidden=True)
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
def execute(self, context):
save_3ds(self.properties.path, context)

View File

@@ -3363,7 +3363,7 @@ class ExportFBX(bpy.types.Operator):
path = StringProperty(name="File Path", description="File path used for exporting the FBX file", maxlen= 1024, default="")
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, hidden=True)
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
EXP_OBS_SELECTED = BoolProperty(name="Selected Objects", description="Export selected objects on visible layers", default=True)
# EXP_OBS_SCENE = BoolProperty(name="Scene Objects", description="Export all objects in this scene", default=True)

View File

@@ -160,7 +160,7 @@ class ExportMDD(bpy.types.Operator):
# List of operator properties, the attributes will be assigned
# to the class instance from the operator settings before calling.
path = StringProperty(name="File Path", description="File path used for exporting the MDD file", maxlen=1024)
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, hidden=True)
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
fps = IntProperty(name="Frames Per Second", description="Number of frames/second", min=minfps, max=maxfps, default=25)
start_frame = IntProperty(name="Start Frame", description="Start frame for baking", min=minframe, max=maxframe, default=1)
end_frame = IntProperty(name="End Frame", description="End frame for baking", min=minframe, max=maxframe, default=250)

View File

@@ -897,7 +897,7 @@ class ExportOBJ(bpy.types.Operator):
# to the class instance from the operator settings before calling.
path = StringProperty(name="File Path", description="File path used for exporting the OBJ file", maxlen= 1024, default= "")
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, hidden=True)
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
# context group
use_selection = BoolProperty(name="Selection Only", description="", default= False)

View File

@@ -275,7 +275,7 @@ class ExportPLY(bpy.types.Operator):
path = StringProperty(name="File Path", description="File path used for exporting the PLY file", maxlen=1024, default="")
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, hidden=True)
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
use_modifiers = BoolProperty(name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default=True)
use_normals = BoolProperty(name="Normals", description="Export Normals for smooth and hard shaded faces", default=True)
use_uvs = BoolProperty(name="UVs", description="Exort the active UV layer", default=True)

View File

@@ -1227,7 +1227,7 @@ class ExportX3D(bpy.types.Operator):
# List of operator properties, the attributes will be assigned
# to the class instance from the operator settings before calling.
path = StringProperty(name="File Path", description="File path used for exporting the X3D file", maxlen= 1024, default= "")
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, hidden=True)
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
apply_modifiers = BoolProperty(name="Apply Modifiers", description="Use transformed mesh data from each object.", default=True)
triangulate = BoolProperty(name="Triangulate", description="Triangulate quads.", default=False)

View File

@@ -140,7 +140,7 @@ from bpy.props import *
rna_path = StringProperty(name="Property Edit",
description="Property path edit", maxlen=1024, default="", hidden=True)
description="Property path edit", maxlen=1024, default="", options={'HIDDEN'})
rna_value = StringProperty(name="Property Value",
description="Property value edit", maxlen=1024, default="")

View File

@@ -93,16 +93,16 @@ class RandomizeLocRotSize(bpy.types.Operator):
use_loc = BoolProperty(name="Randomize Location",
description="Randomize the scale values", default=True)
loc = FloatVectorProperty(name="Location",
sdfwefreloc = FloatVectorProperty(name="Location",
description="Maximun distance the objects can spread over each axis",
default=(0.0, 0.0, 0.0), min=-100.0, max=100.0)
default=(0.0, 0.0, 0.0), min=-100.0, max=100.0, subtype='TRANSLATION')
use_rot = BoolProperty(name="Randomize Rotation",
description="Randomize the rotation values", default=True)
rot = FloatVectorProperty(name="Rotation",
description="Maximun rotation over each axis",
default=(0.0, 0.0, 0.0), min=-180.0, max=180.0)
default=(0.0, 0.0, 0.0), min=-180.0, max=180.0, subtype='TRANSLATION')
use_scale = BoolProperty(name="Randomize Scale",
description="Randomize the scale values", default=True)
@@ -116,7 +116,7 @@ class RandomizeLocRotSize(bpy.types.Operator):
scale = FloatVectorProperty(name="Scale",
description="Maximum scale randomization over each axis",
default=(0.0, 0.0, 0.0), min=-100.0, max=100.0)
default=(0.0, 0.0, 0.0), min=-100.0, max=100.0, subtype='TRANSLATION')
def execute(self, context):
from math import radians

View File

@@ -31,7 +31,7 @@ class ExportUVLayout(bpy.types.Operator):
bl_undo = True
path = StringProperty(name="File Path", description="File path used for exporting the SVG file", maxlen=1024, default="")
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, hidden=True)
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
only_selected = BoolProperty(name="Only Selected", description="Export Only the selected UVs", default=False)
def poll(self, context):

View File

@@ -291,7 +291,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
return {'FINISHED'}
doc_id = StringProperty(name="Doc ID",
description="", maxlen=1024, default="", hidden=True)
description="", maxlen=1024, default="", options={'HIDDEN'})
doc_new = StringProperty(name="Edit Description",
description="", maxlen=1024, default="")

View File

@@ -235,9 +235,9 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
path = bpy.props.StringProperty(name="File Path", description="File path to write file to.")
filename = bpy.props.StringProperty(name="File Name", description="Name of the file.")
directory = bpy.props.StringProperty(name="Directory", description="Directory of the file.")
filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, hidden=True)
filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, hidden=True)
filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, hidden=True)
filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
def execute(self, context):
if not self.properties.path:

View File

@@ -1502,9 +1502,9 @@ class WM_OT_keyconfig_import(bpy.types.Operator):
path = bpy.props.StringProperty(name="File Path", description="File path to write file to.")
filename = bpy.props.StringProperty(name="File Name", description="Name of the file.")
directory = bpy.props.StringProperty(name="Directory", description="Directory of the file.")
filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, hidden=True)
filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, hidden=True)
filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, hidden=True)
filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
keep_original = bpy.props.BoolProperty(name="Keep original", description="Keep original file after copying to configuration folder", default=True)
@@ -1561,9 +1561,9 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
path = bpy.props.StringProperty(name="File Path", description="File path to write file to.")
filename = bpy.props.StringProperty(name="File Name", description="Name of the file.")
directory = bpy.props.StringProperty(name="Directory", description="Directory of the file.")
filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, hidden=True)
filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, hidden=True)
filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, hidden=True)
filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
def execute(self, context):
if not self.properties.path: