Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_duplilist.h
| Show All 10 Lines | |||||
| #endif | #endif | ||||
| struct Depsgraph; | struct Depsgraph; | ||||
| struct ID; | struct ID; | ||||
| struct ListBase; | struct ListBase; | ||||
| struct Object; | struct Object; | ||||
| struct ParticleSystem; | struct ParticleSystem; | ||||
| struct Scene; | struct Scene; | ||||
| struct ViewerPath; | |||||
| struct GeomerySet; | |||||
mswf: Typo? But it seems like this typedef is not even used within this file, because the typo got… | |||||
| /* ---------------------------------------------------- */ | /* ---------------------------------------------------- */ | ||||
| /* Dupli-Geometry */ | /* Dupli-Geometry */ | ||||
| /** | /** | ||||
| * \return a #ListBase of #DupliObject. | * \return a #ListBase of #DupliObject. | ||||
| */ | */ | ||||
| struct ListBase *object_duplilist(struct Depsgraph *depsgraph, | struct ListBase *object_duplilist(struct Depsgraph *depsgraph, | ||||
| struct Scene *sce, | struct Scene *sce, | ||||
| struct Object *ob); | struct Object *ob); | ||||
| /** | |||||
| * \return a #ListBase of #DupliObject for the preview geometry referenced by the #ViewerPath. | |||||
| */ | |||||
| struct ListBase *object_duplilist_preview(struct Depsgraph *depsgraph, | |||||
| struct Scene *scene, | |||||
| struct Object *ob, | |||||
| const struct ViewerPath *viewer_path); | |||||
| void free_object_duplilist(struct ListBase *lb); | void free_object_duplilist(struct ListBase *lb); | ||||
| typedef struct DupliObject { | typedef struct DupliObject { | ||||
| struct DupliObject *next, *prev; | struct DupliObject *next, *prev; | ||||
| /* Object whose geometry is instanced. */ | /* Object whose geometry is instanced. */ | ||||
| struct Object *ob; | struct Object *ob; | ||||
| /* Data owned by the object above that is instanced. This might not be the same as `ob->data`. */ | /* Data owned by the object above that is instanced. This might not be the same as `ob->data`. */ | ||||
| struct ID *ob_data; | struct ID *ob_data; | ||||
| float mat[4][4]; | float mat[4][4]; | ||||
| float orco[3], uv[2]; | float orco[3], uv[2]; | ||||
| short type; /* from Object.transflag */ | short type; /* from Object.transflag */ | ||||
| char no_draw; | char no_draw; | ||||
| /* If this dupli object is belongs to a preview, this is non-null. */ | |||||
| const struct GeometrySet *preview_base_geometry; | |||||
Done Inline ActionsIt would make a bit more sense to me if this was a InstancesComponent pointer. Is there a reason you didn't do it that way? HooglyBoogly: It would make a bit more sense to me if this was a `InstancesComponent` pointer. Is there a… | |||||
Done Inline ActionsOne reason right now is that this is also used to detect if the DupliObject belongs to a preview. A separate redundant flag could be added, but doesn't seem super necessary now. JacquesLucke: One reason right now is that this is also used to detect if the `DupliObject` belongs to a… | |||||
| /* Index of the top-level instance this dupli is part of or -1 when unused. */ | |||||
| int preview_instance_index; | |||||
| /* Persistent identifier for a dupli object, for inter-frame matching of | /* Persistent identifier for a dupli object, for inter-frame matching of | ||||
| * objects with motion blur, or inter-update matching for syncing. */ | * objects with motion blur, or inter-update matching for syncing. */ | ||||
| int persistent_id[8]; /* MAX_DUPLI_RECUR */ | int persistent_id[8]; /* MAX_DUPLI_RECUR */ | ||||
| /* Particle this dupli was generated from. */ | /* Particle this dupli was generated from. */ | ||||
| struct ParticleSystem *particle_system; | struct ParticleSystem *particle_system; | ||||
| /* Random ID for shading */ | /* Random ID for shading */ | ||||
| unsigned int random_id; | unsigned int random_id; | ||||
| } DupliObject; | } DupliObject; | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
Typo? But it seems like this typedef is not even used within this file, because the typo got ignored.