Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_depsgraph.c
| Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | static void rna_DepsgraphObjectInstance_matrix_world_get(PointerRNA *ptr, float *mat) | ||||
| DEGObjectIterData *deg_iter = (DEGObjectIterData *)di->iter.data; | DEGObjectIterData *deg_iter = (DEGObjectIterData *)di->iter.data; | ||||
| if (deg_iter->dupli_object_current != NULL) { | if (deg_iter->dupli_object_current != NULL) { | ||||
| copy_m4_m4((float(*)[4])mat, deg_iter->dupli_object_current->mat); | copy_m4_m4((float(*)[4])mat, deg_iter->dupli_object_current->mat); | ||||
| } | } | ||||
| else { | else { | ||||
| /* We can return actual object's matrix here, no reason to return identity matrix | /* We can return actual object's matrix here, no reason to return identity matrix | ||||
| * when this is not actually an instance... */ | * when this is not actually an instance... */ | ||||
| Object *ob = (Object *)di->iter.current; | Object *ob = (Object *)di->iter.current; | ||||
| copy_m4_m4((float(*)[4])mat, ob->obmat); | copy_m4_m4((float(*)[4])mat, ob->object_to_world); | ||||
| } | } | ||||
| } | } | ||||
| static void rna_DepsgraphObjectInstance_orco_get(PointerRNA *ptr, float *orco) | static void rna_DepsgraphObjectInstance_orco_get(PointerRNA *ptr, float *orco) | ||||
| { | { | ||||
| RNA_DepsgraphIterator *di = ptr->data; | RNA_DepsgraphIterator *di = ptr->data; | ||||
| DEGObjectIterData *deg_iter = (DEGObjectIterData *)di->iter.data; | DEGObjectIterData *deg_iter = (DEGObjectIterData *)di->iter.data; | ||||
| if (deg_iter->dupli_object_current != NULL) { | if (deg_iter->dupli_object_current != NULL) { | ||||
| ▲ Show 20 Lines • Show All 662 Lines • Show Last 20 Lines | |||||