Page Menu
Home
Search
Configure Global Search
Log In
Files
F4957
outliner.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Roland Hess (harkyman)
Nov 13 2013, 1:19 PM
Size
4 KB
Subscribers
None
outliner.patch
View Options
Index: source/blender/src/outliner.c
===================================================================
--- source/blender/src/outliner.c (revision 13258)
+++ source/blender/src/outliner.c (working copy)
@@ -1148,6 +1148,75 @@
}
}
+void outliner_toggle_visibility(struct ScrArea *sa)
+{
+ SpaceOops *soops= sa->spacedata.first;
+ TreeElement *te;
+ TreeStoreElem *tselem;
+
+ for (te= soops->tree.first; te; te= te->next) {
+ if(te->idcode==ID_OB) {
+ tselem= TREESTORE(te);
+ if (tselem->flag & TSE_SELECTED) {
+ Object *ob= (Object *)tselem->id;
+ ob->restrictflag^=OB_RESTRICT_VIEW;
+ }
+ }
+ }
+
+ BIF_undo_push("Outliner toggle visibility");
+
+ allqueue(REDRAWVIEW3D, 1);
+ allqueue(REDRAWOOPS, 0);
+ allqueue(REDRAWINFO, 1);
+}
+
+void outliner_toggle_selectability(struct ScrArea *sa)
+{
+ SpaceOops *soops= sa->spacedata.first;
+ TreeElement *te;
+ TreeStoreElem *tselem;
+
+ for (te= soops->tree.first; te; te= te->next) {
+ if(te->idcode==ID_OB) {
+ tselem= TREESTORE(te);
+ if (tselem->flag & TSE_SELECTED) {
+ Object *ob= (Object *)tselem->id;
+ ob->restrictflag^=OB_RESTRICT_SELECT;
+ }
+ }
+ }
+
+ BIF_undo_push("Outliner toggle selectability");
+
+ allqueue(REDRAWVIEW3D, 1);
+ allqueue(REDRAWOOPS, 0);
+ allqueue(REDRAWINFO, 1);
+}
+
+void outliner_toggle_renderability(struct ScrArea *sa)
+{
+ SpaceOops *soops= sa->spacedata.first;
+ TreeElement *te;
+ TreeStoreElem *tselem;
+
+ for (te= soops->tree.first; te; te= te->next) {
+ if(te->idcode==ID_OB) {
+ tselem= TREESTORE(te);
+ if (tselem->flag & TSE_SELECTED) {
+ Object *ob= (Object *)tselem->id;
+ ob->restrictflag^=OB_RESTRICT_RENDER;
+ }
+ }
+ }
+
+ BIF_undo_push("Outliner toggle renderability");
+
+ allqueue(REDRAWVIEW3D, 1);
+ allqueue(REDRAWOOPS, 0);
+ allqueue(REDRAWINFO, 1);
+}
+
void outliner_toggle_visible(struct ScrArea *sa)
{
SpaceOops *soops= sa->spacedata.first;
@@ -1966,9 +2035,13 @@
/* select object that's clicked on and popup context menu */
if (!(tselem->flag & TSE_SELECTED)) {
- if ( outliner_has_one_flag(soops, &soops->tree, TSE_SELECTED, 1) )
- outliner_set_flag(soops, &soops->tree, TSE_SELECTED, 0);
-
+ if (G.qual & LR_SHIFTKEY) {
+ }
+ else {
+ if ( outliner_has_one_flag(soops, &soops->tree, TSE_SELECTED, 1) )
+ outliner_set_flag(soops, &soops->tree, TSE_SELECTED, 0);
+ }
+
tselem->flag |= TSE_SELECTED;
/* redraw, same as outliner_select function */
soops->storeflag |= SO_TREESTORE_REDRAW;
@@ -1976,7 +2049,11 @@
screen_swapbuffers();
}
- outliner_operation_menu(soops->area);
+ if (G.qual & LR_SHIFTKEY) {
+ }
+ else {
+ outliner_operation_menu(soops->area);
+ }
}
return 1;
}
@@ -3256,7 +3333,6 @@
}
}
-
static void outliner_back(SpaceOops *soops)
{
int ystart;
Index: source/blender/src/space.c
===================================================================
--- source/blender/src/space.c (revision 13258)
+++ source/blender/src/space.c (working copy)
@@ -5418,6 +5418,15 @@
outliner_find_panel(sa, again, search_flags);
}
break;
+ case RKEY:
+ outliner_toggle_renderability(sa);
+ break;
+ case SKEY:
+ outliner_toggle_selectability(sa);
+ break;
+ case VKEY:
+ outliner_toggle_visibility(sa);
+ break;
case XKEY:
case DELKEY:
outliner_del(sa);
Index: source/blender/include/BIF_outliner.h
===================================================================
--- source/blender/include/BIF_outliner.h (revision 13258)
+++ source/blender/include/BIF_outliner.h (working copy)
@@ -97,6 +97,9 @@
extern void outliner_one_level(struct ScrArea *sa, int add);
extern void outliner_select(struct ScrArea *sa);
extern void outliner_toggle_selected(struct ScrArea *sa);
+extern void outliner_toggle_visibility(struct ScrArea *sa);
+extern void outliner_toggle_selectability(struct ScrArea *sa);
+extern void outliner_toggle_renderability(struct ScrArea *sa);
extern void outliner_del(struct ScrArea *sa);
extern void outliner_operation_menu(struct ScrArea *sa);
extern void outliner_page_up_down(struct ScrArea *sa, int up);
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fb/49/9d20e65ff946c6d0abbd9eed08fe
Event Timeline
Log In to Comment