* patch #3876: Rotating view icon

submitted by Davide Vercelli

This replaces (as a user preference) the static icon shown in the bottom-left of the 3D View with a small rotating axis that updates live in all ortho/perspective modes

I made several modifications to the original patch. In the patch, it displayed the axis on top of the 'object info' text since when floating panels are minimised, they sit in the bottom corner and cover the axis up. This annoyance is not limited to the axis, it also covers the frame number and info text, which can be frustrating. Sending them to the bottom is not that useful either, since it's quicker (with esc) and just as much movement to close and re-open them again.

I decided to solve this problem at the cause: Now when using the disclosure triangle on floating panels, they 'minimise in place' rather than going to the bottom.

User preferences are in the 'View & controls' section to:
- Display either the 3D axis or the old icon
- The size of the axis
- the brightness of the axis (colours are taken from grid theme settings)

* patch #3801: Option to show view direction in 3D View
submitted by Daniele Fornaciari

Simple one, just adds an user pref to show the name of the view's direction as text in the top left corner.
This commit is contained in:
2006-04-25 12:26:46 +00:00
parent 5c02b01395
commit 2bbfd3a801
7 changed files with 184 additions and 28 deletions

View File

@@ -2553,7 +2553,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
xpos,y6label,spref,buth,
0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, USER_TOOLTIPS, 0, "ToolTips",
uiDefButBitI(block, TOG, USER_TOOLTIPS, 0, "Tool Tips",
(xpos+edgsp),y5,spref,buth,
&(U.flag), 0, 0, 0, 0,
"Display tooltips (help tags) over buttons");
@@ -2573,10 +2573,10 @@ void drawinfospace(ScrArea *sa, void *spacedata)
#else
U.curssize=0; /*Small Cursor always for OS X for now */
#endif
uiDefButBitI(block, TOG, USER_PLAINMENUS, B_PLAINMENUS, "Plain menus",
uiDefButBitI(block, TOG, USER_SHOW_VIEWPORTNAME, B_DRAWINFO, "View Name",
(xpos+edgsp),y1,spref,buth,
&(U.uiflag), 0, 0, 0, 0,
"Use column layout for toolbox and do not flip contents in any menu");
"Show the name of the view's direction in each 3D View");
uiBlockEndAlign(block);
uiDefBut(block, LABEL,0,"Menus:",
@@ -2615,11 +2615,11 @@ void drawinfospace(ScrArea *sa, void *spacedata)
(xpos+edgsp+spref+midsp),y1,(mpref/2),buth,
&(U.uiflag), 0, 0, 0, 0,
"Make floating panels invoked by a hotkey (eg. N Key) open at the previous location");
uiDefButBitI(block, TOG, USER_LOCKAROUND, B_DRAWINFO, "Global Pivot",
(xpos+edgsp+spref+midsp+(mpref/2)),y1,(mpref/2),buth,
uiDefButBitI(block, TOG, USER_PLAINMENUS, B_PLAINMENUS, "Plain Menus",
(xpos+edgsp+(2*spref)+(2*midsp)),y1,spref,buth,
&(U.uiflag), 0, 0, 0, 0,
"Lock the same rotation/scaling pivot in all 3D Views");
"Use a column layout for toolbox and do not flip the contents of any menu");
uiBlockEndAlign(block);
uiDefBut(block, LABEL,0,"Snap to grid:",
(xpos+(2*edgsp)+spref+midsp+mpref),y6label,mpref,buth,
@@ -2639,6 +2639,11 @@ void drawinfospace(ScrArea *sa, void *spacedata)
"Snap objects and sub-objects to grid units when scaling");
uiBlockEndAlign(block);
uiDefButBitI(block, TOG, USER_LOCKAROUND, B_DRAWINFO, "Global Pivot",
(xpos+edgsp+mpref+spref+(2*midsp)),y1,spref,buth,
&(U.uiflag), 0, 0, 0, 0,
"Lock the same rotation/scaling pivot in all 3D Views");
uiDefBut(block, LABEL,0,"View zoom:",
(xpos+(2*edgsp)+mpref+(2*spref)+(2*midsp)),y6label,mpref,buth,
0, 0, 0, 0, 0, "");
@@ -2682,6 +2687,23 @@ void drawinfospace(ScrArea *sa, void *spacedata)
&(U.uiflag), 0, 0, 0, 0,
"Keep the active object in place when orbiting the views (Object Mode)");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, USER_SHOW_ROTVIEWICON, B_DRAWINFO, "Mini Axis",
(xpos+edgsp+(2*mpref)+(2*midsp)),y1,(mpref/3),buth,
&(U.uiflag), 0, 0, 0, 0,
"Show a small rotating 3D axis in the bottom left corner of the 3D View");
uiDefButS(block, NUM, B_DRAWINFO, "Size:",
(xpos+edgsp+(2*mpref)+(2*midsp)+(mpref/3)),y1,(mpref/3),buth,
&U.rvisize, 10, 64, 0, 0,
"The axis icon's size");
uiDefButS(block, NUM, B_DRAWINFO, "Bright:",
(xpos+edgsp+(2*mpref)+(2*midsp)+2*(mpref/3)),y1,(mpref/3),buth,
&U.rvibright, 0, 10, 0, 0,
"The brightness of the icon");
uiBlockEndAlign(block);
uiDefBut(block, LABEL,0,"Select with:",
(xpos+(2*edgsp)+(3*mpref)+(3*midsp)),y6label,mpref,buth,
@@ -2762,15 +2784,10 @@ void drawinfospace(ScrArea *sa, void *spacedata)
&(U.tw_hotspot), 4, 40, 0, 0, "Hotspot in pixels for clicking widget handles");
uiBlockEndAlign(block);
uiDefBut(block, LABEL,0,"Object center diameter",
(xpos+(2*edgsp)+(5*mpref)+(5*midsp)),y3label,mpref,buth,
0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButS(block, NUM, B_REDRCURW3D, "Size",
(xpos+(2*edgsp)+(5*mpref)+(5*midsp)),y2,mpref,buth,
uiDefButS(block, NUM, B_REDRCURW3D, "Object Center Size: ",
(xpos+edgsp+(5*mpref)+(6*midsp)),y3,mpref,buth,
&(U.obcenter_dia), 4, 10, 0, 0,
"Diameter in Pixels for Object/Lamp center drawing");
"Diameter in Pixels for Object/Lamp center display");
} else if (U.userpref == 1) { /* edit methods */
@@ -2793,11 +2810,11 @@ void drawinfospace(ScrArea *sa, void *spacedata)
(xpos+(2*edgsp)+mpref),y3label, mpref,buth,
0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButS(block, NUMSLI, B_DRAWINFO, "Steps:",
uiDefButS(block, NUMSLI, B_DRAWINFO, "Steps: ",
(xpos+edgsp+mpref+midsp),y2,mpref,buth,
&(U.undosteps), 0, 64, 0, 0, "Number of undo steps available (smaller values conserve memory)");
uiDefButBitI(block, TOG, USER_GLOBALUNDO, B_DRAWINFO, "Global undo",
uiDefButBitI(block, TOG, USER_GLOBALUNDO, B_DRAWINFO, "Global Undo",
(xpos+edgsp+mpref+midsp),y1,mpref,buth,
&(U.uiflag), 2, 64, 0, 0, "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory");
uiBlockEndAlign(block);