Skip to content

Commit 666493a

Browse files
committed
Moved BE_Instance to a global variable.
1 parent 078fc05 commit 666493a

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

BEngine-Py/bengine/BESettings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
OUTPUT_JSON_NAME = "BlenderOutputs.json"
1818

19+
# Out Variables
20+
KEYPARAM_BE_INSTANCE = "BE_Instance"
1921

2022
class EngineType(Enum):
2123
Unity = 0

BEngine-Py/bengine/Utils/BEUtils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from . import BEGNInputs
1919

2020

21+
2122
def LoadJSON(bengineInputs_path: str):
2223
with open(bengineInputs_path) as js_file:
2324
try:
@@ -548,7 +549,7 @@ def RecordObjectOutputToJSON(objects_sets_dict, the_object, is_instance: bool,
548549
be_inst_id = mesh.attributes[BESettings.BENGINE_INSTANCE].data[0].value
549550

550551
if type(be_inst_id) is int:
551-
js_object_data["BE_Instance"] = be_inst_id
552+
js_object_data[BESettings.KEYPARAM_BE_INSTANCE] = be_inst_id
552553
else:
553554
print(BESettings.BENGINE_INSTANCE + " Attribute is not Integer!!!")
554555

0 commit comments

Comments
 (0)