forked from bartvdbraak/blender
PyAPI: remove context.active_base
All other access to the Base structure from Python was removed, it seems this was left in by accident. Ref T85675
This commit is contained in:
parent
aaa07a3a8f
commit
44db4e50b2
@ -1029,7 +1029,6 @@ def pymodule2sphinx(basepath, module_name, module, title, module_all_extra):
|
|||||||
context_type_map = {
|
context_type_map = {
|
||||||
# context_member: (RNA type, is_collection)
|
# context_member: (RNA type, is_collection)
|
||||||
"active_annotation_layer": ("GPencilLayer", False),
|
"active_annotation_layer": ("GPencilLayer", False),
|
||||||
"active_base": ("ObjectBase", False),
|
|
||||||
"active_bone": ("EditBone", False),
|
"active_bone": ("EditBone", False),
|
||||||
"active_gpencil_frame": ("GreasePencilLayer", True),
|
"active_gpencil_frame": ("GreasePencilLayer", True),
|
||||||
"active_gpencil_layer": ("GPencilLayer", True),
|
"active_gpencil_layer": ("GPencilLayer", True),
|
||||||
@ -1549,8 +1548,8 @@ def pyrna2sphinx(basepath):
|
|||||||
fw(".. hlist::\n")
|
fw(".. hlist::\n")
|
||||||
fw(" :columns: 2\n\n")
|
fw(" :columns: 2\n\n")
|
||||||
|
|
||||||
# context does its own thing
|
# Context does its own thing.
|
||||||
# "active_base": ("ObjectBase", False),
|
# "active_object": ("Object", False),
|
||||||
for ref_attr, (ref_type, ref_is_seq) in sorted(context_type_map.items()):
|
for ref_attr, (ref_type, ref_is_seq) in sorted(context_type_map.items()):
|
||||||
if ref_type == struct_id:
|
if ref_type == struct_id:
|
||||||
fw(" * :mod:`bpy.context.%s`\n" % ref_attr)
|
fw(" * :mod:`bpy.context.%s`\n" % ref_attr)
|
||||||
|
@ -1595,7 +1595,6 @@ static void space_view3d_refresh(const bContext *C, ScrArea *UNUSED(area))
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *view3d_context_dir[] = {
|
const char *view3d_context_dir[] = {
|
||||||
"active_base",
|
|
||||||
"active_object",
|
"active_object",
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
@ -1608,20 +1607,6 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
|
|||||||
if (CTX_data_dir(member)) {
|
if (CTX_data_dir(member)) {
|
||||||
CTX_data_dir_set(result, view3d_context_dir);
|
CTX_data_dir_set(result, view3d_context_dir);
|
||||||
}
|
}
|
||||||
else if (CTX_data_equals(member, "active_base")) {
|
|
||||||
Scene *scene = CTX_data_scene(C);
|
|
||||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
|
||||||
if (view_layer->basact) {
|
|
||||||
Object *ob = view_layer->basact->object;
|
|
||||||
/* if hidden but in edit mode, we still display, can happen with animation */
|
|
||||||
if ((view_layer->basact->flag & BASE_VISIBLE_DEPSGRAPH) != 0 ||
|
|
||||||
(ob->mode != OB_MODE_OBJECT)) {
|
|
||||||
CTX_data_pointer_set(result, &scene->id, &RNA_ObjectBase, view_layer->basact);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else if (CTX_data_equals(member, "active_object")) {
|
else if (CTX_data_equals(member, "active_object")) {
|
||||||
/* In most cases the active object is the `view_layer->basact->object`.
|
/* In most cases the active object is the `view_layer->basact->object`.
|
||||||
* For the 3D view however it can be NULL when hidden.
|
* For the 3D view however it can be NULL when hidden.
|
||||||
|
Loading…
Reference in New Issue
Block a user