Page MenuHome

Property.subtype / API docs: DIRECTORY_PATH vs. DIR_PATH
Closed, ResolvedPublic

Description

Blender Version
Broken: 2.69

Docs state there's a subtype DIRECTORY_PATH:
http://www.blender.org/documentation/blender_python_api_2_69_10/bpy.types.Property.html#bpy.types.Property.subtype

But only DIR_PATH works:

>>> bpy.types.Scene.p = bpy.props.StringProperty(subtype="DIRECTORY_PATH")

TypeError: StringProperty(subtype='DIRECTORY_PATH'): subtype not found in ('FILE_PATH', 'DIR_PATH', 'FILE_NAME', 'BYTE_STRING', 'PASSWORD', 'NONE')
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ValueError: bpy_struct "Scene" registration error: p could not register


>>> bpy.types.Property.bl_rna.properties['subtype'].enum_items.keys()

['NONE', 'FILE_PATH', 'DIRECTORY_PATH', 'PIXEL', 'UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'COLOR', 'TRANSLATION', 'DIRECTION', 'MATRIX', 'EULER', 'QUATERNION', 'XYZ', 'COLOR_GAMMA', 'COORDINATES', 'LAYER', 'LAYER_MEMBERSHIP']

Event Timeline

codemanx created this task.Feb 26 2014, 6:32 PM
codemanx raised the priority of this task from to 90.
codemanx updated the task description. (Show Details)
codemanx edited a custom field.
codemanx added a subscriber: codemanx.
Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved.Feb 26 2014, 6:57 PM

Closed by commit rB0fa832bed2e9.