Commit Graph

200 Commits

Author SHA1 Message Date
1d9e69f146 Fix T41617: Color ramp crashes user preferences
Color ramps with no handles caused issues.
2014-08-29 16:56:19 +10:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
9327538f0a UI: increase contrast for active colorband handle 2014-06-27 23:17:39 +10:00
1b76c638ad Code cleanup: remove MAT3/4_UNITY defines, just call unit_m3/4 2014-06-26 16:09:59 +10:00
30361a7341 Fix for curve widget hue gradient drawing incorrectly when zooming 2014-05-14 09:34:47 +10:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
b6e967be63 Code cleanup: const args and arrays 2014-04-27 08:56:54 +10:00
1a1bc281e6 Code cleanup: style 2014-04-21 01:01:33 +10:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
df63e8fd93 Speedup track preview widget for byte images
This gives a huge speedup gain for cases when you've got
rather huge markers on a byte images.

Done by skipping IMB_float_from_rect()/IMB_rect_from_float()
for such cases. We can sample the buffers without color space
conversion.
2014-04-10 21:14:36 +06:00
e6ca6956d3 Remove extra glEnd() call. 2014-04-10 01:26:23 +03:00
9b3bd5582b Replace resize code of image scopes by use of new GRIP button.
This deduplicates/simplifies some code. Also cleanup up a bit scopes UI code!

Use new GRIP button for uiList grab-resize.

This allows us to greatly simplifies the code, and get rid of a few hacks in uiList event handling!

Note autosize mode of uiList is now trigered by any value of list_grip below a given threshold, rather than the fixed zero value...

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D343
2014-04-02 13:09:43 +02:00
eaaacfc7b8 UI: Color-Ramp handles
- display handles with solid color.
- active handle is highlighted.
- 1/4 of the colorband draws solid.
- use old-style handles when zoomed out.

D289 by Charlie Jolly with own modifications.
2014-03-29 15:36:50 +11:00
d4c87f2f79 Code cleanup: remove unused button aspect 2014-02-13 09:37:27 +11:00
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
b9114cb609 UI: Use bool rather then int/short's where possible 2014-01-04 18:10:01 +11:00
8901701808 UI: Display alpha checkers in image info's color swatch. 2013-12-24 17:20:37 +11:00
1ed822202f Code Cleanup: pass rectangles as const in insterface files 2013-12-07 15:47:57 +11:00
eb51bfcfca uiSetRoundBox still took hard coded numbers in places. 2013-10-08 11:23:14 +00:00
98c574e41a use 'greater/less then or equal to' operators rather then adding 1. 2013-08-11 05:40:35 +00:00
dc39ecf010 code cleanup: remove old/unused bmesh bevel transform mode, remove commented character list UI widget and the members these used in 'G' global. 2013-05-28 13:01:31 +00:00
ed8b199ac5 UI drawing fix:
Wrongly replaced a "&" with "|" for a define. That made node headers in node editor
draw too dark. Also made header for default node not use alpha.

In general this drawing is not very good - it gets too transparent and dark.
Needs nicer AA function in interface, will be done later.
2013-04-19 15:02:37 +00:00
96dffe952b Bug fix #34974
The open region indicator (with +) didn't do alpha blending properly, so it wasn't
visible for any theme color.
2013-04-17 13:40:00 +00:00
7bbaf4853a code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss() 2013-04-04 02:05:11 +00:00
9c49e71216 Bunch of fixes for GLSL display transform
- GLSL shader wasn't aware of alpha predivide option,
  always assuming alpha is straight. Gave wrong results
  when displaying transparent float buffers.

- GLSL display wasn't aware of float buffers with number
  of channels different from 4, crashing when trying to
  display image with different number of channels.

  This required a bit larger changes, namely now it's
  possible to pass format (GL_RGB, GL_RGBAm GL_LUMINANCE)
  to glaDrawPixelsTex, This also implied adding format to
  glaDrawPixelsAuto and modifying all places where this
  functions are called.

  Now GLSL will handle both 3 and 4 channels buffers,
  single channel images are handled by CPU.

- Replaced hack for render result displaying with a bit
  different hack.

  Namely CPU conversion will happen only during render,
  once render is done GLSL would be used for displaying
  render result on a screen.

  This is so because of the way renderer updates parts
  of the image -- it happens without respect to active
  render layer in image user. This is harmless because
  only display buffer is modifying, but this is tricky
  because we don't have original buffer opened during
  rendering.

  One more related fix here was about when rendering
  multiple layers, wrong image would be displaying when
  rendering is done. Added a signal to invalidate
  display buffer once rendering is done (only happens
  when using multiple layers). This solves issue with
  wrong buffer stuck on the display when using regular
  CPU display space transform and if GLSL is available
  it'll make image displayed with a GLSL shader.

- As an additional change, byte buffers now also uses
  GLSL display transform.

  So now only dutehr and RGB curves are stoppers for
  using GLSL for all kind of display transforms.
2013-04-03 15:59:54 +00:00
6a47f756a6 remove workaround for [#34346], checked on applying this workaround for armatures too but it happens in more cases then I originally thought.
for now users of opensource Nouveau and ATI drivers can't use multiple windows, the bug needs to be fixed in the driver.
2013-04-03 01:35:24 +00:00
20376f3337 code cleanup: move beauty fill calculation into its own function and some style cleanup 2013-03-30 09:57:35 +00:00
c4e2de11ad fix/workaround [#34346] Blender total crashes when File/User preferences twice and go to System tab 2013-03-29 07:14:18 +00:00
Lukas Toenne
4638e5f99a Merge of the PyNodes branch (aka "custom nodes") into trunk.
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.

=== Dynamic node type registration ===
Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes.

Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2].

=== Node group improvements ===
Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3].

The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there.

[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
2013-03-18 16:34:57 +00:00
66a35e089a Fix for "draw images as texture"
Zooming in on images in Image window now shows pixels again (was filtered).

Now the glaDrawPixelsTex() and glaDrawPixelsAuto() have an argument to 
define if images should zoom in with linear filter, or draw pixels.
2013-03-17 17:32:45 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
a816b0b3d2 avoid calling glGetFloatv() twice when UI_RB_ALPHA is enabled with uiRoundBox() 2013-03-07 06:46:50 +00:00
495aa863ae Fix for incorrect subpixel precision of marker when using track offset
Issue was caused by the way how pattern sampling happens in case of
anchored display: track offset is applying on search buffer which
means offset is rounding to an integer. Fractional pat of offset was
completely ignoring which lead to jumps in pattern buffer.

This was only a visualization issue in track preview widget.
2013-03-04 18:30:48 +00:00
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
12b642062c Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability

Short list of main changes:

- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
  Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
  This allows keeping UI and data without actual saves, until you actually save.
  When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). 
  Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. 
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
  Old option is called "Save Startup File" the new one "Save User Settings".
  To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
  This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
1c450d71ef Fixed crashes when motion tracks are zero-sized
This is probably versioning issue happened when both trunk and tomato
were mixed to work on the same file.

Anyway, there're few files here locally and it's probably other users
do have the same files, so lets keep things safe here :)
2012-11-07 11:18:42 +00:00
e090edc707 fix [#33010] image editor - scope handles resize 2012-10-29 12:44:24 +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
ed1cda9a6c style cleanup 2012-09-30 06:12:47 +00:00
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
42dd135be0 style cleanup: multiple statements on a single line in interface code. 2012-09-16 23:40:03 +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
c92ab5c3ef code cleanup: use rect size macros 2012-08-21 20:34:05 +00:00
abd031bb4e code cleanup: use rect size macros for the interface 2012-08-21 19:35:06 +00:00
3090ae35af fix [#32374] Curve compositor UI drawing glitch
copy the curve for the compositor.
2012-08-21 15:14:29 +00:00
3204731209 code cleanup: don't use magic numbers for curve flag & use bool args for curvemapping_changed() 2012-08-21 08:47:36 +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