Commit Graph

465 Commits

Author SHA1 Message Date
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
4ed5cd6cef == UI icons ==
* Change ICON_NULL --> ICON_NONE to avoid two #defines with the same meaning.
2011-02-27 18:03:19 +00:00
7cc0cd7814 Bugfix, own collection.
Curve widget editing used bad pointer, unsure in which cases it
would crash though...
2011-02-27 17:23:00 +00:00
2e5eb41522 pedantic warning cleanup, also remove texspace_edit() since its been added using a different method. 2011-02-27 08:31:10 +00:00
38bd8dcf05 Bugfix #26221
Two bugs in one:

- Lukas commit monday for new group/socket handling accidentally removed
  to set socketype in stacks, which as used by (texture) nodes to detect
  whether value, color or vector had to be read.
  Result was that all texture nodes were rendering as B&W

- Old 2.5 bug: preview renders for texture nodes didn't call a 
  NodeEndExec function, which gave crashes on deleting nodes.

The change in interface_hanlers.c is only a comment to explain
how keymaps are being found.
2011-02-26 13:53:15 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +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
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
8e7a61b1c4 Bugfix #26021
On certain buttons, and only when not in triple buffer, pressing
RMB "Add shortcut" crashed Blender. NULL check missing.
2011-02-11 18:29:52 +00:00
02458c0d4b Bugfix #25840
UI bug: when a button has an open menu, the menu closed on any 
mouse-over of other buttons in this panel. That's not too bad,
but it didn't check for whether the mouse was already inside the
menu itself (respecting safety region).

The bug showed error on zoomed in UI, using FPS presets, in case
the menu-button was drawing aligned with other buttons. A real
boundary case... :)
2011-01-30 13:51:02 +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
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
63018144ba remove redundant assignments & unused vars.
also minor functional changes
- OBJECT_OT_make_links_data() type property is now assigned to the operator property (so popup menu can find it)
- removing BG image now returns cancelled if no image is removed.
2011-01-12 03:41:12 +00:00
1b9c56c423 bugfix [#25577] Ctrl-Z after adding Color Ramp key resets ramp.
buttons would not add an undo event if the button had no tooltip/draw-string.

 add a fallback string 'Unknown Action' so undo's are predictable.
2011-01-11 03:22:37 +00:00
70a828d5a5 remove unused vars, comment some which look like they could be useful still. have makesrna.c omit unused _data definitions for rna funcs with no args. 2011-01-09 01:17:56 +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
be5f30416b Todo item
Drag/drop now has a User preset for dragging threshold.
Noticed this was set to 3 pixels even, made it 5 as default.
Tablet owners can put it larger too :)

Note: the tweak-threshold (3d win) is 10 pixels now, I think
this needs another preset too, leave this for now.

Also: fixed crash in filewindow: drag .blend icon and drop it.
You can't test anything in Blender or you get a bug :)
2011-01-03 17:00:49 +00:00
72e8a0c552 check modifier keys are not pressed when using keys as accelerators, it meant you couldn't copy the operator from a menu with Ctrl+C because C would be used to activate an item. 2011-01-03 13:13:54 +00:00
a7ceeafd71 - correct typos in comments.
- move boxpack struct out of the public header.
2011-01-02 11:06:50 +00:00
2ff790d0bd Removing the not-working test "Submit description" from RMB
menu on buttons.
2010-12-27 11:05:01 +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
6cdc631d98 Todo item: (Luca report in IRC)
Pulldown and other popup menus: this button type exits on release.
While holding mouse you then can move around, but the highlight of button
didn't disappear if you were outside item. The menu then doesn't close
when you release the mouse.
Now highlight goes on/off on mouse moves to show this better.

Implementation note: menu items are coded similar to regular activate
buttons (like for tools). There's no provision to make highlights go
to the next item while holding mouse in menus. That I rather not mess
with now.
2010-12-19 14:39:36 +00:00
97b0e17577 Bugfix #25243
Pressing Enter twice on enum-menus or pulldowns sent an 'OK execute'
with illegal values (no menu item active). Caused crashes too.
2010-12-15 19:10:42 +00:00
29d2e53463 Bugfix, own collection
Using RMB on menus to change hotkeys was broken.
- the input button was on a weird place outside menu, assign
  would close pulldown, so you had to reopen to check
- ESC didn't close the button, but assigned ESC as hotkey.
  This key is a protected key, and always should be escaping.
- Worst bug: if you used this on a 'user keymap' it removed
  all entries from the map...
2010-12-15 18:09:25 +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
7a581f95d0 check if a path can be created to a property before showing keyframe items in menus since they only give an error when accessed. 2010-12-13 11:39: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
4640833747 Two nice usability fixes:
- On inserting keyframes in buttons, no redraw happened
- Keyframe in icon-only buttons now draw color in background.
2010-12-09 18:08:58 +00:00
2f366d1544 use BLI_strnlen rather then strlen when comparing against fixed lengths. 2010-12-05 23:50:55 +00:00
c98f5b2e4b Bug fix #25042
Emulate numpad option: failed to use zero key to reset color picker.
2010-12-05 12:14:02 +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
6c7403b8bd bugfix [#24944] Crash on attempting to keyframe HSV color
prevent eternal loop
2010-11-27 18:30:56 +00:00
01117ca27b Bugfix #24823
Color picker: RMB "insert single value" was inserting all three values.
Same case as yesterday, made code recurse into open menu to check for
active button there.
2010-11-22 18:51:40 +00:00
722376ed7b Bugfix #24824
Color Picker: when inserting keys (right mouse menu), the colors didn't
change for buttons to indicate such. The function that sets the flags
returned too early.
2010-11-21 13:01:22 +00:00
51dcbdde03 use 'const char *' by default with RNA functions except when the value is flagged as PROP_THICK_WRAP.
Also use const char in many other parts of blenders code.

Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
2010-11-17 09:45:45 +00:00
7f96852176 fix for creating movie paths with non utf8 names.
button test if non utf8 chars are allowed was inverted.
2010-11-16 08:53:55 +00:00
fe18f517a1 bugfix [#24635] "Add Shortcut" 2010-11-10 11:19:52 +00:00
022e72e148 bugfix [#24432] HS+V color picker 2010-10-28 12:01:02 +00:00
e205a9a142 for the color picker functions use UI_GRAD_* constants rather then numbers, no functional change. 2010-10-28 11:49:56 +00:00
53c1d1a18a patch [#24320] Fix for [#24311] Copy and Paste
from Alexander Kuznetsov (alexk)

   This check was dubious to begin with, if it causes more problems it should be removed.
2010-10-19 08:35:30 +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
2a7f585fba bugfix [#23070] some shortcuts cannot be saved in a usual way 2010-10-14 13:18:42 +00:00
f8e7ad91e9 fix unused args warnings and remove some unused args. 2010-10-14 13:17:34 +00:00
843d8859a7 bugfix [#23355] Square Color picker moving by itself and locking up 2010-10-13 13:53:49 +00:00
7c538107ea bugfix [#24030] Grease Pencil + Driver keys 2010-10-13 03:17:58 +00:00
159cf6e5dd bugfix [#24214] F6 "last operator" panel repeatable segmentation fault 2010-10-10 23:37:25 +00:00
942d5dd804 bugfix [#24158] Object text fields immediately search based on existing content
also remove some unused struct members from uiBlock/uiBut.
2010-10-07 00:14:21 +00:00
cca8fce807 Bugfix #23031: adding a driver ontop of keyframe makes driver undeletable
Now drivers cannot be added to properties that have been animated (and visa versa). Previously, the check was only checking if there was a keyframe, not whether the property was animated.
2010-09-30 10:39:05 +00:00