kopia lustrzana https://github.com/hc-psy/blender-gpt
18 wiersze
418 B
Python
18 wiersze
418 B
Python
![]() |
from bpy import props
|
||
|
from bpy.types import AddonPreferences
|
||
|
|
||
|
|
||
|
class BLENDERGPT_AddonPreferences(AddonPreferences):
|
||
![]() |
bl_idname = "blender-gpt"
|
||
![]() |
|
||
|
openai_key: props.StringProperty(
|
||
|
name="OPENAI API Key",
|
||
![]() |
description="Enter your OpenAI API Key",
|
||
|
default="",
|
||
|
subtype="PASSWORD",
|
||
|
)
|
||
|
|
||
|
def draw(self, context):
|
||
|
layout = self.layout
|
||
![]() |
layout.prop(self, "openai_key")
|