mirror of
https://forge.apps.education.fr/blender-edutech/jumeaux-numeriques.git
synced 2024-01-27 06:56:18 +01:00
Chargement de la documentation à l'ouverture de la documentation
This commit is contained in:
parent
fbf4ca47bb
commit
81aa7119e6
Binary file not shown.
14
twin.py
14
twin.py
@ -135,7 +135,7 @@ def cmd_init():
|
|||||||
windows=("Doc", "Doc_chap-general", "Doc_chap-system", "Doc_chap-python", "About")
|
windows=("Doc", "Doc_chap-general", "Doc_chap-system", "Doc_chap-python", "About")
|
||||||
for window in windows:
|
for window in windows:
|
||||||
scene.objects[window].setVisible(False,True)
|
scene.objects[window].setVisible(False,True)
|
||||||
twin_doc.init()
|
# twin_doc.init()
|
||||||
|
|
||||||
##
|
##
|
||||||
# Highlight des commandes
|
# Highlight des commandes
|
||||||
@ -178,11 +178,15 @@ def cmd_hl(cont):
|
|||||||
"Doc-cmd-colbox":"Documentation",
|
"Doc-cmd-colbox":"Documentation",
|
||||||
"ResetView": "Reset de la vue (Touche Début)",
|
"ResetView": "Reset de la vue (Touche Début)",
|
||||||
"About-cmd": "A propos"}
|
"About-cmd": "A propos"}
|
||||||
|
scene.objects['Cmd-text']['modal']= False
|
||||||
scene.objects['Cmd-text']['Text']= text_hl[obj.name]
|
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)
|
scene.objects['Cmd-text'].setVisible(True,False)
|
||||||
|
|
||||||
# Désactivation
|
# Désactivation
|
||||||
if cont.sensors['MO'].status == JUST_RELEASED and (scene.objects['System']['manip_mode']==0 or scene.objects['System']['manip_mode']==9):
|
if cont.sensors['MO'].status == JUST_RELEASED and (scene.objects['System']['manip_mode']==0 or scene.objects['System']['manip_mode']==9):
|
||||||
|
if scene.objects['Cmd-text']['modal'] != True:
|
||||||
scene.objects['Cmd-text']['Text']= ""
|
scene.objects['Cmd-text']['Text']= ""
|
||||||
scene.objects['Cmd-text'].setVisible(False,False)
|
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":
|
if obj.name!="Run" and obj.name!="Pause" and obj.name!="Stop" and obj.name!="Doc-cmd-colbox":
|
||||||
@ -432,9 +436,17 @@ def python_validation(file):
|
|||||||
stdout = pylint_stdout.read()
|
stdout = pylint_stdout.read()
|
||||||
stderr = pylint_stderr.read()
|
stderr = pylint_stderr.read()
|
||||||
if " error (" in stdout: # Présence d'erreur
|
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
|
print(stdout) # Affichage console
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
scene.objects['Cmd-text']['modal']= False
|
||||||
|
scene.objects['Cmd-text']['Text']= ""
|
||||||
|
scene.objects['Cmd-text'].setVisible(False,False)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def cycle_run ():
|
def cycle_run ():
|
||||||
|
12
twin_doc.py
12
twin_doc.py
@ -173,6 +173,10 @@ card_description.update({"python-card" : [card_python_title, card_python_text, c
|
|||||||
|
|
||||||
def init():
|
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)
|
# Mettre les couleurs sur les icones (chapitres et cartes)
|
||||||
chap=("general", "system", "python")
|
chap=("general", "system", "python")
|
||||||
for page in chap:
|
for page in chap:
|
||||||
@ -212,12 +216,20 @@ def init():
|
|||||||
# Page par défaut
|
# Page par défaut
|
||||||
scene.objects['Doc']['page_chap'] = "general"
|
scene.objects['Doc']['page_chap'] = "general"
|
||||||
|
|
||||||
|
# UI : information
|
||||||
|
scene.objects['Cmd-text']['Text']= ""
|
||||||
|
scene.objects['Cmd-text'].setVisible(False,False)
|
||||||
|
|
||||||
##
|
##
|
||||||
# Ouvrir la documentation
|
# Ouvrir la documentation
|
||||||
##
|
##
|
||||||
|
|
||||||
def open():
|
def open():
|
||||||
|
|
||||||
|
# Chargement de la documentation
|
||||||
|
if scene.objects['Doc']['page_chap']=="":
|
||||||
|
init()
|
||||||
|
|
||||||
# Placer la tablette
|
# Placer la tablette
|
||||||
scene.active_camera = scene.objects["Camera-Doc"]
|
scene.active_camera = scene.objects["Camera-Doc"]
|
||||||
scene.objects['Doc_close'].color= color_doc_fct
|
scene.objects['Doc_close'].color= color_doc_fct
|
||||||
|
Loading…
x
Reference in New Issue
Block a user