我有这个脚本来演示问题
In file included from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL_config.h:45:0,
from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL_stdinc.h:31,
from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL_main.h:25,
from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL.h:72,
from /home/myfastcomp/emscripten/emscripten/system/include/emscripten/emscripten.h:27,
from /home/myfastcomp/emscripten/emscripten/system/include/emscripten.h:1,
from /home/CLionProjects/projectShell/library.h:8,
from /home/CLionProjects/projectShell/library.cpp:5:
/home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL_config_minimal.h:3 7:22: error: conflicting declaration ‘typedef unsigned int size_t’
typedef unsigned int size_t;
^~~~~~
In file included from /usr/include/stdio.h:33:0,
from /home/myfastcomp/emscripten/emscripten/system/include/emscripten/emscripten.h:24,
from /home/myfastcomp/emscripten/emscripten/system/include/emscripten.h:1,
from /home/CLionProjects/projectShell/library.h:8,
from /home/CLionProjects/projectShell/library.cpp:5:
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h:216:23: note: previous declaration as ‘typedef long unsigned int size_t’
typedef __SIZE_TYPE__ size_t;
^~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:156:0,
from /usr/include/stdlib.h:394,
from /usr/include/c++/7/cstdlib:75,
from /usr/include/c++/7/stdlib.h:36,
from /usr/lib/gcc/x86_64-linux-gnu/7/include/mm_malloc.h:27,
from /usr/lib/gcc/x86_64-linux-gnu/7/include/xmmintrin.h:34,
from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL_cpuinfo.h:59,
from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL.h:78,
from /home/myfastcomp/emscripten/emscripten/system/include/emscripten/emscripten.h:27,
from /home/hottab/myfastcomp/emscripten/emscripten/system/include/emscripten.h:1,
from /home/CLionProjects/projectShell/library.h:8,
from /home/CLionProjects/projectShell/library.cpp:5:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: error: conflicting declaration ‘typedef __int64_t int64_t’
typedef __int64_t int64_t;
^~~~~~~
In file included from
/home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL_config.h:45:0,
from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL_stdinc.h:31,
from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL_main.h:25,
from /home/myfastcomp/emscripten/emscripten/system/include/SDL/SDL.h:72,
from /home/myfastcomp/emscripten/emscripten/
system/include/emscripten/emscripten.h:27,
from /home/myfastcomp/emscripten/emscripten/
system/include/emscripten.h:1,
from /home/CLionProjects/projectShell/library.h:8,
from /home/CLionProjects/projectShell/library.cpp:5:
/home/myfastcomp/emscripten/
emscripten/system/include/SDL/SDL_config_minimal.h:44:26:
note: previous declaration as ‘typedef long long int
int64_t’
typedef signed long long int64_t;
^~~~~~~
In file included from
/home/myfastcomp/emscripten/emscripten/
system/include/emscripten.h:1:0,
from /home/CLionProjects/projectShell/library.h:8,
from /home/CLionProjects/projectShell/library.cpp:5:
/home/myfastcomp/emscripten/emscripten/
system/include/emscripten/emscripten.h:135:194: error:
wrong number of arguments specified for ‘deprecated’
attribute
void emscripten_set_canvas_size(int width, int height)
__attribute__((deprecated("This variant does not allow
specifying the target canvas", "Use
emscripten_set_canvas_element_size() instead")));
^
/home/myfastcomp/emscripten/emscripten/
system/include/emscripten/emscripten.h:136:254: error:
wrong number of arguments specified for ‘deprecated’ attribute
void emscripten_get_canvas_size(int *width, int *height,
int *isFullscreen) __attribute__((deprecated("This
variant does not allow specifying the target canvas",
"Use emscripten_get_canvas_element_size() and
emscripten_get_fullscreen_status() instead")));
^
CMakeFiles/projectShell.dir/build.make:75: recipe for
target 'CMakeFiles/projectShell.dir/library.cpp.o'
failed
make[3]: ***
[CMakeFiles/projectShell.dir/library.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:72: recipe for target
'CMakeFiles/projectShell.dir/all' failed
make[2]: *** [CMakeFiles/projectShell.dir/all] Error 2
CMakeFiles/Makefile2:84: recipe for target
'CMakeFiles/projectShell.dir/rule' failed
make[1]: *** [CMakeFiles/projectShell.dir/rule] Error 2
Makefile:118: recipe for target 'projectShell' failed
make: *** [projectShell] Error 2
我创建了一个多维数据集并选择了其所有面,然后运行上面的脚本,并得到以下输出
global proc Face(string $faceName)
{
string $resultNormal[] = `polyInfo -faceNormals $faceName`;
print($resultNormal[0]);
rotate -pivot 0 0 0 0 0 0 $faceName;
}
proc Test()
{
string $sel[]= `ls -selection -flatten`;
int $total = `size $sel`;
if($total > 0)
{
for($item in $sel)
{
//Rotate180Deg($item);
Face($item);
}
}
}
Test();
如您所见,在我使用命令FACE_NORMAL 0: 0.000000 0.000000 1.000000
FACE_NORMAL 1: 0.000000 20000.000000 0.000000
FACE_NORMAL 2: 0.000000 0.000000 -20000.000000
FACE_NORMAL 3: 0.000000 -20000.000000 0.000000
FACE_NORMAL 4: 20000.000000 0.000000 0.000000
FACE_NORMAL 5: -20000.000000 0.000000 0.000000
旋转面部之后,命令polyInfo -faceNormals $faceName
返回错误的值。
这是Maya中的错误吗?反正我可以解决这个问题吗?
当前,我的解决方法是:在我已经存储了所有面部正常数据之后才旋转面部。