Compare commits
569 Commits
temp-fcurv
...
geometry-n
Author | SHA1 | Date | |
---|---|---|---|
4a7d8f378d | |||
5288298cfa | |||
e04491073d | |||
a5dda5996e | |||
c48e4b7a44 | |||
4ae2d6206a | |||
47f5a635da | |||
eb8574bc8b | |||
a207fb7ea7 | |||
25c3a2e42d | |||
fff08e81ea | |||
19f74e4022 | |||
![]() |
cf6c076046 | ||
38ba8a441f | |||
![]() |
042143440d | ||
336a675c64 | |||
2ddecfffc3 | |||
2c024bd335 | |||
4b7abde11d | |||
cd16a5cea8 | |||
81462f86bc | |||
e4facbbea5 | |||
aa77689f77 | |||
4d3a386af2 | |||
6c7f30a6f6 | |||
e9d21136ce | |||
3baf65975c | |||
bf10a56eea | |||
8eb7344731 | |||
3deb4f4cb8 | |||
8d1978a8e0 | |||
e661df71e6 | |||
31629c1363 | |||
c53b6067fa | |||
0eee384a8d | |||
c15bd1c4e6 | |||
1d9499bbbc | |||
76fd84f209 | |||
05129bc821 | |||
1c653a0315 | |||
2f9068449f | |||
574d711008 | |||
![]() |
622b30225a | ||
ca83649b7d | |||
bc0a33a812 | |||
0d1f65e516 | |||
e856443c99 | |||
b37c40a575 | |||
d65e5e8bc5 | |||
3c02fdb2c8 | |||
fe45f56515 | |||
bf4b31468e | |||
f5de32562e | |||
bc4e31afb6 | |||
594f47ecd2 | |||
f32ab724eb | |||
23f17a9acd | |||
065dfdc529 | |||
3c42892610 | |||
69a22afdb6 | |||
70cc0d7121 | |||
a4f883268b | |||
8442d6ca8a | |||
23eaf3117c | |||
390b28e338 | |||
6d8e03ddd9 | |||
83ddd658a6 | |||
![]() |
559e87ad08 | ||
0d1b1c341f | |||
87681f9b5f | |||
50c475e534 | |||
8186b96753 | |||
9d7672be71 | |||
994e7178bb | |||
1719743066 | |||
8910033f57 | |||
2a4c6c612a | |||
e4728d0a16 | |||
56a3566e64 | |||
9441c640c8 | |||
af661ad75b | |||
b062b922f9 | |||
0b4991f5a7 | |||
895f4620a0 | |||
06e6068902 | |||
67c7fe6ad6 | |||
3f12f02bea | |||
14a4961490 | |||
36e8561298 | |||
3cc2dc40b3 | |||
e58285dc1d | |||
c6281d5dc7 | |||
165b4f85ec | |||
8e060b44da | |||
ff8ecf105c | |||
![]() |
baa24f1c91 | ||
a3f5154448 | |||
956af16189 | |||
9b46d3cc80 | |||
2261da2897 | |||
7863ded680 | |||
3d916c0a96 | |||
fafed6234b | |||
d453bbbd26 | |||
8432452f6f | |||
3953833b60 | |||
![]() |
383c20a6ab | ||
7ff8094a8b | |||
5aabf67a9c | |||
b5169cd230 | |||
ab8c7fe946 | |||
a05012d500 | |||
e79154de73 | |||
2985a745bb | |||
90eab4a25d | |||
6180ecaea5 | |||
a8837c6cb0 | |||
5b35f1ed2b | |||
cd7354f9f5 | |||
73ba3e2a9e | |||
97a93566e9 | |||
f73dad211b | |||
992a88b38b | |||
658370e9e1 | |||
c9550cb120 | |||
da4d697772 | |||
87218899be | |||
ffa0a6df9d | |||
706fa5ad76 | |||
dea3b8d984 | |||
107199426c | |||
d11e357824 | |||
f68c3d557a | |||
92571abf56 | |||
6c178bf439 | |||
cf8642d9fa | |||
36653a92fa | |||
cf5ae6718c | |||
fe963b5a41 | |||
9ea345d1cf | |||
d00b1f6313 | |||
0c36255c48 | |||
ef969fb85f | |||
7ddc49ad34 | |||
a308607a53 | |||
6ebb2e5e2b | |||
c53ac5e1c4 | |||
608243c79c | |||
c70650785b | |||
f5080c82dd | |||
358a584985 | |||
b9c8eb3b0c | |||
e9ae8148ae | |||
899d6d4db9 | |||
37df2ebaa9 | |||
cee35b2ca5 | |||
d6a43abc3a | |||
b632c1e90d | |||
ca87f4c45d | |||
8da5599003 | |||
88660d67a4 | |||
cc3fdffbbe | |||
5a65305f89 | |||
b0f34eee30 | |||
091b433677 | |||
![]() |
e1eaf9e2b4 | ||
![]() |
ef5d6e9c45 | ||
b7f6de490d | |||
8a22b76988 | |||
27137c479c | |||
0cbe6387e9 | |||
d7e3b3aed0 | |||
23ec1f90e7 | |||
0b3cb54887 | |||
9daf668991 | |||
0da8eb7bd0 | |||
d2f52dccd3 | |||
e296d58cf2 | |||
657e344351 | |||
![]() |
bb49aa0d69 | ||
b5803c0a24 | |||
7ff6bfd1e0 | |||
ce76f2db94 | |||
1b577d0d6d | |||
b6e0661e9e | |||
fd96b29dcc | |||
f2d454c829 | |||
9216b8d6cb | |||
15cebd8565 | |||
3601cdd27b | |||
876f78cbbb | |||
187cc5e26d | |||
dd82a0d623 | |||
62528677bf | |||
959a06b8ff | |||
7e485b4620 | |||
47a84bb338 | |||
ba718c1513 | |||
810f5b82ce | |||
35e50c170c | |||
d782bad62d | |||
b4017ccb64 | |||
a7dba81aab | |||
4606e83a75 | |||
8738a668d8 | |||
1d28de57a4 | |||
3cfcfb938d | |||
bcdc6910a0 | |||
7793e8c884 | |||
05d9bd7c4a | |||
9255ce9247 | |||
819b1a7f9d | |||
a0ce0154e7 | |||
22ceb4a752 | |||
fc2a83d95b | |||
afd13710b8 | |||
7ac6f4d26c | |||
![]() |
ee90effd3a | ||
a8f44a4799 | |||
![]() |
e60bc528f0 | ||
1ad100d556 | |||
4bf6ffc022 | |||
a80c1fc011 | |||
4e90dff60f | |||
7167a57197 | |||
14d56b4217 | |||
cf8aa20967 | |||
17cb2a6da0 | |||
b55c44e3ed | |||
65a3195781 | |||
3e5a354333 | |||
98540511b1 | |||
f76d9de7ed | |||
10e2b77121 | |||
6c2bea6492 | |||
43e4d6e5b1 | |||
![]() |
0c1c6e7ecf | ||
![]() |
e74b7e1615 | ||
![]() |
a264b1f710 | ||
3d78e98d52 | |||
de77aa337c | |||
c0a0789af5 | |||
![]() |
e05ce1ea20 | ||
239eb95ef8 | |||
1c08ab4535 | |||
0cd7f7ddd1 | |||
8319279fdb | |||
![]() |
7320ecee9b | ||
257fe5a6e7 | |||
360282cf1f | |||
549841bbc0 | |||
151173fefe | |||
abc017ae0b | |||
45400b32d0 | |||
711b55b527 | |||
b3d469e78d | |||
5bd7eda093 | |||
14c0897671 | |||
0105f146bb | |||
580fe9f5f8 | |||
89eef19171 | |||
6ced026ae1 | |||
63a9f24b55 | |||
f3ecb4c91e | |||
efc2edc47f | |||
c4668b72e0 | |||
74d1fba1de | |||
2b2f3da721 | |||
f780bfafcf | |||
48fd10a77d | |||
ea4d28aea0 | |||
31108f9359 | |||
c6c4925771 | |||
aa244a7a68 | |||
1e3742749e | |||
3d26cd01b9 | |||
4fb67ae809 | |||
c0a6bc1979 | |||
84ef3b80de | |||
a9f2641cb6 | |||
d1eefc4215 | |||
3a7fd309fc | |||
d2bf71b412 | |||
7ef3a63480 | |||
9bf1bf599b | |||
![]() |
83124856d0 | ||
4d9f357bf6 | |||
29dbe00719 | |||
477d983c2e | |||
e3c76f7937 | |||
b17ad27adc | |||
e49ee5a808 | |||
93887d1096 | |||
f7832b1583 | |||
bd15efefd2 | |||
850944e6cd | |||
![]() |
f52f51aef2 | ||
![]() |
1ceb91d1b3 | ||
b2e067d98c | |||
94364be80a | |||
48c484a22e | |||
663e047102 | |||
1f046e05b6 | |||
bdad412fa7 | |||
78a5895c96 | |||
806a561e23 | |||
e1cd6fae34 | |||
9c7fda6de3 | |||
f425f40c4e | |||
85e78fa17c | |||
d48d8b3456 | |||
7447eb7e74 | |||
2c14a950a7 | |||
e2c5439cb4 | |||
20276e4b00 | |||
3bc808ebcb | |||
c275a00a72 | |||
54da72d3cd | |||
77aef03d8a | |||
00ee3960e0 | |||
89ffdad0f3 | |||
5ebdbcafcb | |||
df4a93aca0 | |||
342be27daa | |||
5b9296f0d6 | |||
6430849366 | |||
4475c49e2f | |||
3b84dce969 | |||
14f490b932 | |||
eb55ca72f4 | |||
5d92fd8a90 | |||
b002fdc4bf | |||
491d777efc | |||
c5bdbc340a | |||
5722de6098 | |||
bb872b25f2 | |||
3ffe65a7fb | |||
fa566157a5 | |||
f40294b2d6 | |||
0a2ae7f220 | |||
9fb2ce70d6 | |||
507e7bcbdb | |||
fa0ceb4959 | |||
00f7b572d9 | |||
ba8233174c | |||
e936f04258 | |||
0a66436fe5 | |||
a88076e948 | |||
d4f94d8a31 | |||
5129e2e042 | |||
5efb104003 | |||
c866075dfb | |||
ca55a1b564 | |||
91af828e8b | |||
229b9f1299 | |||
6991b13e41 | |||
ef5f307031 | |||
750e4e1158 | |||
6fe3521481 | |||
da7ace00d5 | |||
b9e4696641 | |||
4b99ea17fb | |||
![]() |
0d5ec990a9 | ||
6dda0779fc | |||
![]() |
0fed1bea65 | ||
e7ab802ab0 | |||
15d78ea85b | |||
d1b3439b80 | |||
bac91956ae | |||
78d1aa4d52 | |||
1ec1e36ac1 | |||
d6fd03616e | |||
f1aa55b6e9 | |||
5531697f6d | |||
![]() |
1cc3abca70 | ||
7b951ba5c3 | |||
1001adb500 | |||
4bea4702d5 | |||
c0dde8be84 | |||
aca8640b12 | |||
a509e79a4c | |||
11a8a6d0e6 | |||
![]() |
53792e32e7 | ||
adc0291061 | |||
57de568604 | |||
3271074120 | |||
4fa4245464 | |||
50d78116cd | |||
1cf8a4e5ea | |||
fecb276ef7 | |||
459618d860 | |||
9d2222b7d1 | |||
3e25f70ddd | |||
0d52504dff | |||
d3b59d1358 | |||
a181b15639 | |||
5edba9b42f | |||
2d4f1afece | |||
0133bcaf38 | |||
cb40edf63a | |||
c7cd74fac3 | |||
863b38d708 | |||
862b5b1842 | |||
deca7c7954 | |||
2cc7be3e49 | |||
3d1b5e35bd | |||
2ec07dfa18 | |||
5f49f818d6 | |||
ec9edd36ca | |||
9722e369cd | |||
a36f02f9ba | |||
72cfeb2c4e | |||
be3841b1bf | |||
7c633686e9 | |||
96dd299055 | |||
9fe5817588 | |||
b7afcdff7b | |||
ed96c59c20 | |||
![]() |
dd3b047f8b | ||
48b52e06b0 | |||
c82d167d81 | |||
3bb3b26c8f | |||
ae609346ee | |||
16289274ed | |||
79875e37fe | |||
c11ae5cd21 | |||
3f78569c3e | |||
666485f38c | |||
6b21b82704 | |||
7d5d567dba | |||
344c001eae | |||
211d7ff3cf | |||
65965a892f | |||
8335c26119 | |||
8427e02abc | |||
![]() |
dc71ad0624 | ||
1d84881ac1 | |||
19dcd32ee5 | |||
1b7458f85a | |||
c1cee363cd | |||
6f0b082378 | |||
058a69974a | |||
5e6c7de3e9 | |||
0d3e192660 | |||
c68a2a722d | |||
f56c5245d2 | |||
370ed6025f | |||
c4c8d855c6 | |||
ff5e3d6834 | |||
86138d88f6 | |||
df5b65811e | |||
590220e451 | |||
db8a856a74 | |||
662c0ac970 | |||
60ba69ffb5 | |||
e3ad392b98 | |||
aafd71a8a1 | |||
ab65fe5a2d | |||
e8d02359cf | |||
fc5c5f0636 | |||
1db26e1698 | |||
bfd7840358 | |||
7ae78733ef | |||
cf778a9e42 | |||
df3d124e91 | |||
72335d5e89 | |||
1b575cbb75 | |||
e8a2931299 | |||
a38c2dcfe6 | |||
c95ab2c6f0 | |||
fbcb26fb33 | |||
c9a9b03204 | |||
a0886d1b6e | |||
1b04eb6c44 | |||
c68338ee89 | |||
4427a67c86 | |||
5336555c31 | |||
d9a43a107f | |||
3fe98a473c | |||
2abfcebb0e | |||
c735aca42e | |||
7ab8d7c939 | |||
c1394c89a7 | |||
89491d67d9 | |||
4173877e87 | |||
e6d1c8272e | |||
32d4623f44 | |||
62f5232f37 | |||
50ffcf12b2 | |||
e340f943f5 | |||
![]() |
9aef0283a0 | ||
2d94b0d6b0 | |||
16ca295278 | |||
14c53c5018 | |||
d39043b5ae | |||
1f6b7387ad | |||
83e91485d0 | |||
701fc52cc6 | |||
2f339eb745 | |||
309c919ee9 | |||
963b45f574 | |||
![]() |
07bd16de5b | ||
![]() |
2a39b6d4d1 | ||
774905f7e8 | |||
048c5580c2 | |||
![]() |
b96f1f8091 | ||
f735491b9f | |||
decb3b10aa | |||
afc090f339 | |||
05710171cb | |||
c69df6728a | |||
2d5e38d4ec | |||
70634ba438 | |||
3fae33b22c | |||
![]() |
3d4231babf | ||
e90638b911 | |||
a31a87f894 | |||
569510d704 | |||
ea5f2f88b3 | |||
dba0b84359 | |||
043ddcf3ad | |||
196d6166e5 | |||
cac0e78aff | |||
d6f409b862 | |||
51e43f27fa | |||
f23bf4cb10 | |||
![]() |
479dc766b5 | ||
8f798afbdd | |||
d3ba60b132 | |||
![]() |
0eb9027987 | ||
f12b0373f3 | |||
5f364216ac | |||
d7f482f88e | |||
4ee1332bdf | |||
70a8498cec | |||
e900f6ed14 | |||
ef0ef8bcff | |||
b46e828b0c | |||
cbbdfe24af | |||
![]() |
c290e4cbe6 | ||
1cf5ce5e25 | |||
df5fe9718b | |||
fdb2240e4d | |||
e1900ddcfa | |||
79840abf6d | |||
fb20efae59 | |||
d37fccab26 | |||
0b4aeffda9 | |||
9c8334acc1 | |||
05d637280c | |||
168ab643a5 | |||
d8fcd8a316 | |||
c4a281e801 | |||
d88da4db67 | |||
b8f25dd698 | |||
021b94f27c | |||
3c045923a2 | |||
833066088e | |||
fec5c12ac8 | |||
253dbe71dc | |||
03ef0cfe3c | |||
7c9131d11e | |||
1f50beb9f2 | |||
b8638b6491 | |||
5e2a60a003 | |||
![]() |
7c373555fd | ||
![]() |
afab33e0b9 | ||
fc767502dc | |||
0ea4aab55e |
@@ -18,6 +18,8 @@ Checks: >
|
||||
-readability-redundant-member-init,
|
||||
-readability-use-anyofallof,
|
||||
|
||||
-readability-function-cognitive-complexity,
|
||||
|
||||
bugprone-*,
|
||||
-bugprone-narrowing-conversions,
|
||||
-bugprone-unhandled-self-assignment,
|
||||
@@ -28,4 +30,7 @@ Checks: >
|
||||
-bugprone-sizeof-expression,
|
||||
-bugprone-integer-division,
|
||||
|
||||
-bugprone-exception-escape,
|
||||
-bugprone-redundant-branch-condition,
|
||||
|
||||
WarningsAsErrors: '*'
|
||||
|
@@ -43,8 +43,8 @@ endif()
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
# Prever LEGACY OpenGL to eb compatible with all the existing releases and
|
||||
# platforms which don't hare GLVND yet. Only do it if preference was not set
|
||||
# Prefer LEGACY OpenGL to be compatible with all the existing releases and
|
||||
# platforms which don't have GLVND yet. Only do it if preference was not set
|
||||
# externally.
|
||||
if(NOT DEFINED OpenGL_GL_PREFERENCE)
|
||||
set(OpenGL_GL_PREFERENCE "LEGACY")
|
||||
@@ -377,7 +377,7 @@ option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
|
||||
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
|
||||
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
|
||||
mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 compute_75 CACHE STRING "CUDA architectures to build binaries for")
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 compute_75 CACHE STRING "CUDA architectures to build binaries for")
|
||||
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
|
||||
unset(PLATFORM_DEFAULT)
|
||||
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
|
||||
@@ -853,11 +853,17 @@ 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}")
|
||||
if(NOT APPLE)
|
||||
# Avoid passing address sanitizer compiler flags to `try_compile`.
|
||||
# Since linker flags are not set, all compiler checks and `find_package`
|
||||
# calls that rely on `try_compile` will fail.
|
||||
# See CMP0066 also.
|
||||
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}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
|
||||
endif()
|
||||
|
@@ -89,7 +89,7 @@ Spell Checkers
|
||||
* check_spelling_osl: Check for spelling errors (OSL only).
|
||||
* check_spelling_py: Check for spelling errors (Python only).
|
||||
|
||||
Note that spell checkers can tak a 'CHECK_SPELLING_CACHE' filepath argument,
|
||||
Note that spell checkers can take a 'CHECK_SPELLING_CACHE' filepath argument,
|
||||
so re-running does not need to re-check unchanged files.
|
||||
|
||||
Example:
|
||||
|
@@ -20,7 +20,7 @@ set(GMP_EXTRA_ARGS -enable-cxx)
|
||||
|
||||
if(WIN32)
|
||||
# Shared for windows because static libs will drag in a libgcc dependency.
|
||||
set(GMP_OPTIONS --disable-static --enable-shared --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
|
||||
set(GMP_OPTIONS --disable-static --enable-shared --enable-fat --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
|
||||
else()
|
||||
set(GMP_OPTIONS --enable-static --disable-shared )
|
||||
endif()
|
||||
@@ -41,6 +41,7 @@ elseif(UNIX)
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--with-pic
|
||||
--enable-fat
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@@ -520,7 +520,7 @@ OIDN_FORCE_BUILD=false
|
||||
OIDN_FORCE_REBUILD=false
|
||||
OIDN_SKIP=false
|
||||
|
||||
ISPC_VERSION="1.14.0"
|
||||
ISPC_VERSION="1.14.1"
|
||||
|
||||
FFMPEG_VERSION="4.2.3"
|
||||
FFMPEG_VERSION_SHORT="4.2"
|
||||
@@ -1259,13 +1259,16 @@ version_match() {
|
||||
# ----------------------------------------------------------------------------
|
||||
# Generic compile helpers
|
||||
|
||||
prepare_opt() {
|
||||
prepare_inst() {
|
||||
INFO "Ensuring $INST exists and is writable by us"
|
||||
if [ ! $SUDO ]; then
|
||||
WARNING "--no-sudo enabled, might be impossible to create install dir..."
|
||||
fi
|
||||
|
||||
if [ ! -d $INST ]; then
|
||||
$SUDO mkdir -p $INST
|
||||
# Try to create normal user directory first to possibly avoid excessive
|
||||
# system operations
|
||||
mkdir -p $INST || $SUDO mkdir -p $INST
|
||||
fi
|
||||
|
||||
if [ ! -w $INST ]; then
|
||||
@@ -1366,7 +1369,7 @@ compile_Python() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_python
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -1452,7 +1455,7 @@ compile_Numpy() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_numpy
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -1541,7 +1544,7 @@ compile_Boost() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_boost
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
INFO "Downloading Boost-$BOOST_VERSION"
|
||||
@@ -1635,7 +1638,7 @@ compile_TBB() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_tbb
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
INFO "Downloading TBB-$TBB_VERSION$TBB_VERSION_UPDATE"
|
||||
@@ -1752,7 +1755,7 @@ compile_OCIO() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_ocio
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
INFO "Downloading OpenColorIO-$OCIO_VERSION"
|
||||
@@ -1884,7 +1887,7 @@ compile_OPENEXR() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_openexr
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
INFO "Downloading OpenEXR-$OPENEXR_VERSION"
|
||||
@@ -2010,7 +2013,7 @@ compile_OIIO() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_oiio
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -2165,7 +2168,7 @@ compile_LLVM() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_llvm
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src -o true ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -2275,7 +2278,7 @@ compile_OSL() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_osl
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -2419,7 +2422,7 @@ compile_OSD() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_osd
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -2537,7 +2540,7 @@ compile_BLOSC() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_blosc
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
INFO "Downloading Blosc-$OPENVDB_BLOSC_VERSION"
|
||||
@@ -2636,7 +2639,7 @@ compile_OPENVDB() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_openvdb
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src -o true ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -2751,7 +2754,7 @@ compile_ALEMBIC() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_alembic
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -2856,7 +2859,7 @@ compile_USD() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_usd
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -2955,7 +2958,7 @@ compile_OpenCOLLADA() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_collada
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -3061,7 +3064,7 @@ compile_Embree() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_embree
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -3171,7 +3174,7 @@ install_ISPC() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_ispc
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -3250,7 +3253,7 @@ compile_OIDN() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_oidn
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -3360,7 +3363,7 @@ compile_FFmpeg() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_ffmpeg
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
INFO "Downloading ffmpeg-$FFMPEG_VERSION"
|
||||
@@ -3489,7 +3492,7 @@ compile_XR_OpenXR_SDK() {
|
||||
# Rebuild dependencies as well!
|
||||
_update_deps_xr_openxr_sdk
|
||||
|
||||
prepare_opt
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
@@ -3955,7 +3958,7 @@ install_DEB() {
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_DEB llvm-dev clang
|
||||
have_llvm=true
|
||||
LLVM_VERSION=`get_package_version_DEB llvm-dev`
|
||||
LLVM_VERSION=`llvm-config --version`
|
||||
LLVM_VERSION_FOUND=$LLVM_VERSION
|
||||
clean_LLVM
|
||||
else
|
||||
@@ -4604,7 +4607,7 @@ install_RPM() {
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_RPM llvm-devel $CLANG_DEV
|
||||
have_llvm=true
|
||||
LLVM_VERSION=`get_package_version_RPM llvm-devel`
|
||||
LLVM_VERSION=`llvm-config --version`
|
||||
LLVM_VERSION_FOUND=$LLVM_VERSION
|
||||
clean_LLVM
|
||||
else
|
||||
@@ -5126,7 +5129,7 @@ install_ARCH() {
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_ARCH llvm clang
|
||||
have_llvm=true
|
||||
LLVM_VERSION=`get_package_version_ARCH llvm`
|
||||
LLVM_VERSION=`llvm-config --version`
|
||||
LLVM_VERSION_FOUND=$LLVM_VERSION
|
||||
clean_LLVM
|
||||
else
|
||||
|
@@ -45,6 +45,18 @@ def get_cmake_options(builder):
|
||||
optix_sdk_dir = os.path.join(builder.blender_dir, '..', '..', 'NVIDIA-Optix-SDK')
|
||||
options.append('-DOPTIX_ROOT_DIR:PATH=' + optix_sdk_dir)
|
||||
|
||||
# Workaround to build sm_30 kernels with CUDA 10, since CUDA 11 no longer supports that architecture
|
||||
if builder.platform == 'win':
|
||||
options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1')
|
||||
options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe')
|
||||
options.append('-DCUDA11_TOOLKIT_ROOT_DIR:PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1')
|
||||
options.append('-DCUDA11_NVCC_EXECUTABLE:FILEPATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1/bin/nvcc.exe')
|
||||
elif builder.platform == 'linux':
|
||||
options.append('-DCUDA10_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-10.1')
|
||||
options.append('-DCUDA10_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-10.1/bin/nvcc')
|
||||
options.append('-DCUDA11_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-11.1')
|
||||
options.append('-DCUDA11_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-11.1/bin/nvcc')
|
||||
|
||||
options.append("-C" + os.path.join(builder.blender_dir, config_file))
|
||||
options.append("-DCMAKE_INSTALL_PREFIX=%s" % (builder.install_dir))
|
||||
|
||||
|
@@ -55,7 +55,7 @@ set(WITH_USD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75;compute_75 CACHE STRING "" FORCE)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75;sm_86;compute_75 CACHE STRING "" FORCE)
|
||||
set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE)
|
||||
|
||||
# platform dependent options
|
||||
|
@@ -302,14 +302,14 @@ function(blender_add_lib__impl
|
||||
#
|
||||
# What this code does it traverses library_deps and extracts information about whether
|
||||
# library is to provided as general, debug or optimized. This is a little state machine which
|
||||
# keeps track of whiuch build type library is to provided for:
|
||||
# keeps track of which build type library is to provided for:
|
||||
#
|
||||
# - If "debug" or "optimized" word is found, the next element in the list is expected to be
|
||||
# a library which will be passed to target_link_libraries() under corresponding build type.
|
||||
#
|
||||
# - If there is no "debug" or "optimized" used library is specified for all build types.
|
||||
#
|
||||
# NOTE: If separated libraries for debug and release ar eneeded every library is the list are
|
||||
# NOTE: If separated libraries for debug and release are needed every library is the list are
|
||||
# to be prefixed explicitly.
|
||||
#
|
||||
# Use: "optimized libfoo optimized libbar debug libfoo_d debug libbar_d"
|
||||
@@ -477,8 +477,8 @@ function(SETUP_LIBDIRS)
|
||||
|
||||
# NOTE: For all new libraries, use absolute library paths.
|
||||
# This should eventually be phased out.
|
||||
|
||||
if(NOT MSVC)
|
||||
# APPLE plaform uses full paths for linking libraries, and avoids link_directories.
|
||||
if(NOT MSVC AND NOT APPLE)
|
||||
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
|
||||
|
||||
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
|
||||
@@ -1241,8 +1241,16 @@ endmacro()
|
||||
|
||||
macro(without_system_libs_begin)
|
||||
set(CMAKE_IGNORE_PATH "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES};${CMAKE_SYSTEM_INCLUDE_PATH};${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES};${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}")
|
||||
if(APPLE)
|
||||
# Avoid searching for headers in frameworks (like Mono), and libraries in LIBDIR.
|
||||
set(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(without_system_libs_end)
|
||||
unset(CMAKE_IGNORE_PATH)
|
||||
if(APPLE)
|
||||
# FIRST is the default.
|
||||
set(CMAKE_FIND_FRAMEWORK FIRST)
|
||||
endif()
|
||||
endmacro()
|
||||
|
@@ -30,6 +30,36 @@ macro(find_package_wrapper)
|
||||
# do nothing, just satisfy the macro
|
||||
endmacro()
|
||||
|
||||
function(print_found_status
|
||||
lib_name
|
||||
lib_path
|
||||
)
|
||||
|
||||
if(FIRST_RUN)
|
||||
if(lib_path)
|
||||
message(STATUS "Found ${lib_name}: ${lib_path}")
|
||||
else()
|
||||
message(WARNING "Could NOT find ${lib_name}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Find system provided libraries.
|
||||
|
||||
# Find system ZLIB, not the pre-compiled one supplied with OpenCollada.
|
||||
set(ZLIB_ROOT /usr)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(BZip2 REQUIRED)
|
||||
list(APPEND ZLIB_LIBRARIES ${BZIP2_LIBRARIES})
|
||||
|
||||
if(WITH_OPENAL)
|
||||
find_package(OpenAL)
|
||||
if(NOT OPENAL_FOUND)
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED LIBDIR)
|
||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
|
||||
# Prefer lib directory paths
|
||||
@@ -42,22 +72,15 @@ if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENAL)
|
||||
find_package(OpenAL)
|
||||
if(OPENAL_FOUND)
|
||||
set(WITH_OPENAL ON)
|
||||
else()
|
||||
set(WITH_OPENAL OFF)
|
||||
endif()
|
||||
# -------------------------------------------------------------------------
|
||||
# Find precompiled libraries, and avoid system or user-installed ones.
|
||||
|
||||
if(EXISTS ${LIBDIR})
|
||||
without_system_libs_begin()
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
set(ALEMBIC ${LIBDIR}/alembic)
|
||||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES Alembic)
|
||||
set(ALEMBIC_FOUND ON)
|
||||
find_package(Alembic)
|
||||
endif()
|
||||
|
||||
if(WITH_USD)
|
||||
@@ -68,30 +91,38 @@ if(WITH_USD)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV)
|
||||
set(OPENSUBDIV ${LIBDIR}/opensubdiv)
|
||||
set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
|
||||
find_library(OSD_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
|
||||
find_library(OSD_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
|
||||
set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
|
||||
set(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
|
||||
list(APPEND OPENSUBDIV_LIBRARIES ${OSD_LIB_CPU} ${OSD_LIB_GPU})
|
||||
find_package(OpenSubdiv)
|
||||
endif()
|
||||
|
||||
if(WITH_JACK)
|
||||
find_library(JACK_FRAMEWORK
|
||||
NAMES jackmp
|
||||
)
|
||||
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
|
||||
if(NOT JACK_FRAMEWORK)
|
||||
set(WITH_JACK OFF)
|
||||
else()
|
||||
set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(LIBSNDFILE ${LIBDIR}/sndfile)
|
||||
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
|
||||
set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
||||
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
||||
find_package(SndFile)
|
||||
find_library(_sndfile_FLAC_LIBRARY NAMES flac HINTS ${LIBDIR}/sndfile/lib)
|
||||
find_library(_sndfile_OGG_LIBRARY NAMES ogg HINTS ${LIBDIR}/ffmpeg/lib)
|
||||
find_library(_sndfile_VORBIS_LIBRARY NAMES vorbis HINTS ${LIBDIR}/ffmpeg/lib)
|
||||
find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
|
||||
list(APPEND LIBSNDFILE_LIBRARIES
|
||||
${_sndfile_FLAC_LIBRARY}
|
||||
${_sndfile_OGG_LIBRARY}
|
||||
${_sndfile_VORBIS_LIBRARY}
|
||||
${_sndfile_VORBISENC_LIBRARY}
|
||||
)
|
||||
|
||||
print_found_status("SndFile libraries" "${LIBSNDFILE_LIBRARIES}")
|
||||
unset(_sndfile_FLAC_LIBRARY)
|
||||
unset(_sndfile_OGG_LIBRARY)
|
||||
unset(_sndfile_VORBIS_LIBRARY)
|
||||
unset(_sndfile_VORBISENC_LIBRARY)
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
@@ -130,54 +161,27 @@ if(WITH_PYTHON)
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
set(FFTW3 ${LIBDIR}/fftw3)
|
||||
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
|
||||
set(FFTW3_LIBRARIES fftw3)
|
||||
set(FFTW3_LIBPATH ${FFTW3}/lib)
|
||||
find_package(Fftw3)
|
||||
endif()
|
||||
|
||||
set(ZLIB /usr)
|
||||
set(ZLIB_INCLUDE_DIRS "${ZLIB}/include")
|
||||
set(ZLIB_LIBRARIES z bz2)
|
||||
|
||||
set(PNG_LIBRARIES png ${ZLIB_LIBRARIES})
|
||||
set(JPEG_LIBRARIES jpeg)
|
||||
|
||||
set(FREETYPE ${LIBDIR}/freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
|
||||
set(FREETYPE_LIBPATH ${FREETYPE}/lib)
|
||||
set(FREETYPE_LIBRARY freetype)
|
||||
find_package(Freetype REQUIRED)
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
|
||||
set(OPENEXR_LIBRARIES
|
||||
Iex
|
||||
Half
|
||||
IlmImf
|
||||
Imath
|
||||
IlmThread)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
find_package(OpenEXR)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG ${LIBDIR}/ffmpeg)
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
|
||||
set(FFMPEG_LIBRARIES
|
||||
set(FFMPEG_FIND_COMPONENTS
|
||||
avcodec avdevice avformat avutil
|
||||
mp3lame swscale x264 xvidcore
|
||||
theora theoradec theoraenc
|
||||
vorbis vorbisenc vorbisfile ogg opus
|
||||
vpx swresample)
|
||||
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
|
||||
mp3lame ogg opus swresample swscale
|
||||
theora theoradec theoraenc vorbis vorbisenc
|
||||
vorbisfile vpx x264 xvidcore)
|
||||
find_package(FFmpeg)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG OR WITH_CODEC_FFMPEG)
|
||||
# use openjpeg from libdir that is linked into ffmpeg
|
||||
set(OPENJPEG ${LIBDIR}/openjpeg)
|
||||
set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG}/include)
|
||||
set(OPENJPEG_LIBRARIES ${OPENJPEG}/lib/libopenjp2.a)
|
||||
find_package(OpenJPEG)
|
||||
endif()
|
||||
|
||||
find_library(SYSTEMSTUBS_LIBRARY
|
||||
@@ -207,77 +211,58 @@ if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
set(OPENCOLLADA ${LIBDIR}/opencollada)
|
||||
|
||||
set(OPENCOLLADA_INCLUDE_DIRS
|
||||
${LIBDIR}/opencollada/include/COLLADAStreamWriter
|
||||
${LIBDIR}/opencollada/include/COLLADABaseUtils
|
||||
${LIBDIR}/opencollada/include/COLLADAFramework
|
||||
${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader
|
||||
${LIBDIR}/opencollada/include/GeneratedSaxParser
|
||||
)
|
||||
|
||||
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
|
||||
set(OPENCOLLADA_LIBRARIES
|
||||
OpenCOLLADASaxFrameworkLoader
|
||||
-lOpenCOLLADAFramework
|
||||
-lOpenCOLLADABaseUtils
|
||||
-lOpenCOLLADAStreamWriter
|
||||
-lMathMLSolver
|
||||
-lGeneratedSaxParser
|
||||
-lbuffer -lftoa -lUTF
|
||||
)
|
||||
# PCRE and XML2 are bundled with OpenCollada.
|
||||
set(PCRE_LIBRARIES pcre)
|
||||
set(XML2_LIBRARIES xml2)
|
||||
find_package(OpenCOLLADA)
|
||||
find_library(PCRE_LIBRARIES NAMES pcre HINTS ${LIBDIR}/opencollada/lib)
|
||||
find_library(XML2_LIBRARIES NAMES xml2 HINTS ${LIBDIR}/opencollada/lib)
|
||||
print_found_status("PCRE" "${PCRE_LIBRARIES}")
|
||||
print_found_status("XML2" "${XML2_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
if(WITH_SDL)
|
||||
set(SDL ${LIBDIR}/sdl)
|
||||
set(SDL_INCLUDE_DIR ${SDL}/include)
|
||||
set(SDL_LIBRARY SDL2)
|
||||
set(SDL_LIBPATH ${SDL}/lib)
|
||||
find_package(SDL2)
|
||||
set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIRS})
|
||||
set(SDL_LIBRARY ${SDL2_LIBRARIES})
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback")
|
||||
endif()
|
||||
|
||||
set(PNG "${LIBDIR}/png")
|
||||
set(PNG_INCLUDE_DIRS "${PNG}/include")
|
||||
set(PNG_LIBPATH ${PNG}/lib)
|
||||
set(PNG_ROOT ${LIBDIR}/png)
|
||||
find_package(PNG REQUIRED)
|
||||
|
||||
set(JPEG "${LIBDIR}/jpeg")
|
||||
set(JPEG_INCLUDE_DIR "${JPEG}/include")
|
||||
set(JPEG_LIBPATH ${JPEG}/lib)
|
||||
set(JPEG_ROOT ${LIBDIR}/jpeg)
|
||||
find_package(JPEG REQUIRED)
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
set(TIFF ${LIBDIR}/tiff)
|
||||
set(TIFF_INCLUDE_DIR ${TIFF}/include)
|
||||
set(TIFF_LIBRARY tiff)
|
||||
set(TIFF_LIBPATH ${TIFF}/lib)
|
||||
set(TIFF_ROOT ${LIBDIR}/tiff)
|
||||
find_package(TIFF)
|
||||
if(NOT TIFF_FOUND)
|
||||
message(WARNING "TIFF not found, disabling WITH_IMAGE_TIFF")
|
||||
set(WITH_IMAGE_TIFF OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
set(BOOST_POSTFIX)
|
||||
set(BOOST_LIBRARIES
|
||||
boost_date_time${BOOST_POSTFIX}
|
||||
boost_filesystem${BOOST_POSTFIX}
|
||||
boost_regex${BOOST_POSTFIX}
|
||||
boost_system${BOOST_POSTFIX}
|
||||
boost_thread${BOOST_POSTFIX}
|
||||
boost_wave${BOOST_POSTFIX}
|
||||
)
|
||||
set(Boost_NO_BOOST_CMAKE ON)
|
||||
set(BOOST_ROOT ${LIBDIR}/boost)
|
||||
set(Boost_NO_SYSTEM_PATHS ON)
|
||||
set(_boost_FIND_COMPONENTS date_time filesystem regex system thread wave)
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND BOOST_LIBRARIES boost_locale${BOOST_POSTFIX})
|
||||
list(APPEND _boost_FIND_COMPONENTS locale)
|
||||
endif()
|
||||
if(WITH_CYCLES_NETWORK)
|
||||
list(APPEND BOOST_LIBRARIES boost_serialization${BOOST_POSTFIX})
|
||||
list(APPEND _boost_FIND_COMPONENTS serialization)
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND BOOST_LIBRARIES boost_iostreams${BOOST_POSTFIX})
|
||||
list(APPEND _boost_FIND_COMPONENTS iostreams)
|
||||
endif()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
find_package(Boost COMPONENTS ${_boost_FIND_COMPONENTS})
|
||||
|
||||
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_DEFINITIONS)
|
||||
|
||||
mark_as_advanced(Boost_LIBRARIES)
|
||||
mark_as_advanced(Boost_INCLUDE_DIRS)
|
||||
unset(_boost_FIND_COMPONENTS)
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
||||
@@ -285,10 +270,8 @@ if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OPENIMAGEIO_LIBRARIES
|
||||
${OPENIMAGEIO}/lib/libOpenImageIO.a
|
||||
find_package(OpenImageIO)
|
||||
list(APPEND OPENIMAGEIO_LIBRARIES
|
||||
${PNG_LIBRARIES}
|
||||
${JPEG_LIBRARIES}
|
||||
${TIFF_LIBRARY}
|
||||
@@ -296,30 +279,19 @@ if(WITH_OPENIMAGEIO)
|
||||
${OPENJPEG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
set(OPENIMAGEIO_LIBPATH
|
||||
${OPENIMAGEIO}/lib
|
||||
${JPEG_LIBPATH}
|
||||
${PNG_LIBPATH}
|
||||
${TIFF_LIBPATH}
|
||||
${OPENEXR_LIBPATH}
|
||||
${ZLIB_LIBPATH}
|
||||
)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBRARIES OpenColorIO tinyxml yaml-cpp)
|
||||
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
|
||||
find_package(OpenColorIO)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
|
||||
set(OPENVDB_LIBRARIES openvdb blosc)
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
find_package(OpenVDB)
|
||||
find_library(BLOSC_LIBRARIES NAMES blosc HINTS ${LIBDIR}/openvdb/lib)
|
||||
print_found_status("Blosc" "${BLOSC_LIBRARIES}")
|
||||
list(APPEND OPENVDB_LIBRARIES ${BLOSC_LIBRARIES})
|
||||
set(OPENVDB_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
@@ -329,41 +301,8 @@ if(WITH_NANOVDB)
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm)
|
||||
if(EXISTS "${LLVM_ROOT_DIR}/bin/llvm-config")
|
||||
set(LLVM_CONFIG "${LLVM_ROOT_DIR}/bin/llvm-config")
|
||||
else()
|
||||
set(LLVM_CONFIG llvm-config)
|
||||
endif()
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --version
|
||||
OUTPUT_VARIABLE LLVM_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --prefix
|
||||
OUTPUT_VARIABLE LLVM_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --includedir
|
||||
OUTPUT_VARIABLE LLVM_INCLUDE_DIRS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libdir
|
||||
OUTPUT_VARIABLE LLVM_LIBPATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
find_library(LLVM_LIBRARY
|
||||
NAMES LLVMAnalysis # first of a whole bunch of libs to get
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
|
||||
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
|
||||
if(LLVM_STATIC)
|
||||
# if static LLVM libraries were requested, use llvm-config to generate
|
||||
# the list of what libraries we need, and substitute that in the right
|
||||
# way for LLVM_LIBRARY.
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
|
||||
OUTPUT_VARIABLE LLVM_LIBRARY
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REPLACE ".a /" ".a;/" LLVM_LIBRARY ${LLVM_LIBRARY})
|
||||
else()
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
|
||||
endif()
|
||||
else()
|
||||
find_package(LLVM)
|
||||
if(NOT LLVM_FOUND)
|
||||
message(FATAL_ERROR "LLVM not found.")
|
||||
endif()
|
||||
endif()
|
||||
@@ -396,7 +335,10 @@ endif()
|
||||
|
||||
if(WITH_CYCLES_EMBREE)
|
||||
find_package(Embree 3.8.0 REQUIRED)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -stack_size -Xlinker 0x100000")
|
||||
# Increase stack size for Embree, only works for executables.
|
||||
if(NOT WITH_PYTHON_MODULE)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -stack_size -Xlinker 0x100000")
|
||||
endif()
|
||||
|
||||
# Embree static library linking can mix up SSE and AVX symbols, causing
|
||||
# crashes on macOS systems with older CPUs that don't have AVX. Using
|
||||
@@ -432,7 +374,7 @@ endif()
|
||||
|
||||
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
|
||||
if(WITH_OPENMP)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
|
||||
# Use OpenMP from our precompiled libraries.
|
||||
message(STATUS "Using ${LIBDIR}/openmp for OpenMP")
|
||||
set(OPENMP_CUSTOM ON)
|
||||
@@ -442,14 +384,22 @@ if(WITH_OPENMP)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L'${LIBDIR}/openmp/lib' -lomp")
|
||||
|
||||
# Copy libomp.dylib to allow executables like datatoc and tests to work.
|
||||
# `@executable_path/../Resources/lib/` is a default dylib search path.
|
||||
# For single config generator datatoc, tests etc.
|
||||
execute_process(
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
|
||||
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib
|
||||
)
|
||||
# For multi-config generator datatoc, etc.
|
||||
execute_process(
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
|
||||
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib
|
||||
)
|
||||
# For multi-config generator tests.
|
||||
execute_process(
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/tests/Resources/lib
|
||||
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/tests/Resources/lib/libomp.dylib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -469,6 +419,13 @@ if(WITH_GMP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(EXISTS ${LIBDIR})
|
||||
without_system_libs_end()
|
||||
endif()
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Set compiler and linker flags.
|
||||
|
||||
set(EXETYPE MACOSX_BUNDLE)
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
|
||||
|
@@ -720,14 +720,24 @@ if(WINDOWS_PYTHON_DEBUG)
|
||||
string(REPLACE "/" "\\" _group_path "${_source_path}")
|
||||
source_group("${_group_path}" FILES "${_source}")
|
||||
endforeach()
|
||||
# Include the user scripts from the profile folder in the blender_python_user_scripts project.
|
||||
set(USER_SCRIPTS_ROOT "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}")
|
||||
|
||||
# If the user scripts env var is set, include scripts from there otherwise
|
||||
# include user scripts in the profile folder.
|
||||
if(DEFINED ENV{BLENDER_USER_SCRIPTS})
|
||||
message(STATUS "Including user scripts from environment BLENDER_USER_SCRIPTS=$ENV{BLENDER_USER_SCRIPTS}")
|
||||
set(USER_SCRIPTS_ROOT "$ENV{BLENDER_USER_SCRIPTS}")
|
||||
else()
|
||||
message(STATUS "Including user scripts from the profile folder")
|
||||
# Include the user scripts from the profile folder in the blender_python_user_scripts project.
|
||||
set(USER_SCRIPTS_ROOT "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}/scripts")
|
||||
endif()
|
||||
|
||||
file(TO_CMAKE_PATH ${USER_SCRIPTS_ROOT} USER_SCRIPTS_ROOT)
|
||||
FILE(GLOB_RECURSE inFiles "${USER_SCRIPTS_ROOT}/scripts/*.*" )
|
||||
FILE(GLOB_RECURSE inFiles "${USER_SCRIPTS_ROOT}/*.*" )
|
||||
ADD_CUSTOM_TARGET(blender_python_user_scripts SOURCES ${inFiles})
|
||||
foreach(_source IN ITEMS ${inFiles})
|
||||
get_filename_component(_source_path "${_source}" PATH)
|
||||
string(REPLACE "${USER_SCRIPTS_ROOT}/scripts" "" _source_path "${_source_path}")
|
||||
string(REPLACE "${USER_SCRIPTS_ROOT}" "" _source_path "${_source_path}")
|
||||
string(REPLACE "/" "\\" _group_path "${_source_path}")
|
||||
source_group("${_group_path}" FILES "${_source}")
|
||||
endforeach()
|
||||
|
@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = "V2.91"
|
||||
PROJECT_NUMBER = "V2.92"
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@@ -9,15 +9,24 @@ When calling an operator you may want to pass the execution context.
|
||||
This determines the context that is given for the operator to run in, and whether
|
||||
invoke() is called or only execute().
|
||||
|
||||
'EXEC_DEFAULT' is used by default, running only the execute() method, but you may
|
||||
want the operator to take user interaction with 'INVOKE_DEFAULT' which will also
|
||||
``EXEC_DEFAULT`` is used by default, running only the ``execute()`` method, but you may
|
||||
want the operator to take user interaction with ``INVOKE_DEFAULT`` which will also
|
||||
call invoke() if existing.
|
||||
|
||||
The execution context is one of:
|
||||
('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS',
|
||||
'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT',
|
||||
'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA',
|
||||
'EXEC_SCREEN')
|
||||
|
||||
- ``INVOKE_DEFAULT``
|
||||
- ``INVOKE_REGION_WIN``
|
||||
- ``INVOKE_REGION_CHANNELS``
|
||||
- ``INVOKE_REGION_PREVIEW``
|
||||
- ``INVOKE_AREA``
|
||||
- ``INVOKE_SCREEN``
|
||||
- ``EXEC_DEFAULT``
|
||||
- ``EXEC_REGION_WIN``
|
||||
- ``EXEC_REGION_CHANNELS``
|
||||
- ``EXEC_REGION_PREVIEW``
|
||||
- ``EXEC_AREA``
|
||||
- ``EXEC_SCREEN``
|
||||
"""
|
||||
|
||||
# collection add popup
|
||||
|
@@ -33,11 +33,12 @@ fragment_shader = '''
|
||||
uniform float u_Scale;
|
||||
|
||||
in float v_ArcLength;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (step(sin(v_ArcLength * u_Scale), 0.5) == 1) discard;
|
||||
gl_FragColor = vec4(1.0);
|
||||
FragColor = vec4(1.0);
|
||||
}
|
||||
'''
|
||||
|
||||
|
@@ -23,10 +23,11 @@ fragment_shader = '''
|
||||
uniform float brightness;
|
||||
|
||||
in vec3 pos;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(pos * brightness, 1.0);
|
||||
FragColor = vec4(pos * brightness, 1.0);
|
||||
}
|
||||
'''
|
||||
|
||||
|
@@ -56,10 +56,11 @@ fragment_shader = '''
|
||||
uniform sampler2D image;
|
||||
|
||||
in vec2 uvInterp;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture(image, uvInterp);
|
||||
FragColor = texture(image, uvInterp);
|
||||
}
|
||||
'''
|
||||
|
||||
|
@@ -1,36 +0,0 @@
|
||||
"""
|
||||
Built-in shaders
|
||||
++++++++++++++++
|
||||
|
||||
All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.
|
||||
The value of it can only be modified using the :class:`gpu.matrix` module.
|
||||
|
||||
2D_UNIFORM_COLOR:
|
||||
attributes: vec3 pos
|
||||
uniforms: vec4 color
|
||||
|
||||
2D_FLAT_COLOR:
|
||||
attributes: vec3 pos, vec4 color
|
||||
uniforms: -
|
||||
|
||||
2D_SMOOTH_COLOR:
|
||||
attributes: vec3 pos, vec4 color
|
||||
uniforms: -
|
||||
|
||||
2D_IMAGE:
|
||||
attributes: vec3 pos, vec2 texCoord
|
||||
uniforms: sampler2D image
|
||||
|
||||
3D_UNIFORM_COLOR:
|
||||
attributes: vec3 pos
|
||||
uniforms: vec4 color
|
||||
|
||||
3D_FLAT_COLOR:
|
||||
attributes: vec3 pos, vec4 color
|
||||
uniforms: -
|
||||
|
||||
3D_SMOOTH_COLOR:
|
||||
attributes: vec3 pos, vec4 color
|
||||
uniforms: -
|
||||
|
||||
"""
|
@@ -13,16 +13,15 @@ than enough material to teach OpenGL programming, from books to many
|
||||
collections of tutorials.
|
||||
|
||||
Here is a comprehensive `list of books <https://www.khronos.org/developers/books/>`__ (non free).
|
||||
The `arcsynthesis tutorials <https://web.archive.org/web/20150225192611/http://www.arcsynthesis.org/gltut/index.html>`__
|
||||
is one of the best resources to learn modern OpenGL and
|
||||
`g-truc <http://www.g-truc.net/post-opengl-samples.html#menu>`__
|
||||
offers a set of extensive examples, including advanced features.
|
||||
`Learn OpenGL <https://learnopengl.com/>`__ is one of the best resources to learn modern OpenGL and
|
||||
`opengl-tutorial.org <http://www.opengl-tutorial.org/>`__ offers a set of extensive examples,
|
||||
including advanced features.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
You can use the :class:`Image` type to load and set textures.
|
||||
See :class:`Image.gl_load` and :class:`Image.gl_free`,
|
||||
You can use the :class:`bpy.types.Image` type to load and set textures.
|
||||
See :class:`bpy.types.Image.gl_load` and :class:`bpy.types.Image.gl_free`,
|
||||
for example.
|
||||
|
||||
|
||||
@@ -30,7 +29,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Bind a named texture to a texturing target
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glBindTexture.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glBindTexture.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the target to which the texture is bound.
|
||||
@@ -42,7 +41,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify pixel arithmetic
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glBlendFunc.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glBlendFunc.xhtml>`__
|
||||
|
||||
:type sfactor: Enumerated constant
|
||||
:arg sfactor: Specifies how the red, green, blue, and alpha source blending factors are
|
||||
@@ -56,7 +55,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Clear buffers to preset values
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glClear.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glClear.xhtml>`__
|
||||
|
||||
:type mask: Enumerated constant(s)
|
||||
:arg mask: Bitwise OR of masks that indicate the buffers to be cleared.
|
||||
@@ -66,7 +65,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify clear values for the color buffers
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glClearColor.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glClearColor.xhtml>`__
|
||||
|
||||
:type red, green, blue, alpha: float
|
||||
:arg red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the
|
||||
@@ -77,7 +76,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify the clear value for the depth buffer
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glClearDepth.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glClearDepth.xhtml>`__
|
||||
|
||||
:type depth: int
|
||||
:arg depth: Specifies the depth value used when the depth buffer is cleared.
|
||||
@@ -88,7 +87,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify the clear value for the stencil buffer
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glClearStencil.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glClearStencil.xhtml>`__
|
||||
|
||||
:type s: int
|
||||
:arg s: Specifies the index used when the stencil buffer is cleared. The initial value is 0.
|
||||
@@ -98,7 +97,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify a plane against which all geometry is clipped
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glClipPlane.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glClipPlane.xhtml>`__
|
||||
|
||||
:type plane: Enumerated constant
|
||||
:arg plane: Specifies which clipping plane is being positioned.
|
||||
@@ -117,7 +116,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set a new color.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glColor.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glColor.xhtml>`__
|
||||
|
||||
:type red, green, blue, alpha: Depends on function prototype.
|
||||
:arg red, green, blue: Specify new red, green, and blue values for the current color.
|
||||
@@ -129,7 +128,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Enable and disable writing of frame buffer color components
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glColorMask.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glColorMask.xhtml>`__
|
||||
|
||||
:type red, green, blue, alpha: int (boolean)
|
||||
:arg red, green, blue, alpha: Specify whether red, green, blue, and alpha can or cannot be
|
||||
@@ -141,7 +140,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Copy pixels into a 2D texture image
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glCopyTexImage2D.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glCopyTexImage2D.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the target texture.
|
||||
@@ -170,7 +169,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify whether front- or back-facing facets can be culled
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glCullFace.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glCullFace.xhtml>`__
|
||||
|
||||
:type mode: Enumerated constant
|
||||
:arg mode: Specifies whether front- or back-facing facets are candidates for culling.
|
||||
@@ -180,7 +179,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Delete named textures
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glDeleteTextures.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glDeleteTextures.xhtml>`__
|
||||
|
||||
:type n: int
|
||||
:arg n: Specifies the number of textures to be deleted
|
||||
@@ -192,7 +191,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify the value used for depth buffer comparisons
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glDepthFunc.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glDepthFunc.xhtml>`__
|
||||
|
||||
:type func: Enumerated constant
|
||||
:arg func: Specifies the depth comparison function.
|
||||
@@ -202,7 +201,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Enable or disable writing into the depth buffer
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glDepthMask.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glDepthMask.xhtml>`__
|
||||
|
||||
:type flag: int (boolean)
|
||||
:arg flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE,
|
||||
@@ -214,7 +213,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify mapping of depth values from normalized device coordinates to window coordinates
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glDepthRange.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glDepthRange.xhtml>`__
|
||||
|
||||
:type zNear: int
|
||||
:arg zNear: Specifies the mapping of the near clipping plane to window coordinates.
|
||||
@@ -228,7 +227,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Disable server-side GL capabilities
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glEnable.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glEnable.xhtml>`__
|
||||
|
||||
:type cap: Enumerated constant
|
||||
:arg cap: Specifies a symbolic constant indicating a GL capability.
|
||||
@@ -238,7 +237,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify which color buffers are to be drawn into
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glDrawBuffer.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glDrawBuffer.xhtml>`__
|
||||
|
||||
:type mode: Enumerated constant
|
||||
:arg mode: Specifies up to four color buffers to be drawn into.
|
||||
@@ -250,7 +249,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Flag edges as either boundary or non-boundary
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glEdgeFlag.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glEdgeFlag.xhtml>`__
|
||||
|
||||
:type flag: Depends of function prototype
|
||||
:arg flag: Specifies the current edge flag value.The initial value is GL_TRUE.
|
||||
@@ -260,7 +259,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Enable server-side GL capabilities
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glEnable.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glEnable.xhtml>`__
|
||||
|
||||
:type cap: Enumerated constant
|
||||
:arg cap: Specifies a symbolic constant indicating a GL capability.
|
||||
@@ -273,7 +272,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Evaluate enabled one- and two-dimensional maps
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glEvalCoord.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glEvalCoord.xhtml>`__
|
||||
|
||||
:type u: Depends on function prototype.
|
||||
:arg u: Specifies a value that is the domain coordinate u to the basis function defined
|
||||
@@ -291,7 +290,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Compute a one- or two-dimensional grid of points or lines
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glEvalMesh.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glEvalMesh.xhtml>`__
|
||||
|
||||
:type mode: Enumerated constant
|
||||
:arg mode: In glEvalMesh1, specifies whether to compute a one-dimensional
|
||||
@@ -306,7 +305,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Generate and evaluate a single point in a mesh
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glEvalPoint.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glEvalPoint.xhtml>`__
|
||||
|
||||
:type i: int
|
||||
:arg i: Specifies the integer value for grid domain variable i.
|
||||
@@ -318,7 +317,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Controls feedback mode
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glFeedbackBuffer.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glFeedbackBuffer.xhtml>`__
|
||||
|
||||
:type size: int
|
||||
:arg size: Specifies the maximum number of values that can be written into buffer.
|
||||
@@ -333,14 +332,14 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Block until all GL execution is complete
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glFinish.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glFinish.xhtml>`__
|
||||
|
||||
|
||||
.. function:: glFlush():
|
||||
|
||||
Force Execution of GL commands in finite time
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glFlush.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glFlush.xhtml>`__
|
||||
|
||||
|
||||
.. function:: glFog (pname, param):
|
||||
@@ -349,7 +348,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify fog parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glFog.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glFog.xhtml>`__
|
||||
|
||||
:type pname: Enumerated constant
|
||||
:arg pname: Specifies a single-valued fog parameter. If the function prototype
|
||||
@@ -364,7 +363,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Define front- and back-facing polygons
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glFrontFace.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glFrontFace.xhtml>`__
|
||||
|
||||
:type mode: Enumerated constant
|
||||
:arg mode: Specifies the orientation of front-facing polygons.
|
||||
@@ -374,7 +373,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Generate texture names
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGenTextures.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGenTextures.xhtml>`__
|
||||
|
||||
:type n: int
|
||||
:arg n: Specifies the number of textures name to be generated.
|
||||
@@ -388,7 +387,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return the value or values of a selected parameter
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGet.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGet.xhtml>`__
|
||||
|
||||
:type pname: Enumerated constant
|
||||
:arg pname: Specifies the parameter value to be returned.
|
||||
@@ -400,7 +399,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return error information
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetError.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetError.xhtml>`__
|
||||
|
||||
|
||||
.. function:: glGetLight (light, pname, params):
|
||||
@@ -409,7 +408,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return light source parameter values
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetLight.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetLight.xhtml>`__
|
||||
|
||||
:type light: Enumerated constant
|
||||
:arg light: Specifies a light source. The number of possible lights depends on the
|
||||
@@ -427,7 +426,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return evaluator parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetMap.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetMap.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the symbolic name of a map.
|
||||
@@ -443,7 +442,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return material parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetMaterial.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetMaterial.xhtml>`__
|
||||
|
||||
:type face: Enumerated constant
|
||||
:arg face: Specifies which of the two materials is being queried.
|
||||
@@ -460,7 +459,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return the specified pixel map
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetPixelMap.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetPixelMap.xhtml>`__
|
||||
|
||||
:type map: Enumerated constant
|
||||
:arg map: Specifies the name of the pixel map to return.
|
||||
@@ -472,7 +471,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return a string describing the current GL connection
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetString.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetString.xhtml>`__
|
||||
|
||||
:type name: Enumerated constant
|
||||
:arg name: Specifies a symbolic constant.
|
||||
@@ -485,7 +484,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return texture environment parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetTexEnv.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetTexEnv.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
|
||||
@@ -501,7 +500,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return texture coordinate generation parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetTexGen.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetTexGen.xhtml>`__
|
||||
|
||||
:type coord: Enumerated constant
|
||||
:arg coord: Specifies a texture coordinate.
|
||||
@@ -515,7 +514,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return a texture image
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetTexImage.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetTexImage.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies which texture is to be obtained.
|
||||
@@ -537,7 +536,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
return texture parameter values for a specific level of detail
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetTexLevelParameter.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetTexLevelParameter.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the symbolic name of the target texture.
|
||||
@@ -556,7 +555,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Return texture parameter values
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetTexParameter.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetTexParameter.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the symbolic name of the target texture.
|
||||
@@ -570,7 +569,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify implementation-specific hints
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glHint.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glHint.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies a symbolic constant indicating the behavior to be
|
||||
@@ -583,7 +582,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Test whether a capability is enabled
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glIsEnabled.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glIsEnabled.xhtml>`__
|
||||
|
||||
:type cap: Enumerated constant
|
||||
:arg cap: Specifies a constant representing a GL capability.
|
||||
@@ -593,7 +592,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Determine if a name corresponds to a texture
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glIsTexture.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glIsTexture.xhtml>`__
|
||||
|
||||
:type texture: unsigned int
|
||||
:arg texture: Specifies a value that may be the name of a texture.
|
||||
@@ -605,7 +604,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set the light source parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glLight.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glLight.xhtml>`__
|
||||
|
||||
:type light: Enumerated constant
|
||||
:arg light: Specifies a light. The number of lights depends on the implementation,
|
||||
@@ -625,7 +624,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set the lighting model parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glLightModel.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glLightModel.xhtml>`__
|
||||
|
||||
:type pname: Enumerated constant
|
||||
:arg pname: Specifies a single-value light model parameter.
|
||||
@@ -638,7 +637,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify the width of rasterized lines.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glLineWidth.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glLineWidth.xhtml>`__
|
||||
|
||||
:type width: float
|
||||
:arg width: Specifies the width of rasterized lines. The initial value is 1.
|
||||
@@ -650,7 +649,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Replace the current matrix with the specified matrix
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glLoadMatrix.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glLoadMatrix.xhtml>`__
|
||||
|
||||
:type m: :class:`bgl.Buffer` object. Depends on function prototype.
|
||||
:arg m: Specifies a pointer to 16 consecutive values, which are used as the elements
|
||||
@@ -661,7 +660,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify a logical pixel operation for color index rendering
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glLogicOp.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glLogicOp.xhtml>`__
|
||||
|
||||
:type opcode: Enumerated constant
|
||||
:arg opcode: Specifies a symbolic constant that selects a logical operation.
|
||||
@@ -673,7 +672,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Define a one-dimensional evaluator
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glMap1.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glMap1.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the kind of values that are generated by the evaluator.
|
||||
@@ -698,7 +697,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Define a two-dimensional evaluator
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glMap2.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glMap2.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the kind of values that are generated by the evaluator.
|
||||
@@ -739,7 +738,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Define a one- or two-dimensional mesh
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glMapGrid.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glMapGrid.xhtml>`__
|
||||
|
||||
:type un: int
|
||||
:arg un: Specifies the number of partitions in the grid range interval
|
||||
@@ -758,7 +757,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify material parameters for the lighting model.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glMaterial.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glMaterial.xhtml>`__
|
||||
|
||||
:type face: Enumerated constant
|
||||
:arg face: Specifies which face or faces are being updated. Must be one of:
|
||||
@@ -777,7 +776,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Multiply the current matrix with the specified matrix
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glMultMatrix.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glMultMatrix.xhtml>`__
|
||||
|
||||
:type m: :class:`bgl.Buffer` object. Depends on function prototype.
|
||||
:arg m: Points to 16 consecutive values that are used as the elements of a 4x4 column
|
||||
@@ -791,7 +790,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set the current normal vector
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glNormal.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glNormal.xhtml>`__
|
||||
|
||||
:type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only)
|
||||
:arg nx, ny, nz: Specify the x, y, and z coordinates of the new current normal.
|
||||
@@ -807,7 +806,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set up pixel transfer maps
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glPixelMap.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glPixelMap.xhtml>`__
|
||||
|
||||
:type map: Enumerated constant
|
||||
:arg map: Specifies a symbolic map name.
|
||||
@@ -823,7 +822,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set pixel storage modes
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glPixelStore.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glPixelStore.xhtml>`__
|
||||
|
||||
:type pname: Enumerated constant
|
||||
:arg pname: Specifies the symbolic name of the parameter to be set.
|
||||
@@ -839,7 +838,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set pixel transfer modes
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glPixelTransfer.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glPixelTransfer.xhtml>`__
|
||||
|
||||
:type pname: Enumerated constant
|
||||
:arg pname: Specifies the symbolic name of the pixel transfer parameter to be set.
|
||||
@@ -851,7 +850,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify the diameter of rasterized points
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glPointSize.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glPointSize.xhtml>`__
|
||||
|
||||
:type size: float
|
||||
:arg size: Specifies the diameter of rasterized points. The initial value is 1.
|
||||
@@ -861,7 +860,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Select a polygon rasterization mode
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glPolygonMode.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glPolygonMode.xhtml>`__
|
||||
|
||||
:type face: Enumerated constant
|
||||
:arg face: Specifies the polygons that mode applies to.
|
||||
@@ -876,7 +875,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set the scale and units used to calculate depth values
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glPolygonOffset.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glPolygonOffset.xhtml>`__
|
||||
|
||||
:type factor: float
|
||||
:arg factor: Specifies a scale factor that is used to create a variable depth
|
||||
@@ -896,7 +895,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify the raster position for pixel operations
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glRasterPos.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glRasterPos.xhtml>`__
|
||||
|
||||
:type x, y, z, w: Depends on function prototype. (z and w for '3' and '4' prototypes only)
|
||||
:arg x, y, z, w: Specify the x,y,z, and w object coordinates (if present) for the
|
||||
@@ -928,7 +927,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Select a color buffer source for pixels.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glReadBuffer.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glReadBuffer.xhtml>`__
|
||||
|
||||
:type mode: Enumerated constant
|
||||
:arg mode: Specifies a color buffer.
|
||||
@@ -938,7 +937,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Read a block of pixels from the frame buffer
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glReadPixels.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glReadPixels.xhtml>`__
|
||||
|
||||
:type x, y: int
|
||||
:arg x, y: Specify the window coordinates of the first pixel that is read
|
||||
@@ -961,7 +960,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Draw a rectangle
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glRect.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glRect.xhtml>`__
|
||||
|
||||
:type x1, y1: Depends on function prototype. (for non 'v' prototypes only)
|
||||
:arg x1, y1: Specify one vertex of a rectangle
|
||||
@@ -978,7 +977,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Multiply the current matrix by a rotation matrix
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glRotate.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glRotate.xhtml>`__
|
||||
|
||||
:type angle: Depends on function prototype.
|
||||
:arg angle: Specifies the angle of rotation in degrees.
|
||||
@@ -992,7 +991,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Multiply the current matrix by a general scaling matrix
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glScale.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glScale.xhtml>`__
|
||||
|
||||
:type x, y, z: Depends on function prototype.
|
||||
:arg x, y, z: Specify scale factors along the x, y, and z axes, respectively.
|
||||
@@ -1002,7 +1001,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Define the scissor box
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glScissor.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glScissor.xhtml>`__
|
||||
|
||||
:type x, y: int
|
||||
:arg x, y: Specify the lower left corner of the scissor box. Initially (0, 0).
|
||||
@@ -1016,7 +1015,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set function and reference value for stencil testing
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man/docbook4/xhtml/glStencilFunc.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man/docbook4/xhtml/glStencilFunc.xhtml>`__
|
||||
|
||||
:type func: Enumerated constant
|
||||
:arg func: Specifies the test function.
|
||||
@@ -1033,7 +1032,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Control the writing of individual bits in the stencil planes
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glStencilMask.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glStencilMask.xhtml>`__
|
||||
|
||||
:type mask: unsigned int
|
||||
:arg mask: Specifies a bit mask to enable and disable writing of individual bits
|
||||
@@ -1044,7 +1043,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set stencil test actions
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glStencilOp.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glStencilOp.xhtml>`__
|
||||
|
||||
:type fail: Enumerated constant
|
||||
:arg fail: Specifies the action to take when the stencil test fails.
|
||||
@@ -1072,7 +1071,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set the current texture coordinates
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glTexCoord.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glTexCoord.xhtml>`__
|
||||
|
||||
:type s, t, r, q: Depends on function prototype. (r and q for '3' and '4' prototypes only)
|
||||
:arg s, t, r, q: Specify s, t, r, and q texture coordinates. Not all parameters are
|
||||
@@ -1088,7 +1087,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set texture environment parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glTexEnv.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
|
||||
@@ -1107,7 +1106,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Control the generation of texture coordinates
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glTexGen.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glTexGen.xhtml>`__
|
||||
|
||||
:type coord: Enumerated constant
|
||||
:arg coord: Specifies a texture coordinate.
|
||||
@@ -1125,7 +1124,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify a one-dimensional texture image
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glTexImage1D.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage1D.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the target texture.
|
||||
@@ -1152,7 +1151,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Specify a two-dimensional texture image
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glTexImage2D.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the target texture.
|
||||
@@ -1185,7 +1184,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set texture parameters
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glTexParameter.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glTexParameter.xhtml>`__
|
||||
|
||||
:type target: Enumerated constant
|
||||
:arg target: Specifies the target texture.
|
||||
@@ -1202,7 +1201,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Multiply the current matrix by a translation matrix
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glTranslate.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glTranslate.xhtml>`__
|
||||
|
||||
:type x, y, z: Depends on function prototype.
|
||||
:arg x, y, z: Specify the x, y, and z coordinates of a translation vector.
|
||||
@@ -1212,7 +1211,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Set the viewport
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glViewport.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glViewport.xhtml>`__
|
||||
|
||||
:type x, y: int
|
||||
:arg x, y: Specify the lower left corner of the viewport rectangle,
|
||||
@@ -1227,7 +1226,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Installs a program object as part of current rendering state
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glUseProgram.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glUseProgram.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the handle of the program object whose executables are to be used as part of current rendering state.
|
||||
@@ -1237,7 +1236,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Validates a program object
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glValidateProgram.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glValidateProgram.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the handle of the program object to be validated.
|
||||
@@ -1247,7 +1246,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Links a program object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glLinkProgram.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glLinkProgram.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the handle of the program object to be linked.
|
||||
@@ -1257,7 +1256,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Select active texture unit.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glActiveTexture.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glActiveTexture.xhtml>`__
|
||||
|
||||
:type texture: int
|
||||
:arg texture: Constant in ``GL_TEXTURE0`` 0 - 8
|
||||
@@ -1267,7 +1266,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Attaches a shader object to a program object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glAttachShader.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glAttachShader.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the program object to which a shader object will be attached.
|
||||
@@ -1279,7 +1278,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Compiles a shader object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glCompileShader.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glCompileShader.xhtml>`__
|
||||
|
||||
:type shader: int
|
||||
:arg shader: Specifies the shader object to be compiled.
|
||||
@@ -1289,7 +1288,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Creates a program object
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glCreateProgram.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glCreateProgram.xhtml>`__
|
||||
|
||||
:rtype: int
|
||||
:return: The new program or zero if an error occurs.
|
||||
@@ -1299,7 +1298,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Creates a shader object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glCreateShader.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glCreateShader.xhtml>`__
|
||||
|
||||
:type shaderType: Specifies the type of shader to be created.
|
||||
Must be one of ``GL_VERTEX_SHADER``,
|
||||
@@ -1316,7 +1315,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Deletes a program object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glDeleteProgram.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glDeleteProgram.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the program object to be deleted.
|
||||
@@ -1326,7 +1325,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Deletes a shader object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glDeleteShader.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glDeleteShader.xhtml>`__
|
||||
|
||||
:type shader: int
|
||||
:arg shader: Specifies the shader object to be deleted.
|
||||
@@ -1336,7 +1335,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Detaches a shader object from a program object to which it is attached.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glDetachShader.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glDetachShader.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the program object from which to detach the shader object.
|
||||
@@ -1348,7 +1347,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Returns the handles of the shader objects attached to a program object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetAttachedShaders.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetAttachedShaders.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the program object to be queried.
|
||||
@@ -1364,7 +1363,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Returns the information log for a program object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetProgramInfoLog.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetProgramInfoLog.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the program object whose information log is to be queried.
|
||||
@@ -1380,7 +1379,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Returns the information log for a shader object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetShaderInfoLog.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetShaderInfoLog.xhtml>`__
|
||||
|
||||
:type shader: int
|
||||
:arg shader: Specifies the shader object whose information log is to be queried.
|
||||
@@ -1396,7 +1395,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Returns a parameter from a program object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetProgram.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetProgram.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies the program object to be queried.
|
||||
@@ -1410,7 +1409,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Determines if a name corresponds to a shader object.
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glIsShader.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glIsShader.xhtml>`__
|
||||
|
||||
:type shader: int
|
||||
:arg shader: Specifies a potential shader object.
|
||||
@@ -1420,7 +1419,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Determines if a name corresponds to a program object
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glIsProgram.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glIsProgram.xhtml>`__
|
||||
|
||||
:type program: int
|
||||
:arg program: Specifies a potential program object.
|
||||
@@ -1430,7 +1429,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
Returns the source code string from a shader object
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glGetShaderSource.xml>`__
|
||||
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glGetShaderSource.xhtml>`__
|
||||
|
||||
:type shader: int
|
||||
:arg shader: Specifies the shader object to be queried.
|
||||
|
@@ -5,17 +5,6 @@
|
||||
--partial bmesh* ; cd doc/python_api ; sphinx-build sphinx-in sphinx-out ; cd ../../
|
||||
|
||||
|
||||
Submodules:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
bmesh.ops.rst
|
||||
bmesh.types.rst
|
||||
bmesh.utils.rst
|
||||
bmesh.geometry.rst
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
|
@@ -49,10 +49,6 @@ This module gives access to low level bmesh operations.
|
||||
Most operators take input and return output, they can be chained together
|
||||
to perform useful operations.
|
||||
|
||||
.. note::
|
||||
|
||||
This API us new in 2.65 and not yet well tested.
|
||||
|
||||
|
||||
Operator Example
|
||||
++++++++++++++++
|
||||
|
@@ -92,7 +92,7 @@ SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
# For now, ignore add-ons and internal subclasses of 'bpy.types.PropertyGroup'.
|
||||
#
|
||||
# Besides disabling this line, the main change will be to add a
|
||||
# 'toctree' to 'write_rst_contents' which contains the generated rst files.
|
||||
# 'toctree' to 'write_rst_index' which contains the generated rst files.
|
||||
# This 'toctree' can be generated automatically.
|
||||
#
|
||||
# See: D6261 for reference.
|
||||
@@ -244,6 +244,7 @@ else:
|
||||
"bpy.types", # supports filtering
|
||||
"bpy.utils",
|
||||
"bpy.utils.previews",
|
||||
"bpy.utils.units",
|
||||
"bpy_extras",
|
||||
"gpu",
|
||||
"gpu.types",
|
||||
@@ -495,6 +496,13 @@ else:
|
||||
bpy_struct = None
|
||||
|
||||
|
||||
def import_value_from_module(module_name, import_name):
|
||||
ns = {}
|
||||
exec_str = "from %s import %s as value" % (module_name, import_name)
|
||||
exec(exec_str, ns, ns)
|
||||
return ns["value"]
|
||||
|
||||
|
||||
def escape_rst(text):
|
||||
""" Escape plain text which may contain characters used by RST.
|
||||
"""
|
||||
@@ -744,13 +752,12 @@ def pyprop2sphinx(ident, fw, identifier, py_prop):
|
||||
else:
|
||||
fw(ident + ".. attribute:: %s\n\n" % identifier)
|
||||
write_indented_lines(ident + " ", fw, py_prop.__doc__)
|
||||
fw("\n")
|
||||
if py_prop.fset is None:
|
||||
fw(ident + " (readonly)\n\n")
|
||||
else:
|
||||
fw("\n")
|
||||
|
||||
|
||||
def pymodule2sphinx(basepath, module_name, module, title):
|
||||
def pymodule2sphinx(basepath, module_name, module, title, module_all_extra):
|
||||
import types
|
||||
attribute_set = set()
|
||||
filepath = os.path.join(basepath, module_name + ".rst")
|
||||
@@ -797,42 +804,51 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
fw(module.__doc__.strip())
|
||||
fw("\n\n")
|
||||
|
||||
write_example_ref("", fw, module_name)
|
||||
|
||||
# write submodules
|
||||
# we could also scan files but this ensures __all__ is used correctly
|
||||
if module_all is not None:
|
||||
if module_all or module_all_extra:
|
||||
submod_name = None
|
||||
submod = None
|
||||
submod_ls = []
|
||||
for submod_name in module_all:
|
||||
ns = {}
|
||||
exec_str = "from %s import %s as submod" % (module.__name__, submod_name)
|
||||
exec(exec_str, ns, ns)
|
||||
submod = ns["submod"]
|
||||
for submod_name in (module_all or ()):
|
||||
submod = import_value_from_module(module_name, submod_name)
|
||||
if type(submod) == types.ModuleType:
|
||||
submod_ls.append((submod_name, submod))
|
||||
|
||||
for submod_name in module_all_extra:
|
||||
if submod_name in attribute_set:
|
||||
continue
|
||||
submod = import_value_from_module(module_name, submod_name)
|
||||
# No type checks, since there are non-module types we treat as modules
|
||||
# such as `bpy.app.translations` & `bpy.app.handlers`.
|
||||
submod_ls.append((submod_name, submod))
|
||||
|
||||
del submod_name
|
||||
del submod
|
||||
|
||||
if submod_ls:
|
||||
fw(".. toctree::\n")
|
||||
fw(" :maxdepth: 1\n\n")
|
||||
fw(" :maxdepth: 1\n")
|
||||
fw(" :caption: Submodules\n\n")
|
||||
|
||||
for submod_name, submod in submod_ls:
|
||||
submod_name_full = "%s.%s" % (module_name, submod_name)
|
||||
fw(" %s.rst\n\n" % submod_name_full)
|
||||
fw(" %s.rst\n" % submod_name_full)
|
||||
|
||||
pymodule2sphinx(basepath, submod_name_full, submod, "%s submodule" % module_name)
|
||||
pymodule2sphinx(basepath, submod_name_full, submod, "%s submodule" % module_name, ())
|
||||
fw("\n")
|
||||
del submod_ls
|
||||
# done writing submodules!
|
||||
|
||||
write_example_ref("", fw, module_name)
|
||||
|
||||
# write members of the module
|
||||
# only tested with PyStructs which are not exactly modules
|
||||
for key, descr in sorted(type(module).__dict__.items()):
|
||||
if key.startswith("__"):
|
||||
continue
|
||||
if key in module_all_extra:
|
||||
continue
|
||||
# naughty, we also add getset's into PyStructs, this is not typical py but also not incorrect.
|
||||
|
||||
# type_name is only used for examples and messages
|
||||
@@ -855,6 +871,8 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
# sort by the valye type
|
||||
descr_sorted.sort(key=lambda descr_data: str(descr_data[3]))
|
||||
for key, descr, value, value_type in descr_sorted:
|
||||
if key in module_all_extra:
|
||||
continue
|
||||
|
||||
# must be documented as a submodule
|
||||
if is_struct_seq(value):
|
||||
@@ -896,6 +914,9 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
module_dir_value_type.sort(key=lambda triple: str(triple[2]))
|
||||
|
||||
for attribute, value, value_type in module_dir_value_type:
|
||||
if attribute in module_all_extra:
|
||||
continue
|
||||
|
||||
if value_type == FunctionType:
|
||||
pyfunc2sphinx("", fw, module_name, None, attribute, value, is_class=False)
|
||||
# both the same at the moment but to be future proof
|
||||
@@ -1054,6 +1075,7 @@ context_type_map = {
|
||||
"selected_bones": ("EditBone", True),
|
||||
"selected_editable_bones": ("EditBone", True),
|
||||
"selected_editable_fcurves": ("FCurve", True),
|
||||
"selected_editable_keyframes": ("Keyframe", True),
|
||||
"selected_editable_objects": ("Object", True),
|
||||
"selected_editable_sequences": ("Sequence", True),
|
||||
"selected_nla_strips": ("NlaStrip", True),
|
||||
@@ -1312,7 +1334,7 @@ def pyrna2sphinx(basepath):
|
||||
|
||||
fw(title_string(title, "="))
|
||||
|
||||
fw(".. module:: %s\n\n" % struct_module_name)
|
||||
fw(".. currentmodule:: %s\n\n" % struct_module_name)
|
||||
|
||||
# docs first?, ok
|
||||
write_example_ref("", fw, "%s.%s" % (struct_module_name, struct_id))
|
||||
@@ -1543,8 +1565,7 @@ def pyrna2sphinx(basepath):
|
||||
|
||||
fw(title_string(class_name, "="))
|
||||
|
||||
fw(".. module:: %s\n" % class_module_name)
|
||||
fw("\n")
|
||||
fw(".. currentmodule:: %s\n\n" % class_module_name)
|
||||
|
||||
if use_subclasses:
|
||||
subclass_ids = [
|
||||
@@ -1558,7 +1579,7 @@ def pyrna2sphinx(basepath):
|
||||
fw(".. class:: %s\n\n" % class_name)
|
||||
fw(" %s\n\n" % descr_str)
|
||||
fw(" .. note::\n\n")
|
||||
fw(" Note that %s.%s is not actually available from within Blender,\n"
|
||||
fw(" Note that :class:`%s.%s` is not actually available from within Blender,\n"
|
||||
" it only exists for the purpose of documentation.\n\n" % (class_module_name, class_name))
|
||||
|
||||
descr_items = [
|
||||
@@ -1673,15 +1694,26 @@ def write_sphinx_conf_py(basepath):
|
||||
fw("]\n\n")
|
||||
|
||||
fw("html_title = 'Blender Python API'\n")
|
||||
fw("html_theme = 'sphinx_rtd_theme'\n")
|
||||
fw("html_theme_options = {\n")
|
||||
fw(" 'canonical_url': 'https://docs.blender.org/api/current/',\n")
|
||||
# fw(" 'analytics_id': '',\n")
|
||||
# fw(" 'collapse_navigation': True,\n")
|
||||
fw(" 'sticky_navigation': False,\n")
|
||||
fw(" 'navigation_depth': 1,\n")
|
||||
# fw(" 'includehidden': True,\n")
|
||||
# fw(" 'titles_only': False\n")
|
||||
|
||||
fw("html_theme = 'default'\n")
|
||||
# The theme 'sphinx_rtd_theme' is no longer distributed with sphinx by default, only use when available.
|
||||
fw(r"""
|
||||
try:
|
||||
__import__('sphinx_rtd_theme')
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
except ModuleNotFoundError:
|
||||
pass
|
||||
""")
|
||||
|
||||
fw("if html_theme == 'sphinx_rtd_theme':\n")
|
||||
fw(" html_theme_options = {\n")
|
||||
fw(" 'canonical_url': 'https://docs.blender.org/api/current/',\n")
|
||||
# fw(" 'analytics_id': '',\n")
|
||||
# fw(" 'collapse_navigation': True,\n")
|
||||
fw(" 'sticky_navigation': False,\n")
|
||||
fw(" 'navigation_depth': 1,\n")
|
||||
# fw(" 'includehidden': True,\n")
|
||||
# fw(" 'titles_only': False\n")
|
||||
fw(" }\n\n")
|
||||
|
||||
# not helpful since the source is generated, adds to upload size.
|
||||
@@ -1730,7 +1762,7 @@ def execfile(filepath):
|
||||
file_handle.close()
|
||||
|
||||
|
||||
def write_rst_contents(basepath):
|
||||
def write_rst_index(basepath):
|
||||
'''
|
||||
Write the rst file of the main page, needed for sphinx (index.html)
|
||||
'''
|
||||
@@ -1770,7 +1802,6 @@ def write_rst_contents(basepath):
|
||||
|
||||
# py modules
|
||||
"bpy.utils",
|
||||
"bpy.utils.previews",
|
||||
"bpy.path",
|
||||
"bpy.app",
|
||||
|
||||
@@ -1808,6 +1839,10 @@ def write_rst_contents(basepath):
|
||||
fw(" %s\n" % mod)
|
||||
fw("\n")
|
||||
|
||||
fw(title_string("Indices", "="))
|
||||
fw("* :ref:`genindex`\n")
|
||||
fw("* :ref:`modindex`\n\n")
|
||||
|
||||
# special case, this 'bmesh.ops.rst' is extracted from C source
|
||||
if "bmesh.ops" not in EXCLUDE_MODULES:
|
||||
execfile(os.path.join(SCRIPT_DIR, "rst_from_bmesh_opdefines.py"))
|
||||
@@ -1843,6 +1878,7 @@ def write_rst_types_index(basepath):
|
||||
file = open(filepath, "w", encoding="utf-8")
|
||||
fw = file.write
|
||||
fw(title_string("Types (bpy.types)", "="))
|
||||
fw(".. module:: bpy.types\n\n")
|
||||
fw(".. toctree::\n")
|
||||
fw(" :glob:\n\n")
|
||||
fw(" bpy.types.*\n\n")
|
||||
@@ -1858,8 +1894,10 @@ def write_rst_ops_index(basepath):
|
||||
file = open(filepath, "w", encoding="utf-8")
|
||||
fw = file.write
|
||||
fw(title_string("Operators (bpy.ops)", "="))
|
||||
fw(".. module:: bpy.ops\n\n")
|
||||
write_example_ref("", fw, "bpy.ops")
|
||||
fw(".. toctree::\n")
|
||||
fw(" :caption: Submodules\n")
|
||||
fw(" :glob:\n\n")
|
||||
fw(" bpy.ops.*\n\n")
|
||||
file.close()
|
||||
@@ -1884,7 +1922,7 @@ def write_rst_msgbus(basepath):
|
||||
file.close()
|
||||
|
||||
# Write the contents.
|
||||
pymodule2sphinx(basepath, 'bpy.msgbus', bpy.msgbus, 'Message Bus')
|
||||
pymodule2sphinx(basepath, 'bpy.msgbus', bpy.msgbus, 'Message Bus', ())
|
||||
EXAMPLE_SET_USED.add("bpy.msgbus")
|
||||
|
||||
|
||||
@@ -1899,7 +1937,7 @@ def write_rst_data(basepath):
|
||||
file = open(filepath, "w", encoding="utf-8")
|
||||
fw = file.write
|
||||
fw(title_string("Data Access (bpy.data)", "="))
|
||||
fw(".. module:: bpy\n")
|
||||
fw(".. module:: bpy.data\n")
|
||||
fw("\n")
|
||||
fw("This module is used for all Blender/Python access.\n")
|
||||
fw("\n")
|
||||
@@ -1936,6 +1974,7 @@ def write_rst_importable_modules(basepath):
|
||||
"gpu.select": "GPU Select",
|
||||
"gpu.shader": "GPU Shader",
|
||||
"bmesh": "BMesh Module",
|
||||
"bmesh.ops": "BMesh Operators",
|
||||
"bmesh.types": "BMesh Types",
|
||||
"bmesh.utils": "BMesh Utilities",
|
||||
"bmesh.geometry": "BMesh Geometry Utilities",
|
||||
@@ -1961,11 +2000,32 @@ def write_rst_importable_modules(basepath):
|
||||
"freestyle.shaders": "Freestyle Shaders",
|
||||
"freestyle.utils": "Freestyle Utilities",
|
||||
}
|
||||
|
||||
# This is needed since some of the sub-modules listed above are not actual modules.
|
||||
# Examples include `bpy.app.translations` & `bpy.app.handlers`.
|
||||
#
|
||||
# Most of these are `PyStructSequence` internally,
|
||||
# however we don't want to document all of these as modules since some only contain
|
||||
# a few values (version number for e.g).
|
||||
#
|
||||
# If we remove this logic and document all `PyStructSequence` as sub-modules it means
|
||||
# `bpy.app.timers` for example would be presented on the same level as library information
|
||||
# access such as `bpy.app.sdl` which doesn't seem useful since it hides more useful
|
||||
# module-like objects among library data access.
|
||||
importable_modules_parent_map = {}
|
||||
for mod_name in importable_modules.keys():
|
||||
if mod_name in EXCLUDE_MODULES:
|
||||
continue
|
||||
if "." in mod_name:
|
||||
mod_name, submod_name = mod_name.rsplit(".", 1)
|
||||
importable_modules_parent_map.setdefault(mod_name, []).append(submod_name)
|
||||
|
||||
for mod_name, mod_descr in importable_modules.items():
|
||||
if mod_name not in EXCLUDE_MODULES:
|
||||
module = __import__(mod_name,
|
||||
fromlist=[mod_name.rsplit(".", 1)[-1]])
|
||||
pymodule2sphinx(basepath, mod_name, module, mod_descr)
|
||||
if mod_name in EXCLUDE_MODULES:
|
||||
continue
|
||||
module_all_extra = importable_modules_parent_map.get(mod_name, ())
|
||||
module = __import__(mod_name, fromlist=[mod_name.rsplit(".", 1)[-1]])
|
||||
pymodule2sphinx(basepath, mod_name, module, mod_descr, module_all_extra)
|
||||
|
||||
|
||||
def copy_handwritten_rsts(basepath):
|
||||
@@ -2030,7 +2090,7 @@ def rna2sphinx(basepath):
|
||||
write_sphinx_conf_py(basepath)
|
||||
|
||||
# main page
|
||||
write_rst_contents(basepath)
|
||||
write_rst_index(basepath)
|
||||
|
||||
# context
|
||||
if "bpy.context" not in EXCLUDE_MODULES:
|
||||
|
@@ -27,22 +27,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Get the number of cores for threaded build
|
||||
ifndef NPROCS
|
||||
NPROCS:=1
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell nproc)
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell getconf NPROCESSORS_ONLN)
|
||||
endif
|
||||
ifneq (,$(filter $(OS),Darwin FreeBSD))
|
||||
NPROCS:=$(shell sysctl -n hw.ncpu)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Blender Version & Info
|
||||
|
||||
@@ -92,7 +76,7 @@ fi
|
||||
# Generate HTML (sphinx)
|
||||
|
||||
if $DO_OUT_HTML ; then
|
||||
sphinx-build -b html -j $(NPROCS) $SPHINX_WORKDIR/sphinx-in $SPHINX_WORKDIR/sphinx-out
|
||||
sphinx-build -b html -j auto $SPHINX_WORKDIR/sphinx-in $SPHINX_WORKDIR/sphinx-out
|
||||
|
||||
# XXX, saves space on upload and zip, should move HTML outside
|
||||
# and zip up there, for now this is OK
|
||||
@@ -119,7 +103,7 @@ fi
|
||||
# Generate PDF (sphinx/laytex)
|
||||
|
||||
if $DO_OUT_PDF ; then
|
||||
sphinx-build -n -b latex -j $(NPROCS) $SPHINX_WORKDIR/sphinx-in $SPHINX_WORKDIR/sphinx-out
|
||||
sphinx-build -n -b latex -j auto $SPHINX_WORKDIR/sphinx-in $SPHINX_WORKDIR/sphinx-out
|
||||
make -C $SPHINX_WORKDIR/sphinx-out
|
||||
mv $SPHINX_WORKDIR/sphinx-out/contents.pdf \
|
||||
$SPHINX_WORKDIR/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf
|
||||
|
@@ -9,3 +9,7 @@
|
||||
/* Hide home icon in search area */
|
||||
.wy-side-nav-search > a:hover {background: none; opacity: 0.9}
|
||||
.wy-side-nav-search > a.icon::before {content: none}
|
||||
|
||||
.wy-nav-content {
|
||||
max-width: 1000px !important;
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ PlaybackManager_dealloc(PlaybackManagerP* self)
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(M_aud_PlaybackManager_play_doc,
|
||||
".. classmethod:: setVolume(sound, catKey)\n\n"
|
||||
".. classmethod:: play(sound, catKey)\n\n"
|
||||
" Plays a sound through the playback manager and assigns it to a category.\n\n"
|
||||
" :arg sound: The sound to play.\n"
|
||||
" :type sound: :class:`Sound`\n"
|
||||
|
11
extern/mantaflow/CMakeLists.txt
vendored
11
extern/mantaflow/CMakeLists.txt
vendored
@@ -31,6 +31,17 @@ if(MSVC_CLANG AND WITH_OPENMP AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.1
|
||||
remove_cc_flag("-fopenmp")
|
||||
endif()
|
||||
|
||||
# Exporting functions from the blender binary gives linker warnings on Apple arm64 systems.
|
||||
# For now and until Apple arm64 is officially supported, these will just be silenced here.
|
||||
# TODO (sebbas): Check if official arm64 devices give linker warnings without this block.
|
||||
|
||||
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64"))
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(MANTAVERSION "0.13")
|
||||
|
||||
add_definitions(-DWITH_FLUID=1)
|
||||
|
139
extern/mantaflow/preprocessed/fileio/iovdb.cpp
vendored
139
extern/mantaflow/preprocessed/fileio/iovdb.cpp
vendored
@@ -60,7 +60,7 @@ template<class GridType, class T> void importVDB(typename GridType::Ptr from, Gr
|
||||
template<class VDBType, class T>
|
||||
void importVDB(VDBType vdbValue, ParticleDataImpl<T> *to, int index, float voxelSize)
|
||||
{
|
||||
(void)voxelSize; // Unused
|
||||
unusedParameter(voxelSize); // Unused for now
|
||||
T toMantaValue;
|
||||
convertFrom(vdbValue, &toMantaValue);
|
||||
to->set(index, toMantaValue);
|
||||
@@ -165,12 +165,12 @@ static void setGridOptions(typename GridType::Ptr grid,
|
||||
string name,
|
||||
openvdb::GridClass cls,
|
||||
float voxelSize,
|
||||
bool precisionHalf)
|
||||
int precision)
|
||||
{
|
||||
grid->setTransform(openvdb::math::Transform::createLinearTransform(voxelSize));
|
||||
grid->setGridClass(cls);
|
||||
grid->setName(name);
|
||||
grid->setSaveFloatAsHalf(precisionHalf);
|
||||
grid->setSaveFloatAsHalf(precision == PRECISION_MINI || precision == PRECISION_HALF);
|
||||
}
|
||||
|
||||
template<class T, class GridType> typename GridType::Ptr exportVDB(Grid<T> *from)
|
||||
@@ -194,7 +194,8 @@ template<class MantaType, class VDBType>
|
||||
void exportVDB(ParticleDataImpl<MantaType> *from,
|
||||
openvdb::points::PointDataGrid::Ptr to,
|
||||
openvdb::tools::PointIndexGrid::Ptr pIndex,
|
||||
bool skipDeletedParts)
|
||||
bool skipDeletedParts,
|
||||
int precision)
|
||||
{
|
||||
std::vector<VDBType> vdbValues;
|
||||
std::string name = from->getName();
|
||||
@@ -212,8 +213,21 @@ void exportVDB(ParticleDataImpl<MantaType> *from,
|
||||
vdbValues.push_back(vdbValue);
|
||||
}
|
||||
|
||||
openvdb::NamePair attribute =
|
||||
openvdb::points::TypedAttributeArray<VDBType, openvdb::points::NullCodec>::attributeType();
|
||||
// Use custom codec for precision of the attribute
|
||||
openvdb::NamePair attribute;
|
||||
if (precision == PRECISION_FULL) {
|
||||
attribute =
|
||||
openvdb::points::TypedAttributeArray<VDBType, openvdb::points::NullCodec>::attributeType();
|
||||
}
|
||||
else if (precision == PRECISION_HALF ||
|
||||
precision == PRECISION_MINI) { // Mini uses same precision as half for now
|
||||
attribute =
|
||||
openvdb::points::TypedAttributeArray<VDBType,
|
||||
openvdb::points::TruncateCodec>::attributeType();
|
||||
}
|
||||
else {
|
||||
errMsg("exportVDB: invalid precision level");
|
||||
}
|
||||
openvdb::points::appendAttribute(to->tree(), name, attribute);
|
||||
|
||||
// Create a wrapper around the vdb values vector.
|
||||
@@ -229,7 +243,8 @@ void exportVDB(ParticleDataImpl<MantaType> *from,
|
||||
openvdb::points::PointDataGrid::Ptr exportVDB(BasicParticleSystem *from,
|
||||
std::vector<ParticleDataBase *> &fromPData,
|
||||
bool skipDeletedParts,
|
||||
float voxelSize)
|
||||
float voxelSize,
|
||||
int precision)
|
||||
{
|
||||
std::vector<openvdb::Vec3s> positions;
|
||||
std::vector<int> flags;
|
||||
@@ -257,16 +272,34 @@ openvdb::points::PointDataGrid::Ptr exportVDB(BasicParticleSystem *from,
|
||||
openvdb::tools::createPointIndexGrid<openvdb::tools::PointIndexGrid>(positionsWrapper,
|
||||
*transform);
|
||||
|
||||
// TODO (sebbas): Use custom codec for attributes?
|
||||
// using Codec = openvdb::points::FixedPointCodec</*1-byte=*/false, openvdb::points::UnitRange>;
|
||||
openvdb::points::PointDataGrid::Ptr to =
|
||||
openvdb::points::createPointDataGrid<openvdb::points::NullCodec /*Codec*/,
|
||||
openvdb::points::PointDataGrid>(
|
||||
*pointIndexGrid, positionsWrapper, *transform);
|
||||
openvdb::points::PointDataGrid::Ptr to;
|
||||
openvdb::NamePair flagAttribute;
|
||||
|
||||
using CodecNull = openvdb::points::NullCodec;
|
||||
using CodecTrunc = openvdb::points::TruncateCodec;
|
||||
using CodecFixPoint = openvdb::points::FixedPointCodec<true, openvdb::points::PositionRange>;
|
||||
|
||||
// Use custom codec for precision of the particle position and the flag attribute
|
||||
if (precision == PRECISION_FULL) {
|
||||
to = openvdb::points::createPointDataGrid<CodecNull, openvdb::points::PointDataGrid>(
|
||||
*pointIndexGrid, positionsWrapper, *transform);
|
||||
flagAttribute = openvdb::points::TypedAttributeArray<int, CodecNull>::attributeType();
|
||||
}
|
||||
else if (precision == PRECISION_HALF) {
|
||||
to = openvdb::points::createPointDataGrid<CodecTrunc, openvdb::points::PointDataGrid>(
|
||||
*pointIndexGrid, positionsWrapper, *transform);
|
||||
flagAttribute = openvdb::points::TypedAttributeArray<int, CodecTrunc>::attributeType();
|
||||
}
|
||||
else if (precision == PRECISION_MINI) {
|
||||
to = openvdb::points::createPointDataGrid<CodecFixPoint, openvdb::points::PointDataGrid>(
|
||||
*pointIndexGrid, positionsWrapper, *transform);
|
||||
flagAttribute = openvdb::points::TypedAttributeArray<int, CodecTrunc>::
|
||||
attributeType(); // Use 16 bit trunc for flag for now
|
||||
}
|
||||
else {
|
||||
errMsg("exportVDB: invalid precision level");
|
||||
}
|
||||
|
||||
openvdb::NamePair flagAttribute =
|
||||
openvdb::points::TypedAttributeArray<int,
|
||||
openvdb::points::NullCodec /*Codec*/>::attributeType();
|
||||
openvdb::points::appendAttribute(to->tree(), FLAG_NAME, flagAttribute);
|
||||
// Create a wrapper around the flag vector.
|
||||
openvdb::points::PointAttributeVector<int> flagWrapper(flags);
|
||||
@@ -281,17 +314,17 @@ openvdb::points::PointDataGrid::Ptr exportVDB(BasicParticleSystem *from,
|
||||
if (pdb->getType() == ParticleDataBase::TypeInt) {
|
||||
debMsg("Writing int particle data '" << pdb->getName() << "'", 1);
|
||||
ParticleDataImpl<int> *pdi = dynamic_cast<ParticleDataImpl<int> *>(pdb);
|
||||
exportVDB<int, int>(pdi, to, pointIndexGrid, skipDeletedParts);
|
||||
exportVDB<int, int>(pdi, to, pointIndexGrid, skipDeletedParts, precision);
|
||||
}
|
||||
else if (pdb->getType() == ParticleDataBase::TypeReal) {
|
||||
debMsg("Writing real particle data '" << pdb->getName() << "'", 1);
|
||||
ParticleDataImpl<Real> *pdi = dynamic_cast<ParticleDataImpl<Real> *>(pdb);
|
||||
exportVDB<Real, float>(pdi, to, pointIndexGrid, skipDeletedParts);
|
||||
exportVDB<Real, float>(pdi, to, pointIndexGrid, skipDeletedParts, precision);
|
||||
}
|
||||
else if (pdb->getType() == ParticleDataBase::TypeVec3) {
|
||||
debMsg("Writing Vec3 particle data '" << pdb->getName() << "'", 1);
|
||||
ParticleDataImpl<Vec3> *pdi = dynamic_cast<ParticleDataImpl<Vec3> *>(pdb);
|
||||
exportVDB<Vec3, openvdb::Vec3s>(pdi, to, pointIndexGrid, skipDeletedParts);
|
||||
exportVDB<Vec3, openvdb::Vec3s>(pdi, to, pointIndexGrid, skipDeletedParts, precision);
|
||||
}
|
||||
else {
|
||||
errMsg("exportVDB: unknown ParticleDataBase type");
|
||||
@@ -302,8 +335,10 @@ openvdb::points::PointDataGrid::Ptr exportVDB(BasicParticleSystem *from,
|
||||
|
||||
static void registerCustomCodecs()
|
||||
{
|
||||
using Codec = openvdb::points::FixedPointCodec</*1-byte=*/false, openvdb::points::UnitRange>;
|
||||
openvdb::points::TypedAttributeArray<int, Codec>::registerType();
|
||||
openvdb::points::TypedAttributeArray<int, openvdb::points::TruncateCodec>::registerType();
|
||||
openvdb::points::TypedAttributeArray<float, openvdb::points::TruncateCodec>::registerType();
|
||||
openvdb::points::TypedAttributeArray<openvdb::Vec3s,
|
||||
openvdb::points::TruncateCodec>::registerType();
|
||||
}
|
||||
|
||||
int writeObjectsVDB(const string &filename,
|
||||
@@ -311,15 +346,14 @@ int writeObjectsVDB(const string &filename,
|
||||
float worldSize,
|
||||
bool skipDeletedParts,
|
||||
int compression,
|
||||
bool precisionHalf)
|
||||
int precision)
|
||||
{
|
||||
openvdb::initialize();
|
||||
openvdb::io::File file(filename);
|
||||
openvdb::GridPtrVec gridsVDB;
|
||||
|
||||
// TODO (sebbas): Use custom codec for flag attribute?
|
||||
// Register codecs one, this makes sure custom attributes can be read
|
||||
// registerCustomCodecs();
|
||||
// Register custom codecs, this makes sure custom attributes can be read
|
||||
registerCustomCodecs();
|
||||
|
||||
std::vector<ParticleDataBase *> pdbBuffer;
|
||||
|
||||
@@ -365,7 +399,7 @@ int writeObjectsVDB(const string &filename,
|
||||
debMsg("Writing particle system '" << mantaPP->getName()
|
||||
<< "' (and buffered pData) to vdb file " << filename,
|
||||
1);
|
||||
vdbGrid = exportVDB(mantaPP, pdbBuffer, skipDeletedParts, voxelSize);
|
||||
vdbGrid = exportVDB(mantaPP, pdbBuffer, skipDeletedParts, voxelSize, precision);
|
||||
gridsVDB.push_back(vdbGrid);
|
||||
pdbBuffer.clear();
|
||||
}
|
||||
@@ -382,7 +416,7 @@ int writeObjectsVDB(const string &filename,
|
||||
|
||||
// Set additional grid attributes, e.g. name, grid class, compression level, etc.
|
||||
if (vdbGrid) {
|
||||
setGridOptions<openvdb::GridBase>(vdbGrid, objectName, gClass, voxelSize, precisionHalf);
|
||||
setGridOptions<openvdb::GridBase>(vdbGrid, objectName, gClass, voxelSize, precision);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,19 +468,18 @@ int readObjectsVDB(const string &filename, std::vector<PbClass *> *objects, floa
|
||||
openvdb::io::File file(filename);
|
||||
openvdb::GridPtrVec gridsVDB;
|
||||
|
||||
// TODO (sebbas): Use custom codec for flag attribute?
|
||||
// Register codecs one, this makes sure custom attributes can be read
|
||||
// registerCustomCodecs();
|
||||
// Register custom codecs, this makes sure custom attributes can be read
|
||||
registerCustomCodecs();
|
||||
|
||||
try {
|
||||
file.setCopyMaxBytes(0);
|
||||
file.open();
|
||||
gridsVDB = *(file.getGrids());
|
||||
openvdb::MetaMap::Ptr metadata = file.getMetadata();
|
||||
(void)metadata; // Unused for now
|
||||
unusedParameter(metadata); // Unused for now
|
||||
}
|
||||
catch (const openvdb::IoError &e) {
|
||||
(void)e; // Unused for now
|
||||
unusedParameter(e); // Unused for now
|
||||
debMsg("readObjectsVDB: Could not open vdb file " << filename, 1);
|
||||
file.close();
|
||||
return 0;
|
||||
@@ -494,27 +527,36 @@ int readObjectsVDB(const string &filename, std::vector<PbClass *> *objects, floa
|
||||
if (GridBase *mantaGrid = dynamic_cast<GridBase *>(*iter)) {
|
||||
|
||||
if (mantaGrid->getType() & GridBase::TypeInt) {
|
||||
openvdb::Int32Grid::Ptr vdbIntGrid = openvdb::gridPtrCast<openvdb::Int32Grid>(vdbGrid);
|
||||
if (!vdbIntGrid)
|
||||
continue; // Sanity check: Cast can fail if onlyGrid is true but object count > 1
|
||||
|
||||
Grid<int> *mantaIntGrid = (Grid<int> *)mantaGrid;
|
||||
debMsg("Reading into grid '" << mantaGrid->getName() << "' from int grid '"
|
||||
<< vdbGrid->getName() << "' in vdb file " << filename,
|
||||
1);
|
||||
openvdb::Int32Grid::Ptr vdbIntGrid = openvdb::gridPtrCast<openvdb::Int32Grid>(vdbGrid);
|
||||
Grid<int> *mantaIntGrid = (Grid<int> *)mantaGrid;
|
||||
importVDB<openvdb::Int32Grid, int>(vdbIntGrid, mantaIntGrid);
|
||||
}
|
||||
else if (mantaGrid->getType() & GridBase::TypeReal) {
|
||||
openvdb::FloatGrid::Ptr vdbFloatGrid = openvdb::gridPtrCast<openvdb::FloatGrid>(vdbGrid);
|
||||
if (!vdbFloatGrid)
|
||||
continue; // Sanity check: Cast can fail if onlyGrid is true but object count > 1
|
||||
|
||||
Grid<Real> *mantaRealGrid = (Grid<Real> *)mantaGrid;
|
||||
debMsg("Reading into grid '" << mantaGrid->getName() << "' from real grid '"
|
||||
<< vdbGrid->getName() << "' in vdb file " << filename,
|
||||
1);
|
||||
openvdb::FloatGrid::Ptr vdbFloatGrid = openvdb::gridPtrCast<openvdb::FloatGrid>(vdbGrid);
|
||||
Grid<Real> *mantaRealGrid = (Grid<Real> *)mantaGrid;
|
||||
importVDB<openvdb::FloatGrid, Real>(vdbFloatGrid, mantaRealGrid);
|
||||
}
|
||||
else if (mantaGrid->getType() & GridBase::TypeVec3) {
|
||||
openvdb::Vec3SGrid::Ptr vdbVec3Grid = openvdb::gridPtrCast<openvdb::Vec3SGrid>(vdbGrid);
|
||||
if (!vdbVec3Grid)
|
||||
continue; // Sanity check: Cast can fail if onlyGrid is true but object count > 1
|
||||
|
||||
Grid<Vec3> *mantaVec3Grid = (Grid<Vec3> *)mantaGrid;
|
||||
debMsg("Reading into grid '" << mantaGrid->getName() << "' from vec3 grid '"
|
||||
<< vdbGrid->getName() << "' in vdb file " << filename,
|
||||
1);
|
||||
openvdb::Vec3SGrid::Ptr vdbVec3Grid = openvdb::gridPtrCast<openvdb::Vec3SGrid>(vdbGrid);
|
||||
Grid<Vec3> *mantaVec3Grid = (Grid<Vec3> *)mantaGrid;
|
||||
importVDB<openvdb::Vec3SGrid, Vec3>(vdbVec3Grid, mantaVec3Grid);
|
||||
}
|
||||
else {
|
||||
@@ -523,12 +565,15 @@ int readObjectsVDB(const string &filename, std::vector<PbClass *> *objects, floa
|
||||
}
|
||||
}
|
||||
else if (BasicParticleSystem *mantaPP = dynamic_cast<BasicParticleSystem *>(*iter)) {
|
||||
openvdb::points::PointDataGrid::Ptr vdbPointGrid =
|
||||
openvdb::gridPtrCast<openvdb::points::PointDataGrid>(vdbGrid);
|
||||
if (!vdbPointGrid)
|
||||
continue; // Sanity check: Cast can fail if onlyGrid is true but objects > 1
|
||||
|
||||
debMsg("Reading into particle system '" << mantaPP->getName() << "' from particle system '"
|
||||
<< vdbGrid->getName() << "' in vdb file "
|
||||
<< filename,
|
||||
1);
|
||||
openvdb::points::PointDataGrid::Ptr vdbPointGrid =
|
||||
openvdb::gridPtrCast<openvdb::points::PointDataGrid>(vdbGrid);
|
||||
importVDB(vdbPointGrid, mantaPP, pdbBuffer, voxelSize);
|
||||
pdbBuffer.clear();
|
||||
}
|
||||
@@ -582,19 +627,23 @@ template openvdb::Vec3SGrid::Ptr exportVDB<Vec3, openvdb::Vec3SGrid>(Grid<Vec3>
|
||||
openvdb::points::PointDataGrid::Ptr exportVDB(BasicParticleSystem *from,
|
||||
std::vector<ParticleDataBase *> &fromPData,
|
||||
bool skipDeletedParts = false,
|
||||
float voxelSize = 1.0);
|
||||
float voxelSize = 1.0,
|
||||
int precision = PRECISION_HALF);
|
||||
template void exportVDB<int, int>(ParticleDataImpl<int> *from,
|
||||
openvdb::points::PointDataGrid::Ptr to,
|
||||
openvdb::tools::PointIndexGrid::Ptr pIndex,
|
||||
bool skipDeletedParts = false);
|
||||
bool skipDeletedParts = false,
|
||||
int precision = PRECISION_HALF);
|
||||
template void exportVDB<Real, float>(ParticleDataImpl<Real> *from,
|
||||
openvdb::points::PointDataGrid::Ptr to,
|
||||
openvdb::tools::PointIndexGrid::Ptr pIndex,
|
||||
bool skipDeletedParts = false);
|
||||
bool skipDeletedParts = false,
|
||||
int precision = PRECISION_HALF);
|
||||
template void exportVDB<Vec3, openvdb::Vec3s>(ParticleDataImpl<Vec3> *from,
|
||||
openvdb::points::PointDataGrid::Ptr to,
|
||||
openvdb::tools::PointIndexGrid::Ptr pIndex,
|
||||
bool skipDeletedParts = false);
|
||||
bool skipDeletedParts = false,
|
||||
int precision = PRECISION_HALF);
|
||||
|
||||
#else
|
||||
|
||||
@@ -603,7 +652,7 @@ int writeObjectsVDB(const string &filename,
|
||||
float worldSize,
|
||||
bool skipDeletedParts,
|
||||
int compression,
|
||||
bool precisionHalf)
|
||||
int precision)
|
||||
{
|
||||
errMsg("Cannot save to .vdb file. Mantaflow has not been built with OpenVDB support.");
|
||||
return 0;
|
||||
|
16
extern/mantaflow/preprocessed/fileio/mantaio.cpp
vendored
16
extern/mantaflow/preprocessed/fileio/mantaio.cpp
vendored
@@ -82,8 +82,15 @@ int save(const string &name,
|
||||
float worldSize = 1.0,
|
||||
bool skipDeletedParts = false,
|
||||
int compression = COMPRESSION_ZIP,
|
||||
bool precisionHalf = true)
|
||||
bool precisionHalf = true,
|
||||
int precision = PRECISION_HALF)
|
||||
{
|
||||
|
||||
if (!precisionHalf) {
|
||||
debMsg("Warning: precisionHalf argument is deprecated. Please use precision level instead", 0);
|
||||
precision = PRECISION_HALF; // for backwards compatibility
|
||||
}
|
||||
|
||||
if (name.find_last_of('.') == string::npos)
|
||||
errMsg("file '" + name + "' does not have an extension");
|
||||
string ext = name.substr(name.find_last_of('.'));
|
||||
@@ -95,8 +102,7 @@ int save(const string &name,
|
||||
else if (ext == ".vol")
|
||||
return writeGridsVol(name, &objects);
|
||||
if (ext == ".vdb")
|
||||
return writeObjectsVDB(
|
||||
name, &objects, worldSize, skipDeletedParts, compression, precisionHalf);
|
||||
return writeObjectsVDB(name, &objects, worldSize, skipDeletedParts, compression, precision);
|
||||
else if (ext == ".npz")
|
||||
return writeGridsNumpy(name, &objects);
|
||||
else if (ext == ".txt")
|
||||
@@ -122,7 +128,9 @@ static PyObject *_W_1(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
|
||||
bool skipDeletedParts = _args.getOpt<bool>("skipDeletedParts", 3, false, &_lock);
|
||||
int compression = _args.getOpt<int>("compression", 4, COMPRESSION_ZIP, &_lock);
|
||||
bool precisionHalf = _args.getOpt<bool>("precisionHalf", 5, true, &_lock);
|
||||
_retval = toPy(save(name, objects, worldSize, skipDeletedParts, compression, precisionHalf));
|
||||
int precision = _args.getOpt<int>("precision", 6, PRECISION_HALF, &_lock);
|
||||
_retval = toPy(
|
||||
save(name, objects, worldSize, skipDeletedParts, compression, precisionHalf, precision));
|
||||
_args.check();
|
||||
}
|
||||
pbFinalizePlugin(parent, "save", !noTiming);
|
||||
|
@@ -28,6 +28,11 @@
|
||||
#define COMPRESSION_ZIP 1
|
||||
#define COMPRESSION_BLOSC 2
|
||||
|
||||
// OpenVDB precision flags
|
||||
#define PRECISION_FULL 0
|
||||
#define PRECISION_HALF 1
|
||||
#define PRECISION_MINI 2
|
||||
|
||||
namespace Manta {
|
||||
|
||||
// Forward declations
|
||||
@@ -70,7 +75,7 @@ int writeObjectsVDB(const std::string &filename,
|
||||
float scale = 1.0,
|
||||
bool skipDeletedParts = false,
|
||||
int compression = COMPRESSION_ZIP,
|
||||
bool precisionHalf = true);
|
||||
int precision = PRECISION_HALF);
|
||||
int readObjectsVDB(const std::string &filename,
|
||||
std::vector<PbClass *> *objects,
|
||||
float scale = 1.0);
|
||||
|
2
extern/mantaflow/preprocessed/gitinfo.h
vendored
2
extern/mantaflow/preprocessed/gitinfo.h
vendored
@@ -1,3 +1,3 @@
|
||||
|
||||
|
||||
#define MANTA_GIT_VERSION "commit b8e557707805720ff00a8eb946db2ee5b9361b5a"
|
||||
#define MANTA_GIT_VERSION "commit dffc3481b835dfa048effcbb8a9e613294ecae14"
|
||||
|
@@ -695,12 +695,7 @@ struct KnApplyEmission : public KernelBase {
|
||||
// (important for emit from particles)
|
||||
bool isInflow = (type & FlagGrid::TypeInflow && flags.isInflow(i, j, k));
|
||||
bool isOutflow = (type & FlagGrid::TypeOutflow && flags.isOutflow(i, j, k));
|
||||
|
||||
if (type && !isInflow)
|
||||
return;
|
||||
if (type && isOutflow)
|
||||
return;
|
||||
if (emissionTexture && !(*emissionTexture)(i, j, k))
|
||||
if ((type && !isInflow && !isOutflow) && (emissionTexture && !(*emissionTexture)(i, j, k)))
|
||||
return;
|
||||
|
||||
if (isAbsolute)
|
||||
|
@@ -16,7 +16,8 @@ static const Pb::Register _reg(
|
||||
"integration mode\nIntEuler = 0\nIntRK2 = 1\nIntRK4 = 2\n\n# CG preconditioner\nPcNone "
|
||||
" = 0\nPcMIC = 1\nPcMGDynamic = 2\nPcMGStatic = 3\n\n# particles\nPtypeSpray = "
|
||||
"2\nPtypeBubble = 4\nPtypeFoam = 8\nPtypeTracer = 16\n\n# OpenVDB export "
|
||||
"flags\nCompression_None = 0\nCompression_Zip = 1\nCompression_Blosc = 2\n\n\n\n\n");
|
||||
"flags\nCompression_None = 0\nCompression_Zip = 1\nCompression_Blosc = 2\n\n# OpenVDB "
|
||||
"precision flags\nPrecision_Full = 0\nPrecision_Half = 1\nPrecision_Mini = 2\n\n\n\n");
|
||||
extern "C" {
|
||||
void PbRegister_file_0()
|
||||
{
|
||||
|
@@ -57,7 +57,7 @@
|
||||
#if defined(__arm__)
|
||||
/* Attempt to fix compilation error on Debian armel kernel.
|
||||
* arm7 architecture does have both 32 and 64bit atomics, however
|
||||
* it's gcc doesn't have __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n defined.
|
||||
* its gcc doesn't have __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n defined.
|
||||
*/
|
||||
# define JE_FORCE_SYNC_COMPARE_AND_SWAP_1
|
||||
# define JE_FORCE_SYNC_COMPARE_AND_SWAP_4
|
||||
|
@@ -150,6 +150,8 @@ void CLG_level_set(int level);
|
||||
|
||||
void CLG_logref_init(CLG_LogRef *clg_ref);
|
||||
|
||||
int CLG_color_support_get(CLG_LogRef *clg_ref);
|
||||
|
||||
/** Declare outside function, declare as extern in header. */
|
||||
#define CLG_LOGREF_DECLARE_GLOBAL(var, id) \
|
||||
static CLG_LogRef _static_##var = {id}; \
|
||||
|
@@ -755,4 +755,12 @@ void CLG_logref_init(CLG_LogRef *clg_ref)
|
||||
#endif
|
||||
}
|
||||
|
||||
int CLG_color_support_get(CLG_LogRef *clg_ref)
|
||||
{
|
||||
if (clg_ref->type == NULL) {
|
||||
CLG_logref_init(clg_ref);
|
||||
}
|
||||
return clg_ref->type->ctx->use_color;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
@@ -352,7 +352,7 @@ if(WITH_CYCLES_CUDA_BINARIES AND (NOT WITH_CYCLES_CUBIN_COMPILER))
|
||||
set(MAX_MSVC 1910)
|
||||
elseif(${CUDA_VERSION} EQUAL "9.1")
|
||||
set(MAX_MSVC 1911)
|
||||
elseif(${CUDA_VERSION} LESS "11.0")
|
||||
elseif(${CUDA_VERSION} VERSION_GREATER_EQUAL 10.0)
|
||||
set(MAX_MSVC 1999)
|
||||
endif()
|
||||
if(NOT MSVC_VERSION LESS ${MAX_MSVC} OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
|
@@ -31,7 +31,6 @@ from math import pi
|
||||
|
||||
# enums
|
||||
|
||||
import _cycles
|
||||
from . import engine
|
||||
|
||||
enum_devices = (
|
||||
@@ -39,8 +38,10 @@ enum_devices = (
|
||||
('GPU', "GPU Compute", "Use GPU compute device for rendering, configured in the system tab in the user preferences"),
|
||||
)
|
||||
|
||||
if _cycles.with_network:
|
||||
from _cycles import with_network
|
||||
if with_network:
|
||||
enum_devices += (('NETWORK', "Networked Device", "Use networked device for rendering"),)
|
||||
del with_network
|
||||
|
||||
enum_feature_set = (
|
||||
('SUPPORTED', "Supported", "Only use finished and supported features"),
|
||||
@@ -184,6 +185,7 @@ enum_aov_types = (
|
||||
|
||||
|
||||
def enum_openimagedenoise_denoiser(self, context):
|
||||
import _cycles
|
||||
if _cycles.with_openimagedenoise:
|
||||
return [('OPENIMAGEDENOISE', "OpenImageDenoise", "Use Intel OpenImageDenoise AI denoiser running on the CPU", 4)]
|
||||
return []
|
||||
@@ -1599,15 +1601,20 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
elif entry.type == 'CPU':
|
||||
cpu_devices.append(entry)
|
||||
# Extend all GPU devices with CPU.
|
||||
if compute_device_type in ('CUDA', 'OPENCL'):
|
||||
if compute_device_type in {'CUDA', 'OPENCL'}:
|
||||
devices.extend(cpu_devices)
|
||||
return devices
|
||||
|
||||
# For backwards compatibility, only returns CUDA and OpenCL but still
|
||||
# refreshes all devices.
|
||||
def get_devices(self, compute_device_type=''):
|
||||
import _cycles
|
||||
# Ensure `self.devices` is not re-allocated when the second call to
|
||||
# get_devices_for_type is made, freeing items from the first list.
|
||||
for device_type in ('CUDA', 'OPTIX', 'OPENCL'):
|
||||
self.update_device_entries(_cycles.available_devices(device_type))
|
||||
|
||||
cuda_devices = self.get_devices_for_type('CUDA')
|
||||
self.get_devices_for_type('OPTIX')
|
||||
opencl_devices = self.get_devices_for_type('OPENCL')
|
||||
return cuda_devices, opencl_devices
|
||||
|
||||
|
@@ -1271,7 +1271,7 @@ class CYCLES_OBJECT_PT_visibility(CyclesButtonsPanel, Panel):
|
||||
|
||||
layout.prop(ob, "hide_select", text="Selectable", invert_checkbox=True, toggle=False)
|
||||
|
||||
col = layout.column(heading="Show in")
|
||||
col = layout.column(heading="Show In")
|
||||
col.prop(ob, "hide_viewport", text="Viewports", invert_checkbox=True, toggle=False)
|
||||
col.prop(ob, "hide_render", text="Renders", invert_checkbox=True, toggle=False)
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "blender/blender_util.h"
|
||||
|
||||
#include "util/util_foreach.h"
|
||||
#include "util/util_task.h"
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
@@ -45,7 +46,8 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
|
||||
BL::Object &b_ob,
|
||||
BL::Object &b_ob_instance,
|
||||
bool object_updated,
|
||||
bool use_particle_hair)
|
||||
bool use_particle_hair,
|
||||
TaskPool *task_pool)
|
||||
{
|
||||
/* Test if we can instance or if the object is modified. */
|
||||
BL::ID b_ob_data = b_ob.data();
|
||||
@@ -77,8 +79,15 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
|
||||
used_shaders.push_back(default_shader);
|
||||
}
|
||||
|
||||
/* Test if we need to sync. */
|
||||
/* Ensure we only sync instanced geometry once. */
|
||||
Geometry *geom = geometry_map.find(key);
|
||||
if (geom) {
|
||||
if (geometry_synced.find(geom) != geometry_synced.end()) {
|
||||
return geom;
|
||||
}
|
||||
}
|
||||
|
||||
/* Test if we need to sync. */
|
||||
bool sync = true;
|
||||
if (geom == NULL) {
|
||||
/* Add new geometry if it did not exist yet. */
|
||||
@@ -125,28 +134,36 @@ Geometry *BlenderSync::sync_geometry(BL::Depsgraph &b_depsgraph,
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure we only sync instanced geometry once. */
|
||||
if (geometry_synced.find(geom) != geometry_synced.end()) {
|
||||
return geom;
|
||||
}
|
||||
|
||||
progress.set_sync_status("Synchronizing object", b_ob.name());
|
||||
|
||||
geometry_synced.insert(geom);
|
||||
|
||||
geom->name = ustring(b_ob_data.name().c_str());
|
||||
|
||||
if (geom_type == Geometry::HAIR) {
|
||||
Hair *hair = static_cast<Hair *>(geom);
|
||||
sync_hair(b_depsgraph, b_ob, hair, used_shaders);
|
||||
}
|
||||
else if (geom_type == Geometry::VOLUME) {
|
||||
Volume *volume = static_cast<Volume *>(geom);
|
||||
sync_volume(b_ob, volume, used_shaders);
|
||||
auto sync_func = [=]() mutable {
|
||||
if (progress.get_cancel())
|
||||
return;
|
||||
|
||||
progress.set_sync_status("Synchronizing object", b_ob.name());
|
||||
|
||||
if (geom_type == Geometry::HAIR) {
|
||||
Hair *hair = static_cast<Hair *>(geom);
|
||||
sync_hair(b_depsgraph, b_ob, hair, used_shaders);
|
||||
}
|
||||
else if (geom_type == Geometry::VOLUME) {
|
||||
Volume *volume = static_cast<Volume *>(geom);
|
||||
sync_volume(b_ob, volume, used_shaders);
|
||||
}
|
||||
else {
|
||||
Mesh *mesh = static_cast<Mesh *>(geom);
|
||||
sync_mesh(b_depsgraph, b_ob, mesh, used_shaders);
|
||||
}
|
||||
};
|
||||
|
||||
/* Defer the actual geometry sync to the task_pool for multithreading */
|
||||
if (task_pool) {
|
||||
task_pool->push(sync_func);
|
||||
}
|
||||
else {
|
||||
Mesh *mesh = static_cast<Mesh *>(geom);
|
||||
sync_mesh(b_depsgraph, b_ob, mesh, used_shaders);
|
||||
sync_func();
|
||||
}
|
||||
|
||||
return geom;
|
||||
@@ -156,7 +173,8 @@ void BlenderSync::sync_geometry_motion(BL::Depsgraph &b_depsgraph,
|
||||
BL::Object &b_ob,
|
||||
Object *object,
|
||||
float motion_time,
|
||||
bool use_particle_hair)
|
||||
bool use_particle_hair,
|
||||
TaskPool *task_pool)
|
||||
{
|
||||
/* Ensure we only sync instanced geometry once. */
|
||||
Geometry *geom = object->geometry;
|
||||
@@ -177,16 +195,29 @@ void BlenderSync::sync_geometry_motion(BL::Depsgraph &b_depsgraph,
|
||||
return;
|
||||
}
|
||||
|
||||
if (b_ob.type() == BL::Object::type_HAIR || use_particle_hair) {
|
||||
Hair *hair = static_cast<Hair *>(geom);
|
||||
sync_hair_motion(b_depsgraph, b_ob, hair, motion_step);
|
||||
}
|
||||
else if (b_ob.type() == BL::Object::type_VOLUME || object_fluid_gas_domain_find(b_ob)) {
|
||||
/* No volume motion blur support yet. */
|
||||
auto sync_func = [=]() mutable {
|
||||
if (progress.get_cancel())
|
||||
return;
|
||||
|
||||
if (b_ob.type() == BL::Object::type_HAIR || use_particle_hair) {
|
||||
Hair *hair = static_cast<Hair *>(geom);
|
||||
sync_hair_motion(b_depsgraph, b_ob, hair, motion_step);
|
||||
}
|
||||
else if (b_ob.type() == BL::Object::type_VOLUME || object_fluid_gas_domain_find(b_ob)) {
|
||||
/* No volume motion blur support yet. */
|
||||
}
|
||||
else {
|
||||
Mesh *mesh = static_cast<Mesh *>(geom);
|
||||
sync_mesh_motion(b_depsgraph, b_ob, mesh, motion_step);
|
||||
}
|
||||
};
|
||||
|
||||
/* Defer the actual geometry sync to the task_pool for multithreading */
|
||||
if (task_pool) {
|
||||
task_pool->push(sync_func);
|
||||
}
|
||||
else {
|
||||
Mesh *mesh = static_cast<Mesh *>(geom);
|
||||
sync_mesh_motion(b_depsgraph, b_ob, mesh, motion_step);
|
||||
sync_func();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include "util/util_foreach.h"
|
||||
#include "util/util_hash.h"
|
||||
#include "util/util_logging.h"
|
||||
#include "util/util_task.h"
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
@@ -103,7 +104,8 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
bool use_particle_hair,
|
||||
bool show_lights,
|
||||
BlenderObjectCulling &culling,
|
||||
bool *use_portal)
|
||||
bool *use_portal,
|
||||
TaskPool *geom_task_pool)
|
||||
{
|
||||
const bool is_instance = b_instance.is_instance();
|
||||
BL::Object b_ob = b_instance.object();
|
||||
@@ -181,6 +183,10 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Use task pool only for non-instances, since sync_dupli_particle accesses
|
||||
* geometry. This restriction should be removed for better performance. */
|
||||
TaskPool *object_geom_task_pool = (is_instance) ? NULL : geom_task_pool;
|
||||
|
||||
/* key to lookup object */
|
||||
ObjectKey key(b_parent, persistent_id, b_ob_instance, use_particle_hair);
|
||||
Object *object;
|
||||
@@ -198,7 +204,12 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
|
||||
/* mesh deformation */
|
||||
if (object->geometry)
|
||||
sync_geometry_motion(b_depsgraph, b_ob, object, motion_time, use_particle_hair);
|
||||
sync_geometry_motion(b_depsgraph,
|
||||
b_ob_instance,
|
||||
object,
|
||||
motion_time,
|
||||
use_particle_hair,
|
||||
object_geom_task_pool);
|
||||
}
|
||||
|
||||
return object;
|
||||
@@ -211,8 +222,15 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
||||
object_updated = true;
|
||||
|
||||
/* mesh sync */
|
||||
object->geometry = sync_geometry(
|
||||
b_depsgraph, b_ob, b_ob_instance, object_updated, use_particle_hair);
|
||||
/* b_ob is owned by the iterator and will go out of scope at the end of the block.
|
||||
* b_ob_instance is the original object and will remain valid for deferred geometry
|
||||
* sync. */
|
||||
object->geometry = sync_geometry(b_depsgraph,
|
||||
b_ob_instance,
|
||||
b_ob_instance,
|
||||
object_updated,
|
||||
use_particle_hair,
|
||||
object_geom_task_pool);
|
||||
|
||||
/* special case not tracked by object update flags */
|
||||
|
||||
@@ -331,6 +349,9 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph,
|
||||
BL::SpaceView3D &b_v3d,
|
||||
float motion_time)
|
||||
{
|
||||
/* Task pool for multithreaded geometry sync. */
|
||||
TaskPool geom_task_pool;
|
||||
|
||||
/* layer data */
|
||||
bool motion = motion_time != 0.0f;
|
||||
|
||||
@@ -355,8 +376,8 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph,
|
||||
const bool show_lights = BlenderViewportParameters(b_v3d).use_scene_lights;
|
||||
|
||||
BL::ViewLayer b_view_layer = b_depsgraph.view_layer_eval();
|
||||
|
||||
BL::Depsgraph::object_instances_iterator b_instance_iter;
|
||||
|
||||
for (b_depsgraph.object_instances.begin(b_instance_iter);
|
||||
b_instance_iter != b_depsgraph.object_instances.end() && !cancel;
|
||||
++b_instance_iter) {
|
||||
@@ -372,6 +393,11 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph,
|
||||
/* Load per-object culling data. */
|
||||
culling.init_object(scene, b_ob);
|
||||
|
||||
/* Ensure the object geom supporting the hair is processed before adding
|
||||
* the hair processing task to the task pool, calling .to_mesh() on the
|
||||
* same object in parallel does not work. */
|
||||
const bool sync_hair = b_instance.show_particles() && object_has_particle_hair(b_ob);
|
||||
|
||||
/* Object itself. */
|
||||
if (b_instance.show_self()) {
|
||||
sync_object(b_depsgraph,
|
||||
@@ -381,11 +407,12 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph,
|
||||
false,
|
||||
show_lights,
|
||||
culling,
|
||||
&use_portal);
|
||||
&use_portal,
|
||||
sync_hair ? NULL : &geom_task_pool);
|
||||
}
|
||||
|
||||
/* Particle hair as separate object. */
|
||||
if (b_instance.show_particles() && object_has_particle_hair(b_ob)) {
|
||||
if (sync_hair) {
|
||||
sync_object(b_depsgraph,
|
||||
b_view_layer,
|
||||
b_instance,
|
||||
@@ -393,12 +420,15 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph,
|
||||
true,
|
||||
show_lights,
|
||||
culling,
|
||||
&use_portal);
|
||||
&use_portal,
|
||||
&geom_task_pool);
|
||||
}
|
||||
|
||||
cancel = progress.get_cancel();
|
||||
}
|
||||
|
||||
geom_task_pool.wait_work();
|
||||
|
||||
progress.set_sync_status("");
|
||||
|
||||
if (!cancel && !motion) {
|
||||
|
@@ -410,6 +410,12 @@ static PyObject *available_devices_func(PyObject * /*self*/, PyObject *args)
|
||||
}
|
||||
|
||||
DeviceType type = Device::type_from_string(type_name);
|
||||
/* "NONE" is defined by the add-on, see: `CyclesPreferences.get_device_types`. */
|
||||
if ((type == DEVICE_NONE) && (strcmp(type_name, "NONE") != 0)) {
|
||||
PyErr_Format(PyExc_ValueError, "Device \"%s\" not known.", type_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint mask = (type == DEVICE_NONE) ? DEVICE_MASK_ALL : DEVICE_MASK(type);
|
||||
mask |= DEVICE_MASK_CPU;
|
||||
|
||||
|
@@ -151,6 +151,11 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d
|
||||
const bool is_geometry = object_is_geometry(b_ob);
|
||||
const bool is_light = !is_geometry && object_is_light(b_ob);
|
||||
|
||||
if (b_ob.is_instancer() && b_update->is_updated_shading()) {
|
||||
/* Needed for e.g. object color updates on instancer. */
|
||||
object_map.set_recalc(b_ob);
|
||||
}
|
||||
|
||||
if (is_geometry || is_light) {
|
||||
const bool updated_geometry = b_update->is_updated_geometry();
|
||||
|
||||
|
@@ -50,6 +50,7 @@ class ViewLayer;
|
||||
class Shader;
|
||||
class ShaderGraph;
|
||||
class ShaderNode;
|
||||
class TaskPool;
|
||||
|
||||
class BlenderSync {
|
||||
public:
|
||||
@@ -145,7 +146,8 @@ class BlenderSync {
|
||||
bool use_particle_hair,
|
||||
bool show_lights,
|
||||
BlenderObjectCulling &culling,
|
||||
bool *use_portal);
|
||||
bool *use_portal,
|
||||
TaskPool *geom_task_pool);
|
||||
|
||||
/* Volume */
|
||||
void sync_volume(BL::Object &b_ob, Volume *volume, const vector<Shader *> &used_shaders);
|
||||
@@ -177,12 +179,15 @@ class BlenderSync {
|
||||
BL::Object &b_ob,
|
||||
BL::Object &b_ob_instance,
|
||||
bool object_updated,
|
||||
bool use_particle_hair);
|
||||
bool use_particle_hair,
|
||||
TaskPool *task_pool);
|
||||
|
||||
void sync_geometry_motion(BL::Depsgraph &b_depsgraph,
|
||||
BL::Object &b_ob,
|
||||
Object *object,
|
||||
float motion_time,
|
||||
bool use_particle_hair);
|
||||
bool use_particle_hair,
|
||||
TaskPool *task_pool);
|
||||
|
||||
/* Light */
|
||||
void sync_light(BL::Object &b_parent,
|
||||
|
@@ -585,7 +585,7 @@ void BVHEmbree::add_triangles(const Object *ob, const Mesh *mesh, int i)
|
||||
rtc_indices[j * 3 + 2] = t.v[2];
|
||||
}
|
||||
|
||||
update_tri_vertex_buffer(geom_id, mesh);
|
||||
set_tri_vertex_buffer(geom_id, mesh, false);
|
||||
|
||||
size_t prim_object_size = pack.prim_object.size();
|
||||
pack.prim_object.resize(prim_object_size + num_triangles);
|
||||
@@ -612,7 +612,7 @@ void BVHEmbree::add_triangles(const Object *ob, const Mesh *mesh, int i)
|
||||
rtcReleaseGeometry(geom_id);
|
||||
}
|
||||
|
||||
void BVHEmbree::update_tri_vertex_buffer(RTCGeometry geom_id, const Mesh *mesh)
|
||||
void BVHEmbree::set_tri_vertex_buffer(RTCGeometry geom_id, const Mesh *mesh, const bool update)
|
||||
{
|
||||
const Attribute *attr_mP = NULL;
|
||||
size_t num_motion_steps = 1;
|
||||
@@ -640,8 +640,15 @@ void BVHEmbree::update_tri_vertex_buffer(RTCGeometry geom_id, const Mesh *mesh)
|
||||
verts = &attr_mP->data_float3()[t_ * num_verts];
|
||||
}
|
||||
|
||||
float *rtc_verts = (float *)rtcSetNewGeometryBuffer(
|
||||
geom_id, RTC_BUFFER_TYPE_VERTEX, t, RTC_FORMAT_FLOAT3, sizeof(float) * 3, num_verts + 1);
|
||||
float *rtc_verts = (update) ?
|
||||
(float *)rtcGetGeometryBufferData(geom_id, RTC_BUFFER_TYPE_VERTEX, t) :
|
||||
(float *)rtcSetNewGeometryBuffer(geom_id,
|
||||
RTC_BUFFER_TYPE_VERTEX,
|
||||
t,
|
||||
RTC_FORMAT_FLOAT3,
|
||||
sizeof(float) * 3,
|
||||
num_verts + 1);
|
||||
|
||||
assert(rtc_verts);
|
||||
if (rtc_verts) {
|
||||
for (size_t j = 0; j < num_verts; ++j) {
|
||||
@@ -651,10 +658,14 @@ void BVHEmbree::update_tri_vertex_buffer(RTCGeometry geom_id, const Mesh *mesh)
|
||||
rtc_verts += 3;
|
||||
}
|
||||
}
|
||||
|
||||
if (update) {
|
||||
rtcUpdateGeometryBuffer(geom_id, RTC_BUFFER_TYPE_VERTEX, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BVHEmbree::update_curve_vertex_buffer(RTCGeometry geom_id, const Hair *hair)
|
||||
void BVHEmbree::set_curve_vertex_buffer(RTCGeometry geom_id, const Hair *hair, const bool update)
|
||||
{
|
||||
const Attribute *attr_mP = NULL;
|
||||
size_t num_motion_steps = 1;
|
||||
@@ -689,8 +700,14 @@ void BVHEmbree::update_curve_vertex_buffer(RTCGeometry geom_id, const Hair *hair
|
||||
verts = &attr_mP->data_float3()[t_ * num_keys];
|
||||
}
|
||||
|
||||
float4 *rtc_verts = (float4 *)rtcSetNewGeometryBuffer(
|
||||
geom_id, RTC_BUFFER_TYPE_VERTEX, t, RTC_FORMAT_FLOAT4, sizeof(float) * 4, num_keys_embree);
|
||||
float4 *rtc_verts = (update) ? (float4 *)rtcGetGeometryBufferData(
|
||||
geom_id, RTC_BUFFER_TYPE_VERTEX, t) :
|
||||
(float4 *)rtcSetNewGeometryBuffer(geom_id,
|
||||
RTC_BUFFER_TYPE_VERTEX,
|
||||
t,
|
||||
RTC_FORMAT_FLOAT4,
|
||||
sizeof(float) * 4,
|
||||
num_keys_embree);
|
||||
|
||||
assert(rtc_verts);
|
||||
if (rtc_verts) {
|
||||
@@ -709,6 +726,10 @@ void BVHEmbree::update_curve_vertex_buffer(RTCGeometry geom_id, const Hair *hair
|
||||
rtc_verts += c.num_keys + 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (update) {
|
||||
rtcUpdateGeometryBuffer(geom_id, RTC_BUFFER_TYPE_VERTEX, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -779,7 +800,7 @@ void BVHEmbree::add_curves(const Object *ob, const Hair *hair, int i)
|
||||
rtcSetGeometryBuildQuality(geom_id, build_quality);
|
||||
rtcSetGeometryTimeStepCount(geom_id, num_motion_steps);
|
||||
|
||||
update_curve_vertex_buffer(geom_id, hair);
|
||||
set_curve_vertex_buffer(geom_id, hair, false);
|
||||
|
||||
rtcSetGeometryUserData(geom_id, (void *)prim_offset);
|
||||
if (hair->curve_shape == CURVE_RIBBON) {
|
||||
@@ -933,15 +954,17 @@ void BVHEmbree::refit_nodes()
|
||||
if (geom->type == Geometry::MESH || geom->type == Geometry::VOLUME) {
|
||||
Mesh *mesh = static_cast<Mesh *>(geom);
|
||||
if (mesh->num_triangles() > 0) {
|
||||
update_tri_vertex_buffer(rtcGetGeometry(scene, geom_id), mesh);
|
||||
rtcCommitGeometry(rtcGetGeometry(scene, geom_id));
|
||||
RTCGeometry geom = rtcGetGeometry(scene, geom_id);
|
||||
set_tri_vertex_buffer(geom, mesh, true);
|
||||
rtcCommitGeometry(geom);
|
||||
}
|
||||
}
|
||||
else if (geom->type == Geometry::HAIR) {
|
||||
Hair *hair = static_cast<Hair *>(geom);
|
||||
if (hair->num_curves() > 0) {
|
||||
update_curve_vertex_buffer(rtcGetGeometry(scene, geom_id + 1), hair);
|
||||
rtcCommitGeometry(rtcGetGeometry(scene, geom_id + 1));
|
||||
RTCGeometry geom = rtcGetGeometry(scene, geom_id + 1);
|
||||
set_curve_vertex_buffer(geom, hair, true);
|
||||
rtcCommitGeometry(geom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -71,8 +71,8 @@ class BVHEmbree : public BVH {
|
||||
|
||||
private:
|
||||
void delete_rtcScene();
|
||||
void update_tri_vertex_buffer(RTCGeometry geom_id, const Mesh *mesh);
|
||||
void update_curve_vertex_buffer(RTCGeometry geom_id, const Hair *hair);
|
||||
void set_tri_vertex_buffer(RTCGeometry geom_id, const Mesh *mesh, const bool update);
|
||||
void set_curve_vertex_buffer(RTCGeometry geom_id, const Hair *hair, const bool update);
|
||||
|
||||
RTCDevice rtc_device;
|
||||
|
||||
|
@@ -105,7 +105,7 @@ class BVHSpatialSplit {
|
||||
/* Lower-level functions which calculates boundaries of left and right nodes
|
||||
* needed for spatial split.
|
||||
*
|
||||
* Operates directly with primitive specified by it's index, reused by higher
|
||||
* Operates directly with primitive specified by its index, reused by higher
|
||||
* level splitting functions.
|
||||
*/
|
||||
void split_triangle_primitive(const Mesh *mesh,
|
||||
|
@@ -86,7 +86,12 @@ endmacro()
|
||||
|
||||
# Cycles library dependencies common to all executables
|
||||
|
||||
macro(cycles_link_directories)
|
||||
function(cycles_link_directories)
|
||||
if(APPLE)
|
||||
# APPLE plaform uses full paths for linking libraries, and avoids link_directories.
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
link_directories(${OPENCOLORIO_LIBPATH})
|
||||
endif()
|
||||
@@ -110,7 +115,7 @@ macro(cycles_link_directories)
|
||||
${OPENEXR_LIBPATH}
|
||||
${OPENJPEG_LIBPATH}
|
||||
)
|
||||
endmacro()
|
||||
endfunction()
|
||||
|
||||
macro(cycles_target_link_libraries target)
|
||||
if(WITH_CYCLES_LOGGING)
|
||||
|
@@ -98,7 +98,7 @@ void Node::set(const SocketType &input, float value)
|
||||
|
||||
void Node::set(const SocketType &input, float2 value)
|
||||
{
|
||||
assert(input.type == SocketType::FLOAT);
|
||||
assert(input.type == SocketType::POINT2);
|
||||
set_if_different(input, value);
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ void Node::set(const SocketType &input, array<float> &value)
|
||||
|
||||
void Node::set(const SocketType &input, array<float2> &value)
|
||||
{
|
||||
assert(input.type == SocketType::FLOAT_ARRAY);
|
||||
assert(input.type == SocketType::POINT2_ARRAY);
|
||||
set_if_different(input, value);
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ void Node::set(const SocketType &input, array<Transform> &value)
|
||||
|
||||
void Node::set(const SocketType &input, array<Node *> &value)
|
||||
{
|
||||
assert(input.type == SocketType::TRANSFORM_ARRAY);
|
||||
assert(input.type == SocketType::NODE_ARRAY);
|
||||
set_if_different(input, value);
|
||||
}
|
||||
|
||||
|
@@ -267,8 +267,8 @@ struct NodeType {
|
||||
##__VA_ARGS__)
|
||||
#define SOCKET_NODE_ARRAY(name, ui_name, node_type, ...) \
|
||||
{ \
|
||||
static Node *defval = NULL; \
|
||||
assert(SOCKET_SIZEOF(T, name) == sizeof(Node *)); \
|
||||
static array<Node *> defval = {}; \
|
||||
assert(SOCKET_SIZEOF(T, name) == sizeof(array<Node *>)); \
|
||||
type->register_input(ustring(#name), \
|
||||
ustring(ui_name), \
|
||||
SocketType::NODE_ARRAY, \
|
||||
|
@@ -379,11 +379,11 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
||||
set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}")
|
||||
|
||||
# warn for other versions
|
||||
if((CUDA_VERSION MATCHES "101") OR (CUDA_VERSION MATCHES "102"))
|
||||
if((CUDA_VERSION MATCHES "101") OR (CUDA_VERSION MATCHES "102") OR (CUDA_VERSION MATCHES "111"))
|
||||
else()
|
||||
message(WARNING
|
||||
"CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
|
||||
"build may succeed but only CUDA 10.1 and 10.2 are officially supported")
|
||||
"build may succeed but only CUDA 10.1, 10.2 and 11.1 are officially supported")
|
||||
endif()
|
||||
|
||||
# build for each arch
|
||||
@@ -455,10 +455,10 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
||||
# cycles_cubin_cc since the env variable is read before main()
|
||||
if(APPLE)
|
||||
set(CUBIN_CC_ENV ${CMAKE_COMMAND}
|
||||
-E env DYLD_LIBRARY_PATH="${CUDA_TOOLKIT_ROOT_DIR}/lib")
|
||||
-E env DYLD_LIBRARY_PATH="${cuda_toolkit_root_dir}/lib")
|
||||
elseif(UNIX)
|
||||
set(CUBIN_CC_ENV ${CMAKE_COMMAND}
|
||||
-E env LD_LIBRARY_PATH="${CUDA_TOOLKIT_ROOT_DIR}/lib64")
|
||||
-E env LD_LIBRARY_PATH="${cuda_toolkit_root_dir}/lib64")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
@@ -469,12 +469,12 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}${cuda_kernel_src}
|
||||
${cuda_flags}
|
||||
-v
|
||||
-cuda-toolkit-dir "${CUDA_TOOLKIT_ROOT_DIR}"
|
||||
-cuda-toolkit-dir "${cuda_toolkit_root_dir}"
|
||||
DEPENDS ${kernel_sources} cycles_cubin_cc)
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT ${cuda_file}
|
||||
COMMAND ${CUDA_NVCC_EXECUTABLE}
|
||||
COMMAND ${cuda_nvcc_executable}
|
||||
-arch=${arch}
|
||||
${CUDA_NVCC_FLAGS}
|
||||
--${format}
|
||||
@@ -491,11 +491,35 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
||||
|
||||
set(prev_arch "none")
|
||||
foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
|
||||
if(${arch} MATCHES "sm_2.")
|
||||
if(${arch} MATCHES ".*_2.")
|
||||
message(STATUS "CUDA binaries for ${arch} are no longer supported, skipped.")
|
||||
elseif(${arch} MATCHES "sm_7." AND ${CUDA_VERSION} LESS 100)
|
||||
elseif(${arch} MATCHES ".*_30")
|
||||
if(DEFINED CUDA10_NVCC_EXECUTABLE)
|
||||
set(cuda_nvcc_executable ${CUDA10_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA10_TOOLKIT_ROOT_DIR})
|
||||
elseif(${CUDA_VERSION} LESS 110) # Support for sm_30 was removed in CUDA 11
|
||||
set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
|
||||
else()
|
||||
message(STATUS "CUDA binaries for ${arch} require CUDA 10 or earlier, skipped.")
|
||||
endif()
|
||||
elseif(${arch} MATCHES ".*_7." AND ${CUDA_VERSION} LESS 100)
|
||||
message(STATUS "CUDA binaries for ${arch} require CUDA 10.0+, skipped.")
|
||||
elseif(${arch} MATCHES ".*_8.")
|
||||
if(DEFINED CUDA11_NVCC_EXECUTABLE)
|
||||
set(cuda_nvcc_executable ${CUDA11_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA11_TOOLKIT_ROOT_DIR})
|
||||
elseif(${CUDA_VERSION} GREATER_EQUAL 111) # Support for sm_86 was introduced in CUDA 11
|
||||
set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
|
||||
else()
|
||||
message(STATUS "CUDA binaries for ${arch} require CUDA 11.1+, skipped.")
|
||||
endif()
|
||||
else()
|
||||
set(cuda_nvcc_executable ${CUDA_NVCC_EXECUTABLE})
|
||||
set(cuda_toolkit_root_dir ${CUDA_TOOLKIT_ROOT_DIR})
|
||||
endif()
|
||||
if(DEFINED cuda_nvcc_executable AND DEFINED cuda_toolkit_root_dir)
|
||||
# Compile regular kernel
|
||||
CYCLES_CUDA_KERNEL_ADD(${arch} ${prev_arch} filter "" "${cuda_filter_sources}" FALSE)
|
||||
CYCLES_CUDA_KERNEL_ADD(${arch} ${prev_arch} kernel "" "${cuda_sources}" FALSE)
|
||||
@@ -508,6 +532,9 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
||||
if(WITH_CYCLES_CUDA_BUILD_SERIAL)
|
||||
set(prev_arch ${arch})
|
||||
endif()
|
||||
|
||||
unset(cuda_nvcc_executable)
|
||||
unset(cuda_toolkit_root_dir)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
@@ -777,7 +777,7 @@ ccl_device void kernel_volume_decoupled_record(KernelGlobals *kg,
|
||||
*
|
||||
* This gives us restrictions that decoupled record should only happen
|
||||
* in the stack manner, meaning if there's subsequent call of decoupled
|
||||
* record it'll need to free memory before it's caller frees memory.
|
||||
* record it'll need to free memory before its caller frees memory.
|
||||
*/
|
||||
const int index = kg->decoupled_volume_steps_index;
|
||||
assert(index < sizeof(kg->decoupled_volume_steps) / sizeof(*kg->decoupled_volume_steps));
|
||||
|
@@ -20,7 +20,7 @@
|
||||
/* Shader Virtual Machine
|
||||
*
|
||||
* A shader is a list of nodes to be executed. These are simply read one after
|
||||
* the other and executed, using an node counter. Each node and it's associated
|
||||
* the other and executed, using an node counter. Each node and its associated
|
||||
* data is encoded as one or more uint4's in a 1D texture. If the data is larger
|
||||
* than an uint4, the node can increase the node counter to compensate for this.
|
||||
* Floats are encoded as int and then converted to float again.
|
||||
|
@@ -1129,7 +1129,7 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
|
||||
}
|
||||
}
|
||||
|
||||
if (need_update && geom->type == Geometry::VOLUME) {
|
||||
if (geom->need_update_rebuild && geom->type == Geometry::VOLUME) {
|
||||
/* Create volume meshes if there is voxel data. */
|
||||
if (!volume_images_updated) {
|
||||
progress.set_status("Updating Meshes Volume Bounds");
|
||||
|
@@ -76,9 +76,9 @@ OSLShaderManager::~OSLShaderManager()
|
||||
void OSLShaderManager::free_memory()
|
||||
{
|
||||
# ifdef OSL_HAS_BLENDER_CLEANUP_FIX
|
||||
/* There is a problem with llvm+osl: The order global destructors across
|
||||
/* There is a problem with LLVM+OSL: The order global destructors across
|
||||
* different compilation units run cannot be guaranteed, on windows this means
|
||||
* that the llvm destructors run before the osl destructors, causing a crash
|
||||
* that the LLVM destructors run before the osl destructors, causing a crash
|
||||
* when the process exits. the OSL in svn has a special cleanup hack to
|
||||
* sidestep this behavior */
|
||||
OSL::pvt::LLVM_Util::Cleanup();
|
||||
|
@@ -380,20 +380,20 @@ string SceneUpdateStats::full_report()
|
||||
|
||||
void SceneUpdateStats::clear()
|
||||
{
|
||||
geometry.times.entries.clear();
|
||||
image.times.entries.clear();
|
||||
light.times.entries.clear();
|
||||
object.times.entries.clear();
|
||||
background.times.entries.clear();
|
||||
bake.times.entries.clear();
|
||||
camera.times.entries.clear();
|
||||
film.times.entries.clear();
|
||||
integrator.times.entries.clear();
|
||||
osl.times.entries.clear();
|
||||
particles.times.entries.clear();
|
||||
scene.times.entries.clear();
|
||||
svm.times.entries.clear();
|
||||
tables.times.entries.clear();
|
||||
geometry.times.clear();
|
||||
image.times.clear();
|
||||
light.times.clear();
|
||||
object.times.clear();
|
||||
background.times.clear();
|
||||
bake.times.clear();
|
||||
camera.times.clear();
|
||||
film.times.clear();
|
||||
integrator.times.clear();
|
||||
osl.times.clear();
|
||||
particles.times.clear();
|
||||
scene.times.clear();
|
||||
svm.times.clear();
|
||||
tables.times.clear();
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
@@ -94,6 +94,12 @@ class NamedTimeStats {
|
||||
* makes sure all accumulating values are properly updated.
|
||||
*/
|
||||
vector<NamedTimeEntry> entries;
|
||||
|
||||
void clear()
|
||||
{
|
||||
total_time = 0.0;
|
||||
entries.clear();
|
||||
}
|
||||
};
|
||||
|
||||
class NamedNestedSampleStats {
|
||||
|
@@ -158,7 +158,7 @@ class TileManager {
|
||||
*
|
||||
* however viewport rendering expects tiles to be allocated in a special way,
|
||||
* meaning image is being sliced horizontally first and every device handles
|
||||
* it's own slice
|
||||
* its own slice
|
||||
*/
|
||||
bool background;
|
||||
|
||||
|
@@ -51,13 +51,17 @@ set(SRC
|
||||
util_string_test.cpp
|
||||
util_task_test.cpp
|
||||
util_time_test.cpp
|
||||
util_avxf_avx_test.cpp
|
||||
util_avxf_avx2_test.cpp
|
||||
util_transform_test.cpp
|
||||
)
|
||||
|
||||
set_source_files_properties(util_avxf_avx_test.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX_KERNEL_FLAGS}")
|
||||
set_source_files_properties(util_avxf_avx2_test.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}")
|
||||
if(CXX_HAS_AVX)
|
||||
list(APPEND SRC util_avxf_avx_test.cpp)
|
||||
set_source_files_properties(util_avxf_avx_test.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX_KERNEL_FLAGS}")
|
||||
endif()
|
||||
if(CXX_HAS_AVX2)
|
||||
list(APPEND SRC util_avxf_avx2_test.cpp)
|
||||
set_source_files_properties(util_avxf_avx2_test.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(WITH_GTESTS)
|
||||
BLENDER_SRC_GTEST(cycles "${SRC}" "${ALL_CYCLES_LIBRARIES}")
|
||||
|
@@ -40,9 +40,9 @@ namespace {
|
||||
|
||||
template<typename T> class ShaderNodeBuilder {
|
||||
public:
|
||||
ShaderNodeBuilder(const string &name) : name_(name)
|
||||
ShaderNodeBuilder(ShaderGraph &graph, const string &name) : name_(name)
|
||||
{
|
||||
node_ = new T();
|
||||
node_ = graph.create_node<T>();
|
||||
node_->name = name;
|
||||
}
|
||||
|
||||
@@ -121,8 +121,8 @@ class ShaderGraphBuilder {
|
||||
/* Common input/output boilerplate. */
|
||||
ShaderGraphBuilder &add_attribute(const string &name)
|
||||
{
|
||||
return (*this).add_node(
|
||||
ShaderNodeBuilder<AttributeNode>(name).set(&AttributeNode::attribute, ustring(name)));
|
||||
return (*this).add_node(ShaderNodeBuilder<AttributeNode>(*graph_, name)
|
||||
.set(&AttributeNode::attribute, ustring(name)));
|
||||
}
|
||||
|
||||
ShaderGraphBuilder &output_closure(const string &from)
|
||||
@@ -133,7 +133,7 @@ class ShaderGraphBuilder {
|
||||
ShaderGraphBuilder &output_color(const string &from)
|
||||
{
|
||||
return (*this)
|
||||
.add_node(ShaderNodeBuilder<EmissionNode>("EmissionNode"))
|
||||
.add_node(ShaderNodeBuilder<EmissionNode>(*graph_, "EmissionNode"))
|
||||
.add_connection(from, "EmissionNode::Color")
|
||||
.output_closure("EmissionNode::Emission");
|
||||
}
|
||||
@@ -141,11 +141,16 @@ class ShaderGraphBuilder {
|
||||
ShaderGraphBuilder &output_value(const string &from)
|
||||
{
|
||||
return (*this)
|
||||
.add_node(ShaderNodeBuilder<EmissionNode>("EmissionNode"))
|
||||
.add_node(ShaderNodeBuilder<EmissionNode>(*graph_, "EmissionNode"))
|
||||
.add_connection(from, "EmissionNode::Strength")
|
||||
.output_closure("EmissionNode::Emission");
|
||||
}
|
||||
|
||||
ShaderGraph &graph()
|
||||
{
|
||||
return *graph_;
|
||||
}
|
||||
|
||||
protected:
|
||||
ShaderGraph *graph_;
|
||||
map<string, ShaderNode *> node_map_;
|
||||
@@ -203,14 +208,15 @@ TEST_F(RenderGraph, deduplicate_deep)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Value2::Value to constant (0.8).");
|
||||
CORRECT_INFO_MESSAGE(log, "Deduplicated 2 nodes.");
|
||||
|
||||
builder.add_node(ShaderNodeBuilder<GeometryNode>("Geometry1"))
|
||||
.add_node(ShaderNodeBuilder<GeometryNode>("Geometry2"))
|
||||
.add_node(ShaderNodeBuilder<ValueNode>("Value1").set(&ValueNode::value, 0.8f))
|
||||
.add_node(ShaderNodeBuilder<ValueNode>("Value2").set(&ValueNode::value, 0.8f))
|
||||
.add_node(ShaderNodeBuilder<NoiseTextureNode>("Noise1"))
|
||||
.add_node(ShaderNodeBuilder<NoiseTextureNode>("Noise2"))
|
||||
.add_node(
|
||||
ShaderNodeBuilder<MixNode>("Mix").set(&MixNode::type, NODE_MIX_BLEND).set("Fac", 0.5f))
|
||||
builder.add_node(ShaderNodeBuilder<GeometryNode>(graph, "Geometry1"))
|
||||
.add_node(ShaderNodeBuilder<GeometryNode>(graph, "Geometry2"))
|
||||
.add_node(ShaderNodeBuilder<ValueNode>(graph, "Value1").set(&ValueNode::value, 0.8f))
|
||||
.add_node(ShaderNodeBuilder<ValueNode>(graph, "Value2").set(&ValueNode::value, 0.8f))
|
||||
.add_node(ShaderNodeBuilder<NoiseTextureNode>(graph, "Noise1"))
|
||||
.add_node(ShaderNodeBuilder<NoiseTextureNode>(graph, "Noise2"))
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix")
|
||||
.set(&MixNode::type, NODE_MIX_BLEND)
|
||||
.set("Fac", 0.5f))
|
||||
.add_connection("Geometry1::Parametric", "Noise1::Vector")
|
||||
.add_connection("Value1::Value", "Noise1::Scale")
|
||||
.add_connection("Noise1::Color", "Mix::Color1")
|
||||
@@ -235,7 +241,7 @@ TEST_F(RenderGraph, constant_fold_rgb_to_bw)
|
||||
"Folding convert_float_to_color::value_color to constant (0.8, 0.8, 0.8).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<RGBToBWNode>("RGBToBWNodeNode")
|
||||
.add_node(ShaderNodeBuilder<RGBToBWNode>(graph, "RGBToBWNodeNode")
|
||||
.set("Color", make_float3(0.8f, 0.8f, 0.8f)))
|
||||
.output_color("RGBToBWNodeNode::Val");
|
||||
|
||||
@@ -252,8 +258,8 @@ TEST_F(RenderGraph, constant_fold_emission1)
|
||||
CORRECT_INFO_MESSAGE(log, "Discarding closure Emission.");
|
||||
|
||||
builder
|
||||
.add_node(
|
||||
ShaderNodeBuilder<EmissionNode>("Emission").set("Color", make_float3(0.0f, 0.0f, 0.0f)))
|
||||
.add_node(ShaderNodeBuilder<EmissionNode>(graph, "Emission")
|
||||
.set("Color", make_float3(0.0f, 0.0f, 0.0f)))
|
||||
.output_closure("Emission::Emission");
|
||||
|
||||
graph.finalize(scene);
|
||||
@@ -264,7 +270,7 @@ TEST_F(RenderGraph, constant_fold_emission2)
|
||||
EXPECT_ANY_MESSAGE(log);
|
||||
CORRECT_INFO_MESSAGE(log, "Discarding closure Emission.");
|
||||
|
||||
builder.add_node(ShaderNodeBuilder<EmissionNode>("Emission").set("Strength", 0.0f))
|
||||
builder.add_node(ShaderNodeBuilder<EmissionNode>(graph, "Emission").set("Strength", 0.0f))
|
||||
.output_closure("Emission::Emission");
|
||||
|
||||
graph.finalize(scene);
|
||||
@@ -280,7 +286,7 @@ TEST_F(RenderGraph, constant_fold_background1)
|
||||
CORRECT_INFO_MESSAGE(log, "Discarding closure Background.");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<BackgroundNode>("Background")
|
||||
.add_node(ShaderNodeBuilder<BackgroundNode>(graph, "Background")
|
||||
.set("Color", make_float3(0.0f, 0.0f, 0.0f)))
|
||||
.output_closure("Background::Background");
|
||||
|
||||
@@ -292,7 +298,7 @@ TEST_F(RenderGraph, constant_fold_background2)
|
||||
EXPECT_ANY_MESSAGE(log);
|
||||
CORRECT_INFO_MESSAGE(log, "Discarding closure Background.");
|
||||
|
||||
builder.add_node(ShaderNodeBuilder<BackgroundNode>("Background").set("Strength", 0.0f))
|
||||
builder.add_node(ShaderNodeBuilder<BackgroundNode>(graph, "Background").set("Strength", 0.0f))
|
||||
.output_closure("Background::Background");
|
||||
|
||||
graph.finalize(scene);
|
||||
@@ -309,10 +315,10 @@ TEST_F(RenderGraph, constant_fold_shader_add)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding AddClosure2::Closure to socket Diffuse::BSDF.");
|
||||
INVALID_INFO_MESSAGE(log, "Folding AddClosure3");
|
||||
|
||||
builder.add_node(ShaderNodeBuilder<DiffuseBsdfNode>("Diffuse"))
|
||||
.add_node(ShaderNodeBuilder<AddClosureNode>("AddClosure1"))
|
||||
.add_node(ShaderNodeBuilder<AddClosureNode>("AddClosure2"))
|
||||
.add_node(ShaderNodeBuilder<AddClosureNode>("AddClosure3"))
|
||||
builder.add_node(ShaderNodeBuilder<DiffuseBsdfNode>(graph, "Diffuse"))
|
||||
.add_node(ShaderNodeBuilder<AddClosureNode>(graph, "AddClosure1"))
|
||||
.add_node(ShaderNodeBuilder<AddClosureNode>(graph, "AddClosure2"))
|
||||
.add_node(ShaderNodeBuilder<AddClosureNode>(graph, "AddClosure3"))
|
||||
.add_connection("Diffuse::BSDF", "AddClosure1::Closure1")
|
||||
.add_connection("Diffuse::BSDF", "AddClosure2::Closure2")
|
||||
.add_connection("AddClosure1::Closure", "AddClosure3::Closure1")
|
||||
@@ -335,15 +341,15 @@ TEST_F(RenderGraph, constant_fold_shader_mix)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding MixClosure3::Closure to socket Diffuse::BSDF.");
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<DiffuseBsdfNode>("Diffuse"))
|
||||
.add_node(ShaderNodeBuilder<DiffuseBsdfNode>(graph, "Diffuse"))
|
||||
/* choose left */
|
||||
.add_node(ShaderNodeBuilder<MixClosureNode>("MixClosure1").set("Fac", 0.0f))
|
||||
.add_node(ShaderNodeBuilder<MixClosureNode>(graph, "MixClosure1").set("Fac", 0.0f))
|
||||
.add_connection("Diffuse::BSDF", "MixClosure1::Closure1")
|
||||
/* choose right */
|
||||
.add_node(ShaderNodeBuilder<MixClosureNode>("MixClosure2").set("Fac", 1.0f))
|
||||
.add_node(ShaderNodeBuilder<MixClosureNode>(graph, "MixClosure2").set("Fac", 1.0f))
|
||||
.add_connection("Diffuse::BSDF", "MixClosure2::Closure2")
|
||||
/* both inputs folded the same */
|
||||
.add_node(ShaderNodeBuilder<MixClosureNode>("MixClosure3"))
|
||||
.add_node(ShaderNodeBuilder<MixClosureNode>(graph, "MixClosure3"))
|
||||
.add_connection("Attribute::Fac", "MixClosure3::Fac")
|
||||
.add_connection("MixClosure1::Closure", "MixClosure3::Closure1")
|
||||
.add_connection("MixClosure2::Closure", "MixClosure3::Closure2")
|
||||
@@ -362,7 +368,7 @@ TEST_F(RenderGraph, constant_fold_invert)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Invert::Color to constant (0.68, 0.5, 0.32).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<InvertNode>("Invert")
|
||||
.add_node(ShaderNodeBuilder<InvertNode>(graph, "Invert")
|
||||
.set("Fac", 0.8f)
|
||||
.set("Color", make_float3(0.2f, 0.5f, 0.8f)))
|
||||
.output_color("Invert::Color");
|
||||
@@ -380,7 +386,7 @@ TEST_F(RenderGraph, constant_fold_invert_fac_0)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Invert::Color to socket Attribute::Color.");
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<InvertNode>("Invert").set("Fac", 0.0f))
|
||||
.add_node(ShaderNodeBuilder<InvertNode>(graph, "Invert").set("Fac", 0.0f))
|
||||
.add_connection("Attribute::Color", "Invert::Color")
|
||||
.output_color("Invert::Color");
|
||||
|
||||
@@ -397,7 +403,7 @@ TEST_F(RenderGraph, constant_fold_invert_fac_0_const)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Invert::Color to constant (0.2, 0.5, 0.8).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<InvertNode>("Invert")
|
||||
.add_node(ShaderNodeBuilder<InvertNode>(graph, "Invert")
|
||||
.set("Fac", 0.0f)
|
||||
.set("Color", make_float3(0.2f, 0.5f, 0.8f)))
|
||||
.output_color("Invert::Color");
|
||||
@@ -415,7 +421,7 @@ TEST_F(RenderGraph, constant_fold_mix_add)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding MixAdd::Color to constant (0.62, 1.14, 1.42).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<MixNode>("MixAdd")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "MixAdd")
|
||||
.set(&MixNode::type, NODE_MIX_ADD)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Fac", 0.8f)
|
||||
@@ -436,7 +442,7 @@ TEST_F(RenderGraph, constant_fold_mix_add_clamp)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding MixAdd::Color to constant (0.62, 1, 1).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<MixNode>("MixAdd")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "MixAdd")
|
||||
.set(&MixNode::type, NODE_MIX_ADD)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 0.8f)
|
||||
@@ -458,7 +464,7 @@ TEST_F(RenderGraph, constant_fold_part_mix_dodge_no_fac_0)
|
||||
|
||||
builder.add_attribute("Attribute1")
|
||||
.add_attribute("Attribute2")
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix")
|
||||
.set(&MixNode::type, NODE_MIX_DODGE)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Fac", 0.0f))
|
||||
@@ -480,7 +486,7 @@ TEST_F(RenderGraph, constant_fold_part_mix_light_no_fac_0)
|
||||
|
||||
builder.add_attribute("Attribute1")
|
||||
.add_attribute("Attribute2")
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix")
|
||||
.set(&MixNode::type, NODE_MIX_LIGHT)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Fac", 0.0f))
|
||||
@@ -502,7 +508,7 @@ TEST_F(RenderGraph, constant_fold_part_mix_burn_no_fac_0)
|
||||
|
||||
builder.add_attribute("Attribute1")
|
||||
.add_attribute("Attribute2")
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix")
|
||||
.set(&MixNode::type, NODE_MIX_BURN)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Fac", 0.0f))
|
||||
@@ -524,7 +530,7 @@ TEST_F(RenderGraph, constant_fold_part_mix_blend_clamped_no_fac_0)
|
||||
|
||||
builder.add_attribute("Attribute1")
|
||||
.add_attribute("Attribute2")
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix")
|
||||
.set(&MixNode::type, NODE_MIX_BLEND)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 0.0f))
|
||||
@@ -550,21 +556,21 @@ TEST_F(RenderGraph, constant_fold_part_mix_blend)
|
||||
builder.add_attribute("Attribute1")
|
||||
.add_attribute("Attribute2")
|
||||
/* choose left */
|
||||
.add_node(ShaderNodeBuilder<MixNode>("MixBlend1")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "MixBlend1")
|
||||
.set(&MixNode::type, NODE_MIX_BLEND)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Fac", 0.0f))
|
||||
.add_connection("Attribute1::Color", "MixBlend1::Color1")
|
||||
.add_connection("Attribute2::Color", "MixBlend1::Color2")
|
||||
/* choose right */
|
||||
.add_node(ShaderNodeBuilder<MixNode>("MixBlend2")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "MixBlend2")
|
||||
.set(&MixNode::type, NODE_MIX_BLEND)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Fac", 1.0f))
|
||||
.add_connection("Attribute1::Color", "MixBlend2::Color2")
|
||||
.add_connection("Attribute2::Color", "MixBlend2::Color1")
|
||||
/* both inputs folded to Attribute1 */
|
||||
.add_node(ShaderNodeBuilder<MixNode>("MixBlend3")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "MixBlend3")
|
||||
.set(&MixNode::type, NODE_MIX_BLEND)
|
||||
.set(&MixNode::use_clamp, false))
|
||||
.add_connection("Attribute1::Fac", "MixBlend3::Fac")
|
||||
@@ -585,7 +591,7 @@ TEST_F(RenderGraph, constant_fold_part_mix_sub_same_fac_bad)
|
||||
INVALID_INFO_MESSAGE(log, "Folding Mix::");
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix")
|
||||
.set(&MixNode::type, NODE_MIX_SUB)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 0.5f))
|
||||
@@ -606,7 +612,7 @@ TEST_F(RenderGraph, constant_fold_part_mix_sub_same_fac_1)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Mix::Color to constant (0, 0, 0).");
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix")
|
||||
.set(&MixNode::type, NODE_MIX_SUB)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 1.0f))
|
||||
@@ -628,11 +634,11 @@ static void build_mix_partial_test_graph(ShaderGraphBuilder &builder,
|
||||
builder
|
||||
.add_attribute("Attribute")
|
||||
/* constant on the left */
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix_Cx_Fx")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(builder.graph(), "Mix_Cx_Fx")
|
||||
.set(&MixNode::type, type)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Color1", constval))
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix_Cx_F1")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(builder.graph(), "Mix_Cx_F1")
|
||||
.set(&MixNode::type, type)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Color1", constval)
|
||||
@@ -641,11 +647,11 @@ static void build_mix_partial_test_graph(ShaderGraphBuilder &builder,
|
||||
.add_connection("Attribute::Color", "Mix_Cx_Fx::Color2")
|
||||
.add_connection("Attribute::Color", "Mix_Cx_F1::Color2")
|
||||
/* constant on the right */
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix_xC_Fx")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(builder.graph(), "Mix_xC_Fx")
|
||||
.set(&MixNode::type, type)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Color2", constval))
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix_xC_F1")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(builder.graph(), "Mix_xC_F1")
|
||||
.set(&MixNode::type, type)
|
||||
.set(&MixNode::use_clamp, false)
|
||||
.set("Color2", constval)
|
||||
@@ -654,15 +660,15 @@ static void build_mix_partial_test_graph(ShaderGraphBuilder &builder,
|
||||
.add_connection("Attribute::Color", "Mix_xC_Fx::Color1")
|
||||
.add_connection("Attribute::Color", "Mix_xC_F1::Color1")
|
||||
/* results of actual tests simply added up to connect to output */
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Out12")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(builder.graph(), "Out12")
|
||||
.set(&MixNode::type, NODE_MIX_ADD)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 1.0f))
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Out34")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(builder.graph(), "Out34")
|
||||
.set(&MixNode::type, NODE_MIX_ADD)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 1.0f))
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Out1234")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(builder.graph(), "Out1234")
|
||||
.set(&MixNode::type, NODE_MIX_ADD)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 1.0f))
|
||||
@@ -796,9 +802,9 @@ TEST_F(RenderGraph, constant_fold_separate_combine_rgb)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding CombineRGB::Image to constant (0.3, 0.5, 0.7).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<SeparateRGBNode>("SeparateRGB")
|
||||
.add_node(ShaderNodeBuilder<SeparateRGBNode>(graph, "SeparateRGB")
|
||||
.set("Image", make_float3(0.3f, 0.5f, 0.7f)))
|
||||
.add_node(ShaderNodeBuilder<CombineRGBNode>("CombineRGB"))
|
||||
.add_node(ShaderNodeBuilder<CombineRGBNode>(graph, "CombineRGB"))
|
||||
.add_connection("SeparateRGB::R", "CombineRGB::R")
|
||||
.add_connection("SeparateRGB::G", "CombineRGB::G")
|
||||
.add_connection("SeparateRGB::B", "CombineRGB::B")
|
||||
@@ -821,9 +827,9 @@ TEST_F(RenderGraph, constant_fold_separate_combine_xyz)
|
||||
log, "Folding convert_vector_to_color::value_color to constant (0.3, 0.5, 0.7).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<SeparateXYZNode>("SeparateXYZ")
|
||||
.add_node(ShaderNodeBuilder<SeparateXYZNode>(graph, "SeparateXYZ")
|
||||
.set("Vector", make_float3(0.3f, 0.5f, 0.7f)))
|
||||
.add_node(ShaderNodeBuilder<CombineXYZNode>("CombineXYZ"))
|
||||
.add_node(ShaderNodeBuilder<CombineXYZNode>(graph, "CombineXYZ"))
|
||||
.add_connection("SeparateXYZ::X", "CombineXYZ::X")
|
||||
.add_connection("SeparateXYZ::Y", "CombineXYZ::Y")
|
||||
.add_connection("SeparateXYZ::Z", "CombineXYZ::Z")
|
||||
@@ -844,9 +850,9 @@ TEST_F(RenderGraph, constant_fold_separate_combine_hsv)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding CombineHSV::Color to constant (0.3, 0.5, 0.7).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<SeparateHSVNode>("SeparateHSV")
|
||||
.add_node(ShaderNodeBuilder<SeparateHSVNode>(graph, "SeparateHSV")
|
||||
.set("Color", make_float3(0.3f, 0.5f, 0.7f)))
|
||||
.add_node(ShaderNodeBuilder<CombineHSVNode>("CombineHSV"))
|
||||
.add_node(ShaderNodeBuilder<CombineHSVNode>(graph, "CombineHSV"))
|
||||
.add_connection("SeparateHSV::H", "CombineHSV::H")
|
||||
.add_connection("SeparateHSV::S", "CombineHSV::S")
|
||||
.add_connection("SeparateHSV::V", "CombineHSV::V")
|
||||
@@ -864,7 +870,7 @@ TEST_F(RenderGraph, constant_fold_gamma)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Gamma::Color to constant (0.164317, 0.353553, 0.585662).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<GammaNode>("Gamma")
|
||||
.add_node(ShaderNodeBuilder<GammaNode>(graph, "Gamma")
|
||||
.set("Color", make_float3(0.3f, 0.5f, 0.7f))
|
||||
.set("Gamma", 1.5f))
|
||||
.output_color("Gamma::Color");
|
||||
@@ -884,14 +890,14 @@ TEST_F(RenderGraph, constant_fold_gamma_part_0)
|
||||
builder
|
||||
.add_attribute("Attribute")
|
||||
/* constant on the left */
|
||||
.add_node(
|
||||
ShaderNodeBuilder<GammaNode>("Gamma_Cx").set("Color", make_float3(0.0f, 0.0f, 0.0f)))
|
||||
.add_node(ShaderNodeBuilder<GammaNode>(graph, "Gamma_Cx")
|
||||
.set("Color", make_float3(0.0f, 0.0f, 0.0f)))
|
||||
.add_connection("Attribute::Fac", "Gamma_Cx::Gamma")
|
||||
/* constant on the right */
|
||||
.add_node(ShaderNodeBuilder<GammaNode>("Gamma_xC").set("Gamma", 0.0f))
|
||||
.add_node(ShaderNodeBuilder<GammaNode>(graph, "Gamma_xC").set("Gamma", 0.0f))
|
||||
.add_connection("Attribute::Color", "Gamma_xC::Color")
|
||||
/* output sum */
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Out")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Out")
|
||||
.set(&MixNode::type, NODE_MIX_ADD)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 1.0f))
|
||||
@@ -914,14 +920,14 @@ TEST_F(RenderGraph, constant_fold_gamma_part_1)
|
||||
builder
|
||||
.add_attribute("Attribute")
|
||||
/* constant on the left */
|
||||
.add_node(
|
||||
ShaderNodeBuilder<GammaNode>("Gamma_Cx").set("Color", make_float3(1.0f, 1.0f, 1.0f)))
|
||||
.add_node(ShaderNodeBuilder<GammaNode>(graph, "Gamma_Cx")
|
||||
.set("Color", make_float3(1.0f, 1.0f, 1.0f)))
|
||||
.add_connection("Attribute::Fac", "Gamma_Cx::Gamma")
|
||||
/* constant on the right */
|
||||
.add_node(ShaderNodeBuilder<GammaNode>("Gamma_xC").set("Gamma", 1.0f))
|
||||
.add_node(ShaderNodeBuilder<GammaNode>(graph, "Gamma_xC").set("Gamma", 1.0f))
|
||||
.add_connection("Attribute::Color", "Gamma_xC::Color")
|
||||
/* output sum */
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Out")
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Out")
|
||||
.set(&MixNode::type, NODE_MIX_ADD)
|
||||
.set(&MixNode::use_clamp, true)
|
||||
.set("Fac", 1.0f))
|
||||
@@ -941,7 +947,7 @@ TEST_F(RenderGraph, constant_fold_bright_contrast)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding BrightContrast::Color to constant (0.16, 0.6, 1.04).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<BrightContrastNode>("BrightContrast")
|
||||
.add_node(ShaderNodeBuilder<BrightContrastNode>(graph, "BrightContrast")
|
||||
.set("Color", make_float3(0.3f, 0.5f, 0.7f))
|
||||
.set("Bright", 0.1f)
|
||||
.set("Contrast", 1.2f))
|
||||
@@ -958,7 +964,8 @@ TEST_F(RenderGraph, constant_fold_blackbody)
|
||||
EXPECT_ANY_MESSAGE(log);
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Blackbody::Color to constant (3.94163, 0.226523, 0).");
|
||||
|
||||
builder.add_node(ShaderNodeBuilder<BlackbodyNode>("Blackbody").set("Temperature", 1200.0f))
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<BlackbodyNode>(graph, "Blackbody").set("Temperature", 1200.0f))
|
||||
.output_color("Blackbody::Color");
|
||||
|
||||
graph.finalize(scene);
|
||||
@@ -980,7 +987,7 @@ TEST_F(RenderGraph, constant_fold_math)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Math::Value to constant (1.6).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<MathNode>("Math")
|
||||
.add_node(ShaderNodeBuilder<MathNode>(graph, "Math")
|
||||
.set(&MathNode::type, NODE_MATH_ADD)
|
||||
.set(&MathNode::use_clamp, false)
|
||||
.set("Value1", 0.7f)
|
||||
@@ -999,7 +1006,7 @@ TEST_F(RenderGraph, constant_fold_math_clamp)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding clamp::Result to constant (1).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<MathNode>("Math")
|
||||
.add_node(ShaderNodeBuilder<MathNode>(graph, "Math")
|
||||
.set(&MathNode::type, NODE_MATH_ADD)
|
||||
.set(&MathNode::use_clamp, true)
|
||||
.set("Value1", 0.7f)
|
||||
@@ -1020,19 +1027,19 @@ static void build_math_partial_test_graph(ShaderGraphBuilder &builder,
|
||||
builder
|
||||
.add_attribute("Attribute")
|
||||
/* constant on the left */
|
||||
.add_node(ShaderNodeBuilder<MathNode>("Math_Cx")
|
||||
.add_node(ShaderNodeBuilder<MathNode>(builder.graph(), "Math_Cx")
|
||||
.set(&MathNode::type, type)
|
||||
.set(&MathNode::use_clamp, false)
|
||||
.set("Value1", constval))
|
||||
.add_connection("Attribute::Fac", "Math_Cx::Value2")
|
||||
/* constant on the right */
|
||||
.add_node(ShaderNodeBuilder<MathNode>("Math_xC")
|
||||
.add_node(ShaderNodeBuilder<MathNode>(builder.graph(), "Math_xC")
|
||||
.set(&MathNode::type, type)
|
||||
.set(&MathNode::use_clamp, false)
|
||||
.set("Value2", constval))
|
||||
.add_connection("Attribute::Fac", "Math_xC::Value1")
|
||||
/* output sum */
|
||||
.add_node(ShaderNodeBuilder<MathNode>("Out")
|
||||
.add_node(ShaderNodeBuilder<MathNode>(builder.graph(), "Out")
|
||||
.set(&MathNode::type, NODE_MATH_ADD)
|
||||
.set(&MathNode::use_clamp, true))
|
||||
.add_connection("Math_Cx::Value", "Out::Value1")
|
||||
@@ -1170,7 +1177,7 @@ TEST_F(RenderGraph, constant_fold_vector_math)
|
||||
CORRECT_INFO_MESSAGE(log, "Folding VectorMath::Vector to constant (3, 0, 0).");
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>("VectorMath")
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>(graph, "VectorMath")
|
||||
.set(&VectorMathNode::type, NODE_VECTOR_MATH_SUBTRACT)
|
||||
.set("Vector1", make_float3(1.3f, 0.5f, 0.7f))
|
||||
.set("Vector2", make_float3(-1.7f, 0.5f, 0.7f)))
|
||||
@@ -1190,18 +1197,18 @@ static void build_vecmath_partial_test_graph(ShaderGraphBuilder &builder,
|
||||
builder
|
||||
.add_attribute("Attribute")
|
||||
/* constant on the left */
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>("Math_Cx")
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>(builder.graph(), "Math_Cx")
|
||||
.set(&VectorMathNode::type, type)
|
||||
.set("Vector1", constval))
|
||||
.add_connection("Attribute::Vector", "Math_Cx::Vector2")
|
||||
/* constant on the right */
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>("Math_xC")
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>(builder.graph(), "Math_xC")
|
||||
.set(&VectorMathNode::type, type)
|
||||
.set("Vector2", constval))
|
||||
.add_connection("Attribute::Vector", "Math_xC::Vector1")
|
||||
/* output sum */
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>("Out").set(&VectorMathNode::type,
|
||||
NODE_VECTOR_MATH_ADD))
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>(builder.graph(), "Out")
|
||||
.set(&VectorMathNode::type, NODE_VECTOR_MATH_ADD))
|
||||
.add_connection("Math_Cx::Vector", "Out::Vector1")
|
||||
.add_connection("Math_xC::Vector", "Out::Vector2")
|
||||
.output_color("Out::Vector");
|
||||
@@ -1261,8 +1268,8 @@ TEST_F(RenderGraph, constant_fold_bump)
|
||||
EXPECT_ANY_MESSAGE(log);
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Bump::Normal to socket Geometry1::Normal.");
|
||||
|
||||
builder.add_node(ShaderNodeBuilder<GeometryNode>("Geometry1"))
|
||||
.add_node(ShaderNodeBuilder<BumpNode>("Bump"))
|
||||
builder.add_node(ShaderNodeBuilder<GeometryNode>(graph, "Geometry1"))
|
||||
.add_node(ShaderNodeBuilder<BumpNode>(graph, "Bump"))
|
||||
.add_connection("Geometry1::Normal", "Bump::Normal")
|
||||
.output_color("Bump::Normal");
|
||||
|
||||
@@ -1277,7 +1284,7 @@ TEST_F(RenderGraph, constant_fold_bump_no_input)
|
||||
EXPECT_ANY_MESSAGE(log);
|
||||
CORRECT_INFO_MESSAGE(log, "Folding Bump::Normal to socket geometry::Normal.");
|
||||
|
||||
builder.add_node(ShaderNodeBuilder<BumpNode>("Bump")).output_color("Bump::Normal");
|
||||
builder.add_node(ShaderNodeBuilder<BumpNode>(graph, "Bump")).output_color("Bump::Normal");
|
||||
|
||||
graph.finalize(scene);
|
||||
}
|
||||
@@ -1304,7 +1311,7 @@ TEST_F(RenderGraph, constant_fold_rgb_curves)
|
||||
init_test_curve(curve, make_float3(0.0f, 0.25f, 1.0f), make_float3(1.0f, 0.75f, 0.0f), 257);
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<RGBCurvesNode>("Curves")
|
||||
.add_node(ShaderNodeBuilder<RGBCurvesNode>(graph, "Curves")
|
||||
.set(&CurvesNode::curves, curve)
|
||||
.set(&CurvesNode::min_x, 0.1f)
|
||||
.set(&CurvesNode::max_x, 0.9f)
|
||||
@@ -1328,7 +1335,7 @@ TEST_F(RenderGraph, constant_fold_rgb_curves_fac_0)
|
||||
init_test_curve(curve, make_float3(0.0f, 0.25f, 1.0f), make_float3(1.0f, 0.75f, 0.0f), 257);
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<RGBCurvesNode>("Curves")
|
||||
.add_node(ShaderNodeBuilder<RGBCurvesNode>(graph, "Curves")
|
||||
.set(&CurvesNode::curves, curve)
|
||||
.set(&CurvesNode::min_x, 0.1f)
|
||||
.set(&CurvesNode::max_x, 0.9f)
|
||||
@@ -1352,7 +1359,7 @@ TEST_F(RenderGraph, constant_fold_rgb_curves_fac_0_const)
|
||||
init_test_curve(curve, make_float3(0.0f, 0.25f, 1.0f), make_float3(1.0f, 0.75f, 0.0f), 257);
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<RGBCurvesNode>("Curves")
|
||||
.add_node(ShaderNodeBuilder<RGBCurvesNode>(graph, "Curves")
|
||||
.set(&CurvesNode::curves, curve)
|
||||
.set(&CurvesNode::min_x, 0.1f)
|
||||
.set(&CurvesNode::max_x, 0.9f)
|
||||
@@ -1376,7 +1383,7 @@ TEST_F(RenderGraph, constant_fold_vector_curves)
|
||||
init_test_curve(curve, make_float3(0.0f, 0.25f, 1.0f), make_float3(1.0f, 0.75f, 0.0f), 257);
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<VectorCurvesNode>("Curves")
|
||||
.add_node(ShaderNodeBuilder<VectorCurvesNode>(graph, "Curves")
|
||||
.set(&CurvesNode::curves, curve)
|
||||
.set(&CurvesNode::min_x, 0.1f)
|
||||
.set(&CurvesNode::max_x, 0.9f)
|
||||
@@ -1400,7 +1407,7 @@ TEST_F(RenderGraph, constant_fold_vector_curves_fac_0)
|
||||
init_test_curve(curve, make_float3(0.0f, 0.25f, 1.0f), make_float3(1.0f, 0.75f, 0.0f), 257);
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<VectorCurvesNode>("Curves")
|
||||
.add_node(ShaderNodeBuilder<VectorCurvesNode>(graph, "Curves")
|
||||
.set(&CurvesNode::curves, curve)
|
||||
.set(&CurvesNode::min_x, 0.1f)
|
||||
.set(&CurvesNode::max_x, 0.9f)
|
||||
@@ -1427,12 +1434,12 @@ TEST_F(RenderGraph, constant_fold_rgb_ramp)
|
||||
init_test_curve(alpha, 0.75f, 1.0f, 9);
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<RGBRampNode>("Ramp")
|
||||
.add_node(ShaderNodeBuilder<RGBRampNode>(graph, "Ramp")
|
||||
.set(&RGBRampNode::ramp, curve)
|
||||
.set(&RGBRampNode::ramp_alpha, alpha)
|
||||
.set(&RGBRampNode::interpolate, true)
|
||||
.set("Fac", 0.56f))
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix").set(&MixNode::type, NODE_MIX_ADD))
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix").set(&MixNode::type, NODE_MIX_ADD))
|
||||
.add_connection("Ramp::Color", "Mix::Color1")
|
||||
.add_connection("Ramp::Alpha", "Mix::Color2")
|
||||
.output_color("Mix::Color");
|
||||
@@ -1456,12 +1463,12 @@ TEST_F(RenderGraph, constant_fold_rgb_ramp_flat)
|
||||
init_test_curve(alpha, 0.75f, 1.0f, 9);
|
||||
|
||||
builder
|
||||
.add_node(ShaderNodeBuilder<RGBRampNode>("Ramp")
|
||||
.add_node(ShaderNodeBuilder<RGBRampNode>(graph, "Ramp")
|
||||
.set(&RGBRampNode::ramp, curve)
|
||||
.set(&RGBRampNode::ramp_alpha, alpha)
|
||||
.set(&RGBRampNode::interpolate, false)
|
||||
.set("Fac", 0.56f))
|
||||
.add_node(ShaderNodeBuilder<MixNode>("Mix").set(&MixNode::type, NODE_MIX_ADD))
|
||||
.add_node(ShaderNodeBuilder<MixNode>(graph, "Mix").set(&MixNode::type, NODE_MIX_ADD))
|
||||
.add_connection("Ramp::Color", "Mix::Color1")
|
||||
.add_connection("Ramp::Alpha", "Mix::Color2")
|
||||
.output_color("Mix::Color");
|
||||
@@ -1482,7 +1489,7 @@ TEST_F(RenderGraph, constant_fold_convert_float_color_float)
|
||||
"Folding convert_color_to_float::value_float to socket Attribute::Fac.");
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<InvertNode>("Invert").set("Fac", 0.0f))
|
||||
.add_node(ShaderNodeBuilder<InvertNode>(graph, "Invert").set("Fac", 0.0f))
|
||||
.add_connection("Attribute::Fac", "Invert::Color")
|
||||
.output_value("Invert::Color");
|
||||
|
||||
@@ -1502,7 +1509,7 @@ TEST_F(RenderGraph, constant_fold_convert_color_vector_color)
|
||||
"Folding convert_vector_to_color::value_color to socket Attribute::Color.");
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>("VecAdd")
|
||||
.add_node(ShaderNodeBuilder<VectorMathNode>(graph, "VecAdd")
|
||||
.set(&VectorMathNode::type, NODE_VECTOR_MATH_ADD)
|
||||
.set("Vector2", make_float3(0, 0, 0)))
|
||||
.add_connection("Attribute::Color", "VecAdd::Vector1")
|
||||
@@ -1523,7 +1530,7 @@ TEST_F(RenderGraph, constant_fold_convert_color_float_color)
|
||||
INVALID_INFO_MESSAGE(log, "Folding convert_float_to_color::");
|
||||
|
||||
builder.add_attribute("Attribute")
|
||||
.add_node(ShaderNodeBuilder<MathNode>("MathAdd")
|
||||
.add_node(ShaderNodeBuilder<MathNode>(graph, "MathAdd")
|
||||
.set(&MathNode::type, NODE_MATH_ADD)
|
||||
.set("Value2", 0.0f))
|
||||
.add_connection("Attribute::Color", "MathAdd::Value1")
|
||||
|
@@ -141,7 +141,7 @@ ccl_device_inline float4 half4_to_float4(half4 h)
|
||||
ccl_device_inline half float_to_half(float f)
|
||||
{
|
||||
const uint u = __float_as_uint(f);
|
||||
/* Sign bit, shifted to it's position. */
|
||||
/* Sign bit, shifted to its position. */
|
||||
uint sign_bit = u & 0x80000000;
|
||||
sign_bit >>= 16;
|
||||
/* Exponent. */
|
||||
|
@@ -24,7 +24,7 @@ CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Task Pool */
|
||||
|
||||
TaskPool::TaskPool() : start_time(time_dt()), num_tasks_handled(0)
|
||||
TaskPool::TaskPool() : start_time(time_dt()), num_tasks_pushed(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ TaskPool::~TaskPool()
|
||||
void TaskPool::push(TaskRunFunction &&task)
|
||||
{
|
||||
tbb_group.run(std::move(task));
|
||||
num_tasks_handled++;
|
||||
num_tasks_pushed++;
|
||||
}
|
||||
|
||||
void TaskPool::wait_work(Summary *stats)
|
||||
@@ -45,14 +45,19 @@ void TaskPool::wait_work(Summary *stats)
|
||||
|
||||
if (stats != NULL) {
|
||||
stats->time_total = time_dt() - start_time;
|
||||
stats->num_tasks_handled = num_tasks_handled;
|
||||
stats->num_tasks_handled = num_tasks_pushed;
|
||||
}
|
||||
|
||||
num_tasks_pushed = 0;
|
||||
}
|
||||
|
||||
void TaskPool::cancel()
|
||||
{
|
||||
tbb_group.cancel();
|
||||
tbb_group.wait();
|
||||
if (num_tasks_pushed > 0) {
|
||||
tbb_group.cancel();
|
||||
tbb_group.wait();
|
||||
num_tasks_pushed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool TaskPool::canceled()
|
||||
|
@@ -71,8 +71,8 @@ class TaskPool {
|
||||
/* Time time stamp of first task pushed. */
|
||||
double start_time;
|
||||
|
||||
/* Number of all tasks handled by this pool. */
|
||||
int num_tasks_handled;
|
||||
/* Number of all tasks pushed to the pool. Cleared after wait_work() and cancel(). */
|
||||
int num_tasks_pushed;
|
||||
};
|
||||
|
||||
/* Task Scheduler
|
||||
|
@@ -1996,7 +1996,7 @@ int Octree::floodFill(LeafNode *leaf, int st[3], int len, int /*height*/, int th
|
||||
delete queue;
|
||||
continue;
|
||||
}
|
||||
dc_printf("Less then %d, removing...\n", threshold);
|
||||
dc_printf("Less than %d, removing...\n", threshold);
|
||||
|
||||
// We have to remove this noise
|
||||
|
||||
|
@@ -38,10 +38,10 @@
|
||||
*/
|
||||
|
||||
/* Global defines */
|
||||
// Uncomment to see debug information
|
||||
/* Uncomment to see debug information */
|
||||
// #define IN_DEBUG_MODE
|
||||
|
||||
// Uncomment to see more output messages during repair
|
||||
/* Uncomment to see more output messages during repair */
|
||||
// #define IN_VERBOSE_MODE
|
||||
|
||||
/* Set scan convert params */
|
||||
@@ -65,19 +65,19 @@ struct InternalNode {
|
||||
/* Can have up to eight children */
|
||||
Node *children[0];
|
||||
|
||||
/// Test if child is leaf
|
||||
/** Test if child is leaf */
|
||||
int is_child_leaf(int index) const
|
||||
{
|
||||
return (child_is_leaf_bitfield >> index) & 1;
|
||||
}
|
||||
|
||||
/// If child index exists
|
||||
/** If child index exists */
|
||||
int has_child(int index) const
|
||||
{
|
||||
return (has_child_bitfield >> index) & 1;
|
||||
}
|
||||
|
||||
/// Get the pointer to child index
|
||||
/** Get the pointer to child index */
|
||||
Node *get_child(int count)
|
||||
{
|
||||
return children[count];
|
||||
@@ -88,13 +88,13 @@ struct InternalNode {
|
||||
return children[count];
|
||||
}
|
||||
|
||||
/// Get total number of children
|
||||
/** Get total number of children */
|
||||
int get_num_children() const
|
||||
{
|
||||
return numChildrenTable[has_child_bitfield];
|
||||
}
|
||||
|
||||
/// Get the count of children
|
||||
/** Get the count of children */
|
||||
int get_child_count(int index) const
|
||||
{
|
||||
return childrenCountTable[has_child_bitfield][index];
|
||||
@@ -108,7 +108,7 @@ struct InternalNode {
|
||||
return childrenCountTable[has_child_bitfield];
|
||||
}
|
||||
|
||||
/// Get all children
|
||||
/** Get all children */
|
||||
void fill_children(Node *children[8], int leaf[8])
|
||||
{
|
||||
int count = 0;
|
||||
@@ -125,7 +125,7 @@ struct InternalNode {
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the child pointer
|
||||
/** Sets the child pointer */
|
||||
void set_child(int count, Node *chd)
|
||||
{
|
||||
children[count] = chd;
|
||||
@@ -195,22 +195,22 @@ extern const int dirEdge[3][4];
|
||||
*/
|
||||
|
||||
struct PathElement {
|
||||
// Origin
|
||||
/* Origin */
|
||||
int pos[3];
|
||||
|
||||
// link
|
||||
/* link */
|
||||
PathElement *next;
|
||||
};
|
||||
|
||||
struct PathList {
|
||||
// Head
|
||||
/* Head */
|
||||
PathElement *head;
|
||||
PathElement *tail;
|
||||
|
||||
// Length of the list
|
||||
/* Length of the list */
|
||||
int length;
|
||||
|
||||
// Next list
|
||||
/* Next list */
|
||||
PathList *next;
|
||||
};
|
||||
|
||||
@@ -221,31 +221,31 @@ class Octree {
|
||||
public:
|
||||
/* Public members */
|
||||
|
||||
/// Memory allocators
|
||||
/** Memory allocators */
|
||||
VirtualMemoryAllocator *alloc[9];
|
||||
VirtualMemoryAllocator *leafalloc[4];
|
||||
|
||||
/// Root node
|
||||
/** Root node */
|
||||
Node *root;
|
||||
|
||||
/// Model reader
|
||||
/** Model reader */
|
||||
ModelReader *reader;
|
||||
|
||||
/// Marching cubes table
|
||||
/** Marching cubes table */
|
||||
Cubes *cubes;
|
||||
|
||||
/// Length of grid
|
||||
/** Length of grid */
|
||||
int dimen;
|
||||
int mindimen, minshift;
|
||||
|
||||
/// Maximum depth
|
||||
/** Maximum depth */
|
||||
int maxDepth;
|
||||
|
||||
/// The lower corner of the bounding box and the size
|
||||
/** The lower corner of the bounding box and the size */
|
||||
float origin[3];
|
||||
float range;
|
||||
|
||||
/// Counting information
|
||||
/** Counting information */
|
||||
int nodeCount;
|
||||
int nodeSpace;
|
||||
int nodeCounts[9];
|
||||
@@ -255,9 +255,9 @@ class Octree {
|
||||
PathList *ringList;
|
||||
|
||||
int maxTrianglePerCell;
|
||||
int outType; // 0 for OFF, 1 for PLY, 2 for VOL
|
||||
int outType; /* 0 for OFF, 1 for PLY, 2 for VOL */
|
||||
|
||||
// For flood filling
|
||||
/* For flood filling */
|
||||
int use_flood_fill;
|
||||
float thresh;
|
||||
|
||||
@@ -469,11 +469,11 @@ class Octree {
|
||||
private:
|
||||
/************ Operators for all nodes ************/
|
||||
|
||||
/// Lookup table
|
||||
/** Lookup table */
|
||||
int numEdgeTable[8];
|
||||
int edgeCountTable[8][3];
|
||||
|
||||
/// Build up lookup table
|
||||
/** Build up lookup table */
|
||||
void buildTable()
|
||||
{
|
||||
for (int i = 0; i < 256; i++) {
|
||||
@@ -550,13 +550,13 @@ class Octree {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/// Retrieve signs
|
||||
/** Retrieve signs */
|
||||
int getSign(const LeafNode *leaf, int index)
|
||||
{
|
||||
return ((leaf->signs >> index) & 1);
|
||||
}
|
||||
|
||||
/// Set sign
|
||||
/** Set sign */
|
||||
void setSign(LeafNode *leaf, int index)
|
||||
{
|
||||
leaf->signs |= (1 << index);
|
||||
@@ -624,7 +624,7 @@ class Octree {
|
||||
return (leaf->flood_fill >> eind) & 1;
|
||||
}
|
||||
|
||||
/// Generate signs at the corners from the edge parity
|
||||
/** Generate signs at the corners from the edge parity */
|
||||
void generateSigns(LeafNode *leaf, unsigned char table[], int start)
|
||||
{
|
||||
leaf->signs = table[leaf->edge_parity];
|
||||
@@ -634,7 +634,7 @@ class Octree {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get edge parity
|
||||
/** Get edge parity */
|
||||
int getEdgeParity(const LeafNode *leaf, int index) const
|
||||
{
|
||||
assert(index >= 0 && index <= 11);
|
||||
@@ -642,7 +642,7 @@ class Octree {
|
||||
return (leaf->edge_parity >> index) & 1;
|
||||
}
|
||||
|
||||
/// Get edge parity on a face
|
||||
/** Get edge parity on a face */
|
||||
int getFaceParity(LeafNode *leaf, int index)
|
||||
{
|
||||
int a = getEdgeParity(leaf, faceMap[index][0]) + getEdgeParity(leaf, faceMap[index][1]) +
|
||||
@@ -656,7 +656,7 @@ class Octree {
|
||||
return a;
|
||||
}
|
||||
|
||||
/// Set edge parity
|
||||
/** Set edge parity */
|
||||
void flipEdge(LeafNode *leaf, int index)
|
||||
{
|
||||
assert(index >= 0 && index <= 11);
|
||||
@@ -664,7 +664,7 @@ class Octree {
|
||||
leaf->edge_parity ^= (1 << index);
|
||||
}
|
||||
|
||||
/// Set 1
|
||||
/** Set 1 */
|
||||
void setEdge(LeafNode *leaf, int index)
|
||||
{
|
||||
assert(index >= 0 && index <= 11);
|
||||
@@ -672,7 +672,7 @@ class Octree {
|
||||
leaf->edge_parity |= (1 << index);
|
||||
}
|
||||
|
||||
/// Set 0
|
||||
/** Set 0 */
|
||||
void resetEdge(LeafNode *leaf, int index)
|
||||
{
|
||||
assert(index >= 0 && index <= 11);
|
||||
@@ -680,7 +680,7 @@ class Octree {
|
||||
leaf->edge_parity &= ~(1 << index);
|
||||
}
|
||||
|
||||
/// Flipping with a new intersection offset
|
||||
/** Flipping with a new intersection offset */
|
||||
void createPrimalEdgesMask(LeafNode *leaf)
|
||||
{
|
||||
leaf->primary_edge_intersections = getPrimalEdgesMask2(leaf);
|
||||
@@ -707,7 +707,7 @@ class Octree {
|
||||
if ((index & 3) == 0) {
|
||||
int ind = index / 4;
|
||||
if (getEdgeParity(leaf, index) && !getStoredEdgesParity(leaf, ind)) {
|
||||
// Create a new node
|
||||
/* Create a new node */
|
||||
int num = getNumEdges(leaf) + 1;
|
||||
setStoredEdgesParity(leaf, ind);
|
||||
int count = getEdgeCount(leaf, ind);
|
||||
@@ -739,14 +739,14 @@ class Octree {
|
||||
return leaf;
|
||||
}
|
||||
|
||||
/// Update parent link
|
||||
/** Update parent link */
|
||||
void updateParent(InternalNode *node, int len, int st[3], LeafNode *leaf)
|
||||
{
|
||||
// First, locate the parent
|
||||
/* First, locate the parent */
|
||||
int count;
|
||||
InternalNode *parent = locateParent(node, len, st, count);
|
||||
|
||||
// Update
|
||||
/* Update */
|
||||
parent->set_child(count, (Node *)leaf);
|
||||
}
|
||||
|
||||
@@ -757,18 +757,18 @@ class Octree {
|
||||
return;
|
||||
}
|
||||
|
||||
// First, locate the parent
|
||||
/* First, locate the parent */
|
||||
int count;
|
||||
InternalNode *parent = locateParent(len, st, count);
|
||||
|
||||
// UPdate
|
||||
/* Update */
|
||||
parent->set_child(count, (Node *)node);
|
||||
}
|
||||
|
||||
/// Find edge intersection on a given edge
|
||||
/** Find edge intersection on a given edge */
|
||||
int getEdgeIntersectionByIndex(int st[3], int index, float pt[3], int check) const
|
||||
{
|
||||
// First, locat the leaf
|
||||
/* First, locat the leaf */
|
||||
const LeafNode *leaf;
|
||||
if (check) {
|
||||
leaf = locateLeafCheck(st);
|
||||
@@ -791,7 +791,7 @@ class Octree {
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve number of edges intersected
|
||||
/** Retrieve number of edges intersected */
|
||||
int getPrimalEdgesMask(const LeafNode *leaf) const
|
||||
{
|
||||
return leaf->primary_edge_intersections;
|
||||
@@ -803,7 +803,7 @@ class Octree {
|
||||
((leaf->edge_parity & 0x100) >> 6));
|
||||
}
|
||||
|
||||
/// Get the count for a primary edge
|
||||
/** Get the count for a primary edge */
|
||||
int getEdgeCount(const LeafNode *leaf, int index) const
|
||||
{
|
||||
return edgeCountTable[getPrimalEdgesMask(leaf)][index];
|
||||
@@ -818,7 +818,7 @@ class Octree {
|
||||
return numEdgeTable[getPrimalEdgesMask2(leaf)];
|
||||
}
|
||||
|
||||
/// Set edge intersection
|
||||
/** Set edge intersection */
|
||||
void setEdgeOffset(LeafNode *leaf, float pt, int count)
|
||||
{
|
||||
float *pts = leaf->edge_intersections;
|
||||
@@ -828,7 +828,7 @@ class Octree {
|
||||
pts[EDGE_FLOATS * count + 3] = 0;
|
||||
}
|
||||
|
||||
/// Set multiple edge intersections
|
||||
/** Set multiple edge intersections */
|
||||
void setEdgeOffsets(LeafNode *leaf, float pt[3], int len)
|
||||
{
|
||||
float *pts = leaf->edge_intersections;
|
||||
@@ -837,35 +837,35 @@ class Octree {
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve edge intersection
|
||||
/** Retrieve edge intersection */
|
||||
float getEdgeOffset(const LeafNode *leaf, int count) const
|
||||
{
|
||||
return leaf->edge_intersections[4 * count];
|
||||
}
|
||||
|
||||
/// Update method
|
||||
/** Update method */
|
||||
LeafNode *updateEdgeOffsets(LeafNode *leaf, int oldlen, int newlen, float offs[3])
|
||||
{
|
||||
// First, create a new leaf node
|
||||
/* First, create a new leaf node */
|
||||
LeafNode *nleaf = createLeaf(newlen);
|
||||
*nleaf = *leaf;
|
||||
|
||||
// Next, fill in the offsets
|
||||
/* Next, fill in the offsets */
|
||||
setEdgeOffsets(nleaf, offs, newlen);
|
||||
|
||||
// Finally, delete the old leaf
|
||||
/* Finally, delete the old leaf */
|
||||
removeLeaf(oldlen, leaf);
|
||||
|
||||
return nleaf;
|
||||
}
|
||||
|
||||
/// Set minimizer index
|
||||
/** Set minimizer index */
|
||||
void setMinimizerIndex(LeafNode *leaf, int index)
|
||||
{
|
||||
leaf->minimizer_index = index;
|
||||
}
|
||||
|
||||
/// Get minimizer index
|
||||
/** Get minimizer index */
|
||||
int getMinimizerIndex(LeafNode *leaf)
|
||||
{
|
||||
return leaf->minimizer_index;
|
||||
@@ -890,7 +890,7 @@ class Octree {
|
||||
}
|
||||
}
|
||||
|
||||
/// Set edge intersection
|
||||
/** Set edge intersection */
|
||||
void setEdgeOffsetNormal(LeafNode *leaf, float pt, float a, float b, float c, int count)
|
||||
{
|
||||
float *pts = leaf->edge_intersections;
|
||||
@@ -909,7 +909,7 @@ class Octree {
|
||||
return pts[4 * count];
|
||||
}
|
||||
|
||||
/// Set multiple edge intersections
|
||||
/** Set multiple edge intersections */
|
||||
void setEdgeOffsetsNormals(
|
||||
LeafNode *leaf, const float pt[], const float a[], const float b[], const float c[], int len)
|
||||
{
|
||||
@@ -925,7 +925,7 @@ class Octree {
|
||||
}
|
||||
}
|
||||
|
||||
/// Retrieve complete edge intersection
|
||||
/** Retrieve complete edge intersection */
|
||||
void getEdgeIntersectionByIndex(
|
||||
const LeafNode *leaf, int index, int st[3], int len, float pt[3], float nm[3]) const
|
||||
{
|
||||
@@ -1168,25 +1168,25 @@ class Octree {
|
||||
}
|
||||
}
|
||||
|
||||
/// Update method
|
||||
/** Update method */
|
||||
LeafNode *updateEdgeOffsetsNormals(
|
||||
LeafNode *leaf, int oldlen, int newlen, float offs[3], float a[3], float b[3], float c[3])
|
||||
{
|
||||
// First, create a new leaf node
|
||||
/* First, create a new leaf node */
|
||||
LeafNode *nleaf = createLeaf(newlen);
|
||||
*nleaf = *leaf;
|
||||
|
||||
// Next, fill in the offsets
|
||||
/* Next, fill in the offsets */
|
||||
setEdgeOffsetsNormals(nleaf, offs, a, b, c, newlen);
|
||||
|
||||
// Finally, delete the old leaf
|
||||
/* Finally, delete the old leaf */
|
||||
removeLeaf(oldlen, leaf);
|
||||
|
||||
return nleaf;
|
||||
}
|
||||
|
||||
/// Locate a leaf
|
||||
/// WARNING: assuming this leaf already exists!
|
||||
/** Locate a leaf
|
||||
* WARNING: assuming this leaf already exists! */
|
||||
|
||||
LeafNode *locateLeaf(int st[3])
|
||||
{
|
||||
@@ -1282,7 +1282,7 @@ class Octree {
|
||||
|
||||
/************ Operators for internal nodes ************/
|
||||
|
||||
/// Add a kid to an existing internal node
|
||||
/** Add a kid to an existing internal node */
|
||||
InternalNode *addChild(InternalNode *node, int index, Node *child, int aLeaf)
|
||||
{
|
||||
// Create new internal node
|
||||
@@ -1318,7 +1318,7 @@ class Octree {
|
||||
return rnode;
|
||||
}
|
||||
|
||||
/// Allocate a node
|
||||
/** Allocate a node */
|
||||
InternalNode *createInternal(int length)
|
||||
{
|
||||
InternalNode *inode = (InternalNode *)alloc[length]->allocate();
|
||||
@@ -1350,7 +1350,7 @@ class Octree {
|
||||
leafalloc[num]->deallocate(leaf);
|
||||
}
|
||||
|
||||
/// Add a leaf (by creating a new par node with the leaf added)
|
||||
/** Add a leaf (by creating a new par node with the leaf added) */
|
||||
InternalNode *addLeafChild(InternalNode *par, int index, int count, LeafNode *leaf)
|
||||
{
|
||||
int num = par->get_num_children() + 1;
|
||||
|
@@ -51,7 +51,7 @@ class GHOST_IEventConsumer;
|
||||
* Blender.
|
||||
* <br><br>
|
||||
* Enough history. What does GHOST have to offer?<br>
|
||||
* In short: everything that Blender needed from GLUT to run on all it's supported
|
||||
* In short: everything that Blender needed from GLUT to run on all its supported
|
||||
* operating systems and some extra's.
|
||||
* This includes :
|
||||
*
|
||||
|
@@ -36,7 +36,7 @@ class GHOST_CallbackEventConsumer : public GHOST_IEventConsumer {
|
||||
/**
|
||||
* Constructor.
|
||||
* \param eventCallback The call-back routine invoked.
|
||||
* \param userData The data passed back though the call-back routine.
|
||||
* \param userData The data passed back through the call-back routine.
|
||||
*/
|
||||
GHOST_CallbackEventConsumer(GHOST_EventCallbackProcPtr eventCallback,
|
||||
GHOST_TUserDataPtr userData);
|
||||
@@ -58,7 +58,7 @@ class GHOST_CallbackEventConsumer : public GHOST_IEventConsumer {
|
||||
protected:
|
||||
/** The call-back routine invoked. */
|
||||
GHOST_EventCallbackProcPtr m_eventCallback;
|
||||
/** The data passed back though the call-back routine. */
|
||||
/** The data passed back through the call-back routine. */
|
||||
GHOST_TUserDataPtr m_userData;
|
||||
|
||||
#ifdef WITH_CXX_GUARDEDALLOC
|
||||
|
@@ -360,7 +360,7 @@ GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window **window,
|
||||
glSettings.flags |= GHOST_glAlphaBackground;
|
||||
|
||||
/* note: don't use getCurrentDisplaySetting() because on X11 we may
|
||||
* be zoomed in and the desktop may be bigger then the viewport. */
|
||||
* be zoomed in and the desktop may be bigger than the viewport. */
|
||||
GHOST_ASSERT(m_displayManager,
|
||||
"GHOST_System::createFullScreenWindow(): invalid display manager");
|
||||
// GHOST_PRINT("GHOST_System::createFullScreenWindow(): creating full-screen window\n");
|
||||
|
@@ -1599,7 +1599,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
window->getClientBounds(bounds);
|
||||
|
||||
/* Switch back to Cocoa coordinates orientation
|
||||
* (y=0 at bottom, the same as blender internal btw!), and to client coordinates. */
|
||||
* (y=0 at bottom, the same as blender internal BTW!), and to client coordinates. */
|
||||
window->getClientBounds(windowBounds);
|
||||
window->screenToClient(bounds.m_l, bounds.m_b, correctedBounds.m_l, correctedBounds.m_t);
|
||||
window->screenToClient(bounds.m_r, bounds.m_t, correctedBounds.m_r, correctedBounds.m_b);
|
||||
|
@@ -255,8 +255,8 @@ static GHOST_TKey convertSDLKey(SDL_Scancode key)
|
||||
|
||||
/* keypad events */
|
||||
|
||||
/* note, sdl defines a bunch of kp defines I never saw before like
|
||||
* SDL_SCANCODE_KP_PERCENT, SDL_SCANCODE_KP_XOR - campbell */
|
||||
/* NOTE: SDL defines a bunch of key-pad identifiers that aren't supported by GHOST,
|
||||
* such as #SDL_SCANCODE_KP_PERCENT, #SDL_SCANCODE_KP_XOR. */
|
||||
GXMAP(type, SDL_SCANCODE_KP_0, GHOST_kKeyNumpad0);
|
||||
GXMAP(type, SDL_SCANCODE_KP_1, GHOST_kKeyNumpad1);
|
||||
GXMAP(type, SDL_SCANCODE_KP_2, GHOST_kKeyNumpad2);
|
||||
|
@@ -354,7 +354,7 @@ class GHOST_SystemWin32 : public GHOST_System {
|
||||
* Process special keys (VK_OEM_*), to see if current key layout
|
||||
* gives us anything special, like ! on french AZERTY.
|
||||
* \param vKey The virtual key from hardKey
|
||||
* \param scanCode The ScanCode of pressed key (simular to PS/2 Set 1)
|
||||
* \param scanCode The ScanCode of pressed key (similar to PS/2 Set 1)
|
||||
*/
|
||||
GHOST_TKey processSpecialKey(short vKey, short scanCode) const;
|
||||
|
||||
|
@@ -175,7 +175,8 @@ GHOST_SystemX11::GHOST_SystemX11() : GHOST_System(), m_xkb_descr(NULL), m_start_
|
||||
#undef GHOST_INTERN_ATOM_IF_EXISTS
|
||||
#undef GHOST_INTERN_ATOM
|
||||
|
||||
m_last_warp = 0;
|
||||
m_last_warp_x = 0;
|
||||
m_last_warp_y = 0;
|
||||
m_last_release_keycode = 0;
|
||||
m_last_release_time = 0;
|
||||
|
||||
@@ -981,17 +982,24 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
|
||||
window->getCursorGrabAccum(x_accum, y_accum);
|
||||
|
||||
if (x_new != xme.x_root || y_new != xme.y_root) {
|
||||
if (xme.time > m_last_warp) {
|
||||
/* when wrapping we don't need to add an event because the
|
||||
* setCursorPosition call will cause a new event after */
|
||||
setCursorPosition(x_new, y_new); /* wrap */
|
||||
window->setCursorGrabAccum(x_accum + (xme.x_root - x_new),
|
||||
y_accum + (xme.y_root - y_new));
|
||||
m_last_warp = lastEventTime(xme.time);
|
||||
/* Use time of last event to avoid wrapping several times on the 'same' actual wrap.
|
||||
* Note that we need to deal with X and Y separately as those might wrap at the same time
|
||||
* but still in two different events (corner case, see T74918).
|
||||
* We also have to add a few extra milliseconds of 'padding', as sometimes we get two
|
||||
* close events that will generate extra wrap on the same axis within those few
|
||||
* milliseconds. */
|
||||
if (x_new != xme.x_root && xme.time > m_last_warp_x) {
|
||||
x_accum += (xme.x_root - x_new);
|
||||
m_last_warp_x = lastEventTime(xme.time) + 25;
|
||||
}
|
||||
else {
|
||||
setCursorPosition(x_new, y_new); /* wrap but don't accumulate */
|
||||
if (y_new != xme.y_root && xme.time > m_last_warp_y) {
|
||||
y_accum += (xme.y_root - y_new);
|
||||
m_last_warp_y = lastEventTime(xme.time) + 25;
|
||||
}
|
||||
window->setCursorGrabAccum(x_accum, y_accum);
|
||||
/* When wrapping we don't need to add an event because the
|
||||
* #setCursorPosition call will cause a new event after. */
|
||||
setCursorPosition(x_new, y_new); /* wrap */
|
||||
}
|
||||
else {
|
||||
g_event = new GHOST_EventCursor(getMilliSeconds(),
|
||||
|
@@ -361,7 +361,8 @@ class GHOST_SystemX11 : public GHOST_System {
|
||||
* To prevent multiple warp, we store the time of the last warp event
|
||||
* and stop accumulating all events generated before that.
|
||||
*/
|
||||
Time m_last_warp;
|
||||
Time m_last_warp_x;
|
||||
Time m_last_warp_y;
|
||||
|
||||
/* Detect auto-repeat glitch. */
|
||||
unsigned int m_last_release_keycode;
|
||||
|
@@ -60,7 +60,7 @@ class IK_QJacobian {
|
||||
int m_dof, m_task_size;
|
||||
bool m_transpose;
|
||||
|
||||
// the jacobian matrix and it's null space projector
|
||||
// the jacobian matrix and its null space projector
|
||||
MatrixXd m_jacobian, m_jacobian_tmp;
|
||||
MatrixXd m_nullspace;
|
||||
|
||||
|
@@ -54,7 +54,7 @@ namespace KDL {
|
||||
class Error {
|
||||
public:
|
||||
/** Returns a description string describing the error.
|
||||
* the returned pointer only garanteed to exists as long as
|
||||
* the returned pointer only guaranteed to exists as long as
|
||||
* the Error object exists.
|
||||
*/
|
||||
virtual ~Error() {}
|
||||
|
@@ -32,7 +32,7 @@
|
||||
* ORO_Geometry V0.2
|
||||
*
|
||||
* \par history
|
||||
* - changed layout of the comments to accomodate doxygen
|
||||
* - changed layout of the comments to accommodate doxygen
|
||||
*/
|
||||
#ifndef ERROR_STACK_H
|
||||
#define ERROR_STACK_H
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* ORO_Geometry V0.2
|
||||
*
|
||||
* @par history
|
||||
* - changed layout of the comments to accomodate doxygen
|
||||
* - changed layout of the comments to accommodate doxygen
|
||||
*/
|
||||
|
||||
#include "utility.h"
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* functions and macro definitions.
|
||||
*
|
||||
* \par history
|
||||
* - changed layout of the comments to accomodate doxygen
|
||||
* - changed layout of the comments to accommodate doxygen
|
||||
*/
|
||||
|
||||
|
||||
|
@@ -111,6 +111,7 @@ if(WITH_LIBMV)
|
||||
libmv/simple_pipeline/intersect.cc
|
||||
libmv/simple_pipeline/keyframe_selection.cc
|
||||
libmv/simple_pipeline/modal_solver.cc
|
||||
libmv/simple_pipeline/packed_intrinsics.cc
|
||||
libmv/simple_pipeline/pipeline.cc
|
||||
libmv/simple_pipeline/reconstruction.cc
|
||||
libmv/simple_pipeline/reconstruction_scale.cc
|
||||
@@ -149,6 +150,7 @@ if(WITH_LIBMV)
|
||||
libmv/autotrack/region.h
|
||||
libmv/autotrack/tracks.h
|
||||
libmv/base/aligned_malloc.h
|
||||
libmv/base/array.h
|
||||
libmv/base/id_generator.h
|
||||
libmv/base/map.h
|
||||
libmv/base/scoped_ptr.h
|
||||
@@ -191,6 +193,7 @@ if(WITH_LIBMV)
|
||||
libmv/simple_pipeline/intersect.h
|
||||
libmv/simple_pipeline/keyframe_selection.h
|
||||
libmv/simple_pipeline/modal_solver.h
|
||||
libmv/simple_pipeline/packed_intrinsics.h
|
||||
libmv/simple_pipeline/pipeline.h
|
||||
libmv/simple_pipeline/reconstruction.h
|
||||
libmv/simple_pipeline/reconstruction_scale.h
|
||||
|
@@ -130,7 +130,7 @@ bool AutoTrack::TrackMarker(Marker* tracked_marker,
|
||||
// Try to predict the location of the second marker.
|
||||
bool predicted_position = false;
|
||||
if (PredictMarkerPosition(tracks_, tracked_marker)) {
|
||||
LG << "Succesfully predicted!";
|
||||
LG << "Successfully predicted!";
|
||||
predicted_position = true;
|
||||
} else {
|
||||
LG << "Prediction failed; trying to track anyway.";
|
||||
|
32
intern/libmv/libmv/base/array.h
Normal file
32
intern/libmv/libmv/base/array.h
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright (c) 2020 libmv authors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
|
||||
#ifndef LIBMV_BASE_ARRAY_H_
|
||||
#define LIBMV_BASE_ARRAY_H_
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace libmv {
|
||||
|
||||
using std::array;
|
||||
|
||||
} // namespace libmv
|
||||
|
||||
#endif // LIBMV_BASE_ARRAY_H_
|
@@ -25,151 +25,18 @@
|
||||
#ifndef LIBMV_BASE_VECTOR_H
|
||||
#define LIBMV_BASE_VECTOR_H
|
||||
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
#include <vector>
|
||||
|
||||
#include <Eigen/Core>
|
||||
|
||||
namespace libmv {
|
||||
|
||||
// A simple container class, which guarantees 16 byte alignment needed for most
|
||||
// vectorization. Don't use this container for classes that cannot be copied
|
||||
// via memcpy.
|
||||
// FIXME: this class has some issues:
|
||||
// - doesn't support iterators.
|
||||
// - impede compatibility with code using STL.
|
||||
// - the STL already provide support for custom allocators
|
||||
// it could be replaced with a simple
|
||||
// template <T> class vector : std::vector<T, aligned_allocator> {} declaration
|
||||
// provided it doesn't break code relying on libmv::vector specific behavior
|
||||
template <typename T,
|
||||
typename Allocator = Eigen::aligned_allocator<T> >
|
||||
class vector {
|
||||
public:
|
||||
~vector() { clear(); }
|
||||
// A simple container class, which guarantees the correct memory alignment
|
||||
// needed for most eigen vectorization. Don't use this container for classes
|
||||
// that cannot be copied via memcpy.
|
||||
|
||||
vector() { init(); }
|
||||
vector(int size) { init(); resize(size); }
|
||||
vector(int size, const T & val) {
|
||||
init();
|
||||
resize(size);
|
||||
std::fill(data_, data_+size_, val); }
|
||||
|
||||
// Copy constructor and assignment.
|
||||
vector(const vector<T, Allocator> &rhs) {
|
||||
init();
|
||||
copy(rhs);
|
||||
}
|
||||
vector<T, Allocator> &operator=(const vector<T, Allocator> &rhs) {
|
||||
if (&rhs != this) {
|
||||
copy(rhs);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Swaps the contents of two vectors in constant time.
|
||||
void swap(vector<T, Allocator> &other) {
|
||||
std::swap(allocator_, other.allocator_);
|
||||
std::swap(size_, other.size_);
|
||||
std::swap(capacity_, other.capacity_);
|
||||
std::swap(data_, other.data_);
|
||||
}
|
||||
|
||||
T *data() const { return data_; }
|
||||
int size() const { return size_; }
|
||||
int capacity() const { return capacity_; }
|
||||
const T& back() const { return data_[size_ - 1]; }
|
||||
T& back() { return data_[size_ - 1]; }
|
||||
const T& front() const { return data_[0]; }
|
||||
T& front() { return data_[0]; }
|
||||
const T& operator[](int n) const { return data_[n]; }
|
||||
T& operator[](int n) { return data_[n]; }
|
||||
const T& at(int n) const { return data_[n]; }
|
||||
T& at(int n) { return data_[n]; }
|
||||
const T * begin() const { return data_; }
|
||||
const T * end() const { return data_+size_; }
|
||||
T * begin() { return data_; }
|
||||
T * end() { return data_+size_; }
|
||||
|
||||
void resize(size_t size) {
|
||||
reserve(size);
|
||||
if (size > size_) {
|
||||
construct(size_, size);
|
||||
} else if (size < size_) {
|
||||
destruct(size, size_);
|
||||
}
|
||||
size_ = size;
|
||||
}
|
||||
|
||||
void push_back(const T &value) {
|
||||
if (size_ == capacity_) {
|
||||
reserve(size_ ? 2 * size_ : 1);
|
||||
}
|
||||
new (&data_[size_++]) T(value);
|
||||
}
|
||||
|
||||
void pop_back() {
|
||||
resize(size_ - 1);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
destruct(0, size_);
|
||||
deallocate();
|
||||
init();
|
||||
}
|
||||
|
||||
void reserve(unsigned int size) {
|
||||
if (size > size_) {
|
||||
T *data = static_cast<T *>(allocate(size));
|
||||
memcpy(static_cast<void *>(data), data_, sizeof(*data)*size_);
|
||||
allocator_.deallocate(data_, capacity_);
|
||||
data_ = data;
|
||||
capacity_ = size;
|
||||
}
|
||||
}
|
||||
|
||||
bool empty() {
|
||||
return size_ == 0;
|
||||
}
|
||||
|
||||
private:
|
||||
void construct(int start, int end) {
|
||||
for (int i = start; i < end; ++i) {
|
||||
new (&data_[i]) T;
|
||||
}
|
||||
}
|
||||
void destruct(int start, int end) {
|
||||
for (int i = start; i < end; ++i) {
|
||||
data_[i].~T();
|
||||
}
|
||||
}
|
||||
void init() {
|
||||
size_ = 0;
|
||||
data_ = 0;
|
||||
capacity_ = 0;
|
||||
}
|
||||
|
||||
void *allocate(int size) {
|
||||
return size ? allocator_.allocate(size) : 0;
|
||||
}
|
||||
|
||||
void deallocate() {
|
||||
allocator_.deallocate(data_, size_);
|
||||
data_ = 0;
|
||||
}
|
||||
|
||||
void copy(const vector<T, Allocator> &rhs) {
|
||||
resize(rhs.size());
|
||||
for (int i = 0; i < rhs.size(); ++i) {
|
||||
(*this)[i] = rhs[i];
|
||||
}
|
||||
}
|
||||
|
||||
Allocator allocator_;
|
||||
size_t size_;
|
||||
size_t capacity_;
|
||||
T *data_;
|
||||
};
|
||||
template <class ElementType>
|
||||
using vector = std::vector<ElementType, Eigen::aligned_allocator<ElementType>>;
|
||||
|
||||
} // namespace libmv
|
||||
|
||||
|
@@ -37,11 +37,9 @@ TEST(VectorAlignmentTest, PushBack) {
|
||||
vector<Vec2> vs;
|
||||
vs.push_back(x1);
|
||||
EXPECT_EQ(1, vs.size());
|
||||
EXPECT_EQ(1, vs.capacity());
|
||||
|
||||
vs.push_back(x2);
|
||||
EXPECT_EQ(2, vs.size());
|
||||
EXPECT_EQ(2, vs.capacity());
|
||||
|
||||
// The following is necessary because of some bug in gtest; the expected
|
||||
// parameter can't be a fixed size vectorizable type with alignment
|
||||
@@ -55,7 +53,6 @@ TEST(VectorAlignmentTest, PushBack) {
|
||||
vs.push_back(x2);
|
||||
vs.push_back(x2);
|
||||
EXPECT_EQ(5, vs.size());
|
||||
EXPECT_EQ(8, vs.capacity());
|
||||
}
|
||||
|
||||
// Count the number of destruct calls to test that the destructor gets called.
|
||||
@@ -80,7 +77,6 @@ TEST_F(VectorTest, EmptyVectorDoesNotConstruct) {
|
||||
{
|
||||
vector<Foo> v;
|
||||
EXPECT_EQ(0, v.size());
|
||||
EXPECT_EQ(0, v.capacity());
|
||||
}
|
||||
EXPECT_EQ(0, foo_construct_calls);
|
||||
EXPECT_EQ(0, foo_destruct_calls);
|
||||
@@ -98,13 +94,11 @@ TEST_F(VectorTest, DestructorGetsCalled) {
|
||||
TEST_F(VectorTest, ReserveDoesNotCallConstructorsOrDestructors) {
|
||||
vector<Foo> v;
|
||||
EXPECT_EQ(0, v.size());
|
||||
EXPECT_EQ(0, v.capacity());
|
||||
EXPECT_EQ(0, foo_construct_calls);
|
||||
EXPECT_EQ(0, foo_destruct_calls);
|
||||
|
||||
v.reserve(5);
|
||||
EXPECT_EQ(0, v.size());
|
||||
EXPECT_EQ(5, v.capacity());
|
||||
EXPECT_EQ(0, foo_construct_calls);
|
||||
EXPECT_EQ(0, foo_destruct_calls);
|
||||
}
|
||||
@@ -115,31 +109,23 @@ TEST_F(VectorTest, ResizeConstructsAndDestructsAsExpected) {
|
||||
// Create one object.
|
||||
v.resize(1);
|
||||
EXPECT_EQ(1, v.size());
|
||||
EXPECT_EQ(1, v.capacity());
|
||||
EXPECT_EQ(1, foo_construct_calls);
|
||||
EXPECT_EQ(0, foo_destruct_calls);
|
||||
EXPECT_EQ(5, v[0].value);
|
||||
|
||||
// Create two more.
|
||||
v.resize(3);
|
||||
EXPECT_EQ(3, v.size());
|
||||
EXPECT_EQ(3, v.capacity());
|
||||
EXPECT_EQ(3, foo_construct_calls);
|
||||
EXPECT_EQ(0, foo_destruct_calls);
|
||||
|
||||
// Delete the last one.
|
||||
v.resize(2);
|
||||
EXPECT_EQ(2, v.size());
|
||||
EXPECT_EQ(3, v.capacity());
|
||||
EXPECT_EQ(3, foo_construct_calls);
|
||||
EXPECT_EQ(1, foo_destruct_calls);
|
||||
|
||||
// Delete the remaining two.
|
||||
v.resize(0);
|
||||
EXPECT_EQ(0, v.size());
|
||||
EXPECT_EQ(3, v.capacity());
|
||||
EXPECT_EQ(3, foo_construct_calls);
|
||||
EXPECT_EQ(3, foo_destruct_calls);
|
||||
}
|
||||
|
||||
TEST_F(VectorTest, PushPopBack) {
|
||||
@@ -165,7 +151,6 @@ TEST_F(VectorTest, CopyConstructor) {
|
||||
|
||||
vector<int> b(a);
|
||||
EXPECT_EQ(a.size(), b.size());
|
||||
//EXPECT_EQ(a.capacity(), b.capacity());
|
||||
for (int i = 0; i < a.size(); ++i) {
|
||||
EXPECT_EQ(a[i], b[i]);
|
||||
}
|
||||
@@ -180,7 +165,6 @@ TEST_F(VectorTest, OperatorEquals) {
|
||||
b = a;
|
||||
|
||||
EXPECT_EQ(a.size(), b.size());
|
||||
//EXPECT_EQ(a.capacity(), b.capacity());
|
||||
for (int i = 0; i < a.size(); ++i) {
|
||||
EXPECT_EQ(a[i], b[i]);
|
||||
}
|
||||
@@ -192,15 +176,15 @@ TEST_F(VectorTest, STLFind) {
|
||||
a.push_back(5);
|
||||
a.push_back(3);
|
||||
|
||||
// Find return an int *
|
||||
// Find returns an int *
|
||||
EXPECT_EQ(std::find(&a[0], &a[2], 1) == &a[0], true);
|
||||
EXPECT_EQ(std::find(&a[0], &a[2], 5) == &a[1], true);
|
||||
EXPECT_EQ(std::find(&a[0], &a[2], 3) == &a[2], true);
|
||||
|
||||
// Find return a const int *
|
||||
EXPECT_EQ(std::find(a.begin(), a.end(), 1) == &a[0], true);
|
||||
EXPECT_EQ(std::find(a.begin(), a.end(), 5) == &a[1], true);
|
||||
EXPECT_EQ(std::find(a.begin(), a.end(), 3) == &a[2], true);
|
||||
// Find returns an interator
|
||||
EXPECT_EQ(std::find(a.begin(), a.end(), 1) == std::next(a.begin(), 0), true);
|
||||
EXPECT_EQ(std::find(a.begin(), a.end(), 5) == std::next(a.begin(), 1), true);
|
||||
EXPECT_EQ(std::find(a.begin(), a.end(), 3) == std::next(a.begin(), 2), true);
|
||||
|
||||
// Search value that are not in the vector
|
||||
EXPECT_EQ(std::find(a.begin(), a.end(), 0) == a.end(), true);
|
||||
|
@@ -35,38 +35,10 @@
|
||||
#include "libmv/simple_pipeline/reconstruction.h"
|
||||
#include "libmv/simple_pipeline/tracks.h"
|
||||
#include "libmv/simple_pipeline/distortion_models.h"
|
||||
#include "libmv/simple_pipeline/packed_intrinsics.h"
|
||||
|
||||
namespace libmv {
|
||||
|
||||
// The intrinsics need to get combined into a single parameter block; use these
|
||||
// enums to index instead of numeric constants.
|
||||
enum {
|
||||
// Camera calibration values.
|
||||
OFFSET_FOCAL_LENGTH,
|
||||
OFFSET_PRINCIPAL_POINT_X,
|
||||
OFFSET_PRINCIPAL_POINT_Y,
|
||||
|
||||
// Distortion model coefficients.
|
||||
// WARNING: camera intrinsics are not required to define/use all of those,
|
||||
// but they have to define all of them up to the last one they need, in that
|
||||
// exact same order. See e.g. how `PolynomialCameraIntrinsics` needs to define
|
||||
// `OFFSET_K4`, even though it does not use it.
|
||||
OFFSET_K1,
|
||||
OFFSET_K2,
|
||||
OFFSET_K3,
|
||||
OFFSET_K4,
|
||||
OFFSET_P1,
|
||||
OFFSET_P2,
|
||||
|
||||
// Maximal possible offset.
|
||||
OFFSET_MAX,
|
||||
};
|
||||
|
||||
#define FIRST_DISTORTION_COEFFICIENT OFFSET_K1
|
||||
#define LAST_DISTORTION_COEFFICIENT OFFSET_P2
|
||||
#define NUM_DISTORTION_COEFFICIENTS \
|
||||
(LAST_DISTORTION_COEFFICIENT - FIRST_DISTORTION_COEFFICIENT + 1)
|
||||
|
||||
namespace {
|
||||
|
||||
bool NeedUseInvertIntrinsicsPipeline(const CameraIntrinsics *intrinsics) {
|
||||
@@ -94,20 +66,23 @@ void ApplyDistortionModelUsingIntrinsicsBlock(
|
||||
const T& normalized_x, const T& normalized_y,
|
||||
T* distorted_x, T* distorted_y) {
|
||||
// Unpack the intrinsics.
|
||||
const T& focal_length = intrinsics_block[OFFSET_FOCAL_LENGTH];
|
||||
const T& principal_point_x = intrinsics_block[OFFSET_PRINCIPAL_POINT_X];
|
||||
const T& principal_point_y = intrinsics_block[OFFSET_PRINCIPAL_POINT_Y];
|
||||
const T& focal_length =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_FOCAL_LENGTH];
|
||||
const T& principal_point_x =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_PRINCIPAL_POINT_X];
|
||||
const T& principal_point_y =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_PRINCIPAL_POINT_Y];
|
||||
|
||||
// TODO(keir): Do early bailouts for zero distortion; these are expensive
|
||||
// jet operations.
|
||||
switch (invariant_intrinsics->GetDistortionModelType()) {
|
||||
case DISTORTION_MODEL_POLYNOMIAL:
|
||||
{
|
||||
const T& k1 = intrinsics_block[OFFSET_K1];
|
||||
const T& k2 = intrinsics_block[OFFSET_K2];
|
||||
const T& k3 = intrinsics_block[OFFSET_K3];
|
||||
const T& p1 = intrinsics_block[OFFSET_P1];
|
||||
const T& p2 = intrinsics_block[OFFSET_P2];
|
||||
const T& k1 = intrinsics_block[PackedIntrinsics::OFFSET_K1];
|
||||
const T& k2 = intrinsics_block[PackedIntrinsics::OFFSET_K2];
|
||||
const T& k3 = intrinsics_block[PackedIntrinsics::OFFSET_K3];
|
||||
const T& p1 = intrinsics_block[PackedIntrinsics::OFFSET_P1];
|
||||
const T& p2 = intrinsics_block[PackedIntrinsics::OFFSET_P2];
|
||||
|
||||
ApplyPolynomialDistortionModel(focal_length,
|
||||
focal_length,
|
||||
@@ -122,8 +97,8 @@ void ApplyDistortionModelUsingIntrinsicsBlock(
|
||||
|
||||
case DISTORTION_MODEL_DIVISION:
|
||||
{
|
||||
const T& k1 = intrinsics_block[OFFSET_K1];
|
||||
const T& k2 = intrinsics_block[OFFSET_K2];
|
||||
const T& k1 = intrinsics_block[PackedIntrinsics::OFFSET_K1];
|
||||
const T& k2 = intrinsics_block[PackedIntrinsics::OFFSET_K2];
|
||||
|
||||
ApplyDivisionDistortionModel(focal_length,
|
||||
focal_length,
|
||||
@@ -143,12 +118,12 @@ void ApplyDistortionModelUsingIntrinsicsBlock(
|
||||
|
||||
case DISTORTION_MODEL_BROWN:
|
||||
{
|
||||
const T& k1 = intrinsics_block[OFFSET_K1];
|
||||
const T& k2 = intrinsics_block[OFFSET_K2];
|
||||
const T& k3 = intrinsics_block[OFFSET_K3];
|
||||
const T& k4 = intrinsics_block[OFFSET_K4];
|
||||
const T& p1 = intrinsics_block[OFFSET_P1];
|
||||
const T& p2 = intrinsics_block[OFFSET_P2];
|
||||
const T& k1 = intrinsics_block[PackedIntrinsics::OFFSET_K1];
|
||||
const T& k2 = intrinsics_block[PackedIntrinsics::OFFSET_K2];
|
||||
const T& k3 = intrinsics_block[PackedIntrinsics::OFFSET_K3];
|
||||
const T& k4 = intrinsics_block[PackedIntrinsics::OFFSET_K4];
|
||||
const T& p1 = intrinsics_block[PackedIntrinsics::OFFSET_P1];
|
||||
const T& p2 = intrinsics_block[PackedIntrinsics::OFFSET_P2];
|
||||
|
||||
ApplyBrownDistortionModel(focal_length,
|
||||
focal_length,
|
||||
@@ -184,9 +159,12 @@ void InvertDistortionModelUsingIntrinsicsBlock(
|
||||
const T& image_x, const T& image_y,
|
||||
T* normalized_x, T* normalized_y) {
|
||||
// Unpack the intrinsics.
|
||||
const T& focal_length = intrinsics_block[OFFSET_FOCAL_LENGTH];
|
||||
const T& principal_point_x = intrinsics_block[OFFSET_PRINCIPAL_POINT_X];
|
||||
const T& principal_point_y = intrinsics_block[OFFSET_PRINCIPAL_POINT_Y];
|
||||
const T& focal_length =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_FOCAL_LENGTH];
|
||||
const T& principal_point_x =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_PRINCIPAL_POINT_X];
|
||||
const T& principal_point_y =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_PRINCIPAL_POINT_Y];
|
||||
|
||||
// TODO(keir): Do early bailouts for zero distortion; these are expensive
|
||||
// jet operations.
|
||||
@@ -199,8 +177,8 @@ void InvertDistortionModelUsingIntrinsicsBlock(
|
||||
|
||||
case DISTORTION_MODEL_NUKE:
|
||||
{
|
||||
const T& k1 = intrinsics_block[OFFSET_K1];
|
||||
const T& k2 = intrinsics_block[OFFSET_K2];
|
||||
const T& k1 = intrinsics_block[PackedIntrinsics::OFFSET_K1];
|
||||
const T& k2 = intrinsics_block[PackedIntrinsics::OFFSET_K2];
|
||||
|
||||
InvertNukeDistortionModel(focal_length,
|
||||
focal_length,
|
||||
@@ -223,16 +201,19 @@ void NormalizedToImageSpace(const T* const intrinsics_block,
|
||||
const T& normalized_x, const T& normalized_y,
|
||||
T* image_x, T* image_y) {
|
||||
// Unpack the intrinsics.
|
||||
const T& focal_length = intrinsics_block[OFFSET_FOCAL_LENGTH];
|
||||
const T& principal_point_x = intrinsics_block[OFFSET_PRINCIPAL_POINT_X];
|
||||
const T& principal_point_y = intrinsics_block[OFFSET_PRINCIPAL_POINT_Y];
|
||||
const T& focal_length =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_FOCAL_LENGTH];
|
||||
const T& principal_point_x =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_PRINCIPAL_POINT_X];
|
||||
const T& principal_point_y =
|
||||
intrinsics_block[PackedIntrinsics::OFFSET_PRINCIPAL_POINT_Y];
|
||||
|
||||
*image_x = normalized_x * focal_length + principal_point_x;
|
||||
*image_y = normalized_y * focal_length + principal_point_y;
|
||||
}
|
||||
|
||||
// Cost functor which computes reprojection error of 3D point X on camera
|
||||
// defined by angle-axis rotation and it's translation (which are in the same
|
||||
// defined by angle-axis rotation and its translation (which are in the same
|
||||
// block due to optimization reasons).
|
||||
//
|
||||
// This functor can only be used for distortion models which have analytically
|
||||
@@ -291,7 +272,7 @@ struct ReprojectionErrorApplyIntrinsics {
|
||||
};
|
||||
|
||||
// Cost functor which computes reprojection error of 3D point X on camera
|
||||
// defined by angle-axis rotation and it's translation (which are in the same
|
||||
// defined by angle-axis rotation and its translation (which are in the same
|
||||
// block due to optimization reasons).
|
||||
//
|
||||
// This functor can only be used for distortion models which have analytically
|
||||
@@ -314,9 +295,12 @@ struct ReprojectionErrorInvertIntrinsics {
|
||||
const T* const X, // Point coordinates 3x1.
|
||||
T* residuals) const {
|
||||
// Unpack the intrinsics.
|
||||
const T& focal_length = intrinsics[OFFSET_FOCAL_LENGTH];
|
||||
const T& principal_point_x = intrinsics[OFFSET_PRINCIPAL_POINT_X];
|
||||
const T& principal_point_y = intrinsics[OFFSET_PRINCIPAL_POINT_Y];
|
||||
const T& focal_length =
|
||||
intrinsics[PackedIntrinsics::OFFSET_FOCAL_LENGTH];
|
||||
const T& principal_point_x =
|
||||
intrinsics[PackedIntrinsics::OFFSET_PRINCIPAL_POINT_X];
|
||||
const T& principal_point_y =
|
||||
intrinsics[PackedIntrinsics::OFFSET_PRINCIPAL_POINT_Y];
|
||||
|
||||
// Compute projective coordinates: x = RX + t.
|
||||
T x[3];
|
||||
@@ -391,43 +375,6 @@ void BundleIntrinsicsLogMessage(const int bundle_intrinsics) {
|
||||
}
|
||||
}
|
||||
|
||||
// Pack intrinsics from object to an array for easier
|
||||
// and faster minimization.
|
||||
void PackIntrinisicsIntoArray(const CameraIntrinsics &intrinsics,
|
||||
double intrinsics_block[OFFSET_MAX]) {
|
||||
intrinsics_block[OFFSET_FOCAL_LENGTH] = intrinsics.focal_length();
|
||||
intrinsics_block[OFFSET_PRINCIPAL_POINT_X] = intrinsics.principal_point_x();
|
||||
intrinsics_block[OFFSET_PRINCIPAL_POINT_Y] = intrinsics.principal_point_y();
|
||||
|
||||
int num_distortion_parameters = intrinsics.num_distortion_parameters();
|
||||
assert(num_distortion_parameters <= NUM_DISTORTION_COEFFICIENTS);
|
||||
|
||||
const double *distortion_parameters = intrinsics.distortion_parameters();
|
||||
for (int i = 0; i < num_distortion_parameters; ++i) {
|
||||
intrinsics_block[FIRST_DISTORTION_COEFFICIENT + i] =
|
||||
distortion_parameters[i];
|
||||
}
|
||||
}
|
||||
|
||||
// Unpack intrinsics back from an array to an object.
|
||||
void UnpackIntrinsicsFromArray(const double intrinsics_block[OFFSET_MAX],
|
||||
CameraIntrinsics *intrinsics) {
|
||||
intrinsics->SetFocalLength(intrinsics_block[OFFSET_FOCAL_LENGTH],
|
||||
intrinsics_block[OFFSET_FOCAL_LENGTH]);
|
||||
|
||||
intrinsics->SetPrincipalPoint(intrinsics_block[OFFSET_PRINCIPAL_POINT_X],
|
||||
intrinsics_block[OFFSET_PRINCIPAL_POINT_Y]);
|
||||
|
||||
int num_distortion_parameters = intrinsics->num_distortion_parameters();
|
||||
assert(num_distortion_parameters <= NUM_DISTORTION_COEFFICIENTS);
|
||||
|
||||
double *distortion_parameters = intrinsics->distortion_parameters();
|
||||
for (int i = 0; i < num_distortion_parameters; ++i) {
|
||||
distortion_parameters[i] =
|
||||
intrinsics_block[FIRST_DISTORTION_COEFFICIENT + i];
|
||||
}
|
||||
}
|
||||
|
||||
// Get a vector of camera's rotations denoted by angle axis
|
||||
// conjuncted with translations into single block
|
||||
//
|
||||
@@ -564,12 +511,12 @@ template<typename CostFunction>
|
||||
void AddResidualBlockToProblemImpl(const CameraIntrinsics *invariant_intrinsics,
|
||||
double observed_x, double observed_y,
|
||||
double weight,
|
||||
double intrinsics_block[OFFSET_MAX],
|
||||
double *intrinsics_block,
|
||||
double *camera_R_t,
|
||||
EuclideanPoint *point,
|
||||
ceres::Problem* problem) {
|
||||
problem->AddResidualBlock(new ceres::AutoDiffCostFunction<
|
||||
CostFunction, 2, OFFSET_MAX, 6, 3>(
|
||||
CostFunction, 2, PackedIntrinsics::NUM_PARAMETERS, 6, 3>(
|
||||
new CostFunction(
|
||||
invariant_intrinsics,
|
||||
observed_x, observed_y,
|
||||
@@ -583,7 +530,7 @@ void AddResidualBlockToProblemImpl(const CameraIntrinsics *invariant_intrinsics,
|
||||
void AddResidualBlockToProblem(const CameraIntrinsics *invariant_intrinsics,
|
||||
const Marker &marker,
|
||||
double marker_weight,
|
||||
double intrinsics_block[OFFSET_MAX],
|
||||
double* intrinsics_block,
|
||||
double *camera_R_t,
|
||||
EuclideanPoint *point,
|
||||
ceres::Problem* problem) {
|
||||
@@ -620,7 +567,7 @@ void AddResidualBlockToProblem(const CameraIntrinsics *invariant_intrinsics,
|
||||
void EuclideanBundlePointsOnly(const CameraIntrinsics *invariant_intrinsics,
|
||||
const vector<Marker> &markers,
|
||||
map<int, Vec6> &all_cameras_R_t,
|
||||
double intrinsics_block[OFFSET_MAX],
|
||||
double* intrinsics_block,
|
||||
EuclideanReconstruction *reconstruction) {
|
||||
ceres::Problem::Options problem_options;
|
||||
ceres::Problem problem(problem_options);
|
||||
@@ -700,11 +647,11 @@ void EuclideanBundleCommonIntrinsics(
|
||||
// N-th element denotes whether track N is a constant zero-weighted track.
|
||||
vector<bool> zero_weight_tracks_flags(tracks.MaxTrack() + 1, true);
|
||||
|
||||
// Residual blocks with 10 parameters are unwieldly with Ceres, so pack the
|
||||
// intrinsics into a single block and rely on local parameterizations to
|
||||
// control which intrinsics are allowed to vary.
|
||||
double intrinsics_block[OFFSET_MAX];
|
||||
PackIntrinisicsIntoArray(*intrinsics, intrinsics_block);
|
||||
// Pack all intrinsics parameters into a single block and rely on local
|
||||
// parameterizations to control which intrinsics are allowed to vary.
|
||||
PackedIntrinsics packed_intrinsics;
|
||||
intrinsics->Pack(&packed_intrinsics);
|
||||
double* intrinsics_block = packed_intrinsics.GetParametersBlock();
|
||||
|
||||
// Convert cameras rotations to angle axis and merge with translation
|
||||
// into single parameter block for maximal minimization speed.
|
||||
@@ -800,21 +747,28 @@ void EuclideanBundleCommonIntrinsics(
|
||||
if (!(bundle_intrinsics & bundle_enum)) { \
|
||||
constant_intrinsics.push_back(offset); \
|
||||
}
|
||||
MAYBE_SET_CONSTANT(BUNDLE_FOCAL_LENGTH, OFFSET_FOCAL_LENGTH);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_PRINCIPAL_POINT, OFFSET_PRINCIPAL_POINT_X);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_PRINCIPAL_POINT, OFFSET_PRINCIPAL_POINT_Y);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_RADIAL_K1, OFFSET_K1);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_RADIAL_K2, OFFSET_K2);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_TANGENTIAL_P1, OFFSET_P1);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_TANGENTIAL_P2, OFFSET_P2);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_FOCAL_LENGTH,
|
||||
PackedIntrinsics::OFFSET_FOCAL_LENGTH);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_PRINCIPAL_POINT,
|
||||
PackedIntrinsics::OFFSET_PRINCIPAL_POINT_X);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_PRINCIPAL_POINT,
|
||||
PackedIntrinsics::OFFSET_PRINCIPAL_POINT_Y);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_RADIAL_K1, PackedIntrinsics::OFFSET_K1);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_RADIAL_K2, PackedIntrinsics::OFFSET_K2);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_TANGENTIAL_P1, PackedIntrinsics::OFFSET_P1);
|
||||
MAYBE_SET_CONSTANT(BUNDLE_TANGENTIAL_P2, PackedIntrinsics::OFFSET_P2);
|
||||
#undef MAYBE_SET_CONSTANT
|
||||
|
||||
// Always set K3 and K4 constant, it's not used at the moment.
|
||||
constant_intrinsics.push_back(OFFSET_K3);
|
||||
constant_intrinsics.push_back(OFFSET_K4);
|
||||
constant_intrinsics.push_back(PackedIntrinsics::OFFSET_K3);
|
||||
constant_intrinsics.push_back(PackedIntrinsics::OFFSET_K4);
|
||||
|
||||
// TODO(sergey): Mark all parameters which are not used by the distortion
|
||||
// model as constant.
|
||||
|
||||
ceres::SubsetParameterization *subset_parameterization =
|
||||
new ceres::SubsetParameterization(OFFSET_MAX, constant_intrinsics);
|
||||
new ceres::SubsetParameterization(PackedIntrinsics::NUM_PARAMETERS,
|
||||
constant_intrinsics);
|
||||
|
||||
problem.SetParameterization(intrinsics_block, subset_parameterization);
|
||||
}
|
||||
@@ -839,8 +793,9 @@ void EuclideanBundleCommonIntrinsics(
|
||||
UnpackCamerasRotationAndTranslation(all_cameras_R_t, reconstruction);
|
||||
|
||||
// Copy intrinsics back.
|
||||
if (bundle_intrinsics != BUNDLE_NO_INTRINSICS)
|
||||
UnpackIntrinsicsFromArray(intrinsics_block, intrinsics);
|
||||
if (bundle_intrinsics != BUNDLE_NO_INTRINSICS) {
|
||||
intrinsics->Unpack(packed_intrinsics);
|
||||
}
|
||||
|
||||
LG << "Final intrinsics: " << *intrinsics;
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "libmv/logging/logging.h"
|
||||
#include "libmv/simple_pipeline/distortion_models.h"
|
||||
#include "libmv/simple_pipeline/packed_intrinsics.h"
|
||||
|
||||
namespace libmv {
|
||||
|
||||
@@ -131,6 +132,20 @@ void CameraIntrinsics::ResetLookupGrids() {
|
||||
undistort_.Reset();
|
||||
}
|
||||
|
||||
void CameraIntrinsics::Pack(PackedIntrinsics* packed_intrinsics) const {
|
||||
packed_intrinsics->SetFocalLength(focal_length());
|
||||
packed_intrinsics->SetPrincipalPoint(principal_point_x(),
|
||||
principal_point_y());
|
||||
}
|
||||
|
||||
void CameraIntrinsics::Unpack(const PackedIntrinsics& packed_intrinsics) {
|
||||
SetFocalLength(packed_intrinsics.GetFocalLength(),
|
||||
packed_intrinsics.GetFocalLength());
|
||||
|
||||
SetPrincipalPoint(packed_intrinsics.GetPrincipalPointX(),
|
||||
packed_intrinsics.GetPrincipalPointY());
|
||||
}
|
||||
|
||||
// Polynomial model.
|
||||
|
||||
PolynomialCameraIntrinsics::PolynomialCameraIntrinsics()
|
||||
@@ -195,6 +210,30 @@ void PolynomialCameraIntrinsics::InvertIntrinsics(
|
||||
normalized_y);
|
||||
}
|
||||
|
||||
void PolynomialCameraIntrinsics::Pack(
|
||||
PackedIntrinsics* packed_intrinsics) const {
|
||||
CameraIntrinsics::Pack(packed_intrinsics);
|
||||
|
||||
packed_intrinsics->SetK1(k1());
|
||||
packed_intrinsics->SetK2(k2());
|
||||
packed_intrinsics->SetK3(k3());
|
||||
|
||||
packed_intrinsics->SetP1(p1());
|
||||
packed_intrinsics->SetP2(p2());
|
||||
}
|
||||
|
||||
void PolynomialCameraIntrinsics::Unpack(
|
||||
const PackedIntrinsics& packed_intrinsics) {
|
||||
CameraIntrinsics::Unpack(packed_intrinsics);
|
||||
|
||||
SetRadialDistortion(packed_intrinsics.GetK1(),
|
||||
packed_intrinsics.GetK2(),
|
||||
packed_intrinsics.GetK3());
|
||||
|
||||
SetTangentialDistortion(packed_intrinsics.GetP1(),
|
||||
packed_intrinsics.GetP2());
|
||||
}
|
||||
|
||||
// Division model.
|
||||
|
||||
DivisionCameraIntrinsics::DivisionCameraIntrinsics()
|
||||
@@ -245,6 +284,21 @@ void DivisionCameraIntrinsics::InvertIntrinsics(double image_x,
|
||||
normalized_y);
|
||||
}
|
||||
|
||||
void DivisionCameraIntrinsics::Pack(
|
||||
PackedIntrinsics* packed_intrinsics) const {
|
||||
CameraIntrinsics::Pack(packed_intrinsics);
|
||||
|
||||
packed_intrinsics->SetK1(k1());
|
||||
packed_intrinsics->SetK2(k2());
|
||||
}
|
||||
|
||||
void DivisionCameraIntrinsics::Unpack(
|
||||
const PackedIntrinsics& packed_intrinsics) {
|
||||
CameraIntrinsics::Unpack(packed_intrinsics);
|
||||
|
||||
SetDistortion(packed_intrinsics.GetK1(), packed_intrinsics.GetK2());
|
||||
}
|
||||
|
||||
// Nuke model.
|
||||
|
||||
NukeCameraIntrinsics::NukeCameraIntrinsics()
|
||||
@@ -296,6 +350,21 @@ void NukeCameraIntrinsics::InvertIntrinsics(double image_x,
|
||||
normalized_y);
|
||||
}
|
||||
|
||||
void NukeCameraIntrinsics::Pack(
|
||||
PackedIntrinsics* packed_intrinsics) const {
|
||||
CameraIntrinsics::Pack(packed_intrinsics);
|
||||
|
||||
packed_intrinsics->SetK1(k1());
|
||||
packed_intrinsics->SetK2(k2());
|
||||
}
|
||||
|
||||
void NukeCameraIntrinsics::Unpack(
|
||||
const PackedIntrinsics& packed_intrinsics) {
|
||||
CameraIntrinsics::Unpack(packed_intrinsics);
|
||||
|
||||
SetDistortion(packed_intrinsics.GetK1(), packed_intrinsics.GetK2());
|
||||
}
|
||||
|
||||
// Brown model.
|
||||
|
||||
BrownCameraIntrinsics::BrownCameraIntrinsics()
|
||||
@@ -362,6 +431,32 @@ void BrownCameraIntrinsics::InvertIntrinsics(
|
||||
normalized_y);
|
||||
}
|
||||
|
||||
void BrownCameraIntrinsics::Pack(
|
||||
PackedIntrinsics* packed_intrinsics) const {
|
||||
CameraIntrinsics::Pack(packed_intrinsics);
|
||||
|
||||
packed_intrinsics->SetK1(k1());
|
||||
packed_intrinsics->SetK2(k2());
|
||||
packed_intrinsics->SetK3(k3());
|
||||
packed_intrinsics->SetK4(k4());
|
||||
|
||||
packed_intrinsics->SetP1(p1());
|
||||
packed_intrinsics->SetP2(p2());
|
||||
}
|
||||
|
||||
void BrownCameraIntrinsics::Unpack(
|
||||
const PackedIntrinsics& packed_intrinsics) {
|
||||
CameraIntrinsics::Unpack(packed_intrinsics);
|
||||
|
||||
SetRadialDistortion(packed_intrinsics.GetK1(),
|
||||
packed_intrinsics.GetK2(),
|
||||
packed_intrinsics.GetK3(),
|
||||
packed_intrinsics.GetK4());
|
||||
|
||||
SetTangentialDistortion(packed_intrinsics.GetP1(),
|
||||
packed_intrinsics.GetP2());
|
||||
}
|
||||
|
||||
std::ostream& operator <<(std::ostream &os,
|
||||
const CameraIntrinsics &intrinsics) {
|
||||
if (intrinsics.focal_length_x() == intrinsics.focal_length_x()) {
|
||||
|
@@ -32,6 +32,7 @@
|
||||
namespace libmv {
|
||||
|
||||
class CameraIntrinsics;
|
||||
class PackedIntrinsics;
|
||||
|
||||
namespace internal {
|
||||
|
||||
@@ -146,10 +147,6 @@ class CameraIntrinsics {
|
||||
double principal_point_x() const { return K_(0, 2); }
|
||||
double principal_point_y() const { return K_(1, 2); }
|
||||
|
||||
virtual int num_distortion_parameters() const = 0;
|
||||
virtual double *distortion_parameters() = 0;
|
||||
virtual const double *distortion_parameters() const = 0;
|
||||
|
||||
// Set the image size in pixels.
|
||||
// Image is the size of image camera intrinsics were calibrated with.
|
||||
void SetImageSize(int width, int height);
|
||||
@@ -197,6 +194,9 @@ class CameraIntrinsics {
|
||||
double *normalized_x,
|
||||
double *normalized_y) const = 0;
|
||||
|
||||
virtual void Pack(PackedIntrinsics* packed_intrinsics) const;
|
||||
virtual void Unpack(const PackedIntrinsics& packed_intrinsics);
|
||||
|
||||
// Distort an image using the current camera instrinsics
|
||||
//
|
||||
// The distorted image is computed in output_buffer using samples from
|
||||
@@ -281,7 +281,6 @@ class PolynomialCameraIntrinsics : public CameraIntrinsics {
|
||||
OFFSET_K1,
|
||||
OFFSET_K2,
|
||||
OFFSET_K3,
|
||||
OFFSET_K4, // Unused, needed to map properly with all deform parameters defined in bundle.cc.
|
||||
OFFSET_P1,
|
||||
OFFSET_P2,
|
||||
|
||||
@@ -297,10 +296,6 @@ class PolynomialCameraIntrinsics : public CameraIntrinsics {
|
||||
return DISTORTION_MODEL_POLYNOMIAL;
|
||||
}
|
||||
|
||||
int num_distortion_parameters() const { return NUM_PARAMETERS; }
|
||||
double *distortion_parameters() { return parameters_; };
|
||||
const double *distortion_parameters() const { return parameters_; };
|
||||
|
||||
double k1() const { return parameters_[OFFSET_K1]; }
|
||||
double k2() const { return parameters_[OFFSET_K2]; }
|
||||
double k3() const { return parameters_[OFFSET_K3]; }
|
||||
@@ -332,6 +327,9 @@ class PolynomialCameraIntrinsics : public CameraIntrinsics {
|
||||
double *normalized_x,
|
||||
double *normalized_y) const;
|
||||
|
||||
virtual void Pack(PackedIntrinsics* packed_intrinsics) const override;
|
||||
virtual void Unpack(const PackedIntrinsics& packed_intrinsics) override;
|
||||
|
||||
private:
|
||||
// OpenCV's distortion model with third order polynomial radial distortion
|
||||
// terms and second order tangential distortion. The distortion is applied to
|
||||
@@ -360,10 +358,6 @@ class DivisionCameraIntrinsics : public CameraIntrinsics {
|
||||
return DISTORTION_MODEL_DIVISION;
|
||||
}
|
||||
|
||||
int num_distortion_parameters() const { return NUM_PARAMETERS; }
|
||||
double *distortion_parameters() { return parameters_; };
|
||||
const double *distortion_parameters() const { return parameters_; };
|
||||
|
||||
double k1() const { return parameters_[OFFSET_K1]; }
|
||||
double k2() const { return parameters_[OFFSET_K2]; }
|
||||
|
||||
@@ -389,6 +383,9 @@ class DivisionCameraIntrinsics : public CameraIntrinsics {
|
||||
double *normalized_x,
|
||||
double *normalized_y) const;
|
||||
|
||||
virtual void Pack(PackedIntrinsics* packed_intrinsics) const override;
|
||||
virtual void Unpack(const PackedIntrinsics& packed_intrinsics) override;
|
||||
|
||||
private:
|
||||
// Double-parameter division distortion model.
|
||||
double parameters_[NUM_PARAMETERS];
|
||||
@@ -414,10 +411,6 @@ class NukeCameraIntrinsics : public CameraIntrinsics {
|
||||
return DISTORTION_MODEL_NUKE;
|
||||
}
|
||||
|
||||
int num_distortion_parameters() const { return NUM_PARAMETERS; }
|
||||
double *distortion_parameters() { return parameters_; };
|
||||
const double *distortion_parameters() const { return parameters_; };
|
||||
|
||||
double k1() const { return parameters_[OFFSET_K1]; }
|
||||
double k2() const { return parameters_[OFFSET_K2]; }
|
||||
|
||||
@@ -443,6 +436,9 @@ class NukeCameraIntrinsics : public CameraIntrinsics {
|
||||
double *normalized_x,
|
||||
double *normalized_y) const;
|
||||
|
||||
virtual void Pack(PackedIntrinsics* packed_intrinsics) const override;
|
||||
virtual void Unpack(const PackedIntrinsics& packed_intrinsics) override;
|
||||
|
||||
private:
|
||||
// Double-parameter division distortion model.
|
||||
double parameters_[NUM_PARAMETERS];
|
||||
@@ -472,10 +468,6 @@ class BrownCameraIntrinsics : public CameraIntrinsics {
|
||||
return DISTORTION_MODEL_BROWN;
|
||||
}
|
||||
|
||||
int num_distortion_parameters() const { return NUM_PARAMETERS; }
|
||||
double *distortion_parameters() { return parameters_; };
|
||||
const double *distortion_parameters() const { return parameters_; };
|
||||
|
||||
double k1() const { return parameters_[OFFSET_K1]; }
|
||||
double k2() const { return parameters_[OFFSET_K2]; }
|
||||
double k3() const { return parameters_[OFFSET_K3]; }
|
||||
@@ -508,6 +500,9 @@ class BrownCameraIntrinsics : public CameraIntrinsics {
|
||||
double *normalized_x,
|
||||
double *normalized_y) const;
|
||||
|
||||
virtual void Pack(PackedIntrinsics* packed_intrinsics) const override;
|
||||
virtual void Unpack(const PackedIntrinsics& packed_intrinsics) override;
|
||||
|
||||
private:
|
||||
double parameters_[NUM_PARAMETERS];
|
||||
};
|
||||
|
@@ -42,7 +42,7 @@ void ProjectMarkerOnSphere(const Marker &marker, Vec3 &X) {
|
||||
X *= 5.0 / X.norm();
|
||||
}
|
||||
|
||||
void ModalSolverLogProress(ProgressUpdateCallback *update_callback,
|
||||
void ModalSolverLogProgress(ProgressUpdateCallback *update_callback,
|
||||
double progress) {
|
||||
if (update_callback) {
|
||||
char message[256];
|
||||
@@ -116,7 +116,7 @@ void ModalSolver(const Tracks &tracks,
|
||||
for (int image = 0; image <= max_image; ++image) {
|
||||
vector<Marker> all_markers = tracks.MarkersInImage(image);
|
||||
|
||||
ModalSolverLogProress(update_callback, (float) image / max_image);
|
||||
ModalSolverLogProgress(update_callback, (float) image / max_image);
|
||||
|
||||
// Skip empty images without doing anything.
|
||||
if (all_markers.size() == 0) {
|
||||
@@ -175,8 +175,9 @@ void ModalSolver(const Tracks &tracks,
|
||||
// STEP 2: Refine rotation with Ceres.
|
||||
ceres::Problem problem;
|
||||
|
||||
ceres::LocalParameterization* quaternion_parameterization =
|
||||
new ceres::QuaternionParameterization;
|
||||
// NOTE: Parameterization is lazily initialized when it is really needed,
|
||||
// and is re-used by all parameters block.
|
||||
ceres::LocalParameterization* quaternion_parameterization = NULL;
|
||||
|
||||
int num_residuals = 0;
|
||||
for (int i = 0; i < all_markers.size(); ++i) {
|
||||
@@ -195,6 +196,10 @@ void ModalSolver(const Tracks &tracks,
|
||||
&quaternion(0));
|
||||
num_residuals++;
|
||||
|
||||
if (quaternion_parameterization == NULL) {
|
||||
quaternion_parameterization = new ceres::QuaternionParameterization();
|
||||
}
|
||||
|
||||
problem.SetParameterization(&quaternion(0),
|
||||
quaternion_parameterization);
|
||||
}
|
||||
@@ -235,7 +240,7 @@ void ModalSolver(const Tracks &tracks,
|
||||
|
||||
if (marker.image == image) {
|
||||
// New track appeared on this image,
|
||||
// project it's position onto sphere.
|
||||
// project its position onto sphere.
|
||||
|
||||
LG << "Projecting track " << track << " at image " << image;
|
||||
|
||||
|
58
intern/libmv/libmv/simple_pipeline/packed_intrinsics.cc
Normal file
58
intern/libmv/libmv/simple_pipeline/packed_intrinsics.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
// Copyright (c) 2020 libmv authors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
|
||||
#include "libmv/simple_pipeline/packed_intrinsics.h"
|
||||
|
||||
namespace libmv {
|
||||
|
||||
PackedIntrinsics::PackedIntrinsics() {
|
||||
parameters_.fill(0.0);
|
||||
known_parameters_.fill(false);
|
||||
}
|
||||
|
||||
void PackedIntrinsics::SetFocalLength(double focal_length) {
|
||||
SetParameter(OFFSET_FOCAL_LENGTH, focal_length);
|
||||
}
|
||||
double PackedIntrinsics::GetFocalLength() const {
|
||||
return GetParameter(OFFSET_FOCAL_LENGTH);
|
||||
}
|
||||
|
||||
void PackedIntrinsics::SetPrincipalPoint(double x, double y) {
|
||||
SetParameter(OFFSET_PRINCIPAL_POINT_X, x);
|
||||
SetParameter(OFFSET_PRINCIPAL_POINT_Y, y);
|
||||
}
|
||||
double PackedIntrinsics::GetPrincipalPointX() const {
|
||||
return GetParameter(OFFSET_PRINCIPAL_POINT_X);
|
||||
}
|
||||
double PackedIntrinsics::GetPrincipalPointY() const {
|
||||
return GetParameter(OFFSET_PRINCIPAL_POINT_Y);
|
||||
}
|
||||
|
||||
void PackedIntrinsics::SetParameter(int index, double value) {
|
||||
parameters_.at(index) = value;
|
||||
known_parameters_.at(index) = value;
|
||||
}
|
||||
double PackedIntrinsics::GetParameter(int index) const {
|
||||
// TODO(sergey): Consider adding a check for whether the parameter is known.
|
||||
|
||||
return parameters_.at(index);
|
||||
}
|
||||
|
||||
} // namespace libmv
|
104
intern/libmv/libmv/simple_pipeline/packed_intrinsics.h
Normal file
104
intern/libmv/libmv/simple_pipeline/packed_intrinsics.h
Normal file
@@ -0,0 +1,104 @@
|
||||
// Copyright (c) 2020 libmv authors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
|
||||
#ifndef LIBMV_SIMPLE_PIPELINE_PACKED_INTRINSICS_H_
|
||||
#define LIBMV_SIMPLE_PIPELINE_PACKED_INTRINSICS_H_
|
||||
|
||||
#include "libmv/base/array.h"
|
||||
|
||||
namespace libmv {
|
||||
|
||||
// Intrinsics parameters packed into a single continuous block of memory.
|
||||
// Used in cases like minimization problems which involves camera intrinsics
|
||||
// as a minimizing parameters.
|
||||
//
|
||||
// It keeps track of which parameters has been specified explicitly, which
|
||||
// allows to mark parameters which are not used by distortion model as constant,
|
||||
// which improves minimization quality.
|
||||
class PackedIntrinsics {
|
||||
public:
|
||||
// Offsets of corresponding parameters in the array of all parameters.
|
||||
enum {
|
||||
// Camera calibration values.
|
||||
OFFSET_FOCAL_LENGTH,
|
||||
OFFSET_PRINCIPAL_POINT_X,
|
||||
OFFSET_PRINCIPAL_POINT_Y,
|
||||
|
||||
// Distortion model coefficients.
|
||||
OFFSET_K1,
|
||||
OFFSET_K2,
|
||||
OFFSET_K3,
|
||||
OFFSET_K4,
|
||||
OFFSET_P1,
|
||||
OFFSET_P2,
|
||||
|
||||
// Number of parameters which are to be stored in the block.
|
||||
NUM_PARAMETERS,
|
||||
};
|
||||
|
||||
PackedIntrinsics();
|
||||
|
||||
void SetFocalLength(double focal_length);
|
||||
double GetFocalLength() const;
|
||||
|
||||
void SetPrincipalPoint(double x, double y);
|
||||
double GetPrincipalPointX() const;
|
||||
double GetPrincipalPointY() const;
|
||||
|
||||
// TODO(sergey): Consider adding vectorized (Vec2) accessors for the principal
|
||||
// point.
|
||||
|
||||
#define DEFINE_PARAMETER(parameter_name) \
|
||||
void Set ## parameter_name(double value) { \
|
||||
SetParameter(OFFSET_ ## parameter_name, value); \
|
||||
} \
|
||||
double Get ## parameter_name() const { \
|
||||
return GetParameter(OFFSET_ ## parameter_name); \
|
||||
} \
|
||||
|
||||
DEFINE_PARAMETER(K1)
|
||||
DEFINE_PARAMETER(K2)
|
||||
DEFINE_PARAMETER(K3)
|
||||
DEFINE_PARAMETER(K4)
|
||||
|
||||
DEFINE_PARAMETER(P1)
|
||||
DEFINE_PARAMETER(P2)
|
||||
|
||||
#undef DEFINE_PARAMETER
|
||||
|
||||
double* GetParametersBlock() { return parameters_.data(); }
|
||||
const double* GetParametersBlock() const { return parameters_.data(); }
|
||||
|
||||
private:
|
||||
void SetParameter(int index, double value);
|
||||
double GetParameter(int index) const;
|
||||
|
||||
// All intrinsics parameters packed into a single block.
|
||||
// Use OFFSET_FOO indexes to access corresponding values.
|
||||
array<double, NUM_PARAMETERS> parameters_;
|
||||
|
||||
// Indexed by parameter offset, set to truth if the value of the parameter is
|
||||
// explicitly specified.
|
||||
array<bool, NUM_PARAMETERS> known_parameters_;
|
||||
};
|
||||
|
||||
} // namespace libmv
|
||||
|
||||
#endif // LIBMV_SIMPLE_PIPELINE_PACKED_INTRINSICS_H_
|
@@ -740,11 +740,13 @@ void MANTA::initializeRNAMap(FluidModifierData *fmd)
|
||||
else if (fds->openvdb_compression == VDB_COMPRESSION_BLOSC)
|
||||
vdbCompressionMethod = "Compression_Blosc";
|
||||
|
||||
string vdbPrecisionHalf = "True";
|
||||
if (fds->openvdb_data_depth == VDB_PRECISION_HALF_FLOAT)
|
||||
vdbPrecisionHalf = "True";
|
||||
else if (fds->openvdb_data_depth == VDB_PRECISION_FULL_FLOAT)
|
||||
vdbPrecisionHalf = "False";
|
||||
string vdbPrecisionHalf = "Precision_Half";
|
||||
if (fds->openvdb_data_depth == VDB_PRECISION_FULL_FLOAT)
|
||||
vdbPrecisionHalf = "Precision_Full";
|
||||
else if (fds->openvdb_data_depth == VDB_PRECISION_HALF_FLOAT)
|
||||
vdbPrecisionHalf = "Precision_Half";
|
||||
else if (fds->openvdb_data_depth == VDB_PRECISION_MINI_FLOAT)
|
||||
vdbPrecisionHalf = "Precision_Mini";
|
||||
|
||||
mRNAMap["USING_SMOKE"] = getBooleanString(fds->type == FLUID_DOMAIN_TYPE_GAS);
|
||||
mRNAMap["USING_LIQUID"] = getBooleanString(fds->type == FLUID_DOMAIN_TYPE_LIQUID);
|
||||
@@ -843,6 +845,7 @@ void MANTA::initializeRNAMap(FluidModifierData *fmd)
|
||||
mRNAMap["PARTICLE_MAXIMUM"] = to_string(fds->particle_maximum);
|
||||
mRNAMap["PARTICLE_RADIUS"] = to_string(fds->particle_radius);
|
||||
mRNAMap["FRACTIONS_THRESHOLD"] = to_string(fds->fractions_threshold);
|
||||
mRNAMap["FRACTIONS_DISTANCE"] = to_string(fds->fractions_distance);
|
||||
mRNAMap["MESH_CONCAVE_UPPER"] = to_string(fds->mesh_concave_upper);
|
||||
mRNAMap["MESH_CONCAVE_LOWER"] = to_string(fds->mesh_concave_lower);
|
||||
mRNAMap["MESH_PARTICLE_RADIUS"] = to_string(fds->mesh_particle_radius);
|
||||
|
@@ -122,7 +122,6 @@ timePerFrame_s$ID$ = $TIME_PER_FRAME$\n\
|
||||
# In Blender fluid.c: frame_length = DT_DEFAULT * (25.0 / fps) * time_scale\n\
|
||||
# with DT_DEFAULT = 0.1\n\
|
||||
frameLength_s$ID$ = $FRAME_LENGTH$\n\
|
||||
frameLengthUnscaled_s$ID$ = frameLength_s$ID$ / timeScale_s$ID$\n\
|
||||
frameLengthRaw_s$ID$ = 0.1 * 25 # dt = 0.1 at 25 fps\n\
|
||||
\n\
|
||||
dt0_s$ID$ = $DT$\n\
|
||||
@@ -149,23 +148,14 @@ mantaMsg('1 Blender length unit is ' + str(ratioResToBLength_s$ID$) + ' Mantaflo
|
||||
ratioBTimeToTimestep_s$ID$ = float(1) / float(frameLengthRaw_s$ID$) # the time within 1 blender time unit, see also fluid.c\n\
|
||||
mantaMsg('1 Blender time unit is ' + str(ratioBTimeToTimestep_s$ID$) + ' Mantaflow time units long.')\n\
|
||||
\n\
|
||||
ratioFrameToFramelength_s$ID$ = float(1) / float(frameLengthUnscaled_s$ID$ ) # the time within 1 frame\n\
|
||||
mantaMsg('frame / frameLength is ' + str(ratioFrameToFramelength_s$ID$) + ' Mantaflow time units long.')\n\
|
||||
\n\
|
||||
scaleAcceleration_s$ID$ = ratioResToBLength_s$ID$ * (ratioBTimeToTimestep_s$ID$**2)# [meters/btime^2] to [cells/timestep^2] (btime: sec, min, or h, ...)\n\
|
||||
mantaMsg('scaleAcceleration is ' + str(scaleAcceleration_s$ID$))\n\
|
||||
\n\
|
||||
scaleSpeedFrames_s$ID$ = ratioResToBLength_s$ID$ * ratioFrameToFramelength_s$ID$ # [blength/frame] to [cells/frameLength]\n\
|
||||
mantaMsg('scaleSpeed is ' + str(scaleSpeedFrames_s$ID$))\n\
|
||||
\n\
|
||||
scaleSpeedTime_s$ID$ = ratioResToBLength_s$ID$ * ratioBTimeToTimestep_s$ID$ # [blength/btime] to [cells/frameLength]\n\
|
||||
mantaMsg('scaleSpeedTime is ' + str(scaleSpeedTime_s$ID$))\n\
|
||||
\n\
|
||||
gravity_s$ID$ *= scaleAcceleration_s$ID$ # scale from world acceleration to cell based acceleration\n\
|
||||
\n\
|
||||
# OpenVDB options\n\
|
||||
vdbCompression_s$ID$ = $COMPRESSION_OPENVDB$\n\
|
||||
vdbPrecisionHalf_s$ID$ = $PRECISION_OPENVDB$\n\
|
||||
vdbPrecision_s$ID$ = $PRECISION_OPENVDB$\n\
|
||||
\n\
|
||||
# Cache file names\n\
|
||||
file_data_s$ID$ = '$NAME_DATA$'\n\
|
||||
@@ -380,17 +370,10 @@ def fluid_pre_step_$ID$():\n\
|
||||
x_obvel_s$ID$.safeDivide(numObs_s$ID$)\n\
|
||||
y_obvel_s$ID$.safeDivide(numObs_s$ID$)\n\
|
||||
z_obvel_s$ID$.safeDivide(numObs_s$ID$)\n\
|
||||
\n\
|
||||
x_obvel_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
y_obvel_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
z_obvel_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
copyRealToVec3(sourceX=x_obvel_s$ID$, sourceY=y_obvel_s$ID$, sourceZ=z_obvel_s$ID$, target=obvelC_s$ID$)\n\
|
||||
\n\
|
||||
# translate invels (world space) to grid space\n\
|
||||
if using_invel_s$ID$:\n\
|
||||
x_invel_s$ID$.multConst(scaleSpeedTime_s$ID$)\n\
|
||||
y_invel_s$ID$.multConst(scaleSpeedTime_s$ID$)\n\
|
||||
z_invel_s$ID$.multConst(scaleSpeedTime_s$ID$)\n\
|
||||
copyRealToVec3(sourceX=x_invel_s$ID$, sourceY=y_invel_s$ID$, sourceZ=z_invel_s$ID$, target=invelC_s$ID$)\n\
|
||||
\n\
|
||||
if using_guiding_s$ID$:\n\
|
||||
@@ -400,9 +383,6 @@ def fluid_pre_step_$ID$():\n\
|
||||
velT_s$ID$.multConst(vec3(gamma_sg$ID$))\n\
|
||||
\n\
|
||||
# translate external forces (world space) to grid space\n\
|
||||
x_force_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
y_force_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
z_force_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
copyRealToVec3(sourceX=x_force_s$ID$, sourceY=y_force_s$ID$, sourceZ=z_force_s$ID$, target=forces_s$ID$)\n\
|
||||
\n\
|
||||
# If obstacle has velocity, i.e. is a moving obstacle, switch to dynamic preconditioner\n\
|
||||
@@ -626,10 +606,6 @@ def bake_guiding_process_$ID$(framenr, format_guiding, path_guiding, resumable):
|
||||
x_guidevel_s$ID$.safeDivide(numGuides_s$ID$)\n\
|
||||
y_guidevel_s$ID$.safeDivide(numGuides_s$ID$)\n\
|
||||
z_guidevel_s$ID$.safeDivide(numGuides_s$ID$)\n\
|
||||
\n\
|
||||
x_guidevel_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
y_guidevel_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
z_guidevel_s$ID$.multConst(scaleSpeedFrames_s$ID$)\n\
|
||||
copyRealToVec3(sourceX=x_guidevel_s$ID$, sourceY=y_guidevel_s$ID$, sourceZ=z_guidevel_s$ID$, target=guidevelC_s$ID$)\n\
|
||||
\n\
|
||||
mantaMsg('Extrapolating guiding velocity')\n\
|
||||
@@ -718,7 +694,7 @@ def fluid_file_export_s$ID$(framenr, file_format, path, dict, file_name=None, mo
|
||||
file = os.path.join(path, file_name + '_' + framenr + file_format)\n\
|
||||
if not os.path.isfile(file) or mode_override:\n\
|
||||
if file_format == '.vdb':\n\
|
||||
saveCombined = save(name=file, objects=list(dict.values()), worldSize=domainSize_s$ID$, skipDeletedParts=True, compression=vdbCompression_s$ID$, precisionHalf=vdbPrecisionHalf_s$ID$)\n\
|
||||
saveCombined = save(name=file, objects=list(dict.values()), worldSize=domainSize_s$ID$, skipDeletedParts=True, compression=vdbCompression_s$ID$, precision=vdbPrecision_s$ID$)\n\
|
||||
elif file_format == '.bobj.gz' or file_format == '.obj':\n\
|
||||
for name, object in dict.items():\n\
|
||||
if not os.path.isfile(file) or mode_override:\n\
|
||||
|
@@ -41,6 +41,7 @@ using_mesh_s$ID$ = $USING_MESH$\n\
|
||||
using_final_mesh_s$ID$ = $USING_IMPROVED_MESH$\n\
|
||||
using_fractions_s$ID$ = $USING_FRACTIONS$\n\
|
||||
fracThreshold_s$ID$ = $FRACTIONS_THRESHOLD$\n\
|
||||
fracDistance_s$ID$ = $FRACTIONS_DISTANCE$\n\
|
||||
flipRatio_s$ID$ = $FLIP_RATIO$\n\
|
||||
concaveUpper_s$ID$ = $MESH_CONCAVE_UPPER$\n\
|
||||
concaveLower_s$ID$ = $MESH_CONCAVE_LOWER$\n\
|
||||
@@ -243,11 +244,16 @@ def liquid_step_$ID$():\n\
|
||||
pp_s$ID$.advectInGrid(flags=flags_s$ID$, vel=vel_s$ID$, integrationMode=IntRK4, deleteInObstacle=deleteInObstacle_s$ID$, stopInObstacle=False, skipNew=True)\n\
|
||||
\n\
|
||||
mantaMsg('Pushing particles out of obstacles')\n\
|
||||
if using_obstacle_s$ID$ and using_fractions_s$ID$ and fracDistance_s$ID$ > 0:\n\
|
||||
# Optional: Increase distance between fluid and obstacles (only obstacles, not borders)\n\
|
||||
pushOutofObs(parts=pp_s$ID$, flags=flags_s$ID$, phiObs=phiObsIn_s$ID$, thresh=fracDistance_s$ID$)\n\
|
||||
pushOutofObs(parts=pp_s$ID$, flags=flags_s$ID$, phiObs=phiObs_s$ID$)\n\
|
||||
\n\
|
||||
# save original states for later (used during mesh / secondary particle creation)\n\
|
||||
phiTmp_s$ID$.copyFrom(phi_s$ID$)\n\
|
||||
velTmp_s$ID$.copyFrom(vel_s$ID$)\n\
|
||||
# but only save the state at the beginning of an adaptive frame\n\
|
||||
if not s$ID$.timePerFrame:\n\
|
||||
phiTmp_s$ID$.copyFrom(phi_s$ID$)\n\
|
||||
velTmp_s$ID$.copyFrom(vel_s$ID$)\n\
|
||||
\n\
|
||||
mantaMsg('Advecting phi')\n\
|
||||
advectSemiLagrange(flags=flags_s$ID$, vel=vel_s$ID$, grid=phi_s$ID$, order=1) # first order is usually enough\n\
|
||||
@@ -302,7 +308,7 @@ def liquid_step_$ID$():\n\
|
||||
PD_fluid_guiding(vel=vel_s$ID$, velT=velT_s$ID$, flags=flags_s$ID$, phi=phi_s$ID$, curv=curvature_s$ID$, surfTens=surfaceTension_s$ID$, fractions=fractions_s$ID$, weight=weightGuide_s$ID$, blurRadius=beta_sg$ID$, pressure=pressure_s$ID$, tau=tau_sg$ID$, sigma=sigma_sg$ID$, theta=theta_sg$ID$, zeroPressureFixing=domainClosed_s$ID$)\n\
|
||||
else:\n\
|
||||
mantaMsg('Pressure')\n\
|
||||
solvePressure(flags=flags_s$ID$, vel=vel_s$ID$, pressure=pressure_s$ID$, phi=phi_s$ID$, curv=curvature_s$ID$, surfTens=surfaceTension_s$ID$, fractions=fractions_s$ID$, obvel=obvel_s$ID$ if using_fractions_s$ID$ else None, zeroPressureFixing=domainClosed_s$ID$)\n\
|
||||
solvePressure(flags=flags_s$ID$, vel=vel_s$ID$, pressure=pressure_s$ID$, curv=curvature_s$ID$, surfTens=surfaceTension_s$ID$, fractions=fractions_s$ID$, obvel=obvel_s$ID$ if using_fractions_s$ID$ else None, zeroPressureFixing=domainClosed_s$ID$)\n\
|
||||
\n\
|
||||
extrapolateMACSimple(flags=flags_s$ID$, vel=vel_s$ID$, distance=4, intoObs=True if using_fractions_s$ID$ else False)\n\
|
||||
setWallBcs(flags=flags_s$ID$, vel=vel_s$ID$, obvel=None if using_fractions_s$ID$ else obvel_s$ID$, phiObs=phiObs_s$ID$, fractions=fractions_s$ID$)\n\
|
||||
|
@@ -1076,7 +1076,7 @@ static tbool AssignRecur(const int piTriListIn[],
|
||||
return TFALSE;
|
||||
if ((pMyTriInfo->iFlag & GROUP_WITH_ANY) != 0) {
|
||||
// first to group with a group-with-anything triangle
|
||||
// determines it's orientation.
|
||||
// determines its orientation.
|
||||
// This is the only existing order dependency in the code!!
|
||||
if (pMyTriInfo->AssignedGroup[0] == NULL && pMyTriInfo->AssignedGroup[1] == NULL &&
|
||||
pMyTriInfo->AssignedGroup[2] == NULL) {
|
||||
|
@@ -471,7 +471,7 @@ bool OCIOImpl::supportGLSLDraw()
|
||||
* using regular 2D texture.
|
||||
*
|
||||
* When all drawing is finished, finishGLSLDraw shall be called to
|
||||
* restore OpenGL context to it's pre-GLSL draw state.
|
||||
* restore OpenGL context to its pre-GLSL draw state.
|
||||
*/
|
||||
bool OCIOImpl::setupGLSLDraw(OCIO_GLSLDrawState **state_r,
|
||||
OCIO_ConstProcessorRcPtr *ocio_processor_scene_to_ui,
|
||||
|
@@ -250,7 +250,7 @@ inline bool TopologyRefinerFactory<TopologyRefinerData>::assignComponentTags(
|
||||
base_mesh_topology->setVertexSharpness(vertex_index, sharpness);
|
||||
}
|
||||
|
||||
// If it's vertex where 2 non-manifold edges meet adjust vertex sharpness to
|
||||
// If its vertex where 2 non-manifold edges meet adjust vertex sharpness to
|
||||
// the edges.
|
||||
// This way having a plane with all 4 edges set to be sharp produces sharp
|
||||
// corners in the subdivided result.
|
||||
|
@@ -107,7 +107,7 @@ typedef struct OpenSubdiv_Converter {
|
||||
bool (*isInfiniteSharpVertex)(const struct OpenSubdiv_Converter *converter,
|
||||
const int vertex_index);
|
||||
|
||||
// If vertex is not infinitely sharp, this is it's actual sharpness.
|
||||
// If vertex is not infinitely sharp, this is its actual sharpness.
|
||||
float (*getVertexSharpness)(const struct OpenSubdiv_Converter *converter,
|
||||
const int vertex_index);
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,185 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="1280"
|
||||
height="256"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
version="1.0"
|
||||
sodipodi:docname="alert_icons.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
style="display:inline;enable-background:new"
|
||||
inkscape:export-filename="alert_icons.png"
|
||||
inkscape:export-xdpi="96.000008"
|
||||
inkscape:export-ydpi="96.000008">
|
||||
<metadata
|
||||
id="metadata5323">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview5321"
|
||||
showgrid="true"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="935.85776"
|
||||
inkscape:cy="91.379624"
|
||||
inkscape:window-x="1912"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer2"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:snap-global="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid9048"
|
||||
spacingx="256"
|
||||
spacingy="256"
|
||||
empcolor="#818181"
|
||||
empopacity="0.25098039"
|
||||
visible="true"
|
||||
enabled="true" />
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid5904"
|
||||
spacingx="8"
|
||||
spacingy="8"
|
||||
color="#0effa8"
|
||||
opacity="0.1254902"
|
||||
dotted="true"
|
||||
empspacing="1"
|
||||
enabled="true" />
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid5914"
|
||||
spacingx="2"
|
||||
spacingy="2"
|
||||
enabled="false" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="ICONS"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:16.6870575;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new"
|
||||
d="m 127.63711,28.7478 c -5.87683,0.194787 -11.21722,3.472426 -14.05563,8.62676 L 23.520017,200.96344 c -6.122262,11.1248 1.916754,24.74614 14.606389,24.74895 H 218.24917 c 12.68963,-0.003 20.72865,-13.62415 14.6064,-24.74895 L 142.79409,37.37456 c -3.02886,-5.500109 -8.88551,-8.833516 -15.15698,-8.62676 z m 0.22154,6.670573 v 0 c 3.73286,-0.124026 7.22725,1.867665 9.02982,5.141498 l 90.14625,163.738859 c 3.60722,6.55818 -1.22393,14.73515 -8.70414,14.73655 H 38.0383 c -7.480045,-0.002 -12.311115,-8.17837 -8.703973,-14.73655 L 119.48372,40.559871 c 1.68886,-3.067777 4.87047,-5.025451 8.36825,-5.141498 z m 0.11013,3.341816 c -2.32339,0.07946 -4.43144,1.37183 -5.55381,3.410278 L 32.268804,205.90932 c -2.456157,4.46565 0.682153,9.78322 5.775511,9.78416 H 218.33641 c 5.09337,-8.3e-4 8.23175,-5.31851 5.77562,-9.78416 L 133.96261,42.170467 c -1.19843,-2.176546 -3.50581,-3.490246 -5.98737,-3.410278 v 0 z M 120,88 h 16 c 2.04554,5e-4 4.12156,2.199338 4,4 l -6,74 c -0.11183,1.65503 -0.59661,2.75123 -2.47659,2.75165 l -7.04624,-0.0312 C 122.59719,168.71998 122.11192,167.65503 122,166 l -6,-74 c -0.12175,-1.800662 1.95448,-3.9995 4,-4 z m 8,90 c 5.52669,-2e-5 10,4.4685 10,10 0,5.53149 -4.47331,10.00002 -10,10 -5.52677,2e-5 -10.00016,-4.46851 -10,-10 -1.6e-4,-5.5315 4.47323,-10.00002 10,-10 z"
|
||||
id="path6144"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccc" />
|
||||
<path
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:99.71450043px;line-height:0;font-family:Balloons;-inkscape-font-specification:Balloons;letter-spacing:0px;word-spacing:0px;display:inline;opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:17.32685852;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal;enable-background:new"
|
||||
d="m 383.95942,24 c -57.41261,0 -103.95477,46.547438 -103.95477,103.96662 0,57.41919 46.54216,103.96662 103.95477,103.96662 57.4126,0 103.95484,-46.54743 103.95484,-103.96662 C 487.91426,70.547438 441.37202,24 383.95942,24 Z m 0,6.601049 c 53.74795,0 97.35455,43.611594 97.35455,97.365571 0,53.75398 -43.6066,97.36556 -97.35455,97.36556 -53.74796,0 -97.35448,-43.61158 -97.35448,-97.36556 0,-53.753977 43.60652,-97.365571 97.35448,-97.365571 z m 0,3.300528 c -51.9643,0 -94.05432,42.094804 -94.05432,94.065043 0,51.97024 42.09002,94.06504 94.05432,94.06504 51.96438,0 94.05439,-42.09482 94.05439,-94.06504 0,-51.970239 -42.09001,-94.065043 -94.05439,-94.065043 z m 0.0908,32.982721 c 9.84154,-0.01154 19.616,3.163309 27.0651,9.337525 7.44926,6.174231 12.46912,15.484523 12.46912,26.990837 0,30.52988 -31.3515,32.18014 -31.3515,51.15818 v 6.62361 c -1.7e-4,1.82277 -1.47764,3.30035 -3.30015,3.30053 h -9.94566 c -1.82251,-1.8e-4 -3.29998,-1.47776 -3.30014,-3.30053 v -6.62361 c 0,-29.70475 31.37409,-29.70475 31.35149,-51.15818 0,-6.446126 -2.72956,-11.141868 -7.00639,-14.520388 -4.27665,-3.378519 -10.19753,-5.260217 -16.09787,-5.260217 -5.62494,0 -11.59672,2.555319 -16.01727,6.236842 -4.42104,3.681525 -7.05852,8.409614 -7.05852,11.893503 -1.7e-4,1.82275 -1.47765,3.30035 -3.30015,3.30053 h -9.90045 c -1.82251,-1.8e-4 -3.29998,-1.47778 -3.30015,-3.30053 0,-9.471145 5.13288,-18.135164 12.52374,-24.39618 7.39102,-6.26102 17.1535,-10.269545 27.1683,-10.281922 z m -0.19653,105.739362 c 5.46786,-1e-5 9.90045,4.43309 9.90045,9.90159 0,5.4685 -4.43259,9.9016 -9.90045,9.90159 -5.46785,1e-5 -9.90043,-4.43309 -9.90043,-9.90159 0,-5.4685 4.43258,-9.9016 9.90043,-9.90159 z"
|
||||
id="circle6315"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ssssssssssssssscccccccccccsccccccccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6333"
|
||||
d="m 599.84744,24 c -1.80933,3.07e-4 -3.54432,0.719021 -4.82371,1.998072 l -57.09842,57.077994 c -1.27955,1.278828 -1.99844,3.013304 -1.99878,4.821983 v 80.215561 c 3.4e-4,1.80869 0.71921,3.54317 1.99878,4.822 l 57.09842,57.078 c 1.27939,1.27906 3.01438,1.99776 4.82371,1.99807 h 80.24427 c 1.80933,-3.1e-4 3.54432,-0.71901 4.82372,-1.99807 l 57.09841,-57.078 c 1.27955,-1.27883 1.99845,-3.01331 1.99878,-4.822 V 87.898049 c 5.1e-4,-1.806564 -0.71597,-3.539557 -1.99211,-4.818658 L 685.03536,26.001397 C 683.75491,24.719499 682.01719,23.999438 680.20496,24 Z m 0.7029,6.820055 h 78.9484 c 0.4535,-8.02e-4 0.88863,0.17894 1.20926,0.499517 l 55.98244,56.075635 c 0.31986,0.319706 0.4996,0.753326 0.49969,1.205495 v 78.810278 c -9e-5,0.45216 -0.17983,0.88577 -0.49969,1.20549 l -56.0957,56.07563 c -0.31982,0.31975 -0.75359,0.49943 -1.20592,0.49951 h -78.83848 c -0.45233,-8e-5 -0.88611,-0.17976 -1.20592,-0.49951 l -56.0957,-56.07563 c -0.31987,-0.31972 -0.49961,-0.75333 -0.4997,-1.20549 V 88.600702 c 9e-5,-0.452169 0.17983,-0.885789 0.4997,-1.205495 l 56.0957,-56.075635 c 0.31981,-0.319758 0.75359,-0.499433 1.20592,-0.499517 z m 0.70624,3.410027 -55.09631,55.076599 v 77.398309 l 55.09631,55.07659 h 77.42599 l 55.09631,-55.07659 V 89.306681 L 678.79251,34.230082 Z m 0.28649,43.477851 c 0.92189,-0.01364 1.80993,0.34714 2.46182,0.999035 l 35.96469,36.511252 35.96468,-36.511252 c 1.33226,-1.331257 3.49144,-1.331257 4.8237,0 l 8.52812,8.525069 c 1.33158,1.331718 1.33158,3.490265 0,4.821983 l -36.52432,35.95182 36.52432,35.95182 c 1.33158,1.33172 1.33158,3.49026 0,4.82197 l -8.52812,8.52507 c -1.33226,1.33127 -3.49144,1.33127 -4.8237,0 l -35.96468,-36.51126 -35.96469,36.51126 c -1.33226,1.33127 -3.49143,1.33127 -4.8237,0 l -8.52812,-8.52507 c -1.33158,-1.33171 -1.33158,-3.49025 0,-4.82197 L 627.1774,128.00584 590.65307,92.05402 c -1.33158,-1.331718 -1.33158,-3.490265 0,-4.821983 l 8.52812,-8.525069 c 0.62733,-0.627427 1.47461,-0.985395 2.36188,-0.999035 z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.82127094;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="display:inline;opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.4464879;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal;enable-background:new"
|
||||
d="m 824.87953,24.018442 c -19.10949,0 -34.49375,15.358505 -34.49375,34.436102 v 99.864706 c 0,17.91493 13.56662,32.54727 31.04439,34.26458 v -6.90406 C 807.68893,184.01188 797.2408,172.53207 797.2408,158.31925 V 58.454544 c 0,-15.383034 12.23007,-27.592598 27.63873,-27.592598 h 144.8736 c 15.40867,0 27.63877,12.209564 27.63877,27.592598 v 99.864706 c 0,15.38302 -12.2301,27.59259 -27.63877,27.59259 h -95.80091 l -5.63213,6.84349 h 101.43304 c 19.1095,0 34.49377,-15.3585 34.49377,-34.43608 V 58.454544 c 0,-19.077597 -15.38427,-34.436102 -34.49377,-34.436102 z m 0,10.287115 c -13.59981,0 -24.18938,10.571906 -24.18938,24.148987 v 99.864706 c 0,13.57706 10.58957,24.14898 24.18938,24.14898 v 3.44361 6.84349 3.44361 34.43612 c 7e-4,3.22387 4.06509,4.65054 6.10375,2.19934 l 0.91288,-1.09632 32.39946,-38.98275 h 0.0303 l 8.58971,-10.32409 c 0.0742,-0.0121 0.15004,-0.0207 0.22575,-0.0235 0.1673,-0.003 0.33391,0.0172 0.49516,0.0606 h 96.11747 c 13.59983,0 24.18941,-10.57191 24.18941,-24.14899 V 58.454579 c 0,-13.577083 -10.58958,-24.148987 -24.18941,-24.148987 z m 70.60096,20.809631 c 5.71509,-1.6e-5 10.3481,4.625269 10.3481,10.330833 0,5.705565 -4.63301,10.330849 -10.3481,10.33083 -5.71525,1.9e-5 -10.34827,-4.625265 -10.3481,-10.33083 -1.7e-4,-5.705564 4.63285,-10.330849 10.3481,-10.330833 z m 5.28521,32.610044 c 0.21939,4.99e-4 0.43816,0.02186 0.65348,0.06387 2.54598,0.323665 4.52032,2.47196 4.52057,5.10152 v 55.097748 h 8.62342 c 1.905,2e-4 3.4492,1.54185 3.44937,3.44361 v 3.44363 c -1.7e-4,1.90176 -1.54437,3.44343 -3.44937,3.44362 H 880.0695 c -1.905,-1.9e-4 -3.4492,-1.54186 -3.44936,-3.44362 v -3.44363 c 1.6e-4,-1.90176 1.54436,-3.44341 3.44936,-3.44361 h 8.62341 V 98.056045 h -8.62341 c -1.905,-1.9e-4 -3.4492,-1.541842 -3.44936,-3.443611 v -3.443609 c 1.6e-4,-1.901769 1.54436,-3.443422 3.44936,-3.443611 z"
|
||||
id="rect6452"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="sssccsssssssccssssssssccccccccccccssssscscccccccccccccccccccccc" />
|
||||
<g
|
||||
id="g888">
|
||||
<path
|
||||
inkscape:transform-center-y="-16.504573"
|
||||
inkscape:transform-center-x="7.7978312"
|
||||
d="m 1234.3776,142.72031 a 49.979294,47.518188 0 0 1 -49.8548,47.51804 49.979294,47.518188 0 0 1 -50.1032,-47.28143 49.979294,47.518188 0 0 1 49.6054,-47.753477 49.979294,47.518188 0 0 1 50.3501,47.043637"
|
||||
sodipodi:open="true"
|
||||
sodipodi:end="6.2732263"
|
||||
sodipodi:start="0"
|
||||
sodipodi:ry="47.518188"
|
||||
sodipodi:rx="49.979294"
|
||||
sodipodi:cy="142.72031"
|
||||
sodipodi:cx="1184.3983"
|
||||
sodipodi:type="arc"
|
||||
id="path869"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:4.34395075;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<g
|
||||
transform="matrix(4.318758,0,0,4.4238041,-165.58547,-1034.3978)"
|
||||
id="g15769">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path14548"
|
||||
style="clip-rule:evenodd;display:inline;fill:#265787;fill-rule:nonzero;stroke-width:0.88226169;stroke-linejoin:round;stroke-miterlimit:1.41420996"
|
||||
d="m 306.07569,265.40069 c 0.0928,-1.6816 0.90332,-3.16312 2.12613,-4.21334 1.19918,-1.03156 2.81325,-1.66205 4.57438,-1.66205 1.75937,0 3.37345,0.63049 4.5735,1.66205 1.22194,1.05022 2.03248,2.53174 2.12613,4.21157 0.0928,1.72784 -0.59083,3.33297 -1.79001,4.52281 -1.22281,1.21029 -2.96205,1.96973 -4.90962,1.96973 -1.94757,0 -3.69031,-0.75944 -4.91225,-1.96973 -1.20005,-1.18984 -1.88192,-2.79497 -1.78826,-4.52104 z" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path14552"
|
||||
style="clip-rule:evenodd;display:inline;fill:#e87d0d;fill-rule:nonzero;stroke-width:0.88226169;stroke-linejoin:round;stroke-miterlimit:1.41420996"
|
||||
d="m 295.40565,268.79858 c 0.0114,0.65806 0.21795,1.93683 0.52781,2.93547 0.65123,2.11379 1.75587,4.06929 3.29292,5.79269 1.57731,1.77142 3.51963,3.19425 5.76305,4.20446 2.35809,1.06089 4.91312,1.60157 7.56707,1.59712 2.64956,-0.004 5.2046,-0.5549 7.56269,-1.6238 2.24342,-1.01999 4.18398,-2.44904 5.75867,-4.22135 1.53617,-1.73052 2.63906,-3.68957 3.29205,-5.80336 0.32824,-1.06801 0.53569,-2.15203 0.61884,-3.2396 0.0814,-1.07157 0.0473,-2.14491 -0.10241,-3.21737 -0.29235,-2.08978 -1.00398,-4.05061 -2.09987,-5.83804 -1.00223,-1.64248 -2.29419,-3.08042 -3.83036,-4.29072 l 0.004,-0.003 -15.50264,-12.09315 c -0.014,-0.0107 -0.0254,-0.0222 -0.0403,-0.032 -1.01711,-0.79323 -2.72747,-0.79056 -3.84612,0.004 -1.1309,0.8039 -1.26045,2.13336 -0.25384,2.97193 l -0.004,0.004 6.46593,5.34183 -19.70764,0.0213 c -0.01,0 -0.0192,0 -0.0262,0 -1.62896,0.002 -3.19489,1.08757 -3.50475,2.45971 -0.31861,1.39793 0.78778,2.55753 2.48151,2.56376 l -0.003,0.006 9.98906,-0.0196 -17.82484,13.90014 c -0.0228,0.0169 -0.0473,0.0347 -0.0683,0.0516 -1.68147,1.30812 -2.22504,3.48326 -1.16591,4.85985 1.07488,1.39971 3.36032,1.40238 5.0593,0.008 l 9.72805,-8.08876 c 0,0 -0.1418,1.09202 -0.13042,1.74741 z m 24.99801,3.65667 c -2.00446,2.07466 -4.81071,3.25116 -7.84716,3.25739 -3.04084,0.005 -5.84708,-1.1605 -7.85155,-3.2316 -0.97947,-1.00932 -1.69898,-2.1707 -2.14276,-3.40767 -0.43503,-1.21563 -0.60396,-2.50596 -0.49192,-3.80785 0.10591,-1.27254 0.47879,-2.48639 1.074,-3.58463 0.58471,-1.07957 1.39,-2.0551 2.38435,-2.88034 1.94844,-1.61313 4.42908,-2.48639 7.0235,-2.48995 2.59705,-0.004 5.07593,0.8617 7.02613,2.4695 0.9926,0.82168 1.79701,1.79365 2.38172,2.87144 0.59784,1.09736 0.96809,2.30676 1.07838,3.58286 0.11029,1.30011 -0.0586,2.58866 -0.49368,3.80517 -0.44466,1.24053 -1.16153,2.40192 -2.14101,3.41568 z" />
|
||||
</g>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="320" height="64" viewBox="0 0 320 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;">
|
||||
<rect id="bg" x="0" y="0" width="320" height="64" style="fill:#202020; display:none;"/>
|
||||
<g id="grid" opacity="0.05" style="display:none;">
|
||||
<rect x="262" y="6" width="52" height="52" style="fill:#fff;"/>
|
||||
<rect x="198" y="6" width="52" height="52" style="fill:#fff;"/>
|
||||
<rect x="134" y="6" width="52" height="52" style="fill:#fff;"/>
|
||||
<rect x="70" y="6" width="52" height="52" style="fill:#fff;"/>
|
||||
<rect x="6" y="6" width="52" height="52" style="fill:#fff;"/>
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="sheet_layout"
|
||||
style="display:none">
|
||||
<g
|
||||
style="opacity:1"
|
||||
id="g3323">
|
||||
<rect
|
||||
y="0"
|
||||
x="768"
|
||||
height="256"
|
||||
width="256"
|
||||
id="rect6450"
|
||||
style="display:inline;vector-effect:none;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:7.5590601;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:105.70800018;stroke-opacity:1;marker:none;paint-order:fill markers stroke;enable-background:new" />
|
||||
<rect
|
||||
style="display:inline;vector-effect:none;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:7.5590601;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:105.70800018;stroke-opacity:1;marker:none;paint-order:fill markers stroke;enable-background:new"
|
||||
id="rect6442"
|
||||
width="256"
|
||||
height="256"
|
||||
x="512"
|
||||
y="0" />
|
||||
<rect
|
||||
style="display:inline;vector-effect:none;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:7.5590601;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:105.70800018;stroke-opacity:1;marker:none;paint-order:fill markers stroke;enable-background:new"
|
||||
id="rect6134"
|
||||
width="256"
|
||||
height="256"
|
||||
x="0"
|
||||
y="0" />
|
||||
<rect
|
||||
y="0"
|
||||
x="256"
|
||||
height="256"
|
||||
width="256"
|
||||
id="rect6161"
|
||||
style="display:inline;vector-effect:none;fill:#1a1a1a;fill-opacity:1;stroke:none;stroke-width:7.5590601;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:105.70800018;stroke-opacity:1;marker:none;paint-order:fill markers stroke;enable-background:new" />
|
||||
<g id="WARNING">
|
||||
<path d="M35.462,10.006c-0.714,-1.241 -2.036,-2.006 -3.468,-2.006c-1.432,-0 -2.754,0.765 -3.468,2.006l-23,40c-0.711,1.238 -0.709,2.761 0.006,3.997c0.715,1.236 2.034,1.997 3.462,1.997l46,0c1.428,0 2.747,-0.761 3.462,-1.997c0.715,-1.236 0.717,-2.759 0.006,-3.997l-23,-40Zm-2.601,1.496l23,40c0.178,0.309 0.177,0.69 -0.001,0.999c-0.179,0.309 -0.509,0.499 -0.866,0.499l-46,0c-0.357,-0 -0.687,-0.19 -0.866,-0.499c-0.178,-0.309 -0.179,-0.69 -0.001,-0.999c0,-0 23,-40 23,-40c0.179,-0.311 0.509,-0.502 0.867,-0.502c0.358,0 0.689,0.191 0.867,0.502Z" style="fill:#fff;"/>
|
||||
<circle cx="32" cy="46.5" r="2.5" style="fill:#fff;"/>
|
||||
<path d="M32,24c1.38,0 2.5,1.12 2.5,2.5l-1.5,14.5l-2,0l-1.5,-14.5c0,-1.38 1.12,-2.5 2.5,-2.5Z" style="fill:#fff;"/>
|
||||
</g>
|
||||
<g id="QUESTION">
|
||||
<path d="M96,6c14.35,-0 26,11.65 26,26c-0,14.35 -11.65,26 -26,26c-14.35,-0 -26,-11.65 -26,-26c-0,-14.35 11.65,-26 26,-26Zm-0,3c12.694,-0 23,10.306 23,23c-0,12.694 -10.306,23 -23,23c-12.694,-0 -23,-10.306 -23,-23c-0,-12.694 10.306,-23 23,-23Z" style="fill:#fff;"/>
|
||||
<circle cx="96" cy="44" r="3" style="fill:#fff;"/>
|
||||
<path d="M90.549,23.479l-1.513,-3.293c-0.002,-0.011 3.28,-2.209 7.964,-2.186c3.557,0.018 5.213,1.34 5.855,1.849c1.185,0.939 2.131,2.714 2.131,5.105c-0,0.741 -0.095,1.683 -0.424,2.567c-0.292,0.787 -0.706,1.528 -1.226,2.142c-0.883,1.042 -2.347,2.273 -2.825,2.656c-0.477,0.382 -1.73,1.348 -2.411,2.341c-0.48,0.7 -0.6,1.743 -0.6,2.485l-0,0.855l-3.5,0l0,-1.236c0,-0.269 0.032,-2.339 0.716,-3.511c0.709,-1.212 1.371,-1.885 2.599,-2.906c1.204,-1.002 2.275,-1.967 2.841,-2.814c0.54,-0.81 0.637,-1.629 0.637,-2.399c0,-0.77 -0.167,-1.716 -1.036,-2.482c-0.797,-0.702 -2.36,-0.865 -3.257,-0.865c-1.083,-0 -1.867,0.158 -2.99,0.526c-1.448,0.475 -2.961,1.166 -2.961,1.166Z" style="fill:#fff;"/>
|
||||
</g>
|
||||
<g id="ERROR">
|
||||
<path d="M186,22.059c0,-0.531 -0.211,-1.039 -0.586,-1.414l-14.059,-14.059c-0.375,-0.375 -0.883,-0.586 -1.414,-0.586l-19.882,0c-0.531,0 -1.039,0.211 -1.414,0.586l-14.059,14.059c-0.375,0.375 -0.586,0.883 -0.586,1.414l-0,19.882c0,0.531 0.211,1.039 0.586,1.414l14.059,14.059c0.375,0.375 0.883,0.586 1.414,0.586l19.882,-0c0.531,-0 1.039,-0.211 1.414,-0.586l14.059,-14.059c0.375,-0.375 0.586,-0.883 0.586,-1.414l-0,-19.882Zm-3,0.828c0,-0.265 -0.105,-0.519 -0.293,-0.707l-12.887,-12.887c-0.188,-0.188 -0.442,-0.293 -0.707,-0.293l-18.226,0c-0.265,0 -0.519,0.105 -0.707,0.293l-12.887,12.887c-0.188,0.188 -0.293,0.442 -0.293,0.707l0,18.226c0,0.265 0.105,0.519 0.293,0.707l12.887,12.887c0.188,0.188 0.442,0.293 0.707,0.293l18.226,-0c0.265,0 0.519,-0.105 0.707,-0.293l12.887,-12.887c0.188,-0.188 0.293,-0.442 0.293,-0.707l0,-18.226Z" style="fill:#fff;"/>
|
||||
<path d="M150.808,19.979c-0.391,-0.39 -1.024,-0.39 -1.415,0l-1.414,1.414c-0.39,0.391 -0.39,1.024 0,1.415l21.213,21.213c0.391,0.39 1.024,0.39 1.415,-0l1.414,-1.414c0.39,-0.391 0.39,-1.024 -0,-1.415l-21.213,-21.213Z" style="fill:#fff;"/>
|
||||
<path d="M172.021,22.808c0.39,-0.391 0.39,-1.024 -0,-1.415l-1.414,-1.414c-0.391,-0.39 -1.024,-0.39 -1.415,0l-21.213,21.213c-0.39,0.391 -0.39,1.024 0,1.415l1.414,1.414c0.391,0.39 1.024,0.39 1.415,-0l21.213,-21.213Z" style="fill:#fff;"/>
|
||||
</g>
|
||||
<g id="ERROR-ALT" style="display:none;">
|
||||
<path d="M186,22.059c0,-0.531 -0.211,-1.039 -0.586,-1.414l-14.059,-14.059c-0.375,-0.375 -0.883,-0.586 -1.414,-0.586l-19.882,0c-0.531,0 -1.039,0.211 -1.414,0.586l-14.059,14.059c-0.375,0.375 -0.586,0.883 -0.586,1.414l-0,19.882c0,0.531 0.211,1.039 0.586,1.414l14.059,14.059c0.375,0.375 0.883,0.586 1.414,0.586l19.882,-0c0.531,-0 1.039,-0.211 1.414,-0.586l14.059,-14.059c0.375,-0.375 0.586,-0.883 0.586,-1.414l-0,-19.882Zm-3,0.828c0,-0.265 -0.105,-0.519 -0.293,-0.707l-12.887,-12.887c-0.188,-0.188 -0.442,-0.293 -0.707,-0.293l-18.226,0c-0.265,0 -0.519,0.105 -0.707,0.293l-12.887,12.887c-0.188,0.188 -0.293,0.442 -0.293,0.707l0,18.226c0,0.265 0.105,0.519 0.293,0.707l12.887,12.887c0.188,0.188 0.442,0.293 0.707,0.293l18.226,-0c0.265,0 0.519,-0.105 0.707,-0.293l12.887,-12.887c0.188,-0.188 0.293,-0.442 0.293,-0.707l0,-18.226Z" style="fill:#fff;"/>
|
||||
<circle cx="160" cy="44" r="3" style="fill:#fff;"/>
|
||||
<path d="M160,18c1.656,0 3,1.344 3,3l-2,16l-2,0l-2,-16c0,-1.656 1.344,-3 3,-3Z" style="fill:#fff;"/>
|
||||
</g>
|
||||
<g id="INFO">
|
||||
<path d="M224,6c14.35,-0 26,11.65 26,26c-0,14.35 -11.65,26 -26,26c-14.35,-0 -26,-11.65 -26,-26c-0,-14.35 11.65,-26 26,-26Zm-0,3c12.694,-0 23,10.306 23,23c-0,12.694 -10.306,23 -23,23c-12.694,-0 -23,-10.306 -23,-23c-0,-12.694 10.306,-23 23,-23Z" style="fill:#fff;"/>
|
||||
<path d="M217.675,29.977l0.232,-1.395c0,0 2.519,-1.582 5.587,-1.582c3.067,-0 4.005,1.542 4.005,3.758c0,3.17 -2.242,7.836 -2.242,10.262c-0,1.379 0.725,1.645 1.861,1.645c0.945,-0 1.921,-0.136 2.367,-0.57l-0.492,1.602c-0,-0 -2.626,1.303 -5.207,1.303c-3.241,0 -4.297,-1.5 -4.28,-3.758c0.018,-2.4 2.249,-7.276 2.249,-10.099c0,-1.734 -1.269,-1.641 -1.917,-1.641c-1.32,-0 -2.163,0.475 -2.163,0.475Z" style="fill:#fff;"/>
|
||||
<ellipse cx="226.5" cy="21" rx="3.5" ry="3" style="fill:#fff;"/>
|
||||
</g>
|
||||
<g id="BLENDER">
|
||||
<path d="M310.66,22.503l-18.849,-14.481c-1.34,-1.042 -3.719,-0.803 -4.899,0.315c-1.14,1.078 -1.095,2.428 0.265,3.486l7.609,6.177l-23.895,0c-1.805,0 -3.795,1.138 -4.224,2.835c-0.482,1.91 1.059,3.165 3.103,3.165l11.938,0l-21.565,16.506c-2.094,1.619 -2.827,4.19 -1.508,5.787c1.289,1.559 3.983,1.635 6.073,0.122l11.865,-9.71c-0.193,1.075 -0.219,2.327 -0.065,3.264c1.52,9.103 10.046,16.034 20.637,16.034c11.525,0 20.855,-8.55 20.855,-18.96c0.007,-5.892 -2.877,-11.109 -7.34,-14.54Zm-13.534,24.534c-7.022,0 -12.714,-5.181 -12.714,-11.515c-0,-6.337 5.692,-11.577 12.714,-11.577c7.022,-0 12.714,5.131 12.714,11.577c0,6.295 -5.692,11.515 -12.714,11.515Z" style="fill:#fff;fill-rule:nonzero;"/>
|
||||
<path d="M297.391,27.766c-4.479,-0 -8.113,3.342 -8.113,7.383c-0,4.04 3.634,7.343 8.113,7.343c4.48,0 8.114,-3.303 8.114,-7.343c0,-4.041 -3.634,-7.383 -8.114,-7.383Z" style="fill:#fff;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g id="BLENDER-COLOR" style="display:none;">
|
||||
<path d="M297,21.75c-8.282,0 -15,6.205 -15,13.75c0,7.545 6.718,13.75 15,13.75c8.282,0 15,-6.205 15,-13.75c0,-7.545 -6.718,-13.75 -15,-13.75Z" style="fill:#fff;fill-rule:nonzero;"/>
|
||||
<path d="M310.66,22.503l-18.849,-14.481c-1.34,-1.042 -3.719,-0.803 -4.899,0.315c-1.14,1.078 -1.095,2.428 0.265,3.486l7.609,6.177l-23.895,0c-1.805,0 -3.795,1.138 -4.224,2.835c-0.482,1.91 1.059,3.165 3.103,3.165l11.938,0l-21.565,16.506c-2.094,1.619 -2.827,4.19 -1.508,5.787c1.289,1.559 3.983,1.635 6.073,0.122l11.865,-9.71c-0.193,1.075 -0.219,2.327 -0.065,3.264c1.52,9.103 10.046,16.034 20.637,16.034c11.525,0 20.855,-8.55 20.855,-18.96c0.007,-5.892 -2.877,-11.109 -7.34,-14.54Zm-13.534,24.534c-7.022,0 -12.714,-5.181 -12.714,-11.515c-0,-6.337 5.692,-11.577 12.714,-11.577c7.022,-0 12.714,5.131 12.714,11.577c0,6.295 -5.692,11.515 -12.714,11.515Z" style="fill:#e87d0d;fill-rule:nonzero;"/>
|
||||
<path d="M297.391,27.766c-4.479,-0 -8.113,3.342 -8.113,7.383c-0,4.04 3.634,7.343 8.113,7.343c4.48,0 8.114,-3.303 8.114,-7.343c0,-4.041 -3.634,-7.383 -8.114,-7.383Z" style="fill:#265787;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 7.9 KiB |
BIN
release/datafiles/icons/brush.sculpt.boundary.dat
Normal file
BIN
release/datafiles/icons/brush.sculpt.boundary.dat
Normal file
Binary file not shown.
BIN
release/datafiles/icons/brush.sculpt.displacement_eraser.dat
Normal file
BIN
release/datafiles/icons/brush.sculpt.displacement_eraser.dat
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user