Commit Graph

32873 Commits

Author SHA1 Message Date
Sergey Sharybin
34a034fb1b Code style cleanup and prevent crashes when OCIO configuration file is not found 2012-06-30 14:53:58 +00:00
Sergey Sharybin
6bfe9266be Color management cleanup and improvements
- De-duplicate code used by color management panel drawing,
  moved this panel to utility file in bl_ui

- Added support of per-window color management control
  which means view transform. exposure and gamma could be
  set per window and all spaces would use this settings.

  This is default behavior for older files now.

- Added support of color management display of movie clips
  in clip editor.

  Supported both texture buffer and fallback draw methods.

- Fixed default values for exposure and gamma
2012-06-30 12:37:41 +00:00
Sergey Sharybin
b57a5521c4 Color management refactoiring and some extra options
- Move space-being settings (such as view transform) into own
  DNA and RNA structure to avoid code duplication in some areas
  and save some arguments on display buffer acquiring function.

  Also added some utility functions to BKE to manipulate this
  settings.

- Replace static sized color managed buffer flags array with
  dynamically sized array which matches actual number of displays.

  Probably this flags better be transfposed so it'll support
  any number of view transforms and 32 displays (currently it's
  other way around). it's runtime flags only, so would be simple
  to change any time.

- Added support of configurable exposure and gamma.

  Changing this settings wouldn't generate new item in cache,
  it'll affect on buffer with the same color spaces conversion.

  It'll also run full color transform from scratch on every run,
  this could be changes in a way that it'll re-use color managed
  buffer, but from quick glance it doesn't give really noticeable
  boost.

  Currently this settings are stored as pointer in ImBuf structure
  itself. Probably it make sense removing them from ImBuf and make
  moviecache be able to store some kind of tags associated with
  cached ImBuf.
2012-06-30 12:37:16 +00:00
Sergey Sharybin
dc40cb4fb0 Color management: fixes for view transform not being properly handled
in space node create and duplicate callbacks.
2012-06-30 12:36:53 +00:00
Sergey Sharybin
74df85d032 Color management: multithreaded transformation apply
Since RRT can't be baked into 3D LUT it's the only way to increase
speed of transformation and make image / clip loading in acceptable
time.
2012-06-30 12:36:41 +00:00
Sergey Sharybin
b984fdf393 Color management fixes
- Fixed memory leak caused by incorrect handling of cached buffer
  in cases if it was marked as dirty
- Do not use 3D LUT for RRT -- they can't be easily baked into 3D
  LUT without being clamped to 0..1 space
- Make sure blender compiles without OCIO support
2012-06-30 12:36:31 +00:00
Sergey Sharybin
d0f67e498e Color management fixes and improvements
- Made color management cache safe for situations when one area
  requested a display buffer, then some changes were done which
  invalidated cache, other area requested display buffer which
  changed cached buffer.

  Suck case could be fatal for first used of display buffer,
  which didn't happen yet because cache is being accessed from
  main thread only, but better to keep this things completely
  thread save to avoid headache in the future.

- Baked RRT transformations, which gives ~3-4 times boost
  hopefully without visible artifacts.

- Added support of partial updates to display buffers.

  This would create special context which hols display buffer
  which imbuf had to the time of creating this context and
  later this context would allow to run a color correction
  from given linear buffer within given region.

  This is being used by compositor to enable more realtime
  display update when compositing.

- Added support of color management backdrop for nodes editor.

  There's now special menu called display properties in N-panel
  of nodes editor.

  Probably this better be de-duplicated somehow, but not sure
  yet how. Currently it's not so harmful to have panel for two
  spaces which contains only 2 properties.

  There's currently one unsolved issue with backdrop:
  it's not being updated progressively when just loading the
  file -- it's simply because there's no color managed display
  buffer for backdrop yet, and compositor doesn't actually
  know which color space to use here to generate preview to.
2012-06-30 12:36:03 +00:00
Campbell Barton
244a1c564a svn merge ^/trunk/blender -r48411:48415 2012-06-29 20:34:10 +00:00
Campbell Barton
20d7a38061 don't close operator dialogs when the mouse moves outside of them. this is very annoying when you spend time to enter in many values, escape, click-out-side still quits. 2012-06-29 20:29:13 +00:00
Campbell Barton
53d33d853b game engine & viewport, dont show collision bounds for convex hull or triangle meshes - really visual distraction and they are not used, 2012-06-29 20:26:07 +00:00
Campbell Barton
5bdf98b399 svn merge ^/trunk/blender -r48409:48411 2012-06-29 14:39:38 +00:00
Lukas Toenne
83093d6770 Extended modes for snapping in the node editor.
The transform operators in nodes will now use the unselected nodes to generate snapping points. Unlike object snapping, node snapping works for the x/y axes separately and snaps node borders to same borders of unselected nodes. The sensitive area for node borders extends over the whole view2D range, to enable simple alignment of nodes in both x and y direction.

For snap points in the node editor an additional enum value is stored to indicate the type of node border (left/right/top/bottom). This works as a constraint on possible node alignments: only same border types align with each other.
2012-06-29 14:34:46 +00:00
Sergey Sharybin
3ae2d5aa83 Merging r48407 through r48409 from trunk into soc-2011-tomato 2012-06-29 14:34:29 +00:00
Sergey Sharybin
344ca17247 Added command line option "--debug-jobs"
This option enables time profiling of background jobs, namely it's
measuring run time of the job and prints it to the console.
2012-06-29 14:32:25 +00:00
Bastien Montagne
70f50ed8fa Fix [#31939] Loop cutting a self intersecting face loop
Enabled use_gridfill for edgesubdivide called by loopcut. This will break edgeslide in this specific case (intersecting faceloop), but imho makes more sense this way than the other. Very easy to revert anyway, and this should only affect this specific cornercase.
2012-06-29 13:55:25 +00:00
Campbell Barton
e6469eb178 svn merge ^/trunk/blender -r48378:48406 2012-06-29 13:11:44 +00:00
Bastien Montagne
8a3d571744 Related to [#31936] Mesh saved in 2.63 with legacy format have holes instead ngons
Make clear in this option's tooltip that it only saves tris and quads, no implicit triangulation of other ngons, which are lost!
2012-06-29 11:59:47 +00:00
Miika Hamalainen
6ddc574d9d Fix #31953: Forcefield Texture using image file, gradient mode not working 2012-06-29 11:44:46 +00:00
Thomas Dinges
5a540dec5e Tomato Branch:
* Compile fix for windows platforms, pow10 -> pow.
2012-06-29 11:42:57 +00:00
Miika Hamalainen
3ad9e0f3ec Fix #31948: dynamic paint substeps do not work for objects parented to armatures 2012-06-29 11:19:29 +00:00
Antony Riakiotakis
af63f9ec21 Fix compile error 2012-06-29 11:15:02 +00:00
Campbell Barton
5d9f3c5d18 fix for crash scaling an image 2012-06-29 10:52:37 +00:00
Antony Riakiotakis
6264579f6b Fix #31951 Subdivide with multires splits uvs.
The bug is related to 31581 and the main cause is the small offset that
BM_loop_interp_from_face introduces before calculating barycentric
weights. Solved by only calculating displacement layer.
2012-06-29 10:12:42 +00:00
Campbell Barton
aeee798143 code cleanup: bge builds with clang without warnings / errors. 2012-06-29 09:16:59 +00:00
Nicholas Bishop
a45cba5f71 Add missing brush types to sculpt_tool_name()
This function is used to name undo pushes in sculpt mode, was missing
some of the newer brush types. Also tweaked the switch statement so
that it will warn for future missing cases and removed extraneous
breaks.
2012-06-28 19:12:00 +00:00
Campbell Barton
5a8b3dc1f9 add NULL check for ibuf, was crashing while rendering randomly 2012-06-28 17:26:21 +00:00
Campbell Barton
1a2852cf1c svn merge ^/trunk/blender -r48375:48378 2012-06-28 15:41:44 +00:00
Campbell Barton
bee0f76f26 fix for crash in python getting the image size for a sequence. 2012-06-28 15:34:21 +00:00
Antony Riakiotakis
6b8986af43 revert part of 48340, it causes uvs across islands to stitch in a different way (?) than before 2012-06-28 15:09:24 +00:00
Campbell Barton
420150f752 svn merge ^/trunk/blender -r48370:48375 2012-06-28 14:19:53 +00:00
Campbell Barton
1ba5db129b recent fix for #31581 could crash when doing edge slide on a mesh with no UV's. 2012-06-28 14:18:04 +00:00
Campbell Barton
c8c743b609 code cleanup: compile with clang and quiet some warnings. 2012-06-28 12:32:06 +00:00
Campbell Barton
6b345811b7 svn merge ^/trunk/blender -r48333:48370 2012-06-28 11:20:19 +00:00
Lukas Toenne
57b69abe0d Fix for image node: The button draw function was using the image user pointer for displaying properties, which does not work correctly. The image node has to redefine image user RNA properties in order to make correct update calls and to have meaningful image layer names. For these properties the node pointer itself has to be used then. 2012-06-28 10:59:40 +00:00
Brecht Van Lommel
7c8f82a174 Cycles: regular rendering now works tiled, and supports save buffers to
save memory during render and cache render results.


Implementation notes:

In the render engine API it's now possible to get the render result for
one render layer only, and retrieve the expected tile size in case save
buffers is used. This is needed because EXR expects tiles with particular
size and coordinates.

The EXR temporary files are now also separated per layer, since Cycles
can't give the full render result for all render layers, and EXR doesn't
support writing parts of tiles.

In Cycles internally the handling of render buffers and multi GPU
rendering in particular changed quite a bit, and could use a bit more
refactoring to make things more consistent and simple.
2012-06-28 10:34:38 +00:00
Sergey Sharybin
53bb66e291 Move color management check stuff from blo_read_file_internal to setup_app_data 2012-06-28 10:05:22 +00:00
Mitchell Stokes
a9a92ae323 Fix for [#23375] "texture2D in custom 2D filters can get texture outside of game, resulting in ugliness" reported by Jacob F.
The 2D Filter system now only copies the game viewport instead of the whole window. This prevents 2D Filters from grabbing data outside of the game viewport. The textures for 2D filters are now also not forced to be powers of two (if NPOT textures are supported), which can save a little bit of VRAM.
2012-06-28 09:37:30 +00:00
Campbell Barton
41ff120e65 fix for segfault on undo because of loading color profile info. 2012-06-28 09:18:07 +00:00
Sergey Sharybin
33e8feb880 Fix #31835: OBJ Importer corrupts a model (crash in edit mode)
Added back face validation to BKE_mesh_validate_arrays.

This is needed because some addons (like OBJ importer) are reading
tessfaces and then converting them to ngons and validation of tessfaces
is needed before such a conversion.

Validation of faces would happen only if there's no polys in mesh.
2012-06-28 09:08:11 +00:00
Campbell Barton
25f59c8e0b code cleanup: cmake buildsystem edits, unused var warnings and better description for WITH_PYTHON_MODULE.
also disable workaround for some linux installs.
2012-06-28 08:51:02 +00:00
Lukas Toenne
855b6391ea Basic snapping in node transform operator.
Snapping actually was working already, but grid spacing was set to 1.0, which is basically pixel size in the node editor. Increased this to 1x grid step for fine snapping and 5x grid step for rough snapping.

Grid drawing in node editor now draws 2 levels in slightly different shades to indicate the different snapping modes better.

Node editor also supports the general use_snap tool setting to enable automatic snapping during transform. For now only the incremental snapping is supported, in future could be extended to enable alignment between nodes in a number of ways.
2012-06-28 08:47:22 +00:00
Sergey Sharybin
20e854bb16 Fix #31929: VSE crash with relative paths and rebuilding proxies 2012-06-28 07:58:34 +00:00
Campbell Barton
a837434033 code cleanup: when heat weighting dont loop through all polys when its not needed. 2012-06-28 07:18:19 +00:00
Campbell Barton
be6a5a07ab fix [#31940] crash with automatic weights 2012-06-28 07:13:03 +00:00
Mitchell Stokes
ecc15e53bd Removing channel manipulation from the Action Actuator Python API since this has been broken since the animation changes from Pepper. BL_ArmatureObject.channels should be used instead. For more information see bug #28843 for more info:
http://projects.blender.org/tracker/index.php?func=detail&aid=28843&group_id=9&atid=306
2012-06-28 06:22:47 +00:00
Dalai Felinto
7016538974 bge.logic.keyboard.getClipboard() and .setClipboard methods
the idea of using methods instead of attributes is to avoid users abusing of the system calls.

Thanks Campbell Barton for reviewing and small corrections
2012-06-27 21:57:33 +00:00
Campbell Barton
a09feb7386 option so operators can be executed with undo enabled (and redo). 2012-06-27 21:41:17 +00:00
Campbell Barton
d30c7356b7 missed tiff using 150 dpi as default in previous commit, use a define now. 2012-06-27 19:28:44 +00:00
Nicholas Bishop
f57c1c8b34 Avoid adding overlapping triangles in convex hull
Add an epsilon value to the point-outside-hull test, helps when some
of the input vertices are nearly coplanar.

Fixes bug [#31941] convex hull fails (and depends on vertex order when it shouldn't)
http://projects.blender.org/tracker/index.php?func=detail&aid=31941&group_id=9&atid=498
2012-06-27 18:39:17 +00:00
Campbell Barton
32478997ec style cleanup 2012-06-27 18:29:47 +00:00