diff --git a/monte_charge/monte_charge-2.blend b/monte_charge/monte_charge-2.blend index afe953f..6757f3b 100644 Binary files a/monte_charge/monte_charge-2.blend and b/monte_charge/monte_charge-2.blend differ diff --git a/portail_coulissant/porcou_lib.py b/portail_coulissant/porcou_lib.py index d46f2fb..f76b6b9 100644 --- a/portail_coulissant/porcou_lib.py +++ b/portail_coulissant/porcou_lib.py @@ -302,9 +302,9 @@ def jumeau(pins): # UI : étape 2 if board =="": - scene.objects['Twins-text']['Text'] = "Connection ouverte : "+device+" - "+str(speed)+" baud" + scene.objects['Twins-text']['Text'] = "Connection ouverte : "+device+" - "+str(speed)+" baud." else: - scene.objects['Twins-text']['Text'] = "Connection ouverte : "+board_name+" sur "+device+" à "+str(speed)+" baud" + scene.objects['Twins-text']['Text'] = "Connection ouverte : "+board_name+" sur "+device+" à "+str(speed)+" baud." tempo (0.1) # Déclaration des entrées - sorties @@ -338,7 +338,7 @@ def jumeau_close(): # twins_serial.close() # Fermer proprement le port série board.exit() # Fermer proprement la communication avec la carte scene.objects['System']['twins'] = False - scene.objects['Twins-text']['Text'] = "Connection fermée" + scene.objects['Twins-text']['Text'] = "Connection fermée." # Configuration du port # FIXME diff --git a/portail_coulissant/portail_coulissant-14.blend b/portail_coulissant/portail_coulissant-14.blend index 66aea6f..f986626 100644 Binary files a/portail_coulissant/portail_coulissant-14.blend and b/portail_coulissant/portail_coulissant-14.blend differ diff --git a/twin.py b/twin.py index 55a0faa..8a0ad14 100644 --- a/twin.py +++ b/twin.py @@ -119,6 +119,11 @@ def cmd_init(): # Fichier de config (screen size : data/config/screen/width-> [0][0].text, height-> [0][1].text) bge.render.setWindowSize(int(twin_config_tree[0][0].text),int(twin_config_tree[0][1].text)) + # Ajout du Hud + # scene.active_camera = scene.objects["Camera"] + # scene.objects['Sun'].setVisible(True,True) + # scene.addOverlayCollection(scene.cameras['Camera-Hud'], bpy.data.collections['Hud']) + # UI : Commands scene.objects['Run-Hl'].setVisible(False,False) scene.objects['Pause-Hl'].setVisible(False,False) @@ -130,7 +135,7 @@ def cmd_init(): # UI : Text, ... scene.objects['Cmd-text']['Text']="" scene.objects['Cmd-text'].setVisible(True,False) - scene.objects['Twins-text']['Text']="" + scene.objects['Twins-text']['Text']="Connection fermée." scene.objects['Twins-text'].setVisible(False,False) # Windows @@ -274,6 +279,11 @@ def manip_init(): # Configuration du moteur de rendu eevee.use_eevee_smaa = True + # Ajout du Hud + scene.active_camera = scene.objects["Camera"] + scene.objects['Sun'].setVisible(True,True) + scene.addOverlayCollection(scene.cameras['Camera-Hud'], bpy.data.collections['Hud']) + # Fenêtres scene.objects['About'].setVisible(False,True) scene.objects['Doc'].setVisible(False,True) @@ -366,9 +376,9 @@ def manip(cont): # Orbit if obj['manip_mode']==0: - x0 = scene.objects['Orbit'].worldPosition.x - y0 =scene.objects['Orbit'].worldPosition.y - z0 =scene.objects['Orbit'].worldPosition.z + x0 = scene.objects['Orbit-Hud'].worldPosition.x + y0 =scene.objects['Orbit-Hud'].worldPosition.y + z0 =scene.objects['Orbit-Hud'].worldPosition.z width = bge.render.getWindowWidth() height = bge.render.getWindowHeight() dist_orbit_y_base=200 # Pour 1280 x 720 diff --git a/twin_about.py b/twin_about.py index 8b1a696..d5d85c6 100644 --- a/twin_about.py +++ b/twin_about.py @@ -1,4 +1,5 @@ import bge # Bibliothèque Blender Game Engine (UPBGE) +# import bpy # Blender import webbrowser import numpy as np @@ -36,6 +37,9 @@ ACTIVATE = bge.logic.KX_INPUT_ACTIVE def open(): scene.active_camera = scene.objects["Camera-About"] + # scene.removeOverlayCollection(bpy.data.collections['Hud']) # Crash de UPBGE sur la supression de l'Overlay + scene.objects['Twins-icon'].setVisible(False,True) # Crash de UPBGE sur la supression de l'Overlay + scene.objects['Twins-text'].setVisible(False,True) # Crash de UPBGE sur la supression de l'Overlay scene.objects['About_close'].color= color_link scene.objects['About_screen-up'].color= color_link scene.objects['About_screen-down'].color= color_link @@ -69,6 +73,9 @@ def open(): def close(cont): if cont.sensors['Click'].status == JUST_ACTIVATED and cont.sensors['MO'].positive : scene.active_camera = scene.objects["Camera"] + # scene.addOverlayCollection(scene.cameras['Camera-Hud'], bpy.data.collections['Hud']) # Crash de UPBGE sur la supression de l'Overlay + scene.objects['Twins-icon'].setVisible(True,True) # Crash de UPBGE sur la supression de l'Overlay + scene.objects['Twins-text'].setVisible(True,True) # Crash de UPBGE sur la supression de l'Overlay scene.objects['About'].setVisible(False,True) ## diff --git a/twin_config.xml b/twin_config.xml index 24790e2..2f742d8 100644 --- a/twin_config.xml +++ b/twin_config.xml @@ -1,6 +1,6 @@ - 775 - 435 + 1339 + 753 \ No newline at end of file diff --git a/twin_doc.py b/twin_doc.py index d0494ae..36ae756 100644 --- a/twin_doc.py +++ b/twin_doc.py @@ -1,4 +1,5 @@ import bge # Bibliothèque Blender Game Engine (UPBGE) +# import bpy # Blender import importlib import webbrowser @@ -232,6 +233,9 @@ def open(): # Placer la tablette scene.active_camera = scene.objects["Camera-Doc"] + # scene.removeOverlayCollection(bpy.data.collections['Hud']) # Crash de UPBGE sur la supression de l'Overlay + scene.objects['Twins-icon'].setVisible(False,True) # Crash de UPBGE sur la supression de l'Overlay + scene.objects['Twins-text'].setVisible(False,True) # Crash de UPBGE sur la supression de l'Overlay scene.objects['Doc_close'].color= color_doc_fct scene.objects['Doc'].setVisible(True,True) text_hide() @@ -277,6 +281,9 @@ def open(): def close(cont): if cont.sensors['Click'].status == JUST_ACTIVATED and cont.sensors['MO'].positive : scene.active_camera = scene.objects["Camera"] + # scene.addOverlayCollection(scene.cameras['Camera-Hud'], bpy.data.collections['Hud']) # Crash de UPBGE sur la supression de l'Overlay + scene.objects['Twins-icon'].setVisible(True,True) # Crash de UPBGE sur la supression de l'Overlay + scene.objects['Twins-text'].setVisible(True,True) # Crash de UPBGE sur la supression de l'Overlay chap=("general", "system", "python") for page in chap: scene.objects["Doc_chap-"+page].setVisible(False,True)