Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object.c
| Show First 20 Lines • Show All 727 Lines • ▼ Show 20 Lines | |||||
| * Return which parts of the object are visible, as evaluated by depsgraph | * Return which parts of the object are visible, as evaluated by depsgraph | ||||
| */ | */ | ||||
| int BKE_object_visibility(const Object *ob, const int dag_eval_mode) | int BKE_object_visibility(const Object *ob, const int dag_eval_mode) | ||||
| { | { | ||||
| if ((ob->base_flag & BASE_VISIBLE_DEPSGRAPH) == 0) { | if ((ob->base_flag & BASE_VISIBLE_DEPSGRAPH) == 0) { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| if ((dag_eval_mode == DAG_EVAL_VIEWPORT) && ((ob->base_flag & BASE_VISIBLE_VIEWLAYER) == 0)) { | |||||
| return 0; | |||||
| } | |||||
| /* Test which components the object has. */ | /* Test which components the object has. */ | ||||
| int visibility = OB_VISIBLE_SELF; | int visibility = OB_VISIBLE_SELF; | ||||
| if (ob->particlesystem.first) { | if (ob->particlesystem.first) { | ||||
| visibility |= OB_VISIBLE_INSTANCES | OB_VISIBLE_PARTICLES; | visibility |= OB_VISIBLE_INSTANCES | OB_VISIBLE_PARTICLES; | ||||
| } | } | ||||
| else if (ob->transflag & OB_DUPLI) { | else if (ob->transflag & OB_DUPLI) { | ||||
| visibility |= OB_VISIBLE_INSTANCES; | visibility |= OB_VISIBLE_INSTANCES; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 3,749 Lines • Show Last 20 Lines | |||||