diff options
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_texture.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_texture.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index 46692d29094..8b04398c559 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -179,7 +179,7 @@ static void buttons_texture_modifier_geonodes_users_add(Object *ob, prop = RNA_struct_find_property(&ptr, "default_value"); PointerRNA texptr = RNA_property_pointer_get(&ptr, prop); - Tex *tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? (Tex *)texptr.data : NULL; + Tex *tex = RNA_struct_is_a(texptr.type, &RNA_Texture) ? (Tex *)texptr.data : NULL; if (tex != NULL) { buttons_texture_user_socket_property_add(users, &ob->id, @@ -281,6 +281,7 @@ static void buttons_texture_users_from_context(ListBase *users, brush = BKE_paint_brush(BKE_paint_get_active_from_context(C)); linestyle = BKE_linestyle_active_from_view_layer(view_layer); + BKE_view_layer_synced_ensure(scene, view_layer); ob = BKE_view_layer_active_object_get(view_layer); } @@ -413,7 +414,7 @@ void buttons_texture_context_compute(const bContext *C, SpaceProperties *sbuts) /* Get texture datablock pointer if it's a property. */ texptr = RNA_property_pointer_get(&ct->user->ptr, ct->user->prop); - tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? texptr.data : NULL; + tex = RNA_struct_is_a(texptr.type, &RNA_Texture) ? texptr.data : NULL; ct->texture = tex; } @@ -448,7 +449,7 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg) } if (user->ptr.data) { texptr = RNA_property_pointer_get(&user->ptr, user->prop); - tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? texptr.data : NULL; + tex = RNA_struct_is_a(texptr.type, &RNA_Texture) ? texptr.data : NULL; ct->texture = tex; |