Commit Graph

50369 Commits

Author SHA1 Message Date
Thomas Dinges
3d4bbd278a * Code cleanup for M_PI code. 2013-10-10 17:14:04 +00:00
Thomas Dinges
223c637a93 * Fix Windows compiler errors after recent Lock-free memory allocator commit.
Patch by Sergey, thanks. :)
2013-10-10 16:11:57 +00:00
Brecht Van Lommel
b880b01db5 Fix OS X build error in malloc code, and warning in rna. 2013-10-10 15:44:47 +00:00
Dalai Felinto
180de82e41 ocio build fix for Windows
report by email and patch by Benoit Bolsee

"It is a basic compilation bug (variable defined in a c file and declared
in the c++ file: name decoration will change the name in the c++ file
and the linker will not find it)"
2013-10-10 14:24:52 +00:00
Lukas Toenne
0d5856e96e Made node socket flags into enum. 2013-10-10 13:09:00 +00:00
Lukas Toenne
906111cb22 Get rid of the draw_input/draw_output callbacks for nodes. These are pretty useless wrappers around socket draw functions. Only use-case is the File Output node, which draws socket format type instead of
an input value. This is now a special case in the standard socket type drawing, but should eventually become a socket type of its own for the File Output node.
2013-10-10 13:07:09 +00:00
Lukas Toenne
3b7d5a8a40 Change to node output socket drawing: Instead of always drawing only the socket label for outputs, leave this check up to the socket type draw function. This gives custom node scripts more flexibility in
how to draw socket values by allowing buttons on output sockets as well.

http://wiki.blender.org/index.php/Extensions:2.6/Py/API_Changes#Python_Node_Output_Drawing
2013-10-10 12:58:35 +00:00
Lukas Toenne
2a54928563 NodeSocket RNA property 'in_out' renamed as boolean 'is_output'. This is a more useful name and follows the API naming conventions better.
http://wiki.blender.org/index.php/Extensions:2.6/Py/API_Changes#Node_Socket_in_out
2013-10-10 12:58:33 +00:00
Antony Riakiotakis
33894a4cd5 Bake vertex colors should include vertex color alpha as well. 2013-10-10 12:50:34 +00:00
Sergey Sharybin
4bd4037276 Lock-free memory allocator
Release builds will now use lock-free allocator by
default without any internal locks happening.

MemHead is also reduces to as minimum as it's possible.
It still need to be size_t stored in a MemHead in order
to make us keep track on memory we're requesting from
the system, not memory which system is allocating. This
is probably also faster than using a malloc's usable
size function.

Lock-free guarded allocator will say you whether all
the blocks were freed, but wouldn't give you a list
of unfreed blocks list. To have such a list use a
--debug or --debug-memory command line arguments.

Debug builds does have the same behavior as release
builds. This is so tools like valgrind are not
screwed up by guarded allocator as they're currently
are.

--
svn merge -r59941:59942 -r60072:60073 -r60093:60094 \
          -r60095:60096 ^/branches/soc-2013-depsgraph_mt
2013-10-10 11:58:01 +00:00
Lukas Toenne
77a0b90cdf Cleanup: Consistent names for draw callbacks in bNodeType.
This aims to establish a common pattern for the various confusing draw callback function pointers in bNodeType:

draw_<purpose>_<nodetype>[_ex]

Currently there are 4 different types of draw callbacks:
* draw_nodetype, draw_nodetype_prepare: Main draw functions, allows specialized node drawing for things like frames and reroute nodes. Not exposed in the API.
* draw_buttons, draw_buttons_ex: Optional non-socket buttons, most commonly used callback. Extended version used in sidebar for verbose buttons that don't fit into a node.
* draw_backdrop: Draw elements in the backdrop (compositor only). Not exposed in the API.
* draw_input, draw_output: Specialized socket drawing for some nodes, only for OutputFile node. Should not be used any further and be removed at some point. Not exposed in the API.
2013-10-10 11:33:20 +00:00
Antony Riakiotakis
bbd9b5f476 Support for baking vertex colors to textures.
It allows effects such as baking vertex dirt maps to textures.
Also vertex based painting painting may be faster in the future,
so this is useful to have.

Thanks to Sergey for the review!
2013-10-10 11:00:12 +00:00
Irie Shinsuke
4be7427346 Weight Paint Tools: Add "Subset" option to "Normalize All"
This option is needed when vertex groups are used for both armature
deformation and the other purpose such as influence of mesh modifier.

Thanks to Campbell for code review!
2013-10-10 06:33:23 +00:00
Campbell Barton
ea8b44cc15 style cleanup 2013-10-09 21:19:25 +00:00
Sergey Sharybin
0a862cb61a Fix compilation error of OCIO with MSVC 2013-10-09 20:45:29 +00:00
Campbell Barton
feabc7916f fix save-as-copy option changing the filepath for new files. 2013-10-09 20:27:38 +00:00
Sergey Sharybin
36039be6b5 Libmv: make sure CmakeList.txt is re-created with all needed headers on re-bundle 2013-10-09 20:21:12 +00:00
Brecht Van Lommel
a200256451 Fix windows scons OSL build error, just use quotes now instead of array. 2013-10-09 20:11:18 +00:00
Sergey Sharybin
b5491291e4 Libmv: move platform-specific defines into own file 2013-10-09 20:02:02 +00:00
Sergey Sharybin
ccd2e4375a Fix compilation error after recent libmv change
- Tweaked typedefs in stdint so they match
  what we've got in BLI_sys_types (needed to
  explicitly tell sign to MSVC).

  Not so much harmful to be more explicit here,
  but we really better to have single stdint
  int blender.

- Tweaked allocations macros so MSVC is happy
  with structures allocation.
2013-10-09 19:49:09 +00:00
Dalai Felinto
9aeced4711 fix [#37011] "Save Copy" option misfunction 2013-10-09 19:29:50 +00:00
Brecht Van Lommel
bde4148375 Fix OSL shader build failing with spaces in the path to build directory,
patch by Campbell.
2013-10-09 18:48:32 +00:00
Bastien Montagne
110b32cf6f Fix [#37012] The new export split normal does nor produce correct results.
Was a silly error introduced in algo during optimization, vertices having sharp and smooth edges would only get the first poly's normal for each "smooth loop group".

Also done a (minor) optimization, and some comment fixes.
2013-10-09 17:48:27 +00:00
Antony Riakiotakis
f43154606a Fix uber evil (-15 alignment points) own buffer overflow 2013-10-09 16:53:35 +00:00
Lukas Toenne
c1541a940d Fix #36991, After rendering with Sampled Motion Blur, the moving objects place is wrong.
With mblur the render function was setting scene frame for each blur sample and calling DAG update, but not after the last sample is finished, leaving the scene in the wrong frame.
2013-10-09 16:49:13 +00:00
Antony Riakiotakis
b754efcca5 minor code cleanup. 2013-10-09 16:04:08 +00:00
Antony Riakiotakis
fe727ab4a2 Paint cursor overlays: Delete the cursor texture overlay resources when
exiting a paint mode.
2013-10-09 16:00:15 +00:00
Sergey Sharybin
6e1fe4ddd9 Implementation of curve mapping in GLSL
The title says it all, now having curve mapping
enabled in color management settings wouldn't
force fallback from GLSL to CPU based color space
conversion.
2013-10-09 15:57:32 +00:00
Sergey Sharybin
d917bdb095 Derivative map baker
Added support for derivative map baking, which
is accessable as a dedicated baker type. Works
pretty much the same as displacement map baker,
but gives you derivative map.

In fact, inernally this baker is just a filter
which applies on the result of displacement map.

Both regular and multires baking are supported.

Patch by Morten Mikkelsen and self.
2013-10-09 15:51:14 +00:00
Campbell Barton
1255b1e82d fix [#37007] Save to file - increment number doesn't update background color of filename field if hovered 2013-10-09 15:36:04 +00:00
Antony Riakiotakis
4109d5565f better naming for overlay panel, also only expose texture overlay for
modes that support it.
2013-10-09 15:21:49 +00:00
Antony Riakiotakis
df771e59fa Fix for evil bug in last commit, the image painting brush was being used
for the overlay option in all paint modes.
2013-10-09 15:07:48 +00:00
Antony Riakiotakis
59b8097cf8 Segregate all paint cursor overlay options under their own "Overlay"
panel in paint modes. Also expose all options of mask textures in the
mask texture panel, even if there is no texture, just like regular
textures are presented.
2013-10-09 14:57:48 +00:00
Campbell Barton
de3f6b3ec1 re-enable activating the text input field for new popup dialog boxes,
I'd disabled this for 2.68 since it caused bug [#36109].

This fix now only enabled text activation for popups. (so the toolbar textboxes are skipped)
2013-10-09 14:35:25 +00:00
Sergey Sharybin
49bc310671 Move guarded objetc allocation to a guardedalloc header
Also made libmv-capi use guarded objetc allocation.
Run into some suspecious cases when it was not so
clear whether memory is being freed or not.

Now we'll know for sure whether there're leaks or not :)

Having this macros in a guardedalloc header helps
using them in other areas (for now it's OCIO and libmv,
but in the future it'll be more places).
2013-10-09 08:46:02 +00:00
Campbell Barton
22a30f78f2 style cleanup 2013-10-09 05:59:35 +00:00
Dalai Felinto
ac908090ad fix for building with OPENJPEG after PSD commit
reported via email, patch by PerfectionCat
2013-10-09 02:48:42 +00:00
Dalai Felinto
48afcb80b5 fix building when WITH_PSD is OFF, stub is not needed afterall 2013-10-09 02:33:44 +00:00
Dalai Felinto
4abb8fde95 Photoshop PSD support
We now support the combined layer of Photoshop files (stored as layer 0
in the file). This way users can keep their files as multilayer PSD and
Blender always handle them as flat images.

For perfect alpha this requires an OpenImageIO update:
342cc2633f

Photoshop sample files:
https://github.com/OpenImageIO/oiio-images

Brecht has some pending fixes to push for OIIO as well, so we may as
well wait to update our libraries.

What works:
===========
* 8bit images (with or without alpha)
* 16bits images (alpha discarded)
* Photoshop files saved with 'Maximum Compatibility'
* Cycles, Blender internal,  BGE (and player)

Known limitations
(due to OIIO dependency):
=========================
* Images with less than 4 channels show a wrong thumbnail (bug may be in  OIIO)
* Packed images are not supported
* We do not write PSD files.

Note: old Blenders have support for PSD via Quicktime library. But due
to license issues this was discontinued.

Many thanks for Brecht van Lommel for reviewing the patch, suggesting
multiple improvements and to help solving the alpha issue.
2013-10-08 21:17:24 +00:00
Campbell Barton
590f58d455 code cleanup: redundant includes and add minor comments. 2013-10-08 20:18:38 +00:00
Campbell Barton
bfd6f6041d remove redundant NULL checks 2013-10-08 19:47:53 +00:00
Dalai Felinto
8e9aa452bb Triangulate Modifier changes - using scanfill
The ear loop method is potentially too slow (OˆN).

We are not using the 'beauty' option at the moment.
I'll incorporate that next.
(and later specific methods for quad splitting)

Patch done in collaboration (and reviewed by)  with Campbell Barton.
2013-10-08 19:28:11 +00:00
Thomas Dinges
0973270fbf * Code cleanup, comments in readfile.c. 2013-10-08 17:15:49 +00:00
Thomas Dinges
e6ce07a5d4 Cycles / SSS:
* Remove the compatible falloff SSS implementation. We shouldn't support two implementations in the long term, and 2.7x is a good release number do break some compatibility as well. 

* Version patch added, so Files with Compatible falloff will automatically use Cubic now. 

It was already mentioned in the manual, that Compatible is deprecated. 
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#BSSRDF
2013-10-08 17:07:18 +00:00
Campbell Barton
03f7885b0a id-data eyedropprt, currently only accessible via the Ekey,
We need to investigate ways to add options like this without cluttering the interface.
2013-10-08 15:32:54 +00:00
Thomas Dinges
b5a5773fa9 Cycles / CUDA:
* Remove support for  CUDA Toolkit 4.x, only Toolkit 5.0 and above are supported now.
* Remove support for sm_1x cards (< Fermi) for good. We didn't officially support those cards for a few releases already, now remove some special code that was still there.
2013-10-08 15:29:28 +00:00
Thomas Dinges
dfe1610504 Release Maintenance:
* Blender 2.70 release cycle begins, BCon1.
2013-10-08 15:23:19 +00:00
Campbell Barton
ed758beb66 move eyedropper into its own file, uses mostly different includes to interface_ops.c 2013-10-08 15:07:52 +00:00
Campbell Barton
e8551313f6 e-key to access the eyedropper over a color button. 2013-10-08 13:58:28 +00:00
Campbell Barton
d41413758d move color button event handling into its own function. 2013-10-08 13:49:42 +00:00