mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Docs: correct use of FILE_PATH for directories
Also correct own error in recent doc-update regarding the expected return value for fileselect_add.
This commit is contained in:
parent
5e61fbe1c1
commit
575600d540
2 changed files with 4 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ but for this it is require to define the following properties:
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
directory: StringProperty(subtype='FILE_PATH')
|
||||
directory: StringProperty(subtype='DIR_PATH')
|
||||
files: CollectionProperty(type=bpy.types.OperatorFileListElement)
|
||||
|
||||
This ``directory`` and ``files`` properties now will be used by the
|
||||
|
|
@ -29,7 +29,7 @@ class ShaderScriptImport(bpy.types.Operator, ImportHelper):
|
|||
This Operator can import multiple .txt files, we need following directory and files
|
||||
properties that the file handler will use to set files path data
|
||||
"""
|
||||
directory: bpy.props.StringProperty(subtype='FILE_PATH', options={'SKIP_SAVE', 'HIDDEN'})
|
||||
directory: bpy.props.StringProperty(subtype='DIR_PATH', options={'SKIP_SAVE', 'HIDDEN'})
|
||||
files: bpy.props.CollectionProperty(type=bpy.types.OperatorFileListElement, options={'SKIP_SAVE', 'HIDDEN'})
|
||||
|
||||
"""Allow the user to select if the node's label is set or not"""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
This method is used from the operators ``invoke`` callback.
|
||||
On success they should return ``{'RUNNING_MODAL'}`` otherwise ``{'CANCELLED'}``.
|
||||
This method is used from the operators ``invoke`` callback
|
||||
which must then return ``{'RUNNING_MODAL'}``.
|
||||
|
||||
Accepting the file selector will run the operators ``execute`` callback.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue