Commit Graph

49420 Commits

Author SHA1 Message Date
Sergey Sharybin
f79f3de4d5 Color management: implemented ability to color manage byte buffers
Color management of byte buffers is currently disabled, to enable
it COLORMANAGE_BYTE_BUFFER from colormanagement.c should be defined.

Currently color management supposes that byte buffer is originally
in sRGB space. Ideally it'll be using the same input color space
setting as float buffer which is still in a TODO list.

It could be nice artistic option to play with. Also in theory it's
possible that byte images would store data in non-sRGB space.

There's still kind of issue with byte buffers which results in
showing linear image when view transform is set to RAW. It'll be
resolved as soon as real input color space is added. Other view
transformations should work fine.
2012-07-15 10:43:45 +00:00
Campbell Barton
02bac0bebf falloff option for mask layers 2012-07-15 03:11:07 +00:00
Campbell Barton
7cc5af4ef3 minor refactor for rect functions. more consistent naming. 2012-07-15 00:29:56 +00:00
Campbell Barton
f8bf58e0f2 fix for some bugs when the mask layer was outside the view, also clamp the layer buckets within the view. 2012-07-15 00:07:41 +00:00
Campbell Barton
593163e6e5 fix for minor error in previous commit (wasnt connecting right faces for cyclic mask), also avoid doing more area calculations then needed when checking if the mouse is moving away from uiBlock. 2012-07-14 23:26:54 +00:00
Campbell Barton
1cee8ea8ed unfilled-cyclic curves now works as expected, also fix for own crash on 32bit systems. 2012-07-14 23:23:24 +00:00
Campbell Barton
a229c1d442 svn merge ^/trunk/blender -r48911:48927 2012-07-14 20:56:40 +00:00
Campbell Barton
41fe8b9ea9 use a different setting for fill/cyclic - you may want to have unfilled cyclic curves. 2012-07-14 20:53:52 +00:00
Campbell Barton
5e7f8b83ed mask rasterizer, render unclosed splines as lines. 2012-07-14 20:29:17 +00:00
Campbell Barton
6986f671ee code cleanup 2012-07-14 19:21:13 +00:00
Campbell Barton
52c0f44659 zealous bounds checking broke the invert option. 2012-07-14 18:57:16 +00:00
Campbell Barton
a52153a618 mask rasterization: use a simpler method to check if a bucket intersects with a triangle. 2012-07-14 18:42:59 +00:00
Campbell Barton
6946294ab9 rename vars for line dist funcs to make more sense 2012-07-14 18:37:48 +00:00
Campbell Barton
83d1fac2e4 mask rasterizer - test if buckets overlap the face before adding the face into the bucket. 2012-07-14 17:58:42 +00:00
Sergey Sharybin
8a9d1c0a79 Fix #31021: Render settings are not taken into account for curves
Refactored code a bit to make naming a bit more clear and added a
function to create mesh from given display list rather than from
object's displist.

Tested using plain curves (which doesn't imply using derived meshes)
and curves with constructive modifiers (which are using derived meshed).
2012-07-14 17:30:49 +00:00
Campbell Barton
f67ee4ff00 add dynamic bucket xy resolution based on pixel size, also remove some redundant copying. 2012-07-14 16:54:10 +00:00
Campbell Barton
1cbc6a6b4b minor refactor, some comments and var names were misleading. 2012-07-14 16:03:03 +00:00
Campbell Barton
e144e7a82c minor refactor for mask rasterizer 2012-07-14 15:46:32 +00:00
Campbell Barton
e4cfcdc3a6 header comment cleanup, explain whats the difference between confusingly named drarnode.c and node_draw.c. 2012-07-14 15:29:45 +00:00
Campbell Barton
fc3cd6eb80 replace masking rasterizer with a more simple geometry based rasterizer (for the compositor).
notes:
- uncomment  #define USE_RASKTER in BKE_mask.h to use the previous mask rasterizer.
- slightly slower for regular masks but significantly faster for feather.
- main benefit is that it threads well so works nice for tile compositor.
- feather is lower quality, can use some improvements here.
- feather can also use some interpolation enhancements, will do later.
2012-07-14 15:29:05 +00:00
Bastien Montagne
01c3db149c Fix [#32086] Missing bevel "hold shift" for better accuracy.
This commit adds "shift" and numtype to both Bevel and Inset mesh operators.

It also gets rid of the magicnumber used in NumInput to str operation (currently, 20 chars per element, now defined as NUM_STR_REP_LEN in ED_numinput.h).
2012-07-14 14:03:36 +00:00
Campbell Barton
f7343fa852 svn merge ^/trunk/blender -r48893:48911 2012-07-14 13:04:01 +00:00
Campbell Barton
98520ce4de use gcc attributes for BLI alloc functions 2012-07-14 12:47:49 +00:00
Mitchell Stokes
ac8c56c6fc BGE: Better fix for the textures not working with custom shaders regression. Now custom shaders work, and textures aren't uploaded twice for GLSL materials (my earlier fix had some bad logic). 2012-07-14 04:43:32 +00:00
Campbell Barton
aeaa95a525 more minor speedups for new mask rasterizer 2012-07-14 04:07:59 +00:00
Campbell Barton
f5a35c3634 new mask rasterizer - replace kdopbvh with with own bucket lookups. 2012-07-14 01:43:33 +00:00
Campbell Barton
9e09005e49 add is_quad_convex_v2(), SET_UINT_IN_POINTER, GET_UINT_FROM_POINTER macros & some minor edits. 2012-07-14 00:33:58 +00:00
Tamito Kajiyama
065605e0da Merged changes in the trunk up to revision 48893.
Conflicts resolved:
source/blender/blenkernel/CMakeLists.txt
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_filter.c
source/blender/makesrna/RNA_enum_types.h
2012-07-13 23:23:06 +00:00
Bastien Montagne
ee7ae2cdbb Fix [#32013] Crash loading a 2.49b model
Problems were in the old multires loading system.

Actually, the sigsev itself was the easy part of the job (simply had to convert from tesselated data to polys/loops), but after that I was getting a horrible bunch of wild stray faces...

It finally turned out it was a mismatch in two different subsurf structs used while computing a mdisps layer from the multires DM, leading to getting complete random normals (null ones, NAN ones...), leading to complete dummy tangent space matrix, leading to absurds mdisps values...

Note: I also moved the copy of first layer's vertex and face data from old me->mr to mesh's v/fdata earlier in multire_load_old(), to be able to use general face_to_poly conversion function (later on we would have to do it by hand, the general function would erase our newly computed mdisps layer...).

Took me the whole week (something like 20h) to track this down: multires + subsurf = C nightmare!
2012-07-13 20:50:32 +00:00
Sergey Sharybin
4d92a00ca4 Merging r48889 through r48893 from trunk into soc-2011-tomato 2012-07-13 14:21:17 +00:00
Sergey Sharybin
807ad1f0e0 Fix #32087: Crash while changing values in comp editor (bt and blender included)
Issue was caused by threading conflict between compositor output node which
is freeing buffers used by render result image and image draw code which
could use buffers at the same time as compositor frees this buffers.

Solved by adding adding  lock around viewer image invalidation and image
drawing.

Use renamed LOCK_PREVIEW mutex for this, which si not called LOCK_DRAW_IMAGE.
With new compositor locking for preview is not needed so it could be removed.

Added the same lock around viewer operation which also frees buffers used
by viewer image. It's actually quite difficult to check whether this is
indeed needed. This code seems to be using acquire/release technique, but
somehow acquiring ImBuf before invalidating it in compositor operation
doesn't resolve the issue, so probably it's not actually locking acquire
and things should be checked deeper.
2012-07-13 13:47:13 +00:00
Campbell Barton
a5e6d73d41 fix for crash with new rasterizer 2012-07-13 12:55:30 +00:00
Jeroen Bakker
6eacb5791d Inner loop optimization of blur node 2012-07-13 12:50:10 +00:00
Jeroen Bakker
9987a8fca7 Removed parameter from executePixel and initializeTileData. 2012-07-13 12:24:42 +00:00
Campbell Barton
ef18a792c2 svn merge ^/trunk/blender -r48868:48888 2012-07-13 12:06:31 +00:00
Campbell Barton
bccd5380f5 speedup - because we know triangles will always have the same z value. 2012-07-13 12:03:53 +00:00
Campbell Barton
a3cf6da7ae temp disable quad interpolation 2012-07-13 11:48:30 +00:00
Campbell Barton
3fe14a962a masking - add feather faces as quads and interpolate as quads to avoid ugly diagonal lines. 2012-07-13 09:22:58 +00:00
Campbell Barton
73c2abe83d new function barycentric_weights_v2_quad(), like barycentric_weights_v2 but for quads.
takes vecs and a point and assigns 4 weights, needed for nice quad interpolation for mask feathering.
2012-07-13 09:19:05 +00:00
Dalai Felinto
6ee2e0b145 bugfix: [#32073] Displace node different result between Low and high quality 2012-07-13 06:07:28 +00:00
Campbell Barton
8ce53a2a98 new mask rasterizer written to take advantage of the compositors threading, mostly functional but disabled by default (still a little wip). 2012-07-12 20:10:41 +00:00
Jeroen Bakker
8809f23c8d Missed H file 2012-07-12 19:48:16 +00:00
Jeroen Bakker
8b8bc164da Small optimizations in compositor.
Most of them are not noticeable.
2012-07-12 19:19:03 +00:00
Sergey Sharybin
bb09f856df Merging r48862 through r48868 from trunk into soc-2011-tomato 2012-07-12 17:19:54 +00:00
Sergey Sharybin
152675db1a Fix #31988: VBOs Textured solid : no update of material in 3Dview
Issue was caused by VBOs using CD_TEXTURE_MCOL for faces colors. This
layer was creating on mesh display (from draw_tface_mapped__set_draw)
in cases there's no such a layer.

If material settings are changing, this layer wasn't updated and old
colors were used.

Fixed by performing an update of this layer in cases it's already
exists. This would give some % of slowdown, but don't think it'll
be dramatically bad.

Would be nice to find a nice way to update such a layer in cases
material is actually changes only, or get completely rid of it/
2012-07-12 16:08:22 +00:00
Sergey Sharybin
ba44250a23 Fix #32067: since BMesh, files < 2.59.3 no longer have their texface converted
Issue was caused by performing conversion from FTFaces to materials from
the end of lib_link_mesh, where tesselated faces were cleared already.

This conversion can't be switched to BMesh structures because in future
MTexPolys could be changed in a way, that versioning stuff wouldn't work
any more. Another issue is that making such a conversion per-mesh would
lead to quite a code spagetti, which is difficult to follow.

Solved by splitting per-mesh cycle in lib_link_mesh, so now it consists
of three steps:

- Do linking stuff such as custom data layers, materials. Perform a
  Conversion stuff like tessface -> polys.

- Convert all MTFaces to materials. This conversion handles all meshes
  and creates needed materials.

- Free tessfaces, mark mesh as linked.

Such a separation shouldn't noticeably affect on speed of linking.
2012-07-12 15:36:22 +00:00
Lukas Toenne
18d7a23166 Fix #32051, Ungroup operator crashes. The link iterator can be invalidated when unconnected input links are removed. 2012-07-12 15:14:50 +00:00
Sergey Sharybin
126024e537 Fix #31584: Fractional step in value input for Skin Modifier (Event/input problem)
Issue was caused by the code which checked whether snapping should be enabled
on transform init taking into account keymap and special keys state. It was
used for Ctrl-Click on manipulator only.

Check for Ctrl state gave wring result with skin modifier. It was solved
by additional check for which mode transformation is initializing for --
currently manipulator is available for translation/roation/resize only
which doesn't give any keymap issues.
2012-07-12 14:41:52 +00:00
Sergey Sharybin
8764e7507f Merging r48829 through r48861 from trunk into soc-2011-tomato 2012-07-12 12:12:21 +00:00
Sergey Sharybin
8ef23c6743 Clip editor mode selection: show menu with modes on TAB
This seems to be the only straightforward way to switch fast between
modes without keeping bunch of shortcuts and current mode in head.
2012-07-12 12:06:40 +00:00