Commit Graph

240 Commits

Author SHA1 Message Date
88676349a4 Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage

- Undo history menu back:
  - name "Undo History"
  - hotkey alt+ctrl+z (alt+apple+z for mac)
  - works like 2.4x, only for global undo, editmode and particle edit.

- Menu scroll
  - for small windows or screens, popup menus now allow to display
    all items, using internal scrolling
  - works with a timer, scrolling 10 items per second when mouse 
    is over the top or bottom arrow
  - if menu is too big to display, it now draws to top or bottom, 
    based on largest available space.
  - also works for hotkey driven pop up menus.

- User pref "DPI" follows widget/layout size
  - widgets & headers now become bigger and smaller, to match 
    'dpi' font sizes. Works well to match UI to monitor size.
  - note that icons can get fuzzy, we need better mipmaps for it
2011-06-04 17:03:46 +00:00
7138fef58a UI: fix two issues with expanded enum property buttons:
* they were too slow for dynamic python enums, calling the callback
  to list the items for each button, to get a tooltip
* enum tooltips sometimes were showing the same description twice
2011-06-02 14:18:51 +00:00
22ca037c58 uninitialized variable was used when ensuring mirrored vertex groups. 2011-06-01 23:55:49 +00:00
a8a36f31bd Button value reset:
* shortcut key changed from numpad 0 to delete.
* fix missing undo push, now it calls the operator.

Patch by Damir Prebeg, thanks!
2011-05-31 09:56:38 +00:00
9b5800bcd7 fixed "rather then" -> "rather than" typos all over the place 2011-05-28 13:11:24 +00:00
78b8e4a437 remove BLI_streq() since it was hardly used, also replace string search with BLI_findstring(). 2011-05-26 21:04:01 +00:00
08d8914b3d reverse string lookup listbase function BLI_findstring counterparts, added BLI_rfindstring, BLI_rfindstring_ptr, these search from the end of the listbase (like pythons rfind). 2011-05-02 13:35:04 +00:00
d6d2f09dd9 quiet some clang warnings & fix for bugs in exceptional cases.
- ghost C api, BLI_get_folder_version() could assign garbage values.
- pointcache ptcache_find_frames_around() had a superfluous NULL check which would have crashed anyway if actually NULL.
2011-04-23 12:57:03 +00:00
210ee1ade4 whitespace only, no functional change mixed tabs/spaces --> tabs. 2011-04-21 13:11:51 +00:00
5b920bc2ff Some strings to store ID names were too small, could cause stack corruption.
corrected these and replaced 'sizeof(((ID *)NULL)->name)-2' with 'MAX_ID_NAME-2'.
2011-04-19 06:59:49 +00:00
ea5baccbf8 fix for own mistake in recent commit: [#27000] Spotlight spot shape size, lamp object data - numerical entries are interpreted as radians though displayed in degrees in SVN 36199
now apply units after python evaluation for unit buttons.
2011-04-18 03:27:15 +00:00
0862abf68b change unit evaluation only to do try the units replacements if evaluating with python fails, in rare cases its possible a valid python expression could get units applied to it. 2011-04-17 12:47:20 +00:00
b84a6c4d7e use less verbose string formatting for units and interface. 2011-03-29 14:36:55 +00:00
ac1cb5ee05 - quiet new warnings with gcc 4.6
- use BLI math funcs for normal float/short conversion.
- correct some un-intentional float/double promotions.
2011-03-28 02:34:55 +00:00
8d7c3f8a7e interface: floats were being implicitly promoted to doubles, adjust to use floats (in most cases) otherwise cast to double. 2011-03-27 14:52:16 +00:00
a21f46b6d4 new function RNA_warning(), replaces printf with function which may be called via python.
Now this gives the line number of the scripts thats running, eg:

uiItemFullO: unknown operator 'some.operator'
/c/bin/2.56/scripts/startup/bl_ui/space_view3d_toolbar.py:73
2011-03-25 04:36:10 +00:00
b3d70cbcba RNA & interface functions for checking if RNA in a button uses valid rna property (not currently used). 2011-03-24 09:27:41 +00:00
2c13a6fab8 while looking into a problem in interface.c, noticed ui_get_but_val() is called frequently when the return value isn't used (no functional change). 2011-03-18 05:42:16 +00:00
3c184def72 use NULL instead of 0 for pointers, (editors) 2011-03-03 17:59:04 +00:00
f0f639f8b8 Typo in last commit, changing variable name for more readable code... 2011-03-01 13:56:33 +00:00
5bf1bf645c Bug fixes #26236 #26237
- Linking logic buttons had draw glitch, caused by reading
  data from free'd buttons
- Doing an undo with mouse-over Curve Widget caused crash or
  corruption.

Both related to code that tries to keep the "active" button in
memory. On each redraw of UI, buttons are re-created, which makes
it all tricky... hope we're safer now.

Also: added back undo pushes on adding links in logic editor.
2011-03-01 12:25:55 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
9d81d5f7ac Todo item:
Option menus (like Mapping options in texture) now show a tooltip on
the button itself, explaining the selected option.
2011-02-19 17:18:38 +00:00
a0b88e1c49 Fix for #26111, #26112 & #26121, "only first button click worked in windows"
* In windows the old button was tested to be equal to the new button (ui_but_equals_old()) even if their optype wasn't the same. Adding a check for optypes fixes all three reported issues.
* For some strange reason this didn't happen on other platforms.
2011-02-18 15:06:02 +00:00
beed8cfc43 Bugfix #26127
Buttons drawing of floating point values still was using 4 digits
as maxumum precision. RNA definitions for float allows 7 easily.
2011-02-18 12:53:46 +00:00
b47bfd85e8 UI Tweaks: Text field in Rename Markers popup now gets focus when the
popup appears, saving an extra click

I've separated out the "XXX"-'d event-adding-hack section from the
search-menu code into a separate API function (as recommended there).
This call is used to make sure that textboxes in popups can get
activated by default, to allow typing immediately.
2011-02-15 01:24:12 +00:00
dab76a3ccf Ctrl-0 can now be used to just reset a single component of an array to
its default value instead of resetting the entire array
2011-02-15 00:53:20 +00:00
c66ce21a86 Bug fix #26021
Very nasty UI code issue: since every button is re-defined on a
redraw, having UI redraws while using a button was not possible.

This was solved long ago by copying over data from previous button.

However, this fails when buttons have callbacks with its own (or
a parent button) pointer. 

This bug reporter found crashes in draw-overlap UI mode, this 
draws entire UI over for every menu redraws, making previous button
pointers invalid. (for triple buffer, the UI is not redrawn, only
the menus).

In general: all systems falling back to old swapbuffers would have
suffered some instability because of this.

Fix is that now the old button gets lifted out from the previous
list and inserted in the new list. Works fine, but needs some tests!

Also in this commit: TIFF endian switching not needed for 16 bits tiff.
2011-02-14 17:09:02 +00:00
59f1640ae5 warning cleanup.
- fix mistake with grease pencil UI (&& was intended but & used).
- use (void) rather then () across _all_ blenders code.
- a few minor edits, don't shadow stack variables in roll calculation & avoid running memset() for VBO vertex map.
2011-02-13 15:02:21 +00:00
4124804b4e many functions in blender are not marked static but should be.
most local modifier,GPU,ImBuf and Interface functions are now static.

also fixed an error were the fluid modifier definition and the header didnt have the same number of args.
2011-02-13 14:16:36 +00:00
867fc4b463 enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
2011-02-13 03:21:27 +00:00
0097997911 no functional changes.
- remove unneeded casts to (char*) in interface code.
- replace strcmp(.., "") with checks on the first char of the string.
2011-01-24 02:56:23 +00:00
f407f38204 Bugfix #25656
Fixed one of oldest annoyances in Blender: the text input button!
It always behaved stupid when you had clipped text in a button.

Now while using arrows the cursor will move as expected, and only
internally shift contents when cursor reaches edge of button.
2011-01-20 18:34:48 +00:00
f49d7d59dc Bugfix #25652
Report was that move-to-layer menu failed. The real cause was
more complex; had to dive deep in the dungeons of the interface
code that handled undos and operators. Found several issues:

- popup menus (like redo operator, color picker) executed again
  on a mouse-exit
- far too many buttons were sending undo pushes; even worse, in
  the operator redo-panel each button action was pushed twice
- in case operator redo-buttons have own callbacks (like layer
  buttons) the redo wasn't working
- layerbutton menu was called without creating a proper undo/redo
  case

Things should all work smoother now!

On todo:
- better definition and handling of all versions for operator menus
  (four types now, not fun)
  also: make operator "do" menu, which on first action does operator
  and then switches to redo-ing
- bring back Undo menu, to list the undo stack and jump in it.
2011-01-19 14:19:20 +00:00
8227b3d463 remove/comment unused vars
also removed unnecessary NULL checks (where the pointer was used later without checking).
2011-01-13 04:53:55 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
96b646c68d edits for BPY_extern.h functions, no functional changes
- remove unused code.
- BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec
- renamed funcs.
2011-01-05 02:08:54 +00:00
35f431b3d0 Menu UI feature common in other widget sets:
Automatically assign menu keys based on name, alternative to pressing number 0-9 on menus items.

 keys are assigned by first giving each menu item the first character of any word, if that fails any key in the name is used.

- active key is shown underlined.
- only ascii keys are assigned currently.
- can run operators, open menu items.
- currently this only works in cases where number buttons were used (UI_BLOCK_NUMSELECT), but could be enabled for file menu, splash etc by removing this check.
2010-12-14 02:38:29 +00:00
5854cfa5b8 fix for error in recent commit, wasn't masking out the non unit subtype flags. 2010-12-10 13:15:11 +00:00
b27f52ce24 bugfix [#25154] .MXF files should be included as a known video file type in the sequencer
[#25159] Vertex locations dont read correctly and are not labeled correctly in the properties bar.

- non rna buttons can now have units set.
- calls with invalid units system now raises an assert().
- include .mxf in filter.
2010-12-10 04:10:21 +00:00
1622385445 pedantic word ordering change.
- wm.add_modal_handler -> modal_handler_add
- wm.add_fileselect -> fileselect_add
- ob.add_shape_key -> shape_key_add
- VIEW3D_OT_add_background_image -> VIEW3D_OT_background_image_add (same for remove)

Also made 2 internal cmake vars hidden.
2010-12-08 11:42:11 +00:00
15d37747b3 bugfix [#25074] visible, selectable and render toggles in outliner not available
outliner added UI buttons which exceeded the range of a short, use ints for x/y button positioning.
2010-12-07 09:22:14 +00:00
2f366d1544 use BLI_strnlen rather then strlen when comparing against fixed lengths. 2010-12-05 23:50:55 +00:00
263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
1c0d7d6815 For all buttons with search-menu option, the button will show a
red-alert drawing when input doesn't exist. Will help debugging
when messing with uv-layer names, vertex groups, etc.

Also closes bugreport #24905
2010-11-29 15:25:06 +00:00
ce9ce42e38 More button alignment stuff: campbell had a script that was
drawing various cases. Fixed another one. :)
2010-11-22 18:41:08 +00:00
739b8f6a5c Bugfix #24856
Button aligning revisited. Now layer buttons draw OK too, and even 
better than before (missed a rounded corner!)
2010-11-22 18:11:40 +00:00
ca354a6a6f Bugfix #24825
Error in alignment code caused some buttons to draw not nicely
aligned, like the Frame rate buttons in Render properties.
2010-11-21 17:23:55 +00:00
3ae670fc02 fix [#24786] Setting Rotation Units to Radians doesn't affect the UI [33146] 2010-11-18 14:10:09 +00:00