Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager_data.c
| Show First 20 Lines • Show All 532 Lines • ▼ Show 20 Lines | uint random = (DST.dupli_source) ? | ||||
| * put it in ob->runtime and make depsgraph ensure it is up to date. */ | * put it in ob->runtime and make depsgraph ensure it is up to date. */ | ||||
| BLI_hash_int_2d(BLI_hash_string(ob->id.name + 2), 0); | BLI_hash_int_2d(BLI_hash_string(ob->id.name + 2), 0); | ||||
| ob_infos->ob_random = random * (1.0f / (float)0xFFFFFFFF); | ob_infos->ob_random = random * (1.0f / (float)0xFFFFFFFF); | ||||
| /* Object State. */ | /* Object State. */ | ||||
| ob_infos->ob_flag = 1.0f; /* Required to have a correct sign */ | ob_infos->ob_flag = 1.0f; /* Required to have a correct sign */ | ||||
| ob_infos->ob_flag += (ob->base_flag & BASE_SELECTED) ? (1 << 1) : 0; | ob_infos->ob_flag += (ob->base_flag & BASE_SELECTED) ? (1 << 1) : 0; | ||||
| ob_infos->ob_flag += (ob->base_flag & BASE_FROM_DUPLI) ? (1 << 2) : 0; | ob_infos->ob_flag += (ob->base_flag & BASE_FROM_DUPLI) ? (1 << 2) : 0; | ||||
| ob_infos->ob_flag += (ob->base_flag & BASE_FROM_SET) ? (1 << 3) : 0; | ob_infos->ob_flag += (ob->base_flag & BASE_FROM_SET) ? (1 << 3) : 0; | ||||
| if (ob->base_flag & BASE_FROM_DUPLI) { | |||||
| ob_infos->ob_flag += (DRW_object_get_dupli_parent(ob) == DST.draw_ctx.obact) ? (1 << 4) : 0; | |||||
| } | |||||
| else { | |||||
| ob_infos->ob_flag += (ob == DST.draw_ctx.obact) ? (1 << 4) : 0; | ob_infos->ob_flag += (ob == DST.draw_ctx.obact) ? (1 << 4) : 0; | ||||
| } | |||||
| /* Negative scaling. */ | /* Negative scaling. */ | ||||
| ob_infos->ob_flag *= (ob->transflag & OB_NEG_SCALE) ? -1.0f : 1.0f; | ob_infos->ob_flag *= (ob->transflag & OB_NEG_SCALE) ? -1.0f : 1.0f; | ||||
| /* Object Color. */ | /* Object Color. */ | ||||
| copy_v4_v4(ob_infos->ob_color, ob->color); | copy_v4_v4(ob_infos->ob_color, ob->color); | ||||
| } | } | ||||
| static void drw_call_culling_init(DRWCullingState *cull, Object *ob) | static void drw_call_culling_init(DRWCullingState *cull, Object *ob) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,606 Lines • Show Last 20 Lines | |||||