Skip to content

Commit 78f2186

Browse files
committed
Implement changes from engine-js and update to v0.8.13
1 parent c76847a commit 78f2186

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

Blackprint/Constructor/InstanceEvent.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import re
22
from ..Nodes.Enums import Enums
33
from .CustomEvent import CustomEvent
4+
from ..Types import Types
45

56
class InstanceEvents(CustomEvent):
67
list = {}
@@ -16,9 +17,13 @@ def createEvent(this, namespace, options={}):
1617
if(re.search(r'/\s/', namespace) != None):
1718
raise Exception(f"Namespace can't have space character: '{namespace}'")
1819

19-
this.list[namespace] = InstanceEvent({
20-
'schema': options['schema'] if 'schema' in options else [],
21-
})
20+
schema = []
21+
if('schema' in options):
22+
list = options['schema']
23+
for value in list:
24+
schema[value] = Types.Any
25+
26+
this.list[namespace] = InstanceEvent({ 'schema': schema })
2227

2328
def _renameFields(this, namespace, name, to):
2429
schema = this.list[namespace]

Blackprint/Nodes/BPFunction.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ def __init__(this, id, options, instance):
4848
this.structure = options['structure']
4949
else:
5050
this.structure = {
51-
'BP/Fn/Input': [{'i': 0}],
52-
'BP/Fn/Output': [{'i': 1}],
51+
'instance': {
52+
'BP/Fn/Input': [{'i': 0}],
53+
'BP/Fn/Output': [{'i': 1}],
54+
},
5355
}
5456

5557
temp = this

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 0.8.13
2+
3+
### Bug Fix
4+
- Fix error for event and function node
5+
- Fix imported instance event
6+
17
# 0.8.12
28

39
### Features

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "blackprint-engine"
3-
version = "0.8.12"
3+
version = "0.8.13"
44
description = "Blackprint engine for registering node/interface and run exported Blackprint on Python environment"
55
readme = "README.md"
66
requires-python = ">=3.10"

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='Blackprint',
5-
version='0.8.12',
5+
version='0.8.13',
66
packages=['Blackprint'],
77
# scripts=['bin/script1','bin/script2'],
88
url='https://github.com/Blackprint/engine-python',

0 commit comments

Comments
 (0)