Compare commits
659 Commits
temp-objec
...
cloth-impr
Author | SHA1 | Date | |
---|---|---|---|
ceddd2bcd9 | |||
f47ace53f2 | |||
7eb44c2f1b | |||
13818c47cf | |||
51f14cfa43 | |||
20191980f4 | |||
e81dc0b7bc | |||
![]() |
5078b9d2d0 | ||
566b319335 | |||
![]() |
bdda0964e0 | ||
41045478ab | |||
efe94793c0 | |||
b85be88655 | |||
e6af8758c8 | |||
1e1c858cf1 | |||
72d1fb9934 | |||
20f3cbfb78 | |||
43f0af734e | |||
96b4e43e8d | |||
80795ff897 | |||
ab9bd557ad | |||
edbb2d2279 | |||
83a4e1aaf9 | |||
4697604331 | |||
ceba8e28b7 | |||
50e3cd0bb3 | |||
43973410f3 | |||
7d73ba904e | |||
87535dd73d | |||
a6ec402f5a | |||
f6367ecfb6 | |||
8ff3f7f601 | |||
30bffb5a3a | |||
f4213c1408 | |||
252ebf6bfd | |||
8c957468bc | |||
fb5597540d | |||
e77d2b4e3f | |||
753a600e35 | |||
9a5fb0209e | |||
d75b8e5f01 | |||
0108ce1fe5 | |||
b328a59373 | |||
1db47a2ccd | |||
b843753ad5 | |||
08274433e1 | |||
59b4c67536 | |||
2b963ecb81 | |||
0ed54cf9ba | |||
d0920fba16 | |||
c17cb50ae2 | |||
80373bc4d2 | |||
719629f2aa | |||
f9107eae6a | |||
f51c6efbc1 | |||
8c528a4f0a | |||
6793aebad2 | |||
70e2824126 | |||
9856dd9fec | |||
5480de3fca | |||
97cd8bfae1 | |||
4b373ed086 | |||
252207cc7a | |||
b94222b090 | |||
22150eb409 | |||
3527857cdc | |||
0987c11c76 | |||
12ce0cfb21 | |||
7691040166 | |||
3cc2a9b934 | |||
![]() |
df30b50f2f | ||
![]() |
d20d2bcb7f | ||
1daa20ad9f | |||
62fbb7d4a1 | |||
d56b90705e | |||
52655f5161 | |||
0e2915b292 | |||
![]() |
4d00e95ee3 | ||
cd17b32583 | |||
c960804747 | |||
f1525cf534 | |||
9db8bdbc65 | |||
97a0d6fcc7 | |||
b10c64bd2f | |||
969111f9b5 | |||
eb7286bfd2 | |||
8c15d612a5 | |||
b66aa0b0a6 | |||
dbe1b07e05 | |||
73c577d46a | |||
e5767eaad1 | |||
c6416ae653 | |||
b88e51dd55 | |||
bfbfb1c47e | |||
26c5a1c301 | |||
71e65daf5c | |||
9c5203c98f | |||
ddee0931b8 | |||
3ec6f2172d | |||
fadad17c58 | |||
9738de820a | |||
bea62c5c1a | |||
bdc1108e8c | |||
a42fd3de5d | |||
b26e9f0000 | |||
5c0d8bcdc7 | |||
728e92422e | |||
ccacf3ae3c | |||
b372766816 | |||
af36dd4664 | |||
46dceefc35 | |||
![]() |
aa6247a385 | ||
f22ef1706d | |||
274bde23fb | |||
d5a8c0c414 | |||
597122d72b | |||
9536f67e7e | |||
b633d760a2 | |||
532c8ac583 | |||
ecb56eac57 | |||
599e979d90 | |||
![]() |
73eb1bfd55 | ||
df237b964b | |||
a69f985f40 | |||
87f598fd3f | |||
![]() |
d53093953f | ||
8a7f317666 | |||
f33cb522dd | |||
b09387c388 | |||
f3b9fa5393 | |||
574c716f2d | |||
e61bbc00b7 | |||
f8a3636374 | |||
6cd0484de8 | |||
ec27776d8e | |||
38247fc80b | |||
0d7e758c91 | |||
a5f046f449 | |||
2fe528424d | |||
101fd7ec06 | |||
cbf5c738d6 | |||
1870a1adc7 | |||
a0dce6810d | |||
68f4a4641e | |||
51f6b25afd | |||
84dbf949d7 | |||
cd6cb55ff3 | |||
a4f08297ed | |||
52aa963f0e | |||
a283333cd8 | |||
d6313f47af | |||
f1bc9331b1 | |||
3995b33a42 | |||
d312dbea2d | |||
372754c164 | |||
5cad6afac6 | |||
daaf315bf2 | |||
fd48e685c3 | |||
d4519f54b3 | |||
0a8af46707 | |||
![]() |
9ff135d85d | ||
b5893b1ba3 | |||
668f39519c | |||
b09a8203e9 | |||
64a2f98062 | |||
751189e9d6 | |||
f0c6f5ee77 | |||
38b72fb64b | |||
ab59f9e65d | |||
b7b7468bef | |||
ce7c87fbda | |||
579631819f | |||
b66ae8259e | |||
86e20a2e63 | |||
e7a68ef843 | |||
2ceff8bd63 | |||
a24b4e6090 | |||
76c2203f9c | |||
6fc8a74886 | |||
a262ea8c47 | |||
410880552b | |||
e74bd46ede | |||
1eed46c788 | |||
78fbd146f3 | |||
4be752a93c | |||
5513da65b2 | |||
f19ecdeec6 | |||
a0a1fc8938 | |||
6453814ec0 | |||
42103a3eb8 | |||
2f1e34cfcc | |||
36e82b7759 | |||
ace8ad861d | |||
35c71aed25 | |||
73abca1da0 | |||
b955747875 | |||
799779d432 | |||
2b9edbc98b | |||
d645b1a78a | |||
49915e3241 | |||
da9b1b14ed | |||
2e25a48b05 | |||
b84fad2ba3 | |||
284e0ea756 | |||
8148d549bb | |||
cbc7ee28d7 | |||
3ee606621c | |||
064e701472 | |||
716e138a1b | |||
fd19069999 | |||
66407e15cb | |||
0eb3246713 | |||
4d58fac1b4 | |||
3102833962 | |||
90e6323ed8 | |||
57cd52a4ab | |||
f61c30f804 | |||
5ff1d845ea | |||
2002fe27d9 | |||
5788f24337 | |||
67e8c1e1c7 | |||
2788202417 | |||
f27ecd56ef | |||
b00d840359 | |||
760e79d809 | |||
ec4ce908db | |||
a6585fa4b1 | |||
d617a6c85b | |||
be57cf9b2a | |||
5508b572ea | |||
75bcb70c60 | |||
7bf4023689 | |||
78a8d3685b | |||
b763c34e80 | |||
a6e582164f | |||
d0956e9cb3 | |||
8055ed2741 | |||
13d238729b | |||
28c34ae7e2 | |||
4d339f56fe | |||
9e8bd3a072 | |||
1d8d4e03f5 | |||
7ac0272b77 | |||
474a145d78 | |||
d0a16772ad | |||
ae01df5779 | |||
2e14b7fb97 | |||
83cb34ccd1 | |||
638de72277 | |||
fb565ddb68 | |||
56a47e58f4 | |||
9bcced83ee | |||
6f4c7f1f01 | |||
f3427cbc98 | |||
5165d62931 | |||
1857823839 | |||
2dc7555522 | |||
540e85d567 | |||
4127aeb7a5 | |||
fb1915d870 | |||
7b6af843c2 | |||
55606dbdbc | |||
dff8a7db73 | |||
20367898fe | |||
e3fe8ce00b | |||
a25c11fd8d | |||
009c38df53 | |||
8f49299134 | |||
cfc1ddeff7 | |||
80dcb2ced8 | |||
d274c64d22 | |||
df4525d1d9 | |||
863e395ad8 | |||
e19686a35a | |||
8a2db3ed21 | |||
6242940639 | |||
5330f1c5d1 | |||
b3a7a75a26 | |||
16017178b2 | |||
54f9cd5283 | |||
409cfba1a3 | |||
0e68751b8a | |||
70b705b5fe | |||
de702a4803 | |||
bfbd85e9d6 | |||
713027b832 | |||
983811607d | |||
cd58ce85c2 | |||
5e44324b79 | |||
1628a6858e | |||
481cdb08ed | |||
1d97e948d2 | |||
c68429bc03 | |||
d860d23e1a | |||
88b46a6ce9 | |||
6fee105943 | |||
58e8c71cbd | |||
f6740993f7 | |||
747534af00 | |||
7277f8973b | |||
44505b38df | |||
6654e109df | |||
2d3d76693a | |||
7719c11006 | |||
854db8951b | |||
ba65f7093b | |||
38eb91c848 | |||
335b193336 | |||
6221180963 | |||
815b1f24fa | |||
2ef695fabf | |||
![]() |
fec317de8d | ||
c140f11946 | |||
75fc1c3507 | |||
051e186d5c | |||
7c75c2db4f | |||
cfea9c261c | |||
da11e33b26 | |||
16100f8261 | |||
b53d358261 | |||
28369f725c | |||
24d1829243 | |||
84a9647f22 | |||
d9324b61d5 | |||
![]() |
6c0705009e | ||
c0f42a7526 | |||
10a2562bc5 | |||
18c12803bd | |||
2c03d6a12b | |||
f7af08b5fe | |||
c72a204001 | |||
d6a4b23f8b | |||
9450792bf2 | |||
81060ff6b2 | |||
dc0eed178a | |||
fd2c48726f | |||
38cb29d67e | |||
edce44d693 | |||
56254a42e0 | |||
bc3727a943 | |||
06cb460cd7 | |||
12a9e9ae33 | |||
7a0699db34 | |||
48155c210a | |||
ef502854fe | |||
c9db7ceff2 | |||
bae880dc9e | |||
857e4e04d8 | |||
4dee702332 | |||
9dca74f0e5 | |||
9812943931 | |||
e31b8303ed | |||
d02335a195 | |||
5e2f9c5c67 | |||
b4a8b81399 | |||
6862762685 | |||
8d9faf840b | |||
1318660b04 | |||
3e9b592b08 | |||
54f2e58452 | |||
176e18436c | |||
d886e32270 | |||
103a31f712 | |||
3ada840e65 | |||
76ece90d4a | |||
28c20fc393 | |||
9f66d00287 | |||
605e184167 | |||
882daeffc5 | |||
6d8aa85051 | |||
9f2ae547c0 | |||
4198c18f15 | |||
12a60265cd | |||
d712dd2f19 | |||
e077285745 | |||
4d19f24ba7 | |||
5e7a21a5f5 | |||
1cc4ab481e | |||
cb50c288d4 | |||
278e3f7d5f | |||
96fba1e101 | |||
0e0d99161a | |||
b290048257 | |||
4461be1b72 | |||
91504ed26e | |||
3eb9cc69f2 | |||
9636cab009 | |||
ae8225ba6d | |||
43ee4d5d7c | |||
c1d737eb95 | |||
b99d064e91 | |||
c84b8d4801 | |||
f197134426 | |||
925e775818 | |||
73a7885ab3 | |||
d5c1c0b10d | |||
13beeb5892 | |||
0385b33f0b | |||
69f2305415 | |||
34c474e695 | |||
f3efa9e15f | |||
b59b812400 | |||
598216c36e | |||
80844fdfc0 | |||
e0a436fcff | |||
0012082c10 | |||
4e4a93bc45 | |||
43e0e8defa | |||
3740f7593d | |||
49fe27ee46 | |||
5358026511 | |||
59ce30f32b | |||
433aaa8c2e | |||
c09e22306a | |||
f74d85ffc8 | |||
905eeb0bc7 | |||
66ec3c7e7f | |||
1f76e6c326 | |||
6c243b7e40 | |||
592c3881ba | |||
1a3fb3e8b1 | |||
cd3f5983cd | |||
9eb5aa32b8 | |||
ea1751a038 | |||
a3b4c3823c | |||
9bd2e9104a | |||
046904e3fc | |||
84474b0171 | |||
632f2b5c18 | |||
9e3bfd9210 | |||
2dd0cb4964 | |||
d3b3df0371 | |||
d83681807e | |||
d2591e5c2d | |||
86c2c4d513 | |||
b27b4743a2 | |||
02788a9d1a | |||
e78ef82827 | |||
aa0380a6a5 | |||
78fde19e68 | |||
aea637456e | |||
3dd6912fce | |||
8c6a1d8f95 | |||
fa11dc6730 | |||
b886cdf81d | |||
3d26cf112b | |||
82d59c6588 | |||
d1be30f779 | |||
288d7794d4 | |||
75b310f489 | |||
c7cfee04c4 | |||
f3c5b0394f | |||
16253285ff | |||
133dadcdee | |||
7915cc7ddb | |||
98ecdc4896 | |||
0f217de403 | |||
38b6f8e143 | |||
5e225ddb21 | |||
ac19483e63 | |||
a5d0597b92 | |||
53c43259ad | |||
0d6ddd0a1d | |||
522bee3fc8 | |||
2e98524b58 | |||
![]() |
32c4158047 | ||
188c4a22c9 | |||
![]() |
e76a65e359 | ||
128506eeb1 | |||
16c05161e7 | |||
60f4cb24da | |||
ffda096413 | |||
57405054b2 | |||
![]() |
3c7500ca71 | ||
d37dcc4880 | |||
f69feb4957 | |||
89bcc80c25 | |||
331e97bcf3 | |||
13b6867d1f | |||
53dc251fd3 | |||
d7d20b483a | |||
26dab9c2fe | |||
9a7f963a02 | |||
f1bc0aedde | |||
![]() |
5285de16f3 | ||
bb92d9a946 | |||
![]() |
f1e6838376 | ||
![]() |
0ab30f9e39 | ||
![]() |
dac8b08f4c | ||
92f36586e3 | |||
53d69e6d04 | |||
0ca7a78f20 | |||
41cf2d9042 | |||
b14979f91f | |||
8264b772f5 | |||
fa7e19bca4 | |||
89ab591345 | |||
420e379e99 | |||
46a9038f60 | |||
1e9fb355bf | |||
83cb387944 | |||
26ee70099a | |||
e5bb234f64 | |||
ff839fb6c1 | |||
ac8f6413cc | |||
88bbb68ad0 | |||
dda7e3b695 | |||
e2678d6b7b | |||
307492c2db | |||
da82269c58 | |||
63225d7c8b | |||
fcac9e8410 | |||
9f7f6d5540 | |||
f28aec17e9 | |||
3811998177 | |||
287d1924fa | |||
0afe103269 | |||
![]() |
bc9e05599d | ||
![]() |
a0ef147f29 | ||
![]() |
c558d8fa7c | ||
aff71a7fdc | |||
eb6fe5fa94 | |||
95eb9f22e6 | |||
85de548e03 | |||
141f0f4c47 | |||
047950db7c | |||
6617818c7a | |||
5bfe6126f8 | |||
2720667566 | |||
b4e8d33f11 | |||
80f7249d09 | |||
447622f717 | |||
7bccd21afa | |||
0f2efce6c5 | |||
c12d976020 | |||
d0e3fbc06b | |||
fb3528d088 | |||
87a9b6ac06 | |||
2666e77c22 | |||
73dfd3d382 | |||
3a10f8e1b1 | |||
5ab77ab4ee | |||
66d4e9300b | |||
1c23b5c6ff | |||
cbd4a79c6d | |||
2e9b92b5cc | |||
332846b188 | |||
a494df8e38 | |||
d213474070 | |||
8aa6e4d50b | |||
5a3c146652 | |||
c963488b5e | |||
32339a56f1 | |||
f55adabb3e | |||
d7f5520fdf | |||
bbf2f3ac2a | |||
320771dc74 | |||
607a2d80d3 | |||
bc738592df | |||
6b818dcf79 | |||
102b2a7418 | |||
5d07a070cb | |||
87825084d5 | |||
d6a6417e3b | |||
03412896f6 | |||
87625ccce9 | |||
666a9385c4 | |||
6249fb68e0 | |||
6edd60d959 | |||
fe9debc47b | |||
84213a3ce1 | |||
3f0b3a4fb0 | |||
5ad6bdb021 | |||
d6bee4bffd | |||
b034660643 | |||
dbb20c3913 | |||
5315339162 | |||
7fa9ab01d6 | |||
c6f05db912 | |||
a87cd01425 | |||
77df327fa8 | |||
0607cd2e15 | |||
9f0176d795 | |||
215df08c0f | |||
7b6d09e9bd | |||
5e28df26de | |||
e3b5229da2 | |||
bc3b482b9d | |||
6f9cddec21 | |||
1cc8f2d79b | |||
fdea8ecb5b | |||
06090d7a31 | |||
8d1b6b76a2 | |||
a32251b4ed | |||
4e42d01c65 | |||
ade28fe8a2 | |||
115aea5f2f | |||
5de2fc2679 | |||
e735eda393 | |||
6054fff2a6 | |||
7d99e1418b | |||
983d671df8 | |||
0018eae5ed | |||
add9835df6 | |||
309b12ac27 | |||
0f5dc7ad80 | |||
82d3cd586c | |||
73b9899c92 | |||
b2dc669ee7 | |||
8d454ff13a | |||
998900794d | |||
61f8a1cfd7 | |||
403b835992 | |||
8759ec4eae | |||
80ed76cb66 | |||
2d48769a8b | |||
c8d1bbf31c | |||
d4a46809d0 | |||
9596871292 | |||
22f67557d1 | |||
63f023111d | |||
66d19ebeb3 | |||
69e8ee7851 | |||
5aacca55fa | |||
a6c0ab8cb5 | |||
fb542eadd4 | |||
f30048504b | |||
e3df66f1b7 | |||
d1b25a08d7 | |||
3fb5d20cc0 | |||
63aaa7c84a | |||
929aa7c046 | |||
55b9eebede | |||
887dfc298d | |||
a2dbe9f340 | |||
81a8a015b8 | |||
4cbb4bc6be | |||
85af281f85 | |||
d12c650349 | |||
bb32d9240f | |||
eca3877ac4 | |||
e843c10ad5 | |||
dc526671c7 | |||
1d8a08fb9f | |||
54186c5aa9 | |||
f9dad94d9e | |||
8a0d8ddf27 | |||
cb4d349803 | |||
ce6227b6be | |||
04e157e44a | |||
5d2a092f40 | |||
73fd331025 | |||
56c21ff707 | |||
c03db4c501 | |||
fa5669164b | |||
5721918848 | |||
dc6fd8a257 | |||
fe5735c6cf | |||
97b232ec70 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"project_id" : "Blender",
|
"project_id" : "Blender",
|
||||||
"conduit_uri" : "https://developer.blender.org/",
|
"conduit_uri" : "https://developer.blender.org/",
|
||||||
"git.default-relative-commit" : "origin/blender2.8",
|
"git.default-relative-commit" : "origin/master",
|
||||||
"arc.land.update.default" : "rebase"
|
"arc.land.update.default" : "rebase"
|
||||||
}
|
}
|
||||||
|
44
.editorconfig
Normal file
44
.editorconfig
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# C/C++
|
||||||
|
[*.{c,cc,h,hh,inl,glsl}]
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
max_line_length = 120
|
||||||
|
|
||||||
|
# CMake & Text
|
||||||
|
[*.{cmake,txt}]
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
max_line_length = 120
|
||||||
|
|
||||||
|
# Python
|
||||||
|
[*.py]
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
max_line_length = 120
|
||||||
|
|
||||||
|
# Shell
|
||||||
|
[*.sh]
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
max_line_length = 120
|
||||||
|
|
||||||
|
# reStructuredText
|
||||||
|
[*.rst]
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 3
|
||||||
|
max_line_length = 120
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,24 +1,20 @@
|
|||||||
[submodule "release/scripts/addons"]
|
[submodule "release/scripts/addons"]
|
||||||
path = release/scripts/addons
|
path = release/scripts/addons
|
||||||
url = ../blender-addons.git
|
url = ../blender-addons.git
|
||||||
branch = blender2.8
|
|
||||||
ignore = all
|
ignore = all
|
||||||
branch = master
|
branch = master
|
||||||
[submodule "release/scripts/addons_contrib"]
|
[submodule "release/scripts/addons_contrib"]
|
||||||
path = release/scripts/addons_contrib
|
path = release/scripts/addons_contrib
|
||||||
url = ../blender-addons-contrib.git
|
url = ../blender-addons-contrib.git
|
||||||
branch = master
|
|
||||||
ignore = all
|
ignore = all
|
||||||
branch = master
|
branch = master
|
||||||
[submodule "release/datafiles/locale"]
|
[submodule "release/datafiles/locale"]
|
||||||
path = release/datafiles/locale
|
path = release/datafiles/locale
|
||||||
url = ../blender-translations.git
|
url = ../blender-translations.git
|
||||||
branch = master
|
|
||||||
ignore = all
|
ignore = all
|
||||||
branch = master
|
branch = master
|
||||||
[submodule "source/tools"]
|
[submodule "source/tools"]
|
||||||
path = source/tools
|
path = source/tools
|
||||||
url = ../blender-dev-tools.git
|
url = ../blender-dev-tools.git
|
||||||
branch = master
|
|
||||||
ignore = all
|
ignore = all
|
||||||
branch = master
|
branch = master
|
||||||
|
276
CMakeLists.txt
276
CMakeLists.txt
@@ -66,21 +66,12 @@ endif()
|
|||||||
# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
|
# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
|
||||||
|
|
||||||
# global compile definitions since add_definitions() adds for all.
|
# global compile definitions since add_definitions() adds for all.
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
|
||||||
if(NOT (${CMAKE_VERSION} VERSION_LESS 3.0))
|
$<$<CONFIG:Debug>:DEBUG;_DEBUG>
|
||||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
|
$<$<CONFIG:Release>:NDEBUG>
|
||||||
$<$<CONFIG:Debug>:DEBUG;_DEBUG>
|
$<$<CONFIG:MinSizeRel>:NDEBUG>
|
||||||
$<$<CONFIG:Release>:NDEBUG>
|
$<$<CONFIG:RelWithDebInfo>:NDEBUG>
|
||||||
$<$<CONFIG:MinSizeRel>:NDEBUG>
|
)
|
||||||
$<$<CONFIG:RelWithDebInfo>:NDEBUG>
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
# keep until CMake-3.0 is min requirement
|
|
||||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG _DEBUG)
|
|
||||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NDEBUG)
|
|
||||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL NDEBUG)
|
|
||||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO NDEBUG)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Set policy
|
# Set policy
|
||||||
@@ -206,7 +197,7 @@ mark_as_advanced(WITH_BLENDER)
|
|||||||
option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
|
option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
|
||||||
|
|
||||||
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
|
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
|
||||||
option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON)
|
option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON)
|
||||||
mark_as_advanced(WITH_PYTHON) # dont want people disabling this unless they really know what they are doing.
|
mark_as_advanced(WITH_PYTHON) # dont want people disabling this unless they really know what they are doing.
|
||||||
mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option.
|
mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option.
|
||||||
|
|
||||||
@@ -244,8 +235,6 @@ endif()
|
|||||||
option(WITH_PLAYER "Build Player" OFF)
|
option(WITH_PLAYER "Build Player" OFF)
|
||||||
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
|
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
|
||||||
|
|
||||||
option(WITH_CLAY_ENGINE "Enable Clay engine" ON)
|
|
||||||
|
|
||||||
# Compositor
|
# Compositor
|
||||||
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
|
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
|
||||||
|
|
||||||
@@ -390,14 +379,10 @@ if(UNIX AND NOT APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
|
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
|
||||||
if(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
|
|
||||||
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
|
|
||||||
mark_as_advanced(PYTHON_NUMPY_PATH)
|
|
||||||
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
|
|
||||||
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
|
|
||||||
endif()
|
|
||||||
if(WITH_PYTHON_INSTALL)
|
if(WITH_PYTHON_INSTALL)
|
||||||
option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
|
option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
|
||||||
|
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
|
||||||
|
mark_as_advanced(PYTHON_NUMPY_PATH)
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
|
option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
|
||||||
@@ -459,7 +444,7 @@ mark_as_advanced(WITH_MEM_VALGRIND)
|
|||||||
option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking (only enable for development)" OFF)
|
option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking (only enable for development)" OFF)
|
||||||
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
|
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
|
||||||
|
|
||||||
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" OFF)
|
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
|
||||||
mark_as_advanced(WITH_ASSERT_ABORT)
|
mark_as_advanced(WITH_ASSERT_ABORT)
|
||||||
|
|
||||||
option(WITH_BOOST "Enable features depending on boost" ON)
|
option(WITH_BOOST "Enable features depending on boost" ON)
|
||||||
@@ -478,16 +463,28 @@ endif()
|
|||||||
|
|
||||||
# OpenGL
|
# OpenGL
|
||||||
|
|
||||||
|
option(WITH_GLEW_MX "Support multiple GLEW contexts (experimental)" OFF )
|
||||||
option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
|
option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
|
||||||
option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF)
|
option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF)
|
||||||
|
option(WITH_GL_PROFILE_COMPAT "Support using the OpenGL 'compatibility' profile. (deprecated)" ON )
|
||||||
|
option(WITH_GL_PROFILE_CORE "Support using the OpenGL 3.2+ 'core' profile." OFF)
|
||||||
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
|
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
|
||||||
|
|
||||||
mark_as_advanced(
|
mark_as_advanced(
|
||||||
|
WITH_GLEW_MX
|
||||||
WITH_GLEW_ES
|
WITH_GLEW_ES
|
||||||
WITH_GL_EGL
|
WITH_GL_EGL
|
||||||
|
WITH_GL_PROFILE_COMPAT
|
||||||
|
WITH_GL_PROFILE_CORE
|
||||||
WITH_GL_PROFILE_ES20
|
WITH_GL_PROFILE_ES20
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(WITH_GL_PROFILE_COMPAT)
|
||||||
|
set(WITH_GLU ON)
|
||||||
|
else()
|
||||||
|
set(WITH_GLU OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
option(WITH_GL_ANGLE "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library." OFF)
|
option(WITH_GL_ANGLE "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library." OFF)
|
||||||
mark_as_advanced(WITH_GL_ANGLE)
|
mark_as_advanced(WITH_GL_ANGLE)
|
||||||
@@ -513,10 +510,11 @@ if(APPLE)
|
|||||||
set(WITH_CXX11 ON)
|
set(WITH_CXX11 ON)
|
||||||
elseif(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
|
elseif(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
|
||||||
set(_c11_init ON)
|
set(_c11_init ON)
|
||||||
|
set(_cxx11_init ON)
|
||||||
else()
|
else()
|
||||||
set(_c11_init OFF)
|
set(_c11_init OFF)
|
||||||
|
set(_cxx11_init OFF)
|
||||||
endif()
|
endif()
|
||||||
set(_cxx11_init ON)
|
|
||||||
|
|
||||||
option(WITH_C11 "Build with C11 standard enabled, for development use only!" ${_c11_init})
|
option(WITH_C11 "Build with C11 standard enabled, for development use only!" ${_c11_init})
|
||||||
mark_as_advanced(WITH_C11)
|
mark_as_advanced(WITH_C11)
|
||||||
@@ -529,6 +527,53 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
mark_as_advanced(WITH_LINKER_GOLD)
|
mark_as_advanced(WITH_LINKER_GOLD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
|
||||||
|
mark_as_advanced(WITH_COMPILER_ASAN)
|
||||||
|
|
||||||
|
if(WITH_COMPILER_ASAN)
|
||||||
|
set(_asan_defaults "\
|
||||||
|
-fsanitize=address \
|
||||||
|
-fsanitize=bool \
|
||||||
|
-fsanitize=bounds \
|
||||||
|
-fsanitize=enum \
|
||||||
|
-fsanitize=float-cast-overflow \
|
||||||
|
-fsanitize=float-divide-by-zero \
|
||||||
|
-fsanitize=nonnull-attribute \
|
||||||
|
-fsanitize=returns-nonnull-attribute \
|
||||||
|
-fsanitize=signed-integer-overflow \
|
||||||
|
-fsanitize=undefined \
|
||||||
|
-fsanitize=vla-bound \
|
||||||
|
-fno-sanitize=alignment \
|
||||||
|
")
|
||||||
|
|
||||||
|
if(NOT MSVC) # not all sanitizers are supported with clang-cl, these two however are very vocal about it
|
||||||
|
set(_asan_defaults "${_asan_defaults} -fsanitize=leak -fsanitize=object-size" )
|
||||||
|
endif()
|
||||||
|
set(COMPILER_ASAN_CFLAGS "${_asan_defaults}" CACHE STRING "C flags for address sanitizer")
|
||||||
|
mark_as_advanced(COMPILER_ASAN_CFLAGS)
|
||||||
|
set(COMPILER_ASAN_CXXFLAGS "${_asan_defaults}" CACHE STRING "C++ flags for address sanitizer")
|
||||||
|
mark_as_advanced(COMPILER_ASAN_CXXFLAGS)
|
||||||
|
|
||||||
|
unset(_asan_defaults)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
find_library(COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
|
||||||
|
else()
|
||||||
|
find_library( COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
|
||||||
|
PATHS
|
||||||
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
|
||||||
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
mark_as_advanced(COMPILER_ASAN_LIBRARY)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Dependency graph
|
||||||
|
option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
|
||||||
|
mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# Use hardcoded paths or find_package to find externals
|
# Use hardcoded paths or find_package to find externals
|
||||||
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
|
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
|
||||||
@@ -591,18 +636,14 @@ if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
|||||||
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
|
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT WITH_CXX11)
|
|
||||||
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
|
|
||||||
message(FATAL_ERROR "WITH_AUDASPACE requires WITH_CXX11")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT WITH_AUDASPACE)
|
if(NOT WITH_AUDASPACE)
|
||||||
if(WITH_OPENAL)
|
if(WITH_OPENAL)
|
||||||
message(FATAL_ERROR "WITH_OPENAL requires WITH_AUDASPACE")
|
message(WARNING "WITH_OPENAL requires WITH_AUDASPACE which is disabled")
|
||||||
|
set(WITH_OPENAL OFF)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_JACK)
|
if(WITH_JACK)
|
||||||
message(FATAL_ERROR "WITH_JACK requires WITH_AUDASPACE")
|
message(WARNING "WITH_JACK requires WITH_AUDASPACE which is disabled")
|
||||||
|
set(WITH_JACK OFF)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_GAMEENGINE)
|
if(WITH_GAMEENGINE)
|
||||||
message(FATAL_ERROR "WITH_GAMEENGINE requires WITH_AUDASPACE")
|
message(FATAL_ERROR "WITH_GAMEENGINE requires WITH_AUDASPACE")
|
||||||
@@ -645,10 +686,15 @@ if(NOT WITH_BOOST)
|
|||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
set_and_warn(WITH_CYCLES OFF)
|
set_and_warn(WITH_CYCLES OFF)
|
||||||
|
set_and_warn(WITH_AUDASPACE OFF)
|
||||||
set_and_warn(WITH_INTERNATIONAL OFF)
|
set_and_warn(WITH_INTERNATIONAL OFF)
|
||||||
set_and_warn(WITH_OPENVDB OFF)
|
set_and_warn(WITH_OPENVDB OFF)
|
||||||
set_and_warn(WITH_OPENCOLORIO OFF)
|
set_and_warn(WITH_OPENCOLORIO OFF)
|
||||||
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
|
||||||
|
set_and_warn(WITH_OPENAL OFF) # depends on AUDASPACE
|
||||||
|
set_and_warn(WITH_GAMEENGINE OFF) # depends on AUDASPACE
|
||||||
|
set_and_warn(WITH_PLAYER OFF) # depends on GAMEENGINE
|
||||||
|
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL OR
|
||||||
WITH_OPENVDB OR WITH_OPENCOLORIO)
|
WITH_OPENVDB OR WITH_OPENCOLORIO)
|
||||||
# Keep enabled
|
# Keep enabled
|
||||||
else()
|
else()
|
||||||
@@ -717,9 +763,30 @@ TEST_SHARED_PTR_SUPPORT()
|
|||||||
TEST_UNORDERED_MAP_SUPPORT()
|
TEST_UNORDERED_MAP_SUPPORT()
|
||||||
|
|
||||||
if(WITH_AUDASPACE)
|
if(WITH_AUDASPACE)
|
||||||
if(NOT WITH_SYSTEM_AUDASPACE)
|
if(WITH_SYSTEM_AUDASPACE)
|
||||||
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings/C" "${CMAKE_BINARY_DIR}/extern/audaspace")
|
set(AUDASPACE_DEFINITIONS
|
||||||
set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings")
|
-DWITH_AUDASPACE
|
||||||
|
-DWITH_SYSTEM_AUDASPACE
|
||||||
|
"-DAUD_DEVICE_H=<AUD_Device.h>"
|
||||||
|
"-DAUD_SPECIAL_H=<AUD_Special.h>"
|
||||||
|
"-DAUD_SOUND_H=<AUD_Sound.h>"
|
||||||
|
"-DAUD_HANDLE_H=<AUD_Handle.h>"
|
||||||
|
"-DAUD_SEQUENCE_H=<AUD_Sequence.h>"
|
||||||
|
"-DAUD_TYPES_H=<AUD_Types.h>"
|
||||||
|
"-DAUD_PYTHON_H=<python/PyAPI.h>"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
|
||||||
|
set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
|
||||||
|
set(AUDASPACE_DEFINITIONS
|
||||||
|
-DWITH_AUDASPACE
|
||||||
|
"-DAUD_DEVICE_H=<AUD_C-API.h>"
|
||||||
|
"-DAUD_SPECIAL_H=<AUD_C-API.h>"
|
||||||
|
"-DAUD_SOUND_H=<AUD_C-API.h>"
|
||||||
|
"-DAUD_HANDLE_H=<AUD_C-API.h>"
|
||||||
|
"-DAUD_SEQUENCE_H=<AUD_C-API.h>"
|
||||||
|
"-DAUD_TYPES_H=<AUD_Space.h>"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -788,7 +855,8 @@ set(C_WARNINGS)
|
|||||||
set(CXX_WARNINGS)
|
set(CXX_WARNINGS)
|
||||||
|
|
||||||
# for gcc -Wno-blah-blah
|
# for gcc -Wno-blah-blah
|
||||||
set(CC_REMOVE_STRICT_FLAGS)
|
set(C_REMOVE_STRICT_FLAGS)
|
||||||
|
set(CXX_REMOVE_STRICT_FLAGS)
|
||||||
|
|
||||||
# libraries to link the binary with passed to target_link_libraries()
|
# libraries to link the binary with passed to target_link_libraries()
|
||||||
# known as LLIBS to scons
|
# known as LLIBS to scons
|
||||||
@@ -800,6 +868,21 @@ set(PLATFORM_LINKLIBS "")
|
|||||||
set(PLATFORM_LINKFLAGS "")
|
set(PLATFORM_LINKFLAGS "")
|
||||||
set(PLATFORM_LINKFLAGS_DEBUG "")
|
set(PLATFORM_LINKFLAGS_DEBUG "")
|
||||||
|
|
||||||
|
if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
|
if(WITH_COMPILER_ASAN)
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMPILER_ASAN_CFLAGS}")
|
||||||
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CFLAGS}")
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
|
||||||
|
if(MSVC)
|
||||||
|
set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
|
||||||
|
endif()
|
||||||
|
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
|
||||||
|
set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
|
||||||
|
set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
#Platform specifics
|
#Platform specifics
|
||||||
@@ -972,11 +1055,19 @@ endif()
|
|||||||
find_package(OpenGL)
|
find_package(OpenGL)
|
||||||
blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
|
blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
|
||||||
|
|
||||||
|
if(WITH_GLU)
|
||||||
|
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_glu_LIBRARY}")
|
||||||
|
list(APPEND GL_DEFINITIONS -DWITH_GLU)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_SYSTEM_GLES)
|
if(WITH_SYSTEM_GLES)
|
||||||
find_package_wrapper(OpenGLES)
|
find_package_wrapper(OpenGLES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GL_PROFILE_ES20)
|
if(WITH_GL_PROFILE_COMPAT OR WITH_GL_PROFILE_CORE)
|
||||||
|
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
||||||
|
|
||||||
|
elseif(WITH_GL_PROFILE_ES20)
|
||||||
if(WITH_SYSTEM_GLES)
|
if(WITH_SYSTEM_GLES)
|
||||||
if(NOT OPENGLES_LIBRARY)
|
if(NOT OPENGLES_LIBRARY)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
@@ -1036,9 +1127,6 @@ if(WITH_GL_PROFILE_ES20)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else()
|
|
||||||
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GL_EGL)
|
if(WITH_GL_EGL)
|
||||||
@@ -1086,10 +1174,16 @@ if(WITH_GL_EGL)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_GL_PROFILE_COMPAT)
|
||||||
|
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_COMPAT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_GL_PROFILE_CORE)
|
||||||
|
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_GL_PROFILE_ES20)
|
if(WITH_GL_PROFILE_ES20)
|
||||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20)
|
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20)
|
||||||
else()
|
|
||||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GL_EGL)
|
if(WITH_GL_EGL)
|
||||||
@@ -1126,6 +1220,10 @@ endif()
|
|||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Configure GLEW
|
# Configure GLEW
|
||||||
|
|
||||||
|
if(WITH_GLEW_MX)
|
||||||
|
list(APPEND GL_DEFINITIONS -DWITH_GLEW_MX)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_SYSTEM_GLEW)
|
if(WITH_SYSTEM_GLEW)
|
||||||
find_package(GLEW)
|
find_package(GLEW)
|
||||||
|
|
||||||
@@ -1135,7 +1233,11 @@ if(WITH_SYSTEM_GLEW)
|
|||||||
message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
|
message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
|
if(WITH_GLEW_MX)
|
||||||
|
set(BLENDER_GLEW_LIBRARIES ${GLEW_MX_LIBRARY})
|
||||||
|
else()
|
||||||
|
set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
if(WITH_GLEW_ES)
|
if(WITH_GLEW_ES)
|
||||||
set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
|
set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
|
||||||
@@ -1143,11 +1245,12 @@ else()
|
|||||||
list(APPEND GL_DEFINITIONS -DGLEW_STATIC -DWITH_GLEW_ES)
|
list(APPEND GL_DEFINITIONS -DGLEW_STATIC -DWITH_GLEW_ES)
|
||||||
|
|
||||||
# These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
|
# These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
|
||||||
if(WITH_GL_PROFILE_ES20)
|
if(NOT WITH_GL_PROFILE_ES20)
|
||||||
list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
|
|
||||||
else()
|
|
||||||
# No ES functions are needed
|
# No ES functions are needed
|
||||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
|
list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
|
||||||
|
elseif(NOT (WITH_GL_PROFILE_CORE OR WITH_GL_PROFILE_COMPAT))
|
||||||
|
# ES is enabled, but the other functions are all disabled
|
||||||
|
list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_GL_PROFILE_ES20)
|
if(WITH_GL_PROFILE_ES20)
|
||||||
@@ -1174,7 +1277,7 @@ else()
|
|||||||
|
|
||||||
list(APPEND GL_DEFINITIONS -DGLEW_STATIC)
|
list(APPEND GL_DEFINITIONS -DGLEW_STATIC)
|
||||||
|
|
||||||
# This won't affect the non-experimental glew library,
|
# This won't affect the non-experimental glew library,
|
||||||
# but is used for conditional compilation elsewhere.
|
# but is used for conditional compilation elsewhere.
|
||||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
|
list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
|
||||||
|
|
||||||
@@ -1184,7 +1287,9 @@ else()
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
|
if(NOT WITH_GLU)
|
||||||
|
list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
|
||||||
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Configure Bullet
|
# Configure Bullet
|
||||||
@@ -1378,16 +1483,22 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# flags to undo strict flags
|
# flags to undo strict flags
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
|
||||||
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_TYPE_LIMITS -Wno-type-limits)
|
||||||
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT -Wno-int-in-bool-context)
|
||||||
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT -Wno-format)
|
||||||
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH -Wno-switch)
|
||||||
|
|
||||||
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS -Wno-class-memaccess)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
|
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
@@ -1416,23 +1527,23 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||||||
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS -Wunused-macros)
|
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS -Wunused-macros)
|
||||||
|
|
||||||
# flags to undo strict flags
|
# flags to undo strict flags
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
||||||
|
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
|
||||||
|
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
|
||||||
|
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||||
|
|
||||||
@@ -1464,7 +1575,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
|||||||
"/wd4267" # conversion from 'size_t' to 'type', possible loss of data
|
"/wd4267" # conversion from 'size_t' to 'type', possible loss of data
|
||||||
"/wd4305" # truncation from 'type1' to 'type2'
|
"/wd4305" # truncation from 'type1' to 'type2'
|
||||||
"/wd4800" # forcing value to bool 'true' or 'false'
|
"/wd4800" # forcing value to bool 'true' or 'false'
|
||||||
"/wd4828" # The file contains a character that is illegal
|
"/wd4828" # The file contains a character that is illegal
|
||||||
# errors:
|
# errors:
|
||||||
"/we4013" # 'function' undefined; assuming extern returning int
|
"/we4013" # 'function' undefined; assuming extern returning int
|
||||||
"/we4133" # incompatible pointer types
|
"/we4133" # incompatible pointer types
|
||||||
@@ -1490,15 +1601,10 @@ if(WITH_PYTHON)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32 OR APPLE)
|
||||||
# pass, we have this in an archive to extract
|
# pass, we have this in an archive to extract
|
||||||
elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
|
elseif(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
|
||||||
if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
|
find_python_package(numpy)
|
||||||
find_python_package(numpy)
|
|
||||||
unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE)
|
|
||||||
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
|
|
||||||
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR APPLE)
|
||||||
@@ -1529,7 +1635,12 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Visual Studio has all standards it supports available by default
|
# Visual Studio has all standards it supports available by default
|
||||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Intel")
|
# Clang on windows copies this behavior and does not support these switches
|
||||||
|
if(
|
||||||
|
CMAKE_COMPILER_IS_GNUCC OR
|
||||||
|
(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT MSVC)) OR
|
||||||
|
(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||||
|
)
|
||||||
# Use C99 + GNU extensions, works with GCC, Clang, ICC
|
# Use C99 + GNU extensions, works with GCC, Clang, ICC
|
||||||
if(WITH_C11)
|
if(WITH_C11)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
|
||||||
@@ -1735,7 +1846,10 @@ if(FIRST_RUN)
|
|||||||
|
|
||||||
info_cfg_text("OpenGL:")
|
info_cfg_text("OpenGL:")
|
||||||
info_cfg_option(WITH_GLEW_ES)
|
info_cfg_option(WITH_GLEW_ES)
|
||||||
|
info_cfg_option(WITH_GLU)
|
||||||
info_cfg_option(WITH_GL_EGL)
|
info_cfg_option(WITH_GL_EGL)
|
||||||
|
info_cfg_option(WITH_GL_PROFILE_COMPAT)
|
||||||
|
info_cfg_option(WITH_GL_PROFILE_CORE)
|
||||||
info_cfg_option(WITH_GL_PROFILE_ES20)
|
info_cfg_option(WITH_GL_PROFILE_ES20)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
info_cfg_option(WITH_GL_ANGLE)
|
info_cfg_option(WITH_GL_ANGLE)
|
||||||
|
@@ -236,7 +236,9 @@ help: .FORCE
|
|||||||
@echo " * check_descriptions - check for duplicate/invalid descriptions"
|
@echo " * check_descriptions - check for duplicate/invalid descriptions"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Utilities (not associated with building blender)"
|
@echo "Utilities (not associated with building blender)"
|
||||||
@echo " * icons - updates PNG icons from SVG files."
|
@echo " * icons - Updates PNG icons from SVG files."
|
||||||
|
@echo " Set environment variables 'BLENDER_BIN' and 'INKSCAPE_BIN'"
|
||||||
|
@echo " to define your own commands."
|
||||||
@echo " * tgz - create a compressed archive of the source code."
|
@echo " * tgz - create a compressed archive of the source code."
|
||||||
@echo " * update - updates git and all submodules"
|
@echo " * update - updates git and all submodules"
|
||||||
@echo ""
|
@echo ""
|
||||||
@@ -424,7 +426,7 @@ icons: .FORCE
|
|||||||
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
||||||
|
|
||||||
update: .FORCE
|
update: .FORCE
|
||||||
if [ "$(OS_NCASE)" == "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
|
if [ "$(OS_NCASE)" = "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
|
||||||
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
|
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
|
||||||
fi
|
fi
|
||||||
if [ -d "../lib" ]; then \
|
if [ -d "../lib" ]; then \
|
||||||
|
@@ -58,4 +58,3 @@ if(MSVC)
|
|||||||
DEPENDEES mkdir update patch download configure build install
|
DEPENDEES mkdir update patch download configure build install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -33,8 +33,8 @@ set(NUMPY_POSTFIX)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(NUMPY_INSTALL
|
set(NUMPY_INSTALL
|
||||||
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
|
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
|
||||||
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
|
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
|
||||||
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
|
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
|
||||||
)
|
)
|
||||||
set(NUMPY_PATCH ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff )
|
set(NUMPY_PATCH ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff )
|
||||||
else()
|
else()
|
||||||
|
@@ -39,5 +39,6 @@ if(BUILD_MODE STREQUAL Release)
|
|||||||
PREFIX ${BUILD_DIR}/openal
|
PREFIX ${BUILD_DIR}/openal
|
||||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
|
||||||
INSTALL_DIR ${LIBDIR}/openal
|
INSTALL_DIR ${LIBDIR}/openal
|
||||||
|
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -46,7 +46,7 @@ if(MSVC)
|
|||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
URL_HASH SHA256=${OPENJPEG_HASH}
|
URL_HASH SHA256=${OPENJPEG_HASH}
|
||||||
PREFIX ${BUILD_DIR}/openjpeg_msvc
|
PREFIX ${BUILD_DIR}/openjpeg_msvc
|
||||||
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
|
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
|
||||||
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
|
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
|
||||||
)
|
)
|
||||||
if(BUILD_MODE STREQUAL Release)
|
if(BUILD_MODE STREQUAL Release)
|
||||||
|
@@ -56,24 +56,27 @@ if(WIN32)
|
|||||||
# For OIIO and OSL
|
# For OIIO and OSL
|
||||||
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
|
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
|
||||||
|
|
||||||
# TODO FIXME highly MSVC specific
|
if(MSVC_VERSION GREATER 1909)
|
||||||
if(WITH_OPTIMIZED_DEBUG)
|
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
|
||||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
|
||||||
else()
|
|
||||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
|
||||||
endif()
|
endif()
|
||||||
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
|
||||||
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
|
||||||
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
|
||||||
|
|
||||||
if(WITH_OPTIMIZED_DEBUG)
|
if(WITH_OPTIMIZED_DEBUG)
|
||||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
else()
|
else()
|
||||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
endif()
|
endif()
|
||||||
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
|
|
||||||
|
if(WITH_OPTIMIZED_DEBUG)
|
||||||
|
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
|
else()
|
||||||
|
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
|
endif()
|
||||||
|
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
|
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
|
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||||
|
|
||||||
set(PLATFORM_FLAGS)
|
set(PLATFORM_FLAGS)
|
||||||
set(PLATFORM_CXX_FLAGS)
|
set(PLATFORM_CXX_FLAGS)
|
||||||
|
@@ -216,4 +216,3 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
|
|||||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
|
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -216,4 +216,3 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
|
|||||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
|
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ ExternalProject_Add(external_x264
|
|||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
URL_HASH SHA256=${X264_HASH}
|
URL_HASH SHA256=${X264_HASH}
|
||||||
PREFIX ${BUILD_DIR}/x264
|
PREFIX ${BUILD_DIR}/x264
|
||||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
|
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
|
||||||
--enable-static
|
--enable-static
|
||||||
--enable-pic
|
--enable-pic
|
||||||
--disable-lavf
|
--disable-lavf
|
||||||
|
@@ -37,4 +37,3 @@ endif()
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
|
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
ARGS=$( \
|
ARGS=$( \
|
||||||
getopt \
|
getopt \
|
||||||
-o s:i:t:h \
|
-o s:i:t:h \
|
||||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
|
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,use-cxx11,\
|
||||||
with-all,with-opencollada,with-jack,\
|
with-all,with-opencollada,with-jack,\
|
||||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
|
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
|
||||||
force-all,force-python,force-numpy,force-boost,\
|
force-all,force-python,force-numpy,force-boost,\
|
||||||
@@ -104,6 +104,11 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|||||||
--no-confirm
|
--no-confirm
|
||||||
Disable any interaction with user (suitable for automated run).
|
Disable any interaction with user (suitable for automated run).
|
||||||
|
|
||||||
|
--use-cxx11
|
||||||
|
Build all libraries in cpp11 'mode' (will be mandatory soon in blender2.8 branch).
|
||||||
|
NOTE: If your compiler is gcc-6.0 or above, you probably *want* to enable this option (since it's default
|
||||||
|
standard starting from this version).
|
||||||
|
|
||||||
--with-all
|
--with-all
|
||||||
By default, a number of optional and not-so-often needed libraries are not installed.
|
By default, a number of optional and not-so-often needed libraries are not installed.
|
||||||
This option will try to install them, at the cost of potential conflicts (depending on
|
This option will try to install them, at the cost of potential conflicts (depending on
|
||||||
@@ -285,7 +290,7 @@ SUDO="sudo"
|
|||||||
|
|
||||||
NO_BUILD=false
|
NO_BUILD=false
|
||||||
NO_CONFIRM=false
|
NO_CONFIRM=false
|
||||||
USE_CXX11=true # Mandatory in blender2.8
|
USE_CXX11=false
|
||||||
|
|
||||||
PYTHON_VERSION="3.6.2"
|
PYTHON_VERSION="3.6.2"
|
||||||
PYTHON_VERSION_MIN="3.6"
|
PYTHON_VERSION_MIN="3.6"
|
||||||
@@ -496,6 +501,9 @@ while true; do
|
|||||||
--no-confirm)
|
--no-confirm)
|
||||||
NO_CONFIRM=true; shift; continue
|
NO_CONFIRM=true; shift; continue
|
||||||
;;
|
;;
|
||||||
|
--use-cxx11)
|
||||||
|
USE_CXX11=true; shift; continue
|
||||||
|
;;
|
||||||
--with-all)
|
--with-all)
|
||||||
WITH_ALL=true; shift; continue
|
WITH_ALL=true; shift; continue
|
||||||
;;
|
;;
|
||||||
@@ -796,7 +804,7 @@ FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
|||||||
|
|
||||||
CXXFLAGS_BACK=$CXXFLAGS
|
CXXFLAGS_BACK=$CXXFLAGS
|
||||||
if [ "$USE_CXX11" = true ]; then
|
if [ "$USE_CXX11" = true ]; then
|
||||||
WARNING "C++11 is now mandatory for blender2.8, this *should* go smoothly with any very recent distribution.
|
WARNING "You are trying to use c++11, this *should* go smoothely with any very recent distribution
|
||||||
However, if you are experiencing linking errors (also when building Blender itself), please try the following:
|
However, if you are experiencing linking errors (also when building Blender itself), please try the following:
|
||||||
* Re-run this script with '--build-all --force-all' options.
|
* Re-run this script with '--build-all --force-all' options.
|
||||||
* Ensure your gcc version is at the very least 4.8, if possible you should really rather use gcc-5.1 or above.
|
* Ensure your gcc version is at the very least 4.8, if possible you should really rather use gcc-5.1 or above.
|
||||||
@@ -2677,10 +2685,10 @@ install_DEB() {
|
|||||||
install_packages_DEB $_packages
|
install_packages_DEB $_packages
|
||||||
|
|
||||||
PRINT""
|
PRINT""
|
||||||
LIBSNDFILE_DEV="libsndfile1-dev"
|
SNDFILE_DEV="libsndfile1-dev"
|
||||||
check_package_DEB $LIBSNDFILE_DEV
|
check_package_DEB $SNDFILE_DEV
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
install_packages_DEB $LIBSNDFILE_DEV
|
install_packages_DEB $SNDFILE_DEV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
@@ -3275,10 +3283,10 @@ install_RPM() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PRINT""
|
PRINT""
|
||||||
LIBSNDFILE_DEV="libsndfile-devel"
|
SNDFILE_DEV="libsndfile-devel"
|
||||||
check_package_RPM $LIBSNDFILE_DEV
|
check_package_RPM $SNDFILE_DEV
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
install_packages_RPM $LIBSNDFILE_DEV
|
install_packages_RPM $SNDFILE_DEV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WITH_ALL" = true ]; then
|
if [ "$WITH_ALL" = true ]; then
|
||||||
@@ -3682,10 +3690,10 @@ install_ARCH() {
|
|||||||
install_packages_ARCH $_packages
|
install_packages_ARCH $_packages
|
||||||
|
|
||||||
PRINT""
|
PRINT""
|
||||||
LIBSNDFILE_DEV="libsndfile"
|
SNDFILE_DEV="libsndfile"
|
||||||
check_package_ARCH $LIBSNDFILE_DEV
|
check_package_ARCH $SNDFILE_DEV
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
install_packages_ARCH $LIBSNDFILE_DEV
|
install_packages_ARCH $SNDFILE_DEV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
|
@@ -13,3 +13,25 @@
|
|||||||
-# pragma message("Unknown compiler version - please run the configure tests and report the results")
|
-# pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||||
-# endif
|
-# endif
|
||||||
-#endif
|
-#endif
|
||||||
|
--- a/boost/type_traits/has_nothrow_assign.hpp 2015-12-13 05:49:42 -0700
|
||||||
|
+++ b/boost/type_traits/has_nothrow_assign.hpp 2018-05-27 11:11:02 -0600
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
#include <boost/type_traits/remove_reference.hpp>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
-#if defined(__GNUC__) || defined(__SUNPRO_CC)
|
||||||
|
+#if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__clang__)
|
||||||
|
#include <boost/type_traits/is_const.hpp>
|
||||||
|
#include <boost/type_traits/is_volatile.hpp>
|
||||||
|
#include <boost/type_traits/is_assignable.hpp>
|
||||||
|
--- a/boost/type_traits/has_nothrow_constructor.hpp 2015-12-13 05:49:42 -0700
|
||||||
|
+++ b/boost/type_traits/has_nothrow_constructor.hpp 2018-05-27 11:11:02 -0600
|
||||||
|
@@ -17,7 +17,7 @@
|
||||||
|
#if defined(BOOST_MSVC) || defined(BOOST_INTEL)
|
||||||
|
#include <boost/type_traits/has_trivial_constructor.hpp>
|
||||||
|
#endif
|
||||||
|
-#if defined(__GNUC__ ) || defined(__SUNPRO_CC)
|
||||||
|
+#if defined(__GNUC__ ) || defined(__SUNPRO_CC) || defined(__clang__)
|
||||||
|
#include <boost/type_traits/is_default_constructible.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
|
|||||||
# Handle new library names for OpenEXR 2.1 build via cmake
|
# Handle new library names for OpenEXR 2.1 build via cmake
|
||||||
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
|
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
|
||||||
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
|
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
|
||||||
|
|
||||||
find_library(${tmp_prefix}_LIBRARY_RELEASE
|
find_library(${tmp_prefix}_LIBRARY_RELEASE
|
||||||
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
|
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
|
||||||
HINTS ${${libpath_var}}
|
HINTS ${${libpath_var}}
|
||||||
@@ -177,7 +177,7 @@ if(ILMBASE_INCLUDE_DIR)
|
|||||||
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
|
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
|
||||||
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
|
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
|
||||||
else()
|
else()
|
||||||
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
||||||
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
||||||
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
|
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -175,7 +175,7 @@ if(OPENEXR_INCLUDE_DIR)
|
|||||||
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
|
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
|
||||||
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
|
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
|
||||||
else()
|
else()
|
||||||
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
|
||||||
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
|
||||||
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
|
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
|
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
|
||||||
# and basename_LIBRARY_RELEASE will be set to the release value. If only
|
# and basename_LIBRARY_RELEASE will be set to the release value. If only
|
||||||
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
|
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
|
||||||
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
|
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
|
||||||
#
|
#
|
||||||
# If the generator supports configuration types, then basename_LIBRARY and
|
# If the generator supports configuration types, then basename_LIBRARY and
|
||||||
# basename_LIBRARIES will be set with debug and optimized flags specifying the
|
# basename_LIBRARIES will be set with debug and optimized flags specifying the
|
||||||
@@ -53,10 +53,10 @@ macro( select_library_configurations basename )
|
|||||||
# if the generator supports configuration types or CMAKE_BUILD_TYPE
|
# if the generator supports configuration types or CMAKE_BUILD_TYPE
|
||||||
# is set, then set optimized and debug options.
|
# is set, then set optimized and debug options.
|
||||||
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||||
set( ${basename}_LIBRARY
|
set( ${basename}_LIBRARY
|
||||||
optimized ${${basename}_LIBRARY_RELEASE}
|
optimized ${${basename}_LIBRARY_RELEASE}
|
||||||
debug ${${basename}_LIBRARY_DEBUG} )
|
debug ${${basename}_LIBRARY_DEBUG} )
|
||||||
set( ${basename}_LIBRARIES
|
set( ${basename}_LIBRARIES
|
||||||
optimized ${${basename}_LIBRARY_RELEASE}
|
optimized ${${basename}_LIBRARY_RELEASE}
|
||||||
debug ${${basename}_LIBRARY_DEBUG} )
|
debug ${${basename}_LIBRARY_DEBUG} )
|
||||||
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||||
@@ -67,16 +67,15 @@ macro( select_library_configurations basename )
|
|||||||
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||||
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
|
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
|
||||||
|
|
||||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
|
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
|
||||||
"The ${basename} library" )
|
"The ${basename} library" )
|
||||||
|
|
||||||
if( ${basename}_LIBRARY )
|
if( ${basename}_LIBRARY )
|
||||||
set( ${basename}_FOUND TRUE )
|
set( ${basename}_FOUND TRUE )
|
||||||
endif( ${basename}_LIBRARY )
|
endif( ${basename}_LIBRARY )
|
||||||
|
|
||||||
mark_as_advanced( ${basename}_LIBRARY
|
mark_as_advanced( ${basename}_LIBRARY
|
||||||
${basename}_LIBRARY_RELEASE
|
${basename}_LIBRARY_RELEASE
|
||||||
${basename}_LIBRARY_DEBUG
|
${basename}_LIBRARY_DEBUG
|
||||||
)
|
)
|
||||||
endmacro( select_library_configurations )
|
endmacro( select_library_configurations )
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@ project(OpenVDB)
|
|||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -88,6 +88,14 @@ elseif(WIN32)
|
|||||||
set(DISABLE_RTTI "/EHs- /GR- ")
|
set(DISABLE_RTTI "/EHs- /GR- ")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
check_cxx_compiler_flag("-flifetime-dse=1" SUPPORTS_FLIFETIME)
|
||||||
|
if (SUPPORTS_FLIFETIME)
|
||||||
|
add_definitions(-flifetime-dse=1)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Linker export definitions
|
# Linker export definitions
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_custom_command(OUTPUT tbb.def
|
add_custom_command(OUTPUT tbb.def
|
||||||
|
13
build_files/build_environment/patches/openal.diff
Normal file
13
build_files/build_environment/patches/openal.diff
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff -Naur external_openal_original/CMakeLists.txt external_openal/CMakeLists.txt
|
||||||
|
--- external_openal_original/CMakeLists.txt 2016-01-24 20:12:39 -0700
|
||||||
|
+++ external_openal/CMakeLists.txt 2018-06-02 12:16:52 -0600
|
||||||
|
@@ -885,7 +885,8 @@
|
||||||
|
OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF)
|
||||||
|
IF(HAVE_WINDOWS_H)
|
||||||
|
# Check MMSystem backend
|
||||||
|
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502)
|
||||||
|
+ set(CMAKE_REQUIRED_FLAGS "-D_WIN32_WINNT=0x0502")
|
||||||
|
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
|
||||||
|
IF(HAVE_MMSYSTEM_H)
|
||||||
|
CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM)
|
||||||
|
IF(HAVE_LIBWINMM)
|
@@ -10,3 +10,29 @@ diff -Naur osl/src/external_osl/src/cmake/flexbison.cmake osl_bak/src/external_o
|
|||||||
MAIN_DEPENDENCY ${flexsrc}
|
MAIN_DEPENDENCY ${flexsrc}
|
||||||
DEPENDS ${${compiler_headers}}
|
DEPENDS ${${compiler_headers}}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||||
|
--- osl/src/external_osl/src/include/OSL/oslconfig.h 2016-10-31 16:48:19 -0600
|
||||||
|
+++ osl/src/external_osl/src/include/OSL/oslconfig.h 2018-05-27 11:18:08 -0600
|
||||||
|
@@ -44,12 +44,18 @@
|
||||||
|
// same if another packages is compiling against OSL and using these headers
|
||||||
|
// (OSL may be C++11 but the client package may be older, or vice versa --
|
||||||
|
// use these two symbols to differentiate these cases, when important).
|
||||||
|
-#if (__cplusplus >= 201402L)
|
||||||
|
-# define OSL_CPLUSPLUS_VERSION 14
|
||||||
|
-#elif (__cplusplus >= 201103L)
|
||||||
|
-# define OSL_CPLUSPLUS_VERSION 11
|
||||||
|
+
|
||||||
|
+// Force C++03 for MSVC in blender since svn the libraries are build with that
|
||||||
|
+#if !defined(_MSC_VER)
|
||||||
|
+ #if (__cplusplus >= 201402L)
|
||||||
|
+ # define OSL_CPLUSPLUS_VERSION 14
|
||||||
|
+ #elif (__cplusplus >= 201103L)
|
||||||
|
+ # define OSL_CPLUSPLUS_VERSION 11
|
||||||
|
+ #else
|
||||||
|
+ # define OSL_CPLUSPLUS_VERSION 3 /* presume C++03 */
|
||||||
|
+ #endif
|
||||||
|
#else
|
||||||
|
-# define OSL_CPLUSPLUS_VERSION 3 /* presume C++03 */
|
||||||
|
+ # define OSL_CPLUSPLUS_VERSION 3 /* presume C++03 */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Symbol export defines
|
||||||
|
@@ -14,10 +14,18 @@ if NOT "%1" == "" (
|
|||||||
set BuildDir=VS14
|
set BuildDir=VS14
|
||||||
goto par2
|
goto par2
|
||||||
)
|
)
|
||||||
|
if "%1" == "2017" (
|
||||||
|
echo "Building for VS2017"
|
||||||
|
set VSVER=15.0
|
||||||
|
set VSVER_SHORT=15
|
||||||
|
set BuildDir=VS15
|
||||||
|
goto par2
|
||||||
|
)
|
||||||
|
|
||||||
)
|
)
|
||||||
:usage
|
:usage
|
||||||
|
|
||||||
Echo Usage build_deps 2013/2015 x64/x86
|
Echo Usage build_deps 2013/2015/2017 x64/x86
|
||||||
goto exit
|
goto exit
|
||||||
:par2
|
:par2
|
||||||
if NOT "%2" == "" (
|
if NOT "%2" == "" (
|
||||||
@@ -31,6 +39,10 @@ if NOT "%2" == "" (
|
|||||||
if "%1" == "2015" (
|
if "%1" == "2015" (
|
||||||
set CMAKE_BUILDER=Visual Studio 14 2015
|
set CMAKE_BUILDER=Visual Studio 14 2015
|
||||||
)
|
)
|
||||||
|
if "%1" == "2017" (
|
||||||
|
set CMAKE_BUILDER=Visual Studio 15 2017
|
||||||
|
)
|
||||||
|
|
||||||
goto start
|
goto start
|
||||||
)
|
)
|
||||||
if "%2" == "x64" (
|
if "%2" == "x64" (
|
||||||
@@ -43,6 +55,10 @@ if NOT "%2" == "" (
|
|||||||
if "%1" == "2015" (
|
if "%1" == "2015" (
|
||||||
set CMAKE_BUILDER=Visual Studio 14 2015 Win64
|
set CMAKE_BUILDER=Visual Studio 14 2015 Win64
|
||||||
)
|
)
|
||||||
|
if "%1" == "2017" (
|
||||||
|
set CMAKE_BUILDER=Visual Studio 15 2017 Win64
|
||||||
|
)
|
||||||
|
|
||||||
goto start
|
goto start
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@@ -74,7 +74,7 @@ set(SNDFILE_LIBRARY "/usr/lib${MULTILIB}/libsndfile.a;/usr/lib${MULTILI
|
|||||||
|
|
||||||
# OpenAL libraries
|
# OpenAL libraries
|
||||||
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)
|
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)
|
||||||
set(OPENAL_INCLUDE_DIR "${OPENAL_ROOT_DIR}/include/AL" CACHE STRING "" FORCE)
|
set(OPENAL_INCLUDE_DIR "${OPENAL_ROOT_DIR}/include" CACHE STRING "" FORCE)
|
||||||
set(OPENAL_LIBRARY
|
set(OPENAL_LIBRARY
|
||||||
${OPENAL_ROOT_DIR}/lib/libopenal.a
|
${OPENAL_ROOT_DIR}/lib/libopenal.a
|
||||||
${OPENAL_ROOT_DIR}/lib/libcommon.a
|
${OPENAL_ROOT_DIR}/lib/libcommon.a
|
||||||
@@ -140,6 +140,10 @@ set(ZLIB_LIBRARY "/usr/lib${MULTILIB}/libz.a" CACHE STRING "" FORCE)
|
|||||||
# OpenVDB
|
# OpenVDB
|
||||||
set(OPENVDB_LIBRARY
|
set(OPENVDB_LIBRARY
|
||||||
/opt/lib/openvdb/lib/libopenvdb.a
|
/opt/lib/openvdb/lib/libopenvdb.a
|
||||||
|
CACHE BOOL "" FORCE
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BLOSC_LIBRARY
|
||||||
/opt/lib/blosc/lib/libblosc.a
|
/opt/lib/blosc/lib/libblosc.a
|
||||||
CACHE BOOL "" FORCE
|
CACHE BOOL "" FORCE
|
||||||
)
|
)
|
||||||
|
@@ -78,7 +78,13 @@ if 'cmake' in builder:
|
|||||||
# cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-hack/nvcc')
|
# cmake_extra_options.append('-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-hack/nvcc')
|
||||||
|
|
||||||
elif builder.startswith('win'):
|
elif builder.startswith('win'):
|
||||||
if builder.endswith('_vc2015'):
|
if builder.endswith('_vs2017'):
|
||||||
|
if builder.startswith('win64'):
|
||||||
|
cmake_options.extend(['-G', 'Visual Studio 15 2017 Win64'])
|
||||||
|
elif builder.startswith('win32'):
|
||||||
|
bits = 32
|
||||||
|
cmake_options.extend(['-G', 'Visual Studio 15 2017'])
|
||||||
|
elif builder.endswith('_vc2015'):
|
||||||
if builder.startswith('win64'):
|
if builder.startswith('win64'):
|
||||||
cmake_options.extend(['-G', 'Visual Studio 14 2015 Win64'])
|
cmake_options.extend(['-G', 'Visual Studio 14 2015 Win64'])
|
||||||
elif builder.startswith('win32'):
|
elif builder.startswith('win32'):
|
||||||
|
@@ -51,7 +51,7 @@ FIND_LIBRARY(ALEMBIC_LIBRARY
|
|||||||
lib64 lib lib/static
|
lib64 lib lib/static
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set ALEMBIC_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set ALEMBIC_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALEMBIC DEFAULT_MSG ALEMBIC_LIBRARY ALEMBIC_INCLUDE_DIR)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALEMBIC DEFAULT_MSG ALEMBIC_LIBRARY ALEMBIC_INCLUDE_DIR)
|
||||||
|
72
build_files/cmake/Modules/FindBlosc.cmake
Normal file
72
build_files/cmake/Modules/FindBlosc.cmake
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
# - Find Blosc library
|
||||||
|
# Find the native Blosc includes and library
|
||||||
|
# This module defines
|
||||||
|
# BLOSC_INCLUDE_DIRS, where to find blosc.h, Set when
|
||||||
|
# Blosc is found.
|
||||||
|
# BLOSC_LIBRARIES, libraries to link against to use Blosc.
|
||||||
|
# BLOSC_ROOT_DIR, The base directory to search for Blosc.
|
||||||
|
# This can also be an environment variable.
|
||||||
|
# BLOSC_FOUND, If false, do not try to use Blosc.
|
||||||
|
#
|
||||||
|
# also defined, but not for general use are
|
||||||
|
# BLOSC_LIBRARY, where to find the Blosc library.
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2018 Blender Foundation.
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
# see accompanying file Copyright.txt for details.
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
# If BLOSC_ROOT_DIR was defined in the environment, use it.
|
||||||
|
IF(NOT BLOSC_ROOT_DIR AND NOT $ENV{BLOSC_ROOT_DIR} STREQUAL "")
|
||||||
|
SET(BLOSC_ROOT_DIR $ENV{BLOSC_ROOT_DIR})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
SET(_blosc_SEARCH_DIRS
|
||||||
|
${BLOSC_ROOT_DIR}
|
||||||
|
/usr/local
|
||||||
|
/sw # Fink
|
||||||
|
/opt/local # DarwinPorts
|
||||||
|
/opt/lib/blosc
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_PATH(BLOSC_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
blosc.h
|
||||||
|
HINTS
|
||||||
|
${_blosc_SEARCH_DIRS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(BLOSC_LIBRARY
|
||||||
|
NAMES
|
||||||
|
blosc
|
||||||
|
HINTS
|
||||||
|
${_blosc_SEARCH_DIRS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib64 lib
|
||||||
|
)
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set BLOSC_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BLOSC DEFAULT_MSG
|
||||||
|
BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
|
||||||
|
|
||||||
|
IF(BLOSC_FOUND)
|
||||||
|
SET(BLOSC_LIBRARIES ${BLOSC_LIBRARY})
|
||||||
|
SET(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIR})
|
||||||
|
ELSE()
|
||||||
|
SET(BLOSC_BLOSC_FOUND FALSE)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(
|
||||||
|
BLOSC_INCLUDE_DIR
|
||||||
|
BLOSC_LIBRARY
|
||||||
|
)
|
@@ -40,7 +40,7 @@ FIND_PATH(EIGEN3_INCLUDE_DIR
|
|||||||
include/eigen3
|
include/eigen3
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set EIGEN3_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set EIGEN3_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen3 DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen3 DEFAULT_MSG
|
||||||
|
@@ -52,7 +52,7 @@ FIND_LIBRARY(FFTW3_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fftw3 DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fftw3 DEFAULT_MSG
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#
|
#
|
||||||
# also defined,
|
# also defined,
|
||||||
# GLEW_LIBRARY, where to find the Glew library.
|
# GLEW_LIBRARY, where to find the Glew library.
|
||||||
|
# GLEW_MX_LIBRARY, where to find the GlewMX library.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2014 Blender Foundation.
|
# Copyright 2014 Blender Foundation.
|
||||||
@@ -49,7 +50,17 @@ FIND_LIBRARY(GLEW_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
|
|
||||||
|
FIND_LIBRARY(GLEW_MX_LIBRARY
|
||||||
|
NAMES
|
||||||
|
GLEWmx
|
||||||
|
HINTS
|
||||||
|
${_glew_SEARCH_DIRS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib64 lib
|
||||||
|
)
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glew DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glew DEFAULT_MSG
|
||||||
@@ -62,6 +73,7 @@ ENDIF(GLEW_FOUND)
|
|||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
GLEW_INCLUDE_DIR
|
GLEW_INCLUDE_DIR
|
||||||
GLEW_LIBRARY
|
GLEW_LIBRARY
|
||||||
|
GLEW_MX_LIBRARY
|
||||||
)
|
)
|
||||||
|
|
||||||
UNSET(_glew_SEARCH_DIRS)
|
UNSET(_glew_SEARCH_DIRS)
|
||||||
|
@@ -115,7 +115,7 @@ if(Boost_USE_STATIC_LIBS)
|
|||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_icu_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_icu_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set ICU_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set ICU_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Icu DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Icu DEFAULT_MSG
|
||||||
|
@@ -52,7 +52,7 @@ FIND_LIBRARY(JACK_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jack DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jack DEFAULT_MSG
|
||||||
|
@@ -53,7 +53,7 @@ FIND_LIBRARY(JEMALLOC_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JeMalloc DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JeMalloc DEFAULT_MSG
|
||||||
|
@@ -93,4 +93,3 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LLVM DEFAULT_MSG
|
|||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
LLVM_LIBRARY
|
LLVM_LIBRARY
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ FIND_LIBRARY(LZO_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# - Find OpenCOLLADA library
|
# - Find OpenCOLLADA library
|
||||||
# Find the native OpenCOLLADA includes and library
|
# Find the native OpenCOLLADA includes and library
|
||||||
# This module defines
|
# This module defines
|
||||||
# OPENCOLLADA_INCLUDE_DIRS, where to find COLLADABaseUtils/ and
|
# OPENCOLLADA_INCLUDE_DIRS, where to find COLLADABaseUtils/ and
|
||||||
# COLLADAFramework/, Set when OPENCOLLADA_INCLUDE_DIR is found.
|
# COLLADAFramework/, Set when OPENCOLLADA_INCLUDE_DIR is found.
|
||||||
# OPENCOLLADA_LIBRARIES, libraries to link against to use OpenCOLLADA.
|
# OPENCOLLADA_LIBRARIES, libraries to link against to use OpenCOLLADA.
|
||||||
# OPENCOLLADA_ROOT_DIR, The base directory to search for OpenCOLLADA.
|
# OPENCOLLADA_ROOT_DIR, The base directory to search for OpenCOLLADA.
|
||||||
@@ -129,7 +129,7 @@ FOREACH(COMPONENT ${_opencollada_FIND_STATIC_COMPONENTS})
|
|||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set OPENCOLLADA_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set OPENCOLLADA_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCOLLADA DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCOLLADA DEFAULT_MSG
|
||||||
|
@@ -68,7 +68,7 @@ FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
|
|||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenColorIO DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenColorIO DEFAULT_MSG
|
||||||
|
@@ -106,7 +106,7 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
|||||||
|
|
||||||
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
|
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
|
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
|
||||||
HINTS
|
HINTS
|
||||||
${_openexr_SEARCH_DIRS}
|
${_openexr_SEARCH_DIRS}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
@@ -117,7 +117,7 @@ ENDFOREACH()
|
|||||||
|
|
||||||
UNSET(_openexr_libs_ver)
|
UNSET(_openexr_libs_ver)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
||||||
|
@@ -64,7 +64,7 @@ FIND_FILE(OPENIMAGEIO_IDIFF
|
|||||||
bin
|
bin
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
|
||||||
|
@@ -53,7 +53,7 @@ FIND_LIBRARY(OPENJPEG_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set OPENJPEG_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set OPENJPEG_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG DEFAULT_MSG
|
||||||
|
@@ -50,7 +50,7 @@ FIND_LIBRARY(PCRE_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
|
||||||
|
@@ -53,7 +53,7 @@ FIND_LIBRARY(PUGIXML_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PUGIXML DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PUGIXML DEFAULT_MSG
|
||||||
|
@@ -175,7 +175,7 @@ UNSET(_IS_INC_CONF_DEF)
|
|||||||
UNSET(_IS_LIB_DEF)
|
UNSET(_IS_LIB_DEF)
|
||||||
UNSET(_IS_LIB_PATH_DEF)
|
UNSET(_IS_LIB_PATH_DEF)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF
|
# handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix DEFAULT_MSG
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
# - Find SndFile library
|
# - Find SndFile library
|
||||||
# Find the native SndFile includes and library
|
# Find the native SndFile includes and library
|
||||||
# This module defines
|
# This module defines
|
||||||
# LIBSNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
|
# SNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
|
||||||
# LIBSNDFILE_INCLUDE_DIR is found.
|
# SNDFILE_INCLUDE_DIR is found.
|
||||||
# LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
# SNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
||||||
# LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
# SNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
||||||
# This can also be an environment variable.
|
# This can also be an environment variable.
|
||||||
# LIBSNDFILE_FOUND, If false, do not try to use SndFile.
|
# SNDFILE_FOUND, If false, do not try to use SndFile.
|
||||||
#
|
#
|
||||||
# also defined, but not for general use are
|
# also defined, but not for general use are
|
||||||
# LIBSNDFILE_LIBRARY, where to find the SndFile library.
|
# SNDFILE_LIBRARY, where to find the SndFile library.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2011 Blender Foundation.
|
# Copyright 2011 Blender Foundation.
|
||||||
@@ -22,26 +22,26 @@
|
|||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
# If LIBSNDFILE_ROOT_DIR was defined in the environment, use it.
|
# If SNDFILE_ROOT_DIR was defined in the environment, use it.
|
||||||
IF(NOT LIBSNDFILE_ROOT_DIR AND NOT $ENV{LIBSNDFILE_ROOT_DIR} STREQUAL "")
|
IF(NOT SNDFILE_ROOT_DIR AND NOT $ENV{SNDFILE_ROOT_DIR} STREQUAL "")
|
||||||
SET(LIBSNDFILE_ROOT_DIR $ENV{LIBSNDFILE_ROOT_DIR})
|
SET(SNDFILE_ROOT_DIR $ENV{SNDFILE_ROOT_DIR})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(_sndfile_SEARCH_DIRS
|
SET(_sndfile_SEARCH_DIRS
|
||||||
${LIBSNDFILE_ROOT_DIR}
|
${SNDFILE_ROOT_DIR}
|
||||||
/usr/local
|
/usr/local
|
||||||
/sw # Fink
|
/sw # Fink
|
||||||
/opt/local # DarwinPorts
|
/opt/local # DarwinPorts
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h
|
FIND_PATH(SNDFILE_INCLUDE_DIR sndfile.h
|
||||||
HINTS
|
HINTS
|
||||||
${_sndfile_SEARCH_DIRS}
|
${_sndfile_SEARCH_DIRS}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
include
|
include
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(LIBSNDFILE_LIBRARY
|
FIND_LIBRARY(SNDFILE_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
sndfile
|
sndfile
|
||||||
HINTS
|
HINTS
|
||||||
@@ -50,18 +50,18 @@ FIND_LIBRARY(LIBSNDFILE_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set LIBSNDFILE_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
|
||||||
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(LIBSNDFILE_FOUND)
|
IF(SNDFILE_FOUND)
|
||||||
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
|
SET(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
|
||||||
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
|
SET(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
|
||||||
ENDIF(LIBSNDFILE_FOUND)
|
ENDIF(SNDFILE_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
LIBSNDFILE_INCLUDE_DIR
|
SNDFILE_INCLUDE_DIR
|
||||||
LIBSNDFILE_LIBRARY
|
SNDFILE_LIBRARY
|
||||||
)
|
)
|
||||||
|
@@ -52,7 +52,7 @@ FIND_LIBRARY(SPACENAV_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set SPACENAV_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set SPACENAV_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Spacenav DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Spacenav DEFAULT_MSG
|
||||||
|
@@ -50,7 +50,7 @@ FIND_LIBRARY(XML2_LIBRARY
|
|||||||
lib64 lib
|
lib64 lib
|
||||||
)
|
)
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set XML2_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set XML2_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XML2 DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XML2 DEFAULT_MSG
|
||||||
|
@@ -13,7 +13,7 @@ if(NOT DEFINED RPMBUILD)
|
|||||||
|
|
||||||
if(RPMBUILD)
|
if(RPMBUILD)
|
||||||
message(STATUS "RPM Build Found: ${RPMBUILD}")
|
message(STATUS "RPM Build Found: ${RPMBUILD}")
|
||||||
else()
|
else()
|
||||||
message(STATUS "RPM Build Not Found (rpmbuild). RPM generation will not be available")
|
message(STATUS "RPM Build Not Found (rpmbuild). RPM generation will not be available")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -21,6 +21,6 @@ endif()
|
|||||||
|
|
||||||
if(RPMBUILD)
|
if(RPMBUILD)
|
||||||
set(RPMBUILD_FOUND TRUE)
|
set(RPMBUILD_FOUND TRUE)
|
||||||
else()
|
else()
|
||||||
set(RPMBUILD_FOUND FALSE)
|
set(RPMBUILD_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
# cmake -C../blender/build_files/cmake/config/blender_headless.cmake ../blender
|
# cmake -C../blender/build_files/cmake/config/blender_headless.cmake ../blender
|
||||||
#
|
#
|
||||||
|
|
||||||
set(WITH_HEADLESS ON CACHE BOOL "" FORCE)
|
set(WITH_HEADLESS ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
# disable audio, its possible some devs may want this but for now disable
|
# disable audio, its possible some devs may want this but for now disable
|
||||||
|
@@ -51,7 +51,7 @@ endmacro()
|
|||||||
function(list_assert_duplicates
|
function(list_assert_duplicates
|
||||||
list_id
|
list_id
|
||||||
)
|
)
|
||||||
|
|
||||||
# message(STATUS "list data: ${list_id}")
|
# message(STATUS "list data: ${list_id}")
|
||||||
|
|
||||||
list(LENGTH list_id _len_before)
|
list(LENGTH list_id _len_before)
|
||||||
@@ -242,7 +242,7 @@ function(blender_add_lib__impl
|
|||||||
# listed is helpful for IDE's (QtCreator/MSVC)
|
# listed is helpful for IDE's (QtCreator/MSVC)
|
||||||
blender_source_group("${sources}")
|
blender_source_group("${sources}")
|
||||||
|
|
||||||
#if enabled, set the FOLDER property for visual studio projects
|
#if enabled, set the FOLDER property for visual studio projects
|
||||||
if(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
|
if(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
|
||||||
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||||
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
|
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
|
||||||
@@ -326,7 +326,7 @@ function(SETUP_LIBDIRS)
|
|||||||
link_directories(${JACK_LIBPATH})
|
link_directories(${JACK_LIBPATH})
|
||||||
endif()
|
endif()
|
||||||
if(WITH_CODEC_SNDFILE)
|
if(WITH_CODEC_SNDFILE)
|
||||||
link_directories(${LIBSNDFILE_LIBPATH})
|
link_directories(${SNDFILE_LIBPATH})
|
||||||
endif()
|
endif()
|
||||||
if(WITH_FFTW3)
|
if(WITH_FFTW3)
|
||||||
link_directories(${FFTW3_LIBPATH})
|
link_directories(${FFTW3_LIBPATH})
|
||||||
@@ -352,6 +352,11 @@ function(SETUP_LIBDIRS)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
macro(setup_platform_linker_flags)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||||
|
endmacro()
|
||||||
|
|
||||||
function(setup_liblinks
|
function(setup_liblinks
|
||||||
target
|
target
|
||||||
)
|
)
|
||||||
@@ -407,7 +412,7 @@ function(setup_liblinks
|
|||||||
target_link_libraries(${target} ${JACK_LIBRARIES})
|
target_link_libraries(${target} ${JACK_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if(WITH_CODEC_SNDFILE)
|
if(WITH_CODEC_SNDFILE)
|
||||||
target_link_libraries(${target} ${LIBSNDFILE_LIBRARIES})
|
target_link_libraries(${target} ${SNDFILE_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
||||||
target_link_libraries(${target} ${SDL_LIBRARY})
|
target_link_libraries(${target} ${SDL_LIBRARY})
|
||||||
@@ -425,7 +430,7 @@ function(setup_liblinks
|
|||||||
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
|
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if(WITH_OPENVDB)
|
if(WITH_OPENVDB)
|
||||||
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES})
|
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
if(WITH_CYCLES_OSL)
|
if(WITH_CYCLES_OSL)
|
||||||
target_link_libraries(${target} ${OSL_LIBRARIES})
|
target_link_libraries(${target} ${OSL_LIBRARIES})
|
||||||
@@ -555,12 +560,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
|
|
||||||
list(APPEND BLENDER_LINK_LIBS
|
|
||||||
audaspace
|
|
||||||
audaspace-py)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Sort libraries
|
# Sort libraries
|
||||||
set(BLENDER_SORTED_LIBS
|
set(BLENDER_SORTED_LIBS
|
||||||
bf_windowmanager
|
bf_windowmanager
|
||||||
@@ -593,7 +592,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
|||||||
bf_editor_curve
|
bf_editor_curve
|
||||||
bf_editor_gpencil
|
bf_editor_gpencil
|
||||||
bf_editor_interface
|
bf_editor_interface
|
||||||
bf_editor_manipulator_library
|
|
||||||
bf_editor_mesh
|
bf_editor_mesh
|
||||||
bf_editor_metaball
|
bf_editor_metaball
|
||||||
bf_editor_object
|
bf_editor_object
|
||||||
@@ -601,7 +599,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
|||||||
bf_editor_armature
|
bf_editor_armature
|
||||||
bf_editor_physics
|
bf_editor_physics
|
||||||
bf_editor_render
|
bf_editor_render
|
||||||
bf_editor_scene
|
|
||||||
bf_editor_screen
|
bf_editor_screen
|
||||||
bf_editor_sculpt_paint
|
bf_editor_sculpt_paint
|
||||||
bf_editor_sound
|
bf_editor_sound
|
||||||
@@ -614,7 +611,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
|||||||
bf_python
|
bf_python
|
||||||
bf_python_ext
|
bf_python_ext
|
||||||
bf_python_mathutils
|
bf_python_mathutils
|
||||||
bf_python_gawain
|
|
||||||
bf_python_bmesh
|
bf_python_bmesh
|
||||||
bf_freestyle
|
bf_freestyle
|
||||||
bf_ikplugin
|
bf_ikplugin
|
||||||
@@ -622,14 +618,11 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
|||||||
bf_alembic
|
bf_alembic
|
||||||
bf_bmesh
|
bf_bmesh
|
||||||
bf_gpu
|
bf_gpu
|
||||||
bf_draw
|
|
||||||
bf_blenloader
|
bf_blenloader
|
||||||
bf_blenkernel
|
bf_blenkernel
|
||||||
bf_physics
|
bf_physics
|
||||||
bf_nodes
|
bf_nodes
|
||||||
bf_rna
|
bf_rna
|
||||||
bf_editor_manipulator_library # rna -> manipulator bad-level calls
|
|
||||||
bf_python
|
|
||||||
bf_imbuf
|
bf_imbuf
|
||||||
bf_blenlib
|
bf_blenlib
|
||||||
bf_depsgraph
|
bf_depsgraph
|
||||||
@@ -670,8 +663,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
|||||||
bf_blenfont
|
bf_blenfont
|
||||||
bf_blentranslation
|
bf_blentranslation
|
||||||
bf_intern_audaspace
|
bf_intern_audaspace
|
||||||
audaspace
|
|
||||||
audaspace-py
|
|
||||||
bf_intern_mikktspace
|
bf_intern_mikktspace
|
||||||
bf_intern_dualcon
|
bf_intern_dualcon
|
||||||
bf_intern_cycles
|
bf_intern_cycles
|
||||||
@@ -683,7 +674,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
|||||||
cycles_util
|
cycles_util
|
||||||
cycles_subd
|
cycles_subd
|
||||||
bf_intern_opencolorio
|
bf_intern_opencolorio
|
||||||
bf_intern_gawain
|
|
||||||
bf_intern_eigen
|
bf_intern_eigen
|
||||||
extern_rangetree
|
extern_rangetree
|
||||||
extern_wcwidth
|
extern_wcwidth
|
||||||
@@ -1051,13 +1041,19 @@ macro(remove_cc_flag
|
|||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(add_cc_flag
|
macro(add_c_flag
|
||||||
flag)
|
flag)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(add_cxx_flag
|
||||||
|
flag)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
|
||||||
|
endmacro()
|
||||||
|
|
||||||
macro(remove_strict_flags)
|
macro(remove_strict_flags)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
@@ -1080,7 +1076,8 @@ macro(remove_strict_flags)
|
|||||||
)
|
)
|
||||||
|
|
||||||
# negate flags implied by '-Wall'
|
# negate flags implied by '-Wall'
|
||||||
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
|
add_c_flag("${C_REMOVE_STRICT_FLAGS}")
|
||||||
|
add_cxx_flag("${CXX_REMOVE_STRICT_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
@@ -1092,7 +1089,8 @@ macro(remove_strict_flags)
|
|||||||
)
|
)
|
||||||
|
|
||||||
# negate flags implied by '-Wall'
|
# negate flags implied by '-Wall'
|
||||||
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
|
add_c_flag("${C_REMOVE_STRICT_FLAGS}")
|
||||||
|
add_cxx_flag("${CXX_REMOVE_STRICT_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
@@ -1122,28 +1120,39 @@ endmacro()
|
|||||||
# note, we can only append flags on a single file so we need to negate the options.
|
# note, we can only append flags on a single file so we need to negate the options.
|
||||||
# at the moment we cant shut up ffmpeg deprecations, so use this, but will
|
# at the moment we cant shut up ffmpeg deprecations, so use this, but will
|
||||||
# probably add more removals here.
|
# probably add more removals here.
|
||||||
macro(remove_strict_flags_file
|
macro(remove_strict_c_flags_file
|
||||||
filenames)
|
filenames)
|
||||||
|
|
||||||
foreach(_SOURCE ${ARGV})
|
foreach(_SOURCE ${ARGV})
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC OR
|
if(CMAKE_COMPILER_IS_GNUCC OR
|
||||||
(CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
(CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
||||||
|
|
||||||
set_source_files_properties(${_SOURCE}
|
set_source_files_properties(${_SOURCE}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
COMPILE_FLAGS "${CC_REMOVE_STRICT_FLAGS}"
|
COMPILE_FLAGS "${C_REMOVE_STRICT_FLAGS}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# TODO
|
# TODO
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
unset(_SOURCE)
|
unset(_SOURCE)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(remove_strict_cxx_flags_file
|
||||||
|
filenames)
|
||||||
|
remove_strict_c_flags_file(${filenames} ${ARHV})
|
||||||
|
foreach(_SOURCE ${ARGV})
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||||
|
set_source_files_properties(${_SOURCE}
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_FLAGS "${CXX_REMOVE_STRICT_FLAGS}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(MSVC)
|
||||||
|
# TODO
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
unset(_SOURCE)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# External libs may need 'signed char' to be default.
|
# External libs may need 'signed char' to be default.
|
||||||
@@ -1525,7 +1534,6 @@ function(find_python_package
|
|||||||
NAMES
|
NAMES
|
||||||
${package}
|
${package}
|
||||||
HINTS
|
HINTS
|
||||||
"${PYTHON_LIBPATH}/"
|
|
||||||
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
|
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
|
||||||
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
|
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
|
@@ -23,8 +23,6 @@
|
|||||||
|
|
||||||
# Libraries configuration for Apple.
|
# Libraries configuration for Apple.
|
||||||
|
|
||||||
set(MACOSX_DEPLOYMENT_TARGET "10.9")
|
|
||||||
|
|
||||||
macro(find_package_wrapper)
|
macro(find_package_wrapper)
|
||||||
# do nothing, just satisfy the macro
|
# do nothing, just satisfy the macro
|
||||||
endmacro()
|
endmacro()
|
||||||
@@ -45,7 +43,7 @@ if(WITH_OPENAL)
|
|||||||
find_package(OpenAL)
|
find_package(OpenAL)
|
||||||
if(OPENAL_FOUND)
|
if(OPENAL_FOUND)
|
||||||
set(WITH_OPENAL ON)
|
set(WITH_OPENAL ON)
|
||||||
set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include/AL")
|
set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include")
|
||||||
else()
|
else()
|
||||||
set(WITH_OPENAL OFF)
|
set(WITH_OPENAL OFF)
|
||||||
endif()
|
endif()
|
||||||
@@ -81,10 +79,10 @@ if(WITH_JACK)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_CODEC_SNDFILE)
|
if(WITH_CODEC_SNDFILE)
|
||||||
set(LIBSNDFILE ${LIBDIR}/sndfile)
|
set(SNDFILE ${LIBDIR}/sndfile)
|
||||||
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
|
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||||
set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
set(SNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
||||||
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
set(SNDFILE_LIBPATH ${SNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_PYTHON)
|
if(WITH_PYTHON)
|
||||||
@@ -358,7 +356,7 @@ if(WITH_LLVM)
|
|||||||
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
|
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
|
||||||
OUTPUT_VARIABLE LLVM_LIBRARY
|
OUTPUT_VARIABLE LLVM_LIBRARY
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
string(REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
|
string(REPLACE ".a /" ".a;/" LLVM_LIBRARY ${LLVM_LIBRARY})
|
||||||
else()
|
else()
|
||||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
|
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
|
||||||
endif()
|
endif()
|
||||||
@@ -418,7 +416,7 @@ if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
|
|||||||
endif()
|
endif()
|
||||||
# Get rid of eventually clashes, we export some symbols explicite as local
|
# Get rid of eventually clashes, we export some symbols explicite as local
|
||||||
set(PLATFORM_LINKFLAGS
|
set(PLATFORM_LINKFLAGS
|
||||||
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map"
|
"${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker '${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
|
@@ -51,9 +51,9 @@ string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate
|
|||||||
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||||
|
|
||||||
# earlier xcode has no bundled developer dir, no sense in getting xcode path from
|
# earlier xcode has no bundled developer dir, no sense in getting xcode path from
|
||||||
if(${XCODE_VERSION} VERSION_GREATER 4.2)
|
if(${XCODE_VERSION} VERSION_GREATER 4.2)
|
||||||
# reduce to XCode name without dp extension
|
# reduce to XCode name without dp extension
|
||||||
string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME)
|
string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME)
|
||||||
if(${DP_NAME} MATCHES Xcode5)
|
if(${DP_NAME} MATCHES Xcode5)
|
||||||
set(XCODE_VERSION 5)
|
set(XCODE_VERSION 5)
|
||||||
endif()
|
endif()
|
||||||
@@ -64,7 +64,7 @@ if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
|||||||
message(FATAL_ERROR "Xcode 4.3 and higher must be used with cmake 2.8-8 or higher")
|
message(FATAL_ERROR "Xcode 4.3 and higher must be used with cmake 2.8-8 or higher")
|
||||||
endif()
|
endif()
|
||||||
### end cmake incompatibility with xcode 4.3 and higher ###
|
### end cmake incompatibility with xcode 4.3 and higher ###
|
||||||
|
|
||||||
if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3)
|
if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3)
|
||||||
# Xcode 4 defaults to the Apple LLVM Compiler.
|
# Xcode 4 defaults to the Apple LLVM Compiler.
|
||||||
# Override the default compiler selection because Blender only compiles with gcc up to xcode 4.2
|
# Override the default compiler selection because Blender only compiles with gcc up to xcode 4.2
|
||||||
@@ -85,7 +85,7 @@ if(${XCODE_VERSION} VERSION_LESS 4.3)
|
|||||||
else()
|
else()
|
||||||
# note: xcode-select path could be ambigous,
|
# note: xcode-select path could be ambigous,
|
||||||
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
|
# cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
|
||||||
# so i use a selfcomposed bundlepath here
|
# so i use a selfcomposed bundlepath here
|
||||||
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
|
set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
|
||||||
message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
|
message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
|
||||||
set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
|
set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
|
||||||
|
@@ -148,7 +148,7 @@ endif()
|
|||||||
# Codecs
|
# Codecs
|
||||||
if(WITH_CODEC_SNDFILE)
|
if(WITH_CODEC_SNDFILE)
|
||||||
find_package_wrapper(SndFile)
|
find_package_wrapper(SndFile)
|
||||||
if(NOT LIBSNDFILE_FOUND)
|
if(NOT SNDFILE_FOUND)
|
||||||
set(WITH_CODEC_SNDFILE OFF)
|
set(WITH_CODEC_SNDFILE OFF)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -237,10 +237,14 @@ endif()
|
|||||||
if(WITH_OPENVDB)
|
if(WITH_OPENVDB)
|
||||||
find_package_wrapper(OpenVDB)
|
find_package_wrapper(OpenVDB)
|
||||||
find_package_wrapper(TBB)
|
find_package_wrapper(TBB)
|
||||||
|
find_package_wrapper(Blosc)
|
||||||
if(NOT OPENVDB_FOUND OR NOT TBB_FOUND)
|
if(NOT OPENVDB_FOUND OR NOT TBB_FOUND)
|
||||||
set(WITH_OPENVDB OFF)
|
set(WITH_OPENVDB OFF)
|
||||||
set(WITH_OPENVDB_BLOSC OFF)
|
set(WITH_OPENVDB_BLOSC OFF)
|
||||||
message(STATUS "OpenVDB not found, disabling it")
|
message(STATUS "OpenVDB not found, disabling it")
|
||||||
|
elseif(NOT BLOSC_FOUND)
|
||||||
|
set(WITH_OPENVDB_BLOSC OFF)
|
||||||
|
message(STATUS "Blosc not found, disabling it")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -29,7 +29,16 @@ if(NOT MSVC)
|
|||||||
message(FATAL_ERROR "Compiler is unsupported")
|
message(FATAL_ERROR "Compiler is unsupported")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Libraries configuration for Windows when compiling with MSVC.
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(MSVC_CLANG On)
|
||||||
|
set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables")
|
||||||
|
set(MSVC_REDIST_DIR ${VC_TOOLS_DIR})
|
||||||
|
if (DEFINED MSVC_REDIST_DIR)
|
||||||
|
file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR)
|
||||||
|
else()
|
||||||
|
message("Unable to detect the Visual Studio redist directory, copying of the runtime dlls will not work, try running from the visual studio developer prompt.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_FOLDERS})
|
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_FOLDERS})
|
||||||
|
|
||||||
@@ -119,8 +128,18 @@ set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
|
|||||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
|
||||||
include(InstallRequiredSystemLibraries)
|
include(InstallRequiredSystemLibraries)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
|
remove_cc_flag("/MDd" "/MD")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
|
|
||||||
|
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
|
||||||
|
if(NOT WITH_CXX11) # C++11 is on by default in clang-cl and can't be turned off, if c++11 is not enabled in blender repress some c++11 related warnings.
|
||||||
|
set(CXX_WARN_FLAGS "-Wno-inconsistent-missing-override")
|
||||||
|
endif()
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||||
@@ -131,7 +150,7 @@ set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
|
|||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
|
||||||
|
|
||||||
set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
|
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
|
||||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib ")
|
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib ")
|
||||||
|
|
||||||
# Ignore meaningless for us linker warnings.
|
# Ignore meaningless for us linker warnings.
|
||||||
@@ -144,7 +163,7 @@ else()
|
|||||||
set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
|
set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
|
set(PLATFORM_LINKFLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG} /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
|
||||||
|
|
||||||
if(NOT DEFINED LIBDIR)
|
if(NOT DEFINED LIBDIR)
|
||||||
|
|
||||||
@@ -406,7 +425,7 @@ if(WITH_OPENIMAGEIO)
|
|||||||
set(OIIO_OPTIMIZED optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO.lib optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util.lib)
|
set(OIIO_OPTIMIZED optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO.lib optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util.lib)
|
||||||
set(OIIO_DEBUG debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_d.lib debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util_d.lib)
|
set(OIIO_DEBUG debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_d.lib debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util_d.lib)
|
||||||
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
|
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
|
||||||
|
|
||||||
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
|
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
|
||||||
set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
|
set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
|
||||||
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
||||||
@@ -455,7 +474,7 @@ if(WITH_OPENVDB)
|
|||||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include ${TBB_INCLUDE_DIR})
|
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include ${TBB_INCLUDE_DIR})
|
||||||
set(OPENVDB_LIBRARIES optimized ${OPENVDB_LIBPATH}/openvdb.lib debug ${OPENVDB_LIBPATH}/openvdb_d.lib ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
set(OPENVDB_LIBRARIES optimized ${OPENVDB_LIBPATH}/openvdb.lib debug ${OPENVDB_LIBPATH}/openvdb_d.lib ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_ALEMBIC)
|
if(WITH_ALEMBIC)
|
||||||
@@ -532,7 +551,7 @@ set(WINTAB_INC ${LIBDIR}/wintab/include)
|
|||||||
if(WITH_OPENAL)
|
if(WITH_OPENAL)
|
||||||
set(OPENAL ${LIBDIR}/openal)
|
set(OPENAL ${LIBDIR}/openal)
|
||||||
set(OPENALDIR ${LIBDIR}/openal)
|
set(OPENALDIR ${LIBDIR}/openal)
|
||||||
set(OPENAL_INCLUDE_DIR ${OPENAL}/include/AL)
|
set(OPENAL_INCLUDE_DIR ${OPENAL}/include)
|
||||||
set(OPENAL_LIBPATH ${OPENAL}/lib)
|
set(OPENAL_LIBPATH ${OPENAL}/lib)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(OPENAL_LIBRARY ${OPENAL_LIBPATH}/openal32.lib)
|
set(OPENAL_LIBRARY ${OPENAL_LIBPATH}/openal32.lib)
|
||||||
@@ -543,10 +562,11 @@ if(WITH_OPENAL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_CODEC_SNDFILE)
|
if(WITH_CODEC_SNDFILE)
|
||||||
set(LIBSNDFILE ${LIBDIR}/sndfile)
|
set(SNDFILE ${LIBDIR}/sndfile)
|
||||||
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
|
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||||
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib) # TODO, deprecate
|
set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
|
||||||
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBPATH}/libsndfile-1.lib)
|
set(SNDFILE_LIBRARIES ${SNDFILE_LIBPATH}/libsndfile-1.lib)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
|
if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
|
||||||
|
14
build_files/windows/autodetect_msvc.cmd
Normal file
14
build_files/windows/autodetect_msvc.cmd
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
echo No explicit msvc version requested, autodetecting version.
|
||||||
|
|
||||||
|
call "%~dp0\detect_msvc2017.cmd"
|
||||||
|
if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
||||||
|
|
||||||
|
call "%~dp0\detect_msvc2015.cmd"
|
||||||
|
if %ERRORLEVEL% EQU 0 goto DetectionComplete
|
||||||
|
|
||||||
|
echo Compiler Detection failed. Use verbose switch for more information.
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:DetectionComplete
|
||||||
|
echo Compiler Detection successfull, detected VS%BUILD_VS_YEAR%
|
||||||
|
exit /b 0
|
26
build_files/windows/build_msbuild.cmd
Normal file
26
build_files/windows/build_msbuild.cmd
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
if "%NOBUILD%"=="1" goto EOF
|
||||||
|
echo %TIME% > %BUILD_DIR%\buildtime.txt
|
||||||
|
msbuild ^
|
||||||
|
%BUILD_DIR%\Blender.sln ^
|
||||||
|
/target:build ^
|
||||||
|
/property:Configuration=%BUILD_TYPE% ^
|
||||||
|
/maxcpucount:2 ^
|
||||||
|
/verbosity:minimal ^
|
||||||
|
/p:platform=%MSBUILD_PLATFORM% ^
|
||||||
|
/flp:Summary;Verbosity=minimal;LogFile=%BUILD_DIR%\Build.log
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo Error during build, see %BUILD_DIR%\Build.log for details
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
msbuild ^
|
||||||
|
%BUILD_DIR%\INSTALL.vcxproj ^
|
||||||
|
/property:Configuration=%BUILD_TYPE% ^
|
||||||
|
/verbosity:minimal ^
|
||||||
|
/p:platform=%MSBUILD_PLATFORM%
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo Error during install phase
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo %TIME% >> %BUILD_DIR%\buildtime.txt
|
||||||
|
:EOF
|
16
build_files/windows/build_ninja.cmd
Normal file
16
build_files/windows/build_ninja.cmd
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
if "%NOBUILD%"=="1" goto EOF
|
||||||
|
set HAS_ERROR=
|
||||||
|
cd %BUILD_DIR%
|
||||||
|
echo %TIME% > buildtime.txt
|
||||||
|
ninja install
|
||||||
|
if errorlevel 1 (
|
||||||
|
set HAS_ERROR=1
|
||||||
|
)
|
||||||
|
echo %TIME% >>buildtime.txt
|
||||||
|
cd %BLENDER_DIR%
|
||||||
|
|
||||||
|
if "%HAS_ERROR%" == "1" (
|
||||||
|
echo Error during build
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
:EOF
|
53
build_files/windows/check_libraries.cmd
Normal file
53
build_files/windows/check_libraries.cmd
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
if "%BUILD_VS_YEAR%"=="2015" set BUILD_VS_LIBDIRPOST=vc14
|
||||||
|
if "%BUILD_VS_YEAR%"=="2017" set BUILD_VS_LIBDIRPOST=vc14
|
||||||
|
|
||||||
|
if "%BUILD_ARCH%"=="x64" (
|
||||||
|
set BUILD_VS_SVNDIR=win64_%BUILD_VS_LIBDIRPOST%
|
||||||
|
) else if "%BUILD_ARCH%"=="x86" (
|
||||||
|
set BUILD_VS_SVNDIR=windows_%BUILD_VS_LIBDIRPOST%
|
||||||
|
)
|
||||||
|
set BUILD_VS_LIBDIR="%BLENDER_DIR%..\lib\%BUILD_VS_SVNDIR%"
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Library Directory = "%BUILD_VS_LIBDIR%"
|
||||||
|
)
|
||||||
|
if NOT EXIST %BUILD_VS_LIBDIR% (
|
||||||
|
rem libs not found, but svn is on the system
|
||||||
|
echo
|
||||||
|
if not "%SVN%"=="" (
|
||||||
|
echo.
|
||||||
|
echo The required external libraries in %BUILD_VS_LIBDIR% are missing
|
||||||
|
echo.
|
||||||
|
set /p GetLibs= "Would you like to download them? (y/n)"
|
||||||
|
if /I "!GetLibs!"=="Y" (
|
||||||
|
echo.
|
||||||
|
echo Downloading %BUILD_VS_SVNDIR% libraries, please wait.
|
||||||
|
echo.
|
||||||
|
:RETRY
|
||||||
|
"%SVN%" checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/%BUILD_VS_SVNDIR% %BUILD_VS_LIBDIR%
|
||||||
|
if errorlevel 1 (
|
||||||
|
set /p LibRetry= "Error during donwload, retry? y/n"
|
||||||
|
if /I "!LibRetry!"=="Y" (
|
||||||
|
cd %BUILD_VS_LIBDIR%
|
||||||
|
"%SVN%" cleanup
|
||||||
|
cd %BLENDER_DIR%
|
||||||
|
goto RETRY
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Error: Download of external libraries failed.
|
||||||
|
echo This is needed for building, please manually run 'svn cleanup' and 'svn update' in
|
||||||
|
echo %BUILD_VS_LIBDIR% , until this is resolved you CANNOT make a successfull blender build
|
||||||
|
echo.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT EXIST %BUILD_VS_LIBDIR% (
|
||||||
|
echo.
|
||||||
|
echo Error: Required libraries not found at "%BUILD_VS_LIBDIR%"
|
||||||
|
echo This is needed for building, aborting!
|
||||||
|
echo.
|
||||||
|
exit /b 1
|
||||||
|
)
|
6
build_files/windows/check_spaces_in_path.cmd
Normal file
6
build_files/windows/check_spaces_in_path.cmd
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
set BLENDER_DIR_NOSPACES=%BLENDER_DIR: =%
|
||||||
|
|
||||||
|
if not "%BLENDER_DIR%"=="%BLENDER_DIR_NOSPACES%" (
|
||||||
|
echo There are spaces detected in the build path "%BLENDER_DIR%", this is currently not supported, exiting....
|
||||||
|
exit /b 1
|
||||||
|
)
|
20
build_files/windows/check_submodules.cmd
Normal file
20
build_files/windows/check_submodules.cmd
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
if NOT exist "%BLENDER_DIR%/source/tools" (
|
||||||
|
echo Checking out sub-modules
|
||||||
|
if not "%GIT%" == "" (
|
||||||
|
"%GIT%" submodule update --init --recursive --progress
|
||||||
|
if errorlevel 1 goto FAIL
|
||||||
|
"%GIT%" submodule foreach git checkout master
|
||||||
|
if errorlevel 1 goto FAIL
|
||||||
|
"%GIT%" submodule foreach git pull --rebase origin master
|
||||||
|
if errorlevel 1 goto FAIL
|
||||||
|
goto EOF
|
||||||
|
) else (
|
||||||
|
echo Blender submodules not found, and git not found in path to retrieve them.
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
goto EOF
|
||||||
|
|
||||||
|
:FAIL
|
||||||
|
exit /b 1
|
||||||
|
:EOF
|
74
build_files/windows/configure_msbuild.cmd
Normal file
74
build_files/windows/configure_msbuild.cmd
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
if "%BUILD_ARCH%"=="x64" (
|
||||||
|
set MSBUILD_PLATFORM=x64
|
||||||
|
) else if "%BUILD_ARCH%"=="x86" (
|
||||||
|
set MSBUILD_PLATFORM=win32
|
||||||
|
if "%WITH_CLANG%"=="1" (
|
||||||
|
echo Clang not supported for X86
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%WITH_CLANG%"=="1" (
|
||||||
|
set CLANG_CMAKE_ARGS=-T"LLVM-vs2017"
|
||||||
|
if "%WITH_ASAN%"=="1" (
|
||||||
|
set ASAN_CMAKE_ARGS=-DWITH_COMPILER_ASAN=On
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
if "%WITH_ASAN%"=="1" (
|
||||||
|
echo ASAN is only supported with clang.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS%
|
||||||
|
|
||||||
|
if NOT EXIST %BUILD_DIR%\nul (
|
||||||
|
mkdir %BUILD_DIR%
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%MUST_CLEAN%"=="1" (
|
||||||
|
echo Cleaning %BUILD_DIR%
|
||||||
|
msbuild ^
|
||||||
|
%BUILD_DIR%\Blender.sln ^
|
||||||
|
/target:clean ^
|
||||||
|
/property:Configuration=%BUILD_TYPE% ^
|
||||||
|
/verbosity:minimal ^
|
||||||
|
/p:platform=%MSBUILD_PLATFORM%
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT EXIST %BUILD_DIR%\Blender.sln set MUST_CONFIGURE=1
|
||||||
|
if "%NOBUILD%"=="1" set MUST_CONFIGURE=1
|
||||||
|
|
||||||
|
if "%MUST_CONFIGURE%"=="1" (
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo %CMAKE% %BUILD_CMAKE_ARGS% -H%BLENDER_DIR% -B%BUILD_DIR%
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake ^
|
||||||
|
%BUILD_CMAKE_ARGS% ^
|
||||||
|
-H%BLENDER_DIR% ^
|
||||||
|
-B%BUILD_DIR%
|
||||||
|
|
||||||
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo "Configuration Failed"
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
echo call "%VCVARS%" %BUILD_ARCH% > %BUILD_DIR%\rebuild.cmd
|
||||||
|
echo "%CMAKE%" . >> %BUILD_DIR%\rebuild.cmd
|
||||||
|
echo echo %%TIME%% ^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
||||||
|
echo msbuild ^
|
||||||
|
%BUILD_DIR%\Blender.sln ^
|
||||||
|
/target:build ^
|
||||||
|
/property:Configuration=%BUILD_TYPE% ^
|
||||||
|
/maxcpucount:2 ^
|
||||||
|
/verbosity:minimal ^
|
||||||
|
/p:platform=%MSBUILD_PLATFORM% ^
|
||||||
|
/flp:Summary;Verbosity=minimal;LogFile=%BUILD_DIR%\Build.log >> %BUILD_DIR%\rebuild.cmd
|
||||||
|
echo msbuild ^
|
||||||
|
%BUILD_DIR%\INSTALL.vcxproj ^
|
||||||
|
/property:Configuration=%BUILD_TYPE% ^
|
||||||
|
/verbosity:minimal ^
|
||||||
|
/p:platform=%MSBUILD_PLATFORM% >> %BUILD_DIR%\rebuild.cmd
|
||||||
|
echo echo %%TIME%% ^>^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
80
build_files/windows/configure_ninja.cmd
Normal file
80
build_files/windows/configure_ninja.cmd
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
ninja --version 1>NUL 2>&1
|
||||||
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo "Ninja not detected in the path"
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Ninja" %TESTS_CMAKE_ARGS% -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
|
||||||
|
|
||||||
|
if "%WITH_CLANG%" == "1" (
|
||||||
|
set LLVM_DIR=
|
||||||
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM" /ve 2^>nul`) DO set LLVM_DIR=%%C
|
||||||
|
if DEFINED LLVM_DIR (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo LLVM Detected at "%LLVM_DIR%"
|
||||||
|
)
|
||||||
|
goto DetectionComplete
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Check 32 bits
|
||||||
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM" /ve 2^>nul`) DO set LLVM_DIR=%%C
|
||||||
|
if DEFINED LLVM_DIR (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo LLVM Detected at "%LLVM_DIR%"
|
||||||
|
)
|
||||||
|
goto DetectionComplete
|
||||||
|
)
|
||||||
|
echo LLVM not found
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:DetectionComplete
|
||||||
|
set CC=%LLVM_DIR%\bin\clang-cl
|
||||||
|
set CXX=%LLVM_DIR%\bin\clang-cl
|
||||||
|
rem build and tested against 2017 15.7
|
||||||
|
set CFLAGS=-m64 -fmsc-version=1914
|
||||||
|
set CXXFLAGS=-m64 -fmsc-version=1914
|
||||||
|
if "%WITH_ASAN%"=="1" (
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_COMPILER_ASAN=On
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%WITH_ASAN%"=="1" (
|
||||||
|
if "%WITH_CLANG%" == "" (
|
||||||
|
echo ASAN is only supported with clang.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS%
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT EXIST %BUILD_DIR%\nul (
|
||||||
|
mkdir %BUILD_DIR%
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%MUST_CLEAN%"=="1" (
|
||||||
|
echo Cleaning %BUILD_DIR%
|
||||||
|
cd %BUILD_DIR%
|
||||||
|
%CMAKE% cmake --build . --config Clean
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT EXIST %BUILD_DIR%\Blender.sln set MUST_CONFIGURE=1
|
||||||
|
if "%NOBUILD%"=="1" set MUST_CONFIGURE=1
|
||||||
|
|
||||||
|
if "%MUST_CONFIGURE%"=="1" (
|
||||||
|
cmake ^
|
||||||
|
%BUILD_CMAKE_ARGS% ^
|
||||||
|
-H%BLENDER_DIR% ^
|
||||||
|
-B%BUILD_DIR%
|
||||||
|
|
||||||
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo "Configuration Failed"
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
echo call "%VCVARS%" %BUILD_ARCH% > %BUILD_DIR%\rebuild.cmd
|
||||||
|
echo echo %%TIME%% ^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
||||||
|
echo ninja install >> %BUILD_DIR%\rebuild.cmd
|
||||||
|
echo echo %%TIME%% ^>^> buildtime.txt >> %BUILD_DIR%\rebuild.cmd
|
16
build_files/windows/detect_architecture.cmd
Normal file
16
build_files/windows/detect_architecture.cmd
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
if "%BUILD_ARCH%"=="" (
|
||||||
|
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
|
||||||
|
set WINDOWS_ARCH= Win64
|
||||||
|
set BUILD_ARCH=x64
|
||||||
|
) else if "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
|
||||||
|
set WINDOWS_ARCH= Win64
|
||||||
|
set BUILD_ARCH=x64
|
||||||
|
) else (
|
||||||
|
set WINDOWS_ARCH=
|
||||||
|
set BUILD_ARCH=x86
|
||||||
|
)
|
||||||
|
) else if "%BUILD_ARCH%"=="x64" (
|
||||||
|
set WINDOWS_ARCH= Win64
|
||||||
|
) else if "%BUILD_ARCH%"=="x86" (
|
||||||
|
set WINDOWS_ARCH=
|
||||||
|
)
|
3
build_files/windows/detect_msvc2015.cmd
Normal file
3
build_files/windows/detect_msvc2015.cmd
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
set BUILD_VS_VER=14
|
||||||
|
set BUILD_VS_YEAR=2015
|
||||||
|
call "%~dp0\detect_msvc_classic.cmd"
|
76
build_files/windows/detect_msvc2017.cmd
Normal file
76
build_files/windows/detect_msvc2017.cmd
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Detecting msvc 2017
|
||||||
|
)
|
||||||
|
set BUILD_VS_VER=15
|
||||||
|
set BUILD_VS_YEAR=2017
|
||||||
|
set ProgramFilesX86=%ProgramFiles(x86)%
|
||||||
|
if not exist "%ProgramFilesX86%" set ProgramFilesX86=%ProgramFiles%
|
||||||
|
|
||||||
|
set vs_where=%ProgramFilesX86%\Microsoft Visual Studio\Installer\vswhere.exe
|
||||||
|
if not exist "%vs_where%" (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio 2017 ^(15.2 or newer^) is not detected
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo "%vs_where%" -latest %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`
|
||||||
|
)
|
||||||
|
|
||||||
|
for /f "usebackq tokens=1* delims=: " %%i in (`"%vs_where%" -latest %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`) do (
|
||||||
|
if /i "%%i"=="installationPath" set VS_InstallDir=%%j
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%VS_InstallDir%"=="" (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio is detected but the "Desktop development with C++" workload has not been instlled
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
set VCVARS=%VS_InstallDir%\VC\Auxiliary\Build\vcvarsall.bat
|
||||||
|
if exist "%VCVARS%" (
|
||||||
|
call "%VCVARS%" %BUILD_ARCH%
|
||||||
|
) else (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo "%VCVARS%" not found
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
rem try msbuild
|
||||||
|
msbuild /version > NUL
|
||||||
|
if errorlevel 1 (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% msbuild not found
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% msbuild found
|
||||||
|
)
|
||||||
|
|
||||||
|
REM try the c++ compiler
|
||||||
|
cl 2> NUL 1>&2
|
||||||
|
if errorlevel 1 (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler not found
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler found
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio 2017 is detected successfully
|
||||||
|
)
|
||||||
|
goto EOF
|
||||||
|
|
||||||
|
:FAIL
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:EOF
|
69
build_files/windows/detect_msvc_classic.cmd
Normal file
69
build_files/windows/detect_msvc_classic.cmd
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Detecting msvc %BUILD_VS_YEAR%
|
||||||
|
)
|
||||||
|
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%BUILD_VS_VER%.0\Setup\VC"
|
||||||
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v ProductDir 2^>nul`) DO set MSVC_VC_DIR=%%C
|
||||||
|
if DEFINED MSVC_VC_DIR (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% on Win64 detected at "%MSVC_VC_DIR%"
|
||||||
|
)
|
||||||
|
goto msvc_detect_finally
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Check 32 bits
|
||||||
|
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\%BUILD_VS_VER%.0\Setup\VC"
|
||||||
|
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v ProductDir 2^>nul`) DO set MSVC_VC_DIR=%%C
|
||||||
|
if DEFINED MSVC_VC_DIR (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% on Win32 detected at "%MSVC_VC_DIR%"
|
||||||
|
)
|
||||||
|
goto msvc_detect_finally
|
||||||
|
)
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% not found.
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
:msvc_detect_finally
|
||||||
|
set VCVARS=%MSVC_VC_DIR%\vcvarsall.bat
|
||||||
|
if not exist "%VCVARS%" (
|
||||||
|
echo "%VCVARS%" not found.
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
call "%vcvars%" %BUILD_ARCH%
|
||||||
|
|
||||||
|
rem try msbuild
|
||||||
|
msbuild /version > NUL
|
||||||
|
if errorlevel 1 (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% msbuild not found
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% msbuild found
|
||||||
|
)
|
||||||
|
|
||||||
|
REM try the c++ compiler
|
||||||
|
cl 2> NUL 1>&2
|
||||||
|
if errorlevel 1 (
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler not found
|
||||||
|
)
|
||||||
|
goto FAIL
|
||||||
|
)
|
||||||
|
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% C/C++ Compiler found
|
||||||
|
)
|
||||||
|
goto DetectionComplete
|
||||||
|
|
||||||
|
:FAIL
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:DetectionComplete
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo Visual Studio %BUILD_VS_YEAR% Detected successfuly
|
||||||
|
)
|
||||||
|
exit /b 0
|
13
build_files/windows/find_dependencies.cmd
Normal file
13
build_files/windows/find_dependencies.cmd
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
REM find all dependencies and set the corresponding environement variables.
|
||||||
|
for %%X in (svn.exe) do (set SVN=%%~$PATH:X)
|
||||||
|
for %%X in (cmake.exe) do (set CMAKE=%%~$PATH:X)
|
||||||
|
for %%X in (git.exe) do (set GIT=%%~$PATH:X)
|
||||||
|
if NOT "%verbose%" == "" (
|
||||||
|
echo svn : %SVN%
|
||||||
|
echo cmake : %CMAKE%
|
||||||
|
echo git : %GIT%
|
||||||
|
)
|
||||||
|
if "%CMAKE%" == "" (
|
||||||
|
echo Cmake not found in path, required for building, exiting...
|
||||||
|
exit /b 1
|
||||||
|
)
|
86
build_files/windows/parse_arguments.cmd
Normal file
86
build_files/windows/parse_arguments.cmd
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
set BUILD_DIR=%BLENDER_DIR%..\build_windows
|
||||||
|
set BUILD_TYPE=Release
|
||||||
|
:argv_loop
|
||||||
|
if NOT "%1" == "" (
|
||||||
|
|
||||||
|
REM Help Message
|
||||||
|
if "%1" == "help" (
|
||||||
|
set SHOW_HELP=1
|
||||||
|
goto EOF
|
||||||
|
)
|
||||||
|
REM Build Types
|
||||||
|
if "%1" == "debug" (
|
||||||
|
set BUILD_TYPE=Debug
|
||||||
|
REM Build Configurations
|
||||||
|
) else if "%1" == "noge" (
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_GAMEENGINE=OFF -DWITH_PLAYER=OFF
|
||||||
|
set BUILD_NGE=_noge
|
||||||
|
) else if "%1" == "builddir" (
|
||||||
|
set BUILD_DIR_OVERRRIDE="%BLENDER_DIR%..\%2"
|
||||||
|
shift /1
|
||||||
|
) else if "%1" == "with_tests" (
|
||||||
|
set TESTS_CMAKE_ARGS=-DWITH_GTESTS=On
|
||||||
|
) else if "%1" == "full" (
|
||||||
|
set TARGET=Full
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
||||||
|
-C"%BLENDER_DIR%\build_files\cmake\config\blender_full.cmake"
|
||||||
|
) else if "%1" == "lite" (
|
||||||
|
set TARGET=Lite
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_lite.cmake"
|
||||||
|
) else if "%1" == "cycles" (
|
||||||
|
set TARGET=Cycles
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\cycles_standalone.cmake"
|
||||||
|
) else if "%1" == "headless" (
|
||||||
|
set TARGET=Headless
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_headless.cmake"
|
||||||
|
) else if "%1" == "bpy" (
|
||||||
|
set TARGET=Bpy
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\bpy_module.cmake"
|
||||||
|
) else if "%1" == "clang" (
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS%
|
||||||
|
set WITH_CLANG=1
|
||||||
|
) else if "%1" == "release" (
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake"
|
||||||
|
set TARGET=Release
|
||||||
|
) else if "%1" == "asan" (
|
||||||
|
set WITH_ASAN=1
|
||||||
|
) else if "%1" == "x86" (
|
||||||
|
set BUILD_ARCH=x86
|
||||||
|
) else if "%1" == "x64" (
|
||||||
|
set BUILD_ARCH=x64
|
||||||
|
) else if "%1" == "2017" (
|
||||||
|
set BUILD_VS_YEAR=2017
|
||||||
|
) else if "%1" == "2017pre" (
|
||||||
|
set BUILD_VS_YEAR=2017
|
||||||
|
set VSWHERE_ARGS=-prerelease
|
||||||
|
set BUILD_VS_YEAR=2017
|
||||||
|
) else if "%1" == "2017b" (
|
||||||
|
set BUILD_VS_YEAR=2017
|
||||||
|
set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
|
||||||
|
) else if "%1" == "2015" (
|
||||||
|
set BUILD_VS_YEAR=2015
|
||||||
|
) else if "%1" == "packagename" (
|
||||||
|
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DCPACK_OVERRIDE_PACKAGENAME="%2"
|
||||||
|
shift /1
|
||||||
|
) else if "%1" == "nobuild" (
|
||||||
|
set NOBUILD=1
|
||||||
|
) else if "%1" == "showhash" (
|
||||||
|
SET BUILD_SHOW_HASHES=1
|
||||||
|
REM Non-Build Commands
|
||||||
|
) else if "%1" == "update" (
|
||||||
|
SET BUILD_UPDATE=1
|
||||||
|
) else if "%1" == "ninja" (
|
||||||
|
SET BUILD_WITH_NINJA=1
|
||||||
|
) else if "%1" == "clean" (
|
||||||
|
set MUST_CLEAN=1
|
||||||
|
) else if "%1" == "verbose" (
|
||||||
|
set VERBOSE=1
|
||||||
|
) else (
|
||||||
|
echo Command "%1" unknown, aborting!
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
shift /1
|
||||||
|
goto argv_loop
|
||||||
|
)
|
||||||
|
:EOF
|
||||||
|
exit /b 0
|
27
build_files/windows/reset_variables.cmd
Normal file
27
build_files/windows/reset_variables.cmd
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
rem reset all variables so they do not get accidentally get carried over from previous builds
|
||||||
|
set BUILD_DIR_OVERRRIDE=
|
||||||
|
set BUILD_CMAKE_ARGS=
|
||||||
|
set BUILD_ARCH=
|
||||||
|
set BUILD_VS_VER=
|
||||||
|
set BUILD_VS_YEAR=
|
||||||
|
set BUILD_VS_LIBDIRPOST=
|
||||||
|
set BUILD_VS_LIBDIR=
|
||||||
|
set BUILD_VS_SVNDIR=
|
||||||
|
set BUILD_NGE=
|
||||||
|
set KEY_NAME=
|
||||||
|
set MSBUILD_PLATFORM=
|
||||||
|
set MUST_CLEAN=
|
||||||
|
set NOBUILD=
|
||||||
|
set TARGET=
|
||||||
|
set VERBOSE=
|
||||||
|
set WINDOWS_ARCH=
|
||||||
|
set TESTS_CMAKE_ARGS=
|
||||||
|
set VSWHERE_ARGS=
|
||||||
|
set BUILD_UPDATE=
|
||||||
|
set BUILD_SHOW_HASHES=
|
||||||
|
set SHOW_HELP=
|
||||||
|
set BUILD_WITH_NINJA=
|
||||||
|
set WITH_CLANG=
|
||||||
|
set WITH_ASAN=
|
||||||
|
set CLANG_CMAKE_ARGS=
|
||||||
|
set ASAN_CMAKE_ARGS=
|
4
build_files/windows/set_build_dir.cmd
Normal file
4
build_files/windows/set_build_dir.cmd
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
set BUILD_DIR=%BUILD_DIR%_%TARGET%%BUILD_NGE%_%BUILD_ARCH%_vc%BUILD_VS_VER%_%BUILD_TYPE%
|
||||||
|
if NOT "%BUILD_DIR_OVERRRIDE%"=="" (
|
||||||
|
set BUILD_DIR=%BUILD_DIR_OVERRRIDE%
|
||||||
|
)
|
12
build_files/windows/show_hashes.cmd
Normal file
12
build_files/windows/show_hashes.cmd
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
if "%GIT%" == "" (
|
||||||
|
echo Git not found, cannot show hashes.
|
||||||
|
goto EOF
|
||||||
|
)
|
||||||
|
cd "%BLENDER_DIR%"
|
||||||
|
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Branch_hash=%%i
|
||||||
|
cd "%BLENDER_DIR%/release/datafiles/locale"
|
||||||
|
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Locale_hash=%%i
|
||||||
|
cd "%BLENDER_DIR%/release/scripts/addons"
|
||||||
|
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Addons_Hash=%%i
|
||||||
|
cd "%BLENDER_DIR%"
|
||||||
|
:EOF
|
35
build_files/windows/show_help.cmd
Normal file
35
build_files/windows/show_help.cmd
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
echo.
|
||||||
|
echo Convenience targets
|
||||||
|
echo - release ^(identical to the official blender.org builds^)
|
||||||
|
echo - full ^(same as release minus the cuda kernels^)
|
||||||
|
echo - lite
|
||||||
|
echo - headless
|
||||||
|
echo - cycles
|
||||||
|
echo - bpy
|
||||||
|
echo.
|
||||||
|
echo Utilities ^(not associated with building^)
|
||||||
|
echo - clean ^(Target must be set^)
|
||||||
|
echo - update
|
||||||
|
echo - nobuild ^(only generate project files^)
|
||||||
|
echo - showhash ^(Show git hashes of source tree^)
|
||||||
|
echo.
|
||||||
|
echo Configuration options
|
||||||
|
echo - verbose ^(enable diagnostic output during configuration^)
|
||||||
|
echo - with_tests ^(enable building unit tests^)
|
||||||
|
echo - noge ^(disable building game enginge and player^)
|
||||||
|
echo - debug ^(Build an unoptimized debuggable build^)
|
||||||
|
echo - packagename [newname] ^(override default cpack package name^)
|
||||||
|
echo - buildir [newdir] ^(override default build folder^)
|
||||||
|
echo - x86 ^(override host auto-detect and build 32 bit code^)
|
||||||
|
echo - x64 ^(override host auto-detect and build 64 bit code^)
|
||||||
|
echo - 2017 ^(build with visual studio 2017^)
|
||||||
|
echo - 2017pre ^(build with visual studio 2017 pre-release^)
|
||||||
|
echo - 2017b ^(build with visual studio 2017 Build Tools^)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Experimental options
|
||||||
|
echo - 2015 ^(build with visual studio 2015^)
|
||||||
|
echo - clang ^(enable building with clang^)
|
||||||
|
echo - asan ^(enable asan when building with clang^)
|
||||||
|
echo - ninja ^(enable building with ninja instead of msbuild^)
|
||||||
|
echo.
|
16
build_files/windows/update_sources.cmd
Normal file
16
build_files/windows/update_sources.cmd
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
if "%SVN%" == "" (
|
||||||
|
echo svn not found, cannot update libraries
|
||||||
|
goto UPDATE_GIT
|
||||||
|
)
|
||||||
|
"%SVN%" up "%BLENDER_DIR%/../lib/*"
|
||||||
|
|
||||||
|
:UPDATE_GIT
|
||||||
|
|
||||||
|
if "%GIT%" == "" (
|
||||||
|
echo Git not found, cannot update code
|
||||||
|
goto EOF
|
||||||
|
)
|
||||||
|
"%GIT%" pull --rebase
|
||||||
|
"%GIT%" submodule foreach git pull --rebase origin master
|
||||||
|
|
||||||
|
:EOF
|
@@ -7,7 +7,7 @@
|
|||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
@@ -22,21 +22,21 @@
|
|||||||
#
|
#
|
||||||
# Name:
|
# Name:
|
||||||
# dna.py
|
# dna.py
|
||||||
#
|
#
|
||||||
# Description:
|
# Description:
|
||||||
# Creates a browsable DNA output to HTML.
|
# Creates a browsable DNA output to HTML.
|
||||||
#
|
#
|
||||||
# Author:
|
# Author:
|
||||||
# Jeroen Bakker
|
# Jeroen Bakker
|
||||||
#
|
#
|
||||||
# Version:
|
# Version:
|
||||||
# v0.1 (12-05-2009) - migration of original source code to python.
|
# v0.1 (12-05-2009) - migration of original source code to python.
|
||||||
# Added code to support blender 2.5 branch
|
# Added code to support blender 2.5 branch
|
||||||
# v0.2 (25-05-2009) - integrated with BlendFileReader.py
|
# v0.2 (25-05-2009) - integrated with BlendFileReader.py
|
||||||
#
|
#
|
||||||
# Input:
|
# Input:
|
||||||
# blender build executable
|
# blender build executable
|
||||||
#
|
#
|
||||||
# Output:
|
# Output:
|
||||||
# dna.html
|
# dna.html
|
||||||
# dna.css (will only be created when not existing)
|
# dna.css (will only be created when not existing)
|
||||||
@@ -76,12 +76,12 @@ class DNACatalogHTML:
|
|||||||
DNACatalog is a catalog of all information in the DNA1 file-block
|
DNACatalog is a catalog of all information in the DNA1 file-block
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, catalog, bpy_module = None):
|
def __init__(self, catalog, bpy_module=None):
|
||||||
self.Catalog = catalog
|
self.Catalog = catalog
|
||||||
self.bpy = bpy_module
|
self.bpy = bpy_module
|
||||||
|
|
||||||
def WriteToHTML(self, handle):
|
def WriteToHTML(self, handle):
|
||||||
|
|
||||||
dna_html_template = """
|
dna_html_template = """
|
||||||
<!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd>
|
<!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd>
|
||||||
<html>
|
<html>
|
||||||
@@ -105,10 +105,10 @@ class DNACatalogHTML:
|
|||||||
${structs_content}
|
${structs_content}
|
||||||
</body>
|
</body>
|
||||||
</html>"""
|
</html>"""
|
||||||
|
|
||||||
header = self.Catalog.Header
|
header = self.Catalog.Header
|
||||||
bpy = self.bpy
|
bpy = self.bpy
|
||||||
|
|
||||||
# ${version} and ${revision}
|
# ${version} and ${revision}
|
||||||
if bpy:
|
if bpy:
|
||||||
version = '.'.join(map(str, bpy.app.version))
|
version = '.'.join(map(str, bpy.app.version))
|
||||||
@@ -116,7 +116,7 @@ class DNACatalogHTML:
|
|||||||
else:
|
else:
|
||||||
version = str(header.Version)
|
version = str(header.Version)
|
||||||
revision = 'Unknown'
|
revision = 'Unknown'
|
||||||
|
|
||||||
# ${bitness}
|
# ${bitness}
|
||||||
if header.PointerSize == 8:
|
if header.PointerSize == 8:
|
||||||
bitness = '64 bit'
|
bitness = '64 bit'
|
||||||
@@ -125,10 +125,10 @@ class DNACatalogHTML:
|
|||||||
|
|
||||||
# ${endianness}
|
# ${endianness}
|
||||||
if header.LittleEndianness:
|
if header.LittleEndianness:
|
||||||
endianess= 'Little endianness'
|
endianess = 'Little endianness'
|
||||||
else:
|
else:
|
||||||
endianess= 'Big endianness'
|
endianess = 'Big endianness'
|
||||||
|
|
||||||
# ${structs_list}
|
# ${structs_list}
|
||||||
log.debug("Creating structs index")
|
log.debug("Creating structs index")
|
||||||
structs_list = ''
|
structs_list = ''
|
||||||
@@ -136,7 +136,7 @@ class DNACatalogHTML:
|
|||||||
structureIndex = 0
|
structureIndex = 0
|
||||||
for structure in self.Catalog.Structs:
|
for structure in self.Catalog.Structs:
|
||||||
structs_list += list_item.format(structureIndex, structure.Type.Name)
|
structs_list += list_item.format(structureIndex, structure.Type.Name)
|
||||||
structureIndex+=1
|
structureIndex += 1
|
||||||
|
|
||||||
# ${structs_content}
|
# ${structs_content}
|
||||||
log.debug("Creating structs content")
|
log.debug("Creating structs content")
|
||||||
@@ -144,20 +144,20 @@ class DNACatalogHTML:
|
|||||||
for structure in self.Catalog.Structs:
|
for structure in self.Catalog.Structs:
|
||||||
log.debug(structure.Type.Name)
|
log.debug(structure.Type.Name)
|
||||||
structs_content += self.Structure(structure)
|
structs_content += self.Structure(structure)
|
||||||
|
|
||||||
d = dict(
|
d = dict(
|
||||||
version = version,
|
version=version,
|
||||||
revision = revision,
|
revision=revision,
|
||||||
bitness = bitness,
|
bitness=bitness,
|
||||||
endianness = endianess,
|
endianness=endianess,
|
||||||
structs_list = structs_list,
|
structs_list=structs_list,
|
||||||
structs_content = structs_content
|
structs_content=structs_content
|
||||||
)
|
)
|
||||||
|
|
||||||
dna_html = Template(dna_html_template).substitute(d)
|
dna_html = Template(dna_html_template).substitute(d)
|
||||||
dna_html = self.format(dna_html)
|
dna_html = self.format(dna_html)
|
||||||
handle.write(dna_html)
|
handle.write(dna_html)
|
||||||
|
|
||||||
def Structure(self, structure):
|
def Structure(self, structure):
|
||||||
struct_table_template = """
|
struct_table_template = """
|
||||||
<table><a name="${struct_name}"></a>
|
<table><a name="${struct_name}"></a>
|
||||||
@@ -178,23 +178,23 @@ class DNACatalogHTML:
|
|||||||
</table>
|
</table>
|
||||||
<label>Total size: ${size} bytes</label><br/>
|
<label>Total size: ${size} bytes</label><br/>
|
||||||
<label>(<a href="#top">top</a>)</label><br/>"""
|
<label>(<a href="#top">top</a>)</label><br/>"""
|
||||||
|
|
||||||
d = dict(
|
d = dict(
|
||||||
struct_name = structure.Type.Name,
|
struct_name=structure.Type.Name,
|
||||||
fields = self.StructureFields(structure, None, 0),
|
fields=self.StructureFields(structure, None, 0),
|
||||||
size = str(structure.Type.Size)
|
size=str(structure.Type.Size)
|
||||||
)
|
)
|
||||||
|
|
||||||
struct_table = Template(struct_table_template).substitute(d)
|
struct_table = Template(struct_table_template).substitute(d)
|
||||||
return struct_table
|
return struct_table
|
||||||
|
|
||||||
def StructureFields(self, structure, parentReference, offset):
|
def StructureFields(self, structure, parentReference, offset):
|
||||||
fields = ''
|
fields = ''
|
||||||
for field in structure.Fields:
|
for field in structure.Fields:
|
||||||
fields += self.StructureField(field, structure, parentReference, offset)
|
fields += self.StructureField(field, structure, parentReference, offset)
|
||||||
offset += field.Size(self.Catalog.Header)
|
offset += field.Size(self.Catalog.Header)
|
||||||
return fields
|
return fields
|
||||||
|
|
||||||
def StructureField(self, field, structure, parentReference, offset):
|
def StructureField(self, field, structure, parentReference, offset):
|
||||||
structure_field_template = """
|
structure_field_template = """
|
||||||
<tr>
|
<tr>
|
||||||
@@ -205,7 +205,7 @@ class DNACatalogHTML:
|
|||||||
<td>${offset}</td>
|
<td>${offset}</td>
|
||||||
<td>${size}</td>
|
<td>${size}</td>
|
||||||
</tr>"""
|
</tr>"""
|
||||||
|
|
||||||
if field.Type.Structure is None or field.Name.IsPointer():
|
if field.Type.Structure is None or field.Name.IsPointer():
|
||||||
|
|
||||||
# ${reference}
|
# ${reference}
|
||||||
@@ -216,37 +216,37 @@ class DNACatalogHTML:
|
|||||||
struct = '<a href="#{0}">{0}</a>'.format(structure.Type.Name)
|
struct = '<a href="#{0}">{0}</a>'.format(structure.Type.Name)
|
||||||
else:
|
else:
|
||||||
struct = structure.Type.Name
|
struct = structure.Type.Name
|
||||||
|
|
||||||
# ${type}
|
# ${type}
|
||||||
type = field.Type.Name
|
type = field.Type.Name
|
||||||
|
|
||||||
# ${name}
|
# ${name}
|
||||||
name = field.Name.Name
|
name = field.Name.Name
|
||||||
|
|
||||||
# ${offset}
|
# ${offset}
|
||||||
# offset already set
|
# offset already set
|
||||||
|
|
||||||
# ${size}
|
# ${size}
|
||||||
size = field.Size(self.Catalog.Header)
|
size = field.Size(self.Catalog.Header)
|
||||||
|
|
||||||
d = dict(
|
d = dict(
|
||||||
reference = reference,
|
reference=reference,
|
||||||
struct = struct,
|
struct=struct,
|
||||||
type = type,
|
type=type,
|
||||||
name = name,
|
name=name,
|
||||||
offset = offset,
|
offset=offset,
|
||||||
size = size
|
size=size
|
||||||
)
|
)
|
||||||
|
|
||||||
structure_field = Template(structure_field_template).substitute(d)
|
structure_field = Template(structure_field_template).substitute(d)
|
||||||
|
|
||||||
elif field.Type.Structure is not None:
|
elif field.Type.Structure is not None:
|
||||||
reference = field.Name.AsReference(parentReference)
|
reference = field.Name.AsReference(parentReference)
|
||||||
structure_field = self.StructureFields(field.Type.Structure, reference, offset)
|
structure_field = self.StructureFields(field.Type.Structure, reference, offset)
|
||||||
|
|
||||||
return structure_field
|
return structure_field
|
||||||
|
|
||||||
def indent(self, input, dent, startswith = ''):
|
def indent(self, input, dent, startswith=''):
|
||||||
output = ''
|
output = ''
|
||||||
if dent < 0:
|
if dent < 0:
|
||||||
for line in input.split('\n'):
|
for line in input.split('\n'):
|
||||||
@@ -257,19 +257,19 @@ class DNACatalogHTML:
|
|||||||
output += line.lstrip() + '\n' # remove indentation completely
|
output += line.lstrip() + '\n' # remove indentation completely
|
||||||
elif dent > 0:
|
elif dent > 0:
|
||||||
for line in input.split('\n'):
|
for line in input.split('\n'):
|
||||||
output += ' '* dent + line + '\n'
|
output += ' ' * dent + line + '\n'
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def format(self, input):
|
def format(self, input):
|
||||||
diff = {
|
diff = {
|
||||||
'\n<!DOCTYPE':'<!DOCTYPE',
|
'\n<!DOCTYPE': '<!DOCTYPE',
|
||||||
'\n</ul>' :'</ul>',
|
'\n</ul>': '</ul>',
|
||||||
'<a name' :'\n<a name',
|
'<a name': '\n<a name',
|
||||||
'<tr>\n' :'<tr>',
|
'<tr>\n': '<tr>',
|
||||||
'<tr>' :' <tr>',
|
'<tr>': ' <tr>',
|
||||||
'</th>\n' :'</th>',
|
'</th>\n': '</th>',
|
||||||
'</td>\n' :'</td>',
|
'</td>\n': '</td>',
|
||||||
'<tbody>\n' :'<tbody>'
|
'<tbody>\n': '<tbody>'
|
||||||
}
|
}
|
||||||
output = self.indent(input, 0)
|
output = self.indent(input, 0)
|
||||||
for key, value in diff.items():
|
for key, value in diff.items():
|
||||||
@@ -283,17 +283,17 @@ class DNACatalogHTML:
|
|||||||
'''
|
'''
|
||||||
css = """
|
css = """
|
||||||
@CHARSET "ISO-8859-1";
|
@CHARSET "ISO-8859-1";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: verdana;
|
font-family: verdana;
|
||||||
font-size: small;
|
font-size: small;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.title {
|
div.title {
|
||||||
font-size: large;
|
font-size: large;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
page-break-before: always;
|
page-break-before: always;
|
||||||
}
|
}
|
||||||
@@ -304,7 +304,7 @@ class DNACatalogHTML:
|
|||||||
margin-right: 3%;
|
margin-right: 3%;
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1:hover{
|
h1:hover{
|
||||||
background-color: #EBEBEB;
|
background-color: #EBEBEB;
|
||||||
}
|
}
|
||||||
@@ -312,7 +312,7 @@ class DNACatalogHTML:
|
|||||||
h3 {
|
h3 {
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
@@ -321,21 +321,21 @@ class DNACatalogHTML:
|
|||||||
width: 94%;
|
width: 94%;
|
||||||
margin: 20px 3% 10px;
|
margin: 20px 3% 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
caption {
|
caption {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
color:#ffffff;
|
color:#ffffff;
|
||||||
padding-left:5px;
|
padding-left:5px;
|
||||||
padding-right:5px;
|
padding-right:5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
@@ -343,12 +343,12 @@ class DNACatalogHTML:
|
|||||||
padding-left:5px;
|
padding-left:5px;
|
||||||
padding-right:5px;
|
padding-right:5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
float:right;
|
float:right;
|
||||||
margin-right: 3%;
|
margin-right: 3%;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.multicolumn {
|
ul.multicolumn {
|
||||||
list-style:none;
|
list-style:none;
|
||||||
float:left;
|
float:left;
|
||||||
@@ -361,18 +361,18 @@ class DNACatalogHTML:
|
|||||||
width:200px;
|
width:200px;
|
||||||
margin-right:0px;
|
margin-right:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color:#a000a0;
|
color:#a000a0;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color:#a000a0;
|
color:#a000a0;
|
||||||
text-decoration:underline;
|
text-decoration:underline;
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
css = self.indent(css, 0)
|
css = self.indent(css, 0)
|
||||||
|
|
||||||
handle.write(css)
|
handle.write(css)
|
||||||
@@ -389,13 +389,13 @@ def usage():
|
|||||||
print("\tdefault: % blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py")
|
print("\tdefault: % blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py")
|
||||||
print("\twith options: % blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py -- --dna-keep-blend --dna-debug\n")
|
print("\twith options: % blender2.5 --background -noaudio --python BlendFileDnaExporter_25.py -- --dna-keep-blend --dna-debug\n")
|
||||||
|
|
||||||
|
|
||||||
######################################################
|
######################################################
|
||||||
# Main
|
# Main
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
import os, os.path
|
import os, os.path
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -408,37 +408,37 @@ def main():
|
|||||||
else:
|
else:
|
||||||
filename = 'dna'
|
filename = 'dna'
|
||||||
dir = os.path.dirname(__file__)
|
dir = os.path.dirname(__file__)
|
||||||
Path_Blend = os.path.join(dir, filename + '.blend') # temporary blend file
|
Path_Blend = os.path.join(dir, filename + '.blend') # temporary blend file
|
||||||
Path_HTML = os.path.join(dir, filename + '.html') # output html file
|
Path_HTML = os.path.join(dir, filename + '.html') # output html file
|
||||||
Path_CSS = os.path.join(dir, 'dna.css') # output css file
|
Path_CSS = os.path.join(dir, 'dna.css') # output css file
|
||||||
|
|
||||||
# create a blend file for dna parsing
|
# create a blend file for dna parsing
|
||||||
if not os.path.exists(Path_Blend):
|
if not os.path.exists(Path_Blend):
|
||||||
log.info("1: write temp blend file with SDNA info")
|
log.info("1: write temp blend file with SDNA info")
|
||||||
log.info(" saving to: " + Path_Blend)
|
log.info(" saving to: " + Path_Blend)
|
||||||
try:
|
try:
|
||||||
bpy.ops.wm.save_as_mainfile(filepath = Path_Blend, copy = True, compress = False)
|
bpy.ops.wm.save_as_mainfile(filepath=Path_Blend, copy=True, compress=False)
|
||||||
except:
|
except:
|
||||||
log.error("Filename {0} does not exist and can't be created... quitting".format(Path_Blend))
|
log.error("Filename {0} does not exist and can't be created... quitting".format(Path_Blend))
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
log.info("1: found blend file with SDNA info")
|
log.info("1: found blend file with SDNA info")
|
||||||
log.info(" " + Path_Blend)
|
log.info(" " + Path_Blend)
|
||||||
|
|
||||||
# read blend header from blend file
|
# read blend header from blend file
|
||||||
log.info("2: read file:")
|
log.info("2: read file:")
|
||||||
|
|
||||||
if not dir in sys.path:
|
if not dir in sys.path:
|
||||||
sys.path.append(dir)
|
sys.path.append(dir)
|
||||||
import BlendFileReader
|
import BlendFileReader
|
||||||
|
|
||||||
handle = BlendFileReader.openBlendFile(Path_Blend)
|
handle = BlendFileReader.openBlendFile(Path_Blend)
|
||||||
blendfile = BlendFileReader.BlendFile(handle)
|
blendfile = BlendFileReader.BlendFile(handle)
|
||||||
catalog = DNACatalogHTML(blendfile.Catalog, bpy)
|
catalog = DNACatalogHTML(blendfile.Catalog, bpy)
|
||||||
|
|
||||||
# close temp file
|
# close temp file
|
||||||
handle.close()
|
handle.close()
|
||||||
|
|
||||||
# deleting or not?
|
# deleting or not?
|
||||||
if '--dna-keep-blend' in sys.argv:
|
if '--dna-keep-blend' in sys.argv:
|
||||||
# keep the blend, useful for studying hexdumps
|
# keep the blend, useful for studying hexdumps
|
||||||
@@ -449,7 +449,7 @@ def main():
|
|||||||
log.info("5: close and delete temp blend:")
|
log.info("5: close and delete temp blend:")
|
||||||
log.info(" {0}".format(Path_Blend))
|
log.info(" {0}".format(Path_Blend))
|
||||||
os.remove(Path_Blend)
|
os.remove(Path_Blend)
|
||||||
|
|
||||||
# export dna to xhtml
|
# export dna to xhtml
|
||||||
log.info("6: export sdna to xhtml file: %r" % Path_HTML)
|
log.info("6: export sdna to xhtml file: %r" % Path_HTML)
|
||||||
handleHTML = open(Path_HTML, "w")
|
handleHTML = open(Path_HTML, "w")
|
||||||
@@ -466,12 +466,12 @@ def main():
|
|||||||
if not bpy.app.background:
|
if not bpy.app.background:
|
||||||
log.info("7: quit blender")
|
log.info("7: quit blender")
|
||||||
bpy.ops.wm.exit_blender()
|
bpy.ops.wm.exit_blender()
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
log.warning(" skipping, not running in Blender")
|
log.warning(" skipping, not running in Blender")
|
||||||
usage()
|
usage()
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
@@ -34,6 +34,7 @@ log = logging.getLogger("BlendFileReader")
|
|||||||
# module global routines
|
# module global routines
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
|
|
||||||
def ReadString(handle, length):
|
def ReadString(handle, length):
|
||||||
'''
|
'''
|
||||||
ReadString reads a String of given length or a zero terminating String
|
ReadString reads a String of given length or a zero terminating String
|
||||||
@@ -45,7 +46,7 @@ def ReadString(handle, length):
|
|||||||
# length == 0 means we want a zero terminating string
|
# length == 0 means we want a zero terminating string
|
||||||
result = ""
|
result = ""
|
||||||
s = ReadString(handle, 1)
|
s = ReadString(handle, 1)
|
||||||
while s!="\0":
|
while s != "\0":
|
||||||
result += s
|
result += s
|
||||||
s = ReadString(handle, 1)
|
s = ReadString(handle, 1)
|
||||||
return result
|
return result
|
||||||
@@ -57,7 +58,7 @@ def Read(type, handle, fileheader):
|
|||||||
'''
|
'''
|
||||||
def unpacked_bytes(type_char, size):
|
def unpacked_bytes(type_char, size):
|
||||||
return struct.unpack(fileheader.StructPre + type_char, handle.read(size))[0]
|
return struct.unpack(fileheader.StructPre + type_char, handle.read(size))[0]
|
||||||
|
|
||||||
if type == 'ushort':
|
if type == 'ushort':
|
||||||
return unpacked_bytes("H", 2) # unsigned short
|
return unpacked_bytes("H", 2) # unsigned short
|
||||||
elif type == 'short':
|
elif type == 'short':
|
||||||
@@ -94,10 +95,10 @@ def openBlendFile(filename):
|
|||||||
log.debug("decompressing started")
|
log.debug("decompressing started")
|
||||||
fs = gzip.open(filename, "rb")
|
fs = gzip.open(filename, "rb")
|
||||||
handle = tempfile.TemporaryFile()
|
handle = tempfile.TemporaryFile()
|
||||||
data = fs.read(1024*1024)
|
data = fs.read(1024 * 1024)
|
||||||
while data:
|
while data:
|
||||||
handle.write(data)
|
handle.write(data)
|
||||||
data = fs.read(1024*1024)
|
data = fs.read(1024 * 1024)
|
||||||
log.debug("decompressing finished")
|
log.debug("decompressing finished")
|
||||||
fs.close()
|
fs.close()
|
||||||
log.debug("resetting decompressed file")
|
log.debug("resetting decompressed file")
|
||||||
@@ -112,7 +113,7 @@ def Align(handle):
|
|||||||
offset = handle.tell()
|
offset = handle.tell()
|
||||||
trim = offset % 4
|
trim = offset % 4
|
||||||
if trim != 0:
|
if trim != 0:
|
||||||
handle.seek(4-trim, os.SEEK_CUR)
|
handle.seek(4 - trim, os.SEEK_CUR)
|
||||||
|
|
||||||
|
|
||||||
######################################################
|
######################################################
|
||||||
@@ -121,14 +122,14 @@ def Align(handle):
|
|||||||
|
|
||||||
class BlendFile:
|
class BlendFile:
|
||||||
'''
|
'''
|
||||||
Reads a blendfile and store the header, all the fileblocks, and catalogue
|
Reads a blendfile and store the header, all the fileblocks, and catalogue
|
||||||
structs foound in the DNA fileblock
|
structs foound in the DNA fileblock
|
||||||
|
|
||||||
- BlendFile.Header (BlendFileHeader instance)
|
- BlendFile.Header (BlendFileHeader instance)
|
||||||
- BlendFile.Blocks (list of BlendFileBlock instances)
|
- BlendFile.Blocks (list of BlendFileBlock instances)
|
||||||
- BlendFile.Catalog (DNACatalog instance)
|
- BlendFile.Catalog (DNACatalog instance)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, handle):
|
def __init__(self, handle):
|
||||||
log.debug("initializing reading blend-file")
|
log.debug("initializing reading blend-file")
|
||||||
self.Header = BlendFileHeader(handle)
|
self.Header = BlendFileHeader(handle)
|
||||||
@@ -141,13 +142,13 @@ class BlendFile:
|
|||||||
found_dna_block = True
|
found_dna_block = True
|
||||||
else:
|
else:
|
||||||
fileblock.Header.skip(handle)
|
fileblock.Header.skip(handle)
|
||||||
|
|
||||||
self.Blocks.append(fileblock)
|
self.Blocks.append(fileblock)
|
||||||
fileblock = BlendFileBlock(handle, self)
|
fileblock = BlendFileBlock(handle, self)
|
||||||
|
|
||||||
# appending last fileblock, "ENDB"
|
# appending last fileblock, "ENDB"
|
||||||
self.Blocks.append(fileblock)
|
self.Blocks.append(fileblock)
|
||||||
|
|
||||||
# seems unused?
|
# seems unused?
|
||||||
"""
|
"""
|
||||||
def FindBlendFileBlocksWithCode(self, code):
|
def FindBlendFileBlocksWithCode(self, code):
|
||||||
@@ -164,27 +165,27 @@ class BlendFileHeader:
|
|||||||
BlendFileHeader allocates the first 12 bytes of a blend file.
|
BlendFileHeader allocates the first 12 bytes of a blend file.
|
||||||
It contains information about the hardware architecture.
|
It contains information about the hardware architecture.
|
||||||
Header example: BLENDER_v254
|
Header example: BLENDER_v254
|
||||||
|
|
||||||
BlendFileHeader.Magic (str)
|
BlendFileHeader.Magic (str)
|
||||||
BlendFileHeader.PointerSize (int)
|
BlendFileHeader.PointerSize (int)
|
||||||
BlendFileHeader.LittleEndianness (bool)
|
BlendFileHeader.LittleEndianness (bool)
|
||||||
BlendFileHeader.StructPre (str) see http://docs.python.org/py3k/library/struct.html#byte-order-size-and-alignment
|
BlendFileHeader.StructPre (str) see http://docs.python.org/py3k/library/struct.html#byte-order-size-and-alignment
|
||||||
BlendFileHeader.Version (int)
|
BlendFileHeader.Version (int)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, handle):
|
def __init__(self, handle):
|
||||||
log.debug("reading blend-file-header")
|
log.debug("reading blend-file-header")
|
||||||
|
|
||||||
self.Magic = ReadString(handle, 7)
|
self.Magic = ReadString(handle, 7)
|
||||||
log.debug(self.Magic)
|
log.debug(self.Magic)
|
||||||
|
|
||||||
pointersize = ReadString(handle, 1)
|
pointersize = ReadString(handle, 1)
|
||||||
log.debug(pointersize)
|
log.debug(pointersize)
|
||||||
if pointersize == "-":
|
if pointersize == "-":
|
||||||
self.PointerSize = 8
|
self.PointerSize = 8
|
||||||
if pointersize == "_":
|
if pointersize == "_":
|
||||||
self.PointerSize = 4
|
self.PointerSize = 4
|
||||||
|
|
||||||
endianness = ReadString(handle, 1)
|
endianness = ReadString(handle, 1)
|
||||||
log.debug(endianness)
|
log.debug(endianness)
|
||||||
if endianness == "v":
|
if endianness == "v":
|
||||||
@@ -193,11 +194,11 @@ class BlendFileHeader:
|
|||||||
if endianness == "V":
|
if endianness == "V":
|
||||||
self.LittleEndianness = False
|
self.LittleEndianness = False
|
||||||
self.StructPre = ">"
|
self.StructPre = ">"
|
||||||
|
|
||||||
version = ReadString(handle, 3)
|
version = ReadString(handle, 3)
|
||||||
log.debug(version)
|
log.debug(version)
|
||||||
self.Version = int(version)
|
self.Version = int(version)
|
||||||
|
|
||||||
log.debug("{0} {1} {2} {3}".format(self.Magic, self.PointerSize, self.LittleEndianness, version))
|
log.debug("{0} {1} {2} {3}".format(self.Magic, self.PointerSize, self.LittleEndianness, version))
|
||||||
|
|
||||||
|
|
||||||
@@ -206,11 +207,11 @@ class BlendFileBlock:
|
|||||||
BlendFileBlock.File (BlendFile)
|
BlendFileBlock.File (BlendFile)
|
||||||
BlendFileBlock.Header (FileBlockHeader)
|
BlendFileBlock.Header (FileBlockHeader)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, handle, blendfile):
|
def __init__(self, handle, blendfile):
|
||||||
self.File = blendfile
|
self.File = blendfile
|
||||||
self.Header = FileBlockHeader(handle, blendfile.Header)
|
self.Header = FileBlockHeader(handle, blendfile.Header)
|
||||||
|
|
||||||
def Get(self, handle, path):
|
def Get(self, handle, path):
|
||||||
log.debug("find dna structure")
|
log.debug("find dna structure")
|
||||||
dnaIndex = self.Header.SDNAIndex
|
dnaIndex = self.Header.SDNAIndex
|
||||||
@@ -232,7 +233,7 @@ class FileBlockHeader:
|
|||||||
Count (int)
|
Count (int)
|
||||||
FileOffset (= file pointer of datablock)
|
FileOffset (= file pointer of datablock)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, handle, fileheader):
|
def __init__(self, handle, fileheader):
|
||||||
self.Code = ReadString(handle, 4).strip()
|
self.Code = ReadString(handle, 4).strip()
|
||||||
if self.Code != "ENDB":
|
if self.Code != "ENDB":
|
||||||
@@ -257,28 +258,28 @@ class FileBlockHeader:
|
|||||||
class DNACatalog:
|
class DNACatalog:
|
||||||
'''
|
'''
|
||||||
DNACatalog is a catalog of all information in the DNA1 file-block
|
DNACatalog is a catalog of all information in the DNA1 file-block
|
||||||
|
|
||||||
Header = None
|
Header = None
|
||||||
Names = None
|
Names = None
|
||||||
Types = None
|
Types = None
|
||||||
Structs = None
|
Structs = None
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, fileheader, handle):
|
def __init__(self, fileheader, handle):
|
||||||
log.debug("building DNA catalog")
|
log.debug("building DNA catalog")
|
||||||
self.Names=[]
|
self.Names = []
|
||||||
self.Types=[]
|
self.Types = []
|
||||||
self.Structs=[]
|
self.Structs = []
|
||||||
self.Header = fileheader
|
self.Header = fileheader
|
||||||
|
|
||||||
SDNA = ReadString(handle, 4)
|
SDNA = ReadString(handle, 4)
|
||||||
|
|
||||||
# names
|
# names
|
||||||
NAME = ReadString(handle, 4)
|
NAME = ReadString(handle, 4)
|
||||||
numberOfNames = Read('uint', handle, fileheader)
|
numberOfNames = Read('uint', handle, fileheader)
|
||||||
log.debug("building #{0} names".format(numberOfNames))
|
log.debug("building #{0} names".format(numberOfNames))
|
||||||
for i in range(numberOfNames):
|
for i in range(numberOfNames):
|
||||||
name = ReadString(handle,0)
|
name = ReadString(handle, 0)
|
||||||
self.Names.append(DNAName(name))
|
self.Names.append(DNAName(name))
|
||||||
Align(handle)
|
Align(handle)
|
||||||
|
|
||||||
@@ -287,7 +288,7 @@ class DNACatalog:
|
|||||||
numberOfTypes = Read('uint', handle, fileheader)
|
numberOfTypes = Read('uint', handle, fileheader)
|
||||||
log.debug("building #{0} types".format(numberOfTypes))
|
log.debug("building #{0} types".format(numberOfTypes))
|
||||||
for i in range(numberOfTypes):
|
for i in range(numberOfTypes):
|
||||||
type = ReadString(handle,0)
|
type = ReadString(handle, 0)
|
||||||
self.Types.append(DNAType(type))
|
self.Types.append(DNAType(type))
|
||||||
Align(handle)
|
Align(handle)
|
||||||
|
|
||||||
@@ -321,24 +322,24 @@ class DNACatalog:
|
|||||||
class DNAName:
|
class DNAName:
|
||||||
'''
|
'''
|
||||||
DNAName is a C-type name stored in the DNA.
|
DNAName is a C-type name stored in the DNA.
|
||||||
|
|
||||||
Name = str
|
Name = str
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, name):
|
def __init__(self, name):
|
||||||
self.Name = name
|
self.Name = name
|
||||||
|
|
||||||
def AsReference(self, parent):
|
def AsReference(self, parent):
|
||||||
if parent is None:
|
if parent is None:
|
||||||
result = ""
|
result = ""
|
||||||
else:
|
else:
|
||||||
result = parent+"."
|
result = parent + "."
|
||||||
|
|
||||||
result = result + self.ShortName()
|
result = result + self.ShortName()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def ShortName(self):
|
def ShortName(self):
|
||||||
result = self.Name;
|
result = self.Name
|
||||||
result = result.replace("*", "")
|
result = result.replace("*", "")
|
||||||
result = result.replace("(", "")
|
result = result.replace("(", "")
|
||||||
result = result.replace(")", "")
|
result = result.replace(")", "")
|
||||||
@@ -346,12 +347,12 @@ class DNAName:
|
|||||||
if Index != -1:
|
if Index != -1:
|
||||||
result = result[0:Index]
|
result = result[0:Index]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def IsPointer(self):
|
def IsPointer(self):
|
||||||
return self.Name.find("*")>-1
|
return self.Name.find("*") > -1
|
||||||
|
|
||||||
def IsMethodPointer(self):
|
def IsMethodPointer(self):
|
||||||
return self.Name.find("(*")>-1
|
return self.Name.find("(*") > -1
|
||||||
|
|
||||||
def ArraySize(self):
|
def ArraySize(self):
|
||||||
result = 1
|
result = 1
|
||||||
@@ -360,10 +361,10 @@ class DNAName:
|
|||||||
|
|
||||||
while Index != -1:
|
while Index != -1:
|
||||||
Index2 = Temp.find("]")
|
Index2 = Temp.find("]")
|
||||||
result*=int(Temp[Index+1:Index2])
|
result *= int(Temp[Index + 1:Index2])
|
||||||
Temp = Temp[Index2+1:]
|
Temp = Temp[Index2 + 1:]
|
||||||
Index = Temp.find("[")
|
Index = Temp.find("[")
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
@@ -375,46 +376,46 @@ class DNAType:
|
|||||||
Size = int
|
Size = int
|
||||||
Structure = DNAStructure
|
Structure = DNAStructure
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, aName):
|
def __init__(self, aName):
|
||||||
self.Name = aName
|
self.Name = aName
|
||||||
self.Structure=None
|
self.Structure = None
|
||||||
|
|
||||||
|
|
||||||
class DNAStructure:
|
class DNAStructure:
|
||||||
'''
|
'''
|
||||||
DNAType is a C-type structure stored in the DNA
|
DNAType is a C-type structure stored in the DNA
|
||||||
|
|
||||||
Type = DNAType
|
Type = DNAType
|
||||||
Fields = [DNAField]
|
Fields = [DNAField]
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self, aType):
|
def __init__(self, aType):
|
||||||
self.Type = aType
|
self.Type = aType
|
||||||
self.Type.Structure = self
|
self.Type.Structure = self
|
||||||
self.Fields=[]
|
self.Fields = []
|
||||||
|
|
||||||
def GetField(self, header, handle, path):
|
def GetField(self, header, handle, path):
|
||||||
splitted = path.partition(".")
|
splitted = path.partition(".")
|
||||||
name = splitted[0]
|
name = splitted[0]
|
||||||
rest = splitted[2]
|
rest = splitted[2]
|
||||||
offset = 0;
|
offset = 0
|
||||||
for field in self.Fields:
|
for field in self.Fields:
|
||||||
if field.Name.ShortName() == name:
|
if field.Name.ShortName() == name:
|
||||||
log.debug("found "+name+"@"+str(offset))
|
log.debug("found " + name + "@" + str(offset))
|
||||||
handle.seek(offset, os.SEEK_CUR)
|
handle.seek(offset, os.SEEK_CUR)
|
||||||
return field.DecodeField(header, handle, rest)
|
return field.DecodeField(header, handle, rest)
|
||||||
else:
|
else:
|
||||||
offset += field.Size(header)
|
offset += field.Size(header)
|
||||||
|
|
||||||
log.debug("error did not find "+path)
|
log.debug("error did not find " + path)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
class DNAField:
|
class DNAField:
|
||||||
'''
|
'''
|
||||||
DNAField is a coupled DNAType and DNAName.
|
DNAField is a coupled DNAType and DNAName.
|
||||||
|
|
||||||
Type = DNAType
|
Type = DNAType
|
||||||
Name = DNAName
|
Name = DNAName
|
||||||
'''
|
'''
|
||||||
@@ -422,25 +423,24 @@ class DNAField:
|
|||||||
def __init__(self, aType, aName):
|
def __init__(self, aType, aName):
|
||||||
self.Type = aType
|
self.Type = aType
|
||||||
self.Name = aName
|
self.Name = aName
|
||||||
|
|
||||||
def Size(self, header):
|
def Size(self, header):
|
||||||
if self.Name.IsPointer() or self.Name.IsMethodPointer():
|
if self.Name.IsPointer() or self.Name.IsMethodPointer():
|
||||||
return header.PointerSize*self.Name.ArraySize()
|
return header.PointerSize * self.Name.ArraySize()
|
||||||
else:
|
else:
|
||||||
return self.Type.Size*self.Name.ArraySize()
|
return self.Type.Size * self.Name.ArraySize()
|
||||||
|
|
||||||
def DecodeField(self, header, handle, path):
|
def DecodeField(self, header, handle, path):
|
||||||
if path == "":
|
if path == "":
|
||||||
if self.Name.IsPointer():
|
if self.Name.IsPointer():
|
||||||
return Read('pointer', handle, header)
|
return Read('pointer', handle, header)
|
||||||
if self.Type.Name=="int":
|
if self.Type.Name == "int":
|
||||||
return Read('int', handle, header)
|
return Read('int', handle, header)
|
||||||
if self.Type.Name=="short":
|
if self.Type.Name == "short":
|
||||||
return Read('short', handle, header)
|
return Read('short', handle, header)
|
||||||
if self.Type.Name=="float":
|
if self.Type.Name == "float":
|
||||||
return Read('float', handle, header)
|
return Read('float', handle, header)
|
||||||
if self.Type.Name=="char":
|
if self.Type.Name == "char":
|
||||||
return ReadString(handle, self.Name.ArraySize())
|
return ReadString(handle, self.Name.ArraySize())
|
||||||
else:
|
else:
|
||||||
return self.Type.Structure.GetField(header, handle, path)
|
return self.Type.Structure.GetField(header, handle, path)
|
||||||
|
|
||||||
|
@@ -224,10 +224,6 @@
|
|||||||
* \ingroup editors
|
* \ingroup editors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \defgroup edscene scene
|
|
||||||
* \ingroup editors
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** \defgroup edsculpt sculpt and paint
|
/** \defgroup edsculpt sculpt and paint
|
||||||
* \ingroup editors
|
* \ingroup editors
|
||||||
*/
|
*/
|
||||||
|
@@ -42,6 +42,7 @@ def man_format(data):
|
|||||||
data = data.replace("\t", " ")
|
data = data.replace("\t", " ")
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) != 3:
|
if len(sys.argv) != 3:
|
||||||
import getopt
|
import getopt
|
||||||
raise getopt.GetoptError("Usage: %s <path-to-blender> <output-filename>" % sys.argv[0])
|
raise getopt.GetoptError("Usage: %s <path-to-blender> <output-filename>" % sys.argv[0])
|
||||||
|
@@ -185,16 +185,16 @@ FragmentShader_v210 = """
|
|||||||
# Only use those for greater efficiency and compatiblity.
|
# Only use those for greater efficiency and compatiblity.
|
||||||
#
|
#
|
||||||
fg_shaders = {
|
fg_shaders = {
|
||||||
'2vuy' :FragmentShader_2vuy,
|
'2vuy': FragmentShader_2vuy,
|
||||||
'8BitYUV' :FragmentShader_2vuy,
|
'8BitYUV': FragmentShader_2vuy,
|
||||||
'v210' :FragmentShader_v210,
|
'v210': FragmentShader_v210,
|
||||||
'10BitYUV' :FragmentShader_v210,
|
'10BitYUV': FragmentShader_v210,
|
||||||
'8BitBGRA' :FragmentShader_R10l,
|
'8BitBGRA': FragmentShader_R10l,
|
||||||
'BGRA' :FragmentShader_R10l,
|
'BGRA': FragmentShader_R10l,
|
||||||
'8BitARGB' :FragmentShader_R10l,
|
'8BitARGB': FragmentShader_R10l,
|
||||||
'10BitRGBXLE':FragmentShader_R10l,
|
'10BitRGBXLE': FragmentShader_R10l,
|
||||||
'R10l' :FragmentShader_R10l
|
'R10l': FragmentShader_R10l
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -220,6 +220,8 @@ def config_video(obj, format, pixel, is3D=False, mat=0, card=0):
|
|||||||
# Attach this function to an object that has a material with texture
|
# Attach this function to an object that has a material with texture
|
||||||
# and call it once to initialize the object
|
# and call it once to initialize the object
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
def init(cont):
|
def init(cont):
|
||||||
# config_video(cont.owner, 'HD720p5994', '8BitBGRA')
|
# config_video(cont.owner, 'HD720p5994', '8BitBGRA')
|
||||||
# config_video(cont.owner, 'HD720p5994', '8BitYUV')
|
# config_video(cont.owner, 'HD720p5994', '8BitYUV')
|
||||||
|
@@ -34,7 +34,7 @@ if not hasattr(logic, 'video'):
|
|||||||
logic.mySources[0] = texture.VideoFFmpeg('movie1.avi')
|
logic.mySources[0] = texture.VideoFFmpeg('movie1.avi')
|
||||||
logic.mySources[1] = texture.VideoFFmpeg('movie2.avi')
|
logic.mySources[1] = texture.VideoFFmpeg('movie2.avi')
|
||||||
|
|
||||||
#And then assign (and reassign) the source during the game
|
# And then assign (and reassign) the source during the game
|
||||||
logic.video.source = logic.mySources[movieSel]
|
logic.video.source = logic.mySources[movieSel]
|
||||||
|
|
||||||
# quick off the movie, but it wont play in the background
|
# quick off the movie, but it wont play in the background
|
||||||
|
@@ -2,43 +2,45 @@
|
|||||||
Hello World Text Example
|
Hello World Text Example
|
||||||
++++++++++++++++++++++++
|
++++++++++++++++++++++++
|
||||||
|
|
||||||
Blender Game Engine example of using the blf module. For this module to work we
|
Example of using the blf module. For this module to work we
|
||||||
need to use the OpenGL wrapper :class:`~bgl` as well.
|
need to use the OpenGL wrapper :class:`~bgl` as well.
|
||||||
"""
|
"""
|
||||||
# import game engine modules
|
|
||||||
from bge import render
|
|
||||||
from bge import logic
|
|
||||||
# import stand alone modules
|
# import stand alone modules
|
||||||
import bgl
|
import bgl
|
||||||
import blf
|
import blf
|
||||||
|
import bpy
|
||||||
|
|
||||||
|
font_info = {
|
||||||
|
"font_id": 0,
|
||||||
|
"handler": None,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
"""init function - runs once"""
|
"""init function - runs once"""
|
||||||
# create a new font object, use external ttf file
|
import os
|
||||||
font_path = logic.expandPath('//Zeyada.ttf')
|
# Create a new font object, use external ttf file.
|
||||||
# store the font indice - to use later
|
font_path = bpy.path.abspath('//Zeyada.ttf')
|
||||||
logic.font_id = blf.load(font_path)
|
# Store the font indice - to use later.
|
||||||
|
if os.path.exists(font_path):
|
||||||
|
font_info["font_id"] = blf.load(font_path)
|
||||||
|
else:
|
||||||
|
# Default font.
|
||||||
|
font_info["font_id"] = 0
|
||||||
|
|
||||||
# set the font drawing routine to run every frame
|
# set the font drawing routine to run every frame
|
||||||
scene = logic.getCurrentScene()
|
font_info["handler"] = bpy.types.SpaceView3D.draw_handler_add(
|
||||||
scene.post_draw = [write]
|
draw_callback_px, (None, None), 'WINDOW', 'POST_PIXEL')
|
||||||
|
|
||||||
|
|
||||||
def write():
|
def draw_callback_px(self, context):
|
||||||
"""write on screen"""
|
"""Draw on the viewports"""
|
||||||
width = render.getWindowWidth()
|
|
||||||
height = render.getWindowHeight()
|
|
||||||
|
|
||||||
# OpenGL setup
|
|
||||||
bgl.glMatrixMode(bgl.GL_PROJECTION)
|
|
||||||
bgl.glLoadIdentity()
|
|
||||||
bgl.gluOrtho2D(0, width, 0, height)
|
|
||||||
bgl.glMatrixMode(bgl.GL_MODELVIEW)
|
|
||||||
bgl.glLoadIdentity()
|
|
||||||
|
|
||||||
# BLF drawing routine
|
# BLF drawing routine
|
||||||
font_id = logic.font_id
|
font_id = font_info["font_id"]
|
||||||
blf.position(font_id, (width * 0.2), (height * 0.3), 0)
|
blf.position(font_id, 2, 80, 0)
|
||||||
blf.size(font_id, 50, 72)
|
blf.size(font_id, 50, 72)
|
||||||
blf.draw(font_id, "Hello World")
|
blf.draw(font_id, "Hello World")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
init()
|
||||||
|
@@ -10,22 +10,22 @@ bm = bmesh.new()
|
|||||||
|
|
||||||
# Add a circle XXX, should return all geometry created, not just verts.
|
# Add a circle XXX, should return all geometry created, not just verts.
|
||||||
bmesh.ops.create_circle(
|
bmesh.ops.create_circle(
|
||||||
bm,
|
bm,
|
||||||
cap_ends=False,
|
cap_ends=False,
|
||||||
radius=0.2,
|
radius=0.2,
|
||||||
segments=8)
|
segments=8)
|
||||||
|
|
||||||
|
|
||||||
# Spin and deal with geometry on side 'a'
|
# Spin and deal with geometry on side 'a'
|
||||||
edges_start_a = bm.edges[:]
|
edges_start_a = bm.edges[:]
|
||||||
geom_start_a = bm.verts[:] + edges_start_a
|
geom_start_a = bm.verts[:] + edges_start_a
|
||||||
ret = bmesh.ops.spin(
|
ret = bmesh.ops.spin(
|
||||||
bm,
|
bm,
|
||||||
geom=geom_start_a,
|
geom=geom_start_a,
|
||||||
angle=math.radians(180.0),
|
angle=math.radians(180.0),
|
||||||
steps=8,
|
steps=8,
|
||||||
axis=(1.0, 0.0, 0.0),
|
axis=(1.0, 0.0, 0.0),
|
||||||
cent=(0.0, 1.0, 0.0))
|
cent=(0.0, 1.0, 0.0))
|
||||||
edges_end_a = [ele for ele in ret["geom_last"]
|
edges_end_a = [ele for ele in ret["geom_last"]
|
||||||
if isinstance(ele, bmesh.types.BMEdge)]
|
if isinstance(ele, bmesh.types.BMEdge)]
|
||||||
del ret
|
del ret
|
||||||
@@ -33,8 +33,8 @@ del ret
|
|||||||
|
|
||||||
# Extrude and create geometry on side 'b'
|
# Extrude and create geometry on side 'b'
|
||||||
ret = bmesh.ops.extrude_edge_only(
|
ret = bmesh.ops.extrude_edge_only(
|
||||||
bm,
|
bm,
|
||||||
edges=edges_start_a)
|
edges=edges_start_a)
|
||||||
geom_extrude_mid = ret["geom"]
|
geom_extrude_mid = ret["geom"]
|
||||||
del ret
|
del ret
|
||||||
|
|
||||||
@@ -45,19 +45,19 @@ verts_extrude_b = [ele for ele in geom_extrude_mid
|
|||||||
edges_extrude_b = [ele for ele in geom_extrude_mid
|
edges_extrude_b = [ele for ele in geom_extrude_mid
|
||||||
if isinstance(ele, bmesh.types.BMEdge) and ele.is_boundary]
|
if isinstance(ele, bmesh.types.BMEdge) and ele.is_boundary]
|
||||||
bmesh.ops.translate(
|
bmesh.ops.translate(
|
||||||
bm,
|
bm,
|
||||||
verts=verts_extrude_b,
|
verts=verts_extrude_b,
|
||||||
vec=(0.0, 0.0, 1.0))
|
vec=(0.0, 0.0, 1.0))
|
||||||
|
|
||||||
|
|
||||||
# Create the circle on side 'b'
|
# Create the circle on side 'b'
|
||||||
ret = bmesh.ops.spin(
|
ret = bmesh.ops.spin(
|
||||||
bm,
|
bm,
|
||||||
geom=verts_extrude_b + edges_extrude_b,
|
geom=verts_extrude_b + edges_extrude_b,
|
||||||
angle=-math.radians(180.0),
|
angle=-math.radians(180.0),
|
||||||
steps=8,
|
steps=8,
|
||||||
axis=(1.0, 0.0, 0.0),
|
axis=(1.0, 0.0, 0.0),
|
||||||
cent=(0.0, 1.0, 1.0))
|
cent=(0.0, 1.0, 1.0))
|
||||||
edges_end_b = [ele for ele in ret["geom_last"]
|
edges_end_b = [ele for ele in ret["geom_last"]
|
||||||
if isinstance(ele, bmesh.types.BMEdge)]
|
if isinstance(ele, bmesh.types.BMEdge)]
|
||||||
del ret
|
del ret
|
||||||
@@ -65,30 +65,30 @@ del ret
|
|||||||
|
|
||||||
# Bridge the resulting edge loops of both spins 'a & b'
|
# Bridge the resulting edge loops of both spins 'a & b'
|
||||||
bmesh.ops.bridge_loops(
|
bmesh.ops.bridge_loops(
|
||||||
bm,
|
bm,
|
||||||
edges=edges_end_a + edges_end_b)
|
edges=edges_end_a + edges_end_b)
|
||||||
|
|
||||||
|
|
||||||
# Now we have made a links of the chain, make a copy and rotate it
|
# Now we have made a links of the chain, make a copy and rotate it
|
||||||
# (so this looks something like a chain)
|
# (so this looks something like a chain)
|
||||||
|
|
||||||
ret = bmesh.ops.duplicate(
|
ret = bmesh.ops.duplicate(
|
||||||
bm,
|
bm,
|
||||||
geom=bm.verts[:] + bm.edges[:] + bm.faces[:])
|
geom=bm.verts[:] + bm.edges[:] + bm.faces[:])
|
||||||
geom_dupe = ret["geom"]
|
geom_dupe = ret["geom"]
|
||||||
verts_dupe = [ele for ele in geom_dupe if isinstance(ele, bmesh.types.BMVert)]
|
verts_dupe = [ele for ele in geom_dupe if isinstance(ele, bmesh.types.BMVert)]
|
||||||
del ret
|
del ret
|
||||||
|
|
||||||
# position the new link
|
# position the new link
|
||||||
bmesh.ops.translate(
|
bmesh.ops.translate(
|
||||||
bm,
|
bm,
|
||||||
verts=verts_dupe,
|
verts=verts_dupe,
|
||||||
vec=(0.0, 0.0, 2.0))
|
vec=(0.0, 0.0, 2.0))
|
||||||
bmesh.ops.rotate(
|
bmesh.ops.rotate(
|
||||||
bm,
|
bm,
|
||||||
verts=verts_dupe,
|
verts=verts_dupe,
|
||||||
cent=(0.0, 1.0, 0.0),
|
cent=(0.0, 1.0, 0.0),
|
||||||
matrix=mathutils.Matrix.Rotation(math.radians(90.0), 3, 'Z'))
|
matrix=mathutils.Matrix.Rotation(math.radians(90.0), 3, 'Z'))
|
||||||
|
|
||||||
# Done with creating the mesh, simply link it into the scene so we can see it
|
# Done with creating the mesh, simply link it into the scene so we can see it
|
||||||
|
|
||||||
|
@@ -17,4 +17,5 @@ from bpy.app.handlers import persistent
|
|||||||
def load_handler(dummy):
|
def load_handler(dummy):
|
||||||
print("Load Handler:", bpy.data.filepath)
|
print("Load Handler:", bpy.data.filepath)
|
||||||
|
|
||||||
|
|
||||||
bpy.app.handlers.load_post.append(load_handler)
|
bpy.app.handlers.load_post.append(load_handler)
|
||||||
|
@@ -11,4 +11,5 @@ import bpy
|
|||||||
def my_handler(scene):
|
def my_handler(scene):
|
||||||
print("Frame Change", scene.frame_current)
|
print("Frame Change", scene.frame_current)
|
||||||
|
|
||||||
|
|
||||||
bpy.app.handlers.frame_change_pre.append(my_handler)
|
bpy.app.handlers.frame_change_pre.append(my_handler)
|
||||||
|
@@ -54,19 +54,19 @@ translations_tuple = (
|
|||||||
"Copyright (C) 2013 The Blender Foundation.",
|
"Copyright (C) 2013 The Blender Foundation.",
|
||||||
"This file is distributed under the same license as the Blender package.",
|
"This file is distributed under the same license as the Blender package.",
|
||||||
"FIRST AUTHOR <EMAIL@ADDRESS>, YEAR."))),
|
"FIRST AUTHOR <EMAIL@ADDRESS>, YEAR."))),
|
||||||
),
|
),
|
||||||
(("Operator", "Render: Copy Settings"),
|
(("Operator", "Render: Copy Settings"),
|
||||||
(("bpy.types.SCENE_OT_render_copy_settings",),
|
(("bpy.types.SCENE_OT_render_copy_settings",),
|
||||||
()),
|
()),
|
||||||
("fr_FR", "Rendu : copier réglages",
|
("fr_FR", "Rendu : copier réglages",
|
||||||
(False, ())),
|
(False, ())),
|
||||||
),
|
),
|
||||||
(("*", "Copy render settings from current scene to others"),
|
(("*", "Copy render settings from current scene to others"),
|
||||||
(("bpy.types.SCENE_OT_render_copy_settings",),
|
(("bpy.types.SCENE_OT_render_copy_settings",),
|
||||||
()),
|
()),
|
||||||
("fr_FR", "Copier les réglages de rendu depuis la scène courante vers d’autres",
|
("fr_FR", "Copier les réglages de rendu depuis la scène courante vers d’autres",
|
||||||
(False, ())),
|
(False, ())),
|
||||||
),
|
),
|
||||||
# ... etc, all messages from your addon.
|
# ... etc, all messages from your addon.
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -81,6 +81,7 @@ for msg in translations_tuple:
|
|||||||
|
|
||||||
# Define remaining addon (operators, UI...) here.
|
# Define remaining addon (operators, UI...) here.
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
# Usual operator/UI/etc. registration...
|
# Usual operator/UI/etc. registration...
|
||||||
|
|
||||||
|
@@ -14,6 +14,7 @@ class MaterialSettings(bpy.types.PropertyGroup):
|
|||||||
my_float = bpy.props.FloatProperty()
|
my_float = bpy.props.FloatProperty()
|
||||||
my_string = bpy.props.StringProperty()
|
my_string = bpy.props.StringProperty()
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(MaterialSettings)
|
bpy.utils.register_class(MaterialSettings)
|
||||||
|
|
||||||
bpy.types.Material.my_settings = \
|
bpy.types.Material.my_settings = \
|
||||||
|
@@ -14,6 +14,7 @@ class SceneSettingItem(bpy.types.PropertyGroup):
|
|||||||
name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
|
name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
|
||||||
value = bpy.props.IntProperty(name="Test Prop", default=22)
|
value = bpy.props.IntProperty(name="Test Prop", default=22)
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(SceneSettingItem)
|
bpy.utils.register_class(SceneSettingItem)
|
||||||
|
|
||||||
bpy.types.Scene.my_settings = \
|
bpy.types.Scene.my_settings = \
|
||||||
|
@@ -14,6 +14,7 @@ import bpy
|
|||||||
def update_func(self, context):
|
def update_func(self, context):
|
||||||
print("my test function", self)
|
print("my test function", self)
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.testprop = bpy.props.FloatProperty(update=update_func)
|
bpy.types.Scene.testprop = bpy.props.FloatProperty(update=update_func)
|
||||||
|
|
||||||
bpy.context.scene.testprop = 11.0
|
bpy.context.scene.testprop = 11.0
|
||||||
|
@@ -19,6 +19,7 @@ def get_float(self):
|
|||||||
def set_float(self, value):
|
def set_float(self, value):
|
||||||
self["testprop"] = value
|
self["testprop"] = value
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.test_float = bpy.props.FloatProperty(get=get_float, set=set_float)
|
bpy.types.Scene.test_float = bpy.props.FloatProperty(get=get_float, set=set_float)
|
||||||
|
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ def get_date(self):
|
|||||||
import datetime
|
import datetime
|
||||||
return str(datetime.datetime.now())
|
return str(datetime.datetime.now())
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.test_date = bpy.props.StringProperty(get=get_date)
|
bpy.types.Scene.test_date = bpy.props.StringProperty(get=get_date)
|
||||||
|
|
||||||
|
|
||||||
@@ -40,6 +42,7 @@ def get_array(self):
|
|||||||
def set_array(self, values):
|
def set_array(self, values):
|
||||||
self["somebool"] = values[0] and values[1]
|
self["somebool"] = values[0] and values[1]
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.test_array = bpy.props.BoolVectorProperty(size=2, get=get_array, set=set_array)
|
bpy.types.Scene.test_array = bpy.props.BoolVectorProperty(size=2, get=get_array, set=set_array)
|
||||||
|
|
||||||
|
|
||||||
@@ -50,7 +53,7 @@ test_items = [
|
|||||||
("GREEN", "Green", "", 2),
|
("GREEN", "Green", "", 2),
|
||||||
("BLUE", "Blue", "", 3),
|
("BLUE", "Blue", "", 3),
|
||||||
("YELLOW", "Yellow", "", 4),
|
("YELLOW", "Yellow", "", 4),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def get_enum(self):
|
def get_enum(self):
|
||||||
@@ -61,6 +64,7 @@ def get_enum(self):
|
|||||||
def set_enum(self, value):
|
def set_enum(self, value):
|
||||||
print("setting value", value)
|
print("setting value", value)
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.test_enum = bpy.props.EnumProperty(items=test_items, get=get_enum, set=set_enum)
|
bpy.types.Scene.test_enum = bpy.props.EnumProperty(items=test_items, get=get_enum, set=set_enum)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@ bl_info = {
|
|||||||
"wiki_url": "",
|
"wiki_url": "",
|
||||||
"tracker_url": "",
|
"tracker_url": "",
|
||||||
"category": "Object",
|
"category": "Object",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
@@ -23,17 +23,17 @@ class ExampleAddonPreferences(AddonPreferences):
|
|||||||
bl_idname = __name__
|
bl_idname = __name__
|
||||||
|
|
||||||
filepath = StringProperty(
|
filepath = StringProperty(
|
||||||
name="Example File Path",
|
name="Example File Path",
|
||||||
subtype='FILE_PATH',
|
subtype='FILE_PATH',
|
||||||
)
|
)
|
||||||
number = IntProperty(
|
number = IntProperty(
|
||||||
name="Example Number",
|
name="Example Number",
|
||||||
default=4,
|
default=4,
|
||||||
)
|
)
|
||||||
boolean = BoolProperty(
|
boolean = BoolProperty(
|
||||||
name="Example Boolean",
|
name="Example Boolean",
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@@ -14,4 +14,5 @@ import bpy
|
|||||||
def menu_draw(self, context):
|
def menu_draw(self, context):
|
||||||
self.layout.operator("wm.save_homefile")
|
self.layout.operator("wm.save_homefile")
|
||||||
|
|
||||||
|
|
||||||
bpy.types.INFO_MT_file.append(menu_draw)
|
bpy.types.INFO_MT_file.append(menu_draw)
|
||||||
|
@@ -32,7 +32,7 @@ class AddPresetObjectDraw(AddPresetBase, Operator):
|
|||||||
# variable used for all preset values
|
# variable used for all preset values
|
||||||
preset_defines = [
|
preset_defines = [
|
||||||
"obj = bpy.context.object"
|
"obj = bpy.context.object"
|
||||||
]
|
]
|
||||||
|
|
||||||
# properties to store in the preset
|
# properties to store in the preset
|
||||||
preset_values = [
|
preset_values = [
|
||||||
@@ -42,7 +42,7 @@ class AddPresetObjectDraw(AddPresetBase, Operator):
|
|||||||
"obj.show_name",
|
"obj.show_name",
|
||||||
"obj.show_axis",
|
"obj.show_axis",
|
||||||
"obj.show_wire",
|
"obj.show_wire",
|
||||||
]
|
]
|
||||||
|
|
||||||
# where to store the preset
|
# where to store the preset
|
||||||
preset_subdir = "object/draw"
|
preset_subdir = "object/draw"
|
||||||
@@ -61,7 +61,7 @@ def panel_func(self, context):
|
|||||||
classes = (
|
classes = (
|
||||||
OBJECT_MT_draw_presets,
|
OBJECT_MT_draw_presets,
|
||||||
AddPresetObjectDraw,
|
AddPresetObjectDraw,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
@@ -60,6 +60,7 @@ def menu_func(self, context):
|
|||||||
layout.separator()
|
layout.separator()
|
||||||
layout.operator(WM_OT_button_context_test.bl_idname)
|
layout.operator(WM_OT_button_context_test.bl_idname)
|
||||||
|
|
||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
WM_OT_button_context_test,
|
WM_OT_button_context_test,
|
||||||
WM_MT_button_context,
|
WM_MT_button_context,
|
||||||
@@ -77,5 +78,6 @@ def unregister():
|
|||||||
bpy.utils.unregister_class(cls)
|
bpy.utils.unregister_class(cls)
|
||||||
bpy.types.WM_MT_button_context.remove(menu_func)
|
bpy.types.WM_MT_button_context.remove(menu_func)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
register()
|
register()
|
||||||
|
@@ -21,4 +21,5 @@ class CyclesNodeTree(bpy.types.NodeTree):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return context.scene.render.engine == 'CYCLES'
|
return context.scene.render.engine == 'CYCLES'
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(CyclesNodeTree)
|
bpy.utils.register_class(CyclesNodeTree)
|
||||||
|
@@ -42,6 +42,7 @@ class SimpleMouseOperator(bpy.types.Operator):
|
|||||||
self.y = event.mouse_y
|
self.y = event.mouse_y
|
||||||
return self.execute(context)
|
return self.execute(context)
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(SimpleMouseOperator)
|
bpy.utils.register_class(SimpleMouseOperator)
|
||||||
|
|
||||||
# Test call to the newly defined operator.
|
# Test call to the newly defined operator.
|
||||||
|
@@ -42,6 +42,7 @@ def menu_func(self, context):
|
|||||||
self.layout.operator_context = 'INVOKE_DEFAULT'
|
self.layout.operator_context = 'INVOKE_DEFAULT'
|
||||||
self.layout.operator(ExportSomeData.bl_idname, text="Text Export Operator")
|
self.layout.operator(ExportSomeData.bl_idname, text="Text Export Operator")
|
||||||
|
|
||||||
|
|
||||||
# Register and add to the file selector
|
# Register and add to the file selector
|
||||||
bpy.utils.register_class(ExportSomeData)
|
bpy.utils.register_class(ExportSomeData)
|
||||||
bpy.types.INFO_MT_file_export.append(menu_func)
|
bpy.types.INFO_MT_file_export.append(menu_func)
|
||||||
|
@@ -41,6 +41,7 @@ class CustomDrawOperator(bpy.types.Operator):
|
|||||||
|
|
||||||
col.prop(self, "my_string")
|
col.prop(self, "my_string")
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(CustomDrawOperator)
|
bpy.utils.register_class(CustomDrawOperator)
|
||||||
|
|
||||||
# test call
|
# test call
|
||||||
|
@@ -22,6 +22,7 @@ class HelloWorldOperator(bpy.types.Operator):
|
|||||||
print("Hello World")
|
print("Hello World")
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(HelloWorldOperator)
|
bpy.utils.register_class(HelloWorldOperator)
|
||||||
|
|
||||||
# test call to the newly defined operator
|
# test call to the newly defined operator
|
||||||
|
@@ -31,6 +31,7 @@ class MyPropertyGroup(bpy.types.PropertyGroup):
|
|||||||
custom_1 = bpy.props.FloatProperty(name="My Float")
|
custom_1 = bpy.props.FloatProperty(name="My Float")
|
||||||
custom_2 = bpy.props.IntProperty(name="My Int")
|
custom_2 = bpy.props.IntProperty(name="My Int")
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(MyPropertyGroup)
|
bpy.utils.register_class(MyPropertyGroup)
|
||||||
|
|
||||||
bpy.types.Object.my_prop_grp = bpy.props.PointerProperty(type=MyPropertyGroup)
|
bpy.types.Object.my_prop_grp = bpy.props.PointerProperty(type=MyPropertyGroup)
|
||||||
|
@@ -10,4 +10,5 @@ import bpy
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.layout.label("Hello World")
|
self.layout.label("Hello World")
|
||||||
|
|
||||||
|
|
||||||
bpy.context.window_manager.popup_menu(draw, title="Greeting", icon='INFO')
|
bpy.context.window_manager.popup_menu(draw, title="Greeting", icon='INFO')
|
||||||
|
@@ -12,6 +12,7 @@ from bpy.props import PointerProperty
|
|||||||
class MyPropGroup(bpy.types.PropertyGroup):
|
class MyPropGroup(bpy.types.PropertyGroup):
|
||||||
nested = bpy.props.FloatProperty(name="Nested", default=0.0)
|
nested = bpy.props.FloatProperty(name="Nested", default=0.0)
|
||||||
|
|
||||||
|
|
||||||
# register it so its available for all bones
|
# register it so its available for all bones
|
||||||
bpy.utils.register_class(MyPropGroup)
|
bpy.utils.register_class(MyPropGroup)
|
||||||
bpy.types.Bone.my_prop = PointerProperty(type=MyPropGroup,
|
bpy.types.Bone.my_prop = PointerProperty(type=MyPropGroup,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user