diff --git a/portail_coulissant/portail_coulissant-14.blend b/portail_coulissant/portail_coulissant-14.blend index dbcbd66..eadf297 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 fd2983c..f825830 100644 --- a/twin.py +++ b/twin.py @@ -135,7 +135,7 @@ def cmd_init(): windows=("Doc", "Doc_chap-general", "Doc_chap-system", "Doc_chap-python", "About") for window in windows: scene.objects[window].setVisible(False,True) - twin_doc.init() + # twin_doc.init() ## # Highlight des commandes @@ -178,13 +178,17 @@ def cmd_hl(cont): "Doc-cmd-colbox":"Documentation", "ResetView": "Reset de la vue (Touche Début)", "About-cmd": "A propos"} + scene.objects['Cmd-text']['modal']= False scene.objects['Cmd-text']['Text']= text_hl[obj.name] + if scene.objects['Doc']['page_chap']== "" and obj.name =="Doc-cmd-colbox" : + scene.objects['Cmd-text']['Text']= "Chargement de la documentation ..." scene.objects['Cmd-text'].setVisible(True,False) # Désactivation if cont.sensors['MO'].status == JUST_RELEASED and (scene.objects['System']['manip_mode']==0 or scene.objects['System']['manip_mode']==9): - scene.objects['Cmd-text']['Text']= "" - scene.objects['Cmd-text'].setVisible(False,False) + if scene.objects['Cmd-text']['modal'] != True: + scene.objects['Cmd-text']['Text']= "" + scene.objects['Cmd-text'].setVisible(False,False) if obj.name!="Run" and obj.name!="Pause" and obj.name!="Stop" and obj.name!="Doc-cmd-colbox": scene.objects[obj.name+'-Hl'].setVisible(False,True) obj.setVisible(True,True) @@ -300,7 +304,7 @@ def applyRotationTo(obj, rx=None, ry=None, rz=None): if rx-obj.worldOrientation.to_euler().x > rres: obj.applyRotation((rres, 0, 0), True) # print ("delta x ",rx-obj.worldOrientation.to_euler().x) - + # y if ry is not None: while (abs(ry-obj.worldOrientation.to_euler().y) > rres) : @@ -432,9 +436,17 @@ def python_validation(file): stdout = pylint_stdout.read() stderr = pylint_stderr.read() if " error (" in stdout: # Présence d'erreur + + # UI : information + scene.objects['Cmd-text']['modal']= True + scene.objects['Cmd-text']['Text']= "Erreur dans le script ... " + scene.objects['Cmd-text'].setVisible(True,False) print(stdout) # Affichage console return False else: + scene.objects['Cmd-text']['modal']= False + scene.objects['Cmd-text']['Text']= "" + scene.objects['Cmd-text'].setVisible(False,False) return True def cycle_run (): diff --git a/twin_doc.py b/twin_doc.py index def383e..d0494ae 100644 --- a/twin_doc.py +++ b/twin_doc.py @@ -173,6 +173,10 @@ card_description.update({"python-card" : [card_python_title, card_python_text, c def init(): + # UI : information + scene.objects['Cmd-text']['Text']= "Chargement de la documentation ..." + scene.objects['Cmd-text'].setVisible(True,False) + # Mettre les couleurs sur les icones (chapitres et cartes) chap=("general", "system", "python") for page in chap: @@ -212,12 +216,20 @@ def init(): # Page par défaut scene.objects['Doc']['page_chap'] = "general" + # UI : information + scene.objects['Cmd-text']['Text']= "" + scene.objects['Cmd-text'].setVisible(False,False) + ## # Ouvrir la documentation ## def open(): + # Chargement de la documentation + if scene.objects['Doc']['page_chap']=="": + init() + # Placer la tablette scene.active_camera = scene.objects["Camera-Doc"] scene.objects['Doc_close'].color= color_doc_fct