1 /* 2 * This program is free software; you can redistribute it and/or 3 * modify it under the terms of the GNU General Public License 4 * as published by the Free Software Foundation; either version 2 5 * of the License, or (at your option) any later version. 6 * 7 * This program is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 * 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software Foundation, 14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 * 16 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 * All rights reserved. 18 */ 19 20 /** \file 21 * \ingroup DNA 22 */ 23 24 #pragma once 25 26 #include "DNA_ID.h" 27 #include "DNA_defs.h" 28 29 struct AnimData; 30 struct Ipo; 31 struct bNodeTree; 32 33 #ifndef MAX_MTEX 34 # define MAX_MTEX 18 35 #endif 36 37 /** 38 * World defines general modeling data such as a background fill, 39 * gravity, color model etc. It mixes rendering data and modeling data. */ 40 typedef struct World { 41 ID id; 42 /** Animation data (must be immediately after id for utilities to use it). */ 43 struct AnimData *adt; 44 /* runtime (must be immediately after id for utilities to use it). */ 45 DrawDataList drawdata; 46 47 char _pad0[4]; 48 short texact, mistype; 49 50 float horr, horg, horb; 51 52 /** 53 * Exposure is a multiplication factor. Unused now, but maybe back later. 54 * Kept in to be upward compatible. 55 */ 56 float exposure, exp, range; 57 58 /** 59 * Some world modes 60 * bit 0: Do mist 61 */ 62 short mode; 63 char _pad2[6]; 64 65 float misi, miststa, mistdist, misthi; 66 67 /** Ambient occlusion. */ 68 float aodist, aoenergy; 69 70 /** Assorted settings. */ 71 short flag; 72 char _pad3[6]; 73 74 /** Old animation system, deprecated for 2.5. */ 75 struct Ipo *ipo DNA_DEPRECATED; 76 short pr_texture, use_nodes; 77 char _pad[4]; 78 79 /* previews */ 80 struct PreviewImage *preview; 81 82 /* nodes */ 83 struct bNodeTree *nodetree; 84 85 /** Runtime. */ 86 ListBase gpumaterial; 87 } World; 88 89 /* **************** WORLD ********************* */ 90 91 /* mode */ 92 #define WO_MIST (1 << 0) 93 #define WO_MODE_UNUSED_1 (1 << 1) /* cleared */ 94 #define WO_MODE_UNUSED_2 (1 << 2) /* cleared */ 95 #define WO_MODE_UNUSED_3 (1 << 3) /* cleared */ 96 #define WO_MODE_UNUSED_4 (1 << 4) /* cleared */ 97 #define WO_MODE_UNUSED_5 (1 << 5) /* cleared */ 98 #define WO_AMB_OCC (1 << 6) 99 #define WO_MODE_UNUSED_7 (1 << 7) /* cleared */ 100 101 enum { 102 WO_MIST_QUADRATIC = 0, 103 WO_MIST_LINEAR = 1, 104 WO_MIST_INVERSE_QUADRATIC = 2, 105 }; 106 107 /* flag */ 108 #define WO_DS_EXPAND (1 << 0) 109 /* NOTE: this must have the same value as MA_DS_SHOW_TEXS, 110 * otherwise anim-editors will not read correctly 111 */ 112 #define WO_DS_SHOW_TEXS (1 << 2) 113