diff options
author | McCabe Maxsted | 2009-10-13 01:24:33 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-10-13 01:24:50 -0700 |
commit | f94740d8e379d32ac0fc6323b49c67bb67301db2 (patch) | |
tree | 726f1108b4633f3a71eb78f3025ea4a2b758feac /linden/indra/newview/llfloatercustomize.cpp | |
parent | Removed Emerald viewer modifier for avatar height label in customize window (diff) | |
download | meta-impy-f94740d8e379d32ac0fc6323b49c67bb67301db2.zip meta-impy-f94740d8e379d32ac0fc6323b49c67bb67301db2.tar.gz meta-impy-f94740d8e379d32ac0fc6323b49c67bb67301db2.tar.bz2 meta-impy-f94740d8e379d32ac0fc6323b49c67bb67301db2.tar.xz |
Only enable import/export of shapes if they're full perm and you're the creator
Diffstat (limited to 'linden/indra/newview/llfloatercustomize.cpp')
-rw-r--r-- | linden/indra/newview/llfloatercustomize.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp index 3ae9666..4bcc823 100644 --- a/linden/indra/newview/llfloatercustomize.cpp +++ b/linden/indra/newview/llfloatercustomize.cpp | |||
@@ -558,10 +558,26 @@ void LLPanelEditWearable::setSubpart( ESubpart subpart ) | |||
558 | item = (LLViewerInventoryItem*)gAgent.getWearableInventoryItem(mType); | 558 | item = (LLViewerInventoryItem*)gAgent.getWearableInventoryItem(mType); |
559 | U32 perm_mask = 0x0; | 559 | U32 perm_mask = 0x0; |
560 | BOOL is_complete = FALSE; | 560 | BOOL is_complete = FALSE; |
561 | bool can_export = false; | ||
562 | bool can_import = false; | ||
561 | if(item) | 563 | if(item) |
562 | { | 564 | { |
563 | perm_mask = item->getPermissions().getMaskOwner(); | 565 | perm_mask = item->getPermissions().getMaskOwner(); |
564 | is_complete = item->isComplete(); | 566 | is_complete = item->isComplete(); |
567 | |||
568 | if (subpart <= 18) // body parts only | ||
569 | { | ||
570 | can_import = true; | ||
571 | |||
572 | if (is_complete && | ||
573 | gAgent.getID() == item->getPermissions().getOwner() && | ||
574 | gAgent.getID() == item->getPermissions().getCreator() && | ||
575 | (PERM_ITEM_UNRESTRICTED & | ||
576 | perm_mask) == PERM_ITEM_UNRESTRICTED) | ||
577 | { | ||
578 | can_export = true; | ||
579 | } | ||
580 | } | ||
565 | } | 581 | } |
566 | setUIPermissions(perm_mask, is_complete); | 582 | setUIPermissions(perm_mask, is_complete); |
567 | BOOL editable = ((perm_mask & PERM_MODIFY) && is_complete) ? TRUE : FALSE; | 583 | BOOL editable = ((perm_mask & PERM_MODIFY) && is_complete) ? TRUE : FALSE; |
@@ -585,7 +601,8 @@ void LLPanelEditWearable::setSubpart( ESubpart subpart ) | |||
585 | } | 601 | } |
586 | gFloaterCustomize->generateVisualParamHints(NULL, sorted_params); | 602 | gFloaterCustomize->generateVisualParamHints(NULL, sorted_params); |
587 | gFloaterCustomize->updateScrollingPanelUI(); | 603 | gFloaterCustomize->updateScrollingPanelUI(); |
588 | 604 | gFloaterCustomize->childSetEnabled("Export", can_export); | |
605 | gFloaterCustomize->childSetEnabled("Import", can_import); | ||
589 | 606 | ||
590 | // Update the camera | 607 | // Update the camera |
591 | gMorphView->setCameraTargetJoint( gAgent.getAvatarObject()->getJoint( part->mTargetJoint ) ); | 608 | gMorphView->setCameraTargetJoint( gAgent.getAvatarObject()->getJoint( part->mTargetJoint ) ); |