testData.py 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. from pandac.PandaModules import *
  2. if hasattr(base, 'le'):
  3. objectMgr = base.le.objectMgr
  4. ui = base.le.ui
  5. ui.sceneGraphUI.reset()
  6. else:
  7. objectMgr = base.objectMgr
  8. # temporary place holder for nodepath
  9. objects = {}
  10. objects['1252538687.73gjeon'] = objectMgr.addNewObject('Smiley', '1252538687.73gjeon', 'models/smiley.egg', None)
  11. if objects['1252538687.73gjeon']:
  12. objects['1252538687.73gjeon'].setPos(Point3(8.66381, 0, 7.13246))
  13. objects['1252538687.73gjeon'].setHpr(VBase3(0, 0, 0))
  14. objects['1252538687.73gjeon'].setScale(VBase3(1, 1, 1))
  15. objectMgr.updateObjectColor(1.000000, 1.000000, 1.000000, 1.000000, objects['1252538687.73gjeon'])
  16. objectMgr.updateObjectProperties(objects['1252538687.73gjeon'], {'123': 1, 'Abc': 'a', 'Number': 1, 'Happy': True})
  17. objects['1252538690.2gjeon'] = objectMgr.addNewObject('H Double Smiley', '1252538690.2gjeon', None, objects['1252538687.73gjeon'])
  18. if objects['1252538690.2gjeon']:
  19. objects['1252538690.2gjeon'].setPos(Point3(0, 0, 2.12046))
  20. objects['1252538690.2gjeon'].setHpr(VBase3(0, 0, 0))
  21. objects['1252538690.2gjeon'].setScale(VBase3(1, 1, 1))
  22. objectMgr.updateObjectColor(1.000000, 1.000000, 1.000000, 1.000000, objects['1252538690.2gjeon'])
  23. objectMgr.updateObjectProperties(objects['1252538690.2gjeon'], {'Distance': 2.0, 'Abc': 'a'})
  24. objects['1252539696.69gjeon'] = objectMgr.addNewObject('H Double Smiley', '1252539696.69gjeon', None, objects['1252538687.73gjeon'])
  25. if objects['1252539696.69gjeon']:
  26. objects['1252539696.69gjeon'].setPos(Point3(-9.53674e-006, 0, 0))
  27. objects['1252539696.69gjeon'].setHpr(VBase3(0, 0, 0))
  28. objects['1252539696.69gjeon'].setScale(VBase3(1, 1, 1))
  29. objectMgr.updateObjectColor(1.000000, 1.000000, 1.000000, 1.000000, objects['1252539696.69gjeon'])
  30. objectMgr.updateObjectProperties(objects['1252539696.69gjeon'], {'Distance': 2.0, 'Abc': 'a'})
  31. objects['1252539897.22gjeon'] = objectMgr.addNewObject('H Double Smiley', '1252539897.22gjeon', None, objects['1252538687.73gjeon'])
  32. if objects['1252539897.22gjeon']:
  33. objects['1252539897.22gjeon'].setPos(Point3(0.06987, 0, -2.12046))
  34. objects['1252539897.22gjeon'].setHpr(VBase3(0, 0, 0))
  35. objects['1252539897.22gjeon'].setScale(VBase3(1, 1, 1))
  36. objectMgr.updateObjectColor(1.000000, 1.000000, 1.000000, 1.000000, objects['1252539897.22gjeon'])
  37. objectMgr.updateObjectProperties(objects['1252539897.22gjeon'], {'Distance': 2.0, 'Abc': 'a'})
  38. objects['1252538689.13gjeon'] = objectMgr.addNewObject('V Double Smiley', '1252538689.13gjeon', None, objects['1252538687.73gjeon'])
  39. if objects['1252538689.13gjeon']:
  40. objects['1252538689.13gjeon'].setPos(Point3(6.07152, 0, -0.863791))
  41. objects['1252538689.13gjeon'].setHpr(VBase3(0, 0, 0))
  42. objects['1252538689.13gjeon'].setScale(VBase3(1, 1, 1))
  43. objectMgr.updateObjectColor(1.000000, 1.000000, 1.000000, 1.000000, objects['1252538689.13gjeon'])
  44. objectMgr.updateObjectProperties(objects['1252538689.13gjeon'], {'Distance': 1.0, 'Abc': 'a'})
  45. objects['1252539974.19gjeon'] = objectMgr.addNewObject('Smiley', '1252539974.19gjeon', 'models/frowney.egg', objects['1252538689.13gjeon'])
  46. if objects['1252539974.19gjeon']:
  47. objects['1252539974.19gjeon'].setPos(Point3(0.06987, 0, 3.09209))
  48. objects['1252539974.19gjeon'].setHpr(VBase3(0, 0, 0))
  49. objects['1252539974.19gjeon'].setScale(VBase3(1, 1, 1))
  50. objectMgr.updateObjectColor(1.000000, 1.000000, 1.000000, 1.000000, objects['1252539974.19gjeon'])
  51. objectMgr.updateObjectProperties(objects['1252539974.19gjeon'], {'123': 1, 'Abc': 'a', 'Number': 1, 'Happy': True})
  52. objects['1252623762.9gjeon'] = objectMgr.addNewObject('Panda', '1252623762.9gjeon', None, None)
  53. if objects['1252623762.9gjeon']:
  54. objects['1252623762.9gjeon'].setPos(Point3(0, 0, 0))
  55. objects['1252623762.9gjeon'].setHpr(VBase3(0, 0, 0))
  56. objects['1252623762.9gjeon'].setScale(VBase3(0.005, 0.005, 0.005))
  57. objectMgr.updateObjectColor(1.000000, 0.000000, 0.000000, 0.517647, objects['1252623762.9gjeon'])
  58. objectMgr.updateObjectProperties(objects['1252623762.9gjeon'], {})
  59. if hasattr(base, 'le'):
  60. ui.layerEditorUI.reset()
  61. ui.layerEditorUI.addLayerEntry('Layer1', 1 )
  62. ui.layerEditorUI.addLayerData(1, '1252538687.73gjeon')