Skip to content

Commit 775ee9a

Browse files
author
Punya Aachman
committed
Added addon updater, Updated readme
1 parent f702bd1 commit 775ee9a

File tree

6 files changed

+3181
-24
lines changed

6 files changed

+3181
-24
lines changed

README.md

+21-19
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Sorcar is a **procedural modeling node-based system** which utilises Blender and
1515

1616
## Release & Instructions
1717

18-
Latest Release (v3.1.0): <https://github.com/aachman98/Sorcar/releases/tag/v3.1.0>
18+
Latest Release (v3.1.1): <https://github.com/aachman98/Sorcar/releases/tag/v3.1.1>
1919
</br>*Requirement: Blender 2.80 or later*
2020

2121
1. Download the zip file and install it as a Blender addon (Edit -> Preferences... -> Add-ons-> Install...)
@@ -63,11 +63,10 @@ and more...!
6363

6464
## Upcoming Feature
6565

66-
1. Update addon using CGCookie Addon Updater module (<https://github.com/CGCookie/blender-addon-updater)>
67-
2. Improve loop nodes: Add more options to control in each pass
68-
3. Curve nodes: Edit spline properties, convert to mesh
69-
4. More array operations: Add/append, remove, push/pop, find, count
70-
5. Named variables: Get/set values of custom variables, accessible across node trees
66+
1. Improve loop nodes: Add more options to control in each pass
67+
2. Curve nodes: Edit spline properties, convert to mesh
68+
3. More array operations: Add/append, remove, push/pop, find, count
69+
4. Named variables: Get/set values of custom variables, accessible across node trees
7170

7271
## Future
7372

@@ -83,24 +82,27 @@ and more...!
8382

8483
## Changelog
8584

86-
#### [Unreleased]
85+
#### v3.1.1
8786

88-
- Fixed issue with realtime update checkbox in "Scene Info" node
89-
- New socket type: Selection Type
90-
- Ability to change selection type directly though selection nodes
91-
- Added issue templates for bug report & feature request
87+
- Added addon updator by CGCookie
88+
- Fixed issue with realtime update checkbox in "Scene Info" node
89+
- New socket type: Selection Type
90+
- Ability to change selection type directly though selection nodes
91+
- Added issue templates for bug report & feature request
9292

9393
#### v3.1.0
9494

95-
- New architecture for data flow node executions
96-
- Improved socket types and node hierarchy
97-
- Internal data conversions
95+
- New architecture for data flow node executions
96+
- Improved socket types and node hierarchy
97+
- Internal data conversions
9898

9999
## Contributors
100-
- [@8176135](https://github.com/8176135) - Individual edit mode type in selection nodes using a new socket ([#80](https://github.com/aachman98/Sorcar/pull/80))
101-
- [@huiyao8761380](https://github.com/huiyao8761380) (TangHui) - Documentation
102-
- [@Megalomaniak](https://github.com/Megalomaniak) (Felix Kütt) - Documentation
103-
- [@kichristensen](https://github.com/kichristensen) (Kim Christensen) - Port Sorcar (v2) to Blender 2.80 ([#54](https://github.com/aachman98/Sorcar/pull/54))
104-
- [@SevenNeumann](https://github.com/SevenNeumann) (Mark Andrianov) - Icons for Sorcar & layout design for main menu ([#46](https://github.com/aachman98/Sorcar/pull/46))
100+
101+
- [@CGCookie](https://github.com/CGCookie) (CG Cookie) - Addon updater [Github](https://github.com/CGCookie/blender-addon-updater)
102+
- [@8176135](https://github.com/8176135) - Individual edit mode type in selection nodes using a new socket ([#80](https://github.com/aachman98/Sorcar/pull/80))
103+
- [@huiyao8761380](https://github.com/huiyao8761380) (TangHui) - Documentation
104+
- [@Megalomaniak](https://github.com/Megalomaniak) (Felix Kütt) - Documentation
105+
- [@kichristensen](https://github.com/kichristensen) (Kim Christensen) - Port Sorcar (v2) to Blender 2.80 ([#54](https://github.com/aachman98/Sorcar/pull/54))
106+
- [@SevenNeumann](https://github.com/SevenNeumann) (Mark Andrianov) - Icons for Sorcar & layout design for main menu ([#46](https://github.com/aachman98/Sorcar/pull/46))
105107

106108
And the amazing [BlenderArtists](https://blenderartists.org) community!

__init__.py

+47-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
bl_info = {
1818
"name": "Sorcar",
1919
"author": "Punya Aachman",
20-
"version": (3, 1, 0),
20+
"version": (3, 1, 1),
2121
"blender": (2, 80, 0),
2222
"location": "Node Editor",
2323
"description": "Create procedural meshes using Node Editor",
@@ -30,11 +30,50 @@
3030
import importlib
3131
import os
3232

33-
from bpy.types import NodeTree, Operator, PropertyGroup
34-
from bpy.props import BoolProperty, StringProperty
33+
from bpy.types import NodeTree, Operator, PropertyGroup, AddonPreferences
34+
from bpy.props import BoolProperty, StringProperty, IntProperty
3535
from nodeitems_utils import NodeItem
3636
from .helper import update_each_frame, print_log
3737
from .tree.ScNodeCategory import ScNodeCategory
38+
from . import addon_updater_ops
39+
40+
class SorcarPreferences(AddonPreferences):
41+
bl_idname = __package__
42+
bl_label = "Sorcar Preferences"
43+
44+
auto_check_update: BoolProperty(
45+
name = "Auto-check for Update",
46+
description = "If enabled, auto-check for updates using an interval",
47+
default = False,
48+
)
49+
updater_intrval_months: IntProperty(
50+
name='Months',
51+
description = "Number of months between checking for updates",
52+
default=0,
53+
min=0
54+
)
55+
updater_intrval_days: IntProperty(
56+
name='Days',
57+
description = "Number of days between checking for updates",
58+
default=7,
59+
min=0,
60+
)
61+
updater_intrval_hours: IntProperty(
62+
name='Hours',
63+
description = "Number of hours between checking for updates",
64+
default=0,
65+
min=0,
66+
max=23
67+
)
68+
updater_intrval_minutes: IntProperty(
69+
name='Minutes',
70+
description = "Number of minutes between checking for updates",
71+
default=0,
72+
min=0,
73+
max=59
74+
)
75+
def draw(self, context):
76+
addon_updater_ops.update_settings_ui(self, context)
3877

3978
def import_tree():
4079
return getattr(importlib.import_module(".tree.ScNodeTree", __name__), "ScNodeTree")
@@ -75,6 +114,7 @@ def register():
75114
all_classes = [import_tree()]
76115
all_classes.extend(classes_ops)
77116
all_classes.extend(classes_sockets)
117+
all_classes.append(SorcarPreferences)
78118

79119
total_nodes = 0
80120
node_categories = []
@@ -89,6 +129,8 @@ def register():
89129
if not (update_each_frame in bpy.app.handlers.frame_change_post):
90130
bpy.app.handlers.frame_change_post.append(update_each_frame)
91131

132+
addon_updater_ops.register(bl_info)
133+
92134
print_log("REGISTERED", msg="{} operators, {} sockets & {} nodes ({} categories)".format(len(classes_ops), len(classes_sockets), total_nodes, len(classes_nodes)))
93135

94136
def unregister():
@@ -102,5 +144,7 @@ def unregister():
102144
nodeitems_utils.unregister_node_categories("sc_node_categories")
103145
if (update_each_frame in bpy.app.handlers.frame_change_post):
104146
bpy.app.handlers.frame_change_post.remove(update_each_frame)
147+
148+
addon_updater_ops.unregister()
105149

106150
print_log("UNREGISTERED", msg=str(len(all_classes)) + " classes")

0 commit comments

Comments
 (0)