Fix T99151: Cycles not updating on Object Type visibility change
Differential Revision: https://developer.blender.org/D16259
This commit is contained in:
parent
3411a96e74
commit
3915f5300a
Notes:
blender-bot
2023-02-14 10:21:15 +01:00
Referenced by issue #102667, Rendering an animation freezes at random frame Referenced by issue #101999, Nodes: Assert and crash: Editing nodes through the material panel and undo. Referenced by issue #99151, Regression: cycles not updated when off object types in "View object Types" menu
|
@ -322,7 +322,9 @@ void rna_object_vcollayer_name_set(struct PointerRNA *ptr,
|
|||
PointerRNA rna_object_shapekey_index_get(struct ID *id, int value);
|
||||
int rna_object_shapekey_index_set(struct ID *id, PointerRNA value, int current);
|
||||
|
||||
void rna_def_object_type_visibility_flags_common(StructRNA *srna, int noteflag);
|
||||
void rna_def_object_type_visibility_flags_common(StructRNA *srna,
|
||||
int noteflag,
|
||||
const char *update_func);
|
||||
int rna_object_type_visibility_icon_get_common(int object_type_exclude_viewport,
|
||||
const int *object_type_exclude_select);
|
||||
|
||||
|
|
|
@ -990,6 +990,13 @@ static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
|
|||
return rna_pointer_inherit_refine(ptr, &RNA_RegionView3D, regiondata);
|
||||
}
|
||||
|
||||
static void rna_SpaceView3D_object_type_visibility_update(Main *UNUSED(bmain),
|
||||
Scene *scene,
|
||||
PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS);
|
||||
}
|
||||
|
||||
static void rna_SpaceView3D_region_quadviews_begin(CollectionPropertyIterator *iter,
|
||||
PointerRNA *ptr)
|
||||
{
|
||||
|
@ -5086,7 +5093,8 @@ static void rna_def_space_view3d(BlenderRNA *brna)
|
|||
prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_mirror_xr_session_update");
|
||||
|
||||
rna_def_object_type_visibility_flags_common(srna,
|
||||
NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING);
|
||||
NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING,
|
||||
"rna_SpaceView3D_object_type_visibility_update");
|
||||
|
||||
/* Helper for drawing the icon. */
|
||||
prop = RNA_def_property(srna, "icon_from_show_object_viewport", PROP_INT, PROP_NONE);
|
||||
|
|
|
@ -119,7 +119,9 @@ void RNA_api_space_text(StructRNA *srna)
|
|||
RNA_def_function_output(func, parm);
|
||||
}
|
||||
|
||||
void rna_def_object_type_visibility_flags_common(StructRNA *srna, int noteflag)
|
||||
void rna_def_object_type_visibility_flags_common(StructRNA *srna,
|
||||
int noteflag,
|
||||
const char *update_func)
|
||||
{
|
||||
PropertyRNA *prop;
|
||||
|
||||
|
@ -173,7 +175,7 @@ void rna_def_object_type_visibility_flags_common(StructRNA *srna, int noteflag)
|
|||
RNA_def_property_boolean_negative_sdna(
|
||||
prop, NULL, view_mask_member[mask_index], info[type_index].type_mask);
|
||||
RNA_def_property_ui_text(prop, info[type_index].name, "");
|
||||
RNA_def_property_update(prop, noteflag, NULL);
|
||||
RNA_def_property_update(prop, noteflag, update_func);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2052,7 +2052,7 @@ static void rna_def_xr_session_settings(BlenderRNA *brna)
|
|||
"Allow the VR tracking origin to be defined independently of the headset location");
|
||||
RNA_def_property_update(prop, NC_WM | ND_XR_DATA_CHANGED, NULL);
|
||||
|
||||
rna_def_object_type_visibility_flags_common(srna, NC_WM | ND_XR_DATA_CHANGED);
|
||||
rna_def_object_type_visibility_flags_common(srna, NC_WM | ND_XR_DATA_CHANGED, NULL);
|
||||
|
||||
/* Helper for drawing the icon. */
|
||||
prop = RNA_def_property(srna, "icon_from_show_object_viewport", PROP_INT, PROP_NONE);
|
||||
|
|
Loading…
Reference in New Issue