Fix #29603: Mode switch on linked objects

Do not allow to enter to weight paint mode for proxied objects.
This commit is contained in:
2011-12-12 18:25:52 +00:00
parent 3e7ad0e271
commit ba3c6d4d34

View File

@@ -1763,10 +1763,13 @@ static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */
/* for switching to/from mode */
static int paint_poll_test(bContext *C)
{
Object *ob= CTX_data_active_object(C);
if(CTX_data_edit_object(C))
return 0;
if(CTX_data_active_object(C)==NULL)
return 0;
if(!ob->data || ((ID *)ob->data)->lib)
return 0;
return 1;
}