diff options
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_cloth_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_dynamicpaint_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_effect_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_freestyle_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_group_types.h | 53 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_layer_types.h | 59 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_lightprobe_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_force_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 8 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_outliner_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_particle_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_rigidbody_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_smoke_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 26 | ||||
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 13 |
17 files changed, 120 insertions, 90 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 3c035ae0bc8..2e73f5754d3 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -43,7 +43,7 @@ struct SpaceLink; struct Object; -struct Group; +struct Collection; struct GHash; /* ************************************************ */ @@ -588,7 +588,7 @@ typedef struct bDopeSheet { ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */ ListBase chanbase; /* cache for channels (only initialized when pinned) */ // XXX not used! - struct Group *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */ + struct Collection *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */ char searchstr[64]; /* string to search for in displayed names of F-Curves for ADS_FILTER_BY_FCU_NAME filtering option */ int filterflag; /* flags to use for filtering data */ diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index ee147da8dae..00995bcf290 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -116,7 +116,7 @@ typedef struct ClothCollSettings { short self_loop_count; /* How many iterations for the selfcollision loop */ short loop_count; /* How many iterations for the collision loop. */ int pad; - struct Group *group; /* Only use colliders from this group of objects */ + struct Collection *group; /* Only use colliders from this group of objects */ short vgroup_selfcol; /* vgroup to paint which vertices are used for self collisions */ short pad2[3]; } ClothCollSettings; diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index ecdcb2398ac..b341c2841e2 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -104,7 +104,7 @@ typedef struct DynamicPaintSurface { struct DynamicPaintCanvasSettings *canvas; /* for fast RNA access */ struct PaintSurfaceData *data; - struct Group *brush_group; + struct Collection *brush_group; struct EffectorWeights *effector_weights; /* cache */ diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h index 7ca3bbe3319..3455feea1a9 100644 --- a/source/blender/makesdna/DNA_effect_types.h +++ b/source/blender/makesdna/DNA_effect_types.h @@ -97,7 +97,7 @@ typedef struct Particle { short mat_nr, rt; } Particle; -struct Group; +struct Collection; typedef struct PartEff { struct PartEff *next, *prev; @@ -122,7 +122,7 @@ typedef struct PartEff { float imat[4][4]; /* inverse matrix of parent Object */ Particle *keys; - struct Group *group; + struct Collection *group; } PartEff; diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h index 2359d1e9738..158bdf573b3 100644 --- a/source/blender/makesdna/DNA_freestyle_types.h +++ b/source/blender/makesdna/DNA_freestyle_types.h @@ -40,7 +40,7 @@ extern "C" { #endif struct FreestyleLineStyle; -struct Group; +struct Collection; struct Text; /* FreestyleConfig::flags */ @@ -125,7 +125,7 @@ typedef struct FreestyleLineSet { int qi_start, qi_end; int edge_types, exclude_edge_types; /* feature edge types */ int pad2; - struct Group *group; /* group of target objects */ + struct Collection *group; /* group of target objects */ struct FreestyleLineStyle *linestyle; } FreestyleLineSet; diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h index 57db668b282..3b947caf59c 100644 --- a/source/blender/makesdna/DNA_group_types.h +++ b/source/blender/makesdna/DNA_group_types.h @@ -34,36 +34,61 @@ #ifndef __DNA_GROUP_TYPES_H__ #define __DNA_GROUP_TYPES_H__ +#include "DNA_defs.h" #include "DNA_listBase.h" #include "DNA_ID.h" struct Object; +struct Collection; -typedef struct GroupObject { - struct GroupObject *next, *prev; +typedef struct CollectionObject { + struct CollectionObject *next, *prev; struct Object *ob; -} GroupObject; +} CollectionObject; -typedef struct Group { +typedef struct CollectionChild { + struct CollectionChild *next, *prev; + struct Collection *collection; +} CollectionChild; + + +typedef struct Collection { ID id; - ListBase gobject; /* GroupObject */ + ListBase gobject; /* CollectionObject */ + ListBase children; /* CollectionChild */ struct PreviewImage *preview; - /* Bad design, since layers stored in the scenes 'Base' - * the objects that show in the group can change depending - * on the last used scene */ - unsigned int layer; + unsigned int layer DNA_DEPRECATED; float dupli_ofs[3]; - struct SceneCollection *collection; - struct ViewLayer *view_layer; -} Group; + short flag, pad[3]; + + /* Runtime. Cache of objects in this collection and all its + * children. This is created on demand when e.g. some physics + * simulation needs it, we don't want to have it for every + * collections due to memory usage reasons. */ + ListBase object_cache; + + /* Runtime. List of collections that are a parent of this + * datablock. */ + ListBase parents; + /* Deprecated */ + struct SceneCollection *collection DNA_DEPRECATED; + struct ViewLayer *view_layer DNA_DEPRECATED; +} Collection; -#define GROUP_MASTER_COLLECTION(_group) \ - (((LayerCollection *)(_group)->view_layer->layer_collections.first)->scene_collection) +/* Collection->flag */ +enum { + COLLECTION_RESTRICT_VIEW = (1 << 0), /* Hidden in viewport. */ + COLLECTION_RESTRICT_SELECT = (1 << 1), /* Not selectable in viewport. */ + COLLECTION_DISABLED_DEPRECATED = (1 << 2), /* Not used anymore */ + COLLECTION_RESTRICT_RENDER = (1 << 3), /* Hidden in renders. */ + COLLECTION_HAS_OBJECT_CACHE = (1 << 4), /* Runtime: object_cache is populated. */ + COLLECTION_IS_MASTER = (1 << 5), /* Is master collection embedded in the scene. */ +}; #endif /* __DNA_GROUP_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index 82979ba8cde..66a8c3e236d 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -37,7 +37,7 @@ extern "C" { typedef struct Base { struct Base *next, *prev; short flag; - short refcount; + short pad; short sx, sy; struct Object *object; unsigned int lay; @@ -53,25 +53,23 @@ typedef struct ViewLayerEngineData { typedef struct LayerCollection { struct LayerCollection *next, *prev; - struct SceneCollection *scene_collection; + struct Collection *collection; + struct SceneCollection *scene_collection DNA_DEPRECATED; short flag; - /* TODO(sergey): Get rid of this once we've got CoW in DEG, */ - short flag_evaluated; - short pad[2]; - ListBase object_bases; /* (ObjectBase *)LinkData->data - synced with collection->objects */ - ListBase layer_collections; /* synced with collection->collections */ + short pad[3]; + ListBase layer_collections; /* synced with collection->children */ } LayerCollection; typedef struct ViewLayer { struct ViewLayer *next, *prev; char name[64]; /* MAX_NAME */ - short active_collection; short flag; - short pad[2]; + short pad[3]; ListBase object_bases; /* ObjectBase */ struct SceneStats *stats; /* default allocated now */ struct Base *basact; ListBase layer_collections; /* LayerCollection */ + LayerCollection *active_collection; /* Old SceneRenderLayer data. */ int layflag; @@ -86,18 +84,9 @@ typedef struct ViewLayer { /* Runtime data */ ListBase drawdata; /* ViewLayerEngineData */ struct Base **object_bases_array; + struct GHash *object_bases_hash; } ViewLayer; -typedef struct SceneCollection { - struct SceneCollection *next, *prev; - char name[64]; /* MAX_NAME */ - int active_object_index; /* for UI */ - char type; - char pad[3]; - ListBase objects; /* (Object *)LinkData->data */ - ListBase scene_collections; /* nested collections */ -} SceneCollection; - /* Base->flag */ enum { BASE_SELECTED = (1 << 0), @@ -106,14 +95,17 @@ enum { BASE_FROMDUPLI = (1 << 3), BASE_DIRTY_ENGINE_SETTINGS = (1 << 4), BASE_FROM_SET = (1 << 5), /* To be set only by the depsgraph */ + BASE_VISIBLE_VIEWPORT = (1 << 6), + BASE_VISIBLE_RENDER = (1 << 7), }; /* LayerCollection->flag */ enum { - COLLECTION_VIEWPORT = (1 << 0), /* Only used for group collections. */ - COLLECTION_SELECTABLE = (1 << 1), - COLLECTION_DISABLED = (1 << 2), - COLLECTION_RENDER = (1 << 3), /* Only used for group collections. */ + /* LAYER_COLLECTION_DEPRECATED0 = (1 << 0), */ + /* LAYER_COLLECTION_DEPRECATED1 = (1 << 1), */ + /* LAYER_COLLECTION_DEPRECATED2 = (1 << 2), */ + /* LAYER_COLLECTION_DEPRECATED3 = (1 << 3), */ + LAYER_COLLECTION_EXCLUDE = (1 << 4), }; /* ViewLayer->flag */ @@ -123,11 +115,22 @@ enum { VIEW_LAYER_FREESTYLE = (1 << 2), }; -/* SceneCollection->type */ -enum { - COLLECTION_TYPE_NONE = 0, - COLLECTION_TYPE_GROUP_INTERNAL = 1, -}; +/****************************** Deprecated ******************************/ + +/* Compatibility with collections saved in early 2.8 versions, + * used in file reading and versioning code. */ +#define USE_COLLECTION_COMPAT_28 + +typedef struct SceneCollection { + struct SceneCollection *next, *prev; + char name[64]; /* MAX_NAME */ + int active_object_index; /* for UI */ + short flag; + char type; + char pad; + ListBase objects; /* (Object *)LinkData->data */ + ListBase scene_collections; /* nested collections */ +} SceneCollection; #ifdef __cplusplus } diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h index 3eee6d4b192..86d4645ecf5 100644 --- a/source/blender/makesdna/DNA_lightprobe_types.h +++ b/source/blender/makesdna/DNA_lightprobe_types.h @@ -66,7 +66,7 @@ typedef struct LightProbe { struct Object *parallax_ob; /* Object to use as a parallax origin */ struct Image *image; /* Image to use on as lighting data */ - struct Group *visibility_grp; /* Object visibility group, inclusive or exclusive */ + struct Collection *visibility_grp; /* Object visibility group, inclusive or exclusive */ float data_draw_size; diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h index 16c96073469..a83517e4eb4 100644 --- a/source/blender/makesdna/DNA_object_force_types.h +++ b/source/blender/makesdna/DNA_object_force_types.h @@ -122,7 +122,7 @@ typedef struct PartDeflect { } PartDeflect; typedef struct EffectorWeights { - struct Group *group; /* only use effectors from this group of objects */ + struct Collection *group; /* only use effectors from this group of objects */ float weight[14]; /* effector type specific weights */ float global_gravity; @@ -292,7 +292,7 @@ typedef struct SoftBody { struct PointCache *pointcache; struct ListBase ptcaches; - struct Group *collision_group; + struct Collection *collision_group; struct EffectorWeights *effector_weights; /* reverse esimated obmatrix .. no need to store in blend file .. how ever who cares */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 5139e54b577..64c67f7d325 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -263,7 +263,7 @@ typedef struct Object { struct PartDeflect *pd; /* particle deflector/attractor/collision data */ struct SoftBody *soft; /* if exists, saved in file */ - struct Group *dup_group; /* object duplicator for group */ + struct Collection *dup_group; /* object duplicator for group */ void *pad10; char pad4; @@ -423,7 +423,7 @@ enum { OB_DUPLIROT = 1 << 5, OB_DUPLINOSPEED = 1 << 6, OB_DUPLICALCDERIVED = 1 << 7, /* runtime, calculate derivedmesh for dupli before it's used */ - OB_DUPLIGROUP = 1 << 8, + OB_DUPLICOLLECTION = 1 << 8, OB_DUPLIFACES = 1 << 9, OB_DUPLIFACES_SCALE = 1 << 10, OB_DUPLIPARTS = 1 << 11, @@ -431,7 +431,7 @@ enum { OB_NO_CONSTRAINTS = 1 << 13, /* runtime constraints disable */ OB_NO_PSYS_UPDATE = 1 << 14, /* hack to work around particle issue */ - OB_DUPLI = OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLIGROUP | OB_DUPLIFACES | OB_DUPLIPARTS, + OB_DUPLI = OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLICOLLECTION | OB_DUPLIFACES | OB_DUPLIPARTS, }; /* (short) trackflag / upflag */ @@ -525,7 +525,7 @@ enum { #define OB_FROMDUPLI (1 << 9) #define OB_DONE (1 << 10) /* unknown state, clear before use */ /* #define OB_RADIO (1 << 11) */ /* deprecated */ -#define OB_FROMGROUP (1 << 12) +/* #define OB_FROMGROUP (1 << 12) */ /* deprecated */ /* WARNING - when adding flags check on PSYS_RECALC */ /* ob->recalc (flag bits!) */ diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index b968bcebeb5..d775061d85a 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -103,8 +103,8 @@ enum { #define TSE_ID_BASE 36 /* NO ID */ #define TSE_GP_LAYER 37 /* NO ID */ #define TSE_LAYER_COLLECTION 38 -#define TSE_SCENE_COLLECTION 39 -#define TSE_LAYER_COLLECTION_BASE 40 +#define TSE_SCENE_COLLECTION_BASE 39 +#define TSE_VIEW_COLLECTION_BASE 40 #define TSE_SCENE_OBJECTS_BASE 41 diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 70afef9b874..583b8504524 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -160,7 +160,7 @@ typedef struct ParticleSettings { struct SPHFluidSettings *fluid; struct EffectorWeights *effector_weights; - struct Group *collision_group; + struct Collection *collision_group; int flag, rt; short type, from, distr, texact; @@ -244,9 +244,9 @@ typedef struct ParticleSettings { struct MTex *mtex[18]; /* MAX_MTEX */ - struct Group *dup_group; + struct Collection *dup_group; struct ListBase dupliweights; - struct Group *eff_group DNA_DEPRECATED; // deprecated + struct Collection *eff_group DNA_DEPRECATED; // deprecated struct Object *dup_ob; struct Object *bb_ob; struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h index 381ee5d40e5..42286044970 100644 --- a/source/blender/makesdna/DNA_rigidbody_types.h +++ b/source/blender/makesdna/DNA_rigidbody_types.h @@ -35,7 +35,7 @@ #include "DNA_listBase.h" -struct Group; +struct Collection; struct EffectorWeights; @@ -50,10 +50,10 @@ typedef struct RigidBodyWorld { /* Sim World Settings ------------------------------------------------------------- */ struct EffectorWeights *effector_weights; /* effectors info */ - struct Group *group; /* Group containing objects to use for Rigid Bodies */ + struct Collection *group; /* Group containing objects to use for Rigid Bodies */ struct Object **objects; /* Array to access group objects by index, only used at runtime */ - struct Group *constraints; /* Group containing objects to use for Rigid Body Constraints*/ + struct Collection *constraints; /* Group containing objects to use for Rigid Body Constraints*/ int pad; float ltime; /* last frame world was evaluated for (internal) */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 7e2abf3ddc0..7b717107df1 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -47,6 +47,7 @@ extern "C" { #include "DNA_ID.h" #include "DNA_freestyle_types.h" #include "DNA_gpu_types.h" +#include "DNA_group_types.h" #include "DNA_layer_types.h" #include "DNA_material_types.h" #include "DNA_userdef_types.h" @@ -58,7 +59,7 @@ struct Brush; struct World; struct Scene; struct Image; -struct Group; +struct Collection; struct Text; struct bNodeTree; struct AnimData; @@ -1510,7 +1511,9 @@ typedef struct Scene { struct PreviewImage *preview; ListBase view_layers; - struct SceneCollection *collection; + /* Not an actual datablock, but memory owned by scene. */ + Collection *master_collection; + struct SceneCollection *collection DNA_DEPRECATED; IDProperty *layer_properties; /* settings to be override by workspaces */ diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index c1565bde882..47f73c6ac22 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -129,9 +129,9 @@ typedef struct SmokeDomainSettings { struct SmokeModifierData *smd; /* for fast RNA access */ struct FLUID_3D *fluid; void *fluid_mutex; - struct Group *fluid_group; - struct Group *eff_group; // UNUSED - struct Group *coll_group; // collision objects group + struct Collection *fluid_group; + struct Collection *eff_group; // UNUSED + struct Collection *coll_group; // collision objects group struct WTURBULENCE *wt; // WTURBULENCE object, if active struct GPUTexture *tex; struct GPUTexture *tex_wt; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index d24aec739e1..588d90fae8d 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -185,7 +185,6 @@ typedef enum eSpaceButtons_Context { BCONTEXT_CONSTRAINT = 11, BCONTEXT_BONE_CONSTRAINT = 12, BCONTEXT_VIEW_LAYER = 13, - BCONTEXT_COLLECTION = 14, BCONTEXT_WORKSPACE = 15, /* always as last... */ @@ -202,12 +201,6 @@ typedef enum eSpaceButtons_Flag { SB_SHADING_CONTEXT = (1 << 4), } eSpaceButtons_Flag; -/* sbuts->collection_context */ -typedef enum eSpaceButtons_Collection_Context { - SB_COLLECTION_CTX_VIEW_LAYER = 0, - SB_COLLECTION_CTX_GROUP = 1, -} eSpaceButtons_Collection_Context; - /* sbuts->align */ typedef enum eSpaceButtons_Align { BUT_FREE = 0, @@ -281,7 +274,7 @@ typedef enum eSpaceOutliner_Flag { typedef enum eSpaceOutliner_Filter { SO_FILTER_SEARCH = (1 << 0), /* SO_FILTER_ENABLE = (1 << 1), */ /* Deprecated */ - /* SO_FILTER_NO_OBJECT = (1 << 2), */ /* Deprecated */ + SO_FILTER_NO_OBJECT = (1 << 2), SO_FILTER_NO_OB_CONTENT = (1 << 3), /* Not only mesh, but modifiers, constraints, ... */ SO_FILTER_NO_CHILDREN = (1 << 4), @@ -325,27 +318,26 @@ typedef enum eSpaceOutliner_StateFilter { SO_FILTER_OB_VISIBLE = 1, SO_FILTER_OB_SELECTED = 2, SO_FILTER_OB_ACTIVE = 3, - SO_FILTER_OB_NONE = 4, } eSpaceOutliner_StateFilter; /* SpaceOops->outlinevis */ typedef enum eSpaceOutliner_Mode { - SO_SCENES = 0, + SO_SCENES = 0, /* SO_CUR_SCENE = 1, */ /* deprecated! */ /* SO_VISIBLE = 2, */ /* deprecated! */ /* SO_SELECTED = 3, */ /* deprecated! */ /* SO_ACTIVE = 4, */ /* deprecated! */ /* SO_SAME_TYPE = 5, */ /* deprecated! */ - SO_GROUPS = 6, - SO_LIBRARIES = 7, + /* SO_GROUPS = 6, */ /* deprecated! */ + SO_LIBRARIES = 7, /* SO_VERSE_SESSION = 8, */ /* deprecated! */ /* SO_VERSE_MS = 9, */ /* deprecated! */ - SO_SEQUENCE = 10, - SO_DATA_API = 11, + SO_SEQUENCE = 10, + SO_DATA_API = 11, /* SO_USERDEF = 12, */ /* deprecated! */ - /* SO_KEYMAP = 13, */ /* deprecated! */ - SO_ID_ORPHANS = 14, - SO_COLLECTIONS = 15, + /* SO_KEYMAP = 13, */ /* deprecated! */ + SO_ID_ORPHANS = 14, + SO_VIEW_LAYER = 15, } eSpaceOutliner_Mode; /* SpaceOops->storeflag */ diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index c9385f98584..9c44d60b7c2 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -476,9 +476,16 @@ static bool init_structDNA( /* this is a patch, to change struct names without a conflict with SDNA */ /* be careful to use it, in this case for a system-struct (opengl/X) */ - if (*cp == 'b') { - /* struct Screen was already used by X, 'bScreen' replaces the old IrisGL 'Screen' struct */ - if (strcmp("bScreen", cp) == 0) sdna->types[nr] = cp + 1; + /* struct Screen was already used by X, 'bScreen' replaces the old IrisGL 'Screen' struct */ + if (strcmp("bScreen", cp) == 0) { + sdna->types[nr] = cp + 1; + } + /* Groups renamed to collections in 2.8 */ + else if (strcmp("Collection", cp) == 0) { + sdna->types[nr] = "Group"; + } + else if (strcmp("CollectionObject", cp) == 0) { + sdna->types[nr] = "GroupObject"; } else if (doversion_280) { if (strcmp(cp, "SceneLayer") == 0) { |