Page MenuHome

outliner.patch

outliner.patch

Index: source/blender/src/outliner.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/outliner.c,v
retrieving revision 1.95
diff -u -r1.95 outliner.c
--- source/blender/src/outliner.c 31 Dec 2006 07:26:23 -0000 1.95
+++ source/blender/src/outliner.c 2 Jan 2007 21:56:16 -0000
@@ -1291,6 +1291,50 @@
if(base->object==ob) break;
if(base) {
if(G.qual & LR_SHIFTKEY) {
+ TreeElement *tempte=0;
+ ListBase *lb = &soops->tree;
+ Object *newob=0;
+ int first = 0;
+
+ /* only go into big select mode when two different objects are selected */
+ if(!(base->flag & SELECT))
+ {
+ /* select the second object */
+ base->flag |= SELECT;
+ base->object->flag= base->flag;
+
+ /* now select all objects between the two selected objects */
+ for(tempte= te->parent->subtree.first; tempte; tempte= tempte->next) {
+ tselem= TREESTORE(tempte);
+
+ /* if id is not object, we search back */
+ if((tempte->idcode)==ID_OB) newob= (Object *)tselem->id;
+ else {
+ continue;
+ }
+
+ if(newob==NULL) continue;
+
+ /* find associated base in current scene */
+ for(base= sce->base.first; base; base= base->next)
+ if(base->object==newob) break;
+
+ if(base->flag & SELECT)
+ first++;
+
+ if(first==2)
+ break;
+
+ if(first>0)
+ {
+ base->flag |= SELECT;
+ base->object->flag |= SELECT;
+ }
+
+ }
+ }
+ }
+ else if (G.qual & LR_CTRLKEY) {
/* swap select */
if(base->flag & SELECT) base->flag &= ~SELECT;
else base->flag |= SELECT;
@@ -1889,18 +1933,7 @@
else if(mval[0]>te->xs && mval[0]<te->xend) {
/* activate a name button? */
- if(event==LEFTMOUSE) {
-
- if (G.qual & LR_CTRLKEY) {
- if(ELEM8(tselem->type, TSE_NLA, TSE_DEFGROUP_BASE, TSE_CONSTRAINT_BASE, TSE_MODIFIER_BASE, TSE_SCRIPT_BASE, TSE_POSE_BASE, TSE_R_LAYER_BASE, TSE_R_PASS))
- error("Cannot edit builtin name");
- else if(tselem->id->lib)
- error("Cannot edit Library Data");
- else {
- tselem->flag |= TSE_TEXTBUT;
- }
- }
-
+ if(event==LEFTMOUSE) {
/* always makes active object */
tree_element_active_object(soops, te);
@@ -2511,6 +2544,19 @@
}
}
+static void object_rename_cb(TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+{
+ if(ELEM8(tselem->type, TSE_NLA, TSE_DEFGROUP_BASE, TSE_CONSTRAINT_BASE, TSE_MODIFIER_BASE, TSE_SCRIPT_BASE, TSE_POSE_BASE, TSE_R_LAYER_BASE, TSE_R_PASS))
+ error("Cannot edit builtin name");
+ else if(tselem->id->lib)
+ error("Cannot edit Library Data");
+ else {
+ tselem->flag |= TSE_TEXTBUT;
+ }
+
+}
+
+
static void outliner_do_object_operation(SpaceOops *soops, ListBase *lb,
void (*operation_cb)(TreeElement *, TreeStoreElem *, TreeStoreElem *))
{
@@ -2637,7 +2683,7 @@
//else pupmenu("Scene Operations%t|Delete");
}
else if(objectlevel) {
- short event= pupmenu("Select%x1|Deselect%x2|Delete%x4|Make Local%x5");
+ short event= pupmenu("Select%x1|Deselect%x2|Delete%x4|Make Local%x5|Rename%x6");
if(event>0) {
char *str="";
@@ -2660,6 +2706,10 @@
else if(event==5) {
outliner_do_object_operation(soops, &soops->tree, id_local_cb);
str= "Localized Objects";
+ }
+ else if(event==6) {
+ outliner_do_object_operation(soops, &soops->tree, object_rename_cb);
+ str= "Rename Objects";
}
countall();

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
65/b1/fc0165e3029c2fd940f6c139ed26

Event Timeline