Commit Graph

3028 Commits

Author SHA1 Message Date
53b7bc8f1f Change !BLI_ghashIterator_isDone to BLI_ghashIterator_notDone. It is
always used in that context so we can at least avoid reverting it twice
:p.
2013-03-06 20:55:04 +00:00
f2bb536994 code cleanup: also change BKE_blender.h BLENDER_VERSION_CHAR to 'a' so as not to confuse things. 2013-03-05 14:47:49 +00:00
384948908a patch [#34103] path_util_split_dirstring.patch, path_util_split_dirstring_2.patch, path_util_split_dirstring_3.patch
from Lawrence D'Oliveiro (ldo)

Get rid of BLI_splitdirstring, replace with calls to BLI_split_dirfile, BLI_split_dir_part and BLI_split_file_part as appropriate.
2013-03-05 06:26:10 +00:00
e39f05e5fa patch [#34103] fileops_1.patch
from Lawrence D'Oliveiro (ldo) 

Add comments and use of bool type in fileops.c
2013-03-05 03:53:22 +00:00
f44b54d2a7 patch [#34103]
from Lawrence D'Oliveiro (ldo)

More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places
- storage.c: make some variables only used in bli_builddir local to that
- storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor
- path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well
- path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error
-  blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)
2013-03-05 03:17:46 +00:00
42ca1c8dcd Fix for image transparency backwards compatibility. Now the texture datablock has
a Use Alpha option again. This makes the case where you enabled Premultiply on the
image and disabled Use Alpha on the texture work again.

That's mostly useful when you have a straight alpha image file which has no useful
RGB colors in zero alpha regions (e.g. renders). Then sometimes you don't want to
use the alpha for the texture stack mixing, but you still want to multiply it into
the RGB channels to avoid a blocky transition into zero alpha regions.

This also removes the version patch that copied image datablocks because it's not
reliable and might be causing bug #34434. This does mean we are no longer backwards
compatible for cases where two different texture datablocks with Use Alpha enabled
and disabled where using the same image.
2013-03-04 13:18:14 +00:00
f691ee0627 Fix #34501: Painting on image editor with texture brush causes memory leaks in render module
Issue was caused by svn rev54721 where donequeue wasn't fully handled
in cases rendering was canceled, which lead to some render results
unfreed.
2013-03-04 12:40:24 +00:00
66a2b84897 Merged changes in the trunk up to revision 54992.
Resolved conflicts:
release/scripts/startup/bl_ui/space_view3d.py
2013-03-03 15:07:49 +00:00
79e80d8322 code cleanup: ~400 duplicate lines for AO form factor math. 2013-03-03 05:07:58 +00:00
1039135965 More UI messages fixes... 2013-02-28 15:31:20 +00:00
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
d120ec146d Merged changes in the trunk up to revision 54802. 2013-02-24 03:39:20 +00:00
9b5b9e7a09 Fix #34351: Displacement map Bake margin does not work 2013-02-22 09:57:10 +00:00
6b600d0793 Blender Internal: optimization to remove sleep() calls from the render threading
code. This gives a speedup up to a couple of seconds based only on the image
resolution and tile size. For complex renders a second or two is not so noticeable
but for quick ones it's nice to save some time. On the default cube this gives me
about half a second speedup.

Patch by Johan Walles, based on the render branch implementation by me.
2013-02-21 18:08:07 +00:00
9a86abd440 code cleanup: remove unused runtime var - World.fastcol 2013-02-21 17:10:27 +00:00
b9333b304c Fix visible seams on normal map bake due to clear colour being black:
This is a special case, tangent space normal maps should be cleared to
0.5, 0.5, 1.0. This is good practice but there's no reason why not to
automate this (for artists whose bump map fu may be a bit shallow).

Thanks to Morten Mikkelsen for reporting.
2013-02-20 15:06:13 +00:00
92436c94d3 Merged changes in the trunk up to revision 54594. 2013-02-16 18:38:03 +00:00
e3944f5bfa Divide by 3 instead of multiplying by variations of 0.333
Fixes small precision problems.
2013-02-14 17:35:43 +00:00
5d6f83b179 remove redundant if statement. 2013-02-13 05:07:46 +00:00
58a6f07649 Bug fix #34213 (2)
Adding non-RGBA float buffers as texture crashes MipMap code.
Images with less than 4 channels not supported (yet). Not sure
if we ever should even... normals, Z, vectors, UV, Index, all
don't like downsampling.
2013-02-12 15:51:05 +00:00
c4d248cc76 Fix #34194: Render Layer node didn't initialize color management flag properly
Bang! How we didn't notice this for so long -- seems scenes came from render
layer node were rendering as if color management disabled (byte image wouldn't
be linearized).
2013-02-11 12:25:54 +00:00
2005f7c6c0 style cleanup: also some typos 2013-02-11 00:49:00 +00:00
ac9ec06ec1 Merged changes in the trunk up to revision 54421.
Conflicts resolved:
release/datafiles/startup.blend
release/scripts/startup/bl_ui/properties_render.py
source/blender/SConscript
source/blender/blenloader/intern/readfile.c
2013-02-10 10:17:59 +00:00
b5962b7ccd Fix #34186: VSE: Incorrect movie output when scene strip is muted by keyframe 2013-02-10 09:27:25 +00:00
ebf18c6df9 Corrections to alpha pipeline do_versions
Basically they're aimed to solve issues when scene with sky
was used for compositing. If compo used alpha output result
of current trunk would be completely different form hwo it
was before.

Two heuristics here:
- If there's no world or world color is black, it completely
  equals to straight alpha mode, no further magic is needed
  to preserve compatibility

- If scene is used as Render Layer node and something is
  connected to Alpha output of this node, ensure alpha mode
  for this scene is set to Premultiplied.

Basically it shall give better compatibility and make
4K mango project just happy! :)
2013-02-08 16:25:35 +00:00
cef952a750 fix for error in own recent commit, null check before assignment. 2013-02-08 04:43:36 +00:00
7cb62127b3 Fix #34156: Spec. and Alpha Intensity OpenGL issue
Issue was caused by alpha pipeline cleanup: apparently depending on
use_alpha flag different channels for spec/alpha would be used.

Made it so talpha is computed from Image->ignore_alpha instead of
always considering to be TRUTH.

This is not so much trivial to understand what's going on here, but
it's not new issue. Anyway, if someone have got ideas how to improve
feedback here -- ideas are welcome! For now only regression is fixed.
2013-02-07 15:36:59 +00:00
441c7fb79a fix for crashes running some operators in background mode and some divide by zero errors. 2013-02-06 02:48:03 +00:00
f40dc45054 fix [#34125] Crash when bake margin = 0
regression since 2.65, just missing NULL check.
2013-02-06 00:48:17 +00:00
9ddf928dbd remove stringify macro from alloc's 2013-02-05 09:42:40 +00:00
791e38afd2 fix [#34105] bake artifacts
different threads could allocate the mask buffer and overwrite the same pointer, regression since 2.65
2013-02-05 08:16:04 +00:00
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
518bfbb1c9 style cleanup 2013-02-02 04:58:03 +00:00
6fca85780b style cleanup: also correct doc example for 'foreach_get/set' 2013-02-02 00:34:34 +00:00
fe26492538 Merged changes in the trunk up to revision 54171. 2013-01-29 03:42:19 +00:00
8f969fdc40 Fix for a crash when freeing copied scenes.
The problem was caused by the fact that BKE_scene_copy() was simply doing "memcpy"
to duplicate render layers including lineset settings without taking care of pointers
in the linesets.  For this reason, freeing the original scene and copied one resulted
in freeing allocated memory buffers twice.

Now BKE_scene_copy() properly duplicates linesets as part of render layers.

Also some code clean-up was made in the modified files.

Problem report by IRIE Shinsuke (with a patch to fix the crash).  Many thanks!
2013-01-29 03:12:49 +00:00
cc96196f10 Fix #34004: crash when canceling ongoing render with scene strip
Issue was caused by recursive call of RE_BlenderFrame. Solved by
reshuffling image pool init/free in do_render_all_options.

Should be harmless, but doublecheck on this is welcome.
2013-01-28 13:29:10 +00:00
556912792a Merged changes in the trunk up to revision 54110.
Conflicts resolved:
source/blender/blenfont/SConscript
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_scene.c
2013-01-26 23:49:13 +00:00
c411cde415 header cleanup, include BLI before BKE, also use bool for ntreeShaderExecTree 2013-01-24 21:57:13 +00:00
b12a019948 Usability
- Cycles materials now render in Blender Internal too, skipping the nodes.
  Not very useful, but at least things then show up on renders and in
  previews.

- Node editor: if wrong shader nodes are in a tree, they draw with thene
  color RED ALERT headers now. (Switching render engine will show it).
2013-01-24 16:11:07 +00:00
69900035b3 fix for G,G causing vertex slide in UV/Image window, also comment unused defines/enums. 2013-01-24 08:49:40 +00:00
59a187b338 Fix threading issues of viewport rendering when using movies/generated images
Issue was caused by the fact that guarded allocator is not thread-safe and
generated images/movies could allocate memory when loading pixels to Cycles.

Currently solved by switching memory allocator to using mutex lock (the same
as sued for jobs) when viewport rendering is used.

Nicer solution would be to make guarded allocator thread-safe by using atomic
operations and lock-free lists, but that's more serious change.
2013-01-24 08:14:20 +00:00
9ff704db39 style cleanup: bake 2013-01-23 23:28:22 +00:00
b9472cbd83 Code cleanup: move render baking code into own file. 2013-01-23 13:13:16 +00:00
a03cc5c6c5 Fix small issue found in vertex color bake bug that caused the result to be
different each time, due to float precision issues. The camera matrix itself
should not be modified in render, just its copy.
2013-01-23 13:13:10 +00:00
7c4f70178f fix for glitch with vertex bake:
- the mesh would be tagged to update, then updated before bake finished.
- also increase self-shadow offset, in some cases the offset wasn't enough.
2013-01-23 04:22:02 +00:00
c8dbf61f35 fix [#33729] Shadows produce artefacts in vertex colour baking 2013-01-23 03:01:43 +00:00
193df0f5a0 Fix #33951: Only margin is correctly baked for non-displacement baking
Was own mistake in recent changes.
2013-01-22 09:37:46 +00:00
95a13a2c02 Fix projection texture painting crash
It was caused by own mistake by not noticing externtex is used not
only by render engine. Now this function uses pool passed as argument
rather than using R.pool.
2013-01-22 08:05:00 +00:00
709a86a8d9 Multires baker: fix wrong normalization if baking happens to multiple images
Previously normalization will happen per image buffer individually, which
was wrong in cases different faces of the sane mesh uses different images.

Also solved possible threading issues when calculating min.max displacement.
2013-01-21 18:34:27 +00:00