Fix T39562: Properties panel Pinning is broken
'scene' was simply not handled in button context.
This commit is contained in:
parent
8714ae09f8
commit
95b25e7333
Notes:
blender-bot
2023-02-14 10:52:03 +01:00
Referenced by commit 6eb20ca048
, Fix own broken rB95b25e7333c4 (crash on any undo op :/).
Referenced by issue #39562, Properties panel Pinning is broken
|
@ -873,7 +873,7 @@ Scene *CTX_data_scene(const bContext *C)
|
|||
{
|
||||
Scene *scene;
|
||||
|
||||
if (ctx_data_pointer_verify(C, "scene", (void *)&scene))
|
||||
if (ctx_data_pointer_verify(C, "scene", (void *)&scene) && scene)
|
||||
return scene;
|
||||
else
|
||||
return C->data.scene;
|
||||
|
|
|
@ -656,7 +656,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
|
|||
/************************* Context Callback ************************/
|
||||
|
||||
const char *buttons_context_dir[] = {
|
||||
"texture_slot", "world", "object", "mesh", "armature", "lattice", "curve",
|
||||
"texture_slot", "scene", "world", "object", "mesh", "armature", "lattice", "curve",
|
||||
"meta_ball", "lamp", "speaker", "camera", "material", "material_slot",
|
||||
"texture", "texture_user", "texture_user_property", "bone", "edit_bone",
|
||||
"pose_bone", "particle_system", "particle_system_editable", "particle_settings",
|
||||
|
@ -681,6 +681,10 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
|
|||
CTX_data_dir_set(result, buttons_context_dir);
|
||||
return 1;
|
||||
}
|
||||
else if (CTX_data_equals(member, "scene")) {
|
||||
set_pointer_type(path, result, &RNA_Scene);
|
||||
return 1;
|
||||
}
|
||||
else if (CTX_data_equals(member, "world")) {
|
||||
set_pointer_type(path, result, &RNA_World);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue