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  * \brief Object is a sort of wrapper for general info.
23  */
24 
25 #pragma once
26 
27 #include "DNA_object_enums.h"
28 
29 #include "DNA_ID.h"
30 #include "DNA_action_types.h" /* bAnimVizSettings */
31 #include "DNA_customdata_types.h"
32 #include "DNA_defs.h"
33 #include "DNA_listBase.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 struct AnimData;
40 struct BoundBox;
41 struct DerivedMesh;
42 struct FluidsimSettings;
43 struct GpencilBatchCache;
44 struct Ipo;
45 struct Material;
46 struct Mesh;
47 struct Object;
48 struct PartDeflect;
49 struct Path;
50 struct RigidBodyOb;
51 struct SculptSession;
52 struct SoftBody;
53 struct bGPdata;
54 
55 /* Vertex Groups - Name Info */
56 typedef struct bDeformGroup {
57   struct bDeformGroup *next, *prev;
58   /** MAX_VGROUP_NAME. */
59   char name[64];
60   /* need this flag for locking weights */
61   char flag, _pad0[7];
62 } bDeformGroup;
63 
64 /* Face Maps*/
65 typedef struct bFaceMap {
66   struct bFaceMap *next, *prev;
67   /** MAX_VGROUP_NAME. */
68   char name[64];
69   char flag;
70   char _pad0[7];
71 } bFaceMap;
72 
73 #define MAX_VGROUP_NAME 64
74 
75 /* bDeformGroup->flag */
76 #define DG_LOCK_WEIGHT 1
77 
78 /**
79  * The following illustrates the orientation of the
80  * bounding box in local space
81  *
82  * <pre>
83  *
84  * Z  Y
85  * | /
86  * |/
87  * .-----X
88  *     2----------6
89  *    /|         /|
90  *   / |        / |
91  *  1----------5  |
92  *  |  |       |  |
93  *  |  3-------|--7
94  *  | /        | /
95  *  |/         |/
96  *  0----------4
97  * </pre>
98  */
99 typedef struct BoundBox {
100   float vec[8][3];
101   int flag;
102   char _pad0[4];
103 } BoundBox;
104 
105 /* boundbox flag */
106 enum {
107   BOUNDBOX_DISABLED = (1 << 0),
108   BOUNDBOX_DIRTY = (1 << 1),
109 };
110 
111 struct CustomData_MeshMasks;
112 
113 /* Not saved in file! */
114 typedef struct Object_Runtime {
115   /**
116    * The custom data layer mask that was last used
117    * to calculate data_eval and mesh_deform_eval.
118    */
119   CustomData_MeshMasks last_data_mask;
120 
121   /** Did last modifier stack generation need mapping support? */
122   char last_need_mapping;
123 
124   char _pad0[3];
125 
126   /** Only used for drawing the parent/child help-line. */
127   float parent_display_origin[3];
128 
129   /** Selection id of this object; only available in the original object */
130   int select_id;
131   char _pad1[3];
132 
133   /**
134    * Denotes whether the evaluated data is owned by this object or is referenced and owned by
135    * somebody else.
136    */
137   char is_data_eval_owned;
138 
139   /** Axis aligned boundbox (in localspace). */
140   struct BoundBox *bb;
141 
142   /**
143    * Original data pointer, before object->data was changed to point
144    * to data_eval.
145    * Is assigned by dependency graph's copy-on-write evaluation.
146    */
147   struct ID *data_orig;
148   /**
149    * Object data structure created during object evaluation.
150    * It has all modifiers applied.
151    */
152   struct ID *data_eval;
153   /**
154    * Mesh structure created during object evaluation.
155    * It has deformation only modifiers applied on it.
156    */
157   struct Mesh *mesh_deform_eval;
158 
159   /**
160    * Original grease pencil bGPdata pointer, before object->data was changed to point
161    * to gpd_eval.
162    * Is assigned by dependency graph's copy-on-write evaluation.
163    */
164   struct bGPdata *gpd_orig;
165   /**
166    * bGPdata structure created during object evaluation.
167    * It has all modifiers applied.
168    */
169   struct bGPdata *gpd_eval;
170 
171   /**
172    * This is a mesh representation of corresponding object.
173    * It created when Python calls `object.to_mesh()`.
174    */
175   struct Mesh *object_as_temp_mesh;
176 
177   /** Runtime evaluated curve-specific data, not stored in the file. */
178   struct CurveCache *curve_cache;
179 
180   unsigned short local_collections_bits;
181   short _pad2[3];
182 } Object_Runtime;
183 
184 typedef struct Object {
185   ID id;
186   /** Animation data (must be immediately after id for utilities to use it). */
187   struct AnimData *adt;
188   /** Runtime (must be immediately after id for utilities to use it). */
189   struct DrawDataList drawdata;
190 
191   struct SculptSession *sculpt;
192 
193   short type, partype;
194   /** Can be vertexnrs. */
195   int par1, par2, par3;
196   /** String describing subobject info, MAX_ID_NAME-2. */
197   char parsubstr[64];
198   struct Object *parent, *track;
199   /* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */
200   /* proxy_from is set in target back to the proxy. */
201   struct Object *proxy, *proxy_group, *proxy_from;
202   /** Old animation system, deprecated for 2.5. */
203   struct Ipo *ipo DNA_DEPRECATED;
204   /* struct Path *path; */
205   struct bAction *action DNA_DEPRECATED; /* XXX deprecated... old animation system */
206   struct bAction *poselib;
207   /** Pose data, armature objects only. */
208   struct bPose *pose;
209   /** Pointer to objects data - an 'ID' or NULL. */
210   void *data;
211 
212   /** Grease Pencil data. */
213   struct bGPdata *gpd
214       DNA_DEPRECATED; /* XXX deprecated... replaced by gpencil object, keep for readfile */
215 
216   /** Settings for visualization of object-transform animation. */
217   bAnimVizSettings avs;
218   /** Motion path cache for this object. */
219   bMotionPath *mpath;
220   void *_pad0;
221 
222   ListBase constraintChannels DNA_DEPRECATED; /* XXX deprecated... old animation system */
223   ListBase effect DNA_DEPRECATED;             /* XXX deprecated... keep for readfile */
224   /** List of bDeformGroup (vertex groups) names and flag only. */
225   ListBase defbase;
226   /** List of ModifierData structures. */
227   ListBase modifiers;
228   /** List of GpencilModifierData structures. */
229   ListBase greasepencil_modifiers;
230   /** List of facemaps. */
231   ListBase fmaps;
232   /** List of viewport effects. Actually only used by grease pencil. */
233   ListBase shader_fx;
234 
235   /** Local object mode. */
236   int mode;
237   int restore_mode;
238 
239   /* materials */
240   /** Material slots. */
241   struct Material **mat;
242   /** A boolean field, with each byte 1 if corresponding material is linked to object. */
243   char *matbits;
244   /** Copy of mesh, curve & meta struct member of same name (keep in sync). */
245   int totcol;
246   /** Currently selected material in the UI. */
247   int actcol;
248 
249   /* rot en drot have to be together! (transform('r' en 's')) */
250   float loc[3], dloc[3];
251   /** Scale (can be negative). */
252   float scale[3];
253   /** DEPRECATED, 2.60 and older only. */
254   float dsize[3] DNA_DEPRECATED;
255   /** Ack!, changing. */
256   float dscale[3];
257   /** Euler rotation. */
258   float rot[3], drot[3];
259   /** Quaternion rotation. */
260   float quat[4], dquat[4];
261   /** Axis angle rotation - axis part. */
262   float rotAxis[3], drotAxis[3];
263   /** Axis angle rotation - angle part. */
264   float rotAngle, drotAngle;
265   /** Final worldspace matrix with constraints & animsys applied. */
266   float obmat[4][4];
267   /** Inverse result of parent, so that object doesn't 'stick' to parent. */
268   float parentinv[4][4];
269   /** Inverse result of constraints.
270    * doesn't include effect of parent or object local transform. */
271   float constinv[4][4];
272   /**
273    * Inverse matrix of 'obmat' for any other use than rendering!
274    *
275    * \note this isn't assured to be valid as with 'obmat',
276    * before using this value you should do...
277    * invert_m4_m4(ob->imat, ob->obmat);
278    */
279   float imat[4][4];
280 
281   /* Previously 'imat' was used at render time, but as other places use it too
282    * the interactive ui of 2.5 creates problems. So now only 'imat_ren' should
283    * be used when ever the inverse of ob->obmat * re->viewmat is needed! - jahka
284    */
285   float imat_ren[4][4];
286 
287   /** Copy of Base's layer in the scene. */
288   unsigned int lay DNA_DEPRECATED;
289 
290   /** Copy of Base. */
291   short flag;
292   /** Deprecated, use 'matbits'. */
293   short colbits DNA_DEPRECATED;
294 
295   /** Transformation settings and transform locks . */
296   short transflag, protectflag;
297   short trackflag, upflag;
298   /** Used for DopeSheet filtering settings (expanded/collapsed). */
299   short nlaflag;
300 
301   char _pad1;
302   char duplicator_visibility_flag;
303 
304   /* Depsgraph */
305   /** Used by depsgraph, flushed from base. */
306   short base_flag;
307   /** Used by viewport, synced from base. */
308   unsigned short base_local_view_bits;
309 
310   /** Collision mask settings */
311   unsigned short col_group, col_mask;
312 
313   /** Rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations.... */
314   short rotmode;
315 
316   /** Bounding box use for drawing. */
317   char boundtype;
318   /** Bounding box type used for collision. */
319   char collision_boundtype;
320 
321   /** Viewport draw extra settings. */
322   short dtx;
323   /** Viewport draw type. */
324   char dt;
325   char empty_drawtype;
326   float empty_drawsize;
327   /** Dupliface scale. */
328   float instance_faces_scale;
329 
330   /** Custom index, for renderpasses. */
331   short index;
332   /** Current deformation group, note: index starts at 1. */
333   unsigned short actdef;
334   /** Current face map, note: index starts at 1. */
335   unsigned short actfmap;
336   char _pad2[2];
337   /** Object color (in most cases the material color is used for drawing). */
338   float color[4];
339 
340   /** Softbody settings. */
341   short softflag;
342 
343   /** For restricting view, select, render etc. accessible in outliner. */
344   char restrictflag;
345 
346   /** Flag for pinning. */
347   char shapeflag;
348   /** Current shape key for menu or pinned. */
349   short shapenr;
350 
351   char _pad3[2];
352 
353   /** Object constraints. */
354   ListBase constraints;
355   ListBase nlastrips DNA_DEPRECATED; /* XXX deprecated... old animation system */
356   ListBase hooks DNA_DEPRECATED;     /* XXX deprecated... old animation system */
357   /** Particle systems. */
358   ListBase particlesystem;
359 
360   /** Particle deflector/attractor/collision data. */
361   struct PartDeflect *pd;
362   /** If exists, saved in file. */
363   struct SoftBody *soft;
364   /** Object duplicator for group. */
365   struct Collection *instance_collection;
366 
367   /** If fluidsim enabled, store additional settings. */
368   struct FluidsimSettings *fluidsimSettings
369       DNA_DEPRECATED; /* XXX deprecated... replaced by mantaflow, keep for readfile */
370 
371   ListBase pc_ids;
372 
373   /** Settings for Bullet rigid body. */
374   struct RigidBodyOb *rigidbody_object;
375   /** Settings for Bullet constraint. */
376   struct RigidBodyCon *rigidbody_constraint;
377 
378   /** Offset for image empties. */
379   float ima_ofs[2];
380   /** Must be non-null when object is an empty image. */
381   ImageUser *iuser;
382   char empty_image_visibility_flag;
383   char empty_image_depth;
384   char empty_image_flag;
385   char _pad8[5];
386 
387   struct PreviewImage *preview;
388 
389   /** Runtime evaluation data (keep last). */
390   Object_Runtime runtime;
391 } Object;
392 
393 /* Warning, this is not used anymore because hooks are now modifiers */
394 typedef struct ObHook {
395   struct ObHook *next, *prev;
396 
397   struct Object *parent;
398   /** Matrix making current transform unmodified. */
399   float parentinv[4][4];
400   /** Temp matrix while hooking. */
401   float mat[4][4];
402   /** Visualization of hook. */
403   float cent[3];
404   /** If not zero, falloff is distance where influence zero. */
405   float falloff;
406 
407   /** MAX_NAME. */
408   char name[64];
409 
410   int *indexar;
411   /** Curindex is cache for fast lookup. */
412   int totindex, curindex;
413   /** Active is only first hook, for button menu. */
414   short type, active;
415   float force;
416 } ObHook;
417 
418 /* **************** OBJECT ********************* */
419 
420 /* used many places... should be specialized  */
421 #define SELECT 1
422 
423 /* type */
424 enum {
425   OB_EMPTY = 0,
426   OB_MESH = 1,
427   OB_CURVE = 2,
428   OB_SURF = 3,
429   OB_FONT = 4,
430   OB_MBALL = 5,
431 
432   OB_LAMP = 10,
433   OB_CAMERA = 11,
434 
435   OB_SPEAKER = 12,
436   OB_LIGHTPROBE = 13,
437 
438   OB_LATTICE = 22,
439 
440   OB_ARMATURE = 25,
441 
442   /** Grease Pencil object used in 3D view but not used for annotation in 2D. */
443   OB_GPENCIL = 26,
444 
445   OB_HAIR = 27,
446 
447   OB_POINTCLOUD = 28,
448 
449   OB_VOLUME = 29,
450 
451   /* Keep last. */
452   OB_TYPE_MAX,
453 };
454 
455 /* check if the object type supports materials */
456 #define OB_TYPE_SUPPORT_MATERIAL(_type) \
457   (((_type) >= OB_MESH && (_type) <= OB_MBALL) || ((_type) >= OB_GPENCIL && (_type) <= OB_VOLUME))
458 #define OB_TYPE_SUPPORT_VGROUP(_type) (ELEM(_type, OB_MESH, OB_LATTICE, OB_GPENCIL))
459 #define OB_TYPE_SUPPORT_EDITMODE(_type) \
460   (ELEM(_type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE))
461 #define OB_TYPE_SUPPORT_PARVERT(_type) (ELEM(_type, OB_MESH, OB_SURF, OB_CURVE, OB_LATTICE))
462 
463 /** Matches #OB_TYPE_SUPPORT_EDITMODE. */
464 #define OB_DATA_SUPPORT_EDITMODE(_type) (ELEM(_type, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR))
465 
466 /* is this ID type used as object data */
467 #define OB_DATA_SUPPORT_ID(_id_type) \
468   (ELEM(_id_type, \
469         ID_ME, \
470         ID_CU, \
471         ID_MB, \
472         ID_LA, \
473         ID_SPK, \
474         ID_LP, \
475         ID_CA, \
476         ID_LT, \
477         ID_GD, \
478         ID_AR, \
479         ID_HA, \
480         ID_PT, \
481         ID_VO))
482 
483 #define OB_DATA_SUPPORT_ID_CASE \
484   ID_ME: \
485   case ID_CU: \
486   case ID_MB: \
487   case ID_LA: \
488   case ID_SPK: \
489   case ID_LP: \
490   case ID_CA: \
491   case ID_LT: \
492   case ID_GD: \
493   case ID_AR: \
494   case ID_HA: \
495   case ID_PT: \
496   case ID_VO
497 
498 /* partype: first 4 bits: type */
499 enum {
500   PARTYPE = (1 << 4) - 1,
501   PAROBJECT = 0,
502   PARSKEL = 4,
503   PARVERT1 = 5,
504   PARVERT3 = 6,
505   PARBONE = 7,
506 
507 };
508 
509 /* (short) transflag */
510 enum {
511   OB_TRANSFLAG_UNUSED_0 = 1 << 0, /* cleared */
512   OB_TRANSFLAG_UNUSED_1 = 1 << 1, /* cleared */
513   OB_NEG_SCALE = 1 << 2,
514   OB_TRANSFLAG_UNUSED_3 = 1 << 3, /* cleared */
515   OB_DUPLIVERTS = 1 << 4,
516   OB_DUPLIROT = 1 << 5,
517   OB_TRANSFLAG_UNUSED_6 = 1 << 6, /* cleared */
518   /* runtime, calculate derivedmesh for dupli before it's used */
519   OB_TRANSFLAG_UNUSED_7 = 1 << 7, /* dirty */
520   OB_DUPLICOLLECTION = 1 << 8,
521   OB_DUPLIFACES = 1 << 9,
522   OB_DUPLIFACES_SCALE = 1 << 10,
523   OB_DUPLIPARTS = 1 << 11,
524   OB_TRANSFLAG_UNUSED_12 = 1 << 12, /* cleared */
525   /* runtime constraints disable */
526   OB_NO_CONSTRAINTS = 1 << 13,
527 
528   OB_DUPLI = OB_DUPLIVERTS | OB_DUPLICOLLECTION | OB_DUPLIFACES | OB_DUPLIPARTS,
529 };
530 
531 /* (short) trackflag / upflag */
532 enum {
533   OB_POSX = 0,
534   OB_POSY = 1,
535   OB_POSZ = 2,
536   OB_NEGX = 3,
537   OB_NEGY = 4,
538   OB_NEGZ = 5,
539 };
540 
541 /* dtx: flags (short) */
542 enum {
543   OB_DRAWBOUNDOX = 1 << 0,
544   OB_AXIS = 1 << 1,
545   OB_TEXSPACE = 1 << 2,
546   OB_DRAWNAME = 1 << 3,
547   /* OB_DRAWIMAGE = 1 << 4, */ /* UNUSED */
548   /* for solid+wire display */
549   OB_DRAWWIRE = 1 << 5,
550   /* for overdraw s*/
551   OB_DRAW_IN_FRONT = 1 << 6,
552   /* enable transparent draw */
553   OB_DRAWTRANSP = 1 << 7,
554   OB_DRAW_ALL_EDGES = 1 << 8, /* only for meshes currently */
555   OB_DRAW_NO_SHADOW_CAST = 1 << 9,
556   /* Enable lights for grease pencil. */
557   OB_USE_GPENCIL_LIGHTS = 1 << 10,
558 };
559 
560 /* empty_drawtype: no flags */
561 enum {
562   OB_ARROWS = 1,
563   OB_PLAINAXES = 2,
564   OB_CIRCLE = 3,
565   OB_SINGLE_ARROW = 4,
566   OB_CUBE = 5,
567   OB_EMPTY_SPHERE = 6,
568   OB_EMPTY_CONE = 7,
569   OB_EMPTY_IMAGE = 8,
570 };
571 
572 /* gpencil add types */
573 enum {
574   GP_EMPTY = 0,
575   GP_STROKE = 1,
576   GP_MONKEY = 2,
577 };
578 
579 /* boundtype */
580 enum {
581   OB_BOUND_BOX = 0,
582   OB_BOUND_SPHERE = 1,
583   OB_BOUND_CYLINDER = 2,
584   OB_BOUND_CONE = 3,
585   /* OB_BOUND_TRIANGLE_MESH = 4, */  /* UNUSED */
586   /* OB_BOUND_CONVEX_HULL = 5, */    /* UNUSED */
587   /*  OB_BOUND_DYN_MESH      = 6, */ /*UNUSED*/
588   OB_BOUND_CAPSULE = 7,
589 };
590 
591 /* **************** BASE ********************* */
592 
593 /* base->flag_legacy */
594 enum {
595   BA_WAS_SEL = (1 << 1),
596   /* NOTE: BA_HAS_RECALC_DATA can be re-used later if freed in readfile.c. */
597   // BA_HAS_RECALC_OB = (1 << 2),  /* DEPRECATED */
598   // BA_HAS_RECALC_DATA =  (1 << 3),  /* DEPRECATED */
599   /** DEPRECATED, was runtime only, but was reusing an older flag. */
600   BA_SNAP_FIX_DEPS_FIASCO = (1 << 2),
601 };
602 
603 /* NOTE: this was used as a proper setting in past, so nullify before using */
604 #define BA_TEMP_TAG (1 << 5)
605 
606 /**
607  * Even if this is tagged for transform, this flag means it's being locked in place.
608  * Use for #SCE_XFORM_SKIP_CHILDREN.
609  */
610 #define BA_TRANSFORM_LOCKED_IN_PLACE (1 << 7)
611 
612 #define BA_TRANSFORM_CHILD (1 << 8)   /* child of a transformed object */
613 #define BA_TRANSFORM_PARENT (1 << 13) /* parent of a transformed object */
614 
615 #define OB_FROMDUPLI (1 << 9)
616 #define OB_DONE (1 << 10) /* unknown state, clear before use */
617 #ifdef DNA_DEPRECATED_ALLOW
618 #  define OB_FLAG_UNUSED_11 (1 << 11) /* cleared */
619 #  define OB_FLAG_UNUSED_12 (1 << 12) /* cleared */
620 #endif
621 
622 /* ob->restrictflag */
623 enum {
624   OB_RESTRICT_VIEWPORT = 1 << 0,
625   OB_RESTRICT_SELECT = 1 << 1,
626   OB_RESTRICT_RENDER = 1 << 2,
627 };
628 
629 /* ob->shapeflag */
630 enum {
631   OB_SHAPE_LOCK = 1 << 0,
632 #ifdef DNA_DEPRECATED_ALLOW
633   OB_SHAPE_FLAG_UNUSED_1 = 1 << 1, /* cleared */
634 #endif
635   OB_SHAPE_EDIT_MODE = 1 << 2,
636 };
637 
638 /* ob->nlaflag */
639 enum {
640   OB_ADS_UNUSED_1 = 1 << 0, /* cleared */
641   OB_ADS_UNUSED_2 = 1 << 1, /* cleared */
642   /* object-channel expanded status */
643   OB_ADS_COLLAPSED = 1 << 10,
644   /* object's ipo-block */
645   /* OB_ADS_SHOWIPO = 1 << 11, */ /* UNUSED */
646   /* object's constraint channels */
647   /* OB_ADS_SHOWCONS = 1 << 12, */ /* UNUSED */
648   /* object's material channels */
649   /* OB_ADS_SHOWMATS = 1 << 13, */ /* UNUSED */
650   /* object's marticle channels */
651   /* OB_ADS_SHOWPARTS = 1 << 14, */ /* UNUSED */
652 };
653 
654 /* ob->protectflag */
655 enum {
656   OB_LOCK_LOCX = 1 << 0,
657   OB_LOCK_LOCY = 1 << 1,
658   OB_LOCK_LOCZ = 1 << 2,
659   OB_LOCK_LOC = OB_LOCK_LOCX | OB_LOCK_LOCY | OB_LOCK_LOCZ,
660   OB_LOCK_ROTX = 1 << 3,
661   OB_LOCK_ROTY = 1 << 4,
662   OB_LOCK_ROTZ = 1 << 5,
663   OB_LOCK_ROT = OB_LOCK_ROTX | OB_LOCK_ROTY | OB_LOCK_ROTZ,
664   OB_LOCK_SCALEX = 1 << 6,
665   OB_LOCK_SCALEY = 1 << 7,
666   OB_LOCK_SCALEZ = 1 << 8,
667   OB_LOCK_SCALE = OB_LOCK_SCALEX | OB_LOCK_SCALEY | OB_LOCK_SCALEZ,
668   OB_LOCK_ROTW = 1 << 9,
669   OB_LOCK_ROT4D = 1 << 10,
670 };
671 
672 /* ob->duplicator_visibility_flag */
673 enum {
674   OB_DUPLI_FLAG_VIEWPORT = 1 << 0,
675   OB_DUPLI_FLAG_RENDER = 1 << 1,
676 };
677 
678 /* ob->empty_image_depth */
679 #define OB_EMPTY_IMAGE_DEPTH_DEFAULT 0
680 #define OB_EMPTY_IMAGE_DEPTH_FRONT 1
681 #define OB_EMPTY_IMAGE_DEPTH_BACK 2
682 
683 /** #Object.empty_image_visibility_flag */
684 enum {
685   OB_EMPTY_IMAGE_HIDE_PERSPECTIVE = 1 << 0,
686   OB_EMPTY_IMAGE_HIDE_ORTHOGRAPHIC = 1 << 1,
687   OB_EMPTY_IMAGE_HIDE_BACK = 1 << 2,
688   OB_EMPTY_IMAGE_HIDE_FRONT = 1 << 3,
689   OB_EMPTY_IMAGE_HIDE_NON_AXIS_ALIGNED = 1 << 4,
690 };
691 
692 /** #Object.empty_image_flag */
693 enum {
694   OB_EMPTY_IMAGE_USE_ALPHA_BLEND = 1 << 0,
695 };
696 
697 #define MAX_DUPLI_RECUR 8
698 
699 #ifdef __cplusplus
700 }
701 #endif
702