Commit Graph

223 Commits

Author SHA1 Message Date
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
30bd26d435 [#24028] Minor fixes to BLI_math_vector
+ minor warning fixes.
2010-09-28 11:48:13 +00:00
Nathan Letwory
b2c42b8ad1 Fix [#24038] keyboard navigation not working in second level menus
Reported by David Sullivan

Commit #32066 applying patch [#23675] broke keyboard and mouse wheel navigation in menu in deeper levels.
2010-09-28 01:20:36 +00:00
58082beda9 Fix #23847: keyframe insert on button not working in popup menus, e.g.
the vector popup for node inputs.
2010-09-25 14:32:26 +00:00
725c8dde92 patch [#23675] fix #22787 with workaround
from Shane Ambler (sambler)
2010-09-22 17:13:23 +00:00
36c273b1f7 - bone roll now in degrees not radians.
- rna buttons with units set now use the units base value for snapping. 
- bone head/tail radius could be set negative.

matt: removed a check in ui_is_but_unit() which made angle buttons return false, what was this for?
2010-09-16 04:19:22 +00:00
7d8f0fce7a patch [#23758] Better handling of UTF chars in UNITS fields (lengths, angles, etc.)
from Lorenzo Tozzi (oni_niubbo) with minor edits.

--- from the tracker
The present situation is this: due to bug#22274, during editing, UTF chars are stripped from buttons with a unit associated
(length, angles, etc.).
Example: if the button displays '90°' and you click on it with LMB, the editing string will become '90'.

The problem arises if you use microns: '34µm' becomes '34' that blender interprets as 34 meters. So clicking on a button
and hitting enter won't confirm the previous value, but will change it (very badly also).

Of course nobody is using microns in blender, but the problem will arise when we will implement areas and option 'Separate
Units' will be enabled. The value '2m² 3cm²' will become '2m' during editing.

This patch solves the problem rewriting the string in a smarter way than just stripping the UTF chars: the unit is translated
from unit->name_short ('µm') to unit->name_alt ('um'). So clicking on '34µm' the editing string will become
'34um'.
--- end

note: rather then allowing empty strings in name_alt field I made it so if the unit system was the default one a NULL name_alt will just strip the string, since its the default its not needed.
2010-09-15 17:37:00 +00:00
f28b5e672e python/utf8 compatibility fixes. (as discussed on the mailing list)
- user input gets non utf8 chars stripped all text input other then file paths.

- python has the same limitations, it will raise an error on non utf8 strings except for paths use unicode escape literals so its possible to deal with saving to these file paths from python.

- new string functions
  BLI_utf8_invalid_byte(str, len) returns the first invalid utf8 byte or -1 on on success.
  BLI_utf8_invalid_strip(str, len) strips non utf-8 chars.
2010-08-28 12:34:22 +00:00
85dcd4c636 Fix #23433: crash with undo where a UI button was still active and accessing
data that was freed.
2010-08-25 09:33:48 +00:00
e2826f379d Small UI Tweak: Added NumPad-0 as additional hotkey for Reset to Default Values. Previously, only ZeroKey (i.e. 0 on top row) was used, which was not very convenient to hit) 2010-08-12 09:50:04 +00:00
8c455e1da8 remove unused includes 2010-08-08 08:33:47 +00:00
9a9e04edfb patch [#23060] ColorRamp python access functions
from Dan Eicher (dna)
 elem = color_ramp.elements.new(position=0.3)
 color_ramp.elements.remove(elem)

- Modified the patch to make generic functions for adding and removing (inline code was in 3 different places)
2010-07-30 00:20:05 +00:00
160b1d815d [#22274] Special chars = 2 characters
workaround, just remove utf from number strings until we have proper UTF editing.
2010-07-27 01:20:24 +00:00
780f4c1c78 Fixed an annoying problem where sometimes tooltips would get left
hanging on screen, making you have to mouse over them to clear them.

I hope this was the only issue causing this, if anyone sees hanging tooltips 
after this commit, please report it!
2010-07-24 02:49:58 +00:00
3d22402720 Fix #22940: material rename crash, delete selection in a text button
was not working correct.
2010-07-22 12:51:04 +00:00
577cd54c8e use normal mouse speed for the color wheel unless shift is pressed. 2010-07-06 16:40:56 +00:00
deb7402299 option for color wheel widget to make it easier to select values closer to white, enable for color balance. 2010-07-05 15:52:25 +00:00
d9e9aa1e4d changes to color wheel commit.
- use a flag rather then a2 for locking color.
- remove float from button added for color wheel size, use a2 instead.
- holding shift on the color wheel gives higher precission.
2010-07-05 07:08:10 +00:00
83a2a4e5b8 Improvements to Blenders color balance (lift/gamma/gain).
Fairly closely match some mac application colin has called 'Looks', to give better results.
- lift is now applied non linear (was being added to the color)
- change the color wheel to preserve the luminance of the gamma and gain values, this stops the color from being set too dark (option for the color wheel template).
- sub-pixel precission for the color wheel since the white area at the center can make a lot of difference with a very small change.

This change will make existing node and sequencer setups lift render slighly differently however discussed this with Ton and he's ok with it.
2010-07-04 20:59:10 +00:00
f48556f236 Fix [#22355] Spin Tool crashes Blender on Click'n'Drag Steps
Spin tool steps property had no softmin/softmax (set to INT_MAX), and without continuous grab on, the number field dragging code would jump up to ridiculously high numbers.

Added a reasonable soft max for spin, and also added some protection to the button dragging code to prevent the drag increments from getting too high.

Probably need to doublecheck other op property softmaxes as well.
2010-06-29 12:33:25 +00:00
6d08cdcf5d Fix [#22473] No more text cursor placing when editing a Text Field ? 2010-06-01 23:06:14 +00:00
Dalai Felinto
c6bec43330 reverting previous commit from Mitchell. His commit went to the trunk instead of the branch :)
svn merge -r 29067:29066 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2010-05-29 21:31:57 +00:00
9d3157eed0 Reversing the last merge because I botched it. 2010-05-29 21:22:24 +00:00
Dalai Felinto
8a59a45342 Esc as input for Key Buttons (e.g Logic Brick Keyboard Sensor)
After talking with Brecht he agreed on allowing Esc to be used as input for key input butons.
In order to let the user to cancel an input it can cancel it clicking outside the button.

Also replacing manual check by ui_mouse_inside_button in ui_text function
(patch reviewed (and helped) by Matt (but the change on ISHOTKEY, that's on my own risk ;))
2010-05-29 01:42:42 +00:00
6e92ddf8b3 Progress indicators for threaded jobs
Now, rather than the bit-too-alarming stop sign, threaded wmJobs 
display a progress indicator in the header. This is an optional feature
for each job type and still uses the same hardcoded ui template
(could use further work here...).

Currently implemented for:
Render - parts completed, then nodes comped
Compositor - nodes comped
Fluid Sim - frames simulated
Texture Bake - faces baked

Example: http://mke3.net/blender/devel/2.5/progress.mov
2010-05-27 08:22:16 +00:00
95366b3fbb FIX: Enter didn't work in filebrowser when mouse inside icon or preview
Note: This is yet another problem that results from the fact that the icon/preview in file browser is now a button rather than just drawn as an image. (Similar to LEFMOUSE not working in filebrowser). This should be checked on as the fix might cause issues in the future when using image drag buttons in other parts of Blender.
2010-05-15 11:52:59 +00:00
b008f04450 Rewrite of Logic editor UI to use layout engine
This commit puts the ground work in place, swapping out the crusty old Logic Editor
UI code for the new RNA-based layout engine. It's disabled with ifdefs at the moment
because it's incomplete, but Dalai can now do the grunt work to fill it all out and get it running.

Also includes a bug fix to LINK buttons, and two new logic operators to add and delete sensors.

Dalai, just switch the #if 0 and #if 1 in logic_window.c:3412 and 3469
2010-04-29 07:01:48 +00:00
cbe55dc66b Text button with search icon now updates "live", like in outliner. 2010-04-27 09:07:26 +00:00
ace1c998c4 warning cleanup, also made voxel.c and volumetric.c use BM_INLINE define rather then having their own ifdefs in each file. 2010-04-24 10:08:07 +00:00
8f286a80d0 Fix [#21582] Adjusting material color (color picker) crashes
Thanks to the testers for helping diagnose this!
2010-04-23 01:41:01 +00:00
a56b72fd82 BugFix:
[#20854] PROPERTIES STAMP: Rendering stamp flickers in output renders

Blenfont was not thread safe, that is why one thread can change
the font properties (size, dpi, color, etc) at the same time
that the stamp draw on the image, and then the problem.

To make blenfont thread safe I have to change two important things:

1) Every BLF_* function take one argument, the font id.
2) We have two new function to make font "thread safe":
	BLF_load_unique
	BLF_load_mem_unique

This two function are for case like stamp, that need and own font
that don't share the glyph cache, so can draw without problem
in a different thread.

Why the BLF_*_unique function ?

Because blenfont keep only one copy of a font and keep a list of
"glyph cache". Every glyph cache have size and dpi, so if two
different thread access the same font at the same time, they can
change value and finish with something like the stamp problem.

Why don't remove the glyph cache ?

Because if we do that, we finish with a font object for every size
and dpi, and the stamp is really a special case that happen in
the rendering process, so I really thing is better keep the
glyph cache and make this two new function to handle this
special case.

(When I say "font object" I mean have the same freetype font multiple
times just to have differents size and dpi)

As Matt point we still can have one case that two thread access
the BLF_*_unique function at the same time, but I am looking to
fix this with some class of thread lock.

For now I test and work fine, so if some one found problem, please
let me know.

Campbell I have to change the python api (python/generic/blf_api.c)
to the new syntax, so maybe you can take a look at this.
2010-04-22 10:56:45 +00:00
da70064211 copying values from int buttons were adding floating point 0.00000's 2010-04-21 21:43:29 +00:00
59b661a290 Bugfix: text buttons in zoomed in or out views, didn't get the cursor on the
right location for mouseclicks.
2010-04-18 17:05:55 +00:00
7814d42ec7 Button panels need to get handlers and keymaps... but for now sneaked
in a handy key : Akey in buttons window on a panel will
open or close it.
2010-04-12 17:45:51 +00:00
bfe248b3d6 Patch [#21750] Add luma waveform and vectorscope to image view
by Xavier Thomas

This adds the waveform monitor and vectorscope to the image editor 'scopes' 
region, bringing it inline (plus a bit more) with sequence editor functionality,
and a big step closer to the end goal of unifying the display code for image/
comp/sequence editor. It's non-intrusive, using the same code paths as 
the histogram.

There's still room for more tweaks - I modified the original patch, changing 
the openGL immediate mode drawing of the waveform display to vertex arrays for 
speed optimisation. Xavier can look at doing this for the vectorscope now too.

Thanks very much Xavier!
2010-04-06 02:05:54 +00:00
5de041c51f Histogram and line sample can now be resized vertically 2010-04-04 02:37:22 +00:00
5d155868fb Fix [#21694] text input box last character not editable
Font kerning needs to be set in order to get accurate results out of BLF_width(). 
Would be nice if this was more automatic, I've added it to a few other places that 
seem like they need this though it's a little unclear due to the globals etc. Also 
some other minor tweaks when editing text fields.
2010-04-02 11:15:37 +00:00
8f5438dcd4 Fix [#21775] Double-clicking icons in the file browser doesn't open files
Complicated issue, but this should be correct, and testing goes fine. fingers crossed.
2010-04-01 01:27:22 +00:00
7af91f6663 Only add drivers (and keying sets, keyframes etc) when exact key combo is
pressed. This prevent adding drivers to properties when mouse is over a node, 
trying to duplicate it with Shift D.
2010-03-31 07:03:13 +00:00
1902de715f Attempted fixes for color picker trouble (can't reproduce here..) 2010-03-30 12:43:39 +00:00
f46cccedf6 rna/py-api fix.
C functions and python used different argument order, this relied on mapping non-keyword arguments to 'REQUIRED' arguments but meant that you could not have an optional, non-keyword argument.

next commit will make order of arguments consistant (currently only changed order that rna wrapped).
(commit 27674 and 27683 by Campbell from render25 branch)
2010-03-23 15:31:12 +00:00
cb6d2685bd rna/py-api fix.
C functions and python used different argument order, this relied on mapping non-keyword arguments to 'REQUIRED' arguments but meant that you could not have an optional, non-keyword argument.

next commit will make order of arguments consistant (currently only changed order that rna wrapped).
(commit 27674 by Campbell from render25 branch)
2010-03-23 15:25:33 +00:00
f743b583bf more lint includes
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing:  UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
2010-03-23 14:09:09 +00:00