[Bf-blender-cvs] [2abb156b9f6] blender2.8: Cleanup: remove object.is_visible.
Brecht Van Lommel
noreply at git.blender.org
Mon Jun 11 17:08:04 CEST 2018
Commit: 2abb156b9f64dd0ec7d51aba8eac688fe22621ba
Author: Brecht Van Lommel
Date: Fri Jun 8 18:43:05 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB2abb156b9f64dd0ec7d51aba8eac688fe22621ba
Cleanup: remove object.is_visible.
Depsgraph already iterates over visible objects, and since this was only
valid for objects evaluated with the depsgraph it was confusing.
===================================================================
M intern/cycles/blender/blender_object.cpp
M source/blender/makesrna/intern/rna_object.c
===================================================================
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 8ed3eafb488..dbeab2fdf61 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -578,9 +578,6 @@ void BlenderSync::sync_objects(BL::Depsgraph& b_depsgraph, float motion_time)
{
BL::DepsgraphObjectInstance b_instance = *b_instance_iter;
BL::Object b_ob = b_instance.object();
- if(!b_ob.is_visible()) {
- continue;
- }
progress.set_sync_status("Synchronizing object", b_ob.name());
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 22a32586ff1..28e13790d5c 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -224,18 +224,6 @@ static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA
DEG_id_type_tag(bmain, ID_OB);
}
-static int rna_Object_is_visible_get(PointerRNA *ptr)
-{
- Object *ob = ptr->id.data;
- /* The duplicators final visibility is not evaluated by depsgraph, so it's
- * in ob->base_flag & VISIBLED. Instead we need to take into account whether
- * we are rendering or not, and the ob->duplicator_visibility_flag.
- * However for this assessor we don't know if we are rendering, so we just
- * ignore the duplicator visibility
- */
- return BKE_object_is_visible(ob, OB_VISIBILITY_CHECK_UNKNOWN_RENDER_MODE);
-}
-
static void rna_Object_matrix_local_get(PointerRNA *ptr, float values[16])
{
Object *ob = ptr->id.data;
@@ -2302,11 +2290,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "duplicator_visibility_flag", OB_DUPLI_FLAG_VIEWPORT);
RNA_def_property_ui_text(prop, "Display Duplicator", "Make duplicator visible in the viewport");
- prop = RNA_def_property(srna, "is_visible", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_Object_is_visible_get", NULL);
- RNA_def_property_ui_text(prop, "Visible", "Visible to camera rays, set only on objects evaluated by depsgraph");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
/* anim */
rna_def_animdata_common(srna);
More information about the Bf-blender-cvs
mailing list