diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-29 18:44:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-29 18:44:39 +0400 |
commit | 6662440867f0ca909339bbb95295c8db95ba0005 (patch) | |
tree | 25564f58535109b177a44e90dccb602a6c558355 /source/blender/editors/object/object_select.c | |
parent | 7e0fc2692be86618bc25f21f61c7730d693041f7 (diff) |
select linked options, Library and Library ObData
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r-- | source/blender/editors/object/object_select.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index a5a9bbdffdd..01821612e9e 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -161,11 +161,13 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot) static EnumPropertyItem prop_select_linked_types[] = { //{1, "IPO", 0, "Object IPO", ""}, // XXX depreceated animation system stuff... - {2, "OBDATA", 0, "Ob Data", ""}, + {2, "OBDATA", 0, "Object Data", ""}, {3, "MATERIAL", 0, "Material", ""}, {4, "TEXTURE", 0, "Texture", ""}, {5, "DUPGROUP", 0, "Dupligroup", ""}, {6, "PARTICLE", 0, "Particle System", ""}, + {7, "LIBRARY", 0, "Library", ""}, + {8, "LIBRARY_OBDATA", 0, "Library (Object Data)", ""}, {0, NULL, 0, NULL, NULL} }; @@ -198,7 +200,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) } ob= OBACT; - if(ob==0){ + if(ob==NULL){ BKE_report(op->reports, RPT_ERROR, "No Active Object"); return OPERATOR_CANCELLED; } @@ -227,7 +229,14 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) else if(nr==6) { if(ob->particlesystem.first==NULL) return OPERATOR_CANCELLED; } - else return OPERATOR_CANCELLED; + else if(nr==7) { + /* do nothing */ + } + else if(nr==8) { + if(ob->data==NULL) return OPERATOR_CANCELLED; + } + else + return OPERATOR_CANCELLED; CTX_DATA_BEGIN(C, Base*, base, visible_bases) { if(nr==1) { @@ -286,6 +295,18 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) } } } + else if(nr==7) { + if(ob->id.lib == base->object->id.lib) { + base->flag |= SELECT; + changed= 1; + } + } + else if(nr==8) { + if(base->object->data && ((ID *)ob->data)->lib == ((ID *)base->object->data)->lib) { + base->flag |= SELECT; + changed= 1; + } + } base->object->flag= base->flag; } CTX_DATA_END; |