├── .gitattributes ├── .gitignore ├── README.md ├── common ├── README.md ├── bg.bmp ├── chest_for_Blender.mtl ├── chest_for_Blender.obj ├── cloud.mtl ├── cloud.obj ├── land.mtl ├── land.obj ├── render_settings_3DSMax.rps ├── water.mtl └── water.obj ├── script_3D_Studio_Max ├── README.md └── Script_3DSMax.py ├── script_Blender ├── README.md └── Script_Blender.py └── script_Maya ├── README.md └── Script_Maya.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | script_3D_Studio_Max/tabela.py 49 | script_3D_Studio_Max/tabela2.py 50 | script_Maya/save.txt 51 | script_Maya/save2.txt 52 | script_Maya/tests2.py 53 | changes.txt 54 | script_Blender/tests.py 55 | script_3D_Studio_Max/y.py 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Python API in 3D computer graphics software: examplary scripts 2 | Example of Python scripts for Autodesk 3D Studio Max, Autodesk Maya and Blender. 3 | Those scripts use Python API to create simmilar scene in: Autodesk 3D Studio Max, Autodesk Maya and Blender. 4 | Created to show the basics of using Python in those applications. 5 | 6 | Final result example(3Ds Max:) 7 | 8 | [![ScreenShot](https://i.vimeocdn.com/video/577899163_295x166.webp)](https://vimeo.com/172206485) 9 | 10 | 11 | Every script has a number of suport functions and seven major functions: 12 | - prepare_scene(path) - The function sets the basic parameters of the scene: time range, tangent type of keyframes and render settings. 13 | - import_and_animate_basic_meshes(path) - This function imports some objects and animates them. It was created to show how to import objects and present one way of creating keyframes of animation. 14 | - create_shark_and_cloud() - Creates meshes from vertex and face data. Similar functions can be used in importer plugin. 15 | - create_chest() - Function creates an object with a use ofrecorded macros, if such function is avaible in software. Macros are a very simple way of creating basic scripts. 16 | - create_and_animate_trees() - Function uses the create_palm() support function to create and animate some palm trees. It was created to show how to create basic geometry objects, use instances and use modificators. 17 | - change_hierarchy_and_animate() - Function modifies the hierarchy of scen and creates some final animations, that ware not possible to create earlier. It also creates cameras and lights. 18 | - create_and_assign_materials() - Function creates and applies materials to the objects. It was created to show how to handle materials. 19 | 20 | All scripts have simple GUIs 21 | 22 | ## How to use: 23 | 24 | - Download the content of the "common" directory. Script will ask for path to those files before running 25 | - Read the Readme.md file inside directory wit a script for choosen software and fallow the instructions. Every software has a different way of running scripts 26 | 27 | ## License: 28 | 29 | This program is free software; you can redistribute it and/or 30 | modify it under the terms of the GNU General Public License 31 | as published by the Free Software Foundation; either version 2 32 | of the License, or (at your option) any later version. 33 | 34 | This program is distributed in the hope that it will be useful, 35 | but WITHOUT ANY WARRANTY; without even the implied warranty of 36 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 37 | GNU General Public License for more details. 38 | 39 | You should have received a copy of the GNU General Public License 40 | along with this program; if not, write to the Free Software 41 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 42 | 43 | To the extent possible under law, [Paweł Kowalski](http://pkowalski.com) has waived all copyright and related or neighboring rights to this work. 44 | -------------------------------------------------------------------------------- /common/README.md: -------------------------------------------------------------------------------- 1 | ## Additional files 2 | 3 | - Copyright (C) Paweł Kowalski 4 | 5 | - www.pkowalski.com 6 | - www.behance.net/pkowalski 7 | 8 | ## How to use: 9 | 10 | Download the content of this directory. Script will ask user for location of those files before running. 11 | -------------------------------------------------------------------------------- /common/bg.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/p4vv37/3D_Software_and_Python/3eebbb9d04a30ad10e3191f10aa1d812c05f5087/common/bg.bmp -------------------------------------------------------------------------------- /common/chest_for_Blender.mtl: -------------------------------------------------------------------------------- 1 | # 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware 2 | # File Created: 17.06.2016 06:58:29 3 | 4 | newmtl wire_228184153 5 | Ns 32 6 | d 1 7 | Tr 0 8 | Tf 1 1 1 9 | illum 2 10 | Ka 0.894118 0.721569 0.600000 11 | Kd 0.894118 0.721569 0.600000 12 | Ks 0.350000 0.350000 0.350000 13 | 14 | newmtl wire_141007058 15 | Ns 32 16 | d 1 17 | Tr 0 18 | Tf 1 1 1 19 | illum 2 20 | Ka 0.552941 0.027451 0.227451 21 | Kd 0.552941 0.027451 0.227451 22 | Ks 0.350000 0.350000 0.350000 23 | 24 | newmtl wire_135059008 25 | Ns 32 26 | d 1 27 | Tr 0 28 | Tf 1 1 1 29 | illum 2 30 | Ka 0.529412 0.231373 0.031373 31 | Kd 0.529412 0.231373 0.031373 32 | Ks 0.350000 0.350000 0.350000 33 | 34 | newmtl wire_177088027 35 | Ns 32 36 | d 1 37 | Tr 0 38 | Tf 1 1 1 39 | illum 2 40 | Ka 0.694118 0.345098 0.105882 41 | Kd 0.694118 0.345098 0.105882 42 | Ks 0.350000 0.350000 0.350000 43 | -------------------------------------------------------------------------------- /common/cloud.mtl: -------------------------------------------------------------------------------- 1 | # 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware 2 | # File Created: 30.04.2016 07:47:39 3 | 4 | newmtl wire_184155229 5 | Ns 32 6 | d 1 7 | Tr 0 8 | Tf 1 1 1 9 | illum 2 10 | Ka 0.721569 0.607843 0.898039 11 | Kd 0.721569 0.607843 0.898039 12 | Ks 0.350000 0.350000 0.350000 13 | -------------------------------------------------------------------------------- /common/land.mtl: -------------------------------------------------------------------------------- 1 | # 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware 2 | # File Created: 30.04.2016 07:51:09 3 | 4 | newmtl wire_057008136 5 | Ns 32 6 | d 1 7 | Tr 0 8 | Tf 1 1 1 9 | illum 2 10 | Ka 0.223529 0.031373 0.533333 11 | Kd 0.223529 0.031373 0.533333 12 | Ks 0.350000 0.350000 0.350000 13 | -------------------------------------------------------------------------------- /common/render_settings_3DSMax.rps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/p4vv37/3D_Software_and_Python/3eebbb9d04a30ad10e3191f10aa1d812c05f5087/common/render_settings_3DSMax.rps -------------------------------------------------------------------------------- /common/water.mtl: -------------------------------------------------------------------------------- 1 | # 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware 2 | # File Created: 11.05.2016 22:46:46 3 | 4 | newmtl wire_229166215 5 | Ns 32 6 | d 1 7 | Tr 0 8 | Tf 1 1 1 9 | illum 2 10 | Ka 0.8980 0.6510 0.8431 11 | Kd 0.8980 0.6510 0.8431 12 | Ks 0.3500 0.3500 0.3500 13 | -------------------------------------------------------------------------------- /common/water.obj: -------------------------------------------------------------------------------- 1 | # 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware 2 | # File Created: 11.05.2016 22:46:46 3 | 4 | mtllib water.mtl 5 | 6 | # 7 | # object water 8 | # 9 | 10 | v 57.3731 -14.0785 28.5980 11 | v 58.0915 -20.5804 18.8110 12 | v 62.9682 -15.5727 9.8236 13 | v 61.0088 -9.4695 19.5964 14 | v 60.6679 -21.5180 0.0000 15 | v 62.9682 -15.5727 -9.8236 16 | v 63.9492 -9.9676 0.0000 17 | v 58.0915 -20.5804 -18.8110 18 | v 57.3731 -14.0785 -28.5980 19 | v 61.0088 -9.4695 -19.5964 20 | v 49.9981 -18.7969 36.3258 21 | v 47.6937 -28.2335 34.6515 22 | v 53.0000 -24.8006 27.0869 23 | v 46.9962 -34.5149 27.0869 24 | v 53.9332 -32.0898 18.0113 25 | v 57.6562 -27.0238 9.2783 26 | v 51.0670 -37.6854 9.2783 27 | v 56.0673 -33.4087 0.0000 28 | v 57.6562 -27.0238 -9.2783 29 | v 51.0670 -37.6854 -9.2783 30 | v 53.9332 -32.0898 -18.0113 31 | v 53.0000 -24.8006 -27.0869 32 | v 46.9962 -34.5149 -27.0869 33 | v 47.6937 -28.2335 -34.6515 34 | v 49.9981 -18.7969 -36.3258 35 | v 44.9276 -14.0785 -45.7278 36 | v 35.8416 -20.5804 -49.4354 37 | v 28.8011 -15.5727 -56.8507 38 | v 37.4901 -9.4695 -51.9672 39 | v 18.7474 -21.5180 -57.6986 40 | v 10.1154 -15.5727 -62.9220 41 | v 19.7614 -9.9676 -60.8193 42 | v 0.0610 -20.5804 -61.0612 43 | v -9.4691 -14.0785 -63.4023 44 | v 0.2154 -9.4695 -64.0785 45 | v 42.1391 -24.8006 -42.0357 46 | v 40.2838 -34.5149 -36.3258 47 | v 33.7960 -32.0898 -45.7278 48 | v 26.6410 -27.0238 -51.9672 49 | v 24.6048 -37.6854 -45.7004 50 | v 17.3257 -33.4087 -53.3231 51 | v 8.9926 -27.0238 -57.7015 52 | v 6.9564 -37.6854 -51.4347 53 | v -0.4635 -32.0898 -56.8593 54 | v -9.3833 -24.8006 -58.7763 55 | v -11.2386 -34.5149 -53.0664 56 | v -18.2174 -28.2335 -56.0673 57 | v -19.0976 -18.7969 -58.7763 58 | v -29.6063 -14.0785 -56.8593 59 | v -35.9402 -20.5804 -49.3637 60 | v -45.1682 -15.5727 -44.9593 61 | v -37.8387 -9.4695 -51.7139 62 | v -49.0814 -21.5180 -35.6597 63 | v -56.7166 -15.5727 -29.0643 64 | v -51.7360 -9.9676 -37.5884 65 | v -58.0538 -20.5804 -18.9269 66 | v -63.2253 -14.0785 -10.5868 67 | v -60.8757 -9.4695 -20.0062 68 | v -26.9566 -24.8006 -53.0664 69 | v -22.0995 -34.5149 -49.5375 70 | v -33.0462 -32.0898 -46.2726 71 | v -41.1912 -27.0238 -41.3958 72 | v -35.8604 -37.6854 -37.5227 73 | v -45.3594 -33.4087 -32.9555 74 | v -52.0985 -27.0238 -26.3832 75 | v -46.7677 -37.6854 -22.5101 76 | v -54.2197 -32.0898 -17.1297 77 | v -58.7992 -24.8006 -9.2388 78 | v -53.9421 -34.5149 -5.7099 79 | v -58.9526 -28.2335 0.0000 80 | v -61.8011 -18.7969 0.0000 81 | v -63.2253 -14.0785 10.5868 82 | v -58.0539 -20.5804 18.9269 83 | v -56.7166 -15.5727 29.0643 84 | v -60.8757 -9.4695 20.0062 85 | v -49.0814 -21.5180 35.6597 86 | v -45.1682 -15.5727 44.9593 87 | v -51.7360 -9.9676 37.5884 88 | v -35.9402 -20.5804 49.3638 89 | v -29.6063 -14.0786 56.8594 90 | v -37.8387 -9.4695 51.7139 91 | v -58.7992 -24.8006 9.2388 92 | v -53.9421 -34.5149 5.7099 93 | v -54.2197 -32.0898 17.1297 94 | v -52.0985 -27.0238 26.3832 95 | v -46.7677 -37.6854 22.5101 96 | v -45.3594 -33.4087 32.9555 97 | v -41.1912 -27.0238 41.3958 98 | v -35.8604 -37.6854 37.5227 99 | v -33.0461 -32.0898 46.2726 100 | v -26.9566 -24.8006 53.0664 101 | v -22.0994 -34.5149 49.5375 102 | v -18.2173 -28.2335 56.0673 103 | v -19.0976 -18.7969 58.7763 104 | v -9.4691 -14.0786 63.4023 105 | v 0.0610 -20.5804 61.0612 106 | v 10.1154 -15.5727 62.9220 107 | v 0.2155 -9.4695 64.0785 108 | v 18.7474 -21.5180 57.6986 109 | v 28.8011 -15.5727 56.8507 110 | v 19.7614 -9.9676 60.8193 111 | v 35.8416 -20.5804 49.4354 112 | v 44.9276 -14.0786 45.7278 113 | v 37.4901 -9.4695 51.9672 114 | v -9.3833 -24.8006 58.7763 115 | v -11.2385 -34.5149 53.0664 116 | v -0.4634 -32.0898 56.8594 117 | v 8.9926 -27.0238 57.7015 118 | v 6.9564 -37.6854 51.4347 119 | v 17.3257 -33.4087 53.3231 120 | v 26.6410 -27.0238 51.9672 121 | v 24.6048 -37.6854 45.7004 122 | v 33.7960 -32.0898 45.7278 123 | v 42.1391 -24.8006 42.0357 124 | v 40.2838 -34.5149 36.3258 125 | v 51.8746 -8.9714 -37.6891 126 | v -19.8143 -8.9714 -60.9823 127 | v -64.1205 -8.9714 0.0000 128 | v -19.8143 -8.9714 60.9823 129 | v 51.8746 -8.9714 37.6891 130 | v 0.0000 -64.6683 0.0000 131 | v -7.8590 -62.9958 -5.7099 132 | v -5.5658 -62.1596 -17.1297 133 | v 3.0019 -62.9958 -9.2388 134 | v 6.0381 -60.6763 -18.5834 135 | v 14.5714 -62.1596 -10.5868 136 | v 9.7143 -62.9958 0.0000 137 | v -13.3735 -58.2313 -22.4703 138 | v -10.7079 -54.8245 -32.9555 139 | v -2.3883 -58.2313 -26.0396 140 | v 0.8025 -53.3640 -35.0370 141 | v 9.1087 -57.7099 -28.0336 142 | v 17.2379 -58.2313 -19.6627 143 | v 19.9449 -53.3640 -28.8172 144 | v 28.0336 -54.8245 -20.3676 145 | v 24.0271 -58.2313 -10.3181 146 | v -18.3062 -48.5345 -37.5227 147 | v -15.0349 -43.2214 -46.2726 148 | v -7.2453 -48.5345 -41.1166 149 | v -3.8305 -40.9563 -49.0846 150 | v 4.0068 -47.5576 -44.1217 151 | v 11.9360 -50.9417 -36.7353 152 | v 14.6750 -42.8413 -45.1651 153 | v 22.6925 -47.5576 -38.0504 154 | v 30.0293 -48.5345 -29.0054 155 | v 31.9501 -40.9563 -37.4587 156 | v 39.3618 -43.2214 -28.5980 157 | v 36.8653 -48.5345 -19.5964 158 | v -7.8590 -62.9958 5.7099 159 | v -18.0113 -62.1596 0.0000 160 | v -15.8080 -60.6763 -11.4852 161 | v -25.5032 -58.2313 5.7752 162 | v -34.6515 -54.8245 0.0000 163 | v -25.5032 -58.2313 -5.7752 164 | v -33.0741 -53.3640 -11.5903 165 | v -23.8468 -57.7099 -17.3257 166 | v -21.2435 -53.3640 -27.8738 167 | v -41.3432 -48.5345 5.8150 168 | v -48.6539 -43.2214 0.0000 169 | v -41.3432 -48.5345 -5.8150 170 | v -47.8659 -40.9563 -11.5249 171 | v -40.7241 -47.5576 -17.4451 172 | v -31.2489 -50.9417 -22.7036 173 | v -38.4197 -42.8413 -27.9136 174 | v -29.1757 -47.5576 -33.3401 175 | v -25.7522 -40.9563 -41.9618 176 | v 3.0019 -62.9958 9.2388 177 | v -5.5658 -62.1596 17.1297 178 | v -15.8080 -60.6763 11.4852 179 | v -2.3883 -58.2313 26.0396 180 | v -10.7079 -54.8245 32.9555 181 | v -13.3735 -58.2313 22.4703 182 | v -21.2435 -53.3640 27.8738 183 | v -23.8468 -57.7099 17.3257 184 | v -33.0741 -53.3640 11.5903 185 | v -7.2453 -48.5345 41.1166 186 | v -15.0349 -43.2214 46.2726 187 | v -18.3061 -48.5345 37.5227 188 | v -25.7522 -40.9563 41.9618 189 | v -29.1757 -47.5576 33.3401 190 | v -31.2489 -50.9417 22.7036 191 | v -38.4197 -42.8413 27.9136 192 | v -40.7241 -47.5576 17.4451 193 | v -47.8659 -40.9563 11.5250 194 | v 14.5714 -62.1596 10.5868 195 | v 6.0381 -60.6763 18.5834 196 | v 24.0271 -58.2313 10.3181 197 | v 28.0336 -54.8245 20.3676 198 | v 17.2379 -58.2313 19.6627 199 | v 19.9449 -53.3640 28.8172 200 | v 9.1087 -57.7098 28.0336 201 | v 0.8026 -53.3640 35.0370 202 | v 36.8653 -48.5345 19.5964 203 | v 39.3618 -43.2214 28.5980 204 | v 30.0293 -48.5345 29.0054 205 | v 31.9501 -40.9563 37.4587 206 | v 22.6925 -47.5576 38.0504 207 | v 11.9360 -50.9417 36.7353 208 | v 14.6750 -42.8413 45.1651 209 | v 4.0068 -47.5576 44.1218 210 | v -3.8305 -40.9563 49.0846 211 | v 19.5397 -60.6763 0.0000 212 | v 33.5701 -53.3640 -10.0638 213 | v 29.4763 -57.7099 0.0000 214 | v 33.5701 -53.3640 10.0638 215 | v 45.4985 -40.9563 -18.8110 216 | v 43.2005 -47.5576 -9.8236 217 | v 38.6257 -50.9417 0.0000 218 | v 47.4894 -42.8413 0.0000 219 | v 43.2005 -47.5576 9.8236 220 | v 45.4985 -40.9563 18.8110 221 | v -63.6364 -4.8763 11.2470 222 | v -63.7493 -4.7671 10.3899 223 | v -63.1954 -4.2476 15.0472 224 | v -62.8204 -4.5531 17.9178 225 | v -61.9275 -4.7614 20.2163 226 | v -61.1658 -4.9853 22.5814 227 | v -57.3544 -5.0191 29.3072 228 | v -57.5180 -5.0481 29.0144 229 | v -59.3812 -5.1899 25.7061 230 | v -59.8842 -5.1632 24.8213 231 | v -17.6952 -4.4862 62.8610 232 | v -20.1125 -4.8751 61.8999 233 | v -9.8322 -4.3946 63.8574 234 | v -12.0092 -4.4672 63.5790 235 | v -14.9887 -4.1606 63.2192 236 | v -28.6321 -5.4517 57.9004 237 | v -29.5824 -5.2914 57.3871 238 | v -25.4193 -5.5349 59.6626 239 | v -24.1751 -5.5191 60.3479 240 | v -23.2603 -5.3491 60.8611 241 | v -65.1116 -4.7640 0.0000 242 | v -65.0642 -5.1466 3.4009 243 | v -65.1512 -4.6854 -0.7269 244 | v -65.1957 -4.7549 -2.8198 245 | v -64.7919 -4.7916 -4.9241 246 | v -63.7651 -4.4864 -10.3840 247 | v 2.2694 -4.5564 65.2404 248 | v 0.0837 -4.5166 65.1991 249 | v 10.1499 -4.8410 63.6152 250 | v 4.0113 -4.5598 64.8851 251 | v -2.3196 -4.4832 65.2965 252 | v -3.3971 -4.4501 65.0912 253 | v -21.7989 -4.1812 -61.5759 254 | v -20.1654 -4.1485 -62.0627 255 | v -22.4220 -4.1959 -61.3897 256 | v -29.6038 -4.4549 -57.4262 257 | v 44.3699 -3.9567 -47.1114 258 | v 45.5065 -3.9423 -45.8988 259 | v 39.7339 -3.4086 -52.1047 260 | v 38.4415 -3.3119 -52.9980 261 | v 52.1234 -3.1860 -39.7399 262 | v 53.0246 -3.0578 -38.4779 263 | v 53.9430 -3.3150 -37.1891 264 | v 53.9941 -3.3395 -37.0774 265 | v 57.7289 -3.3292 -29.1374 266 | v 62.5420 -4.3178 18.7550 267 | v 62.1026 -4.1846 20.0996 268 | v 62.7438 -4.3165 18.1802 269 | v 63.6657 -4.3994 10.0125 270 | v 65.1485 -5.0501 2.5454 271 | v 64.8539 -4.7879 4.0717 272 | v 64.3639 -4.5620 6.5428 273 | v 63.9026 -4.4057 8.8512 274 | v 64.9703 -5.4925 0.0000 275 | v 64.9612 -5.6586 -0.9479 276 | v 65.0572 -5.4908 -2.8503 277 | v 63.6331 -4.9209 -10.0037 278 | v 18.5580 -3.8769 -62.7269 279 | v 20.1942 -3.8300 -62.1512 280 | v 10.1524 -4.0535 -63.6660 281 | v 11.1637 -4.0309 -63.5531 282 | v 12.4532 -3.9561 -63.4122 283 | v 20.9570 -3.8115 -61.9331 284 | v 21.9706 -4.0696 -61.5761 285 | v 24.8365 -4.7715 -59.8994 286 | v 29.2167 -3.8217 -57.4869 287 | v 33.2003 -3.1047 -55.7238 288 | v 36.4863 -3.1799 -54.2226 289 | v 37.4422 -3.2264 -53.7842 290 | v 6.7270 -4.1248 -64.3598 291 | v 2.0411 -4.2358 -65.3079 292 | v 0.0777 -4.2898 -65.2504 293 | v -53.7730 -3.2528 -37.4586 294 | v -52.9735 -3.2640 -38.4875 295 | v -56.9967 -5.3267 -30.0458 296 | v -57.3235 -5.5301 -29.2954 297 | v -52.9055 -3.3566 -38.5498 298 | v -52.1079 -3.4864 -39.6681 299 | v -47.9960 -3.9156 -43.3921 300 | v -45.6299 -4.1908 -45.5326 301 | v -33.7417 -4.6517 -55.4745 302 | v -35.1356 -4.5917 -54.8245 303 | v -36.4615 -4.5418 -54.2057 304 | v -38.3983 -4.4495 -52.7113 305 | v -40.1006 -4.3736 -51.5543 306 | v -43.8088 -4.4465 -47.4973 307 | v -41.2079 -4.3093 -50.3510 308 | v -42.1534 -5.5220 49.2036 309 | v -45.5965 -5.0132 45.4912 310 | v -40.4903 -5.2348 51.0472 311 | v -38.3430 -4.9447 52.6129 312 | v -45.7568 -4.9842 45.3470 313 | v -49.4857 -5.0142 41.9332 314 | v -51.4422 -4.6459 40.1757 315 | v -52.7624 -4.4075 38.3341 316 | v 12.8408 -5.2409 63.2849 317 | v 16.6718 -5.7082 62.8213 318 | v 17.2745 -5.6550 62.7566 319 | v 20.0876 -5.3411 61.8233 320 | v 22.5711 -5.0808 61.1607 321 | v 29.1903 -4.5681 57.4465 322 | v 28.2327 -4.5566 57.9901 323 | v 26.5469 -4.5444 58.9467 324 | v 63.3615 -4.7311 -12.5038 325 | v 63.4024 -4.7360 -12.1414 326 | v 63.4320 -4.7671 -11.8623 327 | v 62.7479 -4.5227 -18.0271 328 | v 62.0449 -4.4634 -20.0731 329 | v -11.2382 -4.0177 -63.6995 330 | v -9.8423 -4.1256 -63.8700 331 | v -18.0272 -4.0991 -62.8391 332 | v -61.9080 -4.8487 -20.2124 333 | v -62.8143 -4.4098 -18.0281 334 | v -63.4461 -4.3372 -13.0020 335 | v -62.9895 -4.1434 -16.7404 336 | v -58.3850 -6.0895 -27.3484 337 | v -58.8775 -6.0984 -26.4776 338 | v -61.0014 -5.3766 -22.8209 339 | v 54.2896 -4.4027 36.3209 340 | v 52.7373 -4.4443 38.3159 341 | v 57.7066 -4.0029 29.1036 342 | v 55.4927 -4.4265 33.7599 343 | v 54.6843 -4.3577 35.4872 344 | v 47.6012 -4.2109 43.9126 345 | v 45.5272 -3.7318 45.8931 346 | v 50.7090 -4.5041 40.9747 347 | v 51.2492 -4.5093 40.4673 348 | v 39.6872 -3.3128 52.1620 349 | v 37.7005 -4.1160 53.2683 350 | v 42.9243 -3.1102 48.7211 351 | v 58.4431 -3.8992 27.7798 352 | v 53.9778 -3.9381 32.2451 353 | v 61.5885 -3.9936 22.0667 354 | v 61.6422 -4.0088 21.8652 355 | v 54.3367 -4.8112 14.5597 356 | v 60.9325 -3.9125 23.2649 357 | v 45.3146 -4.3123 23.5818 358 | v 63.3588 -4.4870 5.5376 359 | v 55.0543 -4.6956 -20.8111 360 | v 46.0322 -4.9199 -11.7889 361 | v 54.6955 -5.8199 -3.1257 362 | v 46.3910 -5.5953 -29.4743 363 | v 58.1603 -3.3152 -28.3569 364 | v 59.7401 -3.2783 -25.4968 365 | v 37.7278 -3.9366 -38.1376 366 | v 29.0645 -4.0357 -46.8009 367 | v 20.4012 -3.3913 -55.4641 368 | v 2.7159 -4.3836 -55.1053 369 | v 11.3791 -4.1117 -46.4420 370 | v -4.7568 -4.4462 -64.8300 371 | v -4.9129 -4.3900 -64.8031 372 | v -5.9474 -4.4765 -63.7686 373 | v -2.2312 -4.3645 -65.3199 374 | v -0.5462 -4.3063 -65.2700 375 | v -6.6500 -4.3543 -64.4712 376 | v -32.6549 -4.6322 -54.3876 377 | v -41.6770 -4.1340 -45.3655 378 | v -50.6991 -3.0922 -36.3434 379 | v -51.0579 -4.2918 -18.6580 380 | v -42.0358 -3.5956 -27.6801 381 | v -60.0800 -4.5917 -9.6359 382 | v -60.4388 -5.3313 8.0494 383 | v -51.4167 -3.6759 -0.9727 384 | v -51.7756 -3.7388 16.7127 385 | v -52.1344 -4.5958 34.3981 386 | v -43.1123 -3.6538 25.3760 387 | v -56.2715 -4.7703 31.7274 388 | v -54.1497 -4.6433 36.4134 389 | v -43.4711 -6.2131 43.0613 390 | v -36.8986 -4.7065 53.8154 391 | v -34.8079 -4.8104 51.7246 392 | v -31.9521 -4.8641 56.3011 393 | v -36.3315 -4.7227 54.2561 394 | v -17.1225 -3.5309 51.3658 395 | v -25.7858 -4.1551 42.7025 396 | v -8.4592 -3.9955 60.0290 397 | v 9.2261 -4.2670 59.6702 398 | v 18.2482 -4.3242 50.6481 399 | v 35.9336 -4.5717 50.2893 400 | v 32.7237 -4.6196 55.8343 401 | v 44.9557 -3.9077 41.2672 402 | v 36.2924 -4.7033 32.6039 403 | v 27.2703 -5.1482 41.6260 404 | v 27.6292 -4.5203 23.9406 405 | v 18.6071 -3.2397 32.9627 406 | v 36.6513 -3.4879 14.9185 407 | v 27.9880 -5.0468 6.2553 408 | v 18.9659 -4.5818 15.2774 409 | v 45.6734 -5.2538 5.8964 410 | v 37.0101 -5.4760 -2.7668 411 | v 28.3468 -4.2802 -11.4301 412 | v 19.3247 -4.6400 -2.4080 413 | v 37.3689 -3.8967 -20.4522 414 | v 28.7057 -5.8477 -29.1155 415 | v 19.6836 -2.6822 -20.0934 416 | v 20.0424 -4.1800 -37.7788 417 | v 11.0203 -3.6892 -28.7567 418 | v 2.3570 -3.2938 -37.4199 419 | v -6.3062 -5.1915 -46.0832 420 | v -14.9695 -4.4603 -54.7465 421 | v -23.9916 -3.2077 -45.7244 422 | v -15.3283 -3.2720 -37.0611 423 | v -33.0137 -5.2448 -36.7022 424 | v -24.3504 -5.1178 -28.0390 425 | v -33.3725 -1.8486 -19.0169 426 | v -24.7093 -4.4357 -10.3536 427 | v -15.6872 -3.2951 -19.3757 428 | v -42.3946 -4.5353 -9.9948 429 | v -33.7314 -5.3602 -1.3315 430 | v -42.7535 -3.7971 7.6906 431 | v -34.0902 -4.3955 16.3539 432 | v -25.0681 -4.2343 7.3318 433 | v -25.4269 -4.6374 25.0171 434 | v -16.4048 -4.1870 15.9950 435 | v -34.4490 -5.8996 34.0392 436 | v -16.7637 -4.1767 33.6804 437 | v -8.1004 -5.3523 42.3437 438 | v 0.5629 -4.3957 51.0069 439 | v 9.5850 -4.9841 41.9848 440 | v 0.9217 -5.4012 33.3216 441 | v 9.9438 -4.5652 24.2995 442 | v 1.2805 -4.4878 15.6362 443 | v -7.7416 -3.8792 24.6583 444 | v 10.3026 -3.9102 6.6141 445 | v 1.6394 -4.3902 -2.0492 446 | v -7.3827 -4.4009 6.9729 447 | v 10.6615 -3.0878 -11.0713 448 | v 1.9982 -4.5490 -19.7345 449 | v -7.0239 -5.1514 -10.7124 450 | v -6.6651 -4.4602 -28.3978 451 | v -16.0460 -4.7553 -1.6903 452 | v 61.7630 -4.4313 -21.0917 453 | v 61.5258 -4.1435 -22.1638 454 | # 444 vertices 455 | 456 | vn 0.9189 -0.2621 0.2947 457 | vn 0.9619 -0.2733 0.0000 458 | vn 0.9189 -0.2621 -0.2947 459 | vn 0.8047 -0.3431 0.4844 460 | vn 0.7784 -0.4811 0.4034 461 | vn 0.8640 -0.3674 0.3442 462 | vn 0.8977 -0.3830 0.2179 463 | vn 0.8425 -0.5207 0.1380 464 | vn 0.9179 -0.3913 0.0657 465 | vn 0.9179 -0.3913 -0.0657 466 | vn 0.8425 -0.5207 -0.1380 467 | vn 0.8977 -0.3830 -0.2179 468 | vn 0.8640 -0.3674 -0.3442 469 | vn 0.7784 -0.4811 -0.4034 470 | vn 0.8047 -0.3431 -0.4844 471 | vn 0.5643 -0.2621 -0.7829 472 | vn 0.2973 -0.2733 -0.9149 473 | vn 0.0037 -0.2621 -0.9650 474 | vn 0.7094 -0.3431 -0.6156 475 | vn 0.6241 -0.4811 -0.6156 476 | vn 0.5944 -0.3674 -0.7154 477 | vn 0.4846 -0.3830 -0.7864 478 | vn 0.3916 -0.5207 -0.7587 479 | vn 0.3461 -0.3913 -0.8527 480 | vn 0.2211 -0.3913 -0.8933 481 | vn 0.1292 -0.5207 -0.8439 482 | vn 0.0702 -0.3830 -0.9211 483 | vn -0.0604 -0.3674 -0.9281 484 | vn -0.1431 -0.4811 -0.8649 485 | vn -0.2121 -0.3431 -0.9150 486 | vn -0.5702 -0.2621 -0.7786 487 | vn -0.7782 -0.2733 -0.5654 488 | vn -0.9167 -0.2621 -0.3017 489 | vn -0.3663 -0.3431 -0.8649 490 | vn -0.3926 -0.4811 -0.7838 491 | vn -0.4967 -0.3674 -0.7864 492 | vn -0.5982 -0.3830 -0.7039 493 | vn -0.6005 -0.5207 -0.6068 494 | vn -0.7040 -0.3913 -0.5927 495 | vn -0.7812 -0.3913 -0.4864 496 | vn -0.7627 -0.5207 -0.3836 497 | vn -0.8543 -0.3830 -0.3514 498 | vn -0.9014 -0.3674 -0.2294 499 | vn -0.8668 -0.4811 -0.1312 500 | vn -0.9358 -0.3431 -0.0811 501 | vn -0.9167 -0.2621 0.3017 502 | vn -0.7782 -0.2733 0.5654 503 | vn -0.5702 -0.2621 0.7786 504 | vn -0.9358 -0.3431 0.0811 505 | vn -0.8668 -0.4811 0.1312 506 | vn -0.9014 -0.3674 0.2294 507 | vn -0.8543 -0.3830 0.3514 508 | vn -0.7627 -0.5207 0.3836 509 | vn -0.7812 -0.3913 0.4864 510 | vn -0.7040 -0.3913 0.5927 511 | vn -0.6005 -0.5207 0.6068 512 | vn -0.5982 -0.3830 0.7039 513 | vn -0.4967 -0.3674 0.7864 514 | vn -0.3926 -0.4811 0.7838 515 | vn -0.3663 -0.3431 0.8649 516 | vn 0.0037 -0.2621 0.9650 517 | vn 0.2973 -0.2733 0.9149 518 | vn 0.5643 -0.2621 0.7829 519 | vn -0.2121 -0.3431 0.9150 520 | vn -0.1431 -0.4811 0.8649 521 | vn -0.0604 -0.3674 0.9281 522 | vn 0.0702 -0.3830 0.9211 523 | vn 0.1292 -0.5207 0.8439 524 | vn 0.2211 -0.3913 0.8933 525 | vn 0.3461 -0.3913 0.8527 526 | vn 0.3916 -0.5207 0.7587 527 | vn 0.4846 -0.3830 0.7864 528 | vn 0.5944 -0.3674 0.7154 529 | vn 0.6241 -0.4811 0.6156 530 | vn 0.7094 -0.3431 0.6156 531 | vn 0.7874 -0.2298 -0.5721 532 | vn -0.3008 -0.2298 -0.9256 533 | vn -0.9732 -0.2298 0.0000 534 | vn -0.3007 -0.2298 0.9256 535 | vn 0.7874 -0.2298 0.5721 536 | vn -0.0426 -0.9904 -0.1312 537 | vn 0.0710 -0.9732 -0.2185 538 | vn 0.1116 -0.9904 -0.0811 539 | vn -0.1246 -0.9150 -0.3836 540 | vn -0.0091 -0.8782 -0.4783 541 | vn 0.0304 -0.9391 -0.3423 542 | vn 0.1766 -0.9391 -0.2948 543 | vn 0.2885 -0.8782 -0.3816 544 | vn 0.3263 -0.9150 -0.2371 545 | vn -0.1972 -0.7700 -0.6068 546 | vn -0.0809 -0.7047 -0.7049 547 | vn -0.0440 -0.8098 -0.5850 548 | vn 0.0958 -0.8278 -0.5528 549 | vn 0.2085 -0.7382 -0.6416 550 | vn 0.2474 -0.8278 -0.5035 551 | vn 0.3795 -0.8098 -0.4474 552 | vn 0.4797 -0.7047 -0.5227 553 | vn 0.5162 -0.7700 -0.3750 554 | vn -0.2547 -0.5663 -0.7838 555 | vn -0.1065 -0.6085 -0.7864 556 | vn 0.0227 -0.6316 -0.7750 557 | vn 0.1725 -0.6460 -0.7436 558 | vn 0.2975 -0.6460 -0.7030 559 | vn 0.4372 -0.6316 -0.6403 560 | vn 0.5483 -0.6085 -0.5736 561 | vn 0.6668 -0.5663 -0.4844 562 | vn -0.1380 -0.9904 0.0000 563 | vn -0.1859 -0.9732 -0.1350 564 | vn -0.4034 -0.9150 0.0000 565 | vn -0.4577 -0.8782 -0.1392 566 | vn -0.3162 -0.9391 -0.1347 567 | vn -0.2258 -0.9391 -0.2591 568 | vn -0.2738 -0.8782 -0.3923 569 | vn -0.6381 -0.7700 0.0000 570 | vn -0.6954 -0.7047 -0.1409 571 | vn -0.5700 -0.8098 -0.1389 572 | vn -0.4961 -0.8278 -0.2619 573 | vn -0.5458 -0.7382 -0.3965 574 | vn -0.4024 -0.8278 -0.3909 575 | vn -0.3083 -0.8098 -0.4992 576 | vn -0.3489 -0.7047 -0.6178 577 | vn -0.8242 -0.5663 -0.0000 578 | vn -0.7808 -0.6085 -0.1418 579 | vn -0.7300 -0.6316 -0.2610 580 | vn -0.6539 -0.6460 -0.3939 581 | vn -0.5766 -0.6460 -0.5002 582 | vn -0.4739 -0.6316 -0.6136 583 | vn -0.3761 -0.6085 -0.6987 584 | vn -0.0426 -0.9904 0.1312 585 | vn -0.1859 -0.9732 0.1350 586 | vn -0.1246 -0.9150 0.3836 587 | vn -0.2738 -0.8782 0.3923 588 | vn -0.2258 -0.9391 0.2591 589 | vn -0.3162 -0.9391 0.1347 590 | vn -0.4577 -0.8782 0.1392 591 | vn -0.1972 -0.7700 0.6068 592 | vn -0.3489 -0.7047 0.6178 593 | vn -0.3083 -0.8098 0.4992 594 | vn -0.4024 -0.8278 0.3909 595 | vn -0.5458 -0.7382 0.3965 596 | vn -0.4961 -0.8278 0.2619 597 | vn -0.5700 -0.8098 0.1389 598 | vn -0.6954 -0.7047 0.1409 599 | vn -0.2547 -0.5663 0.7838 600 | vn -0.3761 -0.6085 0.6987 601 | vn -0.4739 -0.6316 0.6136 602 | vn -0.5766 -0.6460 0.5002 603 | vn -0.6539 -0.6460 0.3939 604 | vn -0.7300 -0.6316 0.2610 605 | vn -0.7808 -0.6085 0.1418 606 | vn 0.1116 -0.9904 0.0811 607 | vn 0.0710 -0.9732 0.2185 608 | vn 0.3263 -0.9150 0.2371 609 | vn 0.2885 -0.8782 0.3816 610 | vn 0.1766 -0.9391 0.2948 611 | vn 0.0304 -0.9391 0.3423 612 | vn -0.0091 -0.8782 0.4783 613 | vn 0.5162 -0.7700 0.3750 614 | vn 0.4797 -0.7047 0.5227 615 | vn 0.3795 -0.8098 0.4474 616 | vn 0.2474 -0.8278 0.5035 617 | vn 0.2085 -0.7382 0.6416 618 | vn 0.0958 -0.8278 0.5528 619 | vn -0.0440 -0.8098 0.5850 620 | vn -0.0809 -0.7047 0.7049 621 | vn 0.6668 -0.5663 0.4844 622 | vn 0.5483 -0.6085 0.5736 623 | vn 0.4372 -0.6316 0.6403 624 | vn 0.2975 -0.6460 0.7030 625 | vn 0.1725 -0.6460 0.7436 626 | vn 0.0227 -0.6316 0.7750 627 | vn -0.1065 -0.6085 0.7864 628 | vn 0.2298 -0.9732 0.0000 629 | vn 0.4521 -0.8782 -0.1564 630 | vn 0.3350 -0.9391 -0.0769 631 | vn 0.3350 -0.9391 0.0769 632 | vn 0.4521 -0.8782 0.1564 633 | vn 0.6454 -0.7047 -0.2947 634 | vn 0.5428 -0.8098 -0.2226 635 | vn 0.5553 -0.8278 -0.0797 636 | vn 0.6746 -0.7382 -0.0000 637 | vn 0.5553 -0.8278 0.0797 638 | vn 0.5428 -0.8098 0.2226 639 | vn 0.6454 -0.7047 0.2947 640 | vn 0.7150 -0.6085 -0.3442 641 | vn 0.7440 -0.6316 -0.2179 642 | vn 0.7605 -0.6460 -0.0657 643 | vn 0.7605 -0.6460 0.0657 644 | vn 0.7440 -0.6316 0.2179 645 | vn 0.7150 -0.6085 0.3442 646 | vn -0.9909 -0.0531 0.1238 647 | vn -0.9488 -0.1664 0.2686 648 | vn -0.9159 -0.2196 0.3359 649 | vn -0.9342 -0.2212 0.2799 650 | vn -0.8684 -0.0638 0.4918 651 | vn -0.3276 -0.2292 0.9166 652 | vn -0.1250 -0.0512 0.9908 653 | vn -0.4813 -0.0512 0.8751 654 | vn -0.2738 -0.2292 0.9341 655 | vn -0.9749 -0.2216 -0.0213 656 | vn -0.9810 -0.0512 0.1873 657 | vn -0.9730 -0.2292 0.0283 658 | vn -0.9810 -0.0512 -0.1873 659 | vn -0.0225 -0.2212 0.9750 660 | vn 0.1994 -0.0638 0.9778 661 | vn -0.1885 -0.0531 0.9806 662 | vn 0.0365 -0.2196 0.9749 663 | vn -0.2738 -0.2292 -0.9341 664 | vn -0.3918 -0.1325 -0.9104 665 | vn 0.7289 -0.0531 -0.6826 666 | vn 0.5435 -0.2196 -0.8101 667 | vn 0.8037 -0.2292 -0.5491 668 | vn 0.6836 -0.0513 -0.7281 669 | vn 0.7705 -0.2292 -0.5948 670 | vn 0.9037 -0.0512 -0.4250 671 | vn 0.9203 -0.2212 0.3227 672 | vn 0.9711 -0.1296 0.2006 673 | vn 0.9777 -0.0644 0.1998 674 | vn 0.9745 -0.2224 -0.0296 675 | vn 0.9745 -0.2224 0.0296 676 | vn 0.9858 -0.1354 -0.0995 677 | vn 0.3293 -0.2224 -0.9177 678 | vn 0.1121 -0.0644 -0.9916 679 | vn 0.2730 -0.2224 -0.9360 680 | vn 0.4921 -0.0644 -0.8681 681 | vn 0.4135 -0.0638 -0.9083 682 | vn 0.5913 -0.2212 -0.7756 683 | vn 0.1994 -0.0638 -0.9778 684 | vn -0.0225 -0.2212 -0.9750 685 | vn -0.7710 -0.2224 -0.5967 686 | vn -0.9084 -0.0644 -0.4131 687 | vn -0.8058 -0.2224 -0.5489 688 | vn -0.6736 -0.0644 -0.7363 689 | vn -0.4239 -0.0531 -0.9041 690 | vn -0.5734 -0.1904 -0.7969 691 | vn -0.6025 -0.2196 -0.7673 692 | vn -0.5549 -0.2212 -0.8020 693 | vn -0.7361 -0.0638 -0.6739 694 | vn -0.7361 -0.0638 0.6739 695 | vn -0.5549 -0.2212 0.8020 696 | vn -0.6736 -0.0644 0.7363 697 | vn -0.7749 -0.1796 0.6061 698 | vn -0.8058 -0.2224 0.5489 699 | vn 0.1121 -0.0644 0.9916 700 | vn 0.3117 -0.2095 0.9268 701 | vn 0.3293 -0.2224 0.9177 702 | vn 0.2730 -0.2224 0.9360 703 | vn 0.4921 -0.0644 0.8681 704 | vn 0.9916 -0.0637 -0.1126 705 | vn 0.9916 -0.0638 -0.1126 706 | vn 0.9203 -0.2212 -0.3227 707 | vn -0.1250 -0.0512 -0.9908 708 | vn -0.3276 -0.2292 -0.9166 709 | vn -0.9159 -0.2196 -0.3359 710 | vn -0.9909 -0.0531 -0.1238 711 | vn -0.8684 -0.0638 -0.4918 712 | vn -0.9164 -0.1606 -0.3666 713 | vn -0.9342 -0.2212 -0.2799 714 | vn 0.7705 -0.2292 0.5948 715 | vn 0.9037 -0.0512 0.4250 716 | vn 0.6835 -0.0512 0.7282 717 | vn 0.7943 -0.2116 0.5695 718 | vn 0.8038 -0.2292 0.5490 719 | vn 0.5431 -0.2195 0.8105 720 | vn 0.7289 -0.0531 0.6826 721 | vn 0.1529 0.9750 0.1614 722 | vn -0.0272 0.9962 -0.0823 723 | vn -0.0268 0.9978 -0.0605 724 | vn -0.0259 0.9995 -0.0172 725 | vn -0.0393 0.9991 -0.0181 726 | vn -0.0081 0.9948 -0.1012 727 | vn -0.0519 0.9985 -0.0160 728 | vn 0.1369 0.9886 -0.0632 729 | vn -0.0103 0.9998 0.0146 730 | vn -0.0083 0.9937 0.1115 731 | vn -0.1978 0.9759 0.0918 732 | vn -0.1982 0.9754 0.0969 733 | vn -0.0549 0.9709 0.2333 734 | vn -0.0586 0.9965 -0.0594 735 | vn -0.0505 0.9704 0.2363 736 | vn -0.0029 0.9937 0.1117 737 | vn -0.0053 1.0000 -0.0062 738 | vn -0.0277 0.9463 -0.3222 739 | vn -0.0204 0.9953 0.0944 740 | vn -0.0563 0.9983 -0.0146 741 | vn -0.0555 0.9982 0.0242 742 | vn -0.0051 0.9997 0.0229 743 | vn -0.0243 0.9996 0.0174 744 | vn -0.0270 0.9995 0.0163 745 | vn -0.0342 0.9994 -0.0098 746 | vn 0.0447 0.9908 0.1276 747 | vn -0.0380 0.9991 0.0201 748 | vn -0.0054 0.9994 -0.0356 749 | vn 0.0229 0.9990 -0.0374 750 | vn 0.0221 0.9992 -0.0330 751 | vn -0.0022 0.9931 -0.1168 752 | vn -0.0033 0.9927 -0.1205 753 | vn -0.0085 0.9906 -0.1367 754 | vn -0.1173 0.9762 0.1826 755 | vn 0.4591 0.7028 -0.5434 756 | vn -0.1519 0.9855 -0.0758 757 | vn -0.1438 0.9692 0.2001 758 | vn 0.0211 0.9983 0.0543 759 | vn -0.0208 0.9785 -0.2053 760 | vn 0.0166 0.9981 0.0589 761 | vn -0.0738 0.9968 -0.0315 762 | vn -0.0731 0.9910 0.1123 763 | vn -0.0725 0.9966 0.0402 764 | vn 0.1281 0.9901 -0.0574 765 | vn -0.0607 0.9917 0.1135 766 | vn -0.0205 0.9868 -0.1609 767 | vn -0.0938 0.9955 0.0102 768 | vn -0.0920 0.9924 0.0823 769 | vn 0.0337 0.9925 -0.1171 770 | vn -0.0349 0.9993 -0.0113 771 | vn 0.2106 0.9736 -0.0881 772 | vn 0.0551 0.9977 -0.0389 773 | vn 0.1982 0.9800 -0.0153 774 | vn -0.0668 0.9910 -0.1161 775 | vn -0.0625 0.9932 -0.0983 776 | vn 0.0523 0.9911 -0.1227 777 | vn 0.3253 0.9294 -0.1744 778 | vn 0.2358 0.9623 -0.1358 779 | vn 0.0378 0.9992 -0.0118 780 | vn -0.0677 0.9832 0.1698 781 | vn -0.0722 0.9974 0.0003 782 | vn -0.0984 0.9837 -0.1506 783 | vn 0.0756 0.9758 0.2053 784 | vn -0.0925 0.9850 0.1454 785 | vn -0.0190 0.9951 0.0969 786 | vn 0.0981 0.9878 0.1208 787 | vn -0.0765 0.9917 0.1028 788 | vn 0.1355 0.9823 0.1292 789 | vn 0.0252 0.9994 0.0232 790 | vn -0.1363 0.9882 -0.0703 791 | vn -0.2713 0.9573 -0.0999 792 | vn 0.1713 0.9835 -0.0585 793 | vn -0.2376 0.9569 -0.1671 794 | vn 0.1970 0.9768 0.0835 795 | vn 0.1078 0.9887 0.1045 796 | vn 0.1036 0.9946 0.0104 797 | vn -0.0437 0.9988 -0.0237 798 | vn -0.0701 0.9975 -0.0088 799 | vn 0.0832 0.9958 0.0370 800 | vn -0.0103 0.9976 0.0683 801 | vn -0.0623 0.9976 -0.0310 802 | vn 0.0094 0.9937 -0.1115 803 | vn 0.0198 0.9996 0.0193 804 | vn 0.0481 0.9979 0.0442 805 | vn 0.0378 0.9953 0.0896 806 | vn 0.0665 0.9940 -0.0868 807 | vn -0.0143 0.9999 -0.0025 808 | vn 0.1191 0.9895 -0.0814 809 | vn -0.0116 0.9947 0.1017 810 | vn 0.0496 0.9985 -0.0229 811 | vn -0.0034 0.9990 0.0445 812 | vn -0.0621 0.9961 -0.0626 813 | vn -0.0035 0.9992 0.0403 814 | vn 0.1100 0.9918 -0.0644 815 | vn -0.1082 0.9886 0.1046 816 | vn 0.0805 0.9792 -0.1864 817 | vn 0.0807 0.9961 -0.0368 818 | vn -0.0016 0.9809 0.1947 819 | vn 0.0939 0.9948 -0.0396 820 | vn 0.0236 0.9983 -0.0540 821 | vn 0.0370 0.9993 -0.0074 822 | vn -0.0113 0.9997 0.0226 823 | vn 0.0571 0.9947 0.0858 824 | vn -0.0975 0.9948 -0.0291 825 | vn -0.1166 0.9912 -0.0634 826 | vn 0.0668 0.9972 -0.0351 827 | vn 0.0472 0.9960 -0.0755 828 | vn -0.0219 0.9981 -0.0572 829 | vn -0.1209 0.9924 0.0211 830 | vn 0.0398 0.9978 0.0523 831 | vn 0.0061 0.9993 0.0371 832 | vn -0.0276 0.9996 0.0050 833 | vn 0.0151 0.9988 0.0468 834 | vn -0.1161 0.9932 -0.0113 835 | vn -0.1056 0.9938 -0.0359 836 | vn 0.0715 0.9966 0.0404 837 | vn -0.0420 0.9967 0.0699 838 | vn -0.0215 0.9989 -0.0428 839 | vn 0.0420 0.9957 0.0831 840 | vn 0.0088 0.9995 -0.0319 841 | vn 0.0164 0.9994 -0.0291 842 | vn 0.0705 0.9939 0.0842 843 | vn -0.0049 0.9992 -0.0406 844 | vn 0.0105 0.9981 0.0614 845 | vn -0.0429 0.9991 -0.0015 846 | vn -0.0344 0.9993 -0.0121 847 | vn -0.1357 0.9895 0.0498 848 | vn -0.0371 0.9993 0.0005 849 | vn 0.0004 0.9991 -0.0413 850 | vn -0.0516 0.9981 0.0335 851 | vn 0.0691 0.9914 0.1112 852 | vn 0.0641 0.9979 -0.0020 853 | vn 0.0735 0.9960 -0.0515 854 | vn -0.0041 0.9971 -0.0758 855 | vn 0.0142 0.9998 0.0123 856 | vn 0.0124 0.9968 -0.0787 857 | vn 0.0168 0.9972 0.0728 858 | vn 0.0155 0.9998 0.0080 859 | vn 0.0757 0.9866 0.1443 860 | vn -0.0864 0.9963 0.0018 861 | vn -0.0039 0.9994 -0.0349 862 | vn 0.1202 0.9924 -0.0278 863 | vn -0.0087 0.9987 0.0495 864 | vn -0.0117 0.9949 -0.1004 865 | vn 0.0443 0.9983 -0.0372 866 | vn -0.0444 0.9973 -0.0578 867 | vn 0.8744 -0.0531 0.4823 868 | vn 0.9117 -0.1282 0.3904 869 | vn 0.9385 -0.2196 0.2666 870 | vn 0.0365 -0.2196 -0.9749 871 | vn -0.0271 -0.1741 -0.9844 872 | vn -0.1885 -0.0531 -0.9806 873 | vn -0.9084 -0.0644 0.4131 874 | vn -0.7736 -0.2195 0.5944 875 | vn 0.4427 -0.0756 0.8935 876 | vn 0.5880 -0.2128 0.7804 877 | vn 0.9385 -0.2196 -0.2666 878 | vn 0.9106 -0.1256 -0.3938 879 | vn 0.8744 -0.0531 -0.4823 880 | vn -0.6025 -0.2196 0.7673 881 | vn -0.4239 -0.0531 0.9041 882 | vn 0.0261 0.9851 -0.1698 883 | vn 0.0211 0.9848 -0.1727 884 | vn -0.0339 0.9957 0.0861 885 | vn -0.0269 0.9640 0.2647 886 | vn -0.0376 0.9984 0.0419 887 | vn 0.2599 0.9648 -0.0403 888 | vn -0.0056 0.9979 -0.0653 889 | vn 0.0872 0.9925 0.0854 890 | vn -0.0060 0.9989 0.0469 891 | vn 0.0361 0.9973 0.0643 892 | # 436 vertex normals 893 | 894 | vt 0.4264 0.4253 65.9110 895 | vt 0.4502 0.3915 65.9110 896 | vt 0.4754 0.4179 65.9110 897 | vt 0.4506 0.4477 65.9110 898 | vt 0.5000 0.3865 65.9110 899 | vt 0.5246 0.4179 65.9110 900 | vt 0.5000 0.4453 65.9110 901 | vt 0.5498 0.3915 65.9110 902 | vt 0.5736 0.4253 65.9110 903 | vt 0.5494 0.4477 65.9110 904 | vt 0.4000 0.4010 65.9110 905 | vt 0.4000 0.3524 65.9110 906 | vt 0.4250 0.3697 65.9110 907 | vt 0.4162 0.3160 65.9110 908 | vt 0.4487 0.3312 65.9110 909 | vt 0.4747 0.3576 65.9110 910 | vt 0.4710 0.2966 65.9110 911 | vt 0.5000 0.3238 65.9110 912 | vt 0.5253 0.3576 65.9110 913 | vt 0.5290 0.2966 65.9110 914 | vt 0.5513 0.3312 65.9110 915 | vt 0.5750 0.3697 65.9110 916 | vt 0.5838 0.3160 65.9110 917 | vt 0.6000 0.3524 65.9110 918 | vt 0.6000 0.4010 65.9110 919 | vt 0.6264 0.4253 65.9110 920 | vt 0.6502 0.3915 65.9110 921 | vt 0.6754 0.4179 65.9110 922 | vt 0.6506 0.4477 65.9110 923 | vt 0.7000 0.3865 65.9110 924 | vt 0.7246 0.4179 65.9110 925 | vt 0.7000 0.4453 65.9110 926 | vt 0.7498 0.3915 65.9110 927 | vt 0.7736 0.4253 65.9110 928 | vt 0.7494 0.4477 65.9110 929 | vt 0.6250 0.3697 65.9110 930 | vt 0.6162 0.3160 65.9110 931 | vt 0.6487 0.3312 65.9110 932 | vt 0.6747 0.3576 65.9110 933 | vt 0.6710 0.2966 65.9110 934 | vt 0.7000 0.3238 65.9110 935 | vt 0.7253 0.3576 65.9110 936 | vt 0.7290 0.2966 65.9110 937 | vt 0.7513 0.3312 65.9110 938 | vt 0.7750 0.3697 65.9110 939 | vt 0.7838 0.3160 65.9110 940 | vt 0.8000 0.3524 65.9110 941 | vt 0.8000 0.4010 65.9110 942 | vt 0.8264 0.4253 65.9110 943 | vt 0.8502 0.3915 65.9110 944 | vt 0.8754 0.4179 65.9110 945 | vt 0.8506 0.4477 65.9110 946 | vt 0.9000 0.3865 65.9110 947 | vt 0.9246 0.4179 65.9110 948 | vt 0.9000 0.4453 65.9110 949 | vt 0.9498 0.3915 65.9110 950 | vt 0.9736 0.4253 65.9110 951 | vt 0.9494 0.4477 65.9110 952 | vt 0.8250 0.3697 65.9110 953 | vt 0.8162 0.3160 65.9110 954 | vt 0.8487 0.3312 65.9110 955 | vt 0.8747 0.3576 65.9110 956 | vt 0.8710 0.2966 65.9110 957 | vt 0.9000 0.3238 65.9110 958 | vt 0.9253 0.3576 65.9110 959 | vt 0.9290 0.2966 65.9110 960 | vt 0.9513 0.3312 65.9110 961 | vt 0.9735 0.3680 65.9110 962 | vt -0.0487 0.3312 65.9110 963 | vt -0.0162 0.3160 65.9110 964 | vt 0.0000 0.3524 65.9110 965 | vt -0.0250 0.3697 65.9110 966 | vt 0.0000 0.4010 65.9110 967 | vt -0.0264 0.4253 65.9110 968 | vt 0.0264 0.4253 65.9110 969 | vt 0.0502 0.3915 65.9110 970 | vt 0.0754 0.4179 65.9110 971 | vt 0.0506 0.4477 65.9110 972 | vt 0.1000 0.3865 65.9110 973 | vt 0.1246 0.4179 65.9110 974 | vt 0.1000 0.4453 65.9110 975 | vt 0.1498 0.3915 65.9110 976 | vt 0.1736 0.4253 65.9110 977 | vt 0.1494 0.4477 65.9110 978 | vt 0.0250 0.3697 65.9110 979 | vt 0.0162 0.3160 65.9110 980 | vt 0.0487 0.3312 65.9110 981 | vt 0.0747 0.3576 65.9110 982 | vt 0.0710 0.2966 65.9110 983 | vt 0.1000 0.3238 65.9110 984 | vt 0.1253 0.3576 65.9110 985 | vt 0.1290 0.2966 65.9110 986 | vt 0.1513 0.3312 65.9110 987 | vt 0.1750 0.3697 65.9110 988 | vt 0.1838 0.3160 65.9110 989 | vt 0.2000 0.3524 65.9110 990 | vt 0.2000 0.4010 65.9110 991 | vt 0.2264 0.4253 65.9110 992 | vt 0.2502 0.3915 65.9110 993 | vt 0.2754 0.4179 65.9110 994 | vt 0.2506 0.4477 65.9110 995 | vt 0.3000 0.3865 65.9110 996 | vt 0.3246 0.4179 65.9110 997 | vt 0.3000 0.4453 65.9110 998 | vt 0.3498 0.3915 65.9110 999 | vt 0.3736 0.4253 65.9110 1000 | vt 0.3494 0.4477 65.9110 1001 | vt 0.2250 0.3697 65.9110 1002 | vt 0.2162 0.3160 65.9110 1003 | vt 0.2487 0.3312 65.9110 1004 | vt 0.2747 0.3576 65.9110 1005 | vt 0.2710 0.2966 65.9110 1006 | vt 0.3000 0.3238 65.9110 1007 | vt 0.3253 0.3576 65.9110 1008 | vt 0.3290 0.2966 65.9110 1009 | vt 0.3513 0.3312 65.9110 1010 | vt 0.3750 0.3697 65.9110 1011 | vt 0.3838 0.3160 65.9110 1012 | vt 0.6000 0.4502 65.9110 1013 | vt 0.8000 0.4502 65.9110 1014 | vt 0.0000 0.4502 65.9110 1015 | vt 0.2000 0.4502 65.9110 1016 | vt 0.4000 0.4502 65.9110 1017 | vt 0.7000 0.0000 65.9110 1018 | vt 0.7873 0.0193 65.9110 1019 | vt 0.8000 0.0881 65.9110 1020 | vt 0.7000 0.0587 65.9110 1021 | vt 0.7000 0.1079 65.9110 1022 | vt 0.6000 0.0881 65.9110 1023 | vt 0.6127 0.0193 65.9110 1024 | vt 0.8333 0.1373 65.9110 1025 | vt 0.8000 0.1762 65.9110 1026 | vt 0.7667 0.1373 65.9110 1027 | vt 0.7452 0.1861 65.9110 1028 | vt 0.7000 0.1476 65.9110 1029 | vt 0.6333 0.1373 65.9110 1030 | vt 0.6548 0.1861 65.9110 1031 | vt 0.6000 0.1762 65.9110 1032 | vt 0.5667 0.1373 65.9110 1033 | vt 0.8215 0.2251 65.9110 1034 | vt 0.8000 0.2643 65.9110 1035 | vt 0.7785 0.2251 65.9110 1036 | vt 0.7623 0.2767 65.9110 1037 | vt 0.7356 0.2346 65.9110 1038 | vt 0.7000 0.2056 65.9110 1039 | vt 0.7000 0.2644 65.9110 1040 | vt 0.6644 0.2346 65.9110 1041 | vt 0.6215 0.2251 65.9110 1042 | vt 0.6377 0.2767 65.9110 1043 | vt 0.6000 0.2643 65.9110 1044 | vt 0.5785 0.2251 65.9110 1045 | vt 0.1000 0.0000 65.9110 1046 | vt 0.1000 0.0587 65.9110 1047 | vt 0.0000 0.0881 65.9110 1048 | vt 0.0127 0.0193 65.9110 1049 | vt -0.1000 0.1079 65.9110 1050 | vt -0.2000 0.0881 65.9110 1051 | vt -0.1000 0.0587 65.9110 1052 | vt 0.0333 0.1373 65.9110 1053 | vt 0.0000 0.1762 65.9110 1054 | vt -0.0333 0.1373 65.9110 1055 | vt -0.0548 0.1861 65.9110 1056 | vt -0.1000 0.1476 65.9110 1057 | vt -0.1975 0.1270 65.9110 1058 | vt 0.9000 0.1476 65.9110 1059 | vt 0.8548 0.1861 65.9110 1060 | vt 0.0215 0.2251 65.9110 1061 | vt 0.0000 0.2643 65.9110 1062 | vt -0.0215 0.2251 65.9110 1063 | vt -0.0377 0.2767 65.9110 1064 | vt -0.0644 0.2346 65.9110 1065 | vt -0.1077 0.1970 65.9110 1066 | vt 0.9356 0.2346 65.9110 1067 | vt 0.9000 0.2644 65.9110 1068 | vt 0.8644 0.2346 65.9110 1069 | vt 0.9000 0.2056 65.9110 1070 | vt 0.8377 0.2767 65.9110 1071 | vt -0.0738 0.2915 65.9110 1072 | vt 0.1873 0.0193 65.9110 1073 | vt 0.2000 0.0881 65.9110 1074 | vt 0.1000 0.1079 65.9110 1075 | vt 0.2333 0.1373 65.9110 1076 | vt 0.2000 0.1762 65.9110 1077 | vt 0.1667 0.1373 65.9110 1078 | vt 0.1452 0.1861 65.9110 1079 | vt 0.1000 0.1476 65.9110 1080 | vt 0.0548 0.1861 65.9110 1081 | vt 0.2215 0.2251 65.9110 1082 | vt 0.2000 0.2643 65.9110 1083 | vt 0.1785 0.2251 65.9110 1084 | vt 0.1623 0.2767 65.9110 1085 | vt 0.1356 0.2346 65.9110 1086 | vt 0.1000 0.2056 65.9110 1087 | vt 0.1000 0.2644 65.9110 1088 | vt 0.0644 0.2346 65.9110 1089 | vt 0.0377 0.2767 65.9110 1090 | vt 0.5000 0.0000 65.9110 1091 | vt 0.5000 0.0587 65.9110 1092 | vt 0.4000 0.0881 65.9110 1093 | vt 0.4127 0.0193 65.9110 1094 | vt 0.3000 0.1079 65.9110 1095 | vt 0.3000 0.0587 65.9110 1096 | vt 0.4333 0.1373 65.9110 1097 | vt 0.4000 0.1762 65.9110 1098 | vt 0.3667 0.1373 65.9110 1099 | vt 0.3452 0.1861 65.9110 1100 | vt 0.3000 0.1476 65.9110 1101 | vt 0.2548 0.1861 65.9110 1102 | vt 0.4215 0.2251 65.9110 1103 | vt 0.4000 0.2643 65.9110 1104 | vt 0.3785 0.2251 65.9110 1105 | vt 0.3623 0.2767 65.9110 1106 | vt 0.3356 0.2346 65.9110 1107 | vt 0.3000 0.2056 65.9110 1108 | vt 0.3000 0.2644 65.9110 1109 | vt 0.2644 0.2346 65.9110 1110 | vt 0.2377 0.2767 65.9110 1111 | vt 0.5000 0.1079 65.9110 1112 | vt 0.5452 0.1861 65.9110 1113 | vt 0.5000 0.1476 65.9110 1114 | vt 0.4548 0.1861 65.9110 1115 | vt 0.5623 0.2767 65.9110 1116 | vt 0.5356 0.2346 65.9110 1117 | vt 0.5000 0.2056 65.9110 1118 | vt 0.5000 0.2644 65.9110 1119 | vt 0.4644 0.2346 65.9110 1120 | vt 0.4377 0.2767 65.9110 1121 | vt 0.0278 0.4635 65.9110 1122 | vt 0.0257 0.4618 65.9110 1123 | vt 0.0371 0.4754 65.9110 1124 | vt 0.0441 0.4813 65.9110 1125 | vt 0.0502 0.4781 65.9110 1126 | vt 0.0565 0.4791 65.9110 1127 | vt 0.0752 0.4586 65.9110 1128 | vt 0.0744 0.4593 65.9110 1129 | vt 0.0652 0.4688 65.9110 1130 | vt 0.0627 0.4716 65.9110 1131 | vt 0.2065 0.4817 65.9110 1132 | vt 0.2000 0.4770 65.9110 1133 | vt 0.2257 0.4633 65.9110 1134 | vt 0.2204 0.4682 65.9110 1135 | vt 0.2131 0.4765 65.9110 1136 | vt 0.1769 0.4617 65.9110 1137 | vt 0.1742 0.4597 65.9110 1138 | vt 0.1857 0.4701 65.9110 1139 | vt 0.1892 0.4735 65.9110 1140 | vt 0.1917 0.4766 65.9110 1141 | vt 0.0000 0.4778 65.9110 1142 | vt 0.0085 0.4772 65.9110 1143 | vt -0.0018 0.4789 65.9110 1144 | vt -0.0070 0.4801 65.9110 1145 | vt -0.0122 0.4749 65.9110 1146 | vt -0.0257 0.4629 65.9110 1147 | vt 0.2557 0.4816 65.9110 1148 | vt 0.2502 0.4797 65.9110 1149 | vt 0.2752 0.4592 65.9110 1150 | vt 0.2600 0.4769 65.9110 1151 | vt 0.2442 0.4817 65.9110 1152 | vt 0.2416 0.4791 65.9110 1153 | vt 0.8043 0.4830 65.9110 1154 | vt 0.8000 0.4818 65.9110 1155 | vt 0.8059 0.4834 65.9110 1156 | vt 0.8257 0.4630 65.9110 1157 | vt 0.6297 0.4691 65.9110 1158 | vt 0.6257 0.4651 65.9110 1159 | vt 0.6462 0.4880 65.9110 1160 | vt 0.6501 0.4875 65.9110 1161 | vt 0.6038 0.4893 65.9110 1162 | vt 0.6000 0.4889 65.9110 1163 | vt 0.6257 0.4650 65.9110 1164 | vt 0.5999 0.4890 65.9110 1165 | vt 0.5960 0.4886 65.9110 1166 | vt 0.5957 0.4882 65.9110 1167 | vt 0.5744 0.4674 65.9110 1168 | vt 0.4537 0.4824 65.9110 1169 | vt 0.4502 0.4818 65.9110 1170 | vt 0.4553 0.4830 65.9110 1171 | vt 0.4752 0.4610 65.9110 1172 | vt 0.4936 0.4787 65.9110 1173 | vt 0.4899 0.4756 65.9110 1174 | vt 0.4837 0.4698 65.9110 1175 | vt 0.4780 0.4641 65.9110 1176 | vt 0.5000 0.4738 65.9110 1177 | vt 0.5024 0.4735 65.9110 1178 | vt 0.5000 0.4737 65.9110 1179 | vt 0.5071 0.4762 65.9110 1180 | vt 0.5248 0.4589 65.9110 1181 | vt 0.7043 0.4855 65.9110 1182 | vt 0.7000 0.4843 65.9110 1183 | vt 0.7248 0.4623 65.9110 1184 | vt 0.7224 0.4651 65.9110 1185 | vt 0.7192 0.4688 65.9110 1186 | vt 0.6980 0.4851 65.9110 1187 | vt 0.6953 0.4844 65.9110 1188 | vt 0.6873 0.4728 65.9110 1189 | vt 0.6752 0.4632 65.9110 1190 | vt 0.6646 0.4774 65.9110 1191 | vt 0.6559 0.4867 65.9110 1192 | vt 0.6533 0.4893 65.9110 1193 | vt 0.7333 0.4712 65.9110 1194 | vt 0.7449 0.4834 65.9110 1195 | vt 0.7498 0.4812 65.9110 1196 | vt 0.9033 0.4891 65.9110 1197 | vt 0.9000 0.4879 65.9110 1198 | vt 0.9228 0.4596 65.9110 1199 | vt 0.9248 0.4566 65.9110 1200 | vt 0.8998 0.4874 65.9110 1201 | vt 0.8963 0.4878 65.9110 1202 | vt 0.8829 0.4713 65.9110 1203 | vt 0.8752 0.4618 65.9110 1204 | vt 0.8368 0.4735 65.9110 1205 | vt 0.8258 0.4631 65.9110 1206 | vt 0.8406 0.4776 65.9110 1207 | vt 0.8441 0.4814 65.9110 1208 | vt 0.8502 0.4801 65.9110 1209 | vt 0.8554 0.4826 65.9110 1210 | vt 0.8687 0.4678 65.9110 1211 | vt 0.8593 0.4786 65.9110 1212 | vt 0.1371 0.4700 65.9110 1213 | vt 0.1248 0.4586 65.9110 1214 | vt 0.1431 0.4777 65.9110 1215 | vt 0.1497 0.4769 65.9110 1216 | vt 0.1243 0.4593 65.9110 1217 | vt 0.1120 0.4726 65.9110 1218 | vt 0.1057 0.4811 65.9110 1219 | vt 0.1000 0.4807 65.9110 1220 | vt 0.2818 0.4649 65.9110 1221 | vt 0.2911 0.4734 65.9110 1222 | vt 0.2926 0.4752 65.9110 1223 | vt 0.3000 0.4747 65.9110 1224 | vt 0.3064 0.4785 65.9110 1225 | vt 0.3248 0.4603 65.9110 1226 | vt 0.3222 0.4633 65.9110 1227 | vt 0.3175 0.4685 65.9110 1228 | vt 0.5309 0.4663 65.9110 1229 | vt 0.5300 0.4653 65.9110 1230 | vt 0.5293 0.4645 65.9110 1231 | vt 0.5444 0.4818 65.9110 1232 | vt 0.5498 0.4800 65.9110 1233 | vt 0.7777 0.4681 65.9110 1234 | vt 0.7743 0.4643 65.9110 1235 | vt 0.7943 0.4840 65.9110 1236 | vt 0.9497 0.4776 65.9110 1237 | vt 0.9556 0.4821 65.9110 1238 | vt 0.9681 0.4695 65.9110 1239 | vt 0.9588 0.4799 65.9110 1240 | vt 0.9745 0.4622 65.9110 1241 | vt 0.9302 0.4603 65.9110 1242 | vt 0.9326 0.4629 65.9110 1243 | vt 0.9428 0.4768 65.9110 1244 | vt 0.4063 0.4822 65.9110 1245 | vt 0.4000 0.4799 65.9110 1246 | vt 0.4257 0.4648 65.9110 1247 | vt 0.4132 0.4754 65.9110 1248 | vt 0.4085 0.4802 65.9110 1249 | vt 0.3813 0.4708 65.9110 1250 | vt 0.3744 0.4659 65.9110 1251 | vt 0.3917 0.4798 65.9110 1252 | vt 0.3935 0.4816 65.9110 1253 | vt 0.3536 0.4886 65.9110 1254 | vt 0.3500 0.4839 65.9110 1255 | vt 0.3651 0.4778 65.9110 1256 | vt 0.9195 0.6151 0.0000 1257 | vt 0.9167 0.6246 0.0000 1258 | vt 0.9167 0.5833 0.0000 1259 | vt 0.9312 0.5833 0.0000 1260 | vt 0.9043 0.6655 0.0000 1261 | vt 0.9036 0.6667 0.0000 1262 | vt 0.8333 0.6667 0.0000 1263 | vt 0.9069 0.6569 0.0000 1264 | vt 0.8333 0.5833 0.0000 1265 | vt 0.8519 0.7372 0.0000 1266 | vt 0.8430 0.7500 0.0000 1267 | vt 0.8333 0.7500 0.0000 1268 | vt 0.8973 0.6769 0.0000 1269 | vt 0.8930 0.6852 0.0000 1270 | vt 0.8912 0.6888 0.0000 1271 | vt 0.8563 0.7308 0.0000 1272 | vt 0.8335 0.7637 0.0000 1273 | vt 0.7466 0.8333 0.0000 1274 | vt 0.6667 0.8333 0.0000 1275 | vt 0.6667 0.7500 0.0000 1276 | vt 0.7485 0.8318 0.0000 1277 | vt 0.7500 0.7500 0.0000 1278 | vt 0.7500 0.8307 0.0000 1279 | vt 0.6395 0.8841 0.0000 1280 | vt 0.5833 0.9036 0.0000 1281 | vt 0.5833 0.8333 0.0000 1282 | vt 0.6453 0.8825 0.0000 1283 | vt 0.6667 0.8766 0.0000 1284 | vt 0.5825 0.9038 0.0000 1285 | vt 0.5719 0.9056 0.0000 1286 | vt 0.5615 0.9072 0.0000 1287 | vt 0.5001 0.9051 0.0000 1288 | vt 0.5000 0.8333 0.0000 1289 | vt 0.4320 0.9053 0.0000 1290 | vt 0.4234 0.9043 0.0000 1291 | vt 0.4167 0.9019 0.0000 1292 | vt 0.4425 0.9071 0.0000 1293 | vt 0.4888 0.9055 0.0000 1294 | vt 0.4167 0.8333 0.0000 1295 | vt 0.5000 0.9051 0.0000 1296 | vt 0.3660 0.8834 0.0000 1297 | vt 0.3333 0.8743 0.0000 1298 | vt 0.3333 0.8333 0.0000 1299 | vt 0.3936 0.8936 0.0000 1300 | vt 0.2569 0.8333 0.0000 1301 | vt 0.2500 0.8280 0.0000 1302 | vt 0.2500 0.7500 0.0000 1303 | vt 0.3333 0.7500 0.0000 1304 | vt 0.1673 0.7604 0.0000 1305 | vt 0.1667 0.7596 0.0000 1306 | vt 0.1667 0.7500 0.0000 1307 | vt 0.1771 0.7743 0.0000 1308 | vt 0.2446 0.8239 0.0000 1309 | vt 0.2248 0.8113 0.0000 1310 | vt 0.1977 0.7940 0.0000 1311 | vt 0.1885 0.7847 0.0000 1312 | vt 0.1854 0.7819 0.0000 1313 | vt 0.1599 0.7500 0.0000 1314 | vt 0.0833 0.6113 0.0000 1315 | vt 0.0729 0.5833 0.0000 1316 | vt 0.0833 0.5833 0.0000 1317 | vt 0.0616 0.5252 0.0000 1318 | vt 0.0628 0.5000 0.0000 1319 | vt 0.0833 0.5000 0.0000 1320 | vt 0.0693 0.5739 0.0000 1321 | vt 0.0659 0.5649 0.0000 1322 | vt 0.0638 0.5491 0.0000 1323 | vt 0.0611 0.5359 0.0000 1324 | vt 0.0606 0.4255 0.0000 1325 | vt 0.0621 0.4167 0.0000 1326 | vt 0.0833 0.4167 0.0000 1327 | vt 0.0624 0.4617 0.0000 1328 | vt 0.0635 0.4825 0.0000 1329 | vt 0.0632 0.4076 0.0000 1330 | vt 0.0833 0.3585 0.0000 1331 | vt 0.0621 0.4161 0.0000 1332 | vt 0.0896 0.3396 0.0000 1333 | vt 0.0914 0.3333 0.0000 1334 | vt 0.1667 0.3333 0.0000 1335 | vt 0.1667 0.4167 0.0000 1336 | vt 0.0854 0.3535 0.0000 1337 | vt 0.1343 0.2500 0.0000 1338 | vt 0.1667 0.2500 0.0000 1339 | vt 0.1185 0.2694 0.0000 1340 | vt 0.1070 0.2904 0.0000 1341 | vt 0.1132 0.2761 0.0000 1342 | vt 0.0988 0.3066 0.0000 1343 | vt 0.1453 0.2364 0.0000 1344 | vt 0.1667 0.2065 0.0000 1345 | vt 0.1748 0.1949 0.0000 1346 | vt 0.1851 0.1854 0.0000 1347 | vt 0.1888 0.1823 0.0000 1348 | vt 0.2054 0.1668 0.0000 1349 | vt 0.2500 0.1667 0.0000 1350 | vt 0.2500 0.2500 0.0000 1351 | vt 0.2056 0.1667 0.0000 1352 | vt 0.2453 0.1406 0.0000 1353 | vt 0.2500 0.1371 0.0000 1354 | vt 0.3014 0.1036 0.0000 1355 | vt 0.3164 0.0962 0.0000 1356 | vt 0.3333 0.0918 0.0000 1357 | vt 0.2860 0.1101 0.0000 1358 | vt 0.2704 0.1216 0.0000 1359 | vt 0.3333 0.1667 0.0000 1360 | vt 0.3649 0.0833 0.0000 1361 | vt 0.4167 0.0833 0.0000 1362 | vt 0.4167 0.1667 0.0000 1363 | vt 0.3400 0.0900 0.0000 1364 | vt 0.3671 0.0827 0.0000 1365 | vt 0.3839 0.0766 0.0000 1366 | vt 0.4167 0.0647 0.0000 1367 | vt 0.4656 0.0608 0.0000 1368 | vt 0.5000 0.0622 0.0000 1369 | vt 0.5000 0.0833 0.0000 1370 | vt 0.4326 0.0623 0.0000 1371 | vt 0.4478 0.0598 0.0000 1372 | vt 0.5833 0.0640 0.0000 1373 | vt 0.5833 0.0833 0.0000 1374 | vt 0.5706 0.0629 0.0000 1375 | vt 0.5527 0.0602 0.0000 1376 | vt 0.5359 0.0611 0.0000 1377 | vt 0.5015 0.0623 0.0000 1378 | vt 0.6357 0.0813 0.0000 1379 | vt 0.6427 0.0833 0.0000 1380 | vt 0.6191 0.0754 0.0000 1381 | vt 0.5882 0.0646 0.0000 1382 | vt 0.6667 0.0900 0.0000 1383 | vt 0.6667 0.1667 0.0000 1384 | vt 0.5833 0.1667 0.0000 1385 | vt 0.7030 0.1042 0.0000 1386 | vt 0.7192 0.1109 0.0000 1387 | vt 0.7339 0.1218 0.0000 1388 | vt 0.6828 0.0945 0.0000 1389 | vt 0.6759 0.0926 0.0000 1390 | vt 0.7500 0.1667 0.0000 1391 | vt 0.7500 0.1339 0.0000 1392 | vt 0.7618 0.1426 0.0000 1393 | vt 0.7987 0.1667 0.0000 1394 | vt 0.8333 0.2500 0.0000 1395 | vt 0.8333 0.2018 0.0000 1396 | vt 0.8567 0.2360 0.0000 1397 | vt 0.8681 0.2500 0.0000 1398 | vt 0.8959 0.2902 0.0000 1399 | vt 0.9047 0.3047 0.0000 1400 | vt 0.9132 0.3333 0.0000 1401 | vt 0.8869 0.2729 0.0000 1402 | vt 0.8843 0.2698 0.0000 1403 | vt 0.8333 0.3333 0.0000 1404 | vt 0.9167 0.4167 0.0000 1405 | vt 0.9167 0.3455 0.0000 1406 | vt 0.9187 0.3525 0.0000 1407 | vt 0.9279 0.3762 0.0000 1408 | vt 0.9410 0.4162 0.0000 1409 | vt 0.9417 0.4167 0.0000 1410 | vt 0.9437 0.4254 0.0000 1411 | vt 0.9427 0.4562 0.0000 1412 | vt 0.9417 0.4813 0.0000 1413 | vt 0.9421 0.5000 0.0000 1414 | vt 0.9167 0.5000 0.0000 1415 | vt 0.9357 0.5716 0.0000 1416 | vt 0.9378 0.5659 0.0000 1417 | vt 0.9399 0.5496 0.0000 1418 | vt 0.9431 0.5328 0.0000 1419 | vt 0.9429 0.5279 0.0000 1420 | vt 0.8333 0.5000 0.0000 1421 | vt 0.8333 0.4167 0.0000 1422 | vt 0.7500 0.5000 0.0000 1423 | vt 0.7500 0.4167 0.0000 1424 | vt 0.7500 0.5833 0.0000 1425 | vt 0.6667 0.5833 0.0000 1426 | vt 0.6667 0.5000 0.0000 1427 | vt 0.7500 0.6667 0.0000 1428 | vt 0.6667 0.6667 0.0000 1429 | vt 0.5833 0.6667 0.0000 1430 | vt 0.5833 0.5833 0.0000 1431 | vt 0.5833 0.7500 0.0000 1432 | vt 0.5000 0.7500 0.0000 1433 | vt 0.5000 0.6667 0.0000 1434 | vt 0.4167 0.7500 0.0000 1435 | vt 0.4167 0.6667 0.0000 1436 | vt 0.3333 0.6667 0.0000 1437 | vt 0.2500 0.6667 0.0000 1438 | vt 0.1667 0.6667 0.0000 1439 | vt 0.1667 0.5833 0.0000 1440 | vt 0.2500 0.5833 0.0000 1441 | vt 0.1667 0.5000 0.0000 1442 | vt 0.2500 0.5000 0.0000 1443 | vt 0.2500 0.4167 0.0000 1444 | vt 0.3333 0.4167 0.0000 1445 | vt 0.3333 0.5000 0.0000 1446 | vt 0.2500 0.3333 0.0000 1447 | vt 0.3333 0.3333 0.0000 1448 | vt 0.3333 0.2500 0.0000 1449 | vt 0.4167 0.2500 0.0000 1450 | vt 0.4167 0.3333 0.0000 1451 | vt 0.5000 0.2500 0.0000 1452 | vt 0.5000 0.3333 0.0000 1453 | vt 0.5000 0.1667 0.0000 1454 | vt 0.5833 0.2500 0.0000 1455 | vt 0.6667 0.2500 0.0000 1456 | vt 0.7500 0.2500 0.0000 1457 | vt 0.7500 0.3333 0.0000 1458 | vt 0.6667 0.3333 0.0000 1459 | vt 0.6667 0.4167 0.0000 1460 | vt 0.5833 0.4167 0.0000 1461 | vt 0.5833 0.3333 0.0000 1462 | vt 0.5833 0.5000 0.0000 1463 | vt 0.5000 0.5000 0.0000 1464 | vt 0.5000 0.4167 0.0000 1465 | vt 0.5000 0.5833 0.0000 1466 | vt 0.4167 0.5833 0.0000 1467 | vt 0.4167 0.5000 0.0000 1468 | vt 0.3333 0.5833 0.0000 1469 | vt 0.4167 0.4167 0.0000 1470 | vt 0.8049 0.1707 0.0000 1471 | vt 0.8160 0.1822 0.0000 1472 | vt 0.8267 0.1921 0.0000 1473 | vt 0.1010 0.6667 0.0000 1474 | vt 0.0989 0.6629 0.0000 1475 | vt 0.0834 0.6115 0.0000 1476 | vt 0.4418 0.4815 65.9110 1477 | vt 0.4293 0.4689 65.9110 1478 | vt 0.4451 0.4846 65.9110 1479 | vt 0.4456 0.4843 65.9110 1480 | vt 0.7513 0.4815 65.9110 1481 | vt 0.7556 0.4824 65.9110 1482 | vt 0.7618 0.4758 65.9110 1483 | vt 0.7665 0.4714 65.9110 1484 | vt 0.7622 0.4756 65.9110 1485 | vt 0.0816 0.4666 65.9110 1486 | vt 0.0941 0.4808 65.9110 1487 | vt 0.3342 0.4704 65.9110 1488 | vt 0.3498 0.4813 65.9110 1489 | vt 0.5524 0.4810 65.9110 1490 | vt 0.5551 0.4837 65.9110 1491 | vt 0.5722 0.4697 65.9110 1492 | vt 0.5643 0.4779 65.9110 1493 | vt 0.1562 0.4803 65.9110 1494 | vt 0.1544 0.4799 65.9110 1495 | vt 0.1679 0.4679 65.9110 1496 | vt 0.8333 0.7639 0.0000 1497 | vt 0.8276 0.7721 0.0000 1498 | vt 0.8145 0.7830 0.0000 1499 | vt 0.8098 0.7874 0.0000 1500 | vt 0.7599 0.8230 0.0000 1501 | vt 0.8012 0.7966 0.0000 1502 | vt 0.6913 0.8695 0.0000 1503 | vt 0.6976 0.8656 0.0000 1504 | vt 0.7038 0.8622 0.0000 1505 | vt 0.7171 0.8560 0.0000 1506 | vt 0.3115 0.8688 0.0000 1507 | vt 0.3049 0.8658 0.0000 1508 | vt 0.3002 0.8633 0.0000 1509 | vt 0.2895 0.8584 0.0000 1510 | vt 0.1474 0.7325 0.0000 1511 | vt 0.1416 0.7252 0.0000 1512 | vt 0.1065 0.6765 0.0000 1513 | vt 0.1130 0.6899 0.0000 1514 | # 620 texture coords 1515 | 1516 | g water 1517 | usemtl wire_229166215 1518 | s off 1519 | f 1/1/1 2/2/1 3/3/1 4/4/1 1520 | f 3/3/2 5/5/2 6/6/2 7/7/2 1521 | f 6/6/3 8/8/3 9/9/3 10/10/3 1522 | f 1/1/4 11/11/4 12/12/4 13/13/4 1523 | f 12/12/5 14/14/5 15/15/5 13/13/5 1524 | f 15/15/6 2/2/6 1/1/6 13/13/6 1525 | f 15/15/7 16/16/7 3/3/7 2/2/7 1526 | f 15/15/8 17/17/8 18/18/8 16/16/8 1527 | f 18/18/9 5/5/9 3/3/9 16/16/9 1528 | f 18/18/10 19/19/10 6/6/10 5/5/10 1529 | f 18/18/11 20/20/11 21/21/11 19/19/11 1530 | f 21/21/12 8/8/12 6/6/12 19/19/12 1531 | f 21/21/13 22/22/13 9/9/13 8/8/13 1532 | f 21/21/14 23/23/14 24/24/14 22/22/14 1533 | f 24/24/15 25/25/15 9/9/15 22/22/15 1534 | f 26/26/16 27/27/16 28/28/16 29/29/16 1535 | f 28/28/17 30/30/17 31/31/17 32/32/17 1536 | f 31/31/18 33/33/18 34/34/18 35/35/18 1537 | f 26/26/19 25/25/19 24/24/19 36/36/19 1538 | f 24/24/20 37/37/20 38/38/20 36/36/20 1539 | f 38/38/21 27/27/21 26/26/21 36/36/21 1540 | f 38/38/22 39/39/22 28/28/22 27/27/22 1541 | f 38/38/23 40/40/23 41/41/23 39/39/23 1542 | f 41/41/24 30/30/24 28/28/24 39/39/24 1543 | f 41/41/25 42/42/25 31/31/25 30/30/25 1544 | f 41/41/26 43/43/26 44/44/26 42/42/26 1545 | f 44/44/27 33/33/27 31/31/27 42/42/27 1546 | f 44/44/28 45/45/28 34/34/28 33/33/28 1547 | f 44/44/29 46/46/29 47/47/29 45/45/29 1548 | f 47/47/30 48/48/30 34/34/30 45/45/30 1549 | f 49/49/31 50/50/31 51/51/31 52/52/31 1550 | f 51/51/32 53/53/32 54/54/32 55/55/32 1551 | f 54/54/33 56/56/33 57/57/33 58/58/33 1552 | f 49/49/34 48/48/34 47/47/34 59/59/34 1553 | f 47/47/35 60/60/35 61/61/35 59/59/35 1554 | f 61/61/36 50/50/36 49/49/36 59/59/36 1555 | f 61/61/37 62/62/37 51/51/37 50/50/37 1556 | f 61/61/38 63/63/38 64/64/38 62/62/38 1557 | f 64/64/39 53/53/39 51/51/39 62/62/39 1558 | f 64/64/40 65/65/40 54/54/40 53/53/40 1559 | f 64/64/41 66/66/41 67/67/41 65/65/41 1560 | f 67/67/42 56/56/42 54/54/42 65/65/42 1561 | f 67/67/43 68/68/43 57/57/43 56/56/43 1562 | f 67/69/44 69/70/44 70/71/44 68/72/44 1563 | f 70/71/45 71/73/45 57/74/45 68/72/45 1564 | f 72/75/46 73/76/46 74/77/46 75/78/46 1565 | f 74/77/47 76/79/47 77/80/47 78/81/47 1566 | f 77/80/48 79/82/48 80/83/48 81/84/48 1567 | f 72/75/49 71/73/49 70/71/49 82/85/49 1568 | f 70/71/50 83/86/50 84/87/50 82/85/50 1569 | f 84/87/51 73/76/51 72/75/51 82/85/51 1570 | f 84/87/52 85/88/52 74/77/52 73/76/52 1571 | f 84/87/53 86/89/53 87/90/53 85/88/53 1572 | f 87/90/54 76/79/54 74/77/54 85/88/54 1573 | f 87/90/55 88/91/55 77/80/55 76/79/55 1574 | f 87/90/56 89/92/56 90/93/56 88/91/56 1575 | f 90/93/57 79/82/57 77/80/57 88/91/57 1576 | f 90/93/58 91/94/58 80/83/58 79/82/58 1577 | f 90/93/59 92/95/59 93/96/59 91/94/59 1578 | f 93/96/60 94/97/60 80/83/60 91/94/60 1579 | f 95/98/61 96/99/61 97/100/61 98/101/61 1580 | f 97/100/62 99/102/62 100/103/62 101/104/62 1581 | f 100/103/63 102/105/63 103/106/63 104/107/63 1582 | f 95/98/64 94/97/64 93/96/64 105/108/64 1583 | f 93/96/65 106/109/65 107/110/65 105/108/65 1584 | f 107/110/66 96/99/66 95/98/66 105/108/66 1585 | f 107/110/67 108/111/67 97/100/67 96/99/67 1586 | f 107/110/68 109/112/68 110/113/68 108/111/68 1587 | f 110/113/69 99/102/69 97/100/69 108/111/69 1588 | f 110/113/70 111/114/70 100/103/70 99/102/70 1589 | f 110/113/71 112/115/71 113/116/71 111/114/71 1590 | f 113/116/72 102/105/72 100/103/72 111/114/72 1591 | f 113/116/73 114/117/73 103/106/73 102/105/73 1592 | f 113/116/74 115/118/74 12/12/74 114/117/74 1593 | f 12/12/75 11/11/75 103/106/75 114/117/75 1594 | f 26/26/76 116/119/76 9/9/76 25/25/76 1595 | f 49/49/77 117/120/77 34/34/77 48/48/77 1596 | f 72/75/78 118/121/78 57/74/78 71/73/78 1597 | f 95/98/79 119/122/79 80/83/79 94/97/79 1598 | f 1/1/80 120/123/80 103/106/80 11/11/80 1599 | f 121/124/81 122/125/81 123/126/81 124/127/81 1600 | f 123/126/82 125/128/82 126/129/82 124/127/82 1601 | f 126/129/83 127/130/83 121/124/83 124/127/83 1602 | f 123/126/84 128/131/84 129/132/84 130/133/84 1603 | f 129/132/85 131/134/85 132/135/85 130/133/85 1604 | f 132/135/86 125/128/86 123/126/86 130/133/86 1605 | f 132/135/87 133/136/87 126/129/87 125/128/87 1606 | f 132/135/88 134/137/88 135/138/88 133/136/88 1607 | f 135/138/89 136/139/89 126/129/89 133/136/89 1608 | f 129/132/90 137/140/90 138/141/90 139/142/90 1609 | f 138/141/91 140/143/91 141/144/91 139/142/91 1610 | f 141/144/92 131/134/92 129/132/92 139/142/92 1611 | f 141/144/93 142/145/93 132/135/93 131/134/93 1612 | f 141/144/94 143/146/94 144/147/94 142/145/94 1613 | f 144/147/95 134/137/95 132/135/95 142/145/95 1614 | f 144/147/96 145/148/96 135/138/96 134/137/96 1615 | f 144/147/97 146/149/97 147/150/97 145/148/97 1616 | f 147/150/98 148/151/98 135/138/98 145/148/98 1617 | f 138/141/99 60/60/99 47/47/99 46/46/99 1618 | f 44/44/100 140/143/100 138/141/100 46/46/100 1619 | f 44/44/101 43/43/101 141/144/101 140/143/101 1620 | f 41/41/102 143/146/102 141/144/102 43/43/102 1621 | f 41/41/103 40/40/103 144/147/103 143/146/103 1622 | f 38/38/104 146/149/104 144/147/104 40/40/104 1623 | f 38/38/105 37/37/105 147/150/105 146/149/105 1624 | f 24/24/106 23/23/106 147/150/106 37/37/106 1625 | f 121/152/107 149/153/107 150/154/107 122/155/107 1626 | f 150/154/108 151/156/108 123/157/108 122/158/108 1627 | f 150/154/109 152/159/109 153/160/109 154/161/109 1628 | f 153/160/110 155/162/110 156/163/110 154/161/110 1629 | f 156/163/111 151/156/111 150/154/111 154/161/111 1630 | f 156/163/112 128/164/112 123/157/112 151/156/112 1631 | f 156/165/113 157/166/113 129/132/113 128/131/113 1632 | f 153/160/114 158/167/114 159/168/114 160/169/114 1633 | f 159/168/115 161/170/115 162/171/115 160/169/115 1634 | f 162/171/116 155/162/116 153/160/116 160/169/116 1635 | f 162/171/117 163/172/117 156/163/117 155/162/117 1636 | f 162/173/118 164/174/118 165/175/118 163/176/118 1637 | f 165/175/119 157/166/119 156/165/119 163/176/119 1638 | f 165/175/120 137/140/120 129/132/120 157/166/120 1639 | f 165/175/121 166/177/121 138/141/121 137/140/121 1640 | f 159/168/122 83/86/122 70/71/122 69/70/122 1641 | f 67/69/123 161/170/123 159/168/123 69/70/123 1642 | f 67/69/124 66/178/124 162/171/124 161/170/124 1643 | f 64/64/125 164/174/125 162/173/125 66/66/125 1644 | f 64/64/126 63/63/126 165/175/126 164/174/126 1645 | f 61/61/127 166/177/127 165/175/127 63/63/127 1646 | f 61/61/128 60/60/128 138/141/128 166/177/128 1647 | f 121/152/129 167/179/129 168/180/129 149/153/129 1648 | f 168/180/130 169/181/130 150/154/130 149/153/130 1649 | f 168/180/131 170/182/131 171/183/131 172/184/131 1650 | f 171/183/132 173/185/132 174/186/132 172/184/132 1651 | f 174/186/133 169/181/133 168/180/133 172/184/133 1652 | f 174/186/134 152/159/134 150/154/134 169/181/134 1653 | f 174/186/135 175/187/135 153/160/135 152/159/135 1654 | f 171/183/136 176/188/136 177/189/136 178/190/136 1655 | f 177/189/137 179/191/137 180/192/137 178/190/137 1656 | f 180/192/138 173/185/138 171/183/138 178/190/138 1657 | f 180/192/139 181/193/139 174/186/139 173/185/139 1658 | f 180/192/140 182/194/140 183/195/140 181/193/140 1659 | f 183/195/141 175/187/141 174/186/141 181/193/141 1660 | f 183/195/142 158/167/142 153/160/142 175/187/142 1661 | f 183/195/143 184/196/143 159/168/143 158/167/143 1662 | f 177/189/144 106/109/144 93/96/144 92/95/144 1663 | f 90/93/145 179/191/145 177/189/145 92/95/145 1664 | f 90/93/146 89/92/146 180/192/146 179/191/146 1665 | f 87/90/147 182/194/147 180/192/147 89/92/147 1666 | f 87/90/148 86/89/148 183/195/148 182/194/148 1667 | f 84/87/149 184/196/149 183/195/149 86/89/149 1668 | f 84/87/150 83/86/150 159/168/150 184/196/150 1669 | f 121/197/151 127/198/151 185/199/151 167/200/151 1670 | f 185/199/152 186/201/152 168/180/152 167/202/152 1671 | f 185/199/153 187/203/153 188/204/153 189/205/153 1672 | f 188/204/154 190/206/154 191/207/154 189/205/154 1673 | f 191/207/155 186/201/155 185/199/155 189/205/155 1674 | f 191/207/156 170/182/156 168/180/156 186/201/156 1675 | f 191/207/157 192/208/157 171/183/157 170/182/157 1676 | f 188/204/158 193/209/158 194/210/158 195/211/158 1677 | f 194/210/159 196/212/159 197/213/159 195/211/159 1678 | f 197/213/160 190/206/160 188/204/160 195/211/160 1679 | f 197/213/161 198/214/161 191/207/161 190/206/161 1680 | f 197/213/162 199/215/162 200/216/162 198/214/162 1681 | f 200/216/163 192/208/163 191/207/163 198/214/163 1682 | f 200/216/164 176/188/164 171/183/164 192/208/164 1683 | f 200/216/165 201/217/165 177/189/165 176/188/165 1684 | f 194/210/166 14/14/166 12/12/166 115/118/166 1685 | f 113/116/167 196/212/167 194/210/167 115/118/167 1686 | f 113/116/168 112/115/168 197/213/168 196/212/168 1687 | f 110/113/169 199/215/169 197/213/169 112/115/169 1688 | f 110/113/170 109/112/170 200/216/170 199/215/170 1689 | f 107/110/171 201/217/171 200/216/171 109/112/171 1690 | f 107/110/172 106/109/172 177/189/172 201/217/172 1691 | f 126/129/173 202/218/173 185/199/173 127/198/173 1692 | f 135/138/174 203/219/174 204/220/174 136/139/174 1693 | f 204/220/175 202/218/175 126/129/175 136/139/175 1694 | f 204/220/176 187/203/176 185/199/176 202/218/176 1695 | f 204/220/177 205/221/177 188/204/177 187/203/177 1696 | f 147/150/178 206/222/178 207/223/178 148/151/178 1697 | f 207/223/179 203/219/179 135/138/179 148/151/179 1698 | f 207/223/180 208/224/180 204/220/180 203/219/180 1699 | f 207/223/181 209/225/181 210/226/181 208/224/181 1700 | f 210/226/182 205/221/182 204/220/182 208/224/182 1701 | f 210/226/183 193/209/183 188/204/183 205/221/183 1702 | f 210/226/184 211/227/184 194/210/184 193/209/184 1703 | f 21/21/185 206/222/185 147/150/185 23/23/185 1704 | f 21/21/186 20/20/186 207/223/186 206/222/186 1705 | f 18/18/187 209/225/187 207/223/187 20/20/187 1706 | f 18/18/188 17/17/188 210/226/188 209/225/188 1707 | f 15/15/189 211/227/189 210/226/189 17/17/189 1708 | f 15/15/190 14/14/190 194/210/190 211/227/190 1709 | f 212/228/191 213/229/191 72/75/191 214/230/191 1710 | f 215/231/192 214/230/192 72/75/192 75/78/192 1711 | f 215/231/193 75/78/193 216/232/193 1712 | f 217/233/194 216/232/194 75/78/194 74/77/194 1713 | f 74/77/195 218/234/195 219/235/195 220/236/195 1714 | f 74/77/195 220/236/195 221/237/195 217/233/195 1715 | f 222/238/196 223/239/196 119/122/196 95/98/196 1716 | f 95/98/197 224/240/197 225/241/197 226/242/197 1717 | f 222/238/197 95/98/197 226/242/197 1718 | f 227/243/198 228/244/198 80/83/198 229/245/198 1719 | f 230/246/198 229/245/198 80/83/198 231/247/198 1720 | f 231/247/199 80/83/199 119/122/199 223/239/199 1721 | f 232/248/200 118/121/200 72/75/200 233/249/200 1722 | f 72/75/201 213/229/201 233/249/201 1723 | f 118/121/202 232/248/202 234/250/202 235/251/202 1724 | f 236/252/203 237/253/203 57/74/203 235/251/203 1725 | f 118/121/202 235/251/202 57/74/202 1726 | f 238/254/204 239/255/204 98/101/204 97/100/204 1727 | f 238/254/205 97/100/205 240/256/205 241/257/205 1728 | f 242/258/206 243/259/206 224/240/206 95/98/206 1729 | f 242/258/207 95/98/207 98/101/207 239/255/207 1730 | f 244/260/208 245/261/208 117/120/208 246/262/208 1731 | f 246/262/209 117/120/209 49/49/209 247/263/209 1732 | f 248/264/210 249/265/210 26/26/210 250/266/210 1733 | f 250/266/211 26/26/211 29/29/211 251/267/211 1734 | f 252/268/212 253/269/212 116/119/212 26/26/212 1735 | f 252/268/213 26/26/213 249/270/213 1736 | f 116/119/214 253/271/214 254/272/214 9/9/214 1737 | f 255/273/215 256/274/215 9/9/215 254/272/215 1738 | f 257/275/216 258/276/216 4/4/216 259/277/216 1739 | f 259/277/217 4/4/217 3/3/217 260/278/217 1740 | f 261/279/218 262/280/218 263/281/218 264/282/218 1741 | f 261/279/218 264/282/218 260/278/218 3/3/218 1742 | f 265/283/219 261/279/219 3/3/219 7/7/219 1743 | f 266/284/220 265/285/220 7/7/220 267/286/220 1744 | f 267/286/221 7/7/221 6/6/221 268/287/221 1745 | f 269/288/222 270/289/222 32/32/222 31/31/222 1746 | f 269/288/223 31/31/223 271/290/223 272/291/223 1747 | f 269/288/223 272/291/223 273/292/223 1748 | f 32/32/224 270/289/224 274/293/224 275/294/224 1749 | f 276/295/225 277/296/225 28/28/225 275/294/225 1750 | f 32/32/224 275/294/224 28/28/224 1751 | f 277/296/226 278/297/226 279/298/226 280/299/226 1752 | f 280/299/227 251/267/227 29/29/227 28/28/227 1753 | f 277/296/226 280/299/226 28/28/226 1754 | f 281/300/228 271/290/228 31/31/228 282/301/228 1755 | f 35/35/229 283/302/229 282/301/229 31/31/229 1756 | f 284/303/230 285/304/230 55/55/230 54/54/230 1757 | f 286/305/231 284/303/231 54/54/231 287/306/231 1758 | f 55/55/232 285/304/232 288/307/232 289/308/232 1759 | f 290/309/233 291/310/233 51/51/233 289/308/233 1760 | f 55/55/232 289/308/232 51/51/232 1761 | f 292/311/234 247/312/234 49/49/234 293/313/234 1762 | f 294/314/235 293/313/235 49/49/235 52/52/235 1763 | f 294/314/236 52/52/236 295/315/236 1764 | f 296/316/237 295/315/237 52/52/237 51/51/237 1765 | f 51/51/238 291/310/238 297/317/238 298/318/238 1766 | f 296/316/238 51/51/238 298/318/238 1767 | f 299/319/239 300/320/239 77/80/239 301/321/239 1768 | f 301/321/240 77/80/240 81/84/240 302/322/240 1769 | f 77/80/241 300/320/241 303/323/241 304/324/241 1770 | f 77/80/242 304/324/242 305/325/242 78/81/242 1771 | f 305/325/243 306/326/243 78/81/243 1772 | f 307/327/244 240/256/244 97/100/244 308/328/244 1773 | f 309/329/245 308/328/245 97/100/245 101/104/245 1774 | f 309/329/246 101/104/246 310/330/246 1775 | f 311/331/247 310/330/247 101/104/247 100/103/247 1776 | f 311/331/248 100/103/248 312/332/248 313/333/248 1777 | f 311/331/248 313/333/248 314/334/248 1778 | f 315/335/249 316/336/249 317/337/249 268/287/249 1779 | f 318/338/250 315/335/250 268/287/250 6/6/250 1780 | f 318/338/251 6/6/251 10/10/251 319/339/251 1781 | f 320/340/252 321/341/252 34/34/252 322/342/252 1782 | f 117/120/253 245/261/253 322/342/253 34/34/253 1783 | f 323/343/254 58/58/254 57/57/254 324/344/254 1784 | f 325/345/255 326/346/255 324/344/255 237/347/255 1785 | f 57/57/255 237/347/255 324/344/255 1786 | f 327/348/256 287/306/256 54/54/256 328/349/256 1787 | f 329/350/257 328/349/257 54/54/257 58/58/257 1788 | f 329/350/258 58/58/258 323/343/258 1789 | f 330/351/259 331/352/259 120/123/259 1/1/259 1790 | f 1/1/260 332/353/260 333/354/260 334/355/260 1791 | f 330/351/260 1/1/260 334/355/260 1792 | f 335/356/261 336/357/261 103/106/261 337/358/261 1793 | f 338/359/262 337/358/262 103/106/262 120/123/262 1794 | f 338/359/263 120/123/263 331/352/263 1795 | f 339/360/264 340/361/264 104/107/264 103/106/264 1796 | f 103/106/265 336/357/265 341/362/265 339/360/265 1797 | f 332/363/266 342/364/266 343/365/266 333/366/266 1798 | f 344/367/267 345/368/267 346/369/267 347/370/267 1799 | f 347/370/268 346/369/268 348/371/268 342/364/268 1800 | f 342/364/269 348/371/269 343/365/269 1801 | f 264/372/270 263/373/270 349/374/270 346/369/270 1802 | f 346/369/271 345/368/271 258/375/271 257/376/271 1803 | f 346/369/272 257/376/272 259/377/272 260/378/272 1804 | f 264/372/272 346/369/272 260/378/272 1805 | f 263/373/273 262/379/273 349/374/273 1806 | f 315/380/274 350/381/274 351/382/274 316/383/274 1807 | f 351/382/275 352/384/275 317/385/275 316/383/275 1808 | f 256/386/276 255/387/276 353/388/276 354/389/276 1809 | f 354/389/277 353/388/277 350/381/277 355/390/277 1810 | f 353/388/278 255/387/278 254/391/278 253/392/278 1811 | f 252/393/279 249/394/279 356/395/279 253/392/279 1812 | f 353/388/280 253/392/280 356/395/280 1813 | f 251/396/281 280/397/281 279/398/281 250/399/281 1814 | f 248/400/281 250/399/281 279/398/281 357/401/281 1815 | f 248/400/282 357/401/282 356/395/282 249/402/282 1816 | f 277/403/283 276/404/283 358/405/283 278/406/283 1817 | f 278/406/284 358/405/284 357/401/284 279/398/284 1818 | f 273/407/285 272/408/285 359/409/285 358/405/285 1819 | f 359/409/286 360/410/286 358/405/286 1820 | f 361/411/287 362/412/287 363/413/287 364/414/287 1821 | f 359/409/288 272/408/288 271/415/288 281/416/288 1822 | f 281/416/289 282/417/289 283/418/289 365/419/289 1823 | f 359/409/289 281/416/289 365/419/289 363/413/289 1824 | f 363/413/290 365/419/290 364/414/290 1825 | f 362/412/291 366/420/291 363/413/291 1826 | f 247/421/292 292/422/292 367/423/292 1827 | f 298/424/293 297/425/293 368/426/293 367/423/293 1828 | f 367/423/294 292/422/294 293/427/294 294/428/294 1829 | f 367/423/295 294/428/295 295/429/295 296/430/295 1830 | f 298/424/295 367/423/295 296/430/295 1831 | f 289/431/296 288/432/296 369/433/296 290/434/296 1832 | f 290/434/297 369/433/297 368/426/297 291/435/297 1833 | f 291/435/298 368/426/298 297/425/298 1834 | f 284/436/299 286/437/299 369/433/299 285/438/299 1835 | f 369/433/300 288/432/300 285/438/300 1836 | f 327/439/301 328/440/301 370/441/301 371/442/301 1837 | f 327/439/302 371/442/302 369/433/302 287/443/302 1838 | f 369/433/302 286/437/302 287/443/302 1839 | f 325/444/303 372/445/303 370/441/303 326/446/303 1840 | f 323/447/304 324/448/304 326/446/304 329/449/304 1841 | f 328/440/304 329/449/304 326/446/304 370/441/304 1842 | f 237/450/305 236/451/305 372/445/305 325/444/305 1843 | f 372/445/306 236/451/306 235/452/306 234/453/306 1844 | f 232/454/307 233/455/307 373/456/307 234/453/307 1845 | f 234/453/308 373/456/308 374/457/308 372/445/308 1846 | f 373/456/309 233/458/309 213/459/309 212/460/309 1847 | f 216/461/310 217/462/310 221/463/310 215/464/310 1848 | f 214/465/310 215/464/310 221/463/310 375/466/310 1849 | f 212/460/311 214/465/311 375/466/311 373/456/311 1850 | f 219/467/312 376/468/312 377/469/312 220/470/312 1851 | f 375/466/313 221/463/313 220/470/313 377/469/313 1852 | f 376/468/314 219/467/314 218/471/314 378/472/314 1853 | f 376/468/315 378/472/315 379/473/315 1854 | f 304/474/316 303/475/316 380/476/316 376/468/316 1855 | f 376/468/317 379/473/317 306/477/317 305/478/317 1856 | f 304/474/318 376/468/318 305/478/318 1857 | f 381/479/319 382/480/319 302/481/319 1858 | f 301/482/320 302/481/320 382/480/320 299/483/320 1859 | f 299/483/321 382/480/321 380/476/321 300/484/321 1860 | f 300/484/322 380/476/322 303/475/322 1861 | f 228/485/323 227/486/323 382/480/323 383/487/323 1862 | f 382/480/324 381/479/324 384/488/324 383/487/324 1863 | f 227/486/325 229/489/325 385/490/325 382/480/325 1864 | f 385/490/326 386/491/326 382/480/326 1865 | f 223/492/327 222/493/327 226/494/327 231/495/327 1866 | f 230/496/327 231/495/327 226/494/327 387/497/327 1867 | f 226/494/328 225/498/328 387/497/328 1868 | f 230/496/329 387/497/329 385/490/329 229/489/329 1869 | f 387/497/330 225/498/330 224/499/330 243/500/330 1870 | f 388/501/331 241/502/331 240/503/331 307/504/331 1871 | f 310/505/332 311/506/332 314/507/332 309/508/332 1872 | f 308/509/332 309/508/332 314/507/332 389/510/332 1873 | f 307/504/333 308/509/333 389/510/333 388/501/333 1874 | f 390/511/334 313/512/334 312/513/334 391/514/334 1875 | f 340/515/335 390/511/335 391/514/335 1876 | f 390/511/336 340/516/336 339/517/336 341/518/336 1877 | f 336/519/337 335/520/337 392/521/337 341/518/337 1878 | f 390/511/338 341/518/338 392/521/338 1879 | f 334/522/339 333/366/339 343/365/339 330/523/339 1880 | f 331/524/340 330/523/340 343/365/340 338/525/340 1881 | f 337/526/340 338/525/340 343/365/340 392/521/340 1882 | f 335/520/341 337/526/341 392/521/341 1883 | f 343/365/342 348/371/342 393/527/342 392/521/342 1884 | f 394/528/343 390/511/343 392/521/343 393/527/343 1885 | f 393/527/344 395/529/344 396/530/344 394/528/344 1886 | f 348/371/345 397/531/345 395/529/345 393/527/345 1887 | f 397/531/346 398/532/346 399/533/346 395/529/346 1888 | f 400/534/347 401/535/347 398/532/347 397/531/347 1889 | f 352/384/348 351/382/348 401/535/348 400/534/348 1890 | f 401/535/349 402/536/349 403/537/349 398/532/349 1891 | f 351/382/350 404/538/350 402/536/350 401/535/350 1892 | f 404/538/351 405/539/351 406/540/351 402/536/351 1893 | f 353/388/352 356/395/352 405/539/352 404/538/352 1894 | f 405/539/353 407/541/353 408/542/353 406/540/353 1895 | f 356/395/354 357/401/354 407/541/354 405/539/354 1896 | f 407/541/355 360/410/355 409/543/355 408/542/355 1897 | f 357/401/356 358/405/356 360/410/356 407/541/356 1898 | f 360/410/357 359/409/357 410/544/357 409/543/357 1899 | f 359/409/358 363/413/358 411/545/358 410/544/358 1900 | f 412/546/359 413/547/359 410/544/359 411/545/359 1901 | f 414/548/360 415/549/360 413/547/360 412/546/360 1902 | f 371/442/361 416/550/361 415/549/361 414/548/361 1903 | f 416/550/362 417/551/362 418/552/362 415/549/362 1904 | f 419/553/363 420/554/363 417/551/363 416/550/363 1905 | f 374/457/364 421/555/364 420/554/364 419/553/364 1906 | f 421/555/365 422/556/365 423/557/365 420/554/365 1907 | f 375/466/366 377/469/366 422/556/366 421/555/366 1908 | f 422/556/367 424/558/367 425/559/367 423/557/367 1909 | f 377/469/368 426/560/368 424/558/368 422/556/368 1910 | f 426/560/369 386/491/369 427/561/369 424/558/369 1911 | f 380/476/370 382/480/370 386/491/370 426/560/370 1912 | f 386/491/371 385/490/371 428/562/371 427/561/371 1913 | f 385/490/372 387/497/372 429/563/372 428/562/372 1914 | f 430/564/373 431/565/373 428/562/373 429/563/373 1915 | f 396/530/374 432/566/374 431/565/374 430/564/374 1916 | f 432/566/375 433/567/375 434/568/375 431/565/375 1917 | f 399/533/376 435/569/376 433/567/376 432/566/376 1918 | f 435/569/377 436/570/377 437/571/377 433/567/377 1919 | f 403/537/378 438/572/378 436/570/378 435/569/378 1920 | f 438/572/379 439/573/379 440/574/379 436/570/379 1921 | f 406/540/380 408/542/380 439/573/380 438/572/380 1922 | f 439/573/381 441/575/381 418/552/381 440/574/381 1923 | f 408/542/382 409/543/382 441/575/382 439/573/382 1924 | f 442/576/383 437/571/383 436/570/383 440/574/383 1925 | f 440/574/384 418/552/384 417/551/384 442/576/384 1926 | f 423/557/385 425/559/385 437/571/385 442/576/385 1927 | f 425/559/386 434/568/386 433/567/386 437/571/386 1928 | f 427/561/387 428/562/387 431/565/387 434/568/387 1929 | f 429/563/388 388/501/388 389/510/388 430/564/388 1930 | f 394/528/389 396/530/389 430/564/389 389/510/389 1931 | f 434/568/390 425/559/390 424/558/390 427/561/390 1932 | f 442/576/391 417/551/391 420/554/391 423/557/391 1933 | f 416/550/392 371/442/392 370/441/392 419/553/392 1934 | f 441/575/393 413/547/393 415/549/393 418/552/393 1935 | f 409/543/394 410/544/394 413/547/394 441/575/394 1936 | f 412/546/395 367/423/395 368/426/395 414/548/395 1937 | f 438/572/396 403/537/396 402/536/396 406/540/396 1938 | f 435/569/397 399/533/397 398/532/397 403/537/397 1939 | f 397/531/398 348/371/398 346/369/398 400/534/398 1940 | f 432/566/399 396/530/399 395/529/399 399/533/399 1941 | f 389/510/400 314/507/400 313/512/400 390/511/400 1942 | f 394/528/401 389/510/401 390/511/401 1943 | f 243/500/402 242/577/402 239/578/402 238/579/402 1944 | f 243/500/402 238/579/402 241/502/402 387/497/402 1945 | f 387/497/403 241/502/403 388/501/403 429/563/403 1946 | f 426/560/404 377/469/404 376/468/404 380/476/404 1947 | f 421/555/405 374/457/405 373/456/405 375/466/405 1948 | f 419/553/406 370/441/406 372/445/406 374/457/406 1949 | f 414/548/407 368/426/407 369/433/407 371/442/407 1950 | f 411/545/408 244/580/408 246/581/408 247/582/408 1951 | f 411/545/409 247/582/409 367/423/409 412/546/409 1952 | f 404/538/410 351/382/410 350/381/410 353/388/410 1953 | f 400/534/411 346/369/411 349/374/411 352/384/411 1954 | f 347/583/412 342/584/412 332/353/412 344/585/412 1955 | f 344/585/413 332/353/413 1/1/413 4/4/413 1956 | f 4/4/414 258/276/414 345/586/414 344/585/414 1957 | f 365/587/415 283/302/415 35/35/415 364/588/415 1958 | f 364/588/416 35/35/416 34/34/416 361/589/416 1959 | f 34/34/417 321/341/417 366/590/417 362/591/417 1960 | f 34/34/417 362/591/417 361/589/417 1961 | f 378/592/418 218/234/418 74/77/418 379/593/418 1962 | f 379/593/419 74/77/419 78/81/419 306/326/419 1963 | f 391/594/420 312/332/420 100/103/420 340/595/420 1964 | f 100/103/421 104/107/421 340/595/421 1965 | f 443/596/422 319/339/422 10/10/422 444/597/422 1966 | f 444/597/423 10/10/423 9/9/423 256/274/423 1967 | f 444/597/424 256/274/424 354/598/424 355/599/424 1968 | f 384/600/425 381/601/425 302/322/425 1969 | f 384/600/425 302/322/425 81/84/425 80/83/425 1970 | f 80/83/426 228/244/426 383/602/426 384/600/426 1971 | f 349/374/427 262/603/427 261/604/427 265/605/427 1972 | f 349/374/428 265/605/428 266/606/428 352/384/428 1973 | f 268/607/429 317/385/429 352/384/429 267/608/429 1974 | f 266/606/429 267/608/429 352/384/429 1975 | f 444/609/430 355/390/430 350/381/430 443/610/430 1976 | f 319/611/431 443/610/431 350/381/431 318/612/431 1977 | f 318/612/431 350/381/431 315/380/431 1978 | f 358/405/432 276/404/432 275/613/432 274/614/432 1979 | f 358/405/433 274/614/433 270/615/433 269/616/433 1980 | f 358/405/433 269/616/433 273/407/433 1981 | f 363/413/434 366/420/434 321/617/434 320/618/434 1982 | f 245/619/435 244/580/435 411/545/435 322/620/435 1983 | f 320/618/436 322/620/436 411/545/436 363/413/436 1984 | # 419 polygons - 46 triangles 1985 | 1986 | -------------------------------------------------------------------------------- /script_3D_Studio_Max/README.md: -------------------------------------------------------------------------------- 1 | ## This script uses Python API in Autodesk 3D Studio Max 2 | 3 | - Copyright (C) Paweł Kowalski 4 | 5 | - www.pkowalski.com 6 | - www.behance.net/pkowalski 7 | 8 | I cannot test this version of script at the moment. It was updated, just as others, but not tested yet. 9 | 10 | ## How to use: 11 | 12 | To run the script execute: 13 | python.ExecuteFile "path:\to\Script_3DSMax.py" 14 | in MAXScript Listener 15 | 16 | Script has PySide (QT) GUI. 17 | It will ask user for a path to the directory with additional files that are required. 18 | -------------------------------------------------------------------------------- /script_Blender/README.md: -------------------------------------------------------------------------------- 1 | ## This script uses Python API in Blender 2 | 3 | - Copyright (C) Paweł Kowalski 4 | 5 | - www.pkowalski.com 6 | - www.behance.net/pkowalski 7 | 8 | ## How to use: 9 | 10 | To run the script: 11 | Create a new file in Blender's Text Editor and paste the content of script into it. 12 | Run the script with Text > Run Script or "Crtl + P" 13 | 14 | Script has a native Blender GUI that will appear in "Scene" Panel inside "Properties" area. 15 | It will ask user for a path to the directory with additional files that are required. 16 | -------------------------------------------------------------------------------- /script_Blender/Script_Blender.py: -------------------------------------------------------------------------------- 1 | # __author__ = 'Pawel Kowalski' 2 | # 3 | # This script was created to demonstrate the use of Python in Autodesk Maya 4 | # 5 | # Copyright (C) Pawel Kowalski 6 | # www.pkowalski.com 7 | # www.behance.net/pkowalski 8 | # 9 | # Open the script from Script Editor with command: 10 | # execcfile('path:\to\Script_Maya.py') 11 | # 12 | # This program is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU General Public License 14 | # as published by the Free Software Foundation; either version 2 15 | # of the License, or (at your option) any later version. 16 | # 17 | # This program is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with this program; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 25 | # 26 | # 27 | # To run the script execute: 28 | # execcfile('path:\to\Script_Maya.py') 29 | # in Script Editor 30 | # 31 | # 32 | # 33 | 34 | 35 | bl_info = { 36 | "name": "Blender examplary script", 37 | "author": "Pawel Kowalski", 38 | "version": (1, 0), 39 | "blender": (2, 76, "b"), 40 | "location": "Properties > Scene", 41 | "description": "Exemplary script for Python API of Blender", 42 | "category": "Scene" 43 | } 44 | 45 | import bmesh 46 | import bpy 47 | import math 48 | import mathutils 49 | import os 50 | import random 51 | import time 52 | from bpy_extras import object_utils 53 | from bpy_extras.io_utils import ExportHelper 54 | 55 | 56 | def frange(start, end, jump): 57 | """ 58 | Function returns a list of floats, similar to int range(function) 59 | 60 | :param start: float - Start of a range 61 | :param end: float - End of a range 62 | :param jump: float - Interval between values 63 | :rtype : list of floats 64 | """ 65 | while start < end: 66 | yield start 67 | start += jump 68 | 69 | 70 | def set_scale_keys(target, keyframes): 71 | """ 72 | Function animates the scale of given object by creating the given keyframes. 73 | 74 | :param target: String - Name of an object which scale will be animated 75 | :param keyframes: Python list - Keyframes that will be created: [[int time, float scale (1 = 100%),] ...] 76 | """ 77 | 78 | for keyframe in keyframes: # For every keyframe from the list of keyframes scale object at proper time 79 | scale_value = float(keyframe[0]) 80 | bpy.data.objects[target].scale = (scale_value, scale_value, scale_value) # Set values for scale of object 81 | bpy.data.objects[target].keyframe_insert(data_path='scale', frame=keyframe[1]) # Insert keyframe to the scale 82 | 83 | 84 | def leafs_rotations(number_of_leafs): 85 | """ 86 | Creates the list of angles of leafs around the palm tree. 87 | Leafs should be placed more or less evenly around the trunk but appear to be placed randomly. 88 | The leafs should not be placed too close, because they would overlap. 89 | 90 | :param number_of_leafs: int - Number of leafs 91 | :return: Python list - List of angles of leafs around the palm tree 92 | """ 93 | 94 | x = -180 # Leafs are placed around the trunk, so the range is 360 deg.. x = 0, y = 360 would also be ok. 95 | y = 180 96 | angles = [] 97 | jump = (y - x) / float(number_of_leafs) # Divide the range by the number of leafs and create an array 98 | 99 | while x < y: 100 | random.seed() 101 | angles.append(random.uniform(x - (jump / 3.0), x + (jump / 3.0))) # every leaf is placed +/- (1/3)*interval 102 | x += jump 103 | 104 | return angles 105 | 106 | 107 | def set_position_keys(target, keyframes): 108 | """ 109 | Function animates the position of given object by creating the given keyframes. 110 | 111 | :param target: String - Name of an object which scale will be animated 112 | :param keyframes: Python list - Keyframes that will be created: [[int time, [float x, float y, float z]], ...] 113 | """ 114 | 115 | for keyframe in keyframes: 116 | bpy.data.objects[target].location = keyframe[0] 117 | bpy.data.objects[target].keyframe_insert(data_path='location', frame=keyframe[1]) 118 | 119 | 120 | def create_object(verts_pos, face_verts, name): 121 | """ 122 | Function creates an object with mesh given by vertice and face data. 123 | 124 | :type face_verts: Python list 125 | :type verts_pos: Python list 126 | :type name: String 127 | """ 128 | mesh = bpy.data.meshes.new(name) # Create the data for object that will be created 129 | bm = bmesh.new() # Create the bmesh that will store the mesh of an object 130 | for v_co in verts_pos: 131 | bm.verts.new(v_co) # Add a new vertex for every position in the list 132 | bm.verts.ensure_lookup_table() 133 | for f_idx in face_verts: 134 | bm.faces.new([bm.verts[i] for i in f_idx]) # Add a new face for every entry in the list 135 | bm.to_mesh(mesh) # write the data from bmesh "bm" to mesh "mesh" 136 | mesh.update() 137 | object_utils.object_data_add(bpy.context, mesh) # Add the object with data from "mesh" to the scene 138 | 139 | 140 | def create_palm(diameter, segs_num, leafs_num, bending, id_num, anim_start, anim_end): 141 | """ 142 | Function creates a single palm tree. 143 | This function was created to show how to create basic geometry objects, use instances and use modifications. 144 | 145 | :param diameter: float - inner diameter of pine 146 | :param segs_num: int - number of segments of the pine 147 | :param leafs_num: int - number of leafs 148 | :param bending: float - how much bended the pine is 149 | :param id_num: int - ID of the tree 150 | :param anim_start: int - Starting frame of the tree animation 151 | :param anim_end: int - Ending frame of the tree animation 152 | """ 153 | r1 = diameter / 2 154 | r2 = r1 * 1.3 155 | h = diameter # Height of each segment 156 | 157 | keyframe_interval = (anim_end - anim_start) / (segs_num + 1.0) # interval of scale keyframes of the pine segments 158 | 159 | # list of times of keyframes for the pine and leafs. Equal time intervals. 160 | keyframe_list = list(frange(start=anim_start, end=anim_end, jump=keyframe_interval)) 161 | 162 | keyframe_list.reverse() # Because the pop() will be used and the first frame should be the smallest number 163 | 164 | bpy.ops.mesh.primitive_cone_add(radius1=r1, radius2=r2, depth=h) # Create a "cone" primitive. 165 | # It will be set as a current active object 166 | bpy.context.scene.objects.active.location = (0, 0, 0) # set the location of the selected object. 167 | bpy.context.scene.objects.active.name = "root_" + str(id_num) # rename the object 168 | segments_tab = [] # A list of all the segments of the tree. 169 | anim_start_frame = keyframe_list.pop() 170 | set_scale_keys(target="root_" + str(id_num), keyframes=[[0.001, anim_start_frame], 171 | [1.2, anim_start_frame + keyframe_interval], 172 | [1, anim_start_frame + 2 * keyframe_interval]]) 173 | segments_tab.append(bpy.context.scene.objects.active) # add the active object (cone) to the list of segments 174 | 175 | for i in range(segs_num - 1): # create a segs_num-1 number of copies. 176 | # There will be segs_num segments then, with root segment included. 177 | current_segment_name = 'Palm_element_' + str(id_num) + '_' + str(i) # Ordnung muss sein 178 | bpy.ops.object.duplicate() # Copies will be used here instead of instances (objects with linked data) 179 | # Leafs will be created as an instances 180 | segment = bpy.context.scene.objects.active # Created copy is a current active object 181 | segment.name = current_segment_name 182 | segment.location = mathutils.Vector((0, 0, 0)) 183 | segment.scale = (1.0 - ((i + 1) / (segs_num * 4.0)), 1.0 - ((i + 1) / (segs_num * 4.0)), 1) 184 | anim_start_frame = keyframe_list.pop() # pop the starting frame of this segment animation 185 | set_scale_keys(target=current_segment_name, keyframes=[[0.001, anim_start_frame], 186 | [1.2, anim_start_frame + keyframe_interval], 187 | [1, anim_start_frame + 2 * keyframe_interval]]) 188 | segment.parent = segments_tab[0] # every segment will be parented to the root segment 189 | segments_tab.append(segment) 190 | 191 | verts_list = [[0.0874634, 0.283682, -0.150049], [-9.33334, 3.45312, -5.19915], [-0.0979366, -0.242619, -0.151449], 192 | [0.0756626, 0.288981, 0.00435066], [-0.110037, -0.237219, 0.00305176], 193 | [-0.0341358, 0.0332813, 0.222252], [-0.046236, 0.0384817, 0.376751], [-2.00844, -0.0782185, -0.04245], 194 | [-1.49184, 1.38118, -0.0476494], [-1.51604, 1.39538, 0.200851], [-2.03964, -0.0789185, 0.205851], 195 | [-1.79314, 0.661982, 0.356852], [-8.51614, 2.95795, -3.08655], [-8.65224, 1.73258, -3.67535], 196 | [-7.77134, 3.93545, -3.64315], [-7.89874, 3.98053, -3.41335], [-8.77254, 1.77508, -3.43515], 197 | [-8.38964, 2.89923, -3.33135], [-1.81954, 0.668982, 0.60585], [-5.86674, 0.829681, -0.820549], 198 | [-5.03134, 3.19562, -0.787249], [-5.10854, 3.23514, -0.531349], [-5.94654, 0.870181, -0.570749], 199 | [-5.56024, 2.07138, -0.438848], [-5.63774, 2.11408, -0.182249], [-7.35774, 1.29268, -2.00885], 200 | [-6.54364, 3.59313, -1.90675], [-6.65514, 3.64373, -1.65775], [-7.46144, 1.34048, -1.75845], 201 | [-7.10164, 2.51205, -1.60085], [-3.83754, 1.37038, 0.50765], [-4.09794, 0.257582, -0.106649], 202 | [-3.33404, 2.40815, -0.13835], [-3.38054, 2.42888, 0.109451], [-4.14974, 0.269781, 0.141151], 203 | [-3.78934, 1.35658, 0.259151], [-7.21234, 2.56052, -1.34435], [-8.70384, 4.0245, -4.67165], 204 | [-9.38574, 2.48178, -4.54065], [-9.16784, 3.28523, -4.39535], [-9.32104, 2.46601, -4.65515], 205 | [-8.76504, 4.03897, -4.55925], [-9.10294, 3.26697, -4.51255]] 206 | 207 | faces_list = [[0, 5, 8], [3, 9, 6], [0, 8, 3], [1, 40, 38], [2, 5, 4], [5, 2, 11], [1, 38, 39], [5, 0, 6], 208 | [17, 37, 14], [15, 39, 12], [37, 41, 15], [7, 2, 10], [40, 42, 17], [10, 4, 18], [11, 32, 8], 209 | [9, 33, 18], [8, 32, 9], [13, 25, 16], [7, 31, 11], [16, 28, 12], [23, 29, 20], [21, 36, 24], 210 | [20, 27, 21], [19, 34, 22], [19, 29, 23], [22, 30, 24], [35, 20, 32], [33, 21, 30], [32, 20, 33], 211 | [25, 19, 28], [31, 19, 35], [28, 22, 36], [29, 17, 26], [27, 12, 36], [26, 15, 27], [31, 10, 34], 212 | [25, 17, 29], [34, 18, 30], [40, 13, 38], [38, 16, 12], [42, 1, 37], [41, 1, 39], [37, 1, 41], 213 | [40, 1, 42], [5, 11, 8], [9, 18, 6], [8, 9, 3], [5, 6, 4], [2, 7, 11], [0, 3, 6], [17, 42, 37], 214 | [15, 41, 39], [15, 14, 37], [2, 4, 10], [17, 13, 40], [4, 6, 18], [11, 35, 32], [33, 30, 18], 215 | [32, 33, 9], [25, 28, 16], [31, 35, 11], [28, 36, 12], [29, 26, 20], [21, 27, 36], [20, 26, 27], 216 | [19, 31, 34], [19, 25, 29], [22, 34, 30], [35, 23, 20], [21, 24, 30], [20, 21, 33], [19, 22, 28], 217 | [19, 23, 35], [22, 24, 36], [17, 14, 26], [27, 15, 12], [26, 14, 15], [31, 7, 10], [25, 13, 17], 218 | [34, 10, 18], [13, 16, 38], [12, 39, 38]] 219 | i = 0 # This could, should and will be avoided.. 220 | current_leaf_name = "leaf_" + str(id_num) + '_' + str(i) 221 | i += 1 222 | 223 | create_object(verts_list, faces_list, current_leaf_name) 224 | bpy.context.scene.update() 225 | anim_start_frame = keyframe_list.pop() 226 | last_node = segments_tab[-1] 227 | set_scale_keys(target=current_leaf_name, 228 | keyframes=[[0.001, anim_start_frame], 229 | [1, anim_start_frame + keyframe_interval]]) 230 | 231 | bpy.context.scene.objects[current_leaf_name].location = mathutils.Vector((0, 0, 0)) 232 | bpy.context.scene.objects[current_leaf_name].parent = last_node 233 | 234 | for rot_z in leafs_rotations(number_of_leafs=leafs_num): # create an instance of leaf for every angle returned by 235 | # leafs_rotation() function 236 | current_leaf_name = "leaf_" + str(id_num) + '_' + str(i) 237 | bpy.ops.object.duplicate(linked=True) 238 | leaf = bpy.context.scene.objects.active 239 | leaf.name = current_leaf_name 240 | leaf.location[2] = diameter 241 | leaf.scale = (0.9, 0.9, 0.9) 242 | leaf.rotation_euler = (random.uniform(-math.pi / 15, math.pi / 15), 243 | random.uniform(-math.pi / 8, math.pi / 10), 244 | rot_z) 245 | i += 1 246 | 247 | i = 0 248 | pos = (0, 0, 0) 249 | for el in segments_tab[1:]: 250 | rotation = math.radians(bending * (float(i) / segs_num)) 251 | pos = (pos[0] + math.sin(rotation) * diameter, 252 | 0, 253 | pos[2] + math.cos(rotation) * diameter) 254 | print(pos) 255 | el.location = mathutils.Vector(pos) 256 | el.rotation_euler[1] = rotation 257 | i += 1 258 | return segments_tab[0] 259 | 260 | 261 | def prepare_scene(): 262 | """ 263 | The function sets the basic parameters of the scene: time range and render settings. 264 | 265 | """ 266 | 267 | for obj in bpy.data.objects: # Blender usually creates some object in new file. Script deletes all objects in the 268 | # scene to avoid confusion 269 | obj.select = True 270 | bpy.ops.object.delete() 271 | 272 | bpy.context.scene.frame_end = 260 # set the animation range 273 | bpy.context.scene.frame_start = 0 274 | 275 | scn = bpy.context.scene # Just to make next lines shorter 276 | 277 | scn.render.resolution_x = 1024 # Set the resolution of render 278 | scn.render.resolution_y = 768 279 | scn.render.engine = 'CYCLES' # Change the renderer to Cycles 280 | scn.world.use_nodes = True # Use shader nodes to render the world - we need them to set background 281 | wd = scn.world 282 | nt = bpy.data.worlds[wd.name].node_tree 283 | scn.update() # This function need to be evaluated sometimes. It was established, by trial and error method, 284 | # that it need to be evaluated now or the next line will produce an error 285 | bpy.context.scene.cycles.samples = 64 286 | 287 | nt.nodes['Background'].inputs[0].default_value = (1, 1, 1, 1) # Set the color of background that will be used 288 | # for lighting 289 | nt.nodes['Background'].inputs[1].default_value = 0.2 # Set the intensity of background emission 290 | 291 | bpy.ops.object.lamp_add(type='AREA', # Create an area light 292 | view_align=False, 293 | location=(-186.0, -134, 190), 294 | rotation=(0.79, 0, -0.96), 295 | layers=(True, False, False, False, False, False, False, False, False, False, False, False, 296 | False, False, False, False, False, False, False, False)) 297 | bpy.context.scene.objects.active.data.size = 40 # Resize the light. 298 | bpy.data.lamps[0].node_tree.nodes["Emission"].inputs[1].default_value = 1000000.0 # Change the intensity of light 299 | 300 | 301 | def import_and_animate_basic_meshes(): 302 | """ 303 | This function imports some objects and animates them. 304 | It was created to show how to import objects and present one way of creating keyframes of animation. 305 | """ 306 | 307 | path = bpy.context.scene.content_path # The path to the directory with content is saved in the data od scene 308 | # as a String property 309 | bpy.ops.import_scene.obj(filepath=os.path.join(path, 'water.obj')) 310 | set_scale_keys(target="water", keyframes=[[0.001, 1], [1, 9]]) # Set the animation keys 311 | 312 | bpy.ops.import_scene.obj(filepath=os.path.join(path, 'land.obj')) 313 | set_scale_keys(target="land", keyframes=[[0.001, 8], [1, 11]]) 314 | 315 | 316 | def create_shark_and_cloud(): 317 | """ 318 | Creates meshes from vertex and face data. 319 | Two functions are used: one is easier to read an one is more useful. 320 | Similar functions can be used in importer plugin. 321 | """ 322 | 323 | shark_verts_pos = [[-2.42281, -0.814631, 1.55561], [0.0166863, -0.854455, 1.91858], [-2.42281, -0.482041, 1.55561], 324 | [0.0166863, -0.44221, 1.91858], [-2.57592, -0.814631, 3.45857], [-1.41455, -0.810425, 3.54678], 325 | [-2.57592, -0.482041, 3.45857], [-1.41455, -0.486246, 3.54678], [-2.54367, -0.8214, -0.819357], 326 | [-2.54367, -0.475272, -0.819357], [0.422536, -0.421143, -0.277747], 327 | [0.422536, -0.875526, -0.277747]] 328 | shark_face_verts = [[8, 10, 11], [4, 7, 6], [0, 5, 4], [1, 7, 5], [3, 6, 7], [2, 4, 6], [0, 9, 8], [2, 10, 9], 329 | [3, 11, 10], [1, 8, 11], [8, 9, 10], [4, 5, 7], [0, 1, 5], [1, 3, 7], [3, 2, 6], [2, 0, 4], 330 | [0, 2, 9], [2, 3, 10], [3, 1, 11], [1, 0, 8]] 331 | 332 | create_object(shark_verts_pos, shark_face_verts, "shark") 333 | set_scale_keys(target="shark", keyframes=[[0.001, 9], [1, 15]]) 334 | bpy.data.objects["shark"].location = (-9.18464, 54.9695, -4) 335 | 336 | cloud_verts_pos = [[-4.59048, -11.5324, -2.85738], [4.19166, -11.3976, -1.66769], [-2.72098, 4.70308, -0.947684], 337 | [5.35751, 5.31851, -1.84713], [-2.55545, -10.6202, 1.76613], [6.33762, -11.4932, 3.83193], 338 | [-4.05797, 5.18567, 4.01239], [5.16506, 4.23825, 3.03181], [-7.57451, -3.27952, -1.45211], 339 | [-5.04695, -3.47346, -2.50455], [0.944433, 6.59175, -3.95915], [5.33078, -2.79647, -1.9336], 340 | [-1.41402, -13.436, -1.63148], [2.25454, -13.8944, 4.36555], [5.20539, -3.61147, 4.18473], 341 | [1.21982, 6.42224, 2.21349], [-5.31748, -3.30419, 3.23747], [6.47434, -13.4315, 0.369284], 342 | [-4.49047, -13.0672, -0.366047], [7.06894, 7.09671, -0.225245], [-3.55781, 7.03288, 2.01675], 343 | [-4.64846, -11.0102, -2.8238], [-5.21395, -10.2643, -2.81557], [-5.11732, -9.4053, -2.68607], 344 | [-4.63491, -8.46356, -2.67066], [-4.67857, -7.34732, -3.28498], [-4.66886, -6.0801, -2.95555], 345 | [-4.96425, -4.77316, -3.20924], [-3.07051, 4.22094, -1.27774], [-3.28412, 3.47717, -1.22602], 346 | [-3.06383, 2.42297, -1.70111], [-4.21875, 1.15586, -2.44524], [-4.59185, 0.108139, -1.878], 347 | [-4.55174, -1.04221, -2.62517], [-5.07763, -2.24332, -2.5385], [-2.5496, 5.2281, -1.08924], 348 | [-2.47412, 5.97114, -1.56816], [-2.32934, 6.64407, -2.13384], [-1.81588, 6.7158, -2.66064], 349 | [-1.09603, 6.51815, -3.1696], [-0.384585, 6.59353, -3.55172], [0.2763, 6.63422, -3.91024], 350 | [4.97608, 5.33017, -2.21633], [4.42463, 5.3988, -2.82698], [3.87665, 5.59257, -3.30965], 351 | [3.39066, 6.12778, -3.09912], [2.87637, 6.75938, -2.90991], [2.28094, 6.88389, -3.07711], 352 | [1.62215, 6.6081, -3.54207], [5.6303, 4.88423, -1.69767], [5.93795, 4.18237, -2.02055], 353 | [6.34299, 3.28777, -2.50259], [6.01454, 2.16795, -2.41291], [5.48294, 0.915054, -1.48493], 354 | [5.56809, -0.331761, -1.62049], [5.22757, -1.57047, -1.65198], [4.34654, -10.8263, -1.71773], 355 | [4.03986, -10.0871, -1.25091], [4.44435, -9.26752, -1.48684], [4.98975, -8.10985, -2.09718], 356 | [5.97541, -6.66577, -2.29159], [6.40411, -5.31424, -1.4463], [5.74385, -4.03539, -2.07227], 357 | [3.67823, -11.9509, -1.39023], [2.99699, -12.6519, -1.24017], [2.34207, -12.9799, -1.36114], 358 | [1.56308, -12.9821, -1.2517], [0.805849, -13.3548, -0.833223], [0.0592078, -13.9428, -0.927655], 359 | [-0.69599, -13.9633, -1.40722], [-4.48329, -11.8284, -3.03768], [-4.25605, -12.4004, -3.18883], 360 | [-3.80349, -12.8516, -3.39871], [-3.33853, -12.9033, -3.36947], [-2.8886, -12.6499, -2.84013], 361 | [-2.44545, -12.7983, -2.31099], [-1.98028, -12.9664, -1.95086], [-2.35827, -11.0242, 1.95376], 362 | [-2.04212, -11.8418, 2.40821], [-1.43451, -12.5864, 2.6025], [-0.464936, -12.8909, 2.70888], 363 | [0.277662, -13.0811, 3.36934], [0.744878, -13.5168, 3.99864], [1.39473, -13.9213, 4.33037], 364 | [5.84659, -11.8736, 4.11287], [5.35056, -12.4986, 4.28095], [4.93181, -13.3184, 4.37555], 365 | [4.62338, -14.1254, 4.68631], [4.25795, -14.4315, 4.95028], [3.74167, -14.2483, 4.93854], 366 | [3.06639, -13.9383, 4.62452], [6.93981, -10.9459, 3.54401], [6.81082, -10.1381, 3.49907], 367 | [5.67307, -9.16372, 4.27475], [5.07461, -8.06029, 4.44253], [5.59865, -6.89624, 3.44476], 368 | [5.71477, -5.76001, 4.10377], [5.43378, -4.68175, 4.73674], [5.26349, 3.76686, 2.83477], 369 | [5.03478, 3.10254, 2.51034], [5.60882, 2.3842, 2.96899], [5.28509, 1.44248, 4.19756], 370 | [5.06031, 0.227875, 4.11658], [5.74926, -1.10308, 4.13182], [5.23316, -2.41592, 4.08796], 371 | [4.77104, 4.2432, 2.87455], [4.26316, 4.37717, 2.64462], [3.77346, 4.88327, 2.60995], 372 | [3.33051, 5.59131, 2.87838], [2.8952, 5.78294, 3.20531], [2.40009, 5.74118, 3.04044], 373 | [1.83982, 6.00027, 2.49207], [-3.6252, 5.55577, 4.01007], [-3.01992, 5.85201, 3.70423], 374 | [-2.42564, 5.92598, 3.42756], [-1.77262, 6.08702, 3.08948], [-1.00918, 6.32267, 2.76293], 375 | [-0.205574, 6.30027, 2.54408], [0.543592, 6.39312, 2.26653], [-4.3646, 4.48682, 3.61868], 376 | [-4.17321, 3.39143, 3.43435], [-4.33876, 2.23708, 3.90402], [-4.28137, 1.23009, 3.54935], 377 | [-5.12764, 0.0918598, 3.99807], [-5.19081, -1.02315, 3.43132], [-5.29362, -2.11191, 2.91219], 378 | [-2.60726, -10.127, 2.17327], [-3.51078, -9.45301, 2.9977], [-3.79006, -8.71694, 3.36178], 379 | [-4.10539, -7.95529, 2.76918], [-4.42019, -6.85349, 2.78951], [-4.84402, -5.52935, 2.81615], 380 | [-5.09285, -4.46128, 3.52657], [4.30574, -11.5671, -1.50565], [4.50195, -11.8334, -1.25188], 381 | [4.83568, -12.1377, -0.98148], [5.20644, -12.408, -0.722621], [5.55156, -12.5921, -0.461673], 382 | [5.89193, -12.7367, -0.20753], [6.24181, -12.9731, 0.0607195], [6.29933, -11.7357, 3.70063], 383 | [6.30325, -12.1743, 3.31666], [6.22233, -12.6801, 2.81164], [5.95056, -13.1009, 2.2757], 384 | [5.81332, -13.7173, 1.74536], [6.03473, -14.0856, 1.23336], [6.39401, -13.9265, 0.764305], 385 | [-3.11063, -10.9355, 1.50183], [-3.75236, -11.6171, 1.07977], [-4.00088, -12.4831, 0.713789], 386 | [-3.78955, -13.2201, 0.516292], [-3.5181, -13.5544, 0.376321], [-3.54252, -13.4297, 0.189794], 387 | [-3.90938, -13.1606, -0.068965], [-4.75366, -11.8561, -2.68642], [-4.89771, -12.3524, -2.40486], 388 | [-5.09703, -12.9067, -2.14409], [-5.40772, -13.3663, -1.91872], [-5.6412, -13.5851, -1.59908], 389 | [-5.5659, -13.5145, -1.1818], [-5.09332, -13.2428, -0.743286], [5.45017, 5.73622, -1.85555], 390 | [5.63365, 6.26245, -1.85505], [6.1073, 6.76594, -1.94462], [6.58044, 7.20559, -1.85469], 391 | [6.88931, 7.53961, -1.51406], [7.10716, 7.66078, -1.04544], [7.19471, 7.51389, -0.59239], 392 | [5.40772, 4.66524, 3.02514], [5.76931, 5.01291, 2.65931], [6.14507, 5.2088, 2.16144], 393 | [6.27824, 5.38063, 1.43376], [6.17431, 5.62542, 0.759444], [6.24094, 5.98304, 0.33088], 394 | [6.67544, 6.4994, 0.0532598], [-2.6477, 4.65851, -0.662931], [-2.71723, 4.72583, -0.337669], 395 | [-3.02974, 5.03001, 0.0133729], [-3.55156, 5.4128, 0.457088], [-4.08555, 5.6588, 0.878288], 396 | [-4.20689, 6.06137, 1.27083], [-3.94135, 6.61804, 1.64613], [-3.90152, 5.41826, 3.96519], 397 | [-3.68639, 5.69672, 3.7975], [-3.57372, 5.96746, 3.6043], [-3.50975, 6.24396, 3.36952], 398 | [-3.38908, 6.56161, 3.08272], [-3.23099, 6.92618, 2.74989], [-3.27483, 7.14141, 2.38829], 399 | [1.45619, -7.49005, -3.83906], [-2.15714, 3.22855, 4.74324], [-3.20732, -16.3363, 0.593722], 400 | [8.50918, 6.1379, -0.126037], [-1.3075, 10.5179, 0.0826635], [6.66269, -11.5952, 0.976294], 401 | [6.18407, -10.885, 3.95382], [4.6369, -16.5258, 3.13471], [-6.47456, -10.6289, -2.18081], 402 | [-2.82653, 6.85526, 3.372], [-2.65245, 4.26594, -0.23955], [6.45967, -11.2423, 3.81836], 403 | [1.33039, -11.5956, 4.72251], [1.30475, 4.5572, -3.30185], [8.00107, -6.69582, 2.12858], 404 | [4.57166, 6.984, 2.49627], [-3.24572, -12.1366, -3.56982], [5.3204, 6.36013, -2.56745], 405 | [-3.11957, 7.73189, 2.69959], [6.77177, 0.0625889, 4.49272], [6.94192, -4.53513, -1.62334], 406 | [7.13623, 2.29023, 2.48835], [-5.82156, -11.0413, 0.905474], [-1.63365, -0.816481, -2.63599], 407 | [-3.79753, -3.1284, 4.1384], [-6.72222, 2.34786, 1.69348], [-0.365939, -17.3946, 3.7759], 408 | [-2.86998, 8.92864, -2.32206], [-1.19507, -7.54906, -2.6852], [4.65156, 2.46804, -4.03467], 409 | [3.35007, -14.7047, 0.201495], [1.6206, 3.8501, 3.19007], [2.27385, 10.1786, 0.636264], 410 | [-0.511457, -9.4981, 5.60078], [1.90472, -3.64936, 4.72947], [-3.64124, -14.7226, 1.98156], 411 | [0.714248, -11.7933, -1.52495], [-7.27783, -2.97639, 1.02711], [0.0551114, -15.631, 0.740704], 412 | [4.08346, -6.60669, 4.23111], [-3.96676, -3.6568, -3.18453], [0.128981, -15.0967, 4.90768], 413 | [5.1814, -0.697958, -2.3693], [-2.24666, 3.46083, -1.55516], [-1.03731, 9.80536, -2.4258], 414 | [2.76201, 7.5254, -2.57689], [-3.21442, 0.849207, -3.77201], [-4.5522, 4.79028, 3.52668], 415 | [-4.2064, -13.7668, -2.8477], [7.41965, 0.205489, 0.882005], [-7.04821, -1.17492, -1.75941], 416 | [7.28529, -10.4271, 2.98472], [7.00561, -4.39045, 2.97423], [2.43302, 1.91306, 4.44534], 417 | [2.09039, -17.1687, 0.520695], [-3.27282, 1.6396, 3.67241], [-6.87723, -7.81655, 0.412325], 418 | [5.25677, 8.8326, 0.858971], [-1.28577, -11.2257, 2.07694], [0.805838, 8.11066, 0.90506], 419 | [-0.46974, -2.74816, 4.81187], [-3.06642, 7.51852, -0.246379], [4.55288, 2.79781, 2.29269], 420 | [4.04536, -8.45291, -2.82363], [-1.69131, -8.69729, 4.54945], [7.44942, 3.06384, -0.812776], 421 | [-0.375084, 2.10788, -3.87666], [-2.33075, -13.1125, 1.34638], [3.73976, -15.1661, 5.22367], 422 | [-4.13958, -10.4225, 1.48909], [-6.57359, -4.40388, -2.5274], [-1.19156, -17.5279, 2.70367], 423 | [1.48849, 0.940755, -3.11198], [-6.25666, -8.51528, -2.26368], [5.42219, -14.6917, 0.904344], 424 | [-5.30033, 2.91069, 2.77322], [-3.69181, 5.1199, 4.16583], [5.23465, -10.0999, -0.279651], 425 | [3.30916, -9.50085, 4.15144], [6.64312, -7.95079, 0.064867], [2.06641, -11.3195, -2.02518], 426 | [-6.87761, -1.18354, 1.26735], [-1.93959, -3.56711, -3.96444], [-0.33943, -13.7318, 2.4941], 427 | [3.44558, -13.2893, 5.10556], [-3.73378, -8.56427, -2.31567], [-2.35109, -5.13952, 5.32983], 428 | [6.42324, 0.543804, 2.58669], [7.86166, -5.16509, 0.692536], [3.76085, -3.61315, -3.37012], 429 | [5.44298, -14.2463, 3.15755], [-1.70985, -15.7899, 0.0519905], [2.26734, -13.5848, -1.39097], 430 | [5.74778, 6.39146, 1.10414], [-2.11671, 9.79717, 1.08835], [2.8608, 8.25119, 1.23121], 431 | [-1.18382, 4.3518, 3.89946], [7.96713, 5.05793, 1.41253], [-6.69457, -4.65279, -1.21029], 432 | [0.0191634, -9.11299, -2.26856], [-3.81062, -7.07655, 2.93881], [-7.32947, 0.0447152, 1.78407], 433 | [1.69836, -8.23934, 4.66153], [-6.6485, -10.8634, -0.11143], [-4.06035, -15.9321, 1.42343], 434 | [4.5849, 7.70502, -0.677262], [-1.09886, -1.13732, 5.43579], [2.70622, -0.301464, -3.82059], 435 | [-5.6857, -1.744, -2.71823], [-5.81655, -12.8909, -1.16874], [0.289658, -18.1278, 2.42564], 436 | [-4.47469, -6.57199, 2.10047], [0.112202, 10.0015, 0.627223], [0.235416, 8.04662, -3.31171], 437 | [-2.24934, -5.91415, -2.4902], [-2.55157, 4.50158, -2.19153], [6.43219, 3.07829, 2.6692], 438 | [-3.97414, 5.64061, 1.87932], [-4.56586, 0.0207524, 4.42228], [4.63573, -2.79558, 3.89731], 439 | [6.43056, -6.98187, 3.0528], [-0.986888, -5.57974, 4.56781], [2.21565, 4.82825, 3.77766], 440 | [-1.71112, -11.9039, -1.80275], [2.9143, -7.33767, -3.12538], [3.40413, -13.6728, -0.739559], 441 | [7.51963, -2.20202, 0.395068], [5.59617, -12.9598, 1.13681], [-2.42802, 6.61584, -0.938049], 442 | [5.51021, -11.3324, -0.968232], [6.25447, 5.61217, -1.3508], [-1.20197, 8.31877, -2.62206], 443 | [4.7415, 1.08838, 4.32509], [5.97589, -3.48225, -1.75155], [-2.15625, -15.757, 0.921245], 444 | [-2.94145, -6.93029, -3.58556], [2.64081, 5.92833, -2.84607], [3.95925, -17.4688, 1.86022], 445 | [-3.52455, -14.873, 0.832899], [-3.21377, -9.36567, 4.09077], [-4.48335, -7.68947, 1.74946]] 446 | 447 | cloud_face_verts = [[0, 21, 205], [205, 70, 0], [21, 22, 205], [22, 23, 205], [23, 24, 274], [24, 25, 324], 448 | [25, 26, 229], [26, 27, 229], [27, 9, 229], [205, 71, 70], [205, 72, 71], [205, 73, 72], 449 | [205, 74, 73], [312, 75, 74], [312, 76, 75], [312, 12, 76], [28, 2, 35], [35, 304, 28], 450 | [304, 35, 36], [304, 36, 37], [304, 37, 38], [304, 38, 39], [232, 39, 40], [232, 40, 41], 451 | [202, 41, 10], [29, 28, 304], [30, 29, 304], [31, 30, 232], [32, 31, 235], [33, 32, 235], 452 | [34, 33, 235], [9, 34, 229], [3, 49, 218], [218, 42, 3], [49, 50, 218], [50, 51, 218], 453 | [51, 52, 218], [52, 53, 261], [53, 54, 231], [54, 55, 231], [55, 11, 278], [218, 43, 42], 454 | [218, 44, 43], [325, 45, 44], [325, 46, 45], [325, 47, 46], [325, 48, 47], [202, 10, 48], 455 | [56, 1, 63], [63, 269, 56], [269, 63, 64], [269, 64, 65], [269, 65, 66], [269, 66, 67], 456 | [225, 67, 68], [225, 68, 69], [312, 69, 12], [57, 56, 269], [58, 57, 269], [59, 58, 269], 457 | [60, 59, 252], [61, 60, 252], [62, 61, 313], [11, 62, 278], [4, 77, 247], [247, 126, 4], 458 | [77, 78, 247], [78, 79, 247], [79, 80, 247], [80, 81, 201], [81, 82, 201], [82, 83, 201], 459 | [83, 13, 201], [247, 127, 126], [328, 128, 127], [289, 129, 128], [289, 130, 129], 460 | [275, 131, 130], [275, 132, 131], [213, 16, 132], [84, 5, 91], [91, 200, 84], [200, 91, 92], 461 | [195, 92, 93], [273, 93, 94], [267, 94, 95], [267, 95, 96], [228, 96, 97], [228, 97, 14], 462 | [85, 84, 200], [86, 85, 195], [87, 86, 195], [88, 87, 195], [89, 88, 273], [90, 89, 273], 463 | [13, 90, 273], [7, 105, 251], [251, 98, 7], [105, 106, 251], [106, 107, 311], [107, 108, 311], 464 | [108, 109, 311], [109, 110, 311], [110, 111, 285], [111, 15, 285], [251, 99, 98], 465 | [251, 100, 99], [321, 101, 100], [321, 102, 101], [223, 103, 102], [308, 104, 103], 466 | [308, 14, 104], [112, 6, 119], [119, 265, 112], [265, 119, 120], [265, 120, 121], 467 | [190, 121, 122], [244, 122, 123], [307, 123, 124], [307, 124, 125], [213, 125, 16], 468 | [113, 112, 265], [114, 113, 265], [115, 114, 265], [116, 115, 285], [117, 116, 285], 469 | [118, 117, 285], [15, 118, 285], [0, 70, 237], [237, 154, 0], [70, 71, 237], [71, 72, 237], 470 | [72, 73, 280], [73, 74, 280], [74, 75, 280], [75, 76, 227], [76, 12, 227], [237, 155, 154], 471 | [237, 156, 155], [237, 157, 156], [237, 158, 157], [327, 159, 158], [327, 160, 159], 472 | [327, 18, 160], [63, 1, 133], [133, 314, 63], [314, 133, 134], [314, 134, 135], [314, 135, 136], 473 | [314, 136, 137], [314, 137, 138], [263, 138, 139], [263, 139, 17], [64, 63, 314], [65, 64, 281], 474 | [66, 65, 281], [67, 66, 281], [68, 67, 219], [69, 68, 227], [12, 69, 227], [5, 84, 279], 475 | [279, 140, 5], [84, 85, 279], [85, 86, 279], [86, 87, 279], [87, 88, 257], [88, 89, 257], 476 | [89, 90, 230], [90, 13, 230], [279, 141, 140], [279, 142, 141], [279, 143, 142], 477 | [263, 144, 143], [263, 145, 144], [263, 146, 145], [263, 17, 146], [77, 4, 147], [147, 256, 77], 478 | [256, 147, 148], [256, 148, 149], [256, 149, 150], [256, 150, 151], [327, 151, 152], 479 | [327, 152, 153], [327, 153, 18], [78, 77, 256], [79, 78, 256], [80, 79, 272], [81, 80, 272], 480 | [82, 81, 272], [83, 82, 230], [13, 83, 230], [1, 56, 318], [318, 133, 1], [56, 57, 266], 481 | [57, 58, 266], [58, 59, 209], [59, 60, 209], [60, 61, 209], [61, 62, 322], [62, 11, 322], 482 | [318, 134, 133], [318, 135, 134], [318, 136, 135], [318, 137, 136], [318, 138, 137], 483 | [318, 139, 138], [316, 17, 139], [49, 3, 161], [161, 319, 49], [319, 161, 162], [319, 162, 163], 484 | [319, 163, 164], [319, 164, 165], [192, 165, 166], [192, 166, 167], [192, 167, 19], 485 | [50, 49, 319], [51, 50, 319], [52, 51, 254], [53, 52, 254], [54, 53, 254], [55, 54, 238], 486 | [11, 55, 238], [7, 98, 305], [305, 168, 7], [98, 99, 305], [99, 100, 305], [100, 101, 208], 487 | [101, 102, 208], [102, 103, 208], [103, 104, 208], [104, 14, 241], [305, 169, 168], 488 | [305, 170, 169], [286, 171, 170], [286, 172, 171], [286, 173, 172], [192, 174, 173], 489 | [192, 19, 174], [91, 5, 140], [140, 240, 91], [240, 140, 141], [240, 141, 142], [240, 142, 143], 490 | [240, 143, 144], [316, 144, 145], [316, 145, 146], [316, 146, 17], [92, 91, 240], [93, 92, 240], 491 | [94, 93, 240], [95, 94, 309], [96, 95, 309], [97, 96, 241], [14, 97, 241], [3, 42, 206], 492 | [206, 161, 3], [42, 43, 206], [43, 44, 206], [44, 45, 234], [45, 46, 234], [46, 47, 234], 493 | [47, 48, 302], [48, 10, 302], [206, 162, 161], [206, 163, 162], [206, 164, 163], 494 | [206, 165, 164], [246, 166, 165], [246, 167, 166], [204, 19, 167], [35, 2, 175], [175, 317, 35], 495 | [317, 175, 176], [317, 176, 177], [317, 177, 178], [317, 178, 179], [250, 179, 180], 496 | [250, 180, 181], [250, 181, 20], [36, 35, 317], [37, 36, 317], [38, 37, 317], [39, 38, 320], 497 | [40, 39, 320], [41, 40, 320], [10, 41, 320], [6, 112, 198], [198, 182, 6], [112, 113, 198], 498 | [113, 114, 198], [114, 115, 248], [115, 116, 248], [116, 117, 248], [117, 118, 248], 499 | [118, 15, 284], [198, 183, 182], [198, 184, 183], [207, 185, 184], [207, 186, 185], 500 | [207, 187, 186], [207, 188, 187], [250, 20, 188], [105, 7, 168], [168, 282, 105], 501 | [282, 168, 169], [282, 169, 170], [282, 170, 171], [282, 171, 172], [282, 172, 173], 502 | [282, 173, 174], [204, 174, 19], [106, 105, 282], [107, 106, 282], [108, 107, 282], 503 | [109, 108, 204], [110, 109, 204], [111, 110, 284], [15, 111, 284], [2, 28, 199], [199, 175, 2], 504 | [28, 29, 199], [29, 30, 199], [30, 31, 239], [31, 32, 239], [32, 33, 297], [33, 34, 297], 505 | [34, 9, 259], [199, 176, 175], [199, 177, 176], [199, 178, 177], [199, 179, 178], 506 | [306, 180, 179], [306, 181, 180], [306, 20, 181], [21, 0, 154], [154, 298, 21], [298, 154, 155], 507 | [298, 155, 156], [298, 156, 157], [298, 157, 158], [298, 158, 159], [298, 159, 160], 508 | [211, 160, 18], [22, 21, 298], [23, 22, 197], [24, 23, 197], [25, 24, 197], [26, 25, 262], 509 | [27, 26, 262], [9, 27, 259], [4, 126, 258], [258, 147, 4], [126, 127, 258], [127, 128, 329], 510 | [128, 129, 329], [129, 130, 300], [130, 131, 300], [131, 132, 226], [132, 16, 270], 511 | [258, 148, 147], [211, 149, 148], [211, 150, 149], [211, 151, 150], [211, 152, 151], 512 | [211, 153, 152], [211, 18, 153], [119, 6, 182], [182, 236, 119], [236, 182, 183], 513 | [236, 183, 184], [236, 184, 185], [236, 185, 186], [236, 186, 187], [236, 187, 188], 514 | [306, 188, 20], [120, 119, 236], [121, 120, 264], [122, 121, 264], [123, 122, 264], 515 | [124, 123, 290], [125, 124, 290], [16, 125, 270], [240, 309, 94], [209, 266, 58], 516 | [93, 273, 195], [195, 273, 88], [219, 227, 68], [230, 257, 89], [300, 329, 129], [262, 259, 27], 517 | [184, 198, 207], [248, 198, 114], [239, 199, 30], [179, 199, 306], [200, 195, 85], 518 | [92, 195, 200], [130, 289, 275], [14, 308, 228], [278, 231, 55], [232, 235, 31], 519 | [208, 305, 100], [194, 268, 203], [167, 246, 204], [204, 284, 110], [274, 205, 23], 520 | [74, 205, 312], [234, 206, 44], [165, 206, 246], [207, 198, 283], [188, 207, 250], 521 | [276, 241, 315], [241, 208, 104], [238, 322, 11], [315, 241, 322], [170, 305, 286], 522 | [254, 238, 54], [160, 211, 298], [259, 262, 245], [235, 229, 34], [255, 296, 271], 523 | [102, 321, 223], [125, 213, 307], [239, 214, 199], [290, 270, 125], [256, 272, 79], 524 | [243, 299, 227], [302, 234, 47], [207, 283, 250], [288, 225, 205], [296, 189, 217], 525 | [202, 261, 255], [44, 218, 325], [143, 279, 263], [299, 243, 326], [285, 311, 110], 526 | [220, 285, 249], [301, 221, 302], [284, 248, 118], [223, 222, 291], [127, 247, 328], 527 | [295, 244, 213], [310, 222, 223], [158, 237, 327], [224, 323, 230], [225, 288, 313], 528 | [269, 252, 59], [287, 245, 300], [214, 239, 270], [323, 280, 260], [280, 237, 72], 529 | [94, 267, 273], [291, 222, 201], [229, 324, 25], [217, 271, 296], [215, 257, 230], 530 | [215, 230, 323], [261, 218, 52], [261, 202, 218], [41, 202, 232], [255, 232, 202], 531 | [233, 216, 193], [320, 302, 10], [294, 234, 302], [234, 294, 206], [235, 232, 255], 532 | [229, 235, 212], [214, 306, 199], [236, 264, 120], [280, 191, 237], [293, 327, 237], 533 | [210, 276, 238], [238, 254, 210], [259, 297, 34], [8, 270, 239], [144, 316, 240], 534 | [194, 203, 240], [309, 241, 96], [277, 322, 241], [242, 220, 249], [311, 251, 106], 535 | [243, 219, 196], [219, 243, 227], [190, 244, 295], [122, 244, 190], [329, 300, 245], 536 | [292, 245, 262], [284, 204, 246], [294, 302, 221], [201, 247, 80], [247, 201, 222], 537 | [221, 301, 248], [198, 248, 283], [223, 249, 310], [321, 249, 223], [317, 320, 38], 538 | [250, 193, 216], [100, 251, 321], [251, 220, 242], [189, 313, 288], [313, 278, 62], 539 | [222, 253, 247], [222, 275, 253], [319, 254, 51], [286, 210, 254], [255, 212, 235], 540 | [271, 212, 255], [256, 224, 272], [151, 327, 256], [257, 279, 87], [196, 257, 299], 541 | [148, 258, 211], [245, 292, 329], [239, 259, 8], [245, 287, 259], [215, 299, 257], 542 | [215, 323, 260], [189, 296, 231], [231, 261, 53], [197, 292, 262], [197, 262, 25], 543 | [263, 196, 219], [138, 263, 314], [264, 290, 123], [306, 214, 264], [121, 190, 265], 544 | [265, 285, 115], [266, 268, 194], [139, 318, 316], [291, 228, 223], [96, 228, 267], 545 | [277, 268, 209], [266, 209, 268], [67, 225, 269], [313, 269, 225], [270, 8, 226], 546 | [270, 226, 132], [271, 217, 303], [212, 271, 229], [272, 230, 82], [230, 272, 224], 547 | [273, 201, 13], [201, 273, 291], [324, 274, 24], [217, 205, 274], [132, 275, 213], 548 | [213, 310, 249], [241, 276, 208], [210, 208, 276], [241, 309, 277], [268, 277, 203], 549 | [231, 278, 189], [278, 313, 189], [196, 263, 279], [279, 257, 196], [280, 227, 299], 550 | [227, 280, 75], [281, 219, 67], [314, 281, 64], [174, 204, 282], [282, 204, 108], 551 | [283, 248, 193], [193, 250, 283], [248, 284, 221], [246, 221, 284], [190, 249, 285], 552 | [285, 265, 190], [192, 286, 254], [173, 286, 192], [287, 226, 8], [287, 8, 259], 553 | [288, 217, 189], [205, 217, 288], [128, 328, 289], [289, 253, 275], [290, 214, 270], 554 | [264, 214, 290], [291, 267, 228], [267, 291, 273], [211, 292, 197], [292, 211, 258], 555 | [323, 224, 293], [237, 191, 293], [206, 294, 246], [221, 246, 294], [249, 190, 295], 556 | [213, 249, 295], [261, 231, 296], [261, 296, 255], [297, 239, 32], [259, 239, 297], 557 | [298, 211, 197], [298, 197, 22], [280, 299, 260], [260, 299, 215], [226, 287, 300], 558 | [226, 300, 131], [301, 193, 248], [301, 233, 193], [302, 233, 301], [302, 320, 233], 559 | [324, 229, 303], [303, 229, 271], [39, 232, 304], [304, 232, 30], [210, 286, 305], 560 | [305, 208, 210], [188, 306, 236], [236, 306, 264], [244, 307, 213], [123, 307, 244], 561 | [103, 223, 308], [308, 223, 228], [240, 203, 309], [203, 277, 309], [275, 222, 310], 562 | [275, 310, 213], [220, 251, 311], [311, 285, 220], [69, 312, 225], [312, 205, 225], 563 | [252, 313, 61], [252, 269, 313], [219, 314, 263], [314, 219, 281], [315, 238, 276], 564 | [315, 322, 238], [194, 316, 318], [316, 194, 240], [216, 317, 250], [179, 250, 317], 565 | [266, 318, 56], [194, 318, 266], [254, 319, 192], [165, 192, 319], [320, 216, 233], 566 | [317, 216, 320], [249, 321, 242], [242, 321, 251], [322, 277, 209], [322, 209, 61], 567 | [323, 293, 191], [280, 323, 191], [303, 217, 324], [274, 324, 217], [325, 218, 202], 568 | [48, 325, 202], [196, 299, 326], [196, 326, 243], [327, 293, 224], [327, 224, 256], 569 | [253, 328, 247], [289, 328, 253], [329, 258, 127], [258, 329, 292]] 570 | 571 | create_object(cloud_verts_pos, cloud_face_verts, "cloud") 572 | set_scale_keys(target="cloud", keyframes=[[0.001, 62], [1.1, 67], [1, 69]]) 573 | bpy.data.objects["cloud"].location = (-9.18464, 39.500, 31) 574 | set_position_keys(target="cloud", keyframes=[[[2.409, -39.500, 31.7], 69, [5, 5]], 575 | [[2.409, -39.500, 33], 97, [5, 5]], 576 | [[2.409, -39.500, 32.3], 125, [5, 5]], 577 | [[2.409, -39.500, 31.5], 173, [5, 5]], 578 | [[2.409, -39.500, 32.3], 220, [5, 5]], 579 | [[2.409, -39.500, 31.4], 240, [5, 5]]]) 580 | 581 | 582 | def create_chest(): 583 | """ 584 | create_chest() function should use a macro recorded in application. There is no such function in Blender and many 585 | actions are not included in "info" panel, so the object will be imported 586 | """ 587 | 588 | path = bpy.context.scene.content_path 589 | 590 | bpy.ops.import_scene.obj(filepath=os.path.join(path, 'chest_for_Blender.obj')) 591 | 592 | chest = bpy.context.scene.objects['chest'] 593 | for name in ['Lock_Body', 'chest_metal_part', 'lock', 'lock001', 'lock_ring']: # imported objects need to be 594 | # parented to the "chest" object. It will be easier to set location and animate scale of those objects. 595 | obj = bpy.context.scene.objects[name] # For every object: get it from scene 596 | obj.parent = chest 597 | # The location of obj will change. We need to invert this change: 598 | 599 | # store a copy of the objects final transformation 600 | # so we can read from it later. 601 | ob_matrix_orig = obj.matrix_world.copy() 602 | 603 | # reset parent inverse matrix 604 | # (relationship created when parenting) 605 | obj.matrix_parent_inverse.identity() 606 | 607 | # re-apply the difference between parent/child 608 | # (this writes directly into the loc/scale/rot) via a matrix. 609 | obj.matrix_basis = obj.parent.matrix_world.inverted() * ob_matrix_orig 610 | 611 | obj.select = False 612 | 613 | set_scale_keys(target='chest', keyframes=[[0.01, 27], [1, 31]]) 614 | set_position_keys(target='chest', keyframes=[[[-3.892, 0.349, -1.533], 27], 615 | [[-3.892, 0.349, 0], 31], 616 | [[-3.892, 0.349, -1.533], 33]]) 617 | 618 | 619 | def create_and_animate_trees(): 620 | """ 621 | Function uses the create_palm() support function to create and animate some palm trees. 622 | It was created to show how to create basic geometry objects, and use instances. In other scripts "bend" modifier is 623 | used to ben the trunk of palm trees. Unfortunately the author of this script was not able to apply this modifier 624 | to multiple objects in Blender, so rotation and translation was used instead. 625 | This modifiers can be applied to current active object with commands: 626 | bpy.ops.object.modifier_add(type='SIMPLE_DEFORM') 627 | bpy.context.object.modifiers["SimpleDeform"].deform_method = 'BEND' 628 | """ 629 | 630 | palm = create_palm(diameter=1.3, segs_num=20, leafs_num=9, bending=34, id_num=1, anim_start=11, anim_end=26) 631 | palm.rotation_euler = (0.135, 0, 4.07) # Rotate the palm 632 | palm.location = mathutils.Vector((0.68, -10.74, 2.40)) # Position the palm 633 | 634 | palm = create_palm(diameter=1.6, segs_num=20, leafs_num=9, bending=34, id_num=2, anim_start=40, anim_end=45) 635 | palm.rotation_euler = (0.0226778, 0.247746, 1.71606) # Rotate the palm 636 | palm.location = mathutils.Vector((28, -6.3, -2.5)) # Position the palm 637 | 638 | palm = create_palm(diameter=1.1, segs_num=18, leafs_num=9, bending=24, id_num=3, anim_start=20, anim_end=35) 639 | palm.rotation_euler = (0.0226778, 0.247746, -1.94985) # Rotate the palm 640 | palm.location = mathutils.Vector((34, -34, -2.5)) # Position the palm 641 | 642 | palm = create_palm(diameter=1.1, segs_num=24, leafs_num=9, bending=24, id_num=4, anim_start=25, anim_end=40) 643 | palm.rotation_euler = (0.0226778, 0.244222, -1.03672) # Rotate the palm 644 | palm.location = mathutils.Vector((14, -19, -2.5)) # Position the palm 645 | 646 | 647 | def change_hierarchy_and_animate(): 648 | """ 649 | Function modifies the hierarchy of scene and creates some final animations, that ware not possible to create earlier 650 | """ 651 | bpy.ops.object.empty_add(type='PLAIN_AXES') 652 | bpy.context.scene.objects.active.name = 'top_parent' 653 | top_parent = bpy.context.scene.objects['top_parent'] 654 | 655 | for obj in bpy.context.scene.objects: 656 | if obj.parent is None: 657 | if obj != top_parent and obj.type not in ['LAMP', 'CAMERA']: 658 | obj.parent = top_parent 659 | 660 | # It is important that the top_parent should rotate fast at the beginning of the animation and slowly at the end. 661 | # This effect can be achieved by modifying the "easing? property of keyframes. 662 | # 663 | top_parent.animation_data_create() # Create an animatioon data of top_parent 664 | action = bpy.data.actions.new("RotateAction") # Create a new action. Actions are collections F-Curves that control 665 | # animation of object. We will modify the points of this curve 666 | top_parent.animation_data.action = action 667 | data_path = "rotation_euler" 668 | times = [260, 0] 669 | values = [math.radians(1.8), -math.radians(18)] # new fcurve 670 | easings = ['EASE_OUT', 'AUTO'] # the easing of the first keyframe should be set to ease_out and the second to auto 671 | fc = action.fcurves.new(data_path, index=2) # get the f-curve of rotation_euler[2] - a "z" rotation 672 | 673 | fc.keyframe_points.add(count=2) # add two points to the F-Curve 674 | for kfp in fc.keyframe_points: # for every point of f-curve set easing 675 | kfp.co = (times.pop(), values.pop()) 676 | kfp.easing = easings.pop() 677 | 678 | bpy.ops.object.camera_add() # create camera 679 | bpy.context.scene.objects.active.name = 'RenderCamera' 680 | camera = bpy.context.scene.objects.active 681 | for obj in bpy.data.cameras: 682 | obj.lens = 25 683 | obj.clip_end = 500 684 | 685 | camera.rotation_euler = (1.1775, 0.0, -1.64) 686 | camera.location = mathutils.Vector((-149.0, 3.569, 52.082)) 687 | 688 | for area in bpy.context.screen.areas: # set the viewport to this camera 689 | if area.type == 'VIEW_3D': 690 | area.spaces[0].region_3d.view_perspective = 'CAMERA' 691 | 692 | bpy.ops.mesh.primitive_plane_add(view_align=False, # add the plane that will be used as a camera background 693 | enter_editmode=False, 694 | location=(0, 0, 0), 695 | layers=(True, False, False, False, False, 696 | False, False, False, False, False, 697 | False, False, False, False, False, 698 | False, False, False, False, False)) 699 | 700 | # The plane should be placed perpendicularly to the axis of camera. 701 | # It will be placed at the position of camera. Also rotation of camera will be copied to the plane 702 | # the camera will be moved then by its local "z" axis so it will be behind all of the scene objects 703 | camera = bpy.context.scene.objects["RenderCamera"] 704 | plane = bpy.data.objects["Plane"] 705 | 706 | plane.location = camera.location 707 | plane.rotation_euler = camera.rotation_euler 708 | 709 | bpy.context.scene.update() 710 | vec = mathutils.Vector((0.0, 0.0, -300.0)) # Plane will be moved by this vector: 300 units in the "Z" axis 711 | inv = plane.matrix_world.copy() 712 | inv.invert() 713 | vec_rot = vec * inv 714 | plane.location = plane.location + vec_rot 715 | 716 | plane.scale = (190, 0.75 * 190, 0) # Scale the plane, so it will fill the viewport 717 | plane.name = 'Background' 718 | 719 | 720 | def create_and_assign_materials(): 721 | """ 722 | Function creates and applies materials to the objects 723 | It was created to show how to use materials. The camera background will also be created now. 724 | """ 725 | 726 | path = bpy.context.scene.content_path 727 | 728 | bg_img = bpy.data.images.load(path.replace("\\", "/") + '/bg.bmp') # load the background image 729 | 730 | background = bpy.data.objects['Background'] # get the background plane from the scene 731 | background.data.materials.clear() 732 | 733 | bpy.ops.object.mode_set(mode='EDIT') # UVs of the background mesh need to be created. Edit mode need to be set 734 | me = background.data 735 | bm = bmesh.from_edit_mesh(me) # We need to get the data of the background object 736 | 737 | uv_layer = bm.loops.layers.uv.verify() # 738 | bm.faces.layers.tex.verify() 739 | for f in bm.faces: 740 | luv = f.loops[0][uv_layer] # Just place every vertex in the right part of the UV space 741 | luv.uv = (1, 1) 742 | luv = f.loops[1][uv_layer] 743 | luv.uv = (0, 1) 744 | luv = f.loops[2][uv_layer] 745 | luv.uv = (0, 0) 746 | luv = f.loops[3][uv_layer] 747 | luv.uv = (1, 0) 748 | 749 | bmesh.update_edit_mesh(me) 750 | bpy.ops.object.mode_set(mode='OBJECT') # Set the mode back to the Object mode 751 | 752 | # Cycles materials operate on nodes. 753 | 754 | plane_mat = bpy.data.materials.new("Background_material") # Create the material for the background. 755 | # Material that will be visible only to the camera rays and will not affect lighting and shadows can be created 756 | # with a use of a "mix" node. The "is camera ray" must be used as a "fac" (mix strength) value. 757 | # One of inputs of the mix node must be set to the desired emission shader with a background texture 758 | # the other one should be empty, so the material will not affect rays if they are not camera rays 759 | 760 | plane_mat.use_nodes = True 761 | plane_mat_nt = plane_mat.node_tree # Node tree of the material will be edited 762 | plane_mat_nodes = plane_mat.node_tree.nodes 763 | plane_mat_surface = plane_mat_nodes['Material Output'].inputs['Surface'] # Surface input of the material 764 | emission = plane_mat_nodes.new("ShaderNodeEmission") # Create an emission shader 765 | bg_texture = plane_mat_nodes.new("ShaderNodeTexImage") # Create a texture 766 | bg_texture.image = bg_img 767 | 768 | mix_shaders = plane_mat_nodes.new("ShaderNodeMixShader") # create a mix node 769 | light_path = plane_mat_nodes.new("ShaderNodeLightPath") # Create a light path node 770 | 771 | plane_mat_nt.links.new(bg_texture.outputs['Color'], emission.inputs["Color"]) # connect the output of the texture 772 | # to the input of the emission node 773 | plane_mat_nt.links.new(light_path.outputs["Is Camera Ray"], mix_shaders.inputs["Fac"]) 774 | plane_mat_nt.links.new(emission.outputs['Emission'], mix_shaders.inputs[2]) 775 | plane_mat_nt.links.new(mix_shaders.outputs["Shader"], plane_mat_surface) 776 | background.data.materials.append(plane_mat) # assign material to the background plane surface 777 | 778 | land_mat = bpy.data.materials.new("Sand_material") # with simple materials it is not necessary to use node trees 779 | land_mat.diffuse_color = (1, 0.74, 0.45) 780 | 781 | wood_mat = bpy.data.materials.new("Wood_material") 782 | wood_mat.diffuse_color = (0.18, 0.13, 0.13) 783 | 784 | leaf_mat = bpy.data.materials.new("Leaf_material") 785 | leaf_mat.diffuse_color = (0.4, 1, 0.3) 786 | 787 | gray_mat = bpy.data.materials.new('Gray_material') 788 | gray_mat.diffuse_color = (0.84, 0.84, 0.84) 789 | 790 | water_mat = bpy.data.materials.new("Water_material") 791 | water_mat.use_nodes = True 792 | 793 | water_mat_nt = water_mat.node_tree # Water is an example of a complex material that combines many shaders 794 | water_mat_nodes = water_mat.node_tree.nodes 795 | water_mat_surface = water_mat_nodes['Material Output'].inputs['Surface'] 796 | bg_texture = water_mat_nodes.new("ShaderNodeTexImage") 797 | bg_texture.image = bg_img 798 | 799 | mix_shaders = water_mat_nodes.new("ShaderNodeMixShader") 800 | glass_shader = water_mat_nodes.new("ShaderNodeBsdfGlass") 801 | diffuse_shader = water_mat_nodes.new("ShaderNodeBsdfDiffuse") 802 | 803 | diffuse_shader.inputs["Color"].default_value = (0, 0.208633, 0.201736, 1) 804 | glass_shader.inputs["Color"].default_value = (0.12549, 0.988235, 1, 1) 805 | glass_shader.inputs["Roughness"].default_value = 0.24 806 | 807 | mix_shaders.inputs['Fac'].default_value = 0.2 808 | water_mat_nt.links.new(glass_shader.outputs[0], mix_shaders.inputs[1]) 809 | water_mat_nt.links.new(diffuse_shader.outputs[0], mix_shaders.inputs[2]) 810 | water_mat_nt.links.new(mix_shaders.outputs["Shader"], water_mat_surface) 811 | 812 | for obj in bpy.context.scene.objects: # Assign materials to objects 813 | if any(x in obj.name for x in ['element', 'root', 'chest']): 814 | if "metal" not in obj.name: 815 | obj.data.materials.clear() 816 | obj.data.materials.append(wood_mat) 817 | if any(x in obj.name for x in ['shark', 'lock', 'cloud', 'metal']): 818 | obj.data.materials.clear() 819 | obj.data.materials.append(gray_mat) 820 | if "leaf" in obj.name: 821 | obj.data.materials.clear() 822 | obj.data.materials.append(leaf_mat) 823 | if "water" in obj.name: 824 | obj.data.materials.clear() 825 | obj.data.materials.append(water_mat) 826 | if "land" in obj.name: 827 | obj.data.materials.clear() 828 | obj.data.materials.append(land_mat) 829 | 830 | 831 | # 832 | # 833 | # Gui and interface: 834 | # 835 | # 836 | 837 | 838 | # Properties: 839 | 840 | class ActionsRecordsItem(bpy.types.PropertyGroup): 841 | name = bpy.props.StringProperty(name="Action name", default="None") 842 | time = bpy.props.StringProperty(name="Execution time", default="0.0") 843 | 844 | 845 | class MyColl(bpy.types.PropertyGroup): 846 | label = bpy.props.StringProperty() 847 | description = bpy.props.StringProperty() 848 | 849 | 850 | # Operators: 851 | 852 | class RunActions(bpy.types.Operator, ExportHelper): 853 | """Run the sequence of actions""" 854 | bl_idname = "object.run_actions" # important since its how bpy.ops.import_test.some_data is constructed 855 | bl_label = "Run actions" 856 | 857 | # ExportHelper mixin class uses this 858 | filename_ext = ".obj" 859 | 860 | filter_glob = bpy.props.StringProperty( 861 | default="*.obj", 862 | options={'HIDDEN'}, 863 | maxlen=255, # Max internal buffer length, longer would be clamped. 864 | ) 865 | 866 | directory = bpy.props.StringProperty(subtype='DIR_PATH') 867 | 868 | functions_with_names = [["Setup the scene", prepare_scene], 869 | ["Import basic objects", import_and_animate_basic_meshes], 870 | ["Create a shark finn and a cloud", create_shark_and_cloud], 871 | ["Create a chest with Macro script", create_chest], 872 | ["Create and animate trees", create_and_animate_trees], 873 | ["Fix objects hierarchy, finish the animation", change_hierarchy_and_animate], 874 | ["Create and assign materials", create_and_assign_materials]] 875 | 876 | def execute(self, context): 877 | context.scene.content_path = self.directory 878 | directory = context.scene.content_path 879 | if os.path.isfile(os.path.join(directory, "water.obj")): 880 | if bpy.context.scene.step_by_step: 881 | print("step-by-step") 882 | action_num = bpy.context.scene.next_step 883 | bpy.context.scene.next_step += 1 884 | line = self.functions_with_names[action_num] 885 | run(text=line[0], function=line[1]) 886 | else: 887 | print("run all") 888 | for action_num in range(bpy.context.scene.next_step, len(self.functions_with_names)): 889 | line = self.functions_with_names[action_num] 890 | run(text=line[0], function=line[1]) 891 | return {'FINISHED'} 892 | else: 893 | return bpy.ops.object.run_actions('INVOKE_DEFAULT') 894 | 895 | # noinspection PyUnusedLocal 896 | def invoke(self, context, event): 897 | self.directory = os.path.normpath(context.scene.content_path) 898 | if not os.path.isfile(os.path.join(self.directory, "water.obj")): 899 | context.window_manager.fileselect_add(self) 900 | else: 901 | self.execute(context) 902 | return {'RUNNING_MODAL'} 903 | 904 | 905 | class ResetOperator(bpy.types.Operator): 906 | bl_idname = "object.reset_operator" 907 | bl_label = "Reset the scene" 908 | 909 | # noinspection PyMethodMayBeStatic,PyMethodMayBeStatic,PyUnusedLocal 910 | def execute(self, context): 911 | bpy.ops.wm.read_homefile() 912 | bpy.context.scene.next_step = 0 913 | bpy.ops.object.delete() 914 | bpy.context.scene.actions_records.clear() 915 | bpy.app.handlers.scene_update_pre.append(collhack) 916 | return {'FINISHED'} 917 | 918 | 919 | class SaveToFileOperator(bpy.types.Operator): 920 | bl_idname = "object.save_to_file_operator" 921 | bl_label = "Simple Object Operator" 922 | save_path = bpy.props.StringProperty(subtype="DIR_PATH") 923 | 924 | # noinspection PyUnusedLocal 925 | def execute(self, context): 926 | path = self.save_path 927 | with open(os.path.join(path, 'scores_Blender.txt'), 'w') as file_: 928 | for score in bpy.context.scene.actions_records: 929 | file_.write(score.name + ": " + score.time + '\n') 930 | return {'FINISHED'} 931 | 932 | 933 | class ExecuteAll(bpy.types.Operator): 934 | bl_idname = "object.execute_all" 935 | bl_label = "File browser Operator" 936 | 937 | # noinspection PyMethodMayBeStatic,PyMethodMayBeStatic,PyUnusedLocal 938 | def execute(self, context): 939 | bpy.context.scene.step_by_step = False 940 | bpy.ops.object.run_actions('INVOKE_DEFAULT') 941 | return {'FINISHED'} 942 | 943 | 944 | class ExecuteStepByStep(bpy.types.Operator): 945 | bl_idname = "object.step_by_step" 946 | bl_label = "File browser Operator" 947 | 948 | # noinspection PyMethodMayBeStatic,PyMethodMayBeStatic,PyUnusedLocal 949 | def execute(self, context): 950 | bpy.context.scene.step_by_step = True 951 | bpy.ops.object.run_actions('INVOKE_DEFAULT') 952 | return {'FINISHED'} 953 | 954 | 955 | # Other GUI classes: 956 | 957 | 958 | class ActionsList(bpy.types.UIList): 959 | # noinspection PyUnusedLocal 960 | def draw_item(self, context, layout, data, item, icon, active_data, active_propname): 961 | if self.layout_type in {'DEFAULT', 'COMPACT'}: 962 | split = layout.split(0.3) 963 | split.label(item.label) 964 | split.label(item.description) 965 | 966 | elif self.layout_type in {'GRID'}: 967 | pass 968 | 969 | 970 | class MyScriptPanel(bpy.types.Panel): 971 | bl_label = "Script - Blender" 972 | bl_idname = "OBJECT_PT_myscript" 973 | bl_space_type = 'PROPERTIES' 974 | bl_region_type = 'WINDOW' 975 | bl_context = "scene" 976 | 977 | def draw(self, context): 978 | layout = self.layout 979 | 980 | col = context.scene.col 981 | idx = context.scene.col_idx 982 | message = context.scene.gui_message 983 | 984 | layout.label(message) 985 | col = layout.column(align=True) 986 | row_1 = col.row(align=True) 987 | row_1.operator("object.step_by_step", text="Step by step") 988 | row_1.operator("object.execute_all", text="Run all steps") 989 | row_2 = col.row(align=True) 990 | row_2.template_list("ActionsList", "", context.scene, "col", context.scene, "col_idx") 991 | col_23 = row_2.column(align=True) 992 | col_23.operator("object.save_to_file_operator", text="Save scores") 993 | col_23.operator("object.reset_operator", text="Clear the scene") 994 | 995 | 996 | # Functions 997 | 998 | def run(text, function): 999 | print_to_ui(text) # Update the label of UI 1000 | ts = time.time() # Start measuring time 1001 | function() # Execute the function passed as an argument 1002 | te = time.time() # Record the ending time of command 1003 | interval = te - ts # Measure the interval 1004 | add_new_item_to_list(text, interval) # append the 1005 | 1006 | 1007 | def collhack(scene): 1008 | bpy.app.handlers.scene_update_pre.remove(collhack) 1009 | 1010 | scene.col.clear() 1011 | 1012 | i = 1 1013 | for new_item in bpy.context.scene.actions_records: 1014 | item = scene.col.add() 1015 | item.label = new_item.name 1016 | item.description = str(new_item.time) 1017 | item.name = " ".join((str(i), item.label, item.description)) 1018 | i += 1 1019 | 1020 | 1021 | def add_new_item_to_list(name, time): 1022 | new_item = bpy.context.scene.actions_records.add() 1023 | new_item.name = str(name) 1024 | new_item.time = str(time) 1025 | bpy.app.handlers.scene_update_pre.append(collhack) 1026 | 1027 | 1028 | def print_to_ui(text): 1029 | bpy.context.scene.gui_message = text 1030 | 1031 | 1032 | def register(): 1033 | bpy.types.Scene.gui_message = bpy.props.StringProperty(name="Current message", 1034 | default="Launch the script with `start` button") 1035 | bpy.types.Scene.content_path = bpy.props.StringProperty(name="Path to content", default='C:/') 1036 | bpy.types.Scene.next_step = bpy.props.IntProperty(name="Next step of step-by-step execution", default=0) 1037 | bpy.types.Scene.step_by_step = bpy.props.BoolProperty(name="Step-by-step or all at once", default=True) 1038 | bpy.utils.register_class(ActionsRecordsItem) 1039 | bpy.types.Scene.actions_records = bpy.props.CollectionProperty(type=ActionsRecordsItem) 1040 | bpy.utils.register_class(RunActions) 1041 | 1042 | bpy.utils.register_module(__name__) 1043 | bpy.types.Scene.col = bpy.props.CollectionProperty(type=MyColl) 1044 | bpy.types.Scene.col_idx = bpy.props.IntProperty(default=0) 1045 | 1046 | bpy.app.handlers.scene_update_pre.append(collhack) 1047 | 1048 | 1049 | def unregister(): 1050 | bpy.utils.unregister_module(__name__) 1051 | del bpy.types.Scene.col 1052 | del bpy.types.Scene.col_idx 1053 | del bpy.types.Scene.content_path 1054 | del bpy.types.Scene.step_by_step 1055 | del bpy.types.Scene.next_step 1056 | del bpy.types.Scene.actions_records 1057 | 1058 | 1059 | # 1060 | # 1061 | # Start. 1062 | # 1063 | # 1064 | 1065 | 1066 | if __name__ == "__main__": 1067 | register() 1068 | bpy.context.scene.next_step = 0 1069 | bpy.context.scene.actions_records.clear() 1070 | my_item = bpy.context.scene.actions_records.add() 1071 | my_item.name = "Task" 1072 | my_item.time = "time" 1073 | bpy.app.handlers.scene_update_pre.append(collhack) 1074 | -------------------------------------------------------------------------------- /script_Maya/README.md: -------------------------------------------------------------------------------- 1 | ## This script uses Python API in Autodesk Maya 2 | 3 | - Copyright (C) Paweł Kowalski 4 | 5 | - www.pkowalski.com 6 | - www.behance.net/pkowalski 7 | 8 | ## How to use: 9 | 10 | To run the script execute: 11 | execcfile('path:\to\Script_Maya.py') 12 | in Script Editor 13 | 14 | Script has PySide (QT) GUI. 15 | It will ask user for a path to the directory with additional files that are required. 16 | -------------------------------------------------------------------------------- /script_Maya/Script_Maya.py: -------------------------------------------------------------------------------- 1 | # __author__ = 'Pawel Kowalski' 2 | # 3 | # This script was created to demonstrate the use of Python in Autodesk Maya 4 | # 5 | # Copyright (C) Pawel Kowalski 6 | # www.pkowalski.com 7 | # www.behance.net/pkowalski 8 | # 9 | # Open the script from Script Editor with command: 10 | # execcfile('path:\to\Script_Maya.py') 11 | # 12 | # This program is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU General Public License 14 | # as published by the Free Software Foundation; either version 2 15 | # of the License, or (at your option) any later version. 16 | # 17 | # This program is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | # GNU General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU General Public License 23 | # along with this program; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 25 | # 26 | # 27 | # To run the script execute: 28 | # execcfile('path:\to\Script_Maya.py') 29 | # in Script Editor 30 | # 31 | # 32 | # 33 | 34 | 35 | import glob 36 | import math 37 | import os 38 | import random 39 | import time 40 | 41 | import maya.OpenMayaUI as omui 42 | import maya.api.OpenMaya as om 43 | import maya.cmds as cmds 44 | import maya.mel as mel 45 | import pymel.core as pm 46 | 47 | try: 48 | # Maya2016 - PySide & Qt4 49 | from PySide.QtCore import Qt, SIGNAL 50 | from PySide.QtGui import (QMessageBox, QListWidgetItem, QFileDialog, QDialog, QWidget, QGridLayout, QLabel, 51 | QPushButton, QListWidget, QDesktopWidget) 52 | from shiboken import wrapInstance 53 | except ImportError: 54 | # Maya2017+ - PySide2 & Qt5 55 | from PySide2.QtCore import Qt, SIGNAL 56 | from shiboken2 import wrapInstance 57 | from PySide2.QtWidgets import (QMessageBox, QListWidgetItem, QFileDialog, QDialog, QWidget, QGridLayout, QLabel, 58 | QPushButton, QListWidget, QDesktopWidget) 59 | 60 | 61 | class DataTable(object): 62 | """ 63 | Object stores the parameters of currently running instance of script. It also runs the functions 64 | and makes callbacks to UI elements easier. 65 | """ 66 | 67 | target_list = None 68 | target_label = None 69 | scores_list = [] 70 | next_step = 0 # the step that should be performed next (when running the script step-by-step) 71 | ignore_steps = False # if ignore_steps is false the animation is step by step 72 | 73 | def __init__(self): 74 | pass 75 | 76 | def run(self, text, function, path=None): 77 | """ 78 | Run the script: create the scene. It can run step-by-step and stop after every part or run every function 79 | one after another. The function also measures an execution time of commands and updates the UI elements. 80 | 81 | :param text: string - Name of the current step that will be displayed in the UI and scores table. 82 | :param function: function() - Function that will be run. 83 | :param path: string - Additional parameter: path that can be passed to the function as parameter: 84 | required by some functions. 85 | """ 86 | 87 | self.target_label.setText(text) # Update the label of UI 88 | if path is None: # If no path was passed as argument, then do not pass this variable to target function 89 | ts = time.time() # Start measuring time 90 | function() # Execute the function passed as an argument 91 | else: 92 | ts = time.time() 93 | function(path) # if path was passed then pass it to the target function 94 | te = time.time() # Record the ending time of command 95 | score = [text, te - ts] # Measure the interval 96 | self.scores_list.append(score) # append the 97 | 98 | self.target_list.addItem(QListWidgetItem(str(score))) # Add measured time to scores list in UI 99 | 100 | def save(self): 101 | """ 102 | Function saves the execution times of commands to the file. 103 | """ 104 | 105 | i = 0 106 | scores = [] 107 | 108 | while i < self.target_list.count(): 109 | scores.append(self.target_list.item(i).text()) 110 | i += 1 111 | 112 | path = QFileDialog.getExistingDirectory(None, 'Select a folder to save the scores_Maya.txt file', 113 | 'D:/') 114 | with open(path + '/scores_Maya.txt', 'w') as file_: 115 | for score in scores: 116 | file_.write(score + '\n') 117 | 118 | # noinspection PyMethodMayBeStatic,PyMethodMayBeStatic 119 | def reset(self): 120 | """ 121 | Function resets the file and parameters of this object to the initial state. 122 | """ 123 | 124 | cmds.file(newFile=1, force=1) # Force creation of a new scene 125 | pass 126 | 127 | 128 | class GUI(QDialog): 129 | path = "C:/" 130 | 131 | def __init__(self): 132 | 133 | # set maya main window as parent or it will disappear quickly: 134 | main_window_ptr = omui.MQtUtil.mainWindow() 135 | maya_main_window = wrapInstance(long(main_window_ptr), QWidget) 136 | 137 | super(GUI, self).__init__(maya_main_window) # Initialize with maya_main_window as a parent 138 | 139 | self.resize(250, 150) # Set the size of window 140 | self.center() 141 | self.setWindowTitle('Script - Maya') # Set the title of window 142 | self.setWindowFlags(Qt.Tool) # The tool window will always be kept on top of parent (maya_main_window) 143 | 144 | # Delete UI on close to avoid winEvent error 145 | # self.setAttribute(QtCore.Qt.WA_DeleteOnClose) 146 | 147 | grid = QGridLayout() # Create a grid layout 148 | grid_internal = QGridLayout() 149 | self.label_info = QLabel('Launch the script with `start` button') # Create a label GUI element 150 | btn_step = QPushButton('Step by step') # Create a button 151 | btn_start = QPushButton('Run all steps') 152 | self.connect(btn_start, SIGNAL("clicked()"), self.fn_no_steps) # Connect button to function 153 | self.connect(btn_step, SIGNAL("clicked()"), self.fn_step) 154 | self.times_list = QListWidget(self) # Create a list widget 155 | btn_save = QPushButton('Save scores') 156 | btn_reset = QPushButton('Clear the scene') 157 | 158 | grid.addWidget(self.label_info, 0, 0) # Add the widget to the layout 159 | 160 | grid_internal.addWidget(btn_step, 0, 0) 161 | grid_internal.addWidget(btn_start, 0, 1) 162 | 163 | grid.addLayout(grid_internal, 1, 0) 164 | grid.addWidget(self.times_list, 2, 0) 165 | grid.addWidget(btn_save, 3, 0) 166 | grid.addWidget(btn_reset, 4, 0) 167 | 168 | self.data_table = DataTable() 169 | self.data_table.target_list = self.times_list 170 | self.data_table.target_label = self.label_info 171 | 172 | self.connect(btn_reset, SIGNAL("clicked()"), self.data_table.reset) 173 | self.connect(btn_save, SIGNAL("clicked()"), self.data_table.save) 174 | 175 | self.setLayout(grid) # Set the layout of the window 176 | 177 | def center(self): 178 | """ 179 | Function places window on the center of the screen. It is not necessary for script to run. 180 | """ 181 | 182 | qr = self.frameGeometry() 183 | cp = QDesktopWidget().availableGeometry().center() 184 | qr.moveCenter(cp) 185 | self.move(qr.topLeft()) 186 | 187 | def fn_step(self): 188 | """ 189 | Run function step-by-step: make one step. 190 | """ 191 | 192 | self.data_table.ignore_steps = False 193 | self.fn_start() 194 | 195 | def fn_no_steps(self): 196 | """ 197 | Run function: make all the steps. 198 | """ 199 | 200 | self.data_table.ignore_steps = True 201 | self.fn_start() 202 | 203 | def fn_start(self): 204 | """ 205 | Function runs other functions in a right order and with right parameters. 206 | """ 207 | while not os.path.isfile(self.path + '/land.obj'): # checks if the folder includes necessary file. 208 | # If not, then shows the QFileDialog that makes it possible to select the right one. 209 | 210 | self.path = QFileDialog.getExistingDirectory(self, 'Select the folder of additional files (named "common")') 211 | print self.path 212 | 213 | functions_with_names = [["Setup the scene", prepare_scene, self.path], 214 | ["Import basic objects", import_and_animate_basic_meshes, self.path], 215 | ["Create a shark finn and a cloud", create_shark_and_cloud, None], 216 | ["Create a chest with Macro script", create_chest, None], 217 | ["Create and animate trees", create_and_animate_trees, None], 218 | ["Fix objects hierarchy, finish the animation", change_hierarchy_and_animate, None], 219 | ["Create and assign materials", create_and_assign_materials, None]] 220 | 221 | if self.data_table.ignore_steps: 222 | for action_num in xrange(self.data_table.next_step, len(functions_with_names)): 223 | line = functions_with_names[action_num] 224 | self.data_table.run(text=line[0], function=line[1], path=line[2]) 225 | else: 226 | action_num = self.data_table.next_step 227 | self.data_table.next_step += 1 228 | line = functions_with_names[action_num] 229 | self.data_table.run(text=line[0], function=line[1], path=line[2]) 230 | 231 | 232 | def frange(start, end, jump): 233 | """ 234 | Function returns a list of floats, similar to int range(function) 235 | 236 | :param start: float - Start of a range 237 | :param end: float - End of a range 238 | :param jump: float - Interval between values 239 | :rtype : list of floats 240 | """ 241 | while start < end: 242 | yield start 243 | start += jump 244 | 245 | 246 | def set_scale_keys(target, keyframes): 247 | """ 248 | Function animates the scale of given object by creating the given keyframes. 249 | 250 | :param target: String - Name of an object which scale will be animated 251 | :param keyframes: Python list - Keyframes that will be created: [[int time, float scale (1 = 100%),] ...] 252 | """ 253 | 254 | for keyframe in keyframes: # For every keyframe from the list of keyframes scale object at proper time 255 | scale_value = float(keyframe[0]) 256 | cmds.setKeyframe(target, attribute='scaleX', v=scale_value, time=keyframe[1], itt="fast", ott="fast") 257 | cmds.setKeyframe(target, attribute='scaleY', v=scale_value, time=keyframe[1], itt="fast", ott="fast") 258 | cmds.setKeyframe(target, attribute='scaleZ', v=scale_value, time=keyframe[1], itt="fast", ott="fast") 259 | 260 | 261 | def leafs_rotations(number_of_leafs): 262 | """ 263 | Creates the list of angles of leafs around the palm tree. 264 | Leafs should be placed more or less evenly around the trunk but appear to be placed randomly. 265 | The leafs should not be placed too close, because they would overlap. 266 | 267 | :param number_of_leafs: int - Number of leafs 268 | :return: Python list - List of angles of leafs around the palm tree 269 | """ 270 | 271 | x = -180 # Leafs are placed around the trunk, so the range is 360 deg. x = 0, y = 2*pi would also be ok. 272 | y = 180 273 | angles = [] 274 | jump = (y - x) / float(number_of_leafs) # Divide the range by the number of leafs and create an array 275 | 276 | while x < y: 277 | random.seed() 278 | angles.append(random.uniform(x - (jump / 3.0), x + (jump / 3.0))) # every leaf is placed +/- (1/3)*interval 279 | x += jump 280 | 281 | return angles 282 | 283 | 284 | def set_position_keys(target, keyframes): 285 | """ 286 | Function animates the position of given object by creating the given keyframes. 287 | 288 | :param target: String - Name of an object which scale will be animated 289 | :param keyframes: Python list - Keyframes that will be created: [[int time, [float x, float y, float z]], ...] 290 | """ 291 | 292 | for keyframe in keyframes: # For every keyframe from the list of keyframes scale object at proper time 293 | cmds.setKeyframe(target, attribute='translateX', v=keyframe[0][0], time=keyframe[1], itt="fast", ott="fast") 294 | cmds.setKeyframe(target, attribute='translateY', v=keyframe[0][1], time=keyframe[1], itt="fast", ott="fast") 295 | cmds.setKeyframe(target, attribute='translateZ', v=keyframe[0][2], time=keyframe[1], itt="fast", ott="fast") 296 | 297 | 298 | def create_object(verts_pos, face_verts): 299 | """ 300 | Function creates an object with mesh given by vertice and face data. 301 | 302 | :type face_verts: Python list 303 | :type verts_pos: Python list 304 | """ 305 | 306 | shark_mesh = om.MObject() 307 | points = om.MFloatPointArray() # An array that is storing positions od vertices. Do not include id of vertices 308 | 309 | for vert in verts_pos: # add every point to Maya float points array 310 | p = om.MFloatPoint(vert[0], vert[2], -vert[1]) 311 | points.append(p) 312 | 313 | face_connects = om.MIntArray() # an array for vertice numbers per face. 314 | face_counts = om.MIntArray() # an array for total number of vertices per face 315 | for verts in face_verts: 316 | # In Maya mesh is created on a base of two arrays: list of vertice numbers and list of numbers of vertices 317 | # of faces. Vertice numbers from the first list are not grouped by faces, this is just a one dimension array. 318 | # Based on this list only it would be impossible to recreate mesh, because number of vertices in faces may vary 319 | # (in this example every face have 3 vertices, but this is not obligatory). 320 | # The second array stores the number of vertices of faces. From this list Mata gets a number of vertices of a 321 | # face, let's call it N, then assigns next N vertices to this face. The process is repeated for every face. 322 | 323 | face_connects.append(verts[0]) # Append vertices of face. 324 | face_connects.append(verts[1]) 325 | face_connects.append(verts[2]) 326 | face_counts.append(len(verts)) # append the number of vertices for this face 327 | mesh_fs = om.MFnMesh() 328 | mesh_fs.create(points, face_counts, face_connects, parent=shark_mesh) 329 | mesh_fs.updateSurface() 330 | node_name = mesh_fs.name() 331 | cmds.polySoftEdge(node_name, a=30, ch=1) # Automatically soften the edges of the mesh 332 | 333 | # assign new mesh to default shading group 334 | cmds.sets(node_name, e=True, fe='initialShadingGroup') 335 | return cmds.listRelatives(node_name, fullPath=True, parent=True) # node name stores a name of Shape node. 336 | # Most functions need a Transform node. Ths line returns it. 337 | 338 | 339 | def create_palm(diameter, segs_num, leafs_num, bending, id_num, anim_start, anim_end): 340 | """ 341 | Function creates a single palm tree. 342 | This function was created to show how to create basic geometry objects, use instances and use modifications. 343 | 344 | :param diameter: float - inner diameter of pine 345 | :param segs_num: int - number of segments of the pine 346 | :param leafs_num: int - number of leafs 347 | :param bending: float - how much bended the pine is 348 | :param id_num: int - ID of the tree 349 | :param anim_start: int - Starting frame of the tree animation 350 | :param anim_end: int - Ending frame of the tree animation 351 | """ 352 | 353 | keyframe_interval = (anim_end - anim_start) / (segs_num + 1.0) # interval of scale keyframes of the pine segments 354 | 355 | anim_start /= 25.0 # Convert frames to the time 356 | anim_end /= 25.0 # Need to convert now, because the number of segments is probably 357 | keyframe_interval /= 25.0 # grater then the number of frames between the start and the end o the animation of tree 358 | 359 | # list of times of keyframes for the pine 360 | # and leafs. Equal time intervals. 361 | keyframe_list = list(frange(start=anim_start, end=anim_end, jump=keyframe_interval)) 362 | 363 | keyframe_list.reverse() # Because the pop() will be used and the first frame should be the smallest number 364 | 365 | source_segment = 'segment_original' # Create an object that will be instanced 366 | cmds.polyCone(r=diameter / 2, h=-diameter * 8, n=source_segment, subdivisionsY=5) # Create a cone. Cone will have a 367 | # sharp tip, that will be removed later 368 | cmds.polyDelFacet(source_segment + '.f[20:79]', 369 | source_segment + '.f[81:100]') # delete polygons of sharp end of cone 370 | cmds.polyNormal(name=source_segment, normalMode=0) # Reverse face normals. 371 | # Normals are reversed, because "h" parameter is a negative number. 372 | bbox = cmds.exactWorldBoundingBox(source_segment) # The pivot is placed currently at the end of sharp tip of 373 | # the cone that had been removed. Pivot will be placed at the bottom of the objects now with a use of 374 | # its bounding box parameters. 375 | bottom_of_mesh = [(bbox[0] + bbox[3]) / 2, bbox[1], (bbox[2] + bbox[5]) / 2] 376 | cmds.xform(source_segment, piv=bottom_of_mesh, ws=True) 377 | 378 | segments_tab = [] # A list of all the segments of the tree. 379 | for i in xrange(segs_num): 380 | cmds.refresh(f=True) 381 | # Create segments of pine of the palm tree 382 | 383 | current_segment_name = 'Palm_element_' + str(id_num) + '_' + str(i) 384 | cmds.instance('segment_original', n=current_segment_name) # Create an instance with segment geometry 385 | cmds.move(diameter * i, current_segment_name, moveY=True, absolute=True) 386 | # Every node should be diameter higher then last one 387 | 388 | # The nodes at the top of the tree should be smaller then those at the bottom: 389 | cmds.scale(1.0 - (i / (segs_num * 4.0)), 1.0 - (i / (segs_num * 4.0)), 1, current_segment_name) 390 | segments_tab.append(pm.PyNode(current_segment_name)) # Append to the nodes table 391 | anim_start_frame = keyframe_list.pop() # Pop one time from the keyframe times list 392 | set_scale_keys(target=current_segment_name, keyframes=[[0.001, str(anim_start_frame) + 'sec'], 393 | [1.2, str(anim_start_frame + keyframe_interval) + 'sec'], 394 | [1, 395 | str(anim_start_frame + 2 * keyframe_interval) + 'sec']]) 396 | 397 | cmds.delete(source_segment) # Delete the source object, instance will not be removed 398 | root = segments_tab[0] 399 | for current_segment in segments_tab[1:]: 400 | # Parent every segment to the root node. 401 | pm.parent(current_segment, root, relative=True) # Using PyMel here to make managing ocjects easier 402 | # (long object names vchange after parenting, PyMel manages them better) 403 | 404 | # The leaf will be created from saved vertex data in a similar way to cloud. 405 | 406 | verts_list = [[0.0874634, 0.283682, -0.150049], [-9.33334, 3.45312, -5.19915], [-0.0979366, -0.242619, -0.151449], 407 | [0.0756626, 0.288981, 0.00435066], [-0.110037, -0.237219, 0.00305176], 408 | [-0.0341358, 0.0332813, 0.222252], [-0.046236, 0.0384817, 0.376751], [-2.00844, -0.0782185, -0.04245], 409 | [-1.49184, 1.38118, -0.0476494], [-1.51604, 1.39538, 0.200851], [-2.03964, -0.0789185, 0.205851], 410 | [-1.79314, 0.661982, 0.356852], [-8.51614, 2.95795, -3.08655], [-8.65224, 1.73258, -3.67535], 411 | [-7.77134, 3.93545, -3.64315], [-7.89874, 3.98053, -3.41335], [-8.77254, 1.77508, -3.43515], 412 | [-8.38964, 2.89923, -3.33135], [-1.81954, 0.668982, 0.60585], [-5.86674, 0.829681, -0.820549], 413 | [-5.03134, 3.19562, -0.787249], [-5.10854, 3.23514, -0.531349], [-5.94654, 0.870181, -0.570749], 414 | [-5.56024, 2.07138, -0.438848], [-5.63774, 2.11408, -0.182249], [-7.35774, 1.29268, -2.00885], 415 | [-6.54364, 3.59313, -1.90675], [-6.65514, 3.64373, -1.65775], [-7.46144, 1.34048, -1.75845], 416 | [-7.10164, 2.51205, -1.60085], [-3.83754, 1.37038, 0.50765], [-4.09794, 0.257582, -0.106649], 417 | [-3.33404, 2.40815, -0.13835], [-3.38054, 2.42888, 0.109451], [-4.14974, 0.269781, 0.141151], 418 | [-3.78934, 1.35658, 0.259151], [-7.21234, 2.56052, -1.34435], [-8.70384, 4.0245, -4.67165], 419 | [-9.38574, 2.48178, -4.54065], [-9.16784, 3.28523, -4.39535], [-9.32104, 2.46601, -4.65515], 420 | [-8.76504, 4.03897, -4.55925], [-9.10294, 3.26697, -4.51255]] 421 | 422 | faces_list = [[0, 5, 8], [3, 9, 6], [0, 8, 3], [1, 40, 38], [2, 5, 4], [5, 2, 11], [1, 38, 39], [5, 0, 6], 423 | [17, 37, 14], [15, 39, 12], [37, 41, 15], [7, 2, 10], [40, 42, 17], [10, 4, 18], [11, 32, 8], 424 | [9, 33, 18], [8, 32, 9], [13, 25, 16], [7, 31, 11], [16, 28, 12], [23, 29, 20], [21, 36, 24], 425 | [20, 27, 21], [19, 34, 22], [19, 29, 23], [22, 30, 24], [35, 20, 32], [33, 21, 30], [32, 20, 33], 426 | [25, 19, 28], [31, 19, 35], [28, 22, 36], [29, 17, 26], [27, 12, 36], [26, 15, 27], [31, 10, 34], 427 | [25, 17, 29], [34, 18, 30], [40, 13, 38], [38, 16, 12], [42, 1, 37], [41, 1, 39], [37, 1, 41], 428 | [40, 1, 42], [5, 11, 8], [9, 18, 6], [8, 9, 3], [5, 6, 4], [2, 7, 11], [0, 3, 6], [17, 42, 37], 429 | [15, 41, 39], [15, 14, 37], [2, 4, 10], [17, 13, 40], [4, 6, 18], [11, 35, 32], [33, 30, 18], 430 | [32, 33, 9], [25, 28, 16], [31, 35, 11], [28, 36, 12], [29, 26, 20], [21, 27, 36], [20, 26, 27], 431 | [19, 31, 34], [19, 25, 29], [22, 34, 30], [35, 23, 20], [21, 24, 30], [20, 21, 33], [19, 22, 28], 432 | [19, 23, 35], [22, 24, 36], [17, 14, 26], [27, 15, 12], [26, 14, 15], [31, 7, 10], [25, 13, 17], 433 | [34, 10, 18], [13, 16, 38], [12, 39, 38]] 434 | 435 | leaf_source_name = create_object(verts_list, faces_list) # Create the leaf object that will be instanced 436 | cmds.rename(leaf_source_name, "leaf") 437 | 438 | anim_start_frame = keyframe_list.pop() 439 | 440 | last_node_name = segments_tab[-1].longName() # Get the last element of the palm tree. It will be a parent of leafs. 441 | i = 0 442 | for rot_z in leafs_rotations(number_of_leafs=leafs_num): # Leafs should be distributed around the pine. 443 | current_leaf_name = "leaf_" + str(id_num) + '_' + str(i) 444 | cmds.instance("leaf", n=current_leaf_name) 445 | cmds.move(diameter * 4, current_leaf_name, moveY=True, relative=True) 446 | 447 | cmds.rotate(random.uniform(-math.pi / 15, math.pi / 15), rot_z, random.uniform(-math.pi / 8, math.pi / 10), 448 | current_leaf_name) 449 | set_scale_keys(target=current_leaf_name, 450 | keyframes=[[0.001, str(anim_start_frame) + "sec"], 451 | [1, str(anim_start_frame + keyframe_interval) + "sec"]]) 452 | cmds.scale(0.9, 0.9, 0.9, current_leaf_name) 453 | cmds.parent(current_leaf_name, last_node_name, relative=True) 454 | i += 1 455 | 456 | cmds.delete("leaf") 457 | 458 | # Now the bend modifier will be applied to the source element of a palm tree. Other elements wil be also affected 459 | # because they are parented to it. 460 | cmds.nonLinear(root.longName(), type='bend', after=True, curvature=2 * bending, lowBound=0) 461 | 462 | # Rescale the handle of a modifier, it will look nicer 463 | for name in cmds.ls(): 464 | if name.endswith('Handle'): 465 | cmds.scale(60, 60, 60, name) 466 | 467 | return root.longName() 468 | 469 | 470 | def prepare_scene(path): 471 | """ 472 | The function sets the basic parameters of the scene: time range and render settings. 473 | 474 | :param path: string - The directory with necessary files 475 | """ 476 | 477 | cmds.playbackOptions(min=0, max=260) # Set the animation range 478 | 479 | cmds.autoKeyframe(state=False) # Make sure, that the AutoKey button is disabled 480 | 481 | # WARNING: Mental Ray was discontinued 482 | # http://www.cgchannel.com/2017/11/nvidia-discontinues-mental-ray/ 483 | # Rendering of an image will be skipped if this plugin is not avaliable. 484 | 485 | try: 486 | cmds.loadPlugin('Mayatomr') 487 | except RuntimeError: 488 | pass 489 | 490 | if cmds.pluginInfo('Mayatomr', q=True, l=True): 491 | cmds.setAttr('defaultRenderGlobals.ren', 'mentalRay', type='string') # Set the render engine to MR 492 | # Next lines are a workaround for some bugs. The first one is that the render settings window has to be 493 | # opened before setting attributes of the render. If it would not be, then Maya would display an error 494 | # saying that such options do not exist. 495 | # The second bug is that after running this script the window was blank and it was impossible to set 496 | # parameters. This is a common bug and it can be repaired by closing this window with 497 | # cmds.deleteUI('unifiedRenderGlobalsWindow') command 498 | 499 | cmds.RenderGlobalsWindow() 500 | cmds.refresh(f=True) 501 | cmds.deleteUI('unifiedRenderGlobalsWindow') 502 | cmds.setAttr('miDefaultOptions.finalGather', 1) 503 | cmds.setAttr('miDefaultOptions.miSamplesQualityR', 1) 504 | cmds.setAttr('miDefaultOptions.lightImportanceSamplingQuality', 2) 505 | cmds.setAttr('miDefaultOptions.finalGather', 1) 506 | else: 507 | msg = "Mental Ray plugin is not available. " \ 508 | "WARNING: Mental Ray was discontinued and may not be avaliable anymore." \ 509 | "It can be found on the Autodesk website: " \ 510 | "https://knowledge.autodesk.com/support/maya/downloads/caas/downloads/content/" \ 511 | "mental-ray-plugin-for-maya-2016.html" \ 512 | "\n\nPart of script that uses Mental Ray will be skipped." 513 | print(msg) 514 | alert_box = QMessageBox() 515 | alert_box.setText(msg) 516 | alert_box.exec_() 517 | 518 | cam = cmds.camera(name="RenderCamera", focusDistance=35, position=[-224.354, 79.508, 3.569], 519 | rotation=[-19.999, -90, 0]) # create camera to set background (imageplane) 520 | # Set Image Plane for camera background 521 | cmds.imagePlane(camera=cmds.ls(cam)[1], fileName=(path.replace("\\", "/") + '/bg.bmp')) 522 | cmds.setAttr("imagePlaneShape1.depth", 400) 523 | cmds.setAttr("imagePlaneShape1.fit", 4) 524 | 525 | 526 | def import_and_animate_basic_meshes(path): 527 | """ 528 | This function imports some objects and animates them. 529 | It was created to show how to import objects and present one way of creating keyframes of animation. 530 | 531 | :param path: string - The directory with necessary files 532 | """ 533 | 534 | cmds.file(path + '\water.obj', i=True) # Import an obj file 535 | set_scale_keys(target="water", keyframes=[[0.001, 1], [1, 9]]) # Set the animation keys 536 | 537 | cmds.file(path + '\land.obj', i=True) 538 | set_scale_keys(target="land", keyframes=[[0.001, 8], [1, 11]]) 539 | 540 | 541 | def create_shark_and_cloud(): 542 | """ 543 | Creates meshes from vertex and face data. 544 | Two functions are used: one is easier to read an one is more useful. 545 | Similar functions can be used in importer plugin. 546 | """ 547 | shark_verts_pos = [[-2.42281, -0.814631, 1.55561], [0.0166863, -0.854455, 1.91858], [-2.42281, -0.482041, 1.55561], 548 | [0.0166863, -0.44221, 1.91858], [-2.57592, -0.814631, 3.45857], [-1.41455, -0.810425, 3.54678], 549 | [-2.57592, -0.482041, 3.45857], [-1.41455, -0.486246, 3.54678], [-2.54367, -0.8214, -0.819357], 550 | [-2.54367, -0.475272, -0.819357], [0.422536, -0.421143, -0.277747], 551 | [0.422536, -0.875526, -0.277747]] 552 | shark_face_verts = [[8, 10, 11], [4, 7, 6], [0, 5, 4], [1, 7, 5], [3, 6, 7], [2, 4, 6], [0, 9, 8], [2, 10, 9], 553 | [3, 11, 10], [1, 8, 11], [8, 9, 10], [4, 5, 7], [0, 1, 5], [1, 3, 7], [3, 2, 6], [2, 0, 4], 554 | [0, 2, 9], [2, 3, 10], [3, 1, 11], [1, 0, 8]] 555 | 556 | shark_node_name = create_object(shark_verts_pos, shark_face_verts) 557 | cmds.rename(shark_node_name, "shark") 558 | set_scale_keys(target="shark", keyframes=[[0.001, 9], [1, 15]]) 559 | cmds.move(-9.18464, -4, -54.9695, "shark", absolute=True) # Set position 560 | 561 | cloud_verts_pos = [[-4.59048, -11.5324, -2.85738], [4.19166, -11.3976, -1.66769], [-2.72098, 4.70308, -0.947684], 562 | [5.35751, 5.31851, -1.84713], [-2.55545, -10.6202, 1.76613], [6.33762, -11.4932, 3.83193], 563 | [-4.05797, 5.18567, 4.01239], [5.16506, 4.23825, 3.03181], [-7.57451, -3.27952, -1.45211], 564 | [-5.04695, -3.47346, -2.50455], [0.944433, 6.59175, -3.95915], [5.33078, -2.79647, -1.9336], 565 | [-1.41402, -13.436, -1.63148], [2.25454, -13.8944, 4.36555], [5.20539, -3.61147, 4.18473], 566 | [1.21982, 6.42224, 2.21349], [-5.31748, -3.30419, 3.23747], [6.47434, -13.4315, 0.369284], 567 | [-4.49047, -13.0672, -0.366047], [7.06894, 7.09671, -0.225245], [-3.55781, 7.03288, 2.01675], 568 | [-4.64846, -11.0102, -2.8238], [-5.21395, -10.2643, -2.81557], [-5.11732, -9.4053, -2.68607], 569 | [-4.63491, -8.46356, -2.67066], [-4.67857, -7.34732, -3.28498], [-4.66886, -6.0801, -2.95555], 570 | [-4.96425, -4.77316, -3.20924], [-3.07051, 4.22094, -1.27774], [-3.28412, 3.47717, -1.22602], 571 | [-3.06383, 2.42297, -1.70111], [-4.21875, 1.15586, -2.44524], [-4.59185, 0.108139, -1.878], 572 | [-4.55174, -1.04221, -2.62517], [-5.07763, -2.24332, -2.5385], [-2.5496, 5.2281, -1.08924], 573 | [-2.47412, 5.97114, -1.56816], [-2.32934, 6.64407, -2.13384], [-1.81588, 6.7158, -2.66064], 574 | [-1.09603, 6.51815, -3.1696], [-0.384585, 6.59353, -3.55172], [0.2763, 6.63422, -3.91024], 575 | [4.97608, 5.33017, -2.21633], [4.42463, 5.3988, -2.82698], [3.87665, 5.59257, -3.30965], 576 | [3.39066, 6.12778, -3.09912], [2.87637, 6.75938, -2.90991], [2.28094, 6.88389, -3.07711], 577 | [1.62215, 6.6081, -3.54207], [5.6303, 4.88423, -1.69767], [5.93795, 4.18237, -2.02055], 578 | [6.34299, 3.28777, -2.50259], [6.01454, 2.16795, -2.41291], [5.48294, 0.915054, -1.48493], 579 | [5.56809, -0.331761, -1.62049], [5.22757, -1.57047, -1.65198], [4.34654, -10.8263, -1.71773], 580 | [4.03986, -10.0871, -1.25091], [4.44435, -9.26752, -1.48684], [4.98975, -8.10985, -2.09718], 581 | [5.97541, -6.66577, -2.29159], [6.40411, -5.31424, -1.4463], [5.74385, -4.03539, -2.07227], 582 | [3.67823, -11.9509, -1.39023], [2.99699, -12.6519, -1.24017], [2.34207, -12.9799, -1.36114], 583 | [1.56308, -12.9821, -1.2517], [0.805849, -13.3548, -0.833223], [0.0592078, -13.9428, -0.927655], 584 | [-0.69599, -13.9633, -1.40722], [-4.48329, -11.8284, -3.03768], [-4.25605, -12.4004, -3.18883], 585 | [-3.80349, -12.8516, -3.39871], [-3.33853, -12.9033, -3.36947], [-2.8886, -12.6499, -2.84013], 586 | [-2.44545, -12.7983, -2.31099], [-1.98028, -12.9664, -1.95086], [-2.35827, -11.0242, 1.95376], 587 | [-2.04212, -11.8418, 2.40821], [-1.43451, -12.5864, 2.6025], [-0.464936, -12.8909, 2.70888], 588 | [0.277662, -13.0811, 3.36934], [0.744878, -13.5168, 3.99864], [1.39473, -13.9213, 4.33037], 589 | [5.84659, -11.8736, 4.11287], [5.35056, -12.4986, 4.28095], [4.93181, -13.3184, 4.37555], 590 | [4.62338, -14.1254, 4.68631], [4.25795, -14.4315, 4.95028], [3.74167, -14.2483, 4.93854], 591 | [3.06639, -13.9383, 4.62452], [6.93981, -10.9459, 3.54401], [6.81082, -10.1381, 3.49907], 592 | [5.67307, -9.16372, 4.27475], [5.07461, -8.06029, 4.44253], [5.59865, -6.89624, 3.44476], 593 | [5.71477, -5.76001, 4.10377], [5.43378, -4.68175, 4.73674], [5.26349, 3.76686, 2.83477], 594 | [5.03478, 3.10254, 2.51034], [5.60882, 2.3842, 2.96899], [5.28509, 1.44248, 4.19756], 595 | [5.06031, 0.227875, 4.11658], [5.74926, -1.10308, 4.13182], [5.23316, -2.41592, 4.08796], 596 | [4.77104, 4.2432, 2.87455], [4.26316, 4.37717, 2.64462], [3.77346, 4.88327, 2.60995], 597 | [3.33051, 5.59131, 2.87838], [2.8952, 5.78294, 3.20531], [2.40009, 5.74118, 3.04044], 598 | [1.83982, 6.00027, 2.49207], [-3.6252, 5.55577, 4.01007], [-3.01992, 5.85201, 3.70423], 599 | [-2.42564, 5.92598, 3.42756], [-1.77262, 6.08702, 3.08948], [-1.00918, 6.32267, 2.76293], 600 | [-0.205574, 6.30027, 2.54408], [0.543592, 6.39312, 2.26653], [-4.3646, 4.48682, 3.61868], 601 | [-4.17321, 3.39143, 3.43435], [-4.33876, 2.23708, 3.90402], [-4.28137, 1.23009, 3.54935], 602 | [-5.12764, 0.0918598, 3.99807], [-5.19081, -1.02315, 3.43132], [-5.29362, -2.11191, 2.91219], 603 | [-2.60726, -10.127, 2.17327], [-3.51078, -9.45301, 2.9977], [-3.79006, -8.71694, 3.36178], 604 | [-4.10539, -7.95529, 2.76918], [-4.42019, -6.85349, 2.78951], [-4.84402, -5.52935, 2.81615], 605 | [-5.09285, -4.46128, 3.52657], [4.30574, -11.5671, -1.50565], [4.50195, -11.8334, -1.25188], 606 | [4.83568, -12.1377, -0.98148], [5.20644, -12.408, -0.722621], [5.55156, -12.5921, -0.461673], 607 | [5.89193, -12.7367, -0.20753], [6.24181, -12.9731, 0.0607195], [6.29933, -11.7357, 3.70063], 608 | [6.30325, -12.1743, 3.31666], [6.22233, -12.6801, 2.81164], [5.95056, -13.1009, 2.2757], 609 | [5.81332, -13.7173, 1.74536], [6.03473, -14.0856, 1.23336], [6.39401, -13.9265, 0.764305], 610 | [-3.11063, -10.9355, 1.50183], [-3.75236, -11.6171, 1.07977], [-4.00088, -12.4831, 0.713789], 611 | [-3.78955, -13.2201, 0.516292], [-3.5181, -13.5544, 0.376321], [-3.54252, -13.4297, 0.189794], 612 | [-3.90938, -13.1606, -0.068965], [-4.75366, -11.8561, -2.68642], [-4.89771, -12.3524, -2.40486], 613 | [-5.09703, -12.9067, -2.14409], [-5.40772, -13.3663, -1.91872], [-5.6412, -13.5851, -1.59908], 614 | [-5.5659, -13.5145, -1.1818], [-5.09332, -13.2428, -0.743286], [5.45017, 5.73622, -1.85555], 615 | [5.63365, 6.26245, -1.85505], [6.1073, 6.76594, -1.94462], [6.58044, 7.20559, -1.85469], 616 | [6.88931, 7.53961, -1.51406], [7.10716, 7.66078, -1.04544], [7.19471, 7.51389, -0.59239], 617 | [5.40772, 4.66524, 3.02514], [5.76931, 5.01291, 2.65931], [6.14507, 5.2088, 2.16144], 618 | [6.27824, 5.38063, 1.43376], [6.17431, 5.62542, 0.759444], [6.24094, 5.98304, 0.33088], 619 | [6.67544, 6.4994, 0.0532598], [-2.6477, 4.65851, -0.662931], [-2.71723, 4.72583, -0.337669], 620 | [-3.02974, 5.03001, 0.0133729], [-3.55156, 5.4128, 0.457088], [-4.08555, 5.6588, 0.878288], 621 | [-4.20689, 6.06137, 1.27083], [-3.94135, 6.61804, 1.64613], [-3.90152, 5.41826, 3.96519], 622 | [-3.68639, 5.69672, 3.7975], [-3.57372, 5.96746, 3.6043], [-3.50975, 6.24396, 3.36952], 623 | [-3.38908, 6.56161, 3.08272], [-3.23099, 6.92618, 2.74989], [-3.27483, 7.14141, 2.38829], 624 | [1.45619, -7.49005, -3.83906], [-2.15714, 3.22855, 4.74324], [-3.20732, -16.3363, 0.593722], 625 | [8.50918, 6.1379, -0.126037], [-1.3075, 10.5179, 0.0826635], [6.66269, -11.5952, 0.976294], 626 | [6.18407, -10.885, 3.95382], [4.6369, -16.5258, 3.13471], [-6.47456, -10.6289, -2.18081], 627 | [-2.82653, 6.85526, 3.372], [-2.65245, 4.26594, -0.23955], [6.45967, -11.2423, 3.81836], 628 | [1.33039, -11.5956, 4.72251], [1.30475, 4.5572, -3.30185], [8.00107, -6.69582, 2.12858], 629 | [4.57166, 6.984, 2.49627], [-3.24572, -12.1366, -3.56982], [5.3204, 6.36013, -2.56745], 630 | [-3.11957, 7.73189, 2.69959], [6.77177, 0.0625889, 4.49272], [6.94192, -4.53513, -1.62334], 631 | [7.13623, 2.29023, 2.48835], [-5.82156, -11.0413, 0.905474], [-1.63365, -0.816481, -2.63599], 632 | [-3.79753, -3.1284, 4.1384], [-6.72222, 2.34786, 1.69348], [-0.365939, -17.3946, 3.7759], 633 | [-2.86998, 8.92864, -2.32206], [-1.19507, -7.54906, -2.6852], [4.65156, 2.46804, -4.03467], 634 | [3.35007, -14.7047, 0.201495], [1.6206, 3.8501, 3.19007], [2.27385, 10.1786, 0.636264], 635 | [-0.511457, -9.4981, 5.60078], [1.90472, -3.64936, 4.72947], [-3.64124, -14.7226, 1.98156], 636 | [0.714248, -11.7933, -1.52495], [-7.27783, -2.97639, 1.02711], [0.0551114, -15.631, 0.740704], 637 | [4.08346, -6.60669, 4.23111], [-3.96676, -3.6568, -3.18453], [0.128981, -15.0967, 4.90768], 638 | [5.1814, -0.697958, -2.3693], [-2.24666, 3.46083, -1.55516], [-1.03731, 9.80536, -2.4258], 639 | [2.76201, 7.5254, -2.57689], [-3.21442, 0.849207, -3.77201], [-4.5522, 4.79028, 3.52668], 640 | [-4.2064, -13.7668, -2.8477], [7.41965, 0.205489, 0.882005], [-7.04821, -1.17492, -1.75941], 641 | [7.28529, -10.4271, 2.98472], [7.00561, -4.39045, 2.97423], [2.43302, 1.91306, 4.44534], 642 | [2.09039, -17.1687, 0.520695], [-3.27282, 1.6396, 3.67241], [-6.87723, -7.81655, 0.412325], 643 | [5.25677, 8.8326, 0.858971], [-1.28577, -11.2257, 2.07694], [0.805838, 8.11066, 0.90506], 644 | [-0.46974, -2.74816, 4.81187], [-3.06642, 7.51852, -0.246379], [4.55288, 2.79781, 2.29269], 645 | [4.04536, -8.45291, -2.82363], [-1.69131, -8.69729, 4.54945], [7.44942, 3.06384, -0.812776], 646 | [-0.375084, 2.10788, -3.87666], [-2.33075, -13.1125, 1.34638], [3.73976, -15.1661, 5.22367], 647 | [-4.13958, -10.4225, 1.48909], [-6.57359, -4.40388, -2.5274], [-1.19156, -17.5279, 2.70367], 648 | [1.48849, 0.940755, -3.11198], [-6.25666, -8.51528, -2.26368], [5.42219, -14.6917, 0.904344], 649 | [-5.30033, 2.91069, 2.77322], [-3.69181, 5.1199, 4.16583], [5.23465, -10.0999, -0.279651], 650 | [3.30916, -9.50085, 4.15144], [6.64312, -7.95079, 0.064867], [2.06641, -11.3195, -2.02518], 651 | [-6.87761, -1.18354, 1.26735], [-1.93959, -3.56711, -3.96444], [-0.33943, -13.7318, 2.4941], 652 | [3.44558, -13.2893, 5.10556], [-3.73378, -8.56427, -2.31567], [-2.35109, -5.13952, 5.32983], 653 | [6.42324, 0.543804, 2.58669], [7.86166, -5.16509, 0.692536], [3.76085, -3.61315, -3.37012], 654 | [5.44298, -14.2463, 3.15755], [-1.70985, -15.7899, 0.0519905], [2.26734, -13.5848, -1.39097], 655 | [5.74778, 6.39146, 1.10414], [-2.11671, 9.79717, 1.08835], [2.8608, 8.25119, 1.23121], 656 | [-1.18382, 4.3518, 3.89946], [7.96713, 5.05793, 1.41253], [-6.69457, -4.65279, -1.21029], 657 | [0.0191634, -9.11299, -2.26856], [-3.81062, -7.07655, 2.93881], [-7.32947, 0.0447152, 1.78407], 658 | [1.69836, -8.23934, 4.66153], [-6.6485, -10.8634, -0.11143], [-4.06035, -15.9321, 1.42343], 659 | [4.5849, 7.70502, -0.677262], [-1.09886, -1.13732, 5.43579], [2.70622, -0.301464, -3.82059], 660 | [-5.6857, -1.744, -2.71823], [-5.81655, -12.8909, -1.16874], [0.289658, -18.1278, 2.42564], 661 | [-4.47469, -6.57199, 2.10047], [0.112202, 10.0015, 0.627223], [0.235416, 8.04662, -3.31171], 662 | [-2.24934, -5.91415, -2.4902], [-2.55157, 4.50158, -2.19153], [6.43219, 3.07829, 2.6692], 663 | [-3.97414, 5.64061, 1.87932], [-4.56586, 0.0207524, 4.42228], [4.63573, -2.79558, 3.89731], 664 | [6.43056, -6.98187, 3.0528], [-0.986888, -5.57974, 4.56781], [2.21565, 4.82825, 3.77766], 665 | [-1.71112, -11.9039, -1.80275], [2.9143, -7.33767, -3.12538], [3.40413, -13.6728, -0.739559], 666 | [7.51963, -2.20202, 0.395068], [5.59617, -12.9598, 1.13681], [-2.42802, 6.61584, -0.938049], 667 | [5.51021, -11.3324, -0.968232], [6.25447, 5.61217, -1.3508], [-1.20197, 8.31877, -2.62206], 668 | [4.7415, 1.08838, 4.32509], [5.97589, -3.48225, -1.75155], [-2.15625, -15.757, 0.921245], 669 | [-2.94145, -6.93029, -3.58556], [2.64081, 5.92833, -2.84607], [3.95925, -17.4688, 1.86022], 670 | [-3.52455, -14.873, 0.832899], [-3.21377, -9.36567, 4.09077], [-4.48335, -7.68947, 1.74946]] 671 | 672 | cloud_face_verts = [[0, 21, 205], [205, 70, 0], [21, 22, 205], [22, 23, 205], [23, 24, 274], [24, 25, 324], 673 | [25, 26, 229], [26, 27, 229], [27, 9, 229], [205, 71, 70], [205, 72, 71], [205, 73, 72], 674 | [205, 74, 73], [312, 75, 74], [312, 76, 75], [312, 12, 76], [28, 2, 35], [35, 304, 28], 675 | [304, 35, 36], [304, 36, 37], [304, 37, 38], [304, 38, 39], [232, 39, 40], [232, 40, 41], 676 | [202, 41, 10], [29, 28, 304], [30, 29, 304], [31, 30, 232], [32, 31, 235], [33, 32, 235], 677 | [34, 33, 235], [9, 34, 229], [3, 49, 218], [218, 42, 3], [49, 50, 218], [50, 51, 218], 678 | [51, 52, 218], [52, 53, 261], [53, 54, 231], [54, 55, 231], [55, 11, 278], [218, 43, 42], 679 | [218, 44, 43], [325, 45, 44], [325, 46, 45], [325, 47, 46], [325, 48, 47], [202, 10, 48], 680 | [56, 1, 63], [63, 269, 56], [269, 63, 64], [269, 64, 65], [269, 65, 66], [269, 66, 67], 681 | [225, 67, 68], [225, 68, 69], [312, 69, 12], [57, 56, 269], [58, 57, 269], [59, 58, 269], 682 | [60, 59, 252], [61, 60, 252], [62, 61, 313], [11, 62, 278], [4, 77, 247], [247, 126, 4], 683 | [77, 78, 247], [78, 79, 247], [79, 80, 247], [80, 81, 201], [81, 82, 201], [82, 83, 201], 684 | [83, 13, 201], [247, 127, 126], [328, 128, 127], [289, 129, 128], [289, 130, 129], 685 | [275, 131, 130], [275, 132, 131], [213, 16, 132], [84, 5, 91], [91, 200, 84], [200, 91, 92], 686 | [195, 92, 93], [273, 93, 94], [267, 94, 95], [267, 95, 96], [228, 96, 97], [228, 97, 14], 687 | [85, 84, 200], [86, 85, 195], [87, 86, 195], [88, 87, 195], [89, 88, 273], [90, 89, 273], 688 | [13, 90, 273], [7, 105, 251], [251, 98, 7], [105, 106, 251], [106, 107, 311], [107, 108, 311], 689 | [108, 109, 311], [109, 110, 311], [110, 111, 285], [111, 15, 285], [251, 99, 98], 690 | [251, 100, 99], [321, 101, 100], [321, 102, 101], [223, 103, 102], [308, 104, 103], 691 | [308, 14, 104], [112, 6, 119], [119, 265, 112], [265, 119, 120], [265, 120, 121], 692 | [190, 121, 122], [244, 122, 123], [307, 123, 124], [307, 124, 125], [213, 125, 16], 693 | [113, 112, 265], [114, 113, 265], [115, 114, 265], [116, 115, 285], [117, 116, 285], 694 | [118, 117, 285], [15, 118, 285], [0, 70, 237], [237, 154, 0], [70, 71, 237], [71, 72, 237], 695 | [72, 73, 280], [73, 74, 280], [74, 75, 280], [75, 76, 227], [76, 12, 227], [237, 155, 154], 696 | [237, 156, 155], [237, 157, 156], [237, 158, 157], [327, 159, 158], [327, 160, 159], 697 | [327, 18, 160], [63, 1, 133], [133, 314, 63], [314, 133, 134], [314, 134, 135], [314, 135, 136], 698 | [314, 136, 137], [314, 137, 138], [263, 138, 139], [263, 139, 17], [64, 63, 314], [65, 64, 281], 699 | [66, 65, 281], [67, 66, 281], [68, 67, 219], [69, 68, 227], [12, 69, 227], [5, 84, 279], 700 | [279, 140, 5], [84, 85, 279], [85, 86, 279], [86, 87, 279], [87, 88, 257], [88, 89, 257], 701 | [89, 90, 230], [90, 13, 230], [279, 141, 140], [279, 142, 141], [279, 143, 142], 702 | [263, 144, 143], [263, 145, 144], [263, 146, 145], [263, 17, 146], [77, 4, 147], [147, 256, 77], 703 | [256, 147, 148], [256, 148, 149], [256, 149, 150], [256, 150, 151], [327, 151, 152], 704 | [327, 152, 153], [327, 153, 18], [78, 77, 256], [79, 78, 256], [80, 79, 272], [81, 80, 272], 705 | [82, 81, 272], [83, 82, 230], [13, 83, 230], [1, 56, 318], [318, 133, 1], [56, 57, 266], 706 | [57, 58, 266], [58, 59, 209], [59, 60, 209], [60, 61, 209], [61, 62, 322], [62, 11, 322], 707 | [318, 134, 133], [318, 135, 134], [318, 136, 135], [318, 137, 136], [318, 138, 137], 708 | [318, 139, 138], [316, 17, 139], [49, 3, 161], [161, 319, 49], [319, 161, 162], [319, 162, 163], 709 | [319, 163, 164], [319, 164, 165], [192, 165, 166], [192, 166, 167], [192, 167, 19], 710 | [50, 49, 319], [51, 50, 319], [52, 51, 254], [53, 52, 254], [54, 53, 254], [55, 54, 238], 711 | [11, 55, 238], [7, 98, 305], [305, 168, 7], [98, 99, 305], [99, 100, 305], [100, 101, 208], 712 | [101, 102, 208], [102, 103, 208], [103, 104, 208], [104, 14, 241], [305, 169, 168], 713 | [305, 170, 169], [286, 171, 170], [286, 172, 171], [286, 173, 172], [192, 174, 173], 714 | [192, 19, 174], [91, 5, 140], [140, 240, 91], [240, 140, 141], [240, 141, 142], [240, 142, 143], 715 | [240, 143, 144], [316, 144, 145], [316, 145, 146], [316, 146, 17], [92, 91, 240], [93, 92, 240], 716 | [94, 93, 240], [95, 94, 309], [96, 95, 309], [97, 96, 241], [14, 97, 241], [3, 42, 206], 717 | [206, 161, 3], [42, 43, 206], [43, 44, 206], [44, 45, 234], [45, 46, 234], [46, 47, 234], 718 | [47, 48, 302], [48, 10, 302], [206, 162, 161], [206, 163, 162], [206, 164, 163], 719 | [206, 165, 164], [246, 166, 165], [246, 167, 166], [204, 19, 167], [35, 2, 175], [175, 317, 35], 720 | [317, 175, 176], [317, 176, 177], [317, 177, 178], [317, 178, 179], [250, 179, 180], 721 | [250, 180, 181], [250, 181, 20], [36, 35, 317], [37, 36, 317], [38, 37, 317], [39, 38, 320], 722 | [40, 39, 320], [41, 40, 320], [10, 41, 320], [6, 112, 198], [198, 182, 6], [112, 113, 198], 723 | [113, 114, 198], [114, 115, 248], [115, 116, 248], [116, 117, 248], [117, 118, 248], 724 | [118, 15, 284], [198, 183, 182], [198, 184, 183], [207, 185, 184], [207, 186, 185], 725 | [207, 187, 186], [207, 188, 187], [250, 20, 188], [105, 7, 168], [168, 282, 105], 726 | [282, 168, 169], [282, 169, 170], [282, 170, 171], [282, 171, 172], [282, 172, 173], 727 | [282, 173, 174], [204, 174, 19], [106, 105, 282], [107, 106, 282], [108, 107, 282], 728 | [109, 108, 204], [110, 109, 204], [111, 110, 284], [15, 111, 284], [2, 28, 199], [199, 175, 2], 729 | [28, 29, 199], [29, 30, 199], [30, 31, 239], [31, 32, 239], [32, 33, 297], [33, 34, 297], 730 | [34, 9, 259], [199, 176, 175], [199, 177, 176], [199, 178, 177], [199, 179, 178], 731 | [306, 180, 179], [306, 181, 180], [306, 20, 181], [21, 0, 154], [154, 298, 21], [298, 154, 155], 732 | [298, 155, 156], [298, 156, 157], [298, 157, 158], [298, 158, 159], [298, 159, 160], 733 | [211, 160, 18], [22, 21, 298], [23, 22, 197], [24, 23, 197], [25, 24, 197], [26, 25, 262], 734 | [27, 26, 262], [9, 27, 259], [4, 126, 258], [258, 147, 4], [126, 127, 258], [127, 128, 329], 735 | [128, 129, 329], [129, 130, 300], [130, 131, 300], [131, 132, 226], [132, 16, 270], 736 | [258, 148, 147], [211, 149, 148], [211, 150, 149], [211, 151, 150], [211, 152, 151], 737 | [211, 153, 152], [211, 18, 153], [119, 6, 182], [182, 236, 119], [236, 182, 183], 738 | [236, 183, 184], [236, 184, 185], [236, 185, 186], [236, 186, 187], [236, 187, 188], 739 | [306, 188, 20], [120, 119, 236], [121, 120, 264], [122, 121, 264], [123, 122, 264], 740 | [124, 123, 290], [125, 124, 290], [16, 125, 270], [240, 309, 94], [209, 266, 58], 741 | [93, 273, 195], [195, 273, 88], [219, 227, 68], [230, 257, 89], [300, 329, 129], [262, 259, 27], 742 | [184, 198, 207], [248, 198, 114], [239, 199, 30], [179, 199, 306], [200, 195, 85], 743 | [92, 195, 200], [130, 289, 275], [14, 308, 228], [278, 231, 55], [232, 235, 31], 744 | [208, 305, 100], [194, 268, 203], [167, 246, 204], [204, 284, 110], [274, 205, 23], 745 | [74, 205, 312], [234, 206, 44], [165, 206, 246], [207, 198, 283], [188, 207, 250], 746 | [276, 241, 315], [241, 208, 104], [238, 322, 11], [315, 241, 322], [170, 305, 286], 747 | [254, 238, 54], [160, 211, 298], [259, 262, 245], [235, 229, 34], [255, 296, 271], 748 | [102, 321, 223], [125, 213, 307], [239, 214, 199], [290, 270, 125], [256, 272, 79], 749 | [243, 299, 227], [302, 234, 47], [207, 283, 250], [288, 225, 205], [296, 189, 217], 750 | [202, 261, 255], [44, 218, 325], [143, 279, 263], [299, 243, 326], [285, 311, 110], 751 | [220, 285, 249], [301, 221, 302], [284, 248, 118], [223, 222, 291], [127, 247, 328], 752 | [295, 244, 213], [310, 222, 223], [158, 237, 327], [224, 323, 230], [225, 288, 313], 753 | [269, 252, 59], [287, 245, 300], [214, 239, 270], [323, 280, 260], [280, 237, 72], 754 | [94, 267, 273], [291, 222, 201], [229, 324, 25], [217, 271, 296], [215, 257, 230], 755 | [215, 230, 323], [261, 218, 52], [261, 202, 218], [41, 202, 232], [255, 232, 202], 756 | [233, 216, 193], [320, 302, 10], [294, 234, 302], [234, 294, 206], [235, 232, 255], 757 | [229, 235, 212], [214, 306, 199], [236, 264, 120], [280, 191, 237], [293, 327, 237], 758 | [210, 276, 238], [238, 254, 210], [259, 297, 34], [8, 270, 239], [144, 316, 240], 759 | [194, 203, 240], [309, 241, 96], [277, 322, 241], [242, 220, 249], [311, 251, 106], 760 | [243, 219, 196], [219, 243, 227], [190, 244, 295], [122, 244, 190], [329, 300, 245], 761 | [292, 245, 262], [284, 204, 246], [294, 302, 221], [201, 247, 80], [247, 201, 222], 762 | [221, 301, 248], [198, 248, 283], [223, 249, 310], [321, 249, 223], [317, 320, 38], 763 | [250, 193, 216], [100, 251, 321], [251, 220, 242], [189, 313, 288], [313, 278, 62], 764 | [222, 253, 247], [222, 275, 253], [319, 254, 51], [286, 210, 254], [255, 212, 235], 765 | [271, 212, 255], [256, 224, 272], [151, 327, 256], [257, 279, 87], [196, 257, 299], 766 | [148, 258, 211], [245, 292, 329], [239, 259, 8], [245, 287, 259], [215, 299, 257], 767 | [215, 323, 260], [189, 296, 231], [231, 261, 53], [197, 292, 262], [197, 262, 25], 768 | [263, 196, 219], [138, 263, 314], [264, 290, 123], [306, 214, 264], [121, 190, 265], 769 | [265, 285, 115], [266, 268, 194], [139, 318, 316], [291, 228, 223], [96, 228, 267], 770 | [277, 268, 209], [266, 209, 268], [67, 225, 269], [313, 269, 225], [270, 8, 226], 771 | [270, 226, 132], [271, 217, 303], [212, 271, 229], [272, 230, 82], [230, 272, 224], 772 | [273, 201, 13], [201, 273, 291], [324, 274, 24], [217, 205, 274], [132, 275, 213], 773 | [213, 310, 249], [241, 276, 208], [210, 208, 276], [241, 309, 277], [268, 277, 203], 774 | [231, 278, 189], [278, 313, 189], [196, 263, 279], [279, 257, 196], [280, 227, 299], 775 | [227, 280, 75], [281, 219, 67], [314, 281, 64], [174, 204, 282], [282, 204, 108], 776 | [283, 248, 193], [193, 250, 283], [248, 284, 221], [246, 221, 284], [190, 249, 285], 777 | [285, 265, 190], [192, 286, 254], [173, 286, 192], [287, 226, 8], [287, 8, 259], 778 | [288, 217, 189], [205, 217, 288], [128, 328, 289], [289, 253, 275], [290, 214, 270], 779 | [264, 214, 290], [291, 267, 228], [267, 291, 273], [211, 292, 197], [292, 211, 258], 780 | [323, 224, 293], [237, 191, 293], [206, 294, 246], [221, 246, 294], [249, 190, 295], 781 | [213, 249, 295], [261, 231, 296], [261, 296, 255], [297, 239, 32], [259, 239, 297], 782 | [298, 211, 197], [298, 197, 22], [280, 299, 260], [260, 299, 215], [226, 287, 300], 783 | [226, 300, 131], [301, 193, 248], [301, 233, 193], [302, 233, 301], [302, 320, 233], 784 | [324, 229, 303], [303, 229, 271], [39, 232, 304], [304, 232, 30], [210, 286, 305], 785 | [305, 208, 210], [188, 306, 236], [236, 306, 264], [244, 307, 213], [123, 307, 244], 786 | [103, 223, 308], [308, 223, 228], [240, 203, 309], [203, 277, 309], [275, 222, 310], 787 | [275, 310, 213], [220, 251, 311], [311, 285, 220], [69, 312, 225], [312, 205, 225], 788 | [252, 313, 61], [252, 269, 313], [219, 314, 263], [314, 219, 281], [315, 238, 276], 789 | [315, 322, 238], [194, 316, 318], [316, 194, 240], [216, 317, 250], [179, 250, 317], 790 | [266, 318, 56], [194, 318, 266], [254, 319, 192], [165, 192, 319], [320, 216, 233], 791 | [317, 216, 320], [249, 321, 242], [242, 321, 251], [322, 277, 209], [322, 209, 61], 792 | [323, 293, 191], [280, 323, 191], [303, 217, 324], [274, 324, 217], [325, 218, 202], 793 | [48, 325, 202], [196, 299, 326], [196, 326, 243], [327, 293, 224], [327, 224, 256], 794 | [253, 328, 247], [289, 328, 253], [329, 258, 127], [258, 329, 292]] 795 | 796 | cloud_node_name = create_object(cloud_verts_pos, cloud_face_verts) 797 | cmds.rename(cloud_node_name, "cloud") 798 | set_scale_keys(target="cloud", keyframes=[[0.001, 62], [1.1, 67], [1, 69]]) 799 | cmds.move(-9.18464, 31, 39.500, "cloud", absolute=True) 800 | set_position_keys(target="cloud", keyframes=[[[2.409, 31.7, 39.500], 69, [5, 5]], 801 | [[2.409, 33, 39.500], 97, [5, 5]], 802 | [[2.409, 32.3, 39.500], 125, [5, 5]], 803 | [[2.409, 31.5, 39.500], 173, [5, 5]], 804 | [[2.409, 32.3, 39.500], 220, [5, 5]], 805 | [[2.409, 31.4, 39.500], 240, [5, 5]]]) 806 | 807 | 808 | def create_chest(): 809 | """ 810 | Function creates an object with a use of macro recorded frm Maya. 811 | This function shows how to use macros. Macros are actions recorded with a Maya and they can be 812 | evaluated as Mel commands. Macros are a very simple way of creating simple scripts. 813 | """ 814 | recorded_macro = ''' 815 | 816 | CreatePolygonCube; 817 | polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1; 818 | // Result: pCube1 polyCube1 // 819 | setAttr "polyCube1.width" 35; 820 | setAttr "polyCube1.height" 25; 821 | setAttr "polyCube1.depth" 60; 822 | setAttr "polyCube1.width" 60; 823 | setAttr "polyCube1.depth" 35; 824 | move -r 0 12.426176 0 ; 825 | move -r 0 -16.909006 0 ; 826 | // Undo: move -r 0 -16.909006 0 // 827 | select -r pCube1 ; 828 | select -r pCube1 ; 829 | move -r 0 12.198762 0 ; 830 | select -r pCube1.f[0:2] pCube1.f[4:5] ; 831 | select -d pCube1.f[0] pCube1.f[2:5] ; 832 | hilite pCube1.f[1] ; 833 | selectMode -component ; 834 | select -r pCube1.f[1] ; 835 | polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 24.69876187 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0.31 -thickness 0 -smoothingAngle 30 pCube1.f[1]; 836 | // Result: polyExtrudeFace1 // 837 | move -r 0 3.039953 0 ; 838 | select -r pCube1.f[1] ; 839 | polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 27.7387132 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0.31 -thickness 0 -smoothingAngle 30 pCube1.f[1]; 840 | // Result: polyExtrudeFace2 // 841 | move -r 0 3.554939 0 ; 842 | scale -r -p 0cm 31.293651cm 0cm 1 1 0.919502 ; 843 | select -r pCube1.f[1] ; 844 | polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 31.29365056 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0.31 -thickness 0 -smoothingAngle 30 pCube1.f[1]; 845 | // Result: polyExtrudeFace3 // 846 | move -r 0 2.96881 0 ; 847 | scale -r -p 0cm 34.262464cm 0cm 1 1 0.820697 ; 848 | select -r pCube1.f[1] ; 849 | polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 34.2624635 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0.31 -thickness 0 -smoothingAngle 30 pCube1.f[1]; 850 | // Result: polyExtrudeFace4 // 851 | move -r 0 1.7812 0 ; 852 | scale -r -p 0cm 36.043664cm 0cm 1 1 0.779804 ; 853 | scale -r -p 0cm 36.043664cm 0cm 1 1 0.976608 ; 854 | select -r pCube1.f[1] ; 855 | polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 36.04366391 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0.31 -thickness 0 -smoothingAngle 30 pCube1.f[1]; 856 | // Result: polyExtrudeFace5 // 857 | move -r 0 2.138578 0 ; 858 | scale -r -p 0cm 38.182242cm 0cm 1 1 0.333583 ; 859 | select -r pCube1.f[1] ; 860 | // 861 | // 862 | // 863 | polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1; 864 | // Result: pCube1 polyCube1 // 865 | hilite pCube1.f[1] ; 866 | hilite -r pCube1 ; 867 | select -r pCube1.e[4:5] pCube1.e[8:9] ; 868 | select -r pCube1.e[4:5] pCube1.e[8:9] ; 869 | polySplitRing -ch on -splitType 2 -divisions 2 -useEqualMultiplier 1 -smoothingAngle 30 -fixQuads 1 ; 870 | // Result: polySplitRing1 // 871 | select -r pCube1.e[0:3] pCube1.e[14] pCube1.e[18] pCube1.e[22] pCube1.e[26] pCube1.e[30] pCube1.e[34] pCube1.e[38] pCube1.e[42] pCube1.e[46] pCube1.e[50] pCube1.e[56] pCube1.e[59] pCube1.e[64] pCube1.e[67] ; 872 | select -r pCube1.e[0:3] pCube1.e[14] pCube1.e[18] pCube1.e[22] pCube1.e[26] pCube1.e[30] pCube1.e[34] pCube1.e[38] pCube1.e[42] pCube1.e[46] pCube1.e[50] pCube1.e[56] pCube1.e[59] pCube1.e[64] pCube1.e[67] ; 873 | polySplitRing -ch on -splitType 2 -divisions 2 -useEqualMultiplier 1 -smoothingAngle 30 -fixQuads 1 ; 874 | // Result: polySplitRing2 // 875 | scale -r -p -2.38419e-006cm 18.940502cm 0cm 1.710318 1 1 ; 876 | // 877 | // 878 | // 879 | select -r pCube1.e[71] ; 880 | select -r pCube1.e[54] pCube1.e[56] pCube1.e[58:59] pCube1.e[71] pCube1.e[97] pCube1.e[107] pCube1.e[133] ; 881 | select -tgl pCube1.e[69] ; 882 | select -r pCube1.e[54] pCube1.e[56] pCube1.e[58:59] pCube1.e[62] pCube1.e[64] pCube1.e[66:67] pCube1.e[69] pCube1.e[71] pCube1.e[97] pCube1.e[99] pCube1.e[105] pCube1.e[107] pCube1.e[133] pCube1.e[135] ; 883 | select -tgl pCube1.e[74] ; 884 | select -r pCube1.e[54] pCube1.e[56] pCube1.e[58:59] pCube1.e[62] pCube1.e[64] pCube1.e[66:67] pCube1.e[69:72] pCube1.e[74] pCube1.e[76] pCube1.e[78] pCube1.e[80] pCube1.e[82] pCube1.e[84] pCube1.e[86] pCube1.e[88] pCube1.e[90] pCube1.e[92] pCube1.e[94] pCube1.e[96:100] pCube1.e[102:103] pCube1.e[105] pCube1.e[107] pCube1.e[133] pCube1.e[135] ; 885 | select -tgl pCube1.e[110] ; 886 | select -r pCube1.e[54] pCube1.e[56] pCube1.e[58:59] pCube1.e[62] pCube1.e[64] pCube1.e[66:67] pCube1.e[69:72] pCube1.e[74] pCube1.e[76] pCube1.e[78] pCube1.e[80] pCube1.e[82] pCube1.e[84] pCube1.e[86] pCube1.e[88] pCube1.e[90] pCube1.e[92] pCube1.e[94] pCube1.e[96:100] pCube1.e[102:103] pCube1.e[105:108] pCube1.e[110] pCube1.e[112] pCube1.e[114] pCube1.e[116] pCube1.e[118] pCube1.e[120] pCube1.e[122] pCube1.e[124] pCube1.e[126] pCube1.e[128] pCube1.e[130] pCube1.e[132:136] pCube1.e[138:139] ; 887 | polyBevel3 -fraction 0.5 -offsetAsFraction 1 -autoFit 1 -segments 2 -worldSpace 1 -smoothingAngle 30 -fillNgons 1 -mergeVertices 1 -mergeVertexTolerance 0.0001 -miteringAngle 180 -angleTolerance 180 -ch 1 pCube1.e[54] pCube1.e[56] pCube1.e[58:59] pCube1.e[62] pCube1.e[64] pCube1.e[66:67] pCube1.e[69:72] pCube1.e[74] pCube1.e[76] pCube1.e[78] pCube1.e[80] pCube1.e[82] pCube1.e[84] pCube1.e[86] pCube1.e[88] pCube1.e[90] pCube1.e[92] pCube1.e[94] pCube1.e[96:100] pCube1.e[102:103] pCube1.e[105:108] pCube1.e[110] pCube1.e[112] pCube1.e[114] pCube1.e[116] pCube1.e[118] pCube1.e[120] pCube1.e[122] pCube1.e[124] pCube1.e[126] pCube1.e[128] pCube1.e[130] pCube1.e[132:136] pCube1.e[138:139]; 888 | // Result: polyBevel1 // 889 | setAttr "polyBevel1.segments" 1; 890 | setAttr "polyBevel1.fraction" 0.2; 891 | select -r pCube1 ; 892 | // 893 | // 894 | // 895 | select -r pCube1.f[30] ; 896 | select -tgl pCube1.f[126] ; 897 | select -r pCube1.f[22:24] pCube1.f[26:30] pCube1.f[124:126] pCube1.f[129] ; 898 | select -tgl pCube1.f[32] ; 899 | select -tgl pCube1.f[127] ; 900 | select -r pCube1.f[13:14] pCube1.f[22:30] pCube1.f[32:33] pCube1.f[35] pCube1.f[50:61] pCube1.f[122] pCube1.f[124:127] pCube1.f[129] ; 901 | select -tgl pCube1.f[19] ; 902 | select -tgl pCube1.f[36] ; 903 | select -r pCube1.f[13:14] pCube1.f[19] pCube1.f[21:61] pCube1.f[122:129] ; 904 | select -r pCube1.f[13:14] pCube1.f[19] pCube1.f[21:61] pCube1.f[122:129] ; 905 | select -tgl pCube1.f[17] ; 906 | select -tgl pCube1.f[18] ; 907 | select -r pCube1.f[10:61] pCube1.f[122:129] ; 908 | select -r pCube1.f[10:61] pCube1.f[122:129] ; 909 | polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 18.94050318 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0 -thickness 0 -smoothingAngle 30 pCube1.f[10:61] pCube1.f[122:129]; 910 | // Result: polyExtrudeFace6 // 911 | setAttr "polyExtrudeFace6.localTranslate" -type double3 0 0 0.561432 ; 912 | // 913 | // 914 | // 915 | CreatePolygonCube; 916 | polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1; 917 | // Result: pCube4 polyCube4 // 918 | move -r 0 0 19.085489 ; 919 | scale -r 4.220598 1 1 ; 920 | scale -r 1 1 2.27589 ; 921 | move -r 0 23.766661 0.353976 ; 922 | move -r 0 1.256653 -0.875374 ; 923 | move -r 0 0.627245 -0.0170114 ; 924 | // Warning: line 0: Cannot duplicate dagObjects and non-dagObjects in one command; Duplicating selected dagObject(s) only. // 925 | duplicate -rr; 926 | // Result: pCube5 // 927 | move -r 0 -1.388916 0 ; 928 | select -tgl pCube4 ; 929 | scale -r 1 0.51969 1 ; 930 | select -r pCube5 ; 931 | move -r 0 0.213222 0 ; 932 | // 933 | // 934 | // 935 | select -r pCube5 ; 936 | scale -r 1 0.567198 1 ; 937 | duplicate -rr; 938 | // Result: pCube7 // 939 | move -r 0 0 3.068127 ; 940 | rotate -r -os -fo 0 0 90 ; 941 | scale -r 1 1 1.959888 ; 942 | move -r 0 0 1.248968 ; 943 | move -r 0 -0.260536 0 ; 944 | select -cl ; 945 | CreatePolygonTorus; 946 | polyTorus -r 1 -sr 0.5 -tw 0 -sx 20 -sy 20 -ax 0 1 0 -cuv 1 -ch 1; 947 | // Result: pTorus1 polyTorus1 // 948 | move -r 0 0 21.282374 ; 949 | rotate -r -os -fo 0 0 -90 ; 950 | move -r 0 25.635984 -0.367648 ; 951 | select -cl ; 952 | select -r pCube7 ; 953 | scale -r 1 3.532689 1 ; 954 | select -r pTorus1 ; 955 | setAttr "polyTorus1.radius" 1.5; 956 | setAttr "polyTorus1.sectionRadius" 0.2; 957 | move -r 0 0 -0.254292 ; 958 | select -tgl pCube7 ; 959 | move -r 0 -0.537235 -0.478274 ; 960 | // 961 | // 962 | // 963 | select -r pTorus2 ; 964 | move -r 0 0 -1.115252 ; 965 | select -r pCube7 ; 966 | move -r 0 0.529639 0 ; 967 | select -r pTorus2 ; 968 | setAttr "polyTorus2.radius" 1.5; 969 | setAttr "polyTorus2.sectionRadius" 0.2; 970 | select -tgl pCube7 ; 971 | move -r 0 -0.686094 0 ; 972 | select -cl ; 973 | select -r pCube7 ; 974 | move -r 0 0 -0.235067 ; 975 | move -r 0 0.142105 0 ; 976 | // 977 | // 978 | // 979 | rename |pCube7 "LOCK_BODY" ; 980 | // Result: LOCK_BODY // 981 | hilite -r pTorus2 ; 982 | select -r pTorus2 ; 983 | rename |pTorus2 "LOCK_1" ; 984 | // Result: LOCK_1 // 985 | select -r pCube5 ; 986 | rename |pCube5 "LOCK_A" ; 987 | // Result: LOCK_A // 988 | select -r pCube6 ; 989 | rename |pCube6 "LOCK_B" ; 990 | // Result: LOCK_B // 991 | select -r pCube1 ; 992 | rename |pCube1 "CHEST" ; 993 | // Result: CHEST // 994 | select -r LOCK_BODY ; 995 | parent LOCK_BODY LOCK_1; 996 | // Result: LOCK_1 // 997 | select -r LOCK_1 ; 998 | rotate -r -os -fo 0 15 0 ; 999 | // 1000 | // 1001 | // 1002 | select -cl ; 1003 | parent LOCK_1 CHEST ; 1004 | // Result: LOCK_1 // 1005 | select -r LOCK_B ; 1006 | parent LOCK_B CHEST ; 1007 | // Result: LOCK_B // 1008 | select -r LOCK_A ; 1009 | parent LOCK_A CHEST ; 1010 | // Result: LOCK_A // 1011 | select -r CHEST ; 1012 | select -r pCube2 ; 1013 | select -r pCube2 pCube3 pCube4 pTorus1 ; 1014 | doDelete; 1015 | 1016 | 1017 | ''' 1018 | 1019 | pm.mel.eval(recorded_macro) 1020 | set_scale_keys(target='CHEST', keyframes=[[0.001, 57], [0.1, 63]]) 1021 | set_position_keys(target='CHEST', keyframes=[[[-3.892, 0.764, 0.349], 57, [1, 1]], 1022 | [[-3.892, 2.297, 0.349], 61, [1, 1]], 1023 | [[-3.892, 0.764, 0.349], 63, [1, 1]]]) 1024 | cmds.rotate('CHEST') 1025 | cmds.move(-3.941, -1.533, 0.061, absolute=True) 1026 | cmds.parent('CHEST', 'land') 1027 | 1028 | 1029 | def create_and_animate_trees(): 1030 | """ 1031 | Function uses the create_palm() support function to create and animate some palm trees. 1032 | It was created to show how to create basic geometry objects, use instances and use modifications. 1033 | """ 1034 | 1035 | palm1 = create_palm(diameter=1.3, segs_num=20, leafs_num=9, bending=34, id_num=1, anim_start=11, anim_end=26) 1036 | palm2 = create_palm(diameter=1.6, segs_num=20, leafs_num=9, bending=34, id_num=2, anim_start=40, anim_end=45) 1037 | palm3 = create_palm(diameter=1.1, segs_num=18, leafs_num=9, bending=24, id_num=3, anim_start=20, anim_end=35) 1038 | palm4 = create_palm(diameter=1.1, segs_num=24, leafs_num=9, bending=24, id_num=4, anim_start=25, anim_end=40) 1039 | 1040 | cmds.currentTime(55) # The removal of history had strange effect when it was applied before tree animation 1041 | # Next line is intended to avoid a bug. If the history has to be deleted with a cmds.delete function. If it 1042 | # would not be modified then the bend modificator would have to be moved wit an object or it would affect an object 1043 | # in different ways then desired during a changes in its position. The problem is, that during that an evaluation 1044 | # of commands may take some time and the removing of history resulted in not deformed mesh or a partially 1045 | # deformed mesh. This is why cmds.refresh() command was used. 1046 | cmds.refresh(f=True) 1047 | 1048 | cmds.delete(palm1, ch=True) 1049 | cmds.rotate(0.197, 105, 0.558, palm1, absolute=True) # Rotate the palm 1050 | cmds.move(-8.5, -4.538, 18.1, palm1, absolute=True) # Position the palm 1051 | cmds.parent(palm1, 'land', relative=True) # Rename it 1052 | 1053 | cmds.delete(palm2, ch=True) 1054 | cmds.rotate(-16.935, 74.246, -23.907, palm2) 1055 | cmds.move(29.393, -3.990, 4.526, palm2) 1056 | cmds.parent(palm2, 'land', relative=True) 1057 | 1058 | cmds.delete(palm3, ch=True) 1059 | cmds.move(24.498, -3.322, 36.057, palm3) 1060 | cmds.rotate(0.023, 0.248, -1.950, palm3) 1061 | cmds.parent(palm3, 'land', relative=True) 1062 | 1063 | cmds.delete(palm4, ch=True) 1064 | cmds.move(4.353, -1.083, 22.68, palm4) 1065 | cmds.rotate(-150, -102.569, 872.616, palm4) 1066 | cmds.parent(palm4, 'land', relative=True) 1067 | 1068 | 1069 | def change_hierarchy_and_animate(): 1070 | """ 1071 | Function modifies the hierarchy of scene and creates some final animations, that ware not possible to create earlier. 1072 | It also creates cameras and lights. 1073 | """ 1074 | cmds.lookThru('perspView', 'RenderCamera1') # Change the perspective viewport to the render camera. 1075 | 1076 | top_locator = cmds.spaceLocator() # Parent for all the elements that will rotate together 1077 | objects_list = ['land', 'water', 'cloud', 'shark', ] 1078 | 1079 | for obj in objects_list: 1080 | cmds.parent(obj, top_locator) 1081 | 1082 | cmds.setKeyframe(top_locator, attribute='rotateY', v=20, time=260, itt="plateau", ott="plateau") 1083 | cmds.setKeyframe(top_locator, attribute='rotateY', v=0, time=0, itt="linear", ott="linear") 1084 | 1085 | dome_light = cmds.polySphere(r=500) # This sphere is a substitute of a skylight in 3Ds Max 1086 | cmds.polyNormal(dome_light, normalMode=0) # The normals have to point to inside 1087 | if cmds.pluginInfo('Mayatomr', q=True, l=True): 1088 | # Only if Mental Ray is loaded: 1089 | cmds.setAttr(dome_light[0] + ".miDeriveFromMaya", 0) # Enable changes in object render settings 1090 | cmds.setAttr(dome_light[0] + ".miVisible", 0) # This object will be invisible to camera 1091 | cmds.setAttr(dome_light[0] + ".miShadow", 0) # And will not affect shadows 1092 | cmds.rename(dome_light[0], "dome_light") 1093 | 1094 | area_light = cmds.shadingNode('areaLight', asLight=True) 1095 | cmds.scale(25, 25, 25, area_light, absolute=True) 1096 | cmds.move(-230.59, 178.425, 99.192, area_light) 1097 | cmds.rotate(0, -68.929, -37.987, area_light) 1098 | 1099 | cmds.setAttr(area_light + ".intensity", 120000.0) 1100 | if cmds.pluginInfo('Mayatomr', q=True, l=True): 1101 | # Only if Mental Ray is loaded: 1102 | cmds.setAttr(area_light + ".areaLight", 1) 1103 | cmds.setAttr(area_light + ".areaType", 1) 1104 | cmds.setAttr(area_light + ".decayRate", 2) 1105 | cmds.setAttr(area_light + ".areaHiSamples", 64) 1106 | 1107 | 1108 | def create_and_assign_materials(): 1109 | """ 1110 | Function creates and applies materials to the objects 1111 | It was created to show how to use materials. 1112 | """ 1113 | 1114 | light_dome_mat = cmds.shadingNode("surfaceShader", asShader=True) 1115 | cmds.setAttr(light_dome_mat + ".outColorR", 0.15) 1116 | cmds.setAttr(light_dome_mat + ".outColorG", 0.15) 1117 | cmds.setAttr(light_dome_mat + ".outColorB", 0.15) 1118 | light_dome_sg = cmds.sets(renderable=True, noSurfaceShader=True, empty=True) 1119 | cmds.connectAttr('%s.outColor' % light_dome_mat, '%s.surfaceShader' % light_dome_sg) 1120 | cmds.rename(light_dome_mat, 'light_dome_material') 1121 | 1122 | land_mat = cmds.shadingNode("lambert", asShader=True) 1123 | cmds.setAttr(land_mat + ".colorR", 1.0) 1124 | cmds.setAttr(land_mat + ".colorG", 0.75) 1125 | cmds.setAttr(land_mat + ".colorB", 0.45) 1126 | land_sg = cmds.sets(renderable=True, noSurfaceShader=True, empty=True) 1127 | cmds.connectAttr('%s.outColor' % land_mat, '%s.surfaceShader' % land_sg) 1128 | cmds.sets("land", e=True, forceElement=land_sg) 1129 | cmds.rename(land_mat, 'land_material') 1130 | 1131 | wood_mat = cmds.shadingNode("lambert", asShader=True) 1132 | cmds.setAttr(wood_mat + ".colorR", 0.18) 1133 | cmds.setAttr(wood_mat + ".colorG", 0.13) 1134 | cmds.setAttr(wood_mat + ".colorB", 0.13) 1135 | wood_sg = cmds.sets(renderable=True, noSurfaceShader=True, empty=True) 1136 | cmds.connectAttr('%s.outColor' % wood_mat, '%s.surfaceShader' % wood_sg) 1137 | cmds.rename(wood_mat, 'wood_material') 1138 | 1139 | leaf_mat = cmds.shadingNode("lambert", asShader=True) 1140 | cmds.setAttr(leaf_mat + ".colorR", 0.4) 1141 | cmds.setAttr(leaf_mat + ".colorG", 1.0) 1142 | cmds.setAttr(leaf_mat + ".colorB", 0.3) 1143 | leaf_sg = cmds.sets(renderable=True, noSurfaceShader=True, empty=True) 1144 | cmds.connectAttr('%s.outColor' % leaf_mat, '%s.surfaceShader' % leaf_sg) 1145 | cmds.rename(leaf_mat, 'leaf_material') 1146 | 1147 | gray_mat = cmds.shadingNode("lambert", asShader=True) 1148 | cmds.setAttr(gray_mat + ".colorR", 0, 84) 1149 | cmds.setAttr(gray_mat + ".colorG", 0, 84) 1150 | cmds.setAttr(gray_mat + ".colorB", 0, 84) 1151 | gray_sg = cmds.sets(renderable=True, noSurfaceShader=True, empty=True) 1152 | cmds.connectAttr('%s.outColor' % gray_mat, '%s.surfaceShader' % gray_sg) 1153 | cmds.rename(gray_mat, 'gray_material') 1154 | 1155 | if cmds.pluginInfo('Mayatomr', q=True, l=True): 1156 | water_mat = cmds.shadingNode("mia_material_x", asShader=True) 1157 | cmds.setAttr(water_mat + ".diffuseR", 0.0) 1158 | cmds.setAttr(water_mat + ".diffuseG", 0.209) 1159 | cmds.setAttr(water_mat + ".diffuseB", 0.202) 1160 | cmds.setAttr(water_mat + ".refl_gloss", 0.84) 1161 | cmds.setAttr(water_mat + ".reflectivity", 0.6) 1162 | cmds.setAttr(water_mat + ".diffuse_roughness", 0.16) 1163 | cmds.setAttr(water_mat + ".refr_ior", 1.3) 1164 | cmds.setAttr(water_mat + ".transparency", 0.43) 1165 | cmds.setAttr(water_mat + ".refr_gloss", 0.76) 1166 | cmds.setAttr(water_mat + ".refr_falloff_on", 1) 1167 | cmds.setAttr(water_mat + ".refl_falloff_on", 1) 1168 | cmds.setAttr(water_mat + ".refr_falloff_dist", 42) 1169 | cmds.setAttr(water_mat + ".refl_falloff_dist", 10) 1170 | cmds.setAttr(water_mat + ".refr_falloff_color_on", 1) 1171 | cmds.setAttr(water_mat + ".refl_falloff_color_on", 1) 1172 | cmds.setAttr(water_mat + ".refr_depth", 6) 1173 | cmds.setAttr(water_mat + ".refr_falloff_colorR", 0.125) 1174 | cmds.setAttr(water_mat + ".refr_falloff_colorG", 0.988) 1175 | cmds.setAttr(water_mat + ".refr_falloff_colorB", 1.0) 1176 | cmds.setAttr(water_mat + ".refl_falloff_colorR", 0.2) 1177 | cmds.setAttr(water_mat + ".refl_falloff_colorG", 0.2) 1178 | cmds.setAttr(water_mat + ".refl_falloff_colorB", 0.2) 1179 | water_sg = cmds.sets(renderable=True, noSurfaceShader=True, empty=True) 1180 | cmds.connectAttr('%s.message' % water_mat, '%s.miPhotonShader' % water_sg) 1181 | cmds.connectAttr('%s.message' % water_mat, '%s.miShadowShader' % water_sg) 1182 | cmds.connectAttr('%s.message' % water_mat, '%s.miMaterialShader' % water_sg) 1183 | else: 1184 | water_mat = cmds.shadingNode("lambert", asShader=True) 1185 | cmds.setAttr(water_mat + ".colorR", 0, 0) 1186 | cmds.setAttr(water_mat + ".colorG", 0, 0) 1187 | cmds.setAttr(water_mat + ".colorB", 0.8) 1188 | water_sg = cmds.sets(renderable=True, noSurfaceShader=True, empty=True) 1189 | cmds.connectAttr('%s.outColor' % water_mat, '%s.surfaceShader' % water_sg) 1190 | cmds.rename(water_mat, 'water_material') 1191 | 1192 | for obj in cmds.ls(geometry=True, ): # Assign materials to objects 1193 | if "dome_light" in obj: 1194 | cmds.sets(obj, e=True, forceElement=light_dome_sg) 1195 | if "LOCK" in obj: 1196 | cmds.sets(obj, e=True, forceElement=gray_sg) 1197 | if any(x in obj for x in ['segment', 'CHEST']): 1198 | cmds.sets(obj, e=True, forceElement=wood_sg) 1199 | if "leaf" in obj: 1200 | cmds.sets(obj, e=True, forceElement=leaf_sg) 1201 | if "water" in obj: 1202 | cmds.sets(obj, e=True, forceElement=water_sg) 1203 | 1204 | 1205 | if __name__ == "__main__": 1206 | 1207 | # Development workaround for winEvent error when running 1208 | # the script multiple times 1209 | try: 1210 | # noinspection PyUnboundLocalVariable 1211 | ui.close() 1212 | except NameError: 1213 | pass 1214 | 1215 | ui = GUI() 1216 | ui.show() 1217 | --------------------------------------------------------------------------------