forked from BrendanParmer/NodeToPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.py
More file actions
28 lines (25 loc) · 778 Bytes
/
Copy pathoptions.py
File metadata and controls
28 lines (25 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import bpy
class NTPOptions(bpy.types.PropertyGroup):
"""
Property group used during conversion of node group to python
"""
dir_path : bpy.props.StringProperty(
name = "Save Location",
subtype='DIR_PATH',
description="Save location if generating an add-on",
default = "//"
)
class NTPOptionsPanel(bpy.types.Panel):
bl_label = "Options"
bl_idname = "NODE_PT_ntp_options"
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'UI'
bl_context = ''
bl_category = "NodeToPython"
@classmethod
def poll(cls, context):
return True
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_DEFAULT'
layout.prop(context.scene.ntp_options, "dir_path")