spurious "can't edit external libdata" for normal operations on proxy armature


Also, fixed two typos in code comments.
This commit is contained in:
2007-04-28 03:01:12 +00:00
parent 3bd0d2e227
commit 836ccb8ab0
4 changed files with 7 additions and 4 deletions

View File

@@ -5446,11 +5446,12 @@ void hookmenu(void)
} }
/* /*
* Returns true if teh Object data is a from an external blend file (libdata) * Returns true if the Object data is a from an external blend file (libdata)
* */ */
int object_data_is_libdata(Object *ob) int object_data_is_libdata(Object *ob)
{ {
if (!ob) return 0; if (!ob) return 0;
if (ob->proxy) return 0;
if (ob->id.lib) return 1; if (ob->id.lib) return 1;
if (!ob->data) return 0; if (!ob->data) return 0;
if (((ID *)ob->data)->lib) return 1; if (((ID *)ob->data)->lib) return 1;

View File

@@ -5202,7 +5202,6 @@ void view3d_buttons(void)
uiDefIconBut(block, BUT, B_ACTCOPY, ICON_COPYUP, uiDefIconBut(block, BUT, B_ACTCOPY, ICON_COPYUP,
xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0,
"Copies the current pose to the buffer"); "Copies the current pose to the buffer");
uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
uiDefIconBut(block, BUT, B_ACTPASTE, ICON_PASTEUP, uiDefIconBut(block, BUT, B_ACTPASTE, ICON_PASTEUP,
xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0,
"Pastes the pose from the buffer"); "Pastes the pose from the buffer");

View File

@@ -674,6 +674,9 @@ void paste_posebuf (int flip)
return; return;
} }
if(pose_has_protected_selected(ob, 1))
return;
/* Safely merge all of the channels in this pose into /* Safely merge all of the channels in this pose into
any existing pose */ any existing pose */
for (chan=g_posebuf->chanbase.first; chan; chan=chan->next){ for (chan=g_posebuf->chanbase.first; chan; chan=chan->next){

View File

@@ -5365,7 +5365,7 @@ static void init_timespace(ScrArea *sa)
} }
/* ******************** SPACE: Time ********************** */ /* ******************** SPACE: Nodes ********************** */
extern void drawnodespace(ScrArea *sa, void *spacedata); extern void drawnodespace(ScrArea *sa, void *spacedata);
extern void winqreadnodespace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt); extern void winqreadnodespace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);