@@ -555,7 +555,7 @@ def RecordObjectOutputToJSON(objects_sets_dict, the_object, is_instance: bool,
555555 be_inst_id = mesh .attributes [BESettings .BENGINE_INSTANCE ].data [0 ].value
556556
557557 if type (be_inst_id ) is int :
558- js_object_data [BESettings .OUT_BE_INSTANCE ] = be_inst_id
558+ js_object_data [BESettings .KEYPARAM_BE_INSTANCE ] = be_inst_id
559559 else :
560560 print (BESettings .BENGINE_INSTANCE + " Attribute is not Integer!!!" )
561561
@@ -606,17 +606,18 @@ def GetCustomAttrib(attrib, float_attribs: dict, vector_attribs: dict, color_att
606606 attrib_type = type (attrib )
607607 attrib_val = None
608608
609- if (attrib_type is bpy .types .FloatVectorAttributeValue ):
609+ if (attrib_type is bpy .types .FloatVectorAttributeValue or attrib_type is bpy . types . FloatVectorAttributeValue ):
610610 attrib_val = attrib .vector
611611 vector_attribs [attrib_name ] = tuple (attrib_val )
612612
613613 elif (attrib_type is bpy .types .FloatColorAttributeValue or attrib_type is bpy .types .ByteColorAttributeValue ):
614614 attrib_val = attrib .color
615615 color_attribs [attrib_name ] = tuple (attrib_val )
616616
617- else :
617+ elif (attrib_type is bpy .types .BoolAttributeValue or attrib_type is bpy .types .IntAttributeValue
618+ or attrib_type is bpy .types .FloatAttributeValue ):
618619 attrib_val = attrib .value
619- float_attribs [attrib_name ] = attrib_val
620+ float_attribs [attrib_name ] = float ( attrib_val )
620621
621622
622623def GetBlenderOutputs (context , process_objs : list , engine_type : EngineType , is_GN : bool ):
@@ -634,21 +635,6 @@ def GetBlenderOutputs(context, process_objs: list, engine_type: EngineType, is_G
634635 process_ev_objs = [depsgraph .objects [obj .name ] for obj in process_objs ]
635636 process_ev_objs_set = set (process_ev_objs )
636637
637- # # GET MAIN MESH
638- # if is_GN:
639- # # GET MAIN MESH (FOR GN ONLY)!!!
640- # main_mesh_dict = BEUtilsGeo.MeshToJSONData(process_objs[0])
641-
642- # # If the main mesh has Verts/Polygons
643- # # Only one mesh at the moment
644- # if len(main_mesh_dict["Verts"]) > 0:
645- # # meshes.insert(0, main_mesh_dict)
646- # meshes.append(main_mesh_dict) # Add mesh to a list
647-
648- # if meshes:
649- # js_output_data["Meshes"] = meshes
650- # else:
651-
652638 # GET OBJECS AND MESHES
653639 for obj in process_ev_objs :
654640 # If GeometryNodes main mesh has no points/polygons
@@ -675,9 +661,6 @@ def GetBlenderOutputs(context, process_objs: list, engine_type: EngineType, is_G
675661 # Record Meshes
676662 js_output_data ["Meshes" ] = js_meshes_list
677663
678- # gn_js_path = be_paths.be_tmp_folder + BESettings.OUTPUT_JSON_NAME
679- # SaveJSON(gn_js_path, js_output_data)
680-
681664 return js_output_data
682665
683666
0 commit comments