Commit Graph

88 Commits

Author SHA1 Message Date
6736576f6d replace FILE_MAXDIR + FILE_MAXFILE with FILE_MAX 2011-11-26 04:07:38 +00:00
7217518179 UI:
* Add theme option to show panel header background.
* Draw panel collapse widget a bit smaller.
* Add theme option to draw icons muted.
* Code tweak: replace U.themes.first by UI_GetTheme() calls.
2011-11-19 20:57:53 +00:00
015b7b4fa9 Renaming the extensionless "blenderbuttons" to "blender_icons.png" 2011-10-28 00:09:13 +00:00
fa6e6e7fc0 pass image description to image loading functions for more useful error than 'Unknown fileformat'. 2011-10-27 04:24:34 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
e417e011d5 Code cleanup: file operations merged into single header, some function names
made less cryptic and changed to indicate if they work on files or directories.
2011-10-22 15:35:49 +00:00
04db8ad282 misc cleanup
- remove redundant casts
- replace strcmp's with "" to just check first char.
- added WM_event_print(), debug mode only to print events since the structs values are not that meaningful.
- added warnings if locale/font dirs cant be found.
2011-10-21 08:16:15 +00:00
f3ae228c9d minor changes, dont append with cmake platform flags which is a string and use enum values rather then ints in a few places. 2011-09-30 15:22:13 +00:00
3bcbefa558 minor changes to interface code (no functional changes)
- made 2 loops on menu items break out of the loop when the item is found.
- include function names in error prints.
2011-09-27 17:04:38 +00:00
3abfb2af43 fix [#28752] Brush Icons do not scale correctly with DPI 2011-09-27 16:39:41 +00:00
b7eac1edcf picky style edits with screen/view/drawing, also remove own bad example doc. 2011-08-25 15:49:52 +00:00
a157112ac5 fix for icon scaling with the DPI setting
- icons were scaling by the sqrt(dpi)/8.48528, but infact they only need to be scaled by (dpi/72).
- UI_icon_get_width value was being used without multiplying by dpi scale.
2011-08-05 10:45:32 +00:00
b727202921 compile without splash and icons when WITH_HEADLESS is set. 2011-06-05 07:55:18 +00:00
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
079caae727 code cleanup: icon creation
* changed stupid miplevel/MIPMAP naming in icon code, it was really the icon size (small icon or larger preview) that was meant there.
2011-05-16 18:37:54 +00:00
a7507e945d fix [#26803] Libs paths are case sensitive in windows
use case insensitive path comparison on windows: BLI_path_cmp
2011-04-06 06:03:48 +00:00
0298d223cc quiet various warnings, also disable -Wdouble-promotion with cmake since it gives warnings with variable length args. 2011-04-03 10:04:16 +00:00
d4a9bc1c21 while looking into adding back brush tool keys found mixed texture/image paint rna vars, using 'image paint' internally. 2011-04-01 04:22:30 +00:00
2b5f8c94d0 changes to icon loading
- look for icons in datafiles/icons (was looking in datafiles)
- was loading all images in datafiles/ on startup to check if they were the correct icon size, commented this since its unnecessary disk overhead on startup & images are checked for correctness when used anyway.
  when running blender from the source dir would load splash.png every time.

also add missing NULL pointer check if the icon couldn't be loaded and ensure no buffer overflow check on icon path creation.
2011-03-15 22:24:47 +00:00
70340503d8 fix mistake from commit rev. 33868. The variable icon was a pointer, not an integer icon id (ICON_NONE). 2011-03-13 17:20:52 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
4ed5cd6cef == UI icons ==
* Change ICON_NULL --> ICON_NONE to avoid two #defines with the same meaning.
2011-02-27 18:03:19 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
d17df68c24 - clear some warnings
- rename layout.operator_enums -> operator_enum (since we have operator_menu_enum, only called in 4 places)
2011-02-18 06:07:41 +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
6e47ffcc0d fix for uninitialized value in BLI_path_cwd() if PWD wasn't defined and the CWD was longer then 160. 2011-02-12 10:37:37 +00:00
d0f4e7767e Bugfix #25720
Preview icons got lost... commit of yesterday caused it.
Conflict between preview render icons, and brush icons...
2011-01-19 17:10:05 +00:00
a1de0fbf17 Small fix for my last fix: ignore the `preview' flag; if either size
has been marked for update then do it regardless. Otherwise changing
the texture type doesn't always update the brush texture preview.
2011-01-18 04:32:41 +00:00
c2a638a81e More fixes for bug [#25649], Image editor paint icon missing until
enter weight paint, hopefully fully fixed this time

* The texture selector for brushes wasn't updating. Seems that preview
  images have two sizes, small (icon) and big, but it was only
  updating if the icon size was set to update. Now both are checked.

* Also changed the previewimage arrays to use the already-existing
  PREVIEW_MIPMAPS define, makes it a little clearer what the arrays
  are for.
2011-01-18 04:08:01 +00:00
c94eefd52b Fixed bug [#25649] Image editor paint icon missing until enter weight
paint

A couple underlying issues:

* Paint icon was looking only at the object mode to determine what the
  "current" mode is, but that gave problems when the object mode was
  anything other than texpaint, but 2D image paint was turned on. Fix
  was to also look at what space is being drawn, and only if it's in
  the 3D view does it look at the ob mode.

* The brushes lists weren't getting filtered correctly in the same
  case where 2D image paint was on but a different object mode is
  enabled. Fixed by changing the brush rna poll to look at the paint
  source, rather than the object mode.
2011-01-16 18:33:08 +00:00
00b8c9e7ea rename BKE_assert() --> BLI_assert(). 2011-01-09 15:12:08 +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
adf961a46c fix [#25520] crash when closing the properties panel in uv/image editor
don't draw the image if the size is 0.

Crash was actually an assert() so debug builds only, replace assert() with BKE_assert() so crash is opt in build option.
2011-01-07 04:10:37 +00:00
86b89af5dd use ICON_NULL define rather then 0, makes UI calls less confusing. (no functional change)
eg: uiItemR(row, &dvar_ptr, "type", 0, "", 0); -> uiItemR(row, &dvar_ptr, "type", 0, "", ICON_NULL);
2010-12-23 02:43:40 +00:00
17bd906de3 Fixed bug #23826, Other kind of brushes appear in sculpt mode
Was another problem caused by each brush being allowed in more than
one paint mode.

Added a new field to the brush struct to indicate what mode the icon
was last set for; if it's changed then reset it. Not sure if it's
really worth it to cache this, could remove it for simplicity.
2010-12-14 01:19:51 +00:00
2f366d1544 use BLI_strnlen rather then strlen when comparing against fixed lengths. 2010-12-05 23:50:55 +00:00
cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
5a09368957 use 'const char *' for imbuf and file ops. 2010-11-19 02:14:18 +00:00
433f871f0f bugfix [#24302] Ctrl+Click Extrude gets old mouse events
double click didnt check mouse distance moved so you could click twice in different areas of the screen very fast and generate a double click event which had old mouse coords copied into it but was sent to an operator set to run on single click (because the double click wasnt handled).

Also added MEM_name_ptr function (included in debug mode only), prints the name of allocated memory.
used for debugging where events came from.
2010-10-18 00:25:32 +00:00
856389eac7 re-arrange icon_draw_rect, also use an assert() for odd icon sizes. this can happen in some cases but hard to find when. 2010-10-17 09:01:12 +00:00
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
03e6bb7ede patch for bug [#24253] r32218 breaks outliner icon drawing
provided by Shane Ambler (sambler) with some changes.
2010-10-16 05:12:31 +00:00
1807beabf5 - UNUSED macro wasn't throwing an error with GCC if a var become used.
- made interface, windowmanager, readfile build without unused warnings.
- re-arranged CMake's source/blender build order so less changed libs are build later, eg: IK, avi
2010-10-16 02:40:31 +00:00
8a4fe62843 misc fixes found with clang's static checker. 2010-10-07 10:04:07 +00:00
96977c6ffe Fix #24067: sculpt brush/texture preview would disappear when overlapping
with the region boundary. Use glaDrawPixelsSafe like e.g. the image editor
to prevent this.
2010-09-30 18:35:54 +00:00
4e4b797165 Fix #23431: crash in brush icon preview when there is no active object. 2010-08-22 10:17:31 +00:00
d1759639dc - remove unused includes IMB_*, BIF_* & MEM_*
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-16 05:46:10 +00:00
8c455e1da8 remove unused includes 2010-08-08 08:33:47 +00:00
ec19c7dffc == Sculpt ==
Fixed brush icons loading slowly

* Changed brush icon property from an enum to a flag that toggles whether a custom file is used for the brush icon
* Changed get_brush_icon to only handle loading external icons, built-ins are handled through the regular icon system
* Modified preview icon drawing to allow built-in icons
* When not using a custom icon, a default icon is selected based on the current tool

TODO:
* Allowing preview to show built-in icons makes the brush texture selector look ugly when nothing is selected. As discussed on IRC though, the nothing-selected state needs to be clarified anyway; I'll address this in another commit
* Use image browser when selecting a custom icon
* Selecting the default icon is ugly (uses the active object's mode), this can be fixed by making brushes know which paint mode they are part of
2010-07-26 04:00:09 +00:00
cc061d075f == Sculpt ==
More icon work

* Added icon defines for all the brushes
* Load all the brush icons after loading regular Blender icons
* Added the brush icons to their respective tool enums in RNA
* Fixed a couple unused-variable warnings
2010-07-25 22:23:40 +00:00