FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
UnrealEnginePython/tests/test_structs.py at pr_array_params · dfb/UnrealEnginePython · GitHub
dfb
UnrealEnginePython
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
UnrealEnginePython
/
tests
/
test_structs.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
59 lines (44 loc) · 2.22 KB
Breadcrumbs
UnrealEnginePython
/
tests
/
test_structs.py
Copy path
File metadata and controls
59 lines (44 loc) · 2.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import
unittest
import
unreal_engine
as
ue
from
unreal_engine
.
structs
import
ColorMaterialInput
,
Key
from
unreal_engine
.
structs
import
StaticMeshSourceModel
,
MeshBuildSettings
class
TestStructs
(
unittest
.
TestCase
):
def
test_new_struct
(
self
):
material_input
=
ColorMaterialInput
()
self
.
assertTrue
(
'MaskR'
in
material_input
.
fields
())
def
test_new_struct_with_kwargs
(
self
):
material_input
=
ColorMaterialInput
(
Mask
=
1
,
MaskR
=
1
,
MaskG
=
1
,
MaskB
=
0
,
MaskA
=
1
)
self
.
assertEqual
(
material_input
.
Mask
,
1
)
self
.
assertEqual
(
material_input
.
MaskR
,
1
)
self
.
assertEqual
(
material_input
.
MaskG
,
1
)
self
.
assertEqual
(
material_input
.
MaskB
,
0
)
self
.
assertEqual
(
material_input
.
MaskA
,
1
)
def
test_struct_set
(
self
):
material_input
=
ColorMaterialInput
()
material_input
.
MaskG
=
1
self
.
assertEqual
(
material_input
.
MaskG
,
1
)
def
test_struct_clone
(
self
):
material_input
=
ColorMaterialInput
(
Mask
=
1
,
MaskR
=
0
,
MaskG
=
1
,
MaskB
=
0
,
MaskA
=
1
)
material_input2
=
material_input
.
clone
()
self
.
assertEqual
(
material_input2
.
Mask
,
1
)
self
.
assertEqual
(
material_input2
.
MaskR
,
0
)
self
.
assertEqual
(
material_input2
.
MaskG
,
1
)
self
.
assertEqual
(
material_input2
.
MaskB
,
0
)
self
.
assertEqual
(
material_input2
.
MaskA
,
1
)
def
test_cmp
(
self
):
key1
=
Key
(
KeyName
=
'SpaceBar'
)
key2
=
Key
(
KeyName
=
'SpaceBar'
)
self
.
assertEqual
(
key1
,
key2
)
def
test_ptr
(
self
):
source_model
=
StaticMeshSourceModel
()
source_model
.
BuildSettings
.
bRecomputeNormals
=
False
source_model
.
BuildSettings
.
bRecomputeTangents
=
True
source_model
.
BuildSettings
.
bUseMikkTSpace
=
True
source_model
.
BuildSettings
.
bBuildAdjacencyBuffer
=
True
source_model
.
BuildSettings
.
bRemoveDegenerates
=
True
source_model2
=
source_model
.
clone
()
self
.
assertEqual
(
source_model2
.
BuildSettings
.
bRecomputeNormals
,
False
)
self
.
assertEqual
(
source_model2
.
BuildSettings
.
bRecomputeTangents
,
True
)
self
.
assertEqual
(
source_model2
.
BuildSettings
.
bUseMikkTSpace
,
True
)
self
.
assertEqual
(
source_model2
.
BuildSettings
.
bBuildAdjacencyBuffer
,
True
)
self
.
assertEqual
(
source_model2
.
BuildSettings
.
bRemoveDegenerates
,
True
)
Back
|
FazBrowse Home
|
New Git URL