forked from bartvdbraak/blender
Bugfix #28121
Linked Library objects or object->data should not allow to go to sculptmode. Also cleaned up mode menu with invalid entries then.
This commit is contained in:
parent
d163ce5595
commit
805a169f70
@ -301,7 +301,7 @@ int ED_operator_object_active_editable(bContext *C)
|
||||
int ED_operator_object_active_editable_mesh(bContext *C)
|
||||
{
|
||||
Object *ob = ED_object_active_context(C);
|
||||
return ((ob != NULL) && !(ob->id.lib) && !(ob->restrictflag & OB_RESTRICT_VIEW) && ob->type == OB_MESH);
|
||||
return ((ob != NULL) && !(ob->id.lib) && !(ob->restrictflag & OB_RESTRICT_VIEW) && ob->type == OB_MESH && !(((ID *)ob->data)->lib));
|
||||
}
|
||||
|
||||
int ED_operator_object_active_editable_font(bContext *C)
|
||||
|
@ -280,7 +280,8 @@ static char *view3d_modeselect_pup(Scene *scene)
|
||||
|
||||
str += sprintf(str, formatstr, "Object Mode", OB_MODE_OBJECT, ICON_OBJECT_DATA);
|
||||
|
||||
if(ob==NULL) return string;
|
||||
if(ob==NULL || ob->data==NULL) return string;
|
||||
if(ob->id.lib || ((ID *)ob->data)->lib) return string;
|
||||
|
||||
/* if active object is editable */
|
||||
if ( ((ob->type == OB_MESH)
|
||||
|
Loading…
Reference in New Issue
Block a user