Page Menu
Home
Search
Configure Global Search
Log In
Files
F8004079
addon_do_nothing.py
Gaia Clary (gaiaclary)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Gaia Clary (gaiaclary)
Nov 9 2019, 4:08 PM
Size
1 KB
Subscribers
None
addon_do_nothing.py
View Options
bl_info
=
{
"name"
:
"New Object"
,
"author"
:
"My Name Here"
,
"version"
:
(
1
,
0
),
"blender"
:
(
2
,
80
,
0
),
"location"
:
"View3D > Add > Mesh > New Object"
,
"description"
:
"Adds a new Mesh Object"
,
"warning"
:
""
,
"wiki_url"
:
""
,
"category"
:
"Add Mesh"
,
}
import
bpy
from
bpy.types
import
Operator
from
bpy.props
import
BoolProperty
from
bpy_extras.object_utils
import
AddObjectHelper
from
bpy.types
import
AddonPreferences
class
MyAddonPreferences
(
AddonPreferences
):
bl_idname
=
__name__
the_option
:
BoolProperty
(
default
=
False
,
name
=
"The option"
,
description
=
"Do something or not"
)
def
draw
(
self
,
context
):
layout
=
self
.
layout
layout
.
label
(
text
=
"This is a preferences view for my addon"
)
layout
.
prop
(
self
,
"the_option"
)
class
OBJECT_OT_add_object
(
Operator
,
AddObjectHelper
):
"""Do nothing"""
bl_idname
=
"mesh.do_nothing"
bl_label
=
"Do Nothing"
def
execute
(
self
,
context
):
return
{
'FINISHED'
}
def
register
():
bpy
.
utils
.
register_class
(
MyAddonPreferences
)
bpy
.
utils
.
register_class
(
OBJECT_OT_add_object
)
def
unregister
():
bpy
.
utils
.
unregister_class
(
OBJECT_OT_add_object
)
bpy
.
utils
.
unregister_class
(
MyAddonPreferences
)
if
__name__
==
"__main__"
:
register
()
File Metadata
Details
Attached
Mime Type
text/x-python
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c8/ce/3675fc546676ddace95a4b85d21e
Attached To
T71451: Support for keeping preferences of disabled add-ons
Event Timeline
Log In to Comment