HDK API Reference Guide
HDK API Reference Guide
3
1.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4.2 [Link].Vector3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.5 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.5.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.6 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.6.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.7 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.7.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.8 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.8.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.8.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.8.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.8.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.8.5 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.8.6 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.8.7 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
1.8.8 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1.9 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.9.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
1.9.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
1.9.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.9.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
1.10 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
1.10.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
1.11 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
1.11.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
1.12 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
1.12.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
1.12.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
1.12.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
1.12.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
1.12.5 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
1.12.6 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
1.13 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
1.13.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
1.14 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
1.14.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
1.15 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
1.15.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
1.16 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
1.16.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
1.16.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
1.16.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
1.17 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
1.17.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
1.17.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
1.17.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
1.17.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
1.17.5 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
1.17.6 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
1.17.7 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
1.17.8 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
1.17.9 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
1.17.10 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
1.17.11 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
1.17.12 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
1.17.13 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
1.17.14 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
1.17.15 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
1.17.16 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
1.17.17 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
1.18 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
1.18.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
1.18.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
1.18.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
1.18.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
1.19 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
1.19.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
1.19.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
1.19.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
1.19.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
1.19.5 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
1.19.6 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
1.19.7 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
1.19.8 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
1.19.9 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
1.19.10 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
1.19.11 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
1.19.12 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
1.20 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
1.20.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
1.20.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
1.20.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
1.20.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
1.20.5 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
1.20.6 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
1.21 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
1.21.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
1.21.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
1.21.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
1.21.4 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
1.21.5 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
1.21.6 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
1.21.7 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
1.22 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
1.22.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
1.22.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
1.22.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
1.23 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
1.23.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
1.24 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
1.24.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
1.24.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
1.24.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
1.25 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
1.25.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
1.26 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
1.26.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
1.26.2 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
1.26.3 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
1.27 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
1.27.1 [Link] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
HDK API Reference
HDK API is the full HDK scripting cookbook which allows you to add extra functionality to your tools using IronPython.
Collapse all
Expand all Collapse all
[Link]
Summary
Type
Description
Assembly
HdkDictionary
HdkDictionary is a light wrapper around a .NET Dictionary, it provides all the standard functionality of the .NET Dictionary.
[Link]
[Link]
HdkDictionary
HdkDictionary is a light wrapper around a .NET Dictionary, it provides all the standard functionality of the .NET Dictionary.
Namespace: [Link]
Assembly: [Link]
Constructors
HdkDictionary( )
HdkDictionary( equalityComparer )
HdkDictionary( size )
Methods
Add( item )
Clear( )
[Link][[Link][T1,T2]] GetEnumerator( )
Properties
Keys
Values
[key]
Count
IsReadOnly
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class HdkDictionaryExample():
def __init__(self):
# Entries can also be added by trying to edit a key which does not yet exist
dictionary[3] = "three"
dictionary[4] = "four"
[Link]
Summary
Type
Description
Assembly
Target
Provides information about a PS3 target obtained from the TargetManager class. Once connected allows communications such as sending of
messages.
[Link]
TargetException
[Link]
TargetManager
[Link]
TargetResult
Result codes for operations with the Target Manager, can be accessed through the TargetException's ResultCode
[Link]
[Link]
Target
Provides information about a PS3 target obtained from the TargetManager class. Once connected allows communications such as sending of
messages.
Namespace: [Link]
Assembly: [Link]
Methods
Connect( )
ConnectAsync( connectCompleted )
Disconnect( )
Send( command )
RegisterChannelOutput( channel )
UnregisterChannelOutput( channel )
Properties
Name
Ip
Port
Status
IsConnected
Events
ReceivedResponse
OnConnectionStatusChanged
Delegates
Response
ConnectCompleted
ConnectionStatus
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
return
return
else:
# If the target is already connected proceed with sending the commands
[Link]()
def SendCommands(self):
# Send a command enabling rendering of sound volumes in the client
exampleCmd = "enableAudioRender3d 1"
[Link](exampleCmd)
[Link]
TargetException
Namespace: [Link]
Assembly: [Link]
Properties
ResultCode
Message
[Link]
TargetManager
Namespace: [Link]
Assembly: [Link]
Remarks
TargetManager only supports connecting and communicating with one target at a time
Methods
[Link]( )
[Link][[Link],[Link]] [Link]( )
[Link]( connectCompleted )
[Link]( )
[Link]( connectCompleted )
Properties
ConnectedTarget
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
return
return
else:
# If the target is already connected proceed with sending the commands
[Link]()
def SendCommands(self):
# Send a command enabling rendering of sound volumes in the client
exampleCmd = "enableAudioRender3d 1"
[Link](exampleCmd)
[Link]
TargetResult
Result codes for operations with the Target Manager, can be accessed through the TargetException's ResultCode
Namespace: [Link]
Assembly: [Link]
Fields
SUCCEEDED
TM_FAILED_TO_START
TARGET_COMMS_ERROR
TARGET_IN_USE
TM_NO_TARGETS
TARGET_NOT_FOUND
TARGET_NOT_CONNECTED
TM_NOT_INITIALIZED
FAILED
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
Type
Description
Assembly
Logger
Provides simple file logging functionality, allowing output from a program to be written to a log file.
[Link]
[Link]
Logger
Provides simple file logging functionality, allowing output from a program to be written to a log file.
Namespace: [Link]
Assembly: [Link]
Constructors
Logger( logFilePath )
Methods
ClearLog( )
LogInfo( info )
LogWarning( warning )
LogError( error )
LogFatal( fatal )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class LoggerExample():
def __init__(self):
try:
raise Exception("Example fatal error")
except Exception as e:
# Write a fatal error message to the log
[Link](str(e))
[Link]
Summary
Type
Description
Assembly
Converters
Provides helper functions for performing various mathematical conversions such as converting radian values to degrees.
[Link]
Vector3
[Link]
[Link]
Converters
Provides helper functions for performing various mathematical conversions such as converting radian values to degrees.
Namespace: [Link]
Assembly: [Link]
Methods
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class ConvertersExample():
def __init__(self):
angleInDegrees = 180
[Link].Vector3
Vector3
Namespace: [Link]
Assembly: [Link]
Constructors
Vector3( x, y, z )
Methods
Properties
X
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class Vector3Example():
def __init__(self):
# Example of creating Vector3 objects
vecA = Vector3(1.0, 1.0, 1.0)
vecB = Vector3(1.0, 1.0, 1.0)
if vecA != vecB:
print "Vectors are not equal"
[Link]
Summary
Type
Description
Assembly
PathUtilities
PathUtilities can be used to get the current Project path and the HDK install root. These paths are useful for referring to scripts or other files
relative from your project or HDK install.
[Link]
[Link]
PathUtilities
PathUtilities can be used to get the current Project path and the HDK install root. These paths are useful for referring to scripts or other files
relative from your project or HDK install.
Namespace: [Link]
Assembly: [Link]
Properties
ProjectPath
HdkInstallRoot
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class PathUtilitiesExample():
def __init__(self):
[Link]
Summary
Type
Description
Assembly
AgeRatingItem
[Link]
[Link]
AgeRatingItem
Namespace: [Link]
Assembly: [Link]
Additional Information
Singapore SG SCEAsia
Malaysia MY SCEAsia
Thailand TH SCEAsia
Indonesia ID SCEAsia
USK 0 0
6 6
12 12
16 16
18 18
Nudity
Offensive Language
Other Content That May Offend
Realistic Horror
Sadistic Cruelty
Sadistic Violence
Sex Scenes
Sexual Abuse
Sexual Abuse Themes
Sexual Coercion
Sexual Content That May Offend
Sexual Material
Sexual References
Sexual Themes
Sexual Violence
Strong Offensive Language
Suicide
Torture
Use of Menstrual Blood
Violence
Methods
Properties
Rating
MinimumAge
ParentalControlLevel
ContentDescriptors
AdditionalData
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class AgeRatingsExample():
def __init__(self):
uuid = [Link]("00000000-00000000-00000000-00000018")
loadedObject = None
try:
# First load the object whose age rating data we wish to edit
loadedObject = [Link](uuid)
except Exception, e:
print "Failed to load object '{0}': {1}".format(uuid, e)
return
if not loadedObject:
print "Object '{0}' was not found".format(uuid)
return
# The age ratings are returned as a HdkDictionary keyed by the country which each rating
belongs to
for ageRating in [Link]:
print "{0} - {1}".format([Link], [Link])
# Once the age rating has been setup it can be assigned to a country
# If the country does not support the age rating's rating system an exception is thrown
[Link]["GB"] = pegiItem
# An age rating can also be assigned to all countries which use a particular rating system
[Link]["ALL-PEGI"] = pegiItem
[Link]
Summary
Type
Description
Assembly
Collect
[Link]
[Link]
Collect
Namespace: [Link]
Assembly: [Link]
Methods
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
from [Link] import ObjectManager
from [Link] import Collect
import zipfile
class CollectExample():
def __init__(self):
components = ["network"]
foundObjects = [Link](components)
dependentFiles = [Link](foundObjects)
f = [Link]('d:\\collect_test.zip', 'w')
for dependentFile in dependentFiles:
[Link](dependentFile)
[Link]()
collectExample = CollectExample()
Associated Types
[Link]
[Link]
Summary
Type
Description
Assembly
ObjectComponent
[Link]
ComponentTypes
[Link]
HomeObject
Provides information about an object loaded through the ObjectManager class. Allows an object's data to be viewed and edited.
[Link]
LocalisationItem
[Link]
ObjectManager
[Link]
ObjectResource
Provides information about a resource on disk which may be associated with an object and used by a component
[Link]
TerritoryTypes
[Link]
Uuid
Uuid object used to identify an object. To create a new Uuid use [Link]()
[Link]
[Link]
ComponentTypes
Namespace: [Link]
Assembly: [Link]
Remarks
Each type is used to look up a specific component in the Components dictionary accessed through an Object's Components property
Constructors
ComponentTypes( )
Fields
Active
ArcadeGame
Clothing
EmbeddedObject
Furniture
GameLaunch
Header
MiniGame
Portable
Targetable
LuaEnvironment
Entity
Particles
Network
EventTimer
Osd
Pad
Renderer
Screen
Camera
System
GameLaunchProperties
Light
Repertoire
GameSpawner
RealTimeGame
GroupDoor
ResourcePack
MemorySlots
SceneTransition
Associated Types
[Link]
[Link]
[Link]
HomeObject
Provides information about an object loaded through the ObjectManager class. Allows an object's data to be viewed and edited.
Namespace: [Link]
Assembly: [Link]
Methods
Save( )
[Link][[Link]] GetResources( )
RemoveResource( resource )
[Link][[Link]] GetLocalisationItems( )
RemoveLocalisationItem( item )
Properties
Uuid
Name
Components
EntitlementId
CategoryId
ProductId
Dependencies
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Import the MessageType class as we need this for the object validation and packaging output
from [Link] import MessageType
class ObjectManagerExample():
def __init__(self):
try:
# Load an object by its uuid
uuid = [Link]("00000000-00000000-00000000-00000018")
loadedObject = [Link](uuid)
# Load an object by its [Link] path
objectPath = [Link] +
"/build/objects/00000000-00000000-00000000-00000018/[Link]"
loadedObject = [Link](objectPath)
except Exception, e:
print "Failed to load object {0}: {1}".format(uuid, e)
# Get the Uuids of all objects which contain either a 'furniture' or an 'active' component
components = ["furniture", "active"]
foundObjects = [Link](components)
# Get the Uuids of all objects which contain a resource with the path 'resourcePath'
resourcePath = "objects/00000000-00000000-00000000-00000018/[Link]"
foundObjects = [Link](resourcePath)
# Try to access the furniture component and set the furniture metadata item
if [Link]([Link]):
[Link][[Link]].Furniture = "Chair"
# Validate an object
if [Link]([Link]):
print "{0} - {1} passed validations\n".format([Link], [Link])
objectManagerExample = ObjectManagerExample()
Associated Types
[Link]
[Link]
[Link]
LocalisationItem
Namespace: [Link]
Assembly: [Link]
Methods
[Link][[Link],[Link]] GetPhrases( )
Properties
Key
SupportedLanguages
Associated Types
[Link]
[Link]
[Link]
ObjectComponent
Namespace: [Link]
Assembly: [Link]
Properties
Type
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Import the MessageType class as we need this for the object validation and packaging output
from [Link] import MessageType
class ObjectManagerExample():
def __init__(self):
try:
# Load an object by its uuid
uuid = [Link]("00000000-00000000-00000000-00000018")
loadedObject = [Link](uuid)
except Exception, e:
print "Failed to load object {0}: {1}".format(uuid, e)
# Get the Uuids of all objects which contain either a 'furniture' or an 'active' component
components = ["furniture", "active"]
foundObjects = [Link](components)
# Get the Uuids of all objects which contain a resource with the path 'resourcePath'
resourcePath = "objects/00000000-00000000-00000000-00000018/[Link]"
foundObjects = [Link](resourcePath)
# Try to access the furniture component and set the furniture metadata item
if [Link]([Link]):
[Link][[Link]].Furniture = "Chair"
# Validate an object
if [Link]([Link]):
print "{0} - {1} passed validations\n".format([Link], [Link])
objectManagerExample = ObjectManagerExample()
Associated Types
[Link]
[Link]
ObjectManager
Namespace: [Link]
Assembly: [Link]
Methods
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Import the MessageType class as we need this for the object validation and packaging output
from [Link] import MessageType
class ObjectManagerExample():
def __init__(self):
try:
# Load an object by its uuid
uuid = [Link]("00000000-00000000-00000000-00000018")
loadedObject = [Link](uuid)
except Exception, e:
print "Failed to load object {0}: {1}".format(uuid, e)
# Get the Uuids of all objects which contain either a 'furniture' or an 'active' component
components = ["furniture", "active"]
foundObjects = [Link](components)
# Get the Uuids of all objects which contain a resource with the path 'resourcePath'
resourcePath = "objects/00000000-00000000-00000000-00000018/[Link]"
foundObjects = [Link](resourcePath)
# Try to access the furniture component and set the furniture metadata item
if [Link]([Link]):
[Link][[Link]].Furniture = "Chair"
# Validate an object
if [Link]([Link]):
print "{0} - {1} passed validations\n".format([Link], [Link])
objectManagerExample = ObjectManagerExample()
Associated Types
[Link]
[Link]
ObjectResource
Provides information about a resource on disk which may be associated with an object and used by a component
Namespace: [Link]
Assembly: [Link]
Additional Information
Resource Types:
"model"
"texture"
"particle"
"file"
"xml"
"collision"
"anim"
"skeleton"
"soundbank"
"soundstream"
"repertoire"
"rig_settings"
"control_rig"
"emotes"
"lua"
"image"
Properties
Path
Type
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class HomeObjectResourceExample():
def __init__(self):
try:
# Load an object by its uuid
uuid = [Link]("00000000-00000000-00000000-00000018")
loadedObject = [Link](uuid)
except Exception, e:
print "{0}".format(e)
resourceExample = HomeObjectResourceExample()
Associated Types
[Link]
[Link]
TerritoryTypes
Namespace: [Link]
Assembly: [Link]
Remarks
Each type is used to look up a specific value in the entitlement_id, category_id and product_id dictionaries accessed through an Object's
EntitlementId, CategoryId and ProductId properties
Fields
SCEE
SCEA
SCEJ
SCEAsia
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class TerritoryTypes_Example():
def __init__(self):
territories = [[Link],[Link],[Link],[Link]]
for territory in territories:
print (territory)
tt_example = TerritoryTypes_Example()
Associated Types
[Link]
[Link]
Uuid
Uuid object used to identify an object. To create a new Uuid use [Link]()
Namespace: [Link]
Assembly: [Link]
Methods
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class UuidExample():
def __init__(self):
strHelicopterUuid = "45864836-89475616-84123186-13213216"
isValid = [Link](strHelicopterUuid)
if isValid:
HelicopterUuid = [Link](strHelicopterUuid)
print "Get to the chopper! %s" % strHelicopterUuid
strDinosaurUuid = "DINOSAUR-SARENOTA-UUIDVELO-CIRAPTOR"
isValid = [Link](strDinosaurUuid)
if isValid == False:
print "Dinosaurs are extinct!"
ux = UuidExample()
Associated Types
[Link]
[Link]
[Link]
Summary
Type
Description
Assembly
ClothingComponent
[Link]
HeaderComponent
Header information for an object, used for indexing and general information.
[Link]
FurnitureComponent
[Link]
GameLaunchComponent
[Link]
[Link]
ClothingComponent
Namespace: [Link]
Assembly: [Link]
Properties
Name
ClothingType
Clothing
Rigs
Type
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class ClothingExample():
def __init__(self):
try:
loadedObject = [Link](uuid)
if [Link]([Link]):
# Change the category of the clothing item
[Link][[Link]].Clothing = "Hat"
except Exception, e:
print "Failed to load object {0}: {1}".format(uuid, e)
Associated Types
[Link]
[Link]
FurnitureComponent
Namespace: [Link]
Assembly: [Link]
Properties
Furniture
Type
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class FurnitureExample():
def __init__(self):
try:
loadedObject = [Link](uuid)
if [Link]([Link]):
# Change the category of the furniture item
[Link][[Link]].Furniture = "Desk"
except Exception, e:
print "Failed to load object {0}: {1}".format(uuid, e)
Associated Types
[Link]
[Link]
GameLaunchComponent
Namespace: [Link]
Assembly: [Link]
Properties
CommunicationId
TitleId
Type
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class GameLaunchExample():
def __init__(self):
try:
loadedObject = [Link](uuid)
if [Link]([Link]):
# Change the communication id
[Link][[Link]].CommunicationId = "COMM_ID"
except Exception, e:
print "Failed to load object {0}: {1}".format(uuid, e)
Associated Types
[Link]
[Link]
HeaderComponent
Header information for an object, used for indexing and general information.
Namespace: [Link]
Assembly: [Link]
Properties
Name
Description
Author
ObjectVersion
Publisher
Template
TemplateVersion
AgeRatings
HelpText
Lpid
Type
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Import the MessageType class as we need this for the object validation and packaging output
from [Link] import MessageType
class ObjectManagerExample():
def __init__(self):
try:
# Load an object by its uuid
uuid = [Link]("00000000-00000000-00000000-00000018")
loadedObject = [Link](uuid)
except Exception, e:
print "Failed to load object {0}: {1}".format(uuid, e)
# Get the Uuids of all objects which contain either a 'furniture' or an 'active' component
components = ["furniture", "active"]
foundObjects = [Link](components)
# Get the Uuids of all objects which contain a resource with the path 'resourcePath'
resourcePath = "objects/00000000-00000000-00000000-00000018/[Link]"
foundObjects = [Link](resourcePath)
# Try to access the furniture component and set the furniture metadata item
if [Link]([Link]):
[Link][[Link]].Furniture = "Chair"
# Validate an object
if [Link]([Link]):
print "{0} - {1} passed validations\n".format([Link], [Link])
# Validate and package an object
# The first passed in callback is triggered for validation output
# The second callback is triggered for packager output
if [Link]([Link], [Link]):
print "{0} - {1} succesfully packaged\n".format([Link], [Link])
objectManagerExample = ObjectManagerExample()
Associated Types
[Link]
[Link]
Summary
Type
Description
Assembly
Packager
[Link]
[Link]
Packager
Namespace: [Link]
Assembly: [Link]
Methods
[Link]
Summary
Type
Description
Assembly
MessageType
The types of messages which can be returned through the MessageOutput delegate
[Link]
[Link]
MessageType
The types of messages which can be returned through the MessageOutput delegate
Namespace: [Link]
Assembly: [Link]
Fields
INFO
WARNING
ERROR
FATAL
[Link]
Summary
Type
Description
Assembly
GameObjectFolder
[Link]
GameObject
[Link]
GameObjectTypes
[Link]
HomeScene
[Link]
SceneConverter
Provides functions for converting between scene (.scene) and scene project (.scproj) files.
[Link]
SceneTypes
[Link]
[Link]
GameObject
Namespace: [Link]
Assembly: [Link]
Properties
Name
Type
Translation
Rotation
Scale
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Import the SceneEditor class so we can get the current scene project open in the Scene Editor
from [Link] import SceneEditor
# Import the Maths Converters class so we can use the degrees to radians function
from [Link] import Converters
class SceneProjectExample():
def __init__(self):
# Get the scene project which is currently open in the Scene Editor
openSceneProj = [Link]
# Print the name and type of each game object within the scene project
for gameObject in [Link]:
print "{0} : {1}".format([Link], [Link])
if spawnPoint != None:
# Change the translation, rotation and scale of the spawn point
[Link] = Vector3(20, 0, 0)
[Link] = Vector3([Link](90), 0, 0)
[Link] = Vector3(2, 1, 1)
Associated Types
[Link]
[Link]
[Link]
GameObjectFolder
Namespace: [Link]
Assembly: [Link]
Properties
Name
GameObjects
Folders
Associated Types
[Link]
[Link]
GameObjectTypes
Namespace: [Link]
Assembly: [Link]
Fields
CollisionFile
Entity
EnvironmentMap
EyeEnvironmentMap
ProbeFile
AtmosphereFile
Model
SkinEnvironmentMap
DefaultFurniturePoint
Seat
SeatArea
PictureHook
SpawnPoint
Script
EmbeddedObject
Screen
ClubBulletinScreen
ScreenLinksFile
ArcadeGame
MiniGame
AmbientSound
SphereEmitter
CubeEmitter
ConeEmitter
CylinderEmitter
ConePointSound
CubePointSound
CylinderPointSound
SpherePointSound
SoundBank
SoundPortal
SoundZone
ChangeEventBoxTrigger
ChangeEventTrigger
ParticleEffect
GameObjectGroup
Associated Types
[Link]
[Link]
[Link]
HomeScene
Namespace: [Link]
Assembly: [Link]
Methods
Save( )
Properties
FilePath
AllGameObjects
GameObjectFolder
Dependencies
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Import the SceneEditor class so we can get the current scene project open in the Scene Editor
from [Link] import SceneEditor
# Import the Maths Converters class so we can use the degrees to radians function
from [Link] import Converters
class SceneProjectExample():
def __init__(self):
# Get the scene project which is currently open in the Scene Editor
openSceneProj = [Link]
# Print the name and type of each game object within the scene project
for gameObject in [Link]:
print "{0} : {1}".format([Link], [Link])
if spawnPoint != None:
# Change the translation, rotation and scale of the spawn point
[Link] = Vector3(20, 0, 0)
[Link] = Vector3([Link](90), 0, 0)
[Link] = Vector3(2, 1, 1)
Associated Types
[Link]
[Link]
[Link]
SceneConverter
Provides functions for converting between scene (.scene) and scene project (.scproj) files.
Namespace: [Link]
Assembly: [Link]
Methods
[Link] [Link]( sceneToConvert, forceOverwrite )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class SceneConverterExample():
def __init__(self):
[Link]
SceneTypes
Namespace: [Link]
Assembly: [Link]
Fields
Public
Personal
ClubHouse
Game16
Game32
Game60
PublicNoVideo
Video
PersonalVideo
PersonalNoVideo
Associated Types
[Link]
[Link]
Summary
Type
Description
Assembly
GameObjectGroup
[Link]
[Link]
GameObjectGroup
Namespace: [Link]
Assembly: [Link]
Properties
GameObjects
Name
Type
Translation
Rotation
Scale
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.60.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Import the SceneEditor class so we can get the current scene project open in the Scene Editor
from [Link] import SceneEditor
# Import the Maths Converters class so we can use the degrees to radians function
from [Link] import Converters
class SceneProjectExample():
def __init__(self):
# Get the scene project which is currently open in the Scene Editor
openSceneProj = [Link]
# Print the name and type of each game object within the scene project
for gameObject in [Link]:
print "{0} : {1}".format([Link], [Link])
if spawnPoint != None:
# Change the translation, rotation and scale of the spawn point
[Link] = Vector3(20, 0, 0)
[Link] = Vector3([Link](90), 0, 0)
[Link] = Vector3(2, 1, 1)
Associated Types
[Link]
[Link]
Summary
Type
Description
Assembly
Validator
The Validator class is used to validate objects and scenes
[Link]
[Link]
Validator
Namespace: [Link]
Assembly: [Link]
Methods
[Link]
Summary
Type
Description
Assembly
ObjectEditor
Provides access to core functionality of the Object Editor, such as events for when objects are opened.
[Link]
[Link]
ObjectEditor
Provides access to core functionality of the Object Editor, such as events for when objects are opened.
Namespace: [Link]
Assembly: [Link]
Methods
[Link]( uuid )
[Link]( )
[Link][[Link]] [Link]( )
Events
OnSaving
OnSaved
OnOpened
OnPackaging
OnPackaged
Delegates
ObjectAction
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class ObjectEditorExample():
def __init__(self):
# Hook up to the OnOpened event called when an object is opened in the Object Editor
[Link] += [Link]
# Hook up to the OnSaved event called when an object has been successfully saved
[Link] += [Link]
# Hook up to the OnPackaged event called when an object has been successfully packaged
[Link] += [Link]
# Example of a callback function triggered when an object is opened in the Object Editor
def onOpened(self, object):
print "Opened: {0}".format([Link])
# Example of a callback function triggered when an object is about to be saved in the Object
Editor
def onSaving(self, object):
print "Saving: {0}".format([Link])
# Example of a callback function triggered when an object has been successfully saved in the
Object Editor
def onSaved(self, object):
print "Saved: {0}".format([Link])
# Example of a callback function triggered when an object is about to be packaged in the Object
Editor
def onPackaging(self, object):
print "Packaging: {0}".format([Link])
# Example of a callback function triggered when an object has been successfully packaged in the
Object Editor
def onPackaged(self, object):
print "Packaged: {0}".format([Link])
Associated Types
[Link]
[Link]
Summary
Type
Description
Assembly
Menu
Menu represents a menu in the Object Editor UI, new items can be added to the menu by calling the AddMenuItem function, a new Menu can be
created through [Link]
[Link]
MenuItem
MenuItem represents an item within a Menu in the Object Editor UI, it provides access to properties about the menu item such as what icon it
uses and whether it has a button associated with it, for a menu item to be visible it must be added to a Menu through AddMenuItem, to create a
new MenuItem call [Link]
[Link]
MenuManager
MenuManager is used to add new menus and menu items to the Object Editor UI, to add a new menu call CreateMenu, to add a new menu item
call CreateMenuItem and then pass the returned MenuItem to a menu's AddMenuItem function
[Link]
[Link]
Menu
Menu represents a menu in the Object Editor UI, new items can be added to the menu by calling the AddMenuItem function, a new Menu can be
created through [Link]
Namespace: [Link]
Assembly: [Link]
Methods
AddMenuItem( menuItem )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("Example Menu")
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
def exampleCanExecute(self):
return True
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
MenuItem
MenuItem represents an item within a Menu in the Object Editor UI, it provides access to properties about the menu item such as what icon it
uses and whether it has a button associated with it, for a menu item to be visible it must be added to a Menu through AddMenuItem, to create a
new MenuItem call [Link]
Namespace: [Link]
Assembly: [Link]
Properties
DisplayText
Description
IconPath
Shortcut
Toggleable
HasToolbarButton
Events
Execute
CanExecute
Delegates
CanExecuteHandler
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("Example Menu")
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
def exampleCanExecute(self):
return True
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
MenuManager
MenuManager is used to add new menus and menu items to the Object Editor UI, to add a new menu call CreateMenu, to add a new menu item
call CreateMenuItem and then pass the returned MenuItem to a menu's AddMenuItem function
Namespace: [Link]
Assembly: [Link]
Methods
[Link] [Link]( name )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.55.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("Example Menu")
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
def exampleCanExecute(self):
return True
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
Summary
Type
Description
Assembly
Action
[Link]
Behaviour
[Link]
EaseCurveType
[Link]
EaseCurve
[Link]
Locomotion
[Link]
LocomotionState
[Link]
RepertoireRegister
[Link]
BooleanRegister
A boolean value register
[Link]
IntegerRegister
[Link]
NumberRegister
[Link]
StringRegister
[Link]
Repertoire
[Link]
RepertoireEditor
The main class for repertoire editor, use it to access currently open repertoires
[Link]
RepertoireEvent
[Link]
RepertoireTargetRig
The rig, emotes and repertoire resources referenced in the repertoire component.
[Link]
State
Transition
[Link]
[Link]
Action
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetCondition( )
SetDuration( duration )
[Link] GetDuration( )
[Link] GetInitialState( )
SetInitialState( state )
[Link][[Link]] GetOutputs( )
[Link][[Link]] GetStates( )
Delete( )
Properties
Layer
Blocking
Priority
States
Attributes
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateAction():
rep = [Link]
if(rep):
action = [Link]("Action")
if(action):
#set some properties
[Link] = "Action"
[Link] = "my_layer"
[Link] = True
[Link] = 1
[Link] = Point(500,100)
CreateAction()
[Link]
Behaviour
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetCondition( )
[Link][[Link]] GetOutputs( )
[Link] GetInitialState( )
SetInitialState( state )
[Link][[Link]] GetStates( )
[Link][[Link]] GetLocomotionStates( )
Delete( )
Properties
States
Attributes
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateBehaviour():
rep = [Link]
if(rep):
behaviour = [Link]("Behaviour")
if(behaviour):
#set some properties
[Link] = "Behaviour"
[Link] = Point(500,100)
CreateBehaviour()
[Link]
BooleanRegister
Namespace: [Link]
Assembly: [Link]
Methods
Delete( )
Properties
Name
RepertoireWrite
RepertoireRead
LuaRead
LuaWrite
IsCore
[Link]
EaseCurve
Namespace: [Link]
Assembly: [Link]
Constructors
Methods
SetDuration( duration )
[Link] GetDuration( )
[Link] GetCurveType( )
SetCurveType( curveType )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateEaseCurve():
#create an ease curve
easeCurve = EaseCurve([Link], 5.0)
if(easeCurve):
print("created ease curve")
CreateEaseCurve()
[Link]
EaseCurveType
Namespace: [Link]
Assembly: [Link]
Fields
linear
s_curve
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateEaseCurve():
#create an ease curve
easeCurve = EaseCurve([Link], 5.0)
if(easeCurve):
print("created ease curve")
CreateEaseCurve()
[Link]
IntegerRegister
Namespace: [Link]
Assembly: [Link]
Methods
Delete( )
Properties
Min
Max
Name
RepertoireWrite
RepertoireRead
LuaRead
LuaWrite
IsCore
[Link]
Locomotion
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetSkeletalAnimation( )
[Link] GetBlendTreeAnimation( )
Delete( )
Properties
Speed
Threshold
Position
Name
[Link]
LocomotionState
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetCondition( )
[Link][[Link]] GetLocomotions( )
[Link][[Link]] GetSkeletalAnimations( )
[Link][[Link]] GetBlendTreeAnimations( )
SetDuration( duration )
[Link] GetDuration( )
[Link] GetEaseIn( )
SetEaseIn( easeCurve )
[Link] GetEaseOut( )
SetEaseOut( easeCurve )
[Link][[Link]] GetOutputs( )
Properties
SkeletalAnimations
BlendTreeAnimations
Position
Name
[Link]
NumberRegister
Namespace: [Link]
Assembly: [Link]
Methods
Delete( )
Properties
Min
Max
Name
RepertoireWrite
RepertoireRead
LuaRead
LuaWrite
IsCore
[Link]
Repertoire
Namespace: [Link]
Assembly: [Link]
Methods
[Link] Save( )
[Link][[Link],[Link][[Link]]] Validate( )
[Link] Export( )
[Link][[Link]] GetActions( )
[Link][[Link]] GetTransitions( )
[Link][[Link]] GetRegionalEmotes( )
[Link] GetGlobalEmotes( )
[Link][[Link]] GetBlendTrees( )
[Link] GetObject( )
[Link][[Link]] GetAnimationResources( )
Properties
RepertoireCircuitFilepath
RepertoireFilepath
EmotesFilepath
Actions
Behaviours
Transitions
BlendTrees
Events
Registers
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
import System
def UseRepertoire():
repertoire = [Link]
if(repertoire):
action = [Link]("action")
if(action):
[Link] = Point(500,100)
print("created action")
behaviour = [Link]("behaviour")
if(behaviour):
[Link] = Point(500,100)
print("created behaviour")
emotes = [Link]("global_emotes")
if(emotes):
[Link] = Point(500,100)
print("created emotes")
object = [Link]()
if(object):
print "Object Name : " + [Link]
animationResources = [Link]()
for resource in animationResources:
print "Object Resource : " + [Link]
print("Save")
[Link]()
#or handle the exceptions thrown from the validation that happens when you export.
try:
[Link]()
except [Link], e:
print([Link])
print([Link])
UseRepertoire()
[Link]
RepertoireEditor
The main class for repertoire editor, use it to access currently open repertoires
Namespace: [Link]
Assembly: [Link]
Methods
[Link]( repertoire )
[Link]( )
[Link][[Link]] [Link]( )
Properties
SynchronizationObject
CurrentRepertoire
Events
OnSaving
OnSaved
OnOpened
OnExporting
OnExported
Delegates
RepertoireAction
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class TestRepertoireEditor():
def __init__(self):
[Link] += [Link]
[Link] += [Link]
[Link] += [Link]
[Link] += [Link]
[Link] += [Link]
def openARepertoireFromAnObject(self):
components = ["repertoire"]
foundObjects = [Link](components)
if(len(foundObjects) > 0):
#we have a loaded object that contains a repertoire component
obj = [Link](foundObjects[0])
#we need to get the supported target rigs of the object, a mini game will have male and
female, a full body suit may only have one.
supportedTargetRigs = [Link](obj)
if(len(supportedTargetRigs) > 0):
[Link](obj, supportedTargetRigs[0])
example = TestRepertoireEditor()
[Link]()
[Link]
RepertoireEvent
Namespace: [Link]
Assembly: [Link]
Properties
Name
Values
[Link]
RepertoireRegister
Namespace: [Link]
Assembly: [Link]
Methods
Delete( )
Properties
Name
RepertoireWrite
RepertoireRead
LuaRead
LuaWrite
IsCore
[Link]
RepertoireTargetRig
The rig, emotes and repertoire resources referenced in the repertoire component.
Namespace: [Link]
Assembly: [Link]
Properties
Name
RepertoireResource
EmotesResource
[Link]
State
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetCondition( )
[Link][[Link]] GetSkeletalAnimations( )
[Link] CreateSkeletalAnimation( name )
[Link][[Link]] GetBlendTreeAnimations( )
[Link][[Link]] GetOutputs( )
SetDuration( duration )
[Link] GetDuration( )
[Link] GetEaseIn( )
SetEaseIn( easeCurve )
[Link] GetEaseOut( )
SetEaseOut( easeCurve )
Delete( )
Properties
SkeletalAnimations
BlendTreeAnimations
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateState():
rep = [Link]
if(rep):
action = [Link]("Action")
if(action):
#set some properties
[Link] = "Action"
[Link] = Point(500,100)
condition = [Link]("Condition")
if(condition):
[Link] = Point(350,100)
animation = [Link]("Animation")
if(animation):
[Link] = Point(500,100)
CreateState()
[Link]
StringRegister
Namespace: [Link]
Assembly: [Link]
Methods
Delete( )
Properties
Values
Name
RepertoireWrite
RepertoireRead
LuaRead
LuaWrite
IsCore
[Link]
Transition
Namespace: [Link]
Assembly: [Link]
Remarks
Methods
[Link] GetToAnimation( )
[Link] GetFromAnimation( )
[Link] GetSkeletalAnimation( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def GetTransitions():
rep = [Link]
if(rep):
transitions = [Link]()
for transition in transitions:
print([Link])
fromAnimationResource = [Link]()
if(fromAnimationResource):
print("From: " + [Link])
transitionAnimationModule = [Link]()
if(transitionAnimationModule):
transitionAnimationResource = [Link]()
if(transitionAnimationResource):
print("Via: " + [Link])
toAnimationResource = [Link]()
if(toAnimationResource):
print("To: " + [Link])
GetTransitions()
[Link]
Summary
Type
Description
Assembly
BlendTreeAnimation
[Link]
BlendNode
[Link]
BlendTree
A circuit of blend node animations
[Link]
SkeletalAnimation
[Link]
[Link]
BlendNode
Namespace: [Link]
Assembly: [Link]
Methods
[Link][System.Int32,[Link]] GetBlendNodes( )
[Link][System.Int32,[Link]] GetSkeletalAnimations( )
SetRegister( register )
[Link] GetRegister( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateBlendTree():
blendTree = [Link](name)
if(blendTree):
root = [Link]()
if(root):
child1 = [Link](0)
anim0 = [Link]("0", 0)
anim1 = [Link]("1", 1)
child2 = [Link](1)
anim2 = [Link]("0", 0)
anim3 = [Link]("1", 1)
CreateBlendTree()
[Link]
BlendTree
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetBlendNode( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateBlendTree():
blendTree = [Link](name)
if(blendTree):
root = [Link]()
if(root):
child1 = [Link](0)
anim0 = [Link]("0", 0)
anim1 = [Link]("1", 1)
child2 = [Link](1)
anim2 = [Link]("0", 0)
anim3 = [Link]("1", 1)
CreateBlendTree()
[Link]
BlendTreeAnimation
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetBlendTree( )
SetBlendTree( blendTree )
Delete( )
Properties
Position
Name
[Link]
SkeletalAnimation
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetResource( )
SetResource( resource )
Delete( )
Properties
OverrideDuration
Position
Name
[Link]
Summary
Type
Description
Assembly
And
[Link]
RandomValue
[Link]
CompareCurrentBehaviour
[Link]
CompareCurrentNetworkAge
[Link]
CompareNetworkAge
[Link]
ComparePreviousBehaviour
Compare the previous behaviour to behaviour
[Link]
ComparePreviousState
[Link]
CompareRegister
[Link]
CompareStateAge
[Link]
ComparisonType
[Link]
Condition
Define condition logic for use with behaviours, actions and states
[Link]
Or
[Link]
[Link]
And
Namespace: [Link]
Assembly: [Link]
Methods
[Link][[Link]] GetInputs( )
[Link] CreateCompareCurrentBehaviour( )
[Link] CreateCompareCurrentNetworkAge( )
[Link] CreateCompareNetworkAge( )
[Link] CreateComparePreviousBehaviour( )
[Link] CreateComparePreviousState( )
[Link] CreateCompareRegister( )
[Link] CreateCompareStateAge( )
[Link] CreateAnd( )
[Link] CreateOr( )
[Link] CreateRandomValue( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
CompareCurrentBehaviour
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetComparison( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
CompareCurrentNetworkAge
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetComparison( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
CompareNetworkAge
Namespace: [Link]
Assembly: [Link]
Methods
SetComparison( comparisonType, value )
[Link] GetComparison( )
Delete( )
Properties
Position
Name
[Link]
ComparePreviousBehaviour
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetComparison( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
ComparePreviousState
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetComparison( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
CompareRegister
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetComparison( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
CompareStateAge
Methods
[Link] GetComparison( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
ComparisonType
Namespace: [Link]
Assembly: [Link]
Fields
Equal
Not_Equal
Less_Than
Less_Than_Or_Equal_To
Greater_Than
Greater_Than_Or_Equal_To
[Link]
Condition
Define condition logic for use with behaviours, actions and states
Namespace: [Link]
Assembly: [Link]
Methods
Delete( )
[Link] CreateCompareCurrentBehaviour( )
[Link] CreateCompareCurrentNetworkAge( )
[Link] CreateCompareNetworkAge( )
[Link] CreateComparePreviousBehaviour( )
[Link] CreateComparePreviousState( )
[Link] CreateCompareRegister( )
[Link] CreateCompareStateAge( )
[Link] CreateAnd( )
[Link] CreateOr( )
[Link] CreateRandomValue( )
[Link] GetInput( )
Properties
Position
Name
[Link]
Or
Namespace: [Link]
Assembly: [Link]
Methods
[Link][[Link]] GetInputs( )
[Link] CreateCompareCurrentBehaviour( )
[Link] CreateCompareCurrentNetworkAge( )
[Link] CreateCompareNetworkAge( )
[Link] CreateComparePreviousBehaviour( )
[Link] CreateComparePreviousState( )
[Link] CreateCompareRegister( )
[Link] CreateCompareStateAge( )
[Link] CreateAnd( )
[Link] CreateOr( )
[Link] CreateRandomValue( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
RandomValue
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetComparison( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
[Link]
Summary
Type
Description
Assembly
ActionEmote
[Link]
BehaviourEmote
[Link]
EmoteContext
[Link]
EmoteGroup
[Link]
GlobalEmotes
[Link]
RegionalEmotes
[Link]
[Link]
ActionEmote
Namespace: [Link]
Assembly: [Link]
Methods
SetAction( action )
[Link] GetAction( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateEmotes():
rep = [Link]
if(rep):
print("create a test behaviour and a test action")
behaviour = [Link]("Behaviour")
action = [Link]("Action")
globalEmotes = [Link]("global")
print("Created global emotes")
if(globalEmotes):
[Link] = Point(500,100)
regionalSitIdleContext = [Link]
regionalSitOnFloorContext = [Link]
regionalStandIdleContext = [Link]
if(regionalSitIdleContext):
someGroup = [Link]("group")
print("Created an emote group within the sit on floor context")
if(someGroup):
[Link] = Point(500,100)
actionEmote = [Link]("action_emote")
print("Created an action emote")
if(actionEmote):
[Link] = Point(500,100)
[Link](action)
behaviourEmote = [Link]("behaviour_emote")
print("Created a behaviour emote")
if(behaviourEmote):
[Link] = Point(500,200)
[Link](behaviour)
CreateEmotes()
[Link]
BehaviourEmote
An emote to trigger a behaviour
Namespace: [Link]
Assembly: [Link]
Methods
SetBehaviour( behaviour )
[Link] GetBehaviour( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateEmotes():
rep = [Link]
if(rep):
print("create a test behaviour and a test action")
behaviour = [Link]("Behaviour")
action = [Link]("Action")
globalEmotes = [Link]("global")
print("Created global emotes")
if(globalEmotes):
[Link] = Point(500,100)
regionalSitIdleContext = [Link]
regionalSitOnFloorContext = [Link]
regionalStandIdleContext = [Link]
if(regionalSitIdleContext):
someGroup = [Link]("group")
print("Created an emote group within the sit on floor context")
if(someGroup):
[Link] = Point(500,100)
actionEmote = [Link]("action_emote")
print("Created an action emote")
if(actionEmote):
[Link] = Point(500,100)
[Link](action)
behaviourEmote = [Link]("behaviour_emote")
print("Created a behaviour emote")
if(behaviourEmote):
[Link] = Point(500,200)
[Link](behaviour)
CreateEmotes()
[Link]
EmoteContext
Namespace: [Link]
Assembly: [Link]
Remarks
The available emote contexts are specified by the client and may not be created, deleted or renamed.
Methods
[Link] CreateEmoteGroup( groupName )
[Link][[Link]] GetEmoteGroups( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateEmotes():
rep = [Link]
if(rep):
print("create a test behaviour and a test action")
behaviour = [Link]("Behaviour")
action = [Link]("Action")
globalEmotes = [Link]("global")
print("Created global emotes")
if(globalEmotes):
[Link] = Point(500,100)
regionalSitIdleContext = [Link]
regionalSitOnFloorContext = [Link]
regionalStandIdleContext = [Link]
if(regionalSitIdleContext):
someGroup = [Link]("group")
print("Created an emote group within the sit on floor context")
if(someGroup):
[Link] = Point(500,100)
actionEmote = [Link]("action_emote")
print("Created an action emote")
if(actionEmote):
[Link] = Point(500,100)
[Link](action)
behaviourEmote = [Link]("behaviour_emote")
print("Created a behaviour emote")
if(behaviourEmote):
[Link] = Point(500,200)
[Link](behaviour)
CreateEmotes()
[Link]
EmoteGroup
Group emotes into sub-menus
Namespace: [Link]
Assembly: [Link]
Methods
[Link][[Link]] GetActionEmotes( )
[Link][[Link]] GetBehaviourEmotes( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateEmotes():
rep = [Link]
if(rep):
print("create a test behaviour and a test action")
behaviour = [Link]("Behaviour")
action = [Link]("Action")
globalEmotes = [Link]("global")
print("Created global emotes")
if(globalEmotes):
[Link] = Point(500,100)
regionalSitIdleContext = [Link]
regionalSitOnFloorContext = [Link]
regionalStandIdleContext = [Link]
if(regionalSitIdleContext):
someGroup = [Link]("group")
print("Created an emote group within the sit on floor context")
if(someGroup):
[Link] = Point(500,100)
actionEmote = [Link]("action_emote")
print("Created an action emote")
if(actionEmote):
[Link] = Point(500,100)
[Link](action)
behaviourEmote = [Link]("behaviour_emote")
print("Created a behaviour emote")
if(behaviourEmote):
[Link] = Point(500,200)
[Link](behaviour)
CreateEmotes()
[Link]
GlobalEmotes
Namespace: [Link]
Assembly: [Link]
Methods
Delete( )
Properties
StandIdle
SitIdle
SitOnFloor
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateEmotes():
rep = [Link]
if(rep):
print("create a test behaviour and a test action")
behaviour = [Link]("Behaviour")
action = [Link]("Action")
globalEmotes = [Link]("global")
print("Created global emotes")
if(globalEmotes):
[Link] = Point(500,100)
regionalSitIdleContext = [Link]
regionalSitOnFloorContext = [Link]
regionalStandIdleContext = [Link]
if(regionalSitIdleContext):
someGroup = [Link]("group")
print("Created an emote group within the sit on floor context")
if(someGroup):
[Link] = Point(500,100)
actionEmote = [Link]("action_emote")
print("Created an action emote")
if(actionEmote):
[Link] = Point(500,100)
[Link](action)
behaviourEmote = [Link]("behaviour_emote")
print("Created a behaviour emote")
if(behaviourEmote):
[Link] = Point(500,200)
[Link](behaviour)
CreateEmotes()
[Link]
RegionalEmotes
Methods
Delete( )
Properties
Region
StandIdle
SitIdle
SitOnFloor
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateEmotes():
rep = [Link]
if(rep):
print("create a test behaviour and a test action")
behaviour = [Link]("Behaviour")
action = [Link]("Action")
regionalEmotes = [Link]("japan")
print("Created regional emotes")
if(regionalEmotes):
[Link] = Point(500,100)
[Link] = "ja-JP"
regionalSitIdleContext = [Link]
regionalSitOnFloorContext = [Link]
regionalStandIdleContext = [Link]
if(regionalSitIdleContext):
someGroup = [Link]("group")
print("Created an emote group within the sit idle context")
if(someGroup):
[Link] = Point(500,100)
actionEmote = [Link]("action_emote")
print("Created an action emote")
if(actionEmote):
[Link] = Point(500,100)
[Link](action)
behaviourEmote = [Link]("behaviour_emote")
print("Created a behaviour emote")
if(behaviourEmote):
[Link] = Point(500,200)
[Link](behaviour)
CreateEmotes()
[Link]
Summary
Type
Description
Assembly
ClearRegister
Clear a register value as part of an output
[Link]
OutputType
[Link]
Output
[Link]
SetNextBehaviour
[Link]
SetRegister
[Link]
SpawnAction
[Link]
TriggerEvent
[Link]
[Link]
ClearRegister
Namespace: [Link]
Assembly: [Link]
Methods
SetRegister( register )
[Link] GetRegister( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateOutput():
repertoire = [Link]
#create action
action = [Link]("action")
#add an output
output = [Link]("output")
CreateOutput()
[Link]
Output
Namespace: [Link]
Assembly: [Link]
Methods
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateOutput():
repertoire = [Link]
#create action
action = [Link]("action")
#add an output
output = [Link]("output")
CreateOutput()
[Link]
OutputType
Namespace: [Link]
Assembly: [Link]
Fields
OnEntry
OnExit
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateOutput():
repertoire = [Link]
#create action
action = [Link]("action")
#add an output
output = [Link]("output")
CreateOutput()
[Link]
SetNextBehaviour
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetBehaviour( )
SetBehaviour( behaviour )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateOutput():
repertoire = [Link]
#create action
action = [Link]("action")
#add an output
output = [Link]("output")
CreateOutput()
[Link]
SetRegister
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetValue( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateOutput():
repertoire = [Link]
#create action
action = [Link]("action")
#add an output
output = [Link]("output")
CreateOutput()
[Link]
SpawnAction
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetAction( )
SetAction( action )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateOutput():
repertoire = [Link]
#create action
action = [Link]("action")
#add an output
output = [Link]("output")
CreateOutput()
[Link]
TriggerEvent
Namespace: [Link]
Assembly: [Link]
Methods
[Link] GetEvent( )
Delete( )
Properties
Position
Name
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
def CreateOutput():
repertoire = [Link]
#create action
action = [Link]("action")
#add an output
output = [Link]("output")
CreateOutput()
[Link]
Summary
Type
Description
Assembly
Menu
Menu represents a menu in the Scene Editor UI, new items can be added to the menu by calling the AddMenuItem function, a new Menu can be
created through [Link]
[Link]
MenuItem
MenuItem represents an item within a Menu in the Scene Editor UI, it provides access to properties about the menu item such as what icon it
uses and whether it has a button associated with it, for a menu item to be visible it must be added to a Menu through AddMenuItem, to create a
new MenuItem call [Link]
[Link]
MenuManager
MenuManager is used to add new menus and menu items to the Scene Editor UI, to add a new menu call CreateMenu, to add a new menu item
call CreateMenuItem and then pass the returned MenuItem to a menu's AddMenuItem function
[Link]
[Link]
Menu
Menu represents a menu in the Scene Editor UI, new items can be added to the menu by calling the AddMenuItem function, a new Menu can be
created through [Link]
Namespace: [Link]
Assembly: [Link]
Methods
AddMenuItem( menuItem )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("My Hdk API Scripts")
actionMenuItem = [Link]()
behaviourMenuItem = [Link]()
def createActionMenu(self):
# Create a new MenuItem
itemDisplayText = "CreateAction"
menuItem = [Link](itemDisplayText)
[Link] = "Create an action with one state"
[Link] = True
[Link] = [Link] | [Link] | Keys.A
#[Link] = True
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
return menuItem
def createBehaviourMenu(self):
# Create a new MenuItem
itemDisplayText = "CreateBehaviour"
menuItem = [Link](itemDisplayText)
[Link] = "Create a behaviour with one state"
[Link] = True
[Link] = [Link] | [Link] | Keys.B
#[Link] = True
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
return menuItem
def repertoireCanExecute(self):
rep = [Link]
if(rep is None):
return False
return True
state = [Link]("state")
if(state):
[Link] = Point(500,100)
print("Created behaviour")
state = [Link]("state")
if(state):
[Link] = Point(500,100)
print("Created action")
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
MenuItem
MenuItem represents an item within a Menu in the Scene Editor UI, it provides access to properties about the menu item such as what icon it
uses and whether it has a button associated with it, for a menu item to be visible it must be added to a Menu through AddMenuItem, to create a
new MenuItem call [Link]
Namespace: [Link]
Assembly: [Link]
Properties
DisplayText
Description
IconPath
Shortcut
Toggleable
HasToolbarButton
Events
Execute
CanExecute
Delegates
CanExecuteHandler
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("My Hdk API Scripts")
actionMenuItem = [Link]()
behaviourMenuItem = [Link]()
def createActionMenu(self):
# Create a new MenuItem
itemDisplayText = "CreateAction"
menuItem = [Link](itemDisplayText)
[Link] = "Create an action with one state"
[Link] = True
[Link] = [Link] | [Link] | Keys.A
#[Link] = True
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
return menuItem
def createBehaviourMenu(self):
# Create a new MenuItem
itemDisplayText = "CreateBehaviour"
menuItem = [Link](itemDisplayText)
[Link] = "Create a behaviour with one state"
[Link] = True
[Link] = [Link] | [Link] | Keys.B
#[Link] = True
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
return menuItem
def repertoireCanExecute(self):
rep = [Link]
if(rep is None):
return False
return True
state = [Link]("state")
if(state):
[Link] = Point(500,100)
print("Created behaviour")
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
MenuManager
MenuManager is used to add new menus and menu items to the Scene Editor UI, to add a new menu call CreateMenu, to add a new menu item
call CreateMenuItem and then pass the returned MenuItem to a menu's AddMenuItem function
Namespace: [Link]
Assembly: [Link]
Methods
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.65.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("My Hdk API Scripts")
actionMenuItem = [Link]()
behaviourMenuItem = [Link]()
def createActionMenu(self):
# Create a new MenuItem
itemDisplayText = "CreateAction"
menuItem = [Link](itemDisplayText)
[Link] = "Create an action with one state"
[Link] = True
[Link] = [Link] | [Link] | Keys.A
#[Link] = True
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
return menuItem
def createBehaviourMenu(self):
# Create a new MenuItem
itemDisplayText = "CreateBehaviour"
menuItem = [Link](itemDisplayText)
[Link] = "Create a behaviour with one state"
[Link] = True
[Link] = [Link] | [Link] | Keys.B
#[Link] = True
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
return menuItem
def repertoireCanExecute(self):
rep = [Link]
if(rep is None):
return False
return True
state = [Link]("state")
if(state):
[Link] = Point(500,100)
print("Created behaviour")
state = [Link]("state")
if(state):
[Link] = Point(500,100)
print("Created action")
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
Summary
Type
Description
Assembly
SceneEditor
Provides access to core functionality of the Scene Editor, such as getting the currently open scene.
[Link]
[Link]
SceneEditor
Provides access to core functionality of the Scene Editor, such as getting the currently open scene.
Namespace: [Link]
Assembly: [Link]
Methods
[Link]( scprojPath )
Properties
CurrentScene
Events
OnSaving
OnSaved
OnOpened
OnExporting
OnExported
OnPackaging
OnPackaged
Delegates
SceneAction
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class SceneEditorExample():
def __init__(self):
# Get the current scene which is open in the Scene Editor
openScene = [Link]
# Export the currently open scene to a (.scene) file so it can be tested in game
validate = True
succeeded = [Link](validate)
print succeeded
[Link]()
def RegisterCallbacks(self):
# Hook up to the OnOpened event called when a scene is opened in the Scene Editor
[Link] += [Link]
# Hook up to the OnSaved event called when a scene has been successfully saved
[Link] += [Link]
# Hook up to the OnExporting event called when a scene is about to be exported from an .scproj
file to a .scene file
[Link] += [Link]
# Hook up to the OnExported event called when a scene has been successfully exported from an
.scproj file to a .scene file
[Link] += [Link]
# Hook up to the OnPackaged event called when a scene has been successfully packaged
[Link] += [Link]
# Example of a callback function triggered when a scene is opened in the Scene Editor
def onOpened(self, scene):
print "Opened: {0}".format([Link])
# Example of a callback function triggered when the scene open in the Scene Editor is about to be
saved
def onSaving(self, scene):
print "Saving: {0}".format([Link])
# Example of a callback function triggered when the scene open in the Scene Editor has been
successfully saved
def onSaved(self, scene):
print "Saved: {0}".format([Link])
# Example of a callback function triggered when the scene open in the Scene Editor is about to be
exported
def onExporting(self, scene):
print "Exporting: {0}".format([Link])
# Example of a callback function triggered when the scene open in the Scene Editor has been
successfully exported
def onExported(self, scene):
print "Exported: {0}".format([Link])
# Example of a callback function triggered when the scene open in the Scene Editor is about to be
packaged
def onPackaging(self, scene):
print "Packaging: {0}".format([Link])
# Example of a callback function triggered when the scene open in the Scene Editor is about to be
packaged
def onPackaged(self, scene):
print "Packaged: {0}".format([Link])
Associated Types
[Link]
[Link]
Summary
Type
Description
Assembly
Camera
The Camera class is the basis for derived camera classes in the HdkApi such as SceneCamera.
[Link]
CameraManager
The CameraManager has access to Camera objects from the SceneEditor. Currently it provides access to the perspective camera that is used
to navigate in the scene editor.
[Link]
SceneCamera
The SceneCamera class represents the perspective camera that is used to navigate the scene in the editor. You may use this class to retrieve
position and look at point data.
[Link]
[Link]
Camera
The Camera class is the basis for derived camera classes in the HdkApi such as SceneCamera.
Namespace: [Link]
Assembly: [Link]
Properties
Position
LookAt
Events
CameraChanged
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class CameraExample():
def __init__(self):
[Link] = [Link]
[Link] += [Link]
def printPosition(self):
str = "{0}{1}{2}".format([Link].X, [Link].Y, [Link].Z)
print(str)
def printLookAt(self):
str = "{0}{1}{2}".format([Link].X, [Link].Y, [Link].Z)
print(str)
camExample = CameraExample()
Associated Types
[Link]
[Link]
[Link]
CameraManager
The CameraManager has access to Camera objects from the SceneEditor. Currently it provides access to the perspective camera that is used to
navigate in the scene editor.
Namespace: [Link]
Assembly: [Link]
Properties
SceneCamera
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class CameraExample():
def __init__(self):
[Link] = [Link]
[Link] += [Link]
def printPosition(self):
str = "{0}{1}{2}".format([Link].X, [Link].Y, [Link].Z)
print(str)
def printLookAt(self):
str = "{0}{1}{2}".format([Link].X, [Link].Y, [Link].Z)
print(str)
camExample = CameraExample()
Associated Types
[Link]
[Link]
[Link]
SceneCamera
The SceneCamera class represents the perspective camera that is used to navigate the scene in the editor. You may use this class to retrieve
position and look at point data.
Namespace: [Link]
Assembly: [Link]
Methods
ZoomToSelection( )
Properties
Position
LookAt
Events
CameraChanged
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class CameraExample():
def __init__(self):
[Link] = [Link]
[Link] += [Link]
def printPosition(self):
str = "{0}{1}{2}".format([Link].X, [Link].Y, [Link].Z)
print(str)
def printLookAt(self):
str = "{0}{1}{2}".format([Link].X, [Link].Y, [Link].Z)
print(str)
camExample = CameraExample()
Associated Types
[Link]
[Link]
[Link]
Summary
Type
Description
Assembly
SelectionManager
Provides events and data relating to the current selection in the Scene Editor
[Link]
[Link]
SelectionManager
Provides events and data relating to the current selection in the Scene Editor
Namespace: [Link]
Assembly: [Link]
Events
SelectionChanged
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
class SelectionExample():
def __init__(self):
# Hook up to the SelectionChanged event
[Link] += [Link]
selExample = SelectionExample()
[Link]
Summary
Type
Description
Assembly
Menu
Menu represents a menu in the Scene Editor UI, new items can be added to the menu by calling the AddMenuItem function, a new Menu can be
created through [Link]
[Link]
MenuItem
MenuItem represents an item within a Menu in the Scene Editor UI, it provides access to properties about the menu item such as what icon it
uses and whether it has a button associated with it, for a menu item to be visible it must be added to a Menu through AddMenuItem, to create a
new MenuItem call [Link]
[Link]
MenuManager
MenuManager is used to add new menus and menu items to the Scene Editor UI, to add a new menu call CreateMenu, to add a new menu item
call CreateMenuItem and then pass the returned MenuItem to a menu's AddMenuItem function
[Link]
[Link]
Menu
Menu represents a menu in the Scene Editor UI, new items can be added to the menu by calling the AddMenuItem function, a new Menu can be
created through [Link]
Namespace: [Link]
Assembly: [Link]
Methods
AddMenuItem( menuItem )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("Example Menu")
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
def exampleCanExecute(self):
return True
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
MenuItem
MenuItem represents an item within a Menu in the Scene Editor UI, it provides access to properties about the menu item such as what icon it
uses and whether it has a button associated with it, for a menu item to be visible it must be added to a Menu through AddMenuItem, to create a
new MenuItem call [Link]
Namespace: [Link]
Assembly: [Link]
Properties
DisplayText
Description
IconPath
Shortcut
Toggleable
HasToolbarButton
Events
Execute
CanExecute
Delegates
CanExecuteHandler
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("Example Menu")
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
def exampleCanExecute(self):
return True
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
MenuManager
MenuManager is used to add new menus and menu items to the Scene Editor UI, to add a new menu call CreateMenu, to add a new menu item
call CreateMenuItem and then pass the returned MenuItem to a menu's AddMenuItem function
Namespace: [Link]
Assembly: [Link]
Methods
[Link] [Link]( name )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# Also add the [Link] dll and import Keys so we can set a keyboard shortcut
[Link]("[Link]")
from [Link] import Keys
class UiExample():
def __init__(self):
# Create a new menu
menu = [Link]("Example Menu")
# Hook up the execute event to set what happens when the menu item is pressed
[Link] += [Link]
# Hook up the can execute event to set whether the menu item is enabled
[Link] += [Link]
def exampleCanExecute(self):
return True
example = UiExample()
Associated Types
[Link]
[Link]
[Link]
Summary
Type
Description
Assembly
SynchronizationObject
Provides a synchronization object for the main Scene Editor thread, this is useful for forcing a delegate to be executed on the main Scene Editor
thread, for more information about synchronization objects see:
[Link]
[Link]
[Link]
SynchronizationObject
Provides a synchronization object for the main Scene Editor thread, this is useful for forcing a delegate to be executed on the main Scene Editor
thread, for more information about synchronization objects see:
[Link]
Namespace: [Link]
Assembly: [Link]
Remarks
SynchronizationObject is an advanced class which you should only have to use if you are dealing with multithreading, in general you should
rarely need to use this class
Methods
[Link] [Link]( )
Example
#<copyright>
#--------------------------------------------------------------------------------------------------
# SCE CONFIDENTIAL
# Home Development Kit (HDK) 1.70.0
# Copyright (C) 2011 Sony Computer Entertainment Inc.
# All Rights Reserved.
#--------------------------------------------------------------------------------------------------
#</copyright>
# We also use the communications classes in this example, so import them as well
from [Link] import TargetManager, Target, TargetResult, TargetException
class SyncObjectExample():
def __init__(self):
# Create a timer
[Link] = 30
[Link] = Timer()
[Link] = (1000/timerInterval)
# Use the SynchronizationObject to force the Elapsed callback to run on the main Scene Editor
thread
# Normally the Elapsed callback would execute on a separate thread, but by setting the
SynchronizingObject to
# the main Scene Editor thread timerEvent will now be called on the Scene Editor thread
instead
[Link] = [Link]()
[Link] += [Link]