-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stable addon loader, moving onto template generation.
- Loading branch information
1 parent
4b2918d
commit 768861a
Showing
8 changed files
with
51 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addon_name = "test_addon" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
from . import auto_load | ||
from . import template_panel | ||
|
||
print("Loading template") | ||
print("Running template/__init__.py") | ||
|
||
def register(): | ||
print("Registering template") | ||
auto_load.test() | ||
|
||
template_panel.register() | ||
|
||
def unregister(): | ||
auto_load.unregister() | ||
|
||
|
||
|
||
|
||
template_panel.unregister() | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ schema_version = "1.0.0" | |
id = "template" | ||
version = "1.0.0" | ||
name = "Template" | ||
tagline = "Template for a Blender Addon" | ||
tagline = "Template Blender Addon" | ||
maintainer = "Simon Nordon <[email protected]>" | ||
# Supported types: "add-on", "theme" | ||
type = "add-on" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Compress-Archive -Path ".\template" -DestinationPath "template.zip" -Force |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import bpy | ||
|
||
class TemplatePanel(bpy.types.Panel): | ||
bl_idname = "OBJECT_PT_template_panel" | ||
bl_label = "Template Panel" | ||
bl_description = "This is a template panel, for starting a new addon." | ||
bl_space_type = "VIEW_3D" | ||
bl_region_type = "UI" | ||
bl_category = "Template" | ||
bl_order = 0 | ||
|
||
@classmethod | ||
def poll(cls, context): | ||
return context.object is not None | ||
|
||
def draw_header(self, context): | ||
layout = self.layout | ||
layout.label(text="", icon="OBJECT_DATA") | ||
|
||
def draw(self, context): | ||
layout = self.layout | ||
layout.operator("template.test_operator") | ||
|
||
class TemplateTestOperator(bpy.types.Operator): | ||
bl_idname = "template.test_operator" | ||
bl_label = "Testing 1, 2, 3" | ||
|
||
def execute(self, context): | ||
self.report({'INFO'}, 'Hello from template panel.') | ||
return {"FINISHED"} | ||
|
||
def register(): | ||
bpy.utils.register_class(TemplatePanel) | ||
bpy.utils.register_class(TemplateTestOperator) | ||
|
||
def unregister(): | ||
bpy.utils.unregister_class(TemplatePanel) | ||
bpy.utils.unregister_class(TemplateTestOperator) | ||
|
||
|