2015-05-19 03:48:29 +00:00
|
|
|
/*
|
|
|
|
Open Asset Import Library (assimp)
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
2022-01-10 20:13:43 +00:00
|
|
|
Copyright (c) 2006-2022, assimp team
|
2018-01-28 18:42:05 +00:00
|
|
|
|
2017-05-09 17:57:36 +00:00
|
|
|
|
2015-05-19 03:48:29 +00:00
|
|
|
All rights reserved.
|
|
|
|
|
2015-05-19 03:52:10 +00:00
|
|
|
Redistribution and use of this software in source and binary forms,
|
|
|
|
with or without modification, are permitted provided that the
|
2015-05-19 03:48:29 +00:00
|
|
|
following conditions are met:
|
|
|
|
|
|
|
|
* Redistributions of source code must retain the above
|
|
|
|
copyright notice, this list of conditions and the
|
|
|
|
following disclaimer.
|
|
|
|
|
|
|
|
* Redistributions in binary form must reproduce the above
|
|
|
|
copyright notice, this list of conditions and the
|
|
|
|
following disclaimer in the documentation and/or other
|
|
|
|
materials provided with the distribution.
|
|
|
|
|
|
|
|
* Neither the name of the assimp team, nor the names of its
|
|
|
|
contributors may be used to endorse or promote products
|
|
|
|
derived from this software without specific prior
|
|
|
|
written permission of the assimp team.
|
|
|
|
|
2015-05-19 03:52:10 +00:00
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
2015-05-19 03:48:29 +00:00
|
|
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
2015-05-19 03:52:10 +00:00
|
|
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
2015-05-19 03:48:29 +00:00
|
|
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
2015-05-19 03:52:10 +00:00
|
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
2015-05-19 03:48:29 +00:00
|
|
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
2015-05-19 03:52:10 +00:00
|
|
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
2015-05-19 03:48:29 +00:00
|
|
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @file BlenderScene.h
|
|
|
|
* @brief Intermediate representation of a BLEND scene.
|
|
|
|
*/
|
|
|
|
#ifndef INCLUDED_AI_BLEND_SCENE_H
|
|
|
|
#define INCLUDED_AI_BLEND_SCENE_H
|
|
|
|
|
|
|
|
#include "BlenderDNA.h"
|
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
namespace Assimp {
|
2016-02-28 16:30:11 +00:00
|
|
|
namespace Blender {
|
2015-05-19 03:48:29 +00:00
|
|
|
|
|
|
|
// Minor parts of this file are extracts from blender data structures,
|
|
|
|
// declared in the ./source/blender/makesdna directory.
|
|
|
|
// Stuff that is not used by Assimp is commented.
|
|
|
|
|
|
|
|
// NOTE
|
|
|
|
// this file serves as input data to the `./scripts/genblenddna.py`
|
|
|
|
// script. This script generates the actual binding code to read a
|
|
|
|
// blender file with a possibly different DNA into our structures.
|
2015-05-19 03:52:10 +00:00
|
|
|
// Only `struct` declarations are considered and the following
|
2015-05-19 03:48:29 +00:00
|
|
|
// rules must be obeyed in order for the script to work properly:
|
|
|
|
//
|
|
|
|
// * C++ style comments only
|
|
|
|
//
|
|
|
|
// * Structures may include the primitive types char, int, short,
|
2016-09-12 10:41:49 +00:00
|
|
|
// float, double. Signed specifiers are not allowed on
|
2015-05-19 03:57:13 +00:00
|
|
|
// integers. Enum types are allowed, but they must have been
|
2015-05-19 03:48:29 +00:00
|
|
|
// defined in this header.
|
|
|
|
//
|
|
|
|
// * Structures may aggregate other structures, unless not defined
|
|
|
|
// in this header.
|
|
|
|
//
|
|
|
|
// * Pointers to other structures or primitive types are allowed.
|
|
|
|
// No references or double pointers or arrays of pointers.
|
2016-04-05 21:23:53 +00:00
|
|
|
// A pointer to a T is normally written as std::shared_ptr, while a
|
2015-05-19 03:48:29 +00:00
|
|
|
// pointer to an array of elements is written as boost::
|
|
|
|
// shared_array. To avoid cyclic pointers, use raw pointers in
|
|
|
|
// one direction.
|
|
|
|
//
|
|
|
|
// * Arrays can have maximally two-dimensions. Any non-pointer
|
|
|
|
// type can form them.
|
|
|
|
//
|
|
|
|
// * Multiple fields can be declare in a single line (i.e `int a,b;`)
|
|
|
|
// provided they are neither pointers nor arrays.
|
|
|
|
//
|
|
|
|
// * One of WARN, FAIL can be appended to the declaration (
|
2016-09-12 10:41:49 +00:00
|
|
|
// prior to the semicolon to specify the error handling policy if
|
2015-05-19 03:48:29 +00:00
|
|
|
// this field is missing in the input DNA). If none of those
|
2016-09-12 10:41:49 +00:00
|
|
|
// is specified the default policy is to substitute a default
|
2015-05-19 03:48:29 +00:00
|
|
|
// value for the field.
|
|
|
|
//
|
|
|
|
|
2016-10-30 18:21:38 +00:00
|
|
|
// warn if field is missing, substitute default value
|
|
|
|
#ifdef WARN
|
2020-05-02 13:14:38 +00:00
|
|
|
#undef WARN
|
2016-10-30 18:21:38 +00:00
|
|
|
#endif
|
2020-05-02 13:14:38 +00:00
|
|
|
#define WARN
|
2016-10-30 18:21:38 +00:00
|
|
|
|
|
|
|
// fail the import if the field does not exist
|
|
|
|
#ifdef FAIL
|
2020-05-02 13:14:38 +00:00
|
|
|
#undef FAIL
|
2016-10-30 18:21:38 +00:00
|
|
|
#endif
|
2020-05-02 13:14:38 +00:00
|
|
|
#define FAIL
|
2015-05-19 03:48:29 +00:00
|
|
|
|
|
|
|
struct Object;
|
|
|
|
struct MTex;
|
|
|
|
struct Image;
|
2021-11-26 19:41:50 +00:00
|
|
|
struct Collection;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2016-04-05 21:23:53 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2015-05-19 03:48:29 +00:00
|
|
|
#define AI_BLEND_MESH_MAX_VERTS 2000000000L
|
|
|
|
|
2016-09-12 10:41:49 +00:00
|
|
|
static const size_t MaxNameLen = 1024;
|
|
|
|
|
2015-05-19 03:48:29 +00:00
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct ID : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
char name[MaxNameLen] WARN;
|
2015-05-19 03:57:13 +00:00
|
|
|
short flag;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct ListBase : ElemBase {
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<ElemBase> first;
|
2022-08-09 09:43:50 +00:00
|
|
|
std::weak_ptr<ElemBase> last;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct PackedFile : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
int size WARN;
|
|
|
|
int seek WARN;
|
|
|
|
std::shared_ptr<FileOffset> data WARN;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct GroupObject : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
std::shared_ptr<GroupObject> prev, next FAIL;
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Object> ob;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Group : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
|
|
|
int layer;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<GroupObject> gobject;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
2021-11-12 02:33:51 +00:00
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct CollectionObject : ElemBase {
|
2021-11-26 19:41:50 +00:00
|
|
|
//CollectionObject* prev;
|
|
|
|
std::shared_ptr<CollectionObject> next;
|
|
|
|
Object *ob;
|
2021-11-12 02:33:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct CollectionChild : ElemBase {
|
|
|
|
std::shared_ptr<CollectionChild> next, prev;
|
|
|
|
std::shared_ptr<Collection> collection;
|
|
|
|
};
|
|
|
|
|
2021-11-26 19:41:50 +00:00
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Collection : ElemBase {
|
|
|
|
ID id FAIL;
|
|
|
|
ListBase gobject; // CollectionObject
|
|
|
|
ListBase children; // CollectionChild
|
|
|
|
};
|
|
|
|
|
2015-05-19 03:48:29 +00:00
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct World : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MVert : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
float co[3] FAIL;
|
2020-10-25 09:34:43 +00:00
|
|
|
float no[3] FAIL; // read as short and divided through / 32767.f
|
2015-05-19 03:57:13 +00:00
|
|
|
char flag;
|
|
|
|
int mat_nr WARN;
|
|
|
|
int bweight;
|
2018-06-09 13:45:09 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
MVert() :
|
|
|
|
ElemBase(), flag(0), mat_nr(0), bweight(0) {}
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MEdge : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
int v1, v2 FAIL;
|
|
|
|
char crease, bweight;
|
|
|
|
short flag;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MLoop : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
int v, e;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MLoopUV : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
float uv[2];
|
|
|
|
int flag;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
// Note that red and blue are not swapped, as with MCol
|
|
|
|
struct MLoopCol : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
unsigned char r, g, b, a;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MPoly : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
int loopstart;
|
|
|
|
int totloop;
|
|
|
|
short mat_nr;
|
|
|
|
char flag;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MTexPoly : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
Image *tpage;
|
2015-05-19 03:57:13 +00:00
|
|
|
char flag, transp;
|
|
|
|
short mode, tile, pad;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MCol : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
char r, g, b, a FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MFace : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
int v1, v2, v3, v4 FAIL;
|
2015-05-19 03:57:13 +00:00
|
|
|
int mat_nr FAIL;
|
|
|
|
char flag;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct TFace : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
float uv[4][2] FAIL;
|
|
|
|
int col[4] FAIL;
|
|
|
|
char flag;
|
|
|
|
short mode;
|
|
|
|
short tile;
|
|
|
|
short unwrap;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MTFace : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
MTFace() :
|
2020-10-25 09:34:43 +00:00
|
|
|
flag(0),
|
|
|
|
mode(0),
|
|
|
|
tile(0),
|
|
|
|
unwrap(0) {
|
2020-05-02 13:14:38 +00:00
|
|
|
}
|
2017-11-18 14:50:45 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
float uv[4][2] FAIL;
|
|
|
|
char flag;
|
|
|
|
short mode;
|
|
|
|
short tile;
|
|
|
|
short unwrap;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2016-04-05 21:23:53 +00:00
|
|
|
// std::shared_ptr<Image> tpage;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
2020-05-02 13:14:38 +00:00
|
|
|
struct MDeformWeight : ElemBase {
|
|
|
|
int def_nr FAIL;
|
|
|
|
float weight FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
2020-05-02 13:14:38 +00:00
|
|
|
struct MDeformVert : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
vector<MDeformWeight> dw WARN;
|
|
|
|
int totweight;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
2020-05-02 13:14:38 +00:00
|
|
|
#define MA_RAYMIRROR 0x40000
|
2016-05-17 19:17:51 +00:00
|
|
|
#define MA_TRANSPARENCY 0x10000
|
2020-05-02 13:14:38 +00:00
|
|
|
#define MA_RAYTRANSP 0x20000
|
|
|
|
#define MA_ZTRANSP 0x00040
|
2016-03-29 19:10:15 +00:00
|
|
|
|
2015-05-19 03:48:29 +00:00
|
|
|
struct Material : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
float r, g, b WARN;
|
|
|
|
float specr, specg, specb WARN;
|
2015-05-19 03:57:13 +00:00
|
|
|
short har;
|
2020-05-02 13:14:38 +00:00
|
|
|
float ambr, ambg, ambb WARN;
|
|
|
|
float mirr, mirg, mirb;
|
2015-05-19 03:57:13 +00:00
|
|
|
float emit WARN;
|
2016-03-29 19:10:15 +00:00
|
|
|
float ray_mirror;
|
2015-05-19 03:57:13 +00:00
|
|
|
float alpha WARN;
|
|
|
|
float ref;
|
|
|
|
float translucency;
|
2016-03-29 19:10:15 +00:00
|
|
|
int mode;
|
2015-05-19 03:57:13 +00:00
|
|
|
float roughness;
|
|
|
|
float darkness;
|
|
|
|
float refrac;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2016-05-17 19:17:51 +00:00
|
|
|
float amb;
|
|
|
|
float ang;
|
|
|
|
float spectra;
|
|
|
|
float spec;
|
|
|
|
float zoffs;
|
|
|
|
float add;
|
|
|
|
float fresnel_mir;
|
|
|
|
float fresnel_mir_i;
|
|
|
|
float fresnel_tra;
|
|
|
|
float fresnel_tra_i;
|
|
|
|
float filter;
|
|
|
|
float tx_limit;
|
|
|
|
float tx_falloff;
|
|
|
|
float gloss_mir;
|
|
|
|
float gloss_tra;
|
|
|
|
float adapt_thresh_mir;
|
|
|
|
float adapt_thresh_tra;
|
|
|
|
float aniso_gloss_mir;
|
|
|
|
float dist_mir;
|
|
|
|
float hasize;
|
|
|
|
float flaresize;
|
|
|
|
float subsize;
|
|
|
|
float flareboost;
|
|
|
|
float strand_sta;
|
|
|
|
float strand_end;
|
|
|
|
float strand_ease;
|
|
|
|
float strand_surfnor;
|
|
|
|
float strand_min;
|
|
|
|
float strand_widthfade;
|
|
|
|
float sbias;
|
|
|
|
float lbias;
|
|
|
|
float shad_alpha;
|
|
|
|
float param;
|
|
|
|
float rms;
|
|
|
|
float rampfac_col;
|
|
|
|
float rampfac_spec;
|
|
|
|
float friction;
|
|
|
|
float fh;
|
|
|
|
float reflect;
|
|
|
|
float fhdist;
|
|
|
|
float xyfrict;
|
|
|
|
float sss_radius;
|
|
|
|
float sss_col;
|
|
|
|
float sss_error;
|
|
|
|
float sss_scale;
|
|
|
|
float sss_ior;
|
|
|
|
float sss_colfac;
|
|
|
|
float sss_texfac;
|
|
|
|
float sss_front;
|
|
|
|
float sss_back;
|
|
|
|
|
|
|
|
short material_type;
|
|
|
|
short flag;
|
|
|
|
short ray_depth;
|
|
|
|
short ray_depth_tra;
|
|
|
|
short samp_gloss_mir;
|
|
|
|
short samp_gloss_tra;
|
|
|
|
short fadeto_mir;
|
|
|
|
short shade_flag;
|
|
|
|
short flarec;
|
|
|
|
short starc;
|
|
|
|
short linec;
|
|
|
|
short ringc;
|
|
|
|
short pr_lamp;
|
|
|
|
short pr_texture;
|
|
|
|
short ml_flag;
|
|
|
|
short texco;
|
|
|
|
short mapto;
|
|
|
|
short ramp_show;
|
|
|
|
short pad3;
|
|
|
|
short dynamode;
|
|
|
|
short pad2;
|
|
|
|
short sss_flag;
|
|
|
|
short sss_preset;
|
|
|
|
short shadowonly_flag;
|
|
|
|
short index;
|
|
|
|
short vcol_alpha;
|
|
|
|
short pad4;
|
|
|
|
|
|
|
|
char seed1;
|
|
|
|
char seed2;
|
|
|
|
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Group> group;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
short diff_shader WARN;
|
|
|
|
short spec_shader WARN;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<MTex> mtex[18];
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
2018-06-09 13:45:09 +00:00
|
|
|
/*
|
|
|
|
CustomDataLayer 104
|
|
|
|
|
|
|
|
int type 0 4
|
|
|
|
int offset 4 4
|
|
|
|
int flag 8 4
|
|
|
|
int active 12 4
|
|
|
|
int active_rnd 16 4
|
|
|
|
int active_clone 20 4
|
|
|
|
int active_mask 24 4
|
|
|
|
int uid 28 4
|
|
|
|
char name 32 64
|
|
|
|
void *data 96 8
|
|
|
|
*/
|
2018-06-09 13:56:26 +00:00
|
|
|
struct CustomDataLayer : ElemBase {
|
2018-06-09 13:45:09 +00:00
|
|
|
int type;
|
|
|
|
int offset;
|
|
|
|
int flag;
|
|
|
|
int active;
|
|
|
|
int active_rnd;
|
|
|
|
int active_clone;
|
|
|
|
int active_mask;
|
|
|
|
int uid;
|
|
|
|
char name[64];
|
2020-05-02 13:14:38 +00:00
|
|
|
std::shared_ptr<ElemBase> data; // must be converted to real type according type member
|
|
|
|
|
|
|
|
CustomDataLayer() :
|
|
|
|
ElemBase(),
|
|
|
|
type(0),
|
|
|
|
offset(0),
|
|
|
|
flag(0),
|
|
|
|
active(0),
|
|
|
|
active_rnd(0),
|
|
|
|
active_clone(0),
|
|
|
|
active_mask(0),
|
|
|
|
uid(0),
|
|
|
|
data(nullptr) {
|
2018-06-09 13:45:09 +00:00
|
|
|
memset(name, 0, sizeof name);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
CustomData 208
|
|
|
|
|
|
|
|
CustomDataLayer *layers 0 8
|
|
|
|
int typemap 8 168
|
|
|
|
int pad_i1 176 4
|
|
|
|
int totlayer 180 4
|
|
|
|
int maxlayer 184 4
|
|
|
|
int totsize 188 4
|
|
|
|
BLI_mempool *pool 192 8
|
|
|
|
CustomDataExternal *external 200 8
|
|
|
|
*/
|
2018-06-09 13:56:26 +00:00
|
|
|
struct CustomData : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
vector<std::shared_ptr<struct CustomDataLayer>> layers;
|
|
|
|
int typemap[42]; // CD_NUMTYPES
|
2018-06-09 13:45:09 +00:00
|
|
|
int totlayer;
|
|
|
|
int maxlayer;
|
|
|
|
int totsize;
|
|
|
|
/*
|
|
|
|
std::shared_ptr<BLI_mempool> pool;
|
|
|
|
std::shared_ptr<CustomDataExternal> external;
|
|
|
|
*/
|
|
|
|
};
|
|
|
|
|
2015-05-19 03:48:29 +00:00
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Mesh : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
int totface FAIL;
|
|
|
|
int totedge FAIL;
|
|
|
|
int totvert FAIL;
|
|
|
|
int totloop;
|
|
|
|
int totpoly;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
short subdiv;
|
|
|
|
short subdivr;
|
|
|
|
short subsurftype;
|
|
|
|
short smoothresh;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
vector<MFace> mface FAIL;
|
|
|
|
vector<MTFace> mtface;
|
|
|
|
vector<TFace> tface;
|
|
|
|
vector<MVert> mvert FAIL;
|
|
|
|
vector<MEdge> medge WARN;
|
|
|
|
vector<MLoop> mloop;
|
|
|
|
vector<MLoopUV> mloopuv;
|
|
|
|
vector<MLoopCol> mloopcol;
|
|
|
|
vector<MPoly> mpoly;
|
|
|
|
vector<MTexPoly> mtpoly;
|
|
|
|
vector<MDeformVert> dvert;
|
|
|
|
vector<MCol> mcol;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
vector<std::shared_ptr<Material>> mat FAIL;
|
2018-06-09 13:45:09 +00:00
|
|
|
|
|
|
|
struct CustomData vdata;
|
|
|
|
struct CustomData edata;
|
|
|
|
struct CustomData fdata;
|
|
|
|
struct CustomData pdata;
|
|
|
|
struct CustomData ldata;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Library : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
char name[240] WARN;
|
|
|
|
char filename[240] FAIL;
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Library> parent WARN;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Camera : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
enum Type {
|
2020-05-02 13:14:38 +00:00
|
|
|
Type_PERSP = 0,
|
|
|
|
Type_ORTHO = 1
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
Type type, flag WARN;
|
2016-01-27 01:12:15 +00:00
|
|
|
float lens WARN;
|
|
|
|
float sensor_x WARN;
|
|
|
|
float clipsta, clipend;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Lamp : ElemBase {
|
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
enum FalloffType {
|
2020-05-02 13:14:38 +00:00
|
|
|
FalloffType_Constant = 0x0,
|
|
|
|
FalloffType_InvLinear = 0x1,
|
|
|
|
FalloffType_InvSquare = 0x2
|
2015-05-19 03:57:13 +00:00
|
|
|
//,FalloffType_Curve = 0x3
|
|
|
|
//,FalloffType_Sliders = 0x4
|
|
|
|
};
|
|
|
|
|
|
|
|
enum Type {
|
2020-05-02 13:14:38 +00:00
|
|
|
Type_Local = 0x0,
|
|
|
|
Type_Sun = 0x1,
|
|
|
|
Type_Spot = 0x2,
|
|
|
|
Type_Hemi = 0x3,
|
|
|
|
Type_Area = 0x4
|
2015-05-19 03:57:13 +00:00
|
|
|
//,Type_YFPhoton = 0x5
|
|
|
|
};
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
ID id FAIL;
|
|
|
|
//AnimData *adt;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
Type type FAIL;
|
|
|
|
short flags;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
//int mode;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
short colormodel, totex;
|
|
|
|
float r, g, b, k WARN;
|
|
|
|
//float shdwr, shdwg, shdwb;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
float energy, dist, spotsize, spotblend;
|
|
|
|
//float haint;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
float constant_coefficient;
|
|
|
|
float linear_coefficient;
|
|
|
|
float quadratic_coefficient;
|
2019-04-24 22:35:14 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
float att1, att2;
|
|
|
|
//struct CurveMapping *curfalloff;
|
|
|
|
FalloffType falloff_type;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
//float clipsta, clipend, shadspotsize;
|
|
|
|
//float bias, soft, compressthresh;
|
|
|
|
//short bufsize, samp, buffers, filtertype;
|
|
|
|
//char bufflag, buftype;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
//short ray_samp, ray_sampy, ray_sampz;
|
|
|
|
//short ray_samp_type;
|
|
|
|
short area_shape;
|
|
|
|
float area_size, area_sizey, area_sizez;
|
|
|
|
//float adapt_thresh;
|
|
|
|
//short ray_samp_method;
|
2015-05-19 03:57:13 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
//short texact, shadhalostep;
|
2015-05-19 03:57:13 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
//short sun_effect_type;
|
|
|
|
//short skyblendtype;
|
|
|
|
//float horizon_brightness;
|
|
|
|
//float spread;
|
|
|
|
float sun_brightness;
|
|
|
|
//float sun_size;
|
|
|
|
//float backscattered_light;
|
|
|
|
//float sun_intensity;
|
|
|
|
//float atm_turbidity;
|
|
|
|
//float atm_inscattering_factor;
|
|
|
|
//float atm_extinction_factor;
|
|
|
|
//float atm_distance_factor;
|
|
|
|
//float skyblendfac;
|
|
|
|
//float sky_exposure;
|
|
|
|
//short sky_colorspace;
|
2015-05-19 03:57:13 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
// int YF_numphotons, YF_numsearch;
|
|
|
|
// short YF_phdepth, YF_useqmc, YF_bufsize, YF_pad;
|
|
|
|
// float YF_causticblur, YF_ltradius;
|
2015-05-19 03:57:13 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
// float YF_glowint, YF_glowofs;
|
|
|
|
// short YF_glowtype, YF_pad2;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
//struct Ipo *ipo;
|
|
|
|
//struct MTex *mtex[18];
|
|
|
|
// short pr_texture;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
//struct PreviewImage *preview;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
2020-05-02 13:14:38 +00:00
|
|
|
struct ModifierData : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
enum ModifierType {
|
2020-05-02 13:14:38 +00:00
|
|
|
eModifierType_None = 0,
|
|
|
|
eModifierType_Subsurf,
|
|
|
|
eModifierType_Lattice,
|
|
|
|
eModifierType_Curve,
|
|
|
|
eModifierType_Build,
|
|
|
|
eModifierType_Mirror,
|
|
|
|
eModifierType_Decimate,
|
|
|
|
eModifierType_Wave,
|
|
|
|
eModifierType_Armature,
|
|
|
|
eModifierType_Hook,
|
|
|
|
eModifierType_Softbody,
|
|
|
|
eModifierType_Boolean,
|
|
|
|
eModifierType_Array,
|
|
|
|
eModifierType_EdgeSplit,
|
|
|
|
eModifierType_Displace,
|
|
|
|
eModifierType_UVProject,
|
|
|
|
eModifierType_Smooth,
|
|
|
|
eModifierType_Cast,
|
|
|
|
eModifierType_MeshDeform,
|
|
|
|
eModifierType_ParticleSystem,
|
|
|
|
eModifierType_ParticleInstance,
|
|
|
|
eModifierType_Explode,
|
|
|
|
eModifierType_Cloth,
|
|
|
|
eModifierType_Collision,
|
|
|
|
eModifierType_Bevel,
|
|
|
|
eModifierType_Shrinkwrap,
|
|
|
|
eModifierType_Fluidsim,
|
|
|
|
eModifierType_Mask,
|
|
|
|
eModifierType_SimpleDeform,
|
|
|
|
eModifierType_Multires,
|
|
|
|
eModifierType_Surface,
|
|
|
|
eModifierType_Smoke,
|
|
|
|
eModifierType_ShapeKey
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<ElemBase> next WARN;
|
2022-08-09 09:47:11 +00:00
|
|
|
std::weak_ptr<ElemBase> prev WARN;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
int type, mode;
|
|
|
|
char name[32];
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
2022-08-08 10:53:38 +00:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
struct SharedModifierData : ElemBase {
|
|
|
|
ModifierData modifier;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-05-19 03:48:29 +00:00
|
|
|
// -------------------------------------------------------------------------------
|
2022-08-08 10:56:20 +00:00
|
|
|
struct SubsurfModifierData : SharedModifierData {
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
enum Type {
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
TYPE_CatmullClarke = 0x0,
|
|
|
|
TYPE_Simple = 0x1
|
|
|
|
};
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
enum Flags {
|
|
|
|
// some omitted
|
2020-05-02 13:14:38 +00:00
|
|
|
FLAGS_SubsurfUV = 1 << 3
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
short subdivType WARN;
|
|
|
|
short levels FAIL;
|
2020-05-02 13:14:38 +00:00
|
|
|
short renderLevels;
|
2015-05-19 03:57:13 +00:00
|
|
|
short flags;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
2022-08-08 10:56:20 +00:00
|
|
|
struct MirrorModifierData : SharedModifierData {
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
enum Flags {
|
2020-05-02 13:14:38 +00:00
|
|
|
Flags_CLIPPING = 1 << 0,
|
|
|
|
Flags_MIRROR_U = 1 << 1,
|
|
|
|
Flags_MIRROR_V = 1 << 2,
|
|
|
|
Flags_AXIS_X = 1 << 3,
|
|
|
|
Flags_AXIS_Y = 1 << 4,
|
|
|
|
Flags_AXIS_Z = 1 << 5,
|
|
|
|
Flags_VGROUP = 1 << 6
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
short axis, flag;
|
|
|
|
float tolerance;
|
2022-08-09 08:12:53 +00:00
|
|
|
std::weak_ptr<Object> mirror_ob;
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
2020-05-02 13:14:38 +00:00
|
|
|
struct Object : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
enum Type {
|
2020-05-02 13:14:38 +00:00
|
|
|
Type_EMPTY = 0,
|
|
|
|
Type_MESH = 1,
|
|
|
|
Type_CURVE = 2,
|
|
|
|
Type_SURF = 3,
|
|
|
|
Type_FONT = 4,
|
|
|
|
Type_MBALL = 5
|
|
|
|
|
|
|
|
,
|
|
|
|
Type_LAMP = 10,
|
|
|
|
Type_CAMERA = 11
|
|
|
|
|
|
|
|
,
|
|
|
|
Type_WAVE = 21,
|
|
|
|
Type_LATTICE = 22
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
Type type FAIL;
|
|
|
|
float obmat[4][4] WARN;
|
|
|
|
float parentinv[4][4] WARN;
|
|
|
|
char parsubstr[32] WARN;
|
2015-05-19 03:52:10 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
Object *parent WARN;
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Object> track WARN;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
std::shared_ptr<Object> proxy, proxy_from, proxy_group WARN;
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Group> dup_group WARN;
|
|
|
|
std::shared_ptr<ElemBase> data FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
ListBase modifiers;
|
2017-01-05 19:23:02 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
Object() :
|
|
|
|
ElemBase(), type(Type_EMPTY), parent(nullptr), track(), proxy(), proxy_from(), data() {
|
2017-01-05 19:23:02 +00:00
|
|
|
// empty
|
|
|
|
}
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Base : ElemBase {
|
2020-05-02 13:14:38 +00:00
|
|
|
Base *prev WARN;
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Base> next WARN;
|
|
|
|
std::shared_ptr<Object> object WARN;
|
2017-01-05 19:23:02 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
Base() :
|
|
|
|
ElemBase(), prev(nullptr), next(), object() {
|
2017-01-05 19:23:02 +00:00
|
|
|
// empty
|
|
|
|
// empty
|
|
|
|
}
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Scene : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Object> camera WARN;
|
|
|
|
std::shared_ptr<World> world WARN;
|
|
|
|
std::shared_ptr<Base> basact WARN;
|
2021-11-12 02:33:51 +00:00
|
|
|
std::shared_ptr<Collection> master_collection WARN;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
ListBase base;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
Scene() :
|
2021-11-12 02:33:51 +00:00
|
|
|
ElemBase(), camera(), world(), basact(), master_collection() {
|
2017-01-05 19:23:02 +00:00
|
|
|
// empty
|
|
|
|
}
|
|
|
|
};
|
2015-05-19 03:48:29 +00:00
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Image : ElemBase {
|
2015-05-19 03:57:13 +00:00
|
|
|
ID id FAIL;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
char name[240] WARN;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
//struct anim *anim;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
short ok, flag;
|
|
|
|
short source, type, pad, pad1;
|
|
|
|
int lastframe;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
short tpageflag, totbind;
|
|
|
|
short xrep, yrep;
|
|
|
|
short twsta, twend;
|
|
|
|
//unsigned int bindcode;
|
|
|
|
//unsigned int *repbind;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<PackedFile> packedfile;
|
2015-05-19 03:57:13 +00:00
|
|
|
//struct PreviewImage * preview;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
float lastupdate;
|
|
|
|
int lastused;
|
|
|
|
short animspeed;
|
2015-05-19 03:48:29 +00:00
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
short gen_x, gen_y, gen_type;
|
2020-05-02 13:14:38 +00:00
|
|
|
|
|
|
|
Image() :
|
|
|
|
ElemBase() {
|
2017-01-05 19:23:02 +00:00
|
|
|
// empty
|
|
|
|
}
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct Tex : ElemBase {
|
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
// actually, the only texture type we support is Type_IMAGE
|
|
|
|
enum Type {
|
2020-05-02 13:14:38 +00:00
|
|
|
Type_CLOUDS = 1,
|
|
|
|
Type_WOOD = 2,
|
|
|
|
Type_MARBLE = 3,
|
|
|
|
Type_MAGIC = 4,
|
|
|
|
Type_BLEND = 5,
|
|
|
|
Type_STUCCI = 6,
|
|
|
|
Type_NOISE = 7,
|
|
|
|
Type_IMAGE = 8,
|
|
|
|
Type_PLUGIN = 9,
|
|
|
|
Type_ENVMAP = 10,
|
|
|
|
Type_MUSGRAVE = 11,
|
|
|
|
Type_VORONOI = 12,
|
|
|
|
Type_DISTNOISE = 13,
|
|
|
|
Type_POINTDENSITY = 14,
|
|
|
|
Type_VOXELDATA = 15
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum ImageFlags {
|
2020-05-02 13:14:38 +00:00
|
|
|
ImageFlags_INTERPOL = 1,
|
|
|
|
ImageFlags_USEALPHA = 2,
|
|
|
|
ImageFlags_MIPMAP = 4,
|
|
|
|
ImageFlags_IMAROT = 16,
|
|
|
|
ImageFlags_CALCALPHA = 32,
|
|
|
|
ImageFlags_NORMALMAP = 2048,
|
|
|
|
ImageFlags_GAUSS_MIP = 4096,
|
|
|
|
ImageFlags_FILTER_MIN = 8192,
|
|
|
|
ImageFlags_DERIVATIVEMAP = 16384
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ID id FAIL;
|
|
|
|
// AnimData *adt;
|
|
|
|
|
|
|
|
//float noisesize, turbul;
|
|
|
|
//float bright, contrast, rfac, gfac, bfac;
|
|
|
|
//float filtersize;
|
|
|
|
|
|
|
|
//float mg_H, mg_lacunarity, mg_octaves, mg_offset, mg_gain;
|
|
|
|
//float dist_amount, ns_outscale;
|
|
|
|
|
|
|
|
//float vn_w1;
|
|
|
|
//float vn_w2;
|
|
|
|
//float vn_w3;
|
|
|
|
//float vn_w4;
|
|
|
|
//float vn_mexp;
|
|
|
|
//short vn_distm, vn_coltype;
|
|
|
|
|
|
|
|
//short noisedepth, noisetype;
|
|
|
|
//short noisebasis, noisebasis2;
|
|
|
|
|
|
|
|
//short flag;
|
|
|
|
ImageFlags imaflag;
|
|
|
|
Type type FAIL;
|
|
|
|
//short stype;
|
|
|
|
|
|
|
|
//float cropxmin, cropymin, cropxmax, cropymax;
|
|
|
|
//int texfilter;
|
|
|
|
//int afmax;
|
|
|
|
//short xrepeat, yrepeat;
|
|
|
|
//short extend;
|
|
|
|
|
|
|
|
//short fie_ima;
|
|
|
|
//int len;
|
|
|
|
//int frames, offset, sfra;
|
|
|
|
|
|
|
|
//float checkerdist, nabla;
|
|
|
|
//float norfac;
|
|
|
|
|
|
|
|
//ImageUser iuser;
|
|
|
|
|
|
|
|
//bNodeTree *nodetree;
|
|
|
|
//Ipo *ipo;
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Image> ima WARN;
|
2015-05-19 03:57:13 +00:00
|
|
|
//PluginTex *plugin;
|
|
|
|
//ColorBand *coba;
|
|
|
|
//EnvMap *env;
|
|
|
|
//PreviewImage * preview;
|
|
|
|
//PointDensity *pd;
|
|
|
|
//VoxelData *vd;
|
|
|
|
|
|
|
|
//char use_nodes;
|
2017-01-05 19:23:02 +00:00
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
Tex() :
|
|
|
|
ElemBase(), imaflag(ImageFlags_INTERPOL), type(Type_CLOUDS), ima() {
|
2017-01-05 19:23:02 +00:00
|
|
|
// empty
|
|
|
|
}
|
2015-05-19 03:48:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------------------
|
|
|
|
struct MTex : ElemBase {
|
|
|
|
|
2015-05-19 03:57:13 +00:00
|
|
|
enum Projection {
|
2020-05-02 13:14:38 +00:00
|
|
|
Proj_N = 0,
|
|
|
|
Proj_X = 1,
|
|
|
|
Proj_Y = 2,
|
|
|
|
Proj_Z = 3
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum Flag {
|
2020-05-02 13:14:38 +00:00
|
|
|
Flag_RGBTOINT = 0x1,
|
|
|
|
Flag_STENCIL = 0x2,
|
|
|
|
Flag_NEGATIVE = 0x4,
|
|
|
|
Flag_ALPHAMIX = 0x8,
|
|
|
|
Flag_VIEWSPACE = 0x10
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum BlendType {
|
2020-05-02 13:14:38 +00:00
|
|
|
BlendType_BLEND = 0,
|
|
|
|
BlendType_MUL = 1,
|
|
|
|
BlendType_ADD = 2,
|
|
|
|
BlendType_SUB = 3,
|
|
|
|
BlendType_DIV = 4,
|
|
|
|
BlendType_DARK = 5,
|
|
|
|
BlendType_DIFF = 6,
|
|
|
|
BlendType_LIGHT = 7,
|
|
|
|
BlendType_SCREEN = 8,
|
|
|
|
BlendType_OVERLAY = 9,
|
|
|
|
BlendType_BLEND_HUE = 10,
|
|
|
|
BlendType_BLEND_SAT = 11,
|
|
|
|
BlendType_BLEND_VAL = 12,
|
|
|
|
BlendType_BLEND_COLOR = 13
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum MapType {
|
2020-05-02 13:14:38 +00:00
|
|
|
MapType_COL = 1,
|
|
|
|
MapType_NORM = 2,
|
|
|
|
MapType_COLSPEC = 4,
|
|
|
|
MapType_COLMIR = 8,
|
|
|
|
MapType_REF = 16,
|
|
|
|
MapType_SPEC = 32,
|
|
|
|
MapType_EMIT = 64,
|
|
|
|
MapType_ALPHA = 128,
|
|
|
|
MapType_HAR = 256,
|
|
|
|
MapType_RAYMIRR = 512,
|
|
|
|
MapType_TRANSLU = 1024,
|
|
|
|
MapType_AMB = 2048,
|
|
|
|
MapType_DISPLACE = 4096,
|
|
|
|
MapType_WARP = 8192
|
2015-05-19 03:57:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// short texco, maptoneg;
|
|
|
|
MapType mapto;
|
|
|
|
|
|
|
|
BlendType blendtype;
|
2016-04-05 21:23:53 +00:00
|
|
|
std::shared_ptr<Object> object;
|
|
|
|
std::shared_ptr<Tex> tex;
|
2015-05-19 03:57:13 +00:00
|
|
|
char uvname[32];
|
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
Projection projx, projy, projz;
|
2015-05-19 03:57:13 +00:00
|
|
|
char mapping;
|
|
|
|
float ofs[3], size[3], rot;
|
|
|
|
|
|
|
|
int texflag;
|
|
|
|
short colormodel, pmapto, pmaptoneg;
|
|
|
|
//short normapspace, which_output;
|
|
|
|
//char brush_map_mode;
|
2020-05-02 13:14:38 +00:00
|
|
|
float r, g, b, k WARN;
|
2015-05-19 03:57:13 +00:00
|
|
|
//float def_var, rt;
|
|
|
|
|
|
|
|
//float colfac, varfac;
|
|
|
|
|
|
|
|
float norfac;
|
|
|
|
//float dispfac, warpfac;
|
|
|
|
float colspecfac, mirrfac, alphafac;
|
|
|
|
float difffac, specfac, emitfac, hardfac;
|
|
|
|
//float raymirrfac, translfac, ambfac;
|
|
|
|
//float colemitfac, colreflfac, coltransfac;
|
|
|
|
//float densfac, scatterfac, reflfac;
|
|
|
|
|
|
|
|
//float timefac, lengthfac, clumpfac;
|
|
|
|
//float kinkfac, roughfac, padensfac;
|
|
|
|
//float lifefac, sizefac, ivelfac, pvelfac;
|
|
|
|
//float shadowfac;
|
|
|
|
//float zenupfac, zendownfac, blendfac;
|
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
MTex() :
|
|
|
|
ElemBase() {
|
2017-01-05 19:23:02 +00:00
|
|
|
// empty
|
2015-05-19 03:57:13 +00:00
|
|
|
}
|
2017-01-05 19:23:02 +00:00
|
|
|
};
|
|
|
|
|
2020-05-02 13:14:38 +00:00
|
|
|
} // namespace Blender
|
|
|
|
} // namespace Assimp
|
2015-05-19 03:48:29 +00:00
|
|
|
#endif
|