Commit Graph

305 Commits

Author SHA1 Message Date
c046b13b56 rename template_color_wheel() to template_color_picker() 2012-11-09 11:03:53 +00:00
3ce1d54e95 Bugfix #33124
User Preference setting for Color Picker type only affected the popup
version. Now it uses it for all color pickers in Panels too.

Note for UI Py team: col.template_color_wheel() function follows
the userpref - might be a need for rename here? Dunno how to handle
this. Comment noted in template code.
2012-11-09 10:33:42 +00:00
cf08068e10 fix [#33121] crashing when srolling down in text editor ! 2012-11-09 03:36:38 +00:00
9b948717b0 code cleanup: float <> double conversion. 2012-11-03 18:23:30 +00:00
f213ae0b19 style cleanup 2012-11-01 09:54:00 +00:00
9fc95bd7ee use min/max inline functions where MIN2/MAX2 were doing type conversion. 2012-10-27 11:18:54 +00:00
2821f822c5 * New string property subtype: PASSWORD
When this new subtypes is used, then string of property is hidden using
asterisks, e.g.: mysecretpassword -> ****************

This code was reviewed and modified by Brecht. Thanks very much:
 - https://codereview.appspot.com/6713044/

This new subtype of string property is intended mostly for Add-on developers
writing Add-on which communicates with some server (http, sql, ftp, verse,
etc.). When this server requires user authentication and user has to type
username and password, then current API didn't allow to type 'hidden' password,
e.g. when you want to demonstrate this script, then everybody can see this
security password. Some examples of Add-on which could use this new subtype:
 - On-line database of textures
 - Integration of render farm
 - Integration of Verse

Security Notes:
 - You can copy paste hiddent string of property from text input using (Ctrl-C, Ctrl-V),
but you can do this in other GUI toolkits too (this behavior it is widely used).
 - Text of string property is stored in plain text, but it is widely used in other
GUI toolkits (Qt, Gtk, etc.).

Simple examples:
 - https://dl.dropbox.com/u/369894/draw_op_passwd.py
 - https://dl.dropbox.com/u/369894/blender-password.png
2012-10-26 12:58:54 +00:00
7cf6786f31 Bugfix #32962
Menu buttons: the text label in a button was clipped on right too soon, there's
more space. Noticable especially on popup buttons with labels like "X" or "Y".
2012-10-25 10:51:03 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
57004cfb5a style cleanup:
also add helper makefile targets:
* tbz - makes a tar.bz2 of an svn export
* test_style_qtc - outputs style checks in qtc task format.
2012-10-10 23:44:07 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +00:00
79b4c0e600 UI: buttons that open menus now align to the menu rather than looking disconnected.
Also fixed some cases where the menu was offset 1 or 2 pixels wrong, though not
quite all of them, still off by 1 pixel sometimes.

http://www.pasteall.org/pic/show.php?id=38478
2012-10-04 20:12:05 +00:00
c8bd3b7cf8 fix for using hsv uninitialized in ui_draw_but_HSVCIRCLE() 2012-10-04 09:55:10 +00:00
c872ffd94f code cleanup: make the behavior of set_current_material_texture() clearer and remove redundant NULL check there. also small changes to ui_draw_but_HSVCIRCLE(). 2012-10-04 09:43:27 +00:00
753b627cb6 avoid a sqrtf call in ui_hsvcircle_vals_from_pos() for values outside the circle. 2012-10-04 09:33:14 +00:00
de1f84783b Fix #32673: long strings were wrongly clipped when modifying
It was a regression in svn revision 50676 -- button's string width
should be calculated taking button offset into account.

However, check for button offset should check string width without
offset taken into account.
2012-09-28 11:28:23 +00:00
31f638f04f code cleanup: text clipping function ui_text_leftclip() was also used for cursor clipping which made it a bit confusing, split into 2 functions. ui_text_clip_left(), ui_text_clip_cursor(). 2012-09-17 00:57:33 +00:00
b8a67bccc0 code cleanup: add some comments and made some small speedup to text clipping in the UI 2012-09-17 00:33:07 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
a73dd3476e Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.

This introduces two configurable color spaces:

- Input color space for images and movie clips. This space is used to convert
  images/movies from color space in which file is saved to Blender's linear
  space (for float images, byte images are not internally converted, only input
  space is stored for such images and used later).

  This setting could be found in image/clip data block settings.

- Display color space which defines space in which particular display is working.

  This settings could be found in scene's Color Management panel.

When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.

This conversions are:

- View, which defines tone curve applying before display transformation.
  These are different ways to view the image on the same display device.
  For example it could be used to emulate film view on sRGB display.

- Exposure affects on image exposure before tone map is applied.

- Gamma is post-display gamma correction, could be used to match particular
  display gamma.

- RGB curves are user-defined curves which are applying before display
  transformation, could be used for different purposes.

All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.

This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).

Some technical notes:

- Image buffer's float buffer is now always in linear space, even if it was
  created from 16bit byte images.

- Space of byte buffer is stored in image buffer's rect_colorspace property.

- Profile of image buffer was removed since it's not longer meaningful.

- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
  to support other spaces, but it's quite large project which isn't so
  much important.

- Legacy Color Management option disabled is emulated by using None display.
  It could have some regressions, but there's no clear way to avoid them.

- If OpenColorIO is disabled on build time, it should make blender behaving
  in the same way as previous release with color management enabled.

More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management

--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
b4df6b2819 code cleanup: changing the INT define to an enum conflicts with INT typedef on windows, use more verbose names for button pointer types. also removed some redundant flags from buttons. 2012-09-12 00:32:33 +00:00
319831d7b8 code cleanup: use an enum for uiBut->pointype (more useful debug display of members),
and rename COL -> COLOR --- less confusing since the layout engine has row/col's.
2012-09-11 23:10:23 +00:00
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
95f7264014 code cleanup: split out defines in BKE_utildefines.h into BLO_blend_defs.h and ui defines in interface_intern.h 2012-09-03 10:12:25 +00:00
abd031bb4e code cleanup: use rect size macros for the interface 2012-08-21 19:35:06 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
26f073b327 macros for rectangle center and size 2012-08-20 15:29:02 +00:00
d36da8a8a1 style cleanup 2012-08-19 10:41:27 +00:00
7217927414 add inline functions for max/min ints, good to use when the arguments are function calls (we had a few of these). 2012-07-29 18:14:20 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
4d2a6a8e21 Spellfixes: colour -> color 2012-07-04 12:19:50 +00:00
9b8a97c039 hue color display still was shifted, turned out the resolution was a bit too low. 2012-06-21 19:45:36 +00:00
cb22a49893 color backdrop on hue balance was misleading (shifted to the right) 2012-06-21 15:42:08 +00:00
6cff0b71a7 style cleanup 2012-06-05 21:54:21 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
63788b47d6 add vector versions of hsv_to_rgb, rgb_to_hsv & rgb_to_hsv_compat 2012-05-26 11:01:01 +00:00
28002edb6b Finish changes in up/down arrows for menus
Restored single triangle for special menus, which still isn't perfect but
probably makes more sense.

Added drawflag bit flags to button, which is currently used to declare, that
button need to have up/down arrows. This is needed because it's tricky to
distinguish if button should have such arrows. For example, ID search buttons
is a simple block button which doesn't directly mean it'll have pop-up menu
and not all buttons which cases pop-up menu to display need to have such
arrows.

So currently only ID selector button is forcing up/down arrows to be displayed,
all the rest buttons now behaves in the same way as it used to be before.
2012-05-23 14:24:40 +00:00
f16f545c6e style cleanup
also fix example for mesh uv's
2012-05-22 16:24:09 +00:00
2d0c5b9017 Long old UI annoyance:
The up/down triangle icon for menus was not drawing when a menu had
an icon; even though space was reserved there. Note: this can only
work now with removing the ugly "down triangle" icon from buttons like
next to the Material list box (button pops up menu with tools).

Looks nicer this way anyway.
2012-05-22 15:50:13 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
f88cfd9168 Code and style cleanup in own modules in BKE and also mball module
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
  from public header file.

Further cleanup is coming.
2012-04-28 16:49:00 +00:00
5a860b840d Fix: #31095: Incorrect clamping of labels for multibyte languages 2012-04-28 09:21:16 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
48893dba24 style cleanup: no functional changes 2012-04-24 22:50:49 +00:00
c297374449 partial fix [#30813] Small UI glitch with high DPI value in menus
fix provided by Julien Enche (trap).

also corrected some 2.4x theme colors (selected file, outliner and image background)
2012-04-05 01:49:28 +00:00
a6ebffe182 style cleanup: interface 2012-03-30 01:51:25 +00:00
6faeac9fe2 style cleanup: add braces around checks - 'if ELEM() {...}', confuses some parsers that done expand macros. 2012-03-25 22:35:18 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00