blender-staging.git
6 years agoFix T37704: cycles hair render error with hair density vertex group.
Brecht Van Lommel [Tue, 10 Dec 2013 18:47:27 +0000 (19:47 +0100)]
Fix T37704: cycles hair render error with hair density vertex group.

Zero length hairs were causing problems, now it skips rendering them as they
are invisible anyway.

6 years agoNodes UI: add the position field to the color ramp node.
Geoffroy Krantz [Tue, 10 Dec 2013 16:11:03 +0000 (17:11 +0100)]
Nodes UI: add the position field to the color ramp node.

Reviewed By: dingto, brecht

Differential Revision: http://developer.blender.org/D91

6 years agouiList: Small tweak to drag-resize (switch to auto-size mode).
Bastien Montagne [Tue, 10 Dec 2013 15:18:58 +0000 (16:18 +0100)]
uiList: Small tweak to drag-resize (switch to auto-size mode).

When you drag past the smallest size of the list, it switches back to auto-size mode.
This commit makes wider the gap between smallest size and auto-size activation,
previously it could switch to auto-size a bit too easily...

6 years agoFix T37739: uiList drag-resize was not working as expected outside of panels.
Bastien Montagne [Tue, 10 Dec 2013 15:06:20 +0000 (16:06 +0100)]
Fix T37739: uiList drag-resize was not working as expected outside of panels.

Patch by Brecht, with minor edits by myself, thanks a lot!

Tech details: previous drag-resize handling code was based on the assumption that coords
returned by ui_window_to_block() was relative to the bottom on the uiBlock.
This is in fact completly eroneous, usually this func does not translate at all the coords,
it merely rescale them - except for blocks inside panels, where returned values are relative
to the left/bottom corner of the panel... Pretty confusing, solution for now is to store ref mouse
position in window space, and convert them to block each time, just like current mouse pos.

6 years agofix: Fly Navigation centered in viewport, not in camera view
Dalai Felinto [Tue, 10 Dec 2013 14:14:31 +0000 (12:14 -0200)]
fix: Fly Navigation centered in viewport, not in camera view

Summary:
The safe zone, mouse and everything else was relative to the viewport.
It should be relative to the camera 'view' instead.

This problem (noticed while developing the Walk Navigation)
happens when the camera is not centered in the viewport.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: http://developer.blender.org/D78

6 years agoFix T37463: Increasing window size would add space around menu header
Campbell Barton [Tue, 10 Dec 2013 12:54:33 +0000 (23:54 +1100)]
Fix T37463: Increasing window size would add space around menu header

6 years agoScreen Resize: minor code cleanup
Campbell Barton [Tue, 10 Dec 2013 12:52:19 +0000 (23:52 +1100)]
Screen Resize: minor code cleanup

6 years agoFix for off-by-one regression in D41
Campbell Barton [Tue, 10 Dec 2013 11:19:17 +0000 (22:19 +1100)]
Fix for off-by-one regression in D41

making the window larger was using incorrect factor leaving a black bar
on the window edge.

6 years agoMempool/Memarena: hint for unlikely conditions
Campbell Barton [Tue, 10 Dec 2013 10:17:52 +0000 (21:17 +1100)]
Mempool/Memarena: hint for unlikely conditions

6 years agoFix for fix: Paths and copying object
Campbell Barton [Tue, 10 Dec 2013 06:28:25 +0000 (17:28 +1100)]
Fix for fix: Paths and copying object

Fix for T37471 made path copying modify local paths,
now apply the same logic used for save-as.

6 years agoStyle Cleanup
Campbell Barton [Tue, 10 Dec 2013 02:44:46 +0000 (13:44 +1100)]
Style Cleanup

6 years agoStyle changes to refactor commit.
Antony Riakiotakis [Tue, 10 Dec 2013 02:27:53 +0000 (04:27 +0200)]
Style changes to refactor commit.

6 years agoCMake: report messages as status (else ccmake treats like an error)
Campbell Barton [Tue, 10 Dec 2013 02:18:46 +0000 (13:18 +1100)]
CMake: report messages as status (else ccmake treats like an error)

6 years agoDNA Deprecation: add DNA_DEPRECATED_GCC_POISON for enum/structs.
Campbell Barton [Tue, 10 Dec 2013 01:59:04 +0000 (12:59 +1100)]
DNA Deprecation: add DNA_DEPRECATED_GCC_POISON for enum/structs.

also fully remove freestyle raycasting_algorithm

6 years agoPython API: when OIIO is disabled use the same version format.
Campbell Barton [Tue, 10 Dec 2013 01:58:10 +0000 (12:58 +1100)]
Python API: when OIIO is disabled use the same version format.

6 years agoFix T37753: encapsulated the creation of the source ID into one function to ensure...
gaiaclary [Mon, 9 Dec 2013 22:18:01 +0000 (23:18 +0100)]
Fix T37753: encapsulated the creation of the source ID into one function to ensure the id is always created correctly

6 years agoadd new UV editor edge theme colors to preset themes
Antony Riakiotakis [Mon, 9 Dec 2013 22:00:32 +0000 (00:00 +0200)]
add new UV editor edge theme colors to preset themes

6 years agoMissed one usage of use_hidden_preview.
Jeroen Bakker [Mon, 9 Dec 2013 21:16:05 +0000 (22:16 +0100)]
Missed one usage of use_hidden_preview.

6 years agoNode Previews:
Jeroen Bakker [Mon, 9 Dec 2013 20:50:02 +0000 (21:50 +0100)]
Node Previews:
Removed USE_HIDDEN_PREVIEW from source code as it is now deprecated.
The feature was introduced during project mango to quickly hide previews, now that the previews are hidden by default this feature has no need.
Inside the DNA the flag is still visible in comment, this way no one will reuse that value as it could have some side effects

Jeroen & Monique
 - At Mind -

6 years agoFix T37694: cycles particles emitter object rendering when it shouldn't.
Brecht Van Lommel [Mon, 9 Dec 2013 20:57:30 +0000 (21:57 +0100)]
Fix T37694: cycles particles emitter object rendering when it shouldn't.

This was broken by a recent bugfix for T37159.

6 years agoRefactoring/cleanup, borrowed from soc-2013-paint branch.
Antony Riakiotakis [Mon, 9 Dec 2013 20:36:33 +0000 (22:36 +0200)]
Refactoring/cleanup, borrowed from soc-2013-paint branch.

* Move symmetry options to the paint struct (where all paint systems can
make use of it)

* Rename draw_pressure to stroke_active. This is what is really checked
on those occasions that this is used. Also move turning on/off of this
option to the stroke level and avoid doing it on every stroke system.

* Rename BRUSH_RESTORE_MESH to BRUSH_DRAG_DOT. In image painting this
won't restore any mesh, so better have a name that is directly linked to
what the flag actually does.

6 years agoPREVIEW: updated the default themes.
Jeroen Bakker [Mon, 9 Dec 2013 15:20:44 +0000 (16:20 +0100)]
PREVIEW: updated the default themes.

6 years agoCompositor node preview:
Jeroen Bakker [Sun, 8 Dec 2013 20:53:35 +0000 (21:53 +0100)]
Compositor node preview:

moved the hide preview logic to a method on bNodeTreeType. This way the node.c keeps clean, but logic could still be shared.
Implementing this per node, can lead to future errors.

6 years agoEnhancement: By default do not show the previews of composite nodes
Jeroen Bakker [Sun, 1 Dec 2013 20:56:52 +0000 (21:56 +0100)]
Enhancement: By default do not show the previews of composite nodes
only input nodes will show the preview by default.

6 years agoEnhancement: added node colors for every node class
Jeroen Bakker [Sun, 1 Dec 2013 20:30:04 +0000 (21:30 +0100)]
Enhancement: added node colors for every node class

In the user preferences all node classes can get its own color
The in/out color is splitted into 2 sepatate colors
the rna has been updated to better names

6 years agoFix T37751: Crash subdividing bones
Campbell Barton [Mon, 9 Dec 2013 14:14:31 +0000 (01:14 +1100)]
Fix T37751: Crash subdividing bones

6 years agoPython API: when OCIO is disabled use the same version format.
Campbell Barton [Mon, 9 Dec 2013 14:11:02 +0000 (01:11 +1100)]
Python API: when OCIO is disabled use the same version format.

6 years agoArmature Editmode: blend the bone radius when subdividing
Campbell Barton [Mon, 9 Dec 2013 14:02:20 +0000 (01:02 +1100)]
Armature Editmode: blend the bone radius when subdividing

6 years agoFix T37752: Color rna path functions missing
Campbell Barton [Mon, 9 Dec 2013 13:48:59 +0000 (00:48 +1100)]
Fix T37752: Color rna path functions missing

6 years agoFix T37750: Incorrect stats for dupli-metaballs
Campbell Barton [Mon, 9 Dec 2013 13:23:53 +0000 (00:23 +1100)]
Fix T37750: Incorrect stats for dupli-metaballs

6 years agoFix T37715: Incorrect docstring
Campbell Barton [Mon, 9 Dec 2013 13:02:37 +0000 (00:02 +1100)]
Fix T37715: Incorrect docstring

6 years agoGame Engine: Option to record static objects animation
James Yonan [Mon, 9 Dec 2013 11:26:52 +0000 (22:26 +1100)]
Game Engine: Option to record static objects animation

6 years agoFix T37741: Duplicating node editor did not copy node tree pointers.
Lukas Tönne [Mon, 9 Dec 2013 10:54:00 +0000 (11:54 +0100)]
Fix T37741: Duplicating node editor did not copy node tree pointers.

The effect of this is not visible with standard compositor/shader nodes,
because the editor node tree is immediately set from context afterward
using the scene or active material. But with pynodes the context update
is not necessarily defined and the node tree pointer gets lost.

6 years agoFix T37727: z-offset problems with camera view
Campbell Barton [Mon, 9 Dec 2013 09:59:29 +0000 (20:59 +1100)]
Fix T37727: z-offset problems with camera view

6 years agoCode Cleanup: use ELEM macro when checking object type
Campbell Barton [Mon, 9 Dec 2013 06:07:59 +0000 (17:07 +1100)]
Code Cleanup: use ELEM macro when checking object type

6 years agoView3D API: rename view3d_camera_get to ED_view3d_camera_data_get
Campbell Barton [Mon, 9 Dec 2013 06:03:37 +0000 (17:03 +1100)]
View3D API: rename view3d_camera_get to ED_view3d_camera_data_get

6 years agoFix T37712: Point cache index lookup crashed with 0 points stored.
Lukas Tönne [Mon, 9 Dec 2013 10:02:41 +0000 (11:02 +0100)]
Fix T37712: Point cache index lookup crashed with 0 points stored.

The BKE_ptcache_mem_index_find is using unsigned ints for binary search
"high" values - but this leads to integer overflow if the totpoint
number is 0 and causes invalid array access.

6 years agoInterface: Rename "Duplicate Objects" to just "Duplicate", was already done for the...
Thomas Dinges [Mon, 9 Dec 2013 09:49:16 +0000 (10:49 +0100)]
Interface: Rename "Duplicate Objects" to just "Duplicate", was already done for the Mesh/Curve...variants but not for the Object Mode one.

6 years agoFix T37747: keymap import error with region timers.
Brecht Van Lommel [Mon, 9 Dec 2013 05:38:44 +0000 (06:38 +0100)]
Fix T37747: keymap import error with region timers.

6 years agoLattice Editmode: Select Mirror
Campbell Barton [Mon, 9 Dec 2013 04:40:41 +0000 (15:40 +1100)]
Lattice Editmode: Select Mirror

patch originally by Philipp Oeser with some edits.

6 years agoLattice API: add BKE_lattice_index_flip, BKE_lattice_bitmap_from_flag
Campbell Barton [Mon, 9 Dec 2013 04:32:05 +0000 (15:32 +1100)]
Lattice API: add BKE_lattice_index_flip, BKE_lattice_bitmap_from_flag

6 years agoFix build error when building without OSL support.
Brecht Van Lommel [Mon, 9 Dec 2013 04:28:01 +0000 (05:28 +0100)]
Fix build error when building without OSL support.

6 years agoTooltips: abbreviate long python operator tooltips
Walid Shouman [Mon, 9 Dec 2013 03:20:53 +0000 (14:20 +1100)]
Tooltips: abbreviate long python operator tooltips

Some tooltips would end up containing long string/array args spanning the screen.

6 years agoUpdate install_deps.sh to OIIO 1.39 and OSL 1.4.0.
Bastien Montagne [Sun, 8 Dec 2013 17:25:37 +0000 (18:25 +0100)]
Update install_deps.sh to OIIO 1.39 and OSL 1.4.0.

Note that I also updated OpenEXR to 2.1.0 (and updated our CMake openexr module as well).

Users will have to update their build settings as told by the script (also in BUILD_NOTES.txt generated file)!

Note I removed all ugly patches from this script, we are currently using custom git repo for OpenEXR/OIIO/OSL,
hopefully we will soon be able to use vanillia code from official repos!

6 years agoScons: as requested by Ideasman, make MACOSX_COMPILER -> C_COMPILER_ID,
Jens Verwiebe [Sun, 8 Dec 2013 14:35:06 +0000 (15:35 +0100)]
Scons: as requested by Ideasman, make MACOSX_COMPILER -> C_COMPILER_ID,
leave env set for OSX exclusive for now”

6 years agoCycles OSL: update to build with latest OSL master shader group changes.
Brecht Van Lommel [Sun, 8 Dec 2013 14:15:27 +0000 (15:15 +0100)]
Cycles OSL: update to build with latest OSL master shader group changes.

6 years agoCode cleanup: delete cineon header files that were empty but not deleted.
Shane Ambler [Sun, 8 Dec 2013 12:16:26 +0000 (13:16 +0100)]
Code cleanup: delete cineon header files that were empty but not deleted.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D85

6 years agoStyle: use frozen sets
Campbell Barton [Sun, 8 Dec 2013 11:53:55 +0000 (22:53 +1100)]
Style: use frozen sets

6 years agoCycles: Update stdosl.h to OSL 1.4.0. (includes new aastep functions).
Thomas Dinges [Sun, 8 Dec 2013 11:20:15 +0000 (12:20 +0100)]
Cycles: Update stdosl.h to OSL 1.4.0. (includes new aastep functions).

6 years agoCode cleanup: UI cleanup for cycles UI code and fix typo in system info.
Thomas Dinges [Sun, 8 Dec 2013 11:13:09 +0000 (12:13 +0100)]
Code cleanup: UI cleanup for cycles UI code and fix typo in system info.

6 years agoBummer, forgot to test with OSL disabled.
Sergey Sharybin [Sun, 8 Dec 2013 09:19:21 +0000 (15:19 +0600)]
Bummer, forgot to test with OSL disabled.

6 years agoCorrection to previous commit, sorry
Sergey Sharybin [Sun, 8 Dec 2013 09:10:47 +0000 (15:10 +0600)]
Correction to previous commit, sorry

6 years agoExtend system-info with information about OIIO, OCIO and OSL
Sergey Sharybin [Sun, 8 Dec 2013 09:03:17 +0000 (15:03 +0600)]
Extend system-info with information about OIIO, OCIO and OSL

Summary:
Version of those libraries might be useful to know.

- OIIO and OCIO is exposed via bpy.app.oiio and bpy.app.ocio.
  There're "supported", "version" and "version_string" defined
  in those modules.

- OSL is available as _cycles.osl_version and _cycles.osl_version_string.

Reviewers: campbellbarton

Reviewed By: campbellbarton

CC: dingto
Differential Revision: http://developer.blender.org/D79

6 years agoFix T37212: Wrong user counter when more than 32K users
Sergey Sharybin [Sun, 8 Dec 2013 07:34:37 +0000 (13:34 +0600)]
Fix T37212: Wrong user counter when more than 32K users

Summary:
Was a limitation of short data type used for id->us.
Made it to be int, needed to reshuffle fields a bit
because of alignment.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Maniphest Tasks: T37212

Differential Revision: http://developer.blender.org/D76

6 years agoUtil-defines: avoid multiple calculation/access for MIN/MAX macros
Campbell Barton [Sun, 8 Dec 2013 06:29:22 +0000 (17:29 +1100)]
Util-defines: avoid multiple calculation/access for MIN/MAX macros

6 years agoMath lib: optimize hsv/rgb conversion
Campbell Barton [Sun, 8 Dec 2013 06:20:53 +0000 (17:20 +1100)]
Math lib: optimize hsv/rgb conversion

6 years ago3D Text: delete selection before pasting
Campbell Barton [Sat, 7 Dec 2013 11:57:21 +0000 (22:57 +1100)]
3D Text: delete selection before pasting

6 years agoMinor addition for completeness (unlikely to happen), make sure new
Antony Riakiotakis [Sat, 7 Dec 2013 23:57:44 +0000 (01:57 +0200)]
Minor addition for completeness (unlikely to happen), make sure new
sculpt struct has at least dyntopo subdivision turned on.

6 years agoAdd themable colors for edges in UV editor. Reuse WIRE_EDIT for outlines
Antony Riakiotakis [Sat, 7 Dec 2013 23:36:31 +0000 (01:36 +0200)]
Add themable colors for edges in UV editor. Reuse WIRE_EDIT for outlines
and EDGE_SELECT theme colors for selected edges.

6 years agoFix T37731: some window manager operators unnecessarily required a window to be active.
Brecht Van Lommel [Sat, 7 Dec 2013 22:58:18 +0000 (23:58 +0100)]
Fix T37731: some window manager operators unnecessarily required a window to be active.

6 years agoFix T37326 inversion of image channels did not do an undo push. Now only do an undo...
Antony Riakiotakis [Thu, 5 Dec 2013 20:28:14 +0000 (22:28 +0200)]
Fix T37326 inversion of image channels did not do an undo push. Now only do an undo if we are in image paint mode and use the paint undo stack. Also added missing GPU update.:

6 years agoOSX/scons: forgot Intel CC ( ‘icc’ ) in detection
Jens Verwiebe [Sat, 7 Dec 2013 17:05:27 +0000 (18:05 +0100)]
OSX/scons: forgot Intel CC ( ‘icc’ ) in detection
Todo: perhaps unify this for all OS, but keep in mind:
Apple compiler versions may have other capabilities
than std gcc, llvm, clang ( other versioning also )

6 years agoParticles: change material picking from index number in UI to menu with materials.
Geoffroy Krantz [Sat, 7 Dec 2013 00:51:44 +0000 (01:51 +0100)]
Particles: change material picking from index number in UI to menu with materials.

Also fix material slot index not being properly initialized to 1, this got clamped
from zero only on drawing the UI.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D55

6 years agoCycles: network render code updated for latest changes and improved
Martijn Berger [Sat, 7 Dec 2013 01:29:53 +0000 (02:29 +0100)]
Cycles: network render code updated for latest changes and improved

This actually works somewhat now, although viewport rendering is broken and any
kind of network error or connection failure will kill Blender.

* Experimental WITH_CYCLES_NETWORK cmake option
* Networked Device is shown as an option next to CPU and GPU Compute
* Various updates to work with the latest Cycles code
* Locks and thread safety for RPC calls and tiles
* Refactored pointer mapping code
* Fix error in CPU brand string retrieval code

This includes work by Doug Gale, Martijn Berger and Brecht Van Lommel.

Reviewers: brecht

Differential Revision: http://developer.blender.org/D36

6 years agoCycles: show remaining render time in render info text
Thomas Laroche [Sat, 7 Dec 2013 01:22:35 +0000 (02:22 +0100)]
Cycles: show remaining render time in render info text

It's a simple estimate, not very precise but that isn't really possible always.
For progressive render it will become more accurate the longer you render.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D67

6 years agoCode Cleanup: pass rectangles as const in insterface files
Campbell Barton [Sat, 7 Dec 2013 04:47:57 +0000 (15:47 +1100)]
Code Cleanup: pass rectangles as const in insterface files

6 years agoUtil Macros: reduce multiple access & conversion for CLAMP/CLAMPIS/ABS
Campbell Barton [Sat, 7 Dec 2013 03:24:09 +0000 (14:24 +1100)]
Util Macros: reduce multiple access & conversion for CLAMP/CLAMPIS/ABS

6 years agoCompiler warnings: quiet warnings for gcc4.7x
Campbell Barton [Sat, 7 Dec 2013 02:21:59 +0000 (13:21 +1100)]
Compiler warnings: quiet warnings for gcc4.7x
patch from Sergey

6 years agoFix T37722 - Can't undo deleting a screen layout
Joshua Leung [Sat, 7 Dec 2013 00:23:21 +0000 (13:23 +1300)]
Fix T37722 - Can't undo deleting a screen layout

Operations on screen and UI stuff is not actually saved in the undo
files/buffers. Therefore, these shouldn't have the flags set for
getting included for undo and in the last operator settings.

6 years agoCycles / OSL Templates: Add Simplex and Gabor noise templates and remove ones which...
Thomas Dinges [Fri, 6 Dec 2013 17:48:17 +0000 (18:48 +0100)]
Cycles / OSL Templates: Add Simplex and Gabor noise templates and remove ones which are available as regular nodes.

6 years agoOSX/scons: Introduce a new env var 'MACOSX_COMPILER'
Jens Verwiebe [Fri, 6 Dec 2013 16:06:37 +0000 (17:06 +0100)]
OSX/scons: Introduce a new env var 'MACOSX_COMPILER'
This is needed to resolve the real used compiler from the compatibility shim’S or symlinks.
Also set the real CCVERSION as scons CCVERSION would only read the default one, which
is not useful for OSX

6 years agoAlpha channel of a plane track image works fine in MCE now
Sergey Sharybin [Fri, 6 Dec 2013 14:08:37 +0000 (20:08 +0600)]
Alpha channel of a plane track image works fine in MCE now

6 years agoBMesh Py API: add bmesh.geometry.intersect_face_point()
Campbell Barton [Fri, 6 Dec 2013 10:13:11 +0000 (21:13 +1100)]
BMesh Py API: add bmesh.geometry.intersect_face_point()

patch originally by mont29 with some edits.

6 years agoRectangle API: add single axis intersection check
Campbell Barton [Fri, 6 Dec 2013 07:48:55 +0000 (18:48 +1100)]
Rectangle API: add single axis intersection check

6 years agoFix T37710: Missing bounds check for active UI list item could crash.
Campbell Barton [Thu, 5 Dec 2013 23:52:04 +0000 (10:52 +1100)]
Fix T37710: Missing bounds check for active UI list item could crash.

6 years agoAppease grumpy ole gcc 4.7 of MinGW64 (possibly gcc 4.6 of MinGW32 too?)
Antony Riakiotakis [Thu, 5 Dec 2013 21:32:30 +0000 (23:32 +0200)]
Appease grumpy ole gcc 4.7 of MinGW64 (possibly gcc 4.6 of MinGW32 too?)
that cannot convert float to char without false warnings that are turned
into errors with strict flags. I expect that any real conversion
warnings can be caught on linux.

6 years agoRemoved unused Freestyle env_map images.
Tamito Kajiyama [Thu, 5 Dec 2013 22:28:54 +0000 (22:28 +0000)]
Removed unused Freestyle env_map images.

6 years agoForgot to theme-ify color of shadow UVs (color used to draw uvs during
Antony Riakiotakis [Thu, 5 Dec 2013 21:06:41 +0000 (23:06 +0200)]
Forgot to theme-ify color of shadow UVs (color used to draw uvs during
image painting)

6 years agoCorrection to fix of T37688
Sergey Sharybin [Thu, 5 Dec 2013 19:10:16 +0000 (01:10 +0600)]
Correction to fix of T37688

rB68d39a262c90 didn't check correct file for doing
versioning code. It shall check userprefs.blend not
startup.blend.

6 years agoCode Cleanup: use strict flags for math lib, add inline declarations
Campbell Barton [Thu, 5 Dec 2013 16:46:27 +0000 (03:46 +1100)]
Code Cleanup: use strict flags for math lib, add inline declarations

6 years agoFix for own error in recent tessellation update.
Campbell Barton [Thu, 5 Dec 2013 14:31:33 +0000 (01:31 +1100)]
Fix for own error in recent tessellation update.

6 years agoFix T37698: Crash from invalid context access when freeing custom
Lukas Tönne [Thu, 5 Dec 2013 14:02:17 +0000 (15:02 +0100)]
Fix T37698: Crash from invalid context access when freeing custom
python nodes on Blender exit.

The nodeFreeNode function is calling a customizable freefunc callback,
which can be implemented by python. However, the context is invalid when
using this callback while the node tree data block is freed on exit.
Luckily it is also not necessary: When freeing the bNodeTree data blocks
all that is needed is freeing of the DNA data, no other side effects
should happen. So now disable the api callbacks when freeing nodes in
the ntreeFreeTree function.

Also some minor cleanup: checking node->typeinfo is not necessary, all
nodes will always have a valid typeinfo pointer - if a node type is
unknown this will be a stub bNodeType to avoid the need for such checks.

6 years agoFix T37688: User Preferences do not load correctly
Sergey Sharybin [Thu, 5 Dec 2013 13:32:48 +0000 (19:32 +0600)]
Fix T37688: User Preferences do not load correctly

Issue was caused by from_memory=true passing to wm_homefile_read
in case there's a configuration folder for current blender.

But the thing is, we still might fallback to reading home file
from memory (i.e. in cases there's no startup.blend in config
folder).

In this case we still need to run versioning code for userprefs.

6 years agoFix T37703: Shadow pass output image is mangled.
Sergey Sharybin [Thu, 5 Dec 2013 11:31:01 +0000 (17:31 +0600)]
Fix T37703: Shadow pass output image is mangled.

Was a mistake in own optimization commit.

6 years agoBlender Internal: Fix for rendered view crash that happens when changing screen or...
IRIE Shinsuke [Thu, 5 Dec 2013 06:22:55 +0000 (15:22 +0900)]
Blender Internal: Fix for rendered view crash that happens when changing screen or area type

This crash is very similar to T36936.  If changing screen or area type
buried the rendered view, popping up it again may cause the crash by
corrupted render database.

6 years agoUser Interface: Ctrl+C over a menu copies the py command
Campbell Barton [Thu, 5 Dec 2013 06:26:03 +0000 (17:26 +1100)]
User Interface: Ctrl+C over a menu copies the py command

also use bools rather then ints

6 years agoCompiler warnings: quiet float/double conversion warning
Campbell Barton [Wed, 4 Dec 2013 23:34:30 +0000 (10:34 +1100)]
Compiler warnings: quiet float/double conversion warning

6 years agoOSX/scons: fix misdesigned version detection of compiler ( todo: do with submodule...
Jens Verwiebe [Wed, 4 Dec 2013 22:15:29 +0000 (23:15 +0100)]
OSX/scons: fix misdesigned version detection of compiler ( todo: do with submodule ), fix a compiler warning with clang < 5”

6 years agoFix T37189: Inconsistent icons for Force field
Sergey Sharybin [Wed, 4 Dec 2013 19:24:05 +0000 (01:24 +0600)]
Fix T37189: Inconsistent icons for Force field

There's still an issue with Curve Guide force field
which you can not so easily change type from/to.

This i would consider TODO for later.

6 years agoFix T37680: Texture image scale is not refreshing
Sergey Sharybin [Wed, 4 Dec 2013 17:17:59 +0000 (23:17 +0600)]
Fix T37680: Texture image scale is not refreshing

6 years agoAdd alloca include for MSVC
Campbell Barton [Wed, 4 Dec 2013 16:44:51 +0000 (03:44 +1100)]
Add alloca include for MSVC

6 years agoFix for EWA (elliptical weighted average) sampling in the compositor.
Lukas Tönne [Wed, 4 Dec 2013 15:05:56 +0000 (16:05 +0100)]
Fix for EWA (elliptical weighted average) sampling in the compositor.

EWA sampling is designed for downsampling images, i.e. scaling down the size of
input image pixels, which happens regularly in compositing. While the standard
sampling methods (linear, cubic) work reasonably well for linear
transformations, they don't yield good results in non-linear cases like
perspective projection or arbitrary displacement. EWA sampling is comparable to
mipmapping, but avoids problems with discontinuities.

To work correctly the EWA algorithm needs partial derivatives of the mapping
functions which convert output pixel coordinates back into the input image
space (2x2 Jacobian matrix). With these derivatives the EWA algorithm
projects ellipses into the input space and accumulates colors over their
area. This calculation was not done correctly in the compositor, only the
derivatives du/dx and dv/dy were calculation, basically this means it only
worked for non-rotated input images.

The patch introduces full derivative calculations du/dx, du/dy, dv/dx, dv/dy for
the 3 nodes which use EWA sampling currently: PlaneTrackWarp, MapUV and
Displace. In addition the calculation of ellipsis area and axis-aligned
bounding boxes has been fixed.

For the MapUV and Displace nodes the derivatives have to be estimated by
evaluating the UV/displacement inputs with 1-pixel offsets, which can still have
problems on discontinuities and sub-pixel variations. These potential problems
can only be alleviated by more radical design changes in the compositor
functions, which are out of scope for now. Basically the values passed to the
UV/Displacement inputs would need to be associated with their 1st order
derivatives, which requires a general approach to derivatives in all nodes.

6 years agoFix T37690: UI does not immediatelly reflect new length of effect strip
Sergey Sharybin [Wed, 4 Dec 2013 14:47:23 +0000 (20:47 +0600)]
Fix T37690: UI does not immediatelly reflect new length of effect strip

6 years agoFix for interpolation errors on lower-left borders in compositor image
Lukas Tönne [Wed, 4 Dec 2013 10:56:36 +0000 (11:56 +0100)]
Fix for interpolation errors on lower-left borders in compositor image
inputs.

http://wiki.blender.org/uploads/4/4c/Compo_image_interpolation_borders.png

Problem is that all image buffer reader nodes (RenderLayer, Image,
MovieClip) were clipping pixel coordinates to 0..N range (N being width
or height respectively). Bilinear interpolation works ok then on the
upper-right borders (x, N) and (N, y), since the last (N-1) pixel fades
out to N (background). But the lower-left (x, 0) and (0, y) borders are
not correctly interpolated because the nodes cut off the negative pixels
before the interpolation function can calculate their value.

To fix this, the interpolation functions are now entirely responsible
for handling "out of range" cases, i.e. setting (0,0,0,0) results for
invalid pixels, while also handling interpolation for borders.
Callers should not do pixel range checks themselves, which also makes
the code simpler. Should not have any real performance penalty,
the interpolation functions do this check anyway, so is probably even
slightly faster.

6 years agoCode cleanup: remove unused color management functions
Sergey Sharybin [Wed, 4 Dec 2013 09:57:54 +0000 (15:57 +0600)]
Code cleanup: remove unused color management functions

6 years agoCompiler Warnings: disallow 'long' in DNA, its not reliably 64bit (gcc only)
Campbell Barton [Wed, 4 Dec 2013 02:51:41 +0000 (13:51 +1100)]
Compiler Warnings: disallow 'long' in DNA, its not reliably 64bit (gcc only)

6 years agoUser interface: internal change, collect panels to draw before drawing.
Campbell Barton [Wed, 4 Dec 2013 00:54:56 +0000 (11:54 +1100)]
User interface: internal change, collect panels to draw before drawing.

avoids calling poll twice, in some cases

6 years agoFix UI bug with 'socket menus' (used e.g. by cycles' Material panels).
Bastien Montagne [Tue, 3 Dec 2013 23:00:09 +0000 (00:00 +0100)]
Fix UI bug with 'socket menus' (used e.g. by cycles' Material panels).

Also tweaked a bit how nodes with more than one socket available are drawn:
* The node entry itself (a label) has no more any icon, so that it is aligned with the other single-socket nodes.
* The sub-entries (i.e. node's sockets) are more clearly indented (using a blank icon).

Details:
Another case of bad internal UI_HAS_ICON flag erasing by brutally assigning an uneeded value to but->flag.
Revealed by recent split of some button flags into but->drawflag.

Thanks to Thomas Dinge for noting the issue.

6 years agoCode Cleanup: correct fabsf/fabs/abs use
Campbell Barton [Tue, 3 Dec 2013 22:23:29 +0000 (09:23 +1100)]
Code Cleanup: correct fabsf/fabs/abs use

6 years agoUsual UI messages fixes & tweaks.
Bastien Montagne [Tue, 3 Dec 2013 21:42:58 +0000 (22:42 +0100)]
Usual UI messages fixes & tweaks.