Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_query_iter.cc
| Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static bool deg_object_hide_original(eEvaluationMode eval_mode, Object *ob, DupliObject *dob) | static bool deg_object_hide_original(eEvaluationMode eval_mode, Object *ob, DupliObject *dob) | ||||
| { | { | ||||
| /* Automatic hiding if this object is being instanced on verts/faces/frames | /* Automatic hiding if this object is being instanced on verts/faces/frames | ||||
| * by its parent. Ideally this should not be needed, but due to the wrong | * by its parent. Ideally this should not be needed, but due to the wrong | ||||
| * dependency direction in the data design there is no way to keep the object | * dependency direction in the data design there is no way to keep the object | ||||
| * visible otherwise. The better solution eventually would be for objects | * visible otherwise. The better solution eventually would be for objects | ||||
| * to specify which object they instance, instead of through parenting. */ | * to specify which object they instance, instead of through parenting. | ||||
| * | |||||
| * This function should not be used for metaballs. They have custom visibility rules, as hiding | |||||
| * the base metaball will also hide all the other balls in the group. */ | |||||
| if (eval_mode == DAG_EVAL_RENDER || dob) { | if (eval_mode == DAG_EVAL_RENDER || dob) { | ||||
| const int hide_original_types = OB_DUPLIVERTS | OB_DUPLIFACES; | const int hide_original_types = OB_DUPLIVERTS | OB_DUPLIFACES; | ||||
| if (!dob || !(dob->type & hide_original_types)) { | if (!dob || !(dob->type & hide_original_types)) { | ||||
| if (ob->parent && (ob->parent->transflag & hide_original_types)) { | if (ob->parent && (ob->parent->transflag & hide_original_types)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | void deg_iterator_objects_step(BLI_Iterator *iter, DEG::IDNode *id_node) | ||||
| Object *object = (Object *)id_node->id_cow; | Object *object = (Object *)id_node->id_cow; | ||||
| BLI_assert(DEG::deg_validate_copy_on_write_datablock(&object->id)); | BLI_assert(DEG::deg_validate_copy_on_write_datablock(&object->id)); | ||||
| int ob_visibility = OB_VISIBLE_ALL; | int ob_visibility = OB_VISIBLE_ALL; | ||||
| if (data->flag & DEG_ITER_OBJECT_FLAG_VISIBLE) { | if (data->flag & DEG_ITER_OBJECT_FLAG_VISIBLE) { | ||||
| ob_visibility = BKE_object_visibility(object, data->eval_mode); | ob_visibility = BKE_object_visibility(object, data->eval_mode); | ||||
| if (deg_object_hide_original(data->eval_mode, object, nullptr)) { | if (object->type != OB_MBALL && deg_object_hide_original(data->eval_mode, object, nullptr)) { | ||||
campbellbarton: Both uses of `deg_object_hide_original` are checking meta-ball types and ignoring, that… | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| if (ob_visibility & OB_VISIBLE_INSTANCES) { | if (ob_visibility & OB_VISIBLE_INSTANCES) { | ||||
| if ((data->flag & DEG_ITER_OBJECT_FLAG_DUPLI) && (object->transflag & OB_DUPLI)) { | if ((data->flag & DEG_ITER_OBJECT_FLAG_DUPLI) && (object->transflag & OB_DUPLI)) { | ||||
| data->dupli_parent = object; | data->dupli_parent = object; | ||||
| data->dupli_list = object_duplilist(data->graph, data->scene, object); | data->dupli_list = object_duplilist(data->graph, data->scene, object); | ||||
| ▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines | |||||
Both uses of deg_object_hide_original are checking meta-ball types and ignoring, that function could have a comment regarding this.