Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_wireframe.c
| Show All 14 Lines | |||||
| * | * | ||||
| * Copyright 2019, Blender Foundation. | * Copyright 2019, Blender Foundation. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup draw_engine | * \ingroup draw_engine | ||||
| */ | */ | ||||
| #include "DNA_collection_types.h" | |||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_particle_types.h" | #include "DNA_particle_types.h" | ||||
| #include "DNA_view3d_types.h" | #include "DNA_view3d_types.h" | ||||
| #include "DNA_volume_types.h" | #include "DNA_volume_types.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_displist.h" | #include "BKE_displist.h" | ||||
| #include "BKE_duplilist.h" | #include "BKE_duplilist.h" | ||||
| ▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | static void wireframe_hair_cache_populate(OVERLAY_Data *vedata, Object *ob, ParticleSystem *psys) | ||||
| Object *dupli_parent = DRW_object_get_dupli_parent(ob); | Object *dupli_parent = DRW_object_get_dupli_parent(ob); | ||||
| DupliObject *dupli_object = DRW_object_get_dupli(ob); | DupliObject *dupli_object = DRW_object_get_dupli(ob); | ||||
| float dupli_mat[4][4]; | float dupli_mat[4][4]; | ||||
| if ((dupli_parent != NULL) && (dupli_object != NULL)) { | if ((dupli_parent != NULL) && (dupli_object != NULL)) { | ||||
| if (dupli_object->type & OB_DUPLICOLLECTION) { | if (dupli_object->type & OB_DUPLICOLLECTION) { | ||||
| copy_m4_m4(dupli_mat, dupli_parent->obmat); | copy_m4_m4(dupli_mat, dupli_parent->obmat); | ||||
| Collection *collection = dupli_parent->instance_collection; | |||||
| if (collection != NULL) { | |||||
| sub_v3_v3(dupli_mat[3], collection->instance_offset); | |||||
| } | |||||
| } | } | ||||
| else { | else { | ||||
| copy_m4_m4(dupli_mat, dupli_object->ob->obmat); | copy_m4_m4(dupli_mat, dupli_object->ob->obmat); | ||||
| invert_m4(dupli_mat); | invert_m4(dupli_mat); | ||||
| mul_m4_m4m4(dupli_mat, ob->obmat, dupli_mat); | mul_m4_m4m4(dupli_mat, ob->obmat, dupli_mat); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines | |||||