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:
Ton Roosendaal 2011-07-30 15:45:27 +00:00
parent d163ce5595
commit 805a169f70
2 changed files with 3 additions and 2 deletions

@ -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)