1/1

Bodhi Linux and Pixie Renderer install under gnome boxes

Ubuntu系のLinux 64bitでPixie Rendererを動かしました。
RIBが使える唯一のRenderMan互換rendererになるかもしれません。
Dispersion.jpg
Fedora28のgnome boxesにBodhi Linux5.0 64bitをインストールしました。
ダウンロードしたのは、bodhi-5.0.0-apppack-64.iso (1.5GB)
Pixie Rendererをビルドしました。
Pixie Rendererをダウンロードしてきます。
https://sourceforge.net/projects/pixie/

解凍します。
$ tar xvf Pixie-src-2.2.6.tgz
$ cd Pixie/
$ ./configure
...
ellipsis (省略)
...
errorが出ますので、以下、いくつかインストールします。
管理者権限で、
$ sudo -i

~# apt install update

~# apt install bison
~# apt install flex
~# apt install build-essential

~# apt install libtiff-dev
~# apt install libpng-dev
~# apt install libopenexr-dev
~# apt install fluid
~# apt install libcairo2-dev libxft-dev libxinerama-dev

*****************************************
次に、以下のpatchをあてます。https://sourceforge.net/projects/pixie/のticketにあります。
ファイル名pixie-2.2.6-gcc6.patchをダウンロードします。
https://sourceforge.net/p/pixie/patches/23/
上記から入手してください。
上のパッチを解凍したPixie/src/commonに保存します。
以下を実行します。

$ cd src/common
$ patch < pixie-2.2.6-gcc6.patch
patching file global.h

パッチをあてないでmakeすると以下のようなエラーが出ます。

In file included from ../common/algebra.h:188,
from file.cpp:33:
../common/mathSpec.h: 関数 ‘void fresnel(const float*, const float*, float, float&, float&, float*, float*)’ 内:
../common/mathSpec.h:548:30: エラー: ‘max’ was not declared in this scope
const SCALAR_TYPE g = SQRT(max(t,0));
^~~
../common/mathSpec.h:548:30: 備考: suggested alternative: ‘fmax’
const SCALAR_TYPE g = SQRT(max(t,0));
^~~
fmax
../common/mathSpec.h:553:9: エラー: ‘min’ was not declared in this scope
Kr = min(Kr,1);
^~~
../common/mathSpec.h:553:9: 備考: suggested alternative: ‘sin’
Kr = min(Kr,1);
^~~
sin
In file included from ../common/algebra.h:199,
from file.cpp:33:
../common/mathSpec.h: 関数 ‘void fresnel(const double*, const double*, double, double&, double&, double*, double*)’ 内:
../common/mathSpec.h:548:30: エラー: ‘max’ was not declared in this scope
const SCALAR_TYPE g = SQRT(max(t,0));
^~~
../common/mathSpec.h:548:30: 備考: suggested alternative: ‘fmax’
const SCALAR_TYPE g = SQRT(max(t,0));
^~~
fmax
../common/mathSpec.h:553:9: エラー: ‘min’ was not declared in this scope
Kr = min(Kr,1);
^~~
../common/mathSpec.h:553:9: 備考: suggested alternative: ‘sin’
Kr = min(Kr,1);
^~~
sin
make[3]: *** [Makefile:317: file.lo] エラー 1


*************************************************
$ cd ../../ でPixieフォルダに戻ります。
$ ./configure を実行します。
------------------------------------------------
---> FLTK not found.
---> You can download it from www.fltk.org
---> show will not be built.
------------------------------------------------
Installation info:
PIXIEHOME: /opt/pixie
Documentation: /opt/pixie/doc
Shaders: /opt/pixie/shaders
RIBs: /opt/pixie/ribs
Textures: /opt/pixie/textures
Displays: /opt/pixie/displays
Procedurals: /opt/pixie/procedurals
Modules: /opt/pixie/modules
------------------------------------------------
To build Pixie:
>make
>make install
Terminus Est

FLTK not found.は無視します。他にエラーがなければいよいよmakeです。

$ make

エラーがいくつか出てきます。テキストエディタで(gzFile)を記入していきます。

In file included from rendererContext.cpp:77:0:
ribOut.h: In member function ‘void CRibOut::vout(const char*, __va_list_tag*)’:
ribOut.h:240:61: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzwrite(gzFile, voidpc, unsigned int)’
if (outputCompressed) gzwrite(outFile,scratch,l);
^
ribOut.h: In member function ‘void CRibOut::out(const char*, ...)’:
ribOut.h:261:61: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzwrite(gzFile, voidpc, unsigned int)’
if (outputCompressed) gzwrite(outFile,scratch,l);
^
rendererContext.cpp: In member function ‘virtual void CRendererContext::RiError(int, int, const char*)’:
rendererContext.cpp:4706:20: warning: format not a string literal and no format arguments [-Wformat-security]
fprintf(out,tmp);
^
Makefile:485: recipe for target 'rendererContext.lo' failed
make[4]: *** [rendererContext.lo] Error 1
make[4]: Leaving directory '/home/yokamak/Download/Pixie/src/ri'


ファイルribOut.h
240行目
if (outputCompressed) gzwrite((gzFile)outFile,scratch,l);240
261行目
if (outputCompressed) gzwrite((gzFile)outFile,scratch,l);261
(gzFile)を追記します。

$ makeします。


rib.l: In function ‘int riblex(YYSTYPE*)’:
rib.l:211:5: error: ‘riblval’ was not declared in this scope
\"[^\"]*\" { riblval->string = rstrdup(ribtext+1,CRenderer::globalMemory); riblval->string[strlen(riblval->string)-1] = '\0'; return RIB_TEXT;}
^~~~~~~
rib.l:211:5: note: suggested alternative: ‘ribval’
\"[^\"]*\" { riblval->string = rstrdup(ribtext+1,CRenderer::globalMemory); riblval->string[strlen(riblval->string)-1] = '\0'; return RIB_TEXT;}
^~~~~~~
ribval
In file included from rib.y:2835:0:
rib.l:212:44: error: ‘riblval’ was not declared in this scope
[+-]?([0-9]+|([0-9]*(\.[0-9]+)?)([eE][+-]?[0-9]+)?) { /*sscanf(ribtext,"%f",&riblval->real);*/ riblval->real = (float) atof(ribtext); return RIB_FLOAT; }
^~~~~~~
rib.l:212:44: note: suggested alternative: ‘ribval’
[+-]?([0-9]+|([0-9]*(\.[0-9]+)?)([eE][+-]?[0-9]+)?) { /*sscanf(ribtext,"%f",&riblval->real);*/ riblval->real = (float) atof(ribtext); return RIB_FLOAT; }
^~~~~~~
ribval
In file included from rib.y:2835:0:
rib.l:213:44: error: ‘riblval’ was not declared in this scope
[+-]?([0-9]+|([0-9]+(\.[0-9]*)?)([eE][+-]?[0-9]+)?) { /*sscanf(ribtext,"%f",&riblval->real);*/ riblval->real = (float) atof(ribtext); return RIB_FLOAT; }
^~~~~~~
rib.l:213:44: note: suggested alternative: ‘ribval’
[+-]?([0-9]+|([0-9]+(\.[0-9]*)?)([eE][+-]?[0-9]+)?) { /*sscanf(ribtext,"%f",&riblval->real);*/ riblval->real = (float) atof(ribtext); return RIB_FLOAT; }
^~~~~~~
ribval
In file included from rib.y:2835:0:
rib.l:216:3: error: ‘riblval’ was not declared in this scope
#\!.* { riblval->string = rstrdup(ribtext+2,CRenderer::globalMemory); return RIB_STRUCTURE_COMMENT; }
^~~~~~~
rib.l:216:3: note: suggested alternative: ‘ribval’
#\!.* { riblval->string = rstrdup(ribtext+2,CRenderer::globalMemory); return RIB_STRUCTURE_COMMENT; }
^~~~~~~
ribval
In file included from rib.y:2835:0:
rib.l:226:29: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzclose(gzFile)’
gzclose(ribin);
^
In file included from rib.y:2835:0:
rib.l:246:29: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzclose(gzFile)’
gzclose(ribin);
^
In file included from rib.y:2835:0:
lex.rib.cpp: In function ‘int yy_get_next_buffer()’:
rib.l:20:77: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzread(gzFile, voidp, unsigned int)’
YY_INPUT(buf, retval, maxlen) if ( (retval = gzread(ribin,buf,maxlen)) < 0) \
^
lex.rib.cpp:2636:3: note: in expansion of macro ‘YY_INPUT’
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
^~~~~~~~
rib.y: In function ‘void ribParse(const char*, void (*)(const char*, ...))’:
rib.y:2943:17: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzclose(gzFile)’
gzclose(ribin);
^
Makefile:485: recipe for target 'rib.lo' failed
make[4]: *** [rib.lo] Error 1

上記のエラーは、https://sourceforge.net/projects/pixie/のticketに書いてあります。

--- gentoo/media-gfx/pixie/pixie-2.2.6-r1.ebuild 2012-03-10 10:19:20.000000000 +0100
+++ myrep/media-gfx/pixie/pixie-2.2.6-r1.ebuild 2015-01-26 04:47:00.000000000 +0100
@@ -55,6 +55,9 @@
# parallelism can break the regeneration process, with resulting
# missing shaders.
rm "${S}"/shaders/*.sdr
+
+ # FIX: flex does not translate variable name in custom YY_DECL
+ sed -i -e '/define YY_DECL/ s/yylval/riblval/' src/ri/rib.l
}

src_configure() {


以下を実行します。
$ sed -i -e '/define YY_DECL/ s/yylval/riblval/' src/ri/rib.l


続けて
$ makeします。

In file included from rib.y:2835:0:
rib.l: In function ‘int riblex(YYSTYPE*)’:
rib.l:226:29: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzclose(gzFile)’
gzclose(ribin);
^
In file included from rib.y:2835:0:
rib.l:246:29: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzclose(gzFile)’
gzclose(ribin);
^
In file included from rib.y:2835:0:
lex.rib.cpp: In function ‘int yy_get_next_buffer()’:
rib.l:20:77: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzread(gzFile, voidp, unsigned int)’
YY_INPUT(buf, retval, maxlen) if ( (retval = gzread(ribin,buf,maxlen)) < 0) \
^
lex.rib.cpp:2636:3: note: in expansion of macro ‘YY_INPUT’
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
^~~~~~~~
rib.y: In function ‘void ribParse(const char*, void (*)(const char*, ...))’:
rib.y:2943:17: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzclose(gzFile)’
gzclose(ribin);
^
Makefile:485: recipe for target 'rib.lo' failed
make[4]: *** [rib.lo] Error 1
make[4]: Leaving directory '/home/yokamak/Download/Pixie/src/ri'
Makefile:328: recipe for target 'all' failed
make[3]: *** [all] Error 2


ファイルrib.l :20行目
#define YY_INPUT(buf, retval, maxlen) if ( (retval = gzread((gzFile)ribin,buf,maxlen)) < 0)

:226行目と :246行目
gzclose((gzFile)ribin);

続けて
$ makeします。

rib.y: In function ‘void ribParse(const char*, void (*)(const char*, ...))’:
rib.y:2943:17: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzclose(gzFile)’
gzclose(ribin);
^
Makefile:485: recipe for target 'rib.lo' failed
make[4]: *** [rib.lo] Error 1

ファイルrib.y
:2943行目
#ifdef HAVE_ZLIB
gzclose((gzFile)ribin);
#else

続けて
$ makeします。

ribOut.cpp: In destructor ‘virtual CRibOut::~CRibOut()’:
ribOut.cpp:165:20: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘gzFile {aka gzFile_s*}’ for argument ‘1’ to ‘int gzclose(gzFile)’
gzclose(outFile);
^
Makefile:485: recipe for target 'ribOut.lo' failed

ファイルribOut.cpp
:165行目
gzclose((gzFile)outFile);

続けて
$ makeします。

make[3]: Leaving directory '/home/yokamak/Download/Pixie/src/sdrinfo'
Making all in show
make[3]: Entering directory '/home/yokamak/Download/Pixie/src/show'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/yokamak/Download/Pixie/src/show'
make[3]: Entering directory '/home/yokamak/Download/Pixie/src'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/yokamak/Download/Pixie/src'
make[2]: Leaving directory '/home/yokamak/Download/Pixie/src'
Making all in doc
make[2]: Entering directory '/home/yokamak/Download/Pixie/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/yokamak/Download/Pixie/doc'
make[2]: Entering directory '/home/yokamak/Download/Pixie'
make[2]: Leaving directory '/home/yokamak/Download/Pixie'
make[1]: Leaving directory '/home/yokamak/Download/Pixie'

make完了!!!
管理者権限で、
$ sudo -i
# make install

これで/opt/pixie/にインストールされました。shaderをコンパイルしなおします。

root@bodhi:/home/yokamak/Download/Pixie# cd /opt/pixie/shaders/
root@bodhi:/opt/pixie/shaders# /opt/pixie/bin/sdrc *.sl
Compiling ambientindirect.sl
Compiling ambientlight.sl
Compiling ambientocclusion.sl
Compiling arealight.sl
Compiling constant.sl
Compiling distantlight.sl
Compiling fog.sl
Compiling glass.sl
Compiling matte.sl
Compiling metal.sl
Compiling mirror.sl
Compiling mtorDirectionalLight.sl
Compiling mtorLambert.sl
Compiling mtorPhong.sl
Compiling normdir.sl
Compiling paintedmatte.sl
Compiling paintedplastic.sl
Compiling plastic.sl
Compiling pointlight.sl
Compiling rayarea.sl
Compiling raydistant.sl
Compiling raypoint.sl
Compiling shadowarea.sl
Compiling shadowdistant.sl
Compiling shadowpoint.sl
Compiling shadowspot.sl
Compiling spotlight.sl
root@bodhi:/opt/pixie/shaders# logout (ctrl+dで)

最後にPixie RendererのPATHを編集します。
yokamak@bodhi:~/Download/Pixie$ cd ~
yokamak@bodhi:~$ nano .profile
以下を記入
export PIXIEHOME=/opt/pixie/
export PATH=$PATH:$PIXIEHOME/bin
export SHADERS=$PIXIEHOME/shaders

$ source .profileを実行。
以下のaqsis rendererのsimple.ribを実行してみます。
$ rndr -d simple.rib
##RenderMan RIB-Structure 1.0
FrameBegin 1
Display "simple.tif" "framebuffer" "rgba"
Format 640 480 -1
ShadingRate 1
Projection "perspective" "fov" [30]
FrameAspectRatio 1.33
Identity
# Default distant headlight
LightSource "distantlight" 1
# Camera transformation
Translate 0 0 5
WorldBegin
Identity
AttributeBegin
Color [1.0 0.6 0.0] # A nice orange color
Surface "plastic" "Ka" [1] "Kd" [0.5] "Ks" 1 "roughness" 0.1
TransformBegin
Rotate 90 1 0 0 # Rotate +z to +y. "Up" in default camera coordinates is +y,
Sphere 1 -1 1 360 # but the Sphere primitive has its poles on the z axis.
TransformEnd
AttributeEnd
WorldEnd
FrameEnd

simple.jpg
  • -
  • -

python cgkit has been installed on my Zorin-OS-12.4-Core-64

Virtualboxにubuntu系のZorinOSをインストールしました。
はじめにRenderMan互換rendererのpixieをインストールしました。詳しくは前の記事に書きました。
http://rman.sakura.ne.jp/sb/log/eid528.html

以下をインストールします。
$ sudo apt install python-dev
$ sudo apt install python-opengl
$ sudo apt install python-pygame
$ sudo apt install libboost-python-dev
$ sudo apt install python-pyode
$ sudo apt install libode-dev
$ sudo apt install python-serial
$ sudo apt install python-protocols
$ sudo apt install scons

ubuntuのpackageのpython-pilはインストールしません。
64bitの環境でcgkitでのテクスチャがうまく使えないので
PIL1.1.7をダウンロードしてきます。
http://www.pythonware.com/products/pil/

以下、pil1.1.7をubuntu系でインストールするための設定です。
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib

$ sudo apt install python-tk tk8.5-dev tcl8.5-dev tk8.5 tcl8.5
ここでtkinterが動くか確認します。大文字のTになっています。
$ python -m Tkinter

pil1.1.7を解凍します。
$ cd Downloads/
$ tar xvf Imaging-1.1.7.tar.gz
$ cd Imaging-1.1.7/

setup.pyの以下の部分にpathを書き加えます。
$ nano setup.py

TCL_ROOT = "/usr/include/tcl8.5/"
JPEG_ROOT = "/usr/lib/x86_64-linux-gnu/"
ZLIB_ROOT = "/usr/lib/x86_64-linux-gnu/"
TIFF_ROOT = None
FREETYPE_ROOT = "/usr/lib/x86_64-linux-gnu/"
LCMS_ROOT = None

pil1.1.7をビルドします。

python setup.py build_ext -i

pil1.1.7をインストールします。ログを記録します。
sudo python setup.py install --record files.txt

アンインストールするときは以下を使います。
cat files.txt | xargs rm -rf

running install_scripts
copying build/scripts-2.7/pilfile.py -> /usr/local/bin
copying build/scripts-2.7/pilprint.py -> /usr/local/bin
copying build/scripts-2.7/pilfont.py -> /usr/local/bin
copying build/scripts-2.7/pildriver.py -> /usr/local/bin
copying build/scripts-2.7/pilconvert.py -> /usr/local/bin
changing mode of /usr/local/bin/pilfile.py to 775
changing mode of /usr/local/bin/pilprint.py to 775
changing mode of /usr/local/bin/pilfont.py to 755
changing mode of /usr/local/bin/pildriver.py to 775
changing mode of /usr/local/bin/pilconvert.py to 775
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/PIL/PIL-1.1.7.egg-info
creating /usr/local/lib/python2.7/dist-packages/PIL.pth
writing list of installed files to 'files.txt'

PIL1.1.7が動くか確認します。
~/Downloads/Imaging-1.1.7$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>>
ctrl+dで抜けます。

こちらでも確認します。
$ python selftest.py
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
--- TKINTER support ok
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
*** LITTLECMS support not installed
--------------------------------------------------------------------
Running selftest:
--- 57 tests passed.

cgkitは--- ZLIB (PNG/ZIP) support okでないとテクスチャが渡せません。

cgkitを入手します。
https://sourceforge.net/projects/cgkit/files/cgkit/
以下はcgkitのインストールです。
$ cd ../
~/Downloads$ tar xvf cgkit-2.0.0-py2k.tar.gz

環境を確認します。
$ cd cgkit-2.0.0/
$ cd utilities/
$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. missing
cgkit (C++ lib)............... failed

The cgkit supportlib could not be imported. One possible reason for that
is that shared libraries (such as the boost_python runtime or OpenGL)
could not be found.

cgkit (all)................... failed

cgkitだけがインストールされてないので
以下を実行します。
$ cd ../
$ cd supportlib/
$ scons
しばらく待ちます。
scons: done building targets.
$ cd ../
$ sudo python setup.py install
しばらく待ちます。
running install_scripts
copying build/scripts-2.7/postbake.py -> /usr/local/bin
copying build/scripts-2.7/seqmv.py -> /usr/local/bin
copying build/scripts-2.7/seqrm.py -> /usr/local/bin
copying build/scripts-2.7/viewer.py -> /usr/local/bin
copying build/scripts-2.7/seqcp.py -> /usr/local/bin
copying build/scripts-2.7/convert3d.py -> /usr/local/bin
copying build/scripts-2.7/info3d.py -> /usr/local/bin
copying build/scripts-2.7/seqls.py -> /usr/local/bin
copying build/scripts-2.7/render.py -> /usr/local/bin
changing mode of /usr/local/bin/postbake.py to 755
changing mode of /usr/local/bin/seqmv.py to 755
changing mode of /usr/local/bin/seqrm.py to 755
changing mode of /usr/local/bin/viewer.py to 755
changing mode of /usr/local/bin/seqcp.py to 755
changing mode of /usr/local/bin/convert3d.py to 755
changing mode of /usr/local/bin/info3d.py to 755
changing mode of /usr/local/bin/seqls.py to 755
changing mode of /usr/local/bin/render.py to 755
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/cgkit-2.0.0.egg-info
... finished setup
インストール完了です。
$ cd utilities/
mak@zorinos:~/Downloads/cgkit-2.0.0/utilities$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0 (Nov 09 2018)
cgkit (C++ lib)............... OK
cgkit (all)................... OK

pythonで確認します。
$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cgkit.all import *
>>>

cgkitサイトのtutorialかdemoを入手します。
http://cgkit.sourceforge.net/tutorials/demo1.html
http://cgkit.sourceforge.net/tutorials/demo2.html
http://cgkit.sourceforge.net/tutorials/demo3.html
http://cgkit.sourceforge.net/tutorials/renderman.html
$viewer.py demo3.py

---------------------------------------------------------
cgkitのインストール時にエラーが出る場合
以下を参考にしてください。
以下、error:
In file included from wrappers/py_arrayslots1.cpp:5:0:
wrappers/py_arrayslots1.cpp: In function ‘void class_ArraySlots()’:
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
---------------------------------------

[solved]
py_slot.h,43行目snameの両側に空白スペースを入れる "_" sname "

[solved]
py_geoms1.cpp,line:145行 and line:166行 boost::python::make_tuple に変更します。
  • -
  • -

1/1