mirror of
https://forge.apps.education.fr/blender-edutech/jumeaux-numeriques.git
synced 2024-01-27 06:56:18 +01:00
Système de documentation - point d'étape
This commit is contained in:
parent
58533d5503
commit
387c36d2ec
@ -38,6 +38,9 @@ ACTIVATE = bge.logic.KX_INPUT_ACTIVE
|
||||
###############################################################################
|
||||
|
||||
def init(cont):
|
||||
if cont.sensors['Init'].positive == False: # 1 seule fois
|
||||
return False
|
||||
|
||||
twin.manip_init() # Manipulation du modèle 3D
|
||||
twin.cmd_init() # Commandes
|
||||
|
||||
|
Binary file not shown.
12
twin.py
12
twin.py
@ -333,11 +333,11 @@ def manip_reset():
|
||||
scene.objects['System'].worldPosition.x = scene.objects['System']['init_lx']
|
||||
scene.objects['System'].worldPosition.y = scene.objects['System']['init_ly']
|
||||
scene.objects['System'].worldPosition.z = scene.objects['System']['init_lz']
|
||||
for objet in scene.objects['System']['objects'] :
|
||||
scene.objects[objet].setVisible(True,False)
|
||||
scene.objects[objet].restorePhysics()
|
||||
if objet+"_Lines.GP" in scene.objects:
|
||||
scene.objects[objet+"_Lines.GP"].setVisible(True,False)
|
||||
# for objet in scene.objects['System']['objects'] :
|
||||
# scene.objects[objet].setVisible(True,False)
|
||||
# scene.objects[objet].restorePhysics()
|
||||
# if objet+"_Lines.GP" in scene.objects:
|
||||
# scene.objects[objet+"_Lines.GP"].setVisible(True,False)
|
||||
|
||||
##
|
||||
# Position de départ pour la manipulation de la vue
|
||||
@ -434,7 +434,7 @@ def python_validation(file):
|
||||
stdout = pylint_stdout.read()
|
||||
stderr = pylint_stderr.read()
|
||||
if " error (" in stdout: # Présence d'erreur
|
||||
print(stdout)
|
||||
print(stdout) # Affichage console
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
@ -62,6 +62,10 @@ def open():
|
||||
scene.objects['About_screen-up'].setVisible(True,True)
|
||||
scene.objects['About_screen-up-colbox'].restorePhysics()
|
||||
|
||||
##
|
||||
# Fermer
|
||||
##
|
||||
|
||||
def close(cont):
|
||||
if cont.sensors['Click'].status == JUST_ACTIVATED and cont.sensors['MO'].positive :
|
||||
scene.active_camera = scene.objects["Camera"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
<data>
|
||||
<screen>
|
||||
<width>1565</width>
|
||||
<height>928</height>
|
||||
<width>1339</width>
|
||||
<height>753</height>
|
||||
</screen>
|
||||
</data>
|
24
twin_doc.py
24
twin_doc.py
@ -181,10 +181,6 @@ def init():
|
||||
def open():
|
||||
|
||||
# Placer la tablette
|
||||
# scene.objects['Doc'].worldPosition = [0, -21, 15.75]
|
||||
# scene.objects['Doc'].worldPosition = [0, -21, 15.8]
|
||||
# scene.objects['Doc_close'].color = color_doc_chap
|
||||
# scene.objects['Doc'].setVisible(True,True)
|
||||
scene.active_camera = scene.objects["Camera-Doc"]
|
||||
scene.objects['Doc_close'].color= color_doc_fct
|
||||
scene.objects['Doc'].setVisible(True,True)
|
||||
@ -224,15 +220,16 @@ def open():
|
||||
# Fermer la documentation
|
||||
##
|
||||
|
||||
def close():
|
||||
chap=("general", "system", "python")
|
||||
for page in chap:
|
||||
scene.objects["Doc_chap-"+page].setVisible(False,True)
|
||||
scene.objects["Doc_chap-"+page].worldPosition.x = scene.objects["Doc_chap-"+page]['init_lx']
|
||||
scene.objects["Doc_chap-"+page].worldPosition.y = scene.objects["Doc_chap-"+page]['init_ly']
|
||||
scene.objects["Doc_chap-"+page].worldPosition.z = scene.objects["Doc_chap-"+page]['init_lz']
|
||||
scene.objects['Doc'].setVisible(False,True)
|
||||
scene.objects['Doc'].worldPosition = [35, -2, 2]
|
||||
def close(cont):
|
||||
if cont.sensors['Click'].status == JUST_ACTIVATED and cont.sensors['MO'].positive :
|
||||
scene.active_camera = scene.objects["Camera"]
|
||||
chap=("general", "system", "python")
|
||||
for page in chap:
|
||||
scene.objects["Doc_chap-"+page].setVisible(False,True)
|
||||
scene.objects["Doc_chap-"+page].worldPosition.x = scene.objects["Doc_chap-"+page]['init_lx']
|
||||
scene.objects["Doc_chap-"+page].worldPosition.y = scene.objects["Doc_chap-"+page]['init_ly']
|
||||
scene.objects["Doc_chap-"+page].worldPosition.z = scene.objects["Doc_chap-"+page]['init_lz']
|
||||
scene.objects['Doc'].setVisible(False,True)
|
||||
|
||||
##
|
||||
# Highlight
|
||||
@ -396,7 +393,6 @@ def text_load():
|
||||
doc_text= scene.addObject('Doc_text-l'+str(i+1), None, 0.00, True)
|
||||
doc_text.setParent(scene.objects['Doc'])
|
||||
doc_text.name = 'Doc_text-l'+str(i+1)+'-'+str(card)
|
||||
print ("Création : "+'Doc_text-l'+str(i+1)+'-'+str(card))
|
||||
doc_text.worldPosition.x = scene.objects['Doc_text-l'+str(i+1)+'-ref'].worldPosition.x
|
||||
doc_text.worldPosition.y = scene.objects['Doc_text-l'+str(i+1)+'-ref'].worldPosition.y
|
||||
doc_text.worldPosition.z = scene.objects['Doc_text-l'+str(i+1)+'-ref'].worldPosition.z
|
||||
|
Loading…
Reference in New Issue
Block a user