Commit Graph

49738 Commits

Author SHA1 Message Date
Sergey Sharybin
35b61a7512 Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.

Makes code easier to follow and allows to manage special
attributes in more efficient way.

Thanks Campbell for review!
2013-09-01 15:01:15 +00:00
Sergey Sharybin
901dea87a1 Tag unused arg as unused. 2013-09-01 15:01:03 +00:00
Sergey Sharybin
09674d3c38 Remove some unneeded type conversions. 2013-09-01 14:32:51 +00:00
Campbell Barton
45e2e9ce59 add view3d roll to navigation menu. 2013-09-01 14:17:43 +00:00
Brecht Van Lommel
4bcccc24c1 Fix OS X compile error after enabling strict build flags for this module. 2013-09-01 14:10:41 +00:00
Brecht Van Lommel
f3252c261d Fix #36620: sss + indirect light rendering artifacts, due to wrong correlation in
the random numbers.
2013-09-01 14:10:40 +00:00
Brecht Van Lommel
902e1d0b53 Fix #36613: view select/all shortcuts not working in graph editor with the
maya key configuration preset.
2013-09-01 13:19:06 +00:00
Lukas Toenne
2b6d2bf322 Patch #36622, by Henrik Aarnio: Fit backdrop image to the area dimensions.
A new operator to alter the backdrop zoom level so that it fits fully within the node editor area, and centers the image.
Shortcut alt-home, as home is used for fitting stuff into the view everywhere.
2013-09-01 09:50:56 +00:00
Campbell Barton
fe427f0561 kd-tree,
- replace numbers with defines for allocation increments and default array size.
- move array reallocation into a static function (deduplicate 2x).

also fix own mistake with uninitialized slop-space var in memory printing statistics.
2013-09-01 08:58:46 +00:00
Joshua Leung
3c193c825b Mingw/Windows Compiling Fix:
In file included from source\blender\compositor\operations\COM_PlaneTrackMaskOperation.cpp:31:0:
source\blender\blenlib/BLI_jitter.h:36:65: error: expected ',' or '...' before numeric constant
source\blender\blenlib/BLI_jitter.h:37:65: error: expected ',' or '...' before numeric constant


It appears that an include used in COM_PlaneTrackMaskOperation.cpp brings in some Windows header file, which in turn defines rad/rad1/rad2 as some numeric constants.
2013-09-01 05:55:50 +00:00
Joshua Leung
7176cbf466 Mingw Compiling Fix - Conversion from int to unsigned char...
Apparently mingw/gcc is too stupid to recognise that the values
in alphatest will only be used if they're within the range of 
unsigned char (i.e. 0 <= x < 255) when this is done using a ternary
operator. Then again, it's quite hard for humans to immediately
parse what is going on here either! Converting this clever code
back to a more obvious form that mere mortals (and compilers it 
seems) can handle with ease ;)
2013-09-01 05:36:29 +00:00
Joshua Leung
33c68846de Mingw/Windows Compiling Fix
This commit attempts to fix the following error:

intern\guardedalloc\intern\mallocn.c: In function 'rem_memblock':
intern\guardedalloc\intern\mallocn.c:977:48: error: conversion to 'intptr_t' from 'size_t' may change the sign of the result [-Werror=sign-conversion]

From the references I've managed to find, it appears that
the second arg to munmap() should be size_t not intptr_t.
Fortunately though, we don't use this arg anyways atm, so 
this should be quite harmless...
2013-09-01 05:12:36 +00:00
Campbell Barton
9d04a61f36 use strict flags for lasso, boxpack, gsqueue and quadric's.
for lasso also use unsigned ints rather then shorts for the path length.
2013-09-01 03:43:10 +00:00
Campbell Barton
098cf90956 use strict flags for scanfill, also replace shorts with unsigned shorts and ints/bools in some cases. 2013-09-01 03:37:45 +00:00
Campbell Barton
9ad5f32fc0 use strict flags for guarded alloc 2013-09-01 02:46:34 +00:00
Campbell Barton
2924a02a35 move strict compiler checks into a header so its easier to manage in one place (pragmas were copied around).
also enable more strict warnings for BLF (which had some incorrect casts).
2013-09-01 00:46:04 +00:00
Thomas Dinges
ce326e20c8 Cycles:
* World background samples (Branched Path) were missing after integrator rename.
2013-08-31 16:36:54 +00:00
Campbell Barton
5c569d227b patch [#35928] View roll operator
from Kevin Mackay (yakca), with my own additions to make it modal (though there are no keys bound to modal roll by default).
2013-08-31 08:18:08 +00:00
Campbell Barton
208b068c3f text spacing was using DPI rather then the size of the text.
characters could draw outside the selection when the text was scaled up.
2013-08-31 05:09:52 +00:00
Campbell Barton
fd90e17130 text drawing glitche - highlight line was offset slightly from selection. 2013-08-31 05:00:40 +00:00
Campbell Barton
d685b18c2f remove calls to CTX_wm_region(C) when the region is already known.
also remove unused toggle vars in uiHandleButtonData
2013-08-31 04:22:55 +00:00
Campbell Barton
3d0e56e8d9 fix for ui glitch, pressing backspace over a button to reset to the default value didnt work for the uilist text button (others too), missing redraw. 2013-08-31 04:11:50 +00:00
Thomas Dinges
f4f4dac523 Cleanup:
* Silence /arch:SSE2 warning on msvc x64.
2013-08-31 03:18:55 +00:00
Thomas Dinges
8f699dbd5e Cycles:
* More build fixes, 2 link errors remain. http://www.pasteall.org/45279

Note: Probably those paths should only be added for Windows and Linux, as "OPENIMAGEIO_LIBPATH" already inherit them for Mac OS. Also "OPENIMAGEIO_LIBRARIES" inherits the libs for Linux already. Is that intended or a lack of consistency?
2013-08-31 02:56:03 +00:00
Thomas Dinges
615894323a Cycles / Standalone:
* Fix some link errors on Windows, still missing png, zlib, jpeg and tiff.

I couldn't yet figure out the correct flags to pass on here, and the 2300 lines huge main CMakeLists file doesn't help with it...
2013-08-31 02:25:43 +00:00
Campbell Barton
8e46cf637c tweak mempool loop comparisons when we know there is no chance for skipping past the last value.
also correct typo.
2013-08-31 02:12:31 +00:00
Campbell Barton
11c988ba00 Simplify line/plane intersection, add line_plane_factor_v3().
Remove no_flip option for isect_line_plane_v3(), its quite specific and only used for ED_view3d_win_to_3d().
2013-08-31 02:06:23 +00:00
Brecht Van Lommel
29f6616d60 Cycles: viewport render now takes scene color management settings into account,
except for curves, that's still missing from the OpenColorIO GLSL shader.

The pixels are stored in a half float texture, converterd from full float with
native GPU instructions and SIMD on the CPU, so it should be pretty quick.
Using a GLSL shader is useful for GPU render because it avoids a copy through
CPU memory.
2013-08-30 23:49:38 +00:00
Brecht Van Lommel
60ff60dcdc RenderEngine API: add viewport draw utility functions to bind a GLSL fragment
shader for converting colors from linear to display space, based on the scene
color management settings.

if engine.support_display_space_shader(scene): # test graphics card support
	engine.bind_display_space_shader(scene)
	# draw pixels ..
	engine.unbind_display_space_shader()
2013-08-30 23:49:35 +00:00
Brecht Van Lommel
6785874e7a Fix #36137: cycles render not using all GPU's when the number of GPU's is larger
than the number of CPU threads
2013-08-30 23:09:22 +00:00
Campbell Barton
f477c0e535 remove unnecessary check in BLI_mempool_iterstep and add doxygen comments to mempool. 2013-08-30 22:04:37 +00:00
Campbell Barton
b8547074e1 mempool internal change, use unsigned ints where possible (less overhead),
also quiet compiler warning for BLI_LINKSTACK_FREE macro.
2013-08-30 21:32:57 +00:00
Campbell Barton
427317d8d8 use CMAKE_DL_LIBS rather then linking libdl directly.
added to cycles standalone too.
2013-08-30 20:26:57 +00:00
Thomas Dinges
499bec2a85 Fix for [#36610] The new sky model produces strange results
* Clamp theta sky coordinates, to prevent a negative solarElevation. 

Note: This means that you cannot get absolute night with the new model, but this is not supported anyway. So when you reach the maximum sunset, use the World Strength to further decrease the light.
2013-08-30 18:04:23 +00:00
Thomas Dinges
a51f8e4353 Cycles / Standalone:
* Standalone can now be compiled without the GUI, making the glut dependency optional. 

Added WITH_CYCLES_STANDALONE_GUI cmake flag.
2013-08-30 17:34:27 +00:00
Brecht Van Lommel
b1c36529aa Fix #36609: glsl materials with reroute nodes not working correct. 2013-08-30 17:18:15 +00:00
Brecht Van Lommel
0933c6093e Fix #36611: cycles issue loading png file with 2 channels. 2013-08-30 17:01:44 +00:00
Campbell Barton
e8605f9df9 quiet compiler warnings 2013-08-30 16:52:54 +00:00
Thomas Dinges
0502fc0112 Cycles Standalone:
* Fix compiler warning, == / = mismatch.
2013-08-30 16:39:39 +00:00
Howard Trickey
86f8470a5d Some knife fixes. Avoids duplicating verts; better handling of cut-through ortho.
Now cut lines detect vertices that they pass (almost) exactly over
and snap to them, to avoid making verts vert close to other ones.

Added radius arg to BKE_bmbvh_ray_cast so that can detect an obscuring
face when the ray might otherwise go exactly between two triangles.
Needed an isect_line_tri_epsilon function for similar reason.

Fixes last part of bug #35002. Other knife bugs still present but
getting this commit in now before continuing bug fixing.
2013-08-30 16:34:44 +00:00
Bastien Montagne
03a8b4f180 Cleanup, bitflags as bitshift ops, and some formating... 2013-08-30 13:24:16 +00:00
Campbell Barton
de8dbe36a0 execute bisect immediately (without starting modal input) if the plane is already set or if there is no 3d view available. 2013-08-30 12:48:39 +00:00
Campbell Barton
658e72f47d minor ui edits
- move addon refresh button into header
- uilist, use icon for sorting by name (gives more room for name, icon is used in fileselector for same purpose).
- rename orderby to sort in rna and flag names.
- simplify BKE_nurb_handle_calc_simple
2013-08-30 11:49:35 +00:00
Antony Riakiotakis
5f694a5078 refresh paint_common_properties file on script refresh, found by Sebastian Koenig, thanks 2013-08-30 11:46:19 +00:00
Sergey Sharybin
3db1e1eb72 Followup for rev59629.
Condition in pose mode seemd to be inverted, which made it so
pose mode could not be entered.
2013-08-30 10:20:31 +00:00
Miika Hamalainen
21d670e11e Fix [#36600]: Smoke subframes not working with initial velocity 2013-08-30 09:59:49 +00:00
Tamito Kajiyama
91e5189c90 Fix for [#36599] Freestyle: Line thickness modifier with certain blend types incorrectly calculated.
The inner/outer thickness values were separately blended by Multiply, Divide and other binary
operators, which resulted in the wrong thickness values reported in the issue.  The operations
must be applied to the sum of the inner and outer thickness values.

Also the Minimum and Maximum operators were not properly implemented (one of the two operands
were ignored by mistake).
2013-08-30 09:17:27 +00:00
Sergey Sharybin
9ccf84926d Fix #36605: Segfault when border selecting markers in the "graph" mode when no track is active 2013-08-30 09:11:47 +00:00
Brecht Van Lommel
9135425607 Attempted fix for #36569: couldn't unmap memory errors on Windows. The guardedalloc optimizations were not entirely thread safe for mmap. 2013-08-29 23:46:44 +00:00
Mitchell Stokes
07e655dfa6 Cleaning up some prints related to SDL. 2013-08-29 22:48:37 +00:00