5 years agoSCons: cleaner determination of 32-bit/64-bit builds
Lawrence D'Oliveiro [Tue, 4 Feb 2014 17:55:32 +0000 (18:55 +0100)]
SCons: cleaner determination of 32-bit/64-bit builds

Try not to be x86-centric, remove unneeded blenderdeps variable.

Reviewed By: brecht

Differential Revision:

5 years agoFix missing $BLENDER_USER_DATAFILES in command line help text.
Lawrence D'Oliveiro [Tue, 4 Feb 2014 17:49:30 +0000 (18:49 +0100)]
Fix missing $BLENDER_USER_DATAFILES in command line help text.

Reviewed By: brecht

Differential Revision:

5 years agoCorrect help: -b/--background does not take a file argument
Lawrence D'Oliveiro [Tue, 4 Feb 2014 17:38:59 +0000 (18:38 +0100)]
Correct help: -b/--background does not take a file argument

The documentation for the -b/--background option incorrectly states that it
takes a <file>, however it can run also without a file with e.g. a script.

Reviewed By: brecht

Differential Revision:

5 years agoCleanup: remove completely all-static option, just too complex to support in modern...
Bastien Montagne [Tue, 4 Feb 2014 15:51:41 +0000 (16:51 +0100)]
Cleanup: remove completely all-static option, just too complex to support in modern linuxes!

5 years agoDeb-like distro may use either jack or jack2, add support for this.
Bastien Montagne [Tue, 4 Feb 2014 15:40:15 +0000 (16:40 +0100)]
Deb-like distro may use either jack or jack2, add support for this.

5 years agoFix cycles crash with float image textures on CPU without AVX support.
Brecht Van Lommel [Tue, 4 Feb 2014 15:04:07 +0000 (16:04 +0100)]
Fix cycles crash with float image textures on CPU without AVX support.

The AVX kernel functions for reading image textures could be get used from non-AVX
kernels. These are C++ class methods and need to be marked for inlining, all other
functions are static so they don't leak into other kernels.

5 years agoFix T38427: Sculpt mode dimension changes don't Undo
Sergey Sharybin [Tue, 4 Feb 2014 13:47:17 +0000 (19:47 +0600)]
Fix T38427: Sculpt mode dimension changes don't Undo

5 years agoFix T38411: Free keyframe handles do not snap to frames when duplicating
Sergey Sharybin [Tue, 4 Feb 2014 13:12:19 +0000 (19:12 +0600)]
Fix T38411: Free keyframe handles do not snap to frames when duplicating

5 years agoNode UI: Improved layout for the Shader Mapping node, to match UI guidelines better...
Thomas Dinges [Tue, 4 Feb 2014 12:21:30 +0000 (13:21 +0100)]
Node UI: Improved layout for the Shader Mapping node, to match UI guidelines better (top -> bottom layout).

Patch by Sebastian König. Thanks!

5 years agoFix T37577: Joining two objects with different UVs destroys UVs of one object in...
Bastien Montagne [Tue, 4 Feb 2014 11:09:12 +0000 (12:09 +0100)]
Fix T37577: Joining two objects with different UVs destroys UVs of one object in some specific, reproducable, cases

MLOOPUV CDlayers had "UV Coord" default name, instead of "UVMap", when it is mandatory matching MTEXPOLY and MLOOPUV to have the same name!

5 years agoView3d: fix for roll operating on locked views, now apply to user view
Campbell Barton [Tue, 4 Feb 2014 10:44:37 +0000 (21:44 +1100)]
View3d: fix for roll operating on locked views, now apply to user view

5 years agoView3d: move lock check for orbit into a function and use for dolly too
Campbell Barton [Tue, 4 Feb 2014 10:31:52 +0000 (21:31 +1100)]
View3d: move lock check for orbit into a function and use for dolly too

5 years agoFix for view lock checks with ndof ops, was incorrectly comparing flags
Campbell Barton [Tue, 4 Feb 2014 10:04:36 +0000 (21:04 +1100)]
Fix for view lock checks with ndof ops, was incorrectly comparing flags

5 years agoFix T38440: Segmentation fault in Movie Clip Editor
Alex Babahin [Tue, 4 Feb 2014 09:16:21 +0000 (15:16 +0600)]
Fix T38440: Segmentation fault in Movie Clip Editor

Issue was caused by NULL-pointer de-reference when post-processing
the frame without putting the frame to movie cache.

Differential Revision:

5 years agoFix T38469: Strip delimiter handlers don't move strip correctly with keyboard input
Bastien Montagne [Tue, 4 Feb 2014 08:52:32 +0000 (09:52 +0100)]
Fix T38469: Strip delimiter handlers don't move strip correctly with keyboard input

Issue was in fact in strip update code when transforming, in case we move both left and right
handles the strip is handled twice in the loop, but it was always updated at the end of the
first loop only...

5 years agoFix T38472: allow orbiting locked view when they are already 'user'.
Campbell Barton [Tue, 4 Feb 2014 08:45:22 +0000 (19:45 +1100)]
Fix T38472: allow orbiting locked view when they are already 'user'.

5 years agoBlenderplayer: Fixing a memory leak.
Mitchell Stokes [Wed, 29 Jan 2014 21:39:44 +0000 (13:39 -0800)]
Blenderplayer: Fixing a memory leak.

IMB_moviecache_destruct() was not being called.

5 years agoCode cleanup: removed unnecessary #defines causing re-definition warnings
Andrea Weikert [Mon, 3 Feb 2014 20:24:42 +0000 (21:24 +0100)]
Code cleanup: removed unnecessary #defines causing re-definition warnings

Fixing warnings in own recent commit

5 years agoCode cleanup: declarations for removed functions
Campbell Barton [Mon, 3 Feb 2014 20:11:28 +0000 (07:11 +1100)]
Code cleanup: declarations for removed functions

5 years agoCycles_server also needs to link to libdl on linux
Martijn Berger [Mon, 3 Feb 2014 19:19:15 +0000 (20:19 +0100)]
Cycles_server also needs to link to libdl on linux

5 years agoCycles: small optimization for SSE 4.1 bvh intersector
Sv. Lockal [Mon, 3 Feb 2014 16:46:13 +0000 (20:46 +0400)]
Cycles: small optimization for SSE 4.1 bvh intersector

Gives 0.7% - 1.3% speedup for BMW1M-MikePan scene.

Reviewers: juicyfruit

Differential Revision:

5 years agoFix T38439: allow IOR in range [0, inf] instead of [1, inf] in Cycles.
Brecht Van Lommel [Mon, 3 Feb 2014 16:06:37 +0000 (17:06 +0100)]
Fix T38439: allow IOR in range [0, inf] instead of [1, inf] in Cycles.

The same can be achieved by flipping normals on the mesh, but it can be
convenient to do this in the shader.

5 years agoScanfill: skip checks for loose edges when they can't occur
Campbell Barton [Mon, 3 Feb 2014 15:54:19 +0000 (02:54 +1100)]
Scanfill: skip checks for loose edges when they can't occur

Only editmesh needs this, text, curves, masks - can all skip this check

5 years agoFix T38452: on OS X 10.9, now always use Lion style fullscreen.
Brecht Van Lommel [Mon, 3 Feb 2014 15:45:51 +0000 (16:45 +0100)]
Fix T38452: on OS X 10.9, now always use Lion style fullscreen.

On earlier versions there is no proper multi-monitor support, so we leave the
choice still. But for 10.9 this just interacts better with other elements like
spaces and the dock.

5 years agoCode cleanup: replace while -> for loops
Campbell Barton [Mon, 3 Feb 2014 15:23:01 +0000 (02:23 +1100)]
Code cleanup: replace while -> for loops

5 years agoBevel: remove unused assignments.
Howard Trickey [Mon, 3 Feb 2014 14:51:54 +0000 (09:51 -0500)]
Bevel: remove unused assignments.

Caught by coverity.

5 years agoFix T38424: modal number input ctrl - did not work, only ctrl numpad -.
Brecht Van Lommel [Mon, 3 Feb 2014 14:47:48 +0000 (15:47 +0100)]
Fix T38424: modal number input ctrl - did not work, only ctrl numpad -.

Since there isn't always a numpad available this should work.

5 years agoFix part of T38425: keymap editor search for "1" only showed numpad 1, not 1-key.
Brecht Van Lommel [Mon, 3 Feb 2014 14:44:24 +0000 (15:44 +0100)]
Fix part of T38425: keymap editor search for "1" only showed numpad 1, not 1-key.

5 years agoFix T38420: Segfault when curve deform modifier and cyclic dependency
Sergey Sharybin [Mon, 3 Feb 2014 13:39:49 +0000 (19:39 +0600)]
Fix T38420: Segfault when curve deform modifier and cyclic dependency

Crash was caused by missing curve_cache due to cyclic dependency.
This commit is rather a workaround, but we couldn't really guarantee
proper behavior in cases with cyclic dependency. So rather than calling
object update directly as it used to be let's don't perform curve
deform and be safe for threading instead.

5 years agoOSX: tentative set back TEST_BLENDER_EXE to Debug hardcoded for xcode case,
Jens Verwiebe [Mon, 3 Feb 2014 13:34:47 +0000 (14:34 +0100)]
OSX: tentative set back TEST_BLENDER_EXE to Debug hardcoded for xcode case,
did not found a way yet to use Configuration or run CTEST out of xcode

5 years agoFix T38450: Remove unused Children Offset option
Sergey Sharybin [Mon, 3 Feb 2014 13:33:15 +0000 (19:33 +0600)]
Fix T38450: Remove unused Children Offset option

This option was only exposed to the interface and internally
was doing basically nothing.

Removing it to prevent artists from being confused.

5 years agoCycles: enable /arch:AVX in msvc 11 and later versions for avx kernel
Sv. Lockal [Mon, 3 Feb 2014 13:22:50 +0000 (17:22 +0400)]
Cycles: enable /arch:AVX in msvc 11 and later versions for avx kernel

This enables VEX-encoding in AVX kernel for windows msvc builds and gives 5-10% speedup for different scenes.

Reviewers: juicyfruit, dingto, brecht

Reviewed By: brecht

CC: brecht
Differential Revision:

5 years agoFix T38421: Vertex Parenting & Triangle Vertex Parenting causes segfaults.
Sergey Sharybin [Mon, 3 Feb 2014 13:12:04 +0000 (19:12 +0600)]
Fix T38421: Vertex Parenting & Triangle Vertex Parenting causes segfaults.

Issue was caused by clearing dirty flags from element table in bmesh before
the data was fully ready.

This confused checks happening from threads and some threads did consider
element table is usable while other thread was still filling it in.

5 years agoAdd compatibility for older Collada files
gaiaclary [Mon, 3 Feb 2014 12:04:51 +0000 (13:04 +0100)]
Add compatibility for older Collada files

The Fix in 273 creates a backward incompatibility:
Collada files that have been created with an older Blender version
will contain the spotlight_size in Radians where Collada wants
this value to be in DEGREE.

This fix adds a check for the Blender Version that was used to create the
Collada file. If the Collada file was made by an older version of Blender
then the importer will assume that spotlight_size is specified in RADIANS.

Reviewers: campbellbarton, sauraedron

Reviewed By: sauraedron

CC: jesterking
Differential Revision:

5 years agoFix EXECUTABLE_OUTPUT_PATH binpath for OSX makefiles ( no CMAKE_BUILD_TYPE dir used...
Jens Verwiebe [Mon, 3 Feb 2014 11:57:50 +0000 (12:57 +0100)]
Fix EXECUTABLE_OUTPUT_PATH binpath for OSX makefiles ( no CMAKE_BUILD_TYPE dir used here )

5 years agoFix T38455: Blenderplayer is not working
Sergey Sharybin [Mon, 3 Feb 2014 11:24:25 +0000 (17:24 +0600)]
Fix T38455: Blenderplayer is not working

Was a regression since avg_frame_rate changes.

Didn't find reliable way to get stream duration which will
work with both FFmpeg and Libav so added some freaking black
magic to distinguish one from another.

5 years agoAdd include for FreeBSD and clang
Campbell Barton [Mon, 3 Feb 2014 11:04:23 +0000 (22:04 +1100)]
Add include for FreeBSD and clang

5 years agoFix another player stub after type change
Jens Verwiebe [Mon, 3 Feb 2014 10:55:55 +0000 (11:55 +0100)]
Fix another player stub after type change

5 years agoBGE: correct for last commit
Campbell Barton [Mon, 3 Feb 2014 10:41:00 +0000 (21:41 +1100)]
BGE: correct for last commit

5 years agoImage/Animation loading, remove user-pref extension check.
Campbell Barton [Mon, 3 Feb 2014 08:33:17 +0000 (19:33 +1100)]
Image/Animation loading, remove user-pref extension check.

don't use extension checking preference for low level loading functions,
otherwise a user preference may impact a script loading a file for example.

looked into making this an argument and passing it in, but theres no
real advantage and its simpler just to remove.

5 years agoCode cleanup: check -1 for error return explicitly
Campbell Barton [Mon, 3 Feb 2014 07:59:36 +0000 (18:59 +1100)]
Code cleanup: check -1 for error return explicitly

5 years agoCode cleanup: use bools where possible
Campbell Barton [Mon, 3 Feb 2014 07:55:59 +0000 (18:55 +1100)]
Code cleanup: use bools where possible

5 years agoFixed a possible access to null pointer reference.
Sergey Sharybin [Mon, 3 Feb 2014 07:51:26 +0000 (13:51 +0600)]
Fixed a possible access to null pointer reference.

Patch by tamerlan311 (Alex Babahin)

Reviewers: sergey

Reviewed By: sergey

Differential Revision:

5 years agoFix T38447: Deactivated hotkeys are still showing in menu
Joshua Leung [Mon, 3 Feb 2014 06:23:17 +0000 (19:23 +1300)]
Fix T38447: Deactivated hotkeys are still showing in menu

5 years agoUse bool where appropriate
Joshua Leung [Tue, 28 Jan 2014 01:41:33 +0000 (14:41 +1300)]
Use bool where appropriate

5 years agoCode cleanup: white space and cmake was broken on all platforms
Campbell Barton [Mon, 3 Feb 2014 02:55:26 +0000 (13:55 +1100)]
Code cleanup: white space and cmake was broken on all platforms

5 years agoAssure test works in all OSX buildenvironments/build-types
Jens Verwiebe [Sun, 2 Feb 2014 22:35:00 +0000 (23:35 +0100)]
Assure  test works in all OSX buildenvironments/build-types

5 years agoFix T38435: Crash when pressing MMB in walk mode
Bastien Montagne [Sun, 2 Feb 2014 19:34:23 +0000 (20:34 +0100)]
Fix T38435: Crash when pressing MMB in walk mode

Snap code may be called with a NULL region, add check about this and assume ray_start is OK in this case!

5 years agoCode cleanup / Cycles: Remove unused "curverender" variable from Object class, was...
Thomas Dinges [Sun, 2 Feb 2014 19:11:50 +0000 (20:11 +0100)]
Code cleanup / Cycles: Remove unused "curverender" variable from Object class, was never used.

5 years agoCode cleanup / Cycles: Remove encasing_ratio variable, it was already hard coded...
Thomas Dinges [Sun, 2 Feb 2014 18:52:46 +0000 (19:52 +0100)]
Code cleanup / Cycles: Remove encasing_ratio variable, it was already hard coded, so define it in the kernel only.

5 years agoAdded bevel regression test to tests.
Howard Trickey [Sun, 2 Feb 2014 18:29:08 +0000 (13:29 -0500)]
Added bevel regression test to tests.

Goes with companion files bevel_regression.blend
and just added to svn lib/tests/modeling.

Also changed the blender executable path for Apple case:
needed either 'Debug' or 'Release' in the path. I chose
'Debug', because not sure how to add otherwise. At any
rate, what was currently there didn't work at all.

5 years agoAdd "Create" tab and panel for Metaball Edit Mode
Jonathan Williamson [Sun, 2 Feb 2014 18:27:26 +0000 (12:27 -0600)]
Add "Create" tab and panel for Metaball Edit Mode

This makes the Create tab consistent in metaball editmode with other object types.

5 years agoReorder Curve "Create" tab and add "Create" tab for Surfaces
Jonathan Williamson [Sun, 2 Feb 2014 18:05:13 +0000 (12:05 -0600)]
Reorder Curve "Create" tab and add "Create" tab for Surfaces

This ensures the Create tab doesn't move and that it's available for Surface object types.

5 years agoRemove Grease Pencil panels from toolbar, has own tab
Jonathan Williamson [Sun, 2 Feb 2014 17:38:14 +0000 (11:38 -0600)]
Remove Grease Pencil panels from toolbar, has own tab

The Grease Pencil has it's own dedicated tab. It's no longer necessary to draw in a panel for each object type.

5 years agoUpdate tabs for non-mesh object types
Jonathan Williamson [Sun, 2 Feb 2014 17:31:24 +0000 (11:31 -0600)]
Update tabs for non-mesh object types

This adds appropriate tabs, panels, etc for curves, surfaces, metaballs, text, and armatures. This brings it in line with the changes in rB0972c422c3ac4ed725414baa47838f833b3f4c90

5 years agoUpdate Object Mode Toolbar Tabs
Jonathan Williamson [Sun, 2 Feb 2014 17:00:01 +0000 (11:00 -0600)]
Update Object Mode Toolbar Tabs

This updates the object mode toolbar tabs to reflect the rationale from the Edit Mode tabs.
- Rename "Basic" to "Tools"
- Put "Transform" into it's own panel within Tools
- Also rename Edit Mode "Mesh Tools" to "Tools" for consistency and shorter names
- Ensure Tools tabs are in same location between Edit and Object modes
- Remove redundant "Transform" label from Transform panel

5 years agoCode cleanup: suffix vars to make obvious they are squared
Campbell Barton [Sun, 2 Feb 2014 15:46:45 +0000 (02:46 +1100)]
Code cleanup: suffix vars to make obvious they are squared

5 years agoFix: Compile error due to missing #define for MSVC9 (VisualC++ 2008)
Andrea Weikert [Sun, 2 Feb 2014 13:37:41 +0000 (14:37 +0100)]
Fix: Compile error due to missing #define for MSVC9 (VisualC++ 2008)

Added some relevant #defines copied from extern\libmv\third_party\msinttypes to BLI_sys_types.h so they can be used in blenlib. Made smallhash.c use the BLI_sys_types.h include rather than including <stdint.h> directly

5 years agoFreestyle: Fix for iterations over 0D elements in the reversed order.
Tamito Kajiyama [Sun, 2 Feb 2014 12:59:15 +0000 (21:59 +0900)]
Freestyle: Fix for iterations over 0D elements in the reversed order.

The revision is concerned with Interface0DIterator and StrokeVertexIterator.
These iterators can be generated by Interface1D::vertices_end() and
Stroke::stroke_vertices_end(), respectively.  These methods return an
iterator poinitng the next index of the last 0D element (i.e., iterator's is_end
property is true).  When the iterators created in this way are used with
Python's iterator protocol (e.g., in a for-loop), iterations over 0D elements
are automatically performed in the reversed order.  This functionality was
broken after recent revisions concerning Freestyle iterators.

Also made minor code cleanup (white space).

5 years agoDocstring updates and code cleanup by flokkievids (Folkert de Vries).
Tamito Kajiyama [Sun, 2 Feb 2014 11:58:01 +0000 (20:58 +0900)]
Docstring updates and code cleanup by flokkievids (Folkert de Vries).

5 years agoCode cleanup (mostly indentation and white space).
Tamito Kajiyama [Sat, 1 Feb 2014 07:45:06 +0000 (16:45 +0900)]
Code cleanup (mostly indentation and white space).

5 years agoFix for iterators' at_start flag left unset in C++ to Python conversion utility funct...
Tamito Kajiyama [Sat, 1 Feb 2014 07:30:14 +0000 (16:30 +0900)]
Fix for iterators' at_start flag left unset in C++ to Python conversion utility functions.
Also changed the type of the 'reversed' flag from int to bool.

5 years agoImported D222 Diff 2 (ID 781) by flokkievids (Folkert de Vries).
Tamito Kajiyama [Fri, 31 Jan 2014 04:40:24 +0000 (13:40 +0900)]
Imported D222 Diff 2 (ID 781) by flokkievids (Folkert de Vries).

5 years agoAdd include needed for clang, quiet warning
Campbell Barton [Sun, 2 Feb 2014 10:33:52 +0000 (21:33 +1100)]
Add include needed for clang, quiet warning

5 years agoBMesh: optimize loop_find_regions, reserve array size
Campbell Barton [Sun, 2 Feb 2014 06:41:02 +0000 (17:41 +1100)]
BMesh: optimize loop_find_regions, reserve array size

5 years agoBMesh: optimize lookups for triangle fill
Campbell Barton [Sun, 2 Feb 2014 06:09:38 +0000 (17:09 +1100)]
BMesh: optimize lookups for triangle fill

5 years agoSmallhash: add reserve option to avoid resizing when size is known
Campbell Barton [Sun, 2 Feb 2014 06:08:26 +0000 (17:08 +1100)]
Smallhash: add reserve option to avoid resizing when size is known

5 years agoSmallhash: fixes/improvements
Campbell Barton [Sun, 2 Feb 2014 05:22:05 +0000 (16:22 +1100)]
Smallhash: fixes/improvements

- use magic numbers based on uintptr max, not uint max, to avoid possible collisions with real pointer values on 64bit systems.
- comment BLI_smallhash_remove for now, its not used.
- added smallhash_val_is_used replacing ELEM() checks
- updated docs

5 years agoSmallhash: optimizations
Campbell Barton [Sat, 1 Feb 2014 15:19:11 +0000 (02:19 +1100)]
Smallhash: optimizations

- remove static array used only for copying (use alloca on resize)
- set SMSTACKSIZE to one of the values in 'hashsizes' since the full available size was never used.
- ensure ~1.5x as many buckets as entries, was 3x which caused malloc's quite early on.

5 years agoCode cleanup: use length squared where possible
Campbell Barton [Sat, 1 Feb 2014 14:36:40 +0000 (01:36 +1100)]
Code cleanup: use length squared where possible

5 years agoMath lib: simplify size_to_mat4 and use in b_bone_spline_setup
Campbell Barton [Sat, 1 Feb 2014 14:27:06 +0000 (01:27 +1100)]
Math lib: simplify size_to_mat4 and use in b_bone_spline_setup

5 years agoMath lib: add axis_angle_normalized_to_quat, use when length is known
Campbell Barton [Sat, 1 Feb 2014 10:32:34 +0000 (21:32 +1100)]
Math lib: add axis_angle_normalized_to_quat, use when length is known

5 years agoFix T38432, Fix 38432: more stupid error in view3d ray code, sorry about that.
Bastien Montagne [Sat, 1 Feb 2014 14:06:13 +0000 (15:06 +0100)]
Fix T38432, Fix 38432: more stupid error in view3d ray code, sorry about that.

5 years agoCycles: less instructions for CPU perlin code
Sv. Lockal [Sat, 1 Feb 2014 10:07:53 +0000 (14:07 +0400)]
Cycles: less instructions for CPU perlin code

Also move shuffle() in bvh traversal back (was accidentally lost in SSE hair revert)

5 years agoFix player stub after type change
Jens Verwiebe [Fri, 31 Jan 2014 19:56:51 +0000 (20:56 +0100)]
Fix player stub after type change

5 years agoCode cleanup: be less vague checking invalid index values
Campbell Barton [Fri, 31 Jan 2014 14:45:09 +0000 (01:45 +1100)]
Code cleanup: be less vague checking invalid index values

5 years agoFix for error setting unique names for tracks
Campbell Barton [Fri, 31 Jan 2014 14:40:57 +0000 (01:40 +1100)]
Fix for error setting unique names for tracks

5 years agoCode cleanup: comments and warnings
Campbell Barton [Fri, 31 Jan 2014 13:51:53 +0000 (00:51 +1100)]
Code cleanup: comments and warnings

5 years agoSCons: Simplify Endian determination
Lawrence D'Oliveiro [Fri, 31 Jan 2014 12:20:06 +0000 (13:20 +0100)]
SCons: Simplify Endian determination

Differential Revision:

5 years agoFix compilation error with msvc2012 and 2013 as well
Sergey Sharybin [Fri, 31 Jan 2014 09:30:36 +0000 (15:30 +0600)]
Fix compilation error with msvc2012 and 2013 as well

5 years agoFix for T32843
gaiaclary [Fri, 31 Jan 2014 08:35:00 +0000 (09:35 +0100)]
Fix for T32843

Exported angles for spot size animation is in radians , however Collada expects it to be in degrees.
This patch is for fixing import and export, and also renaming a variable

Reviewers: gaiaclary

Reviewed By: gaiaclary

Differential Revision:

5 years agoEvents: fix for wmEvent prevx, prevy not updating
Campbell Barton [Thu, 30 Jan 2014 20:41:32 +0000 (07:41 +1100)]
Events: fix for wmEvent prevx, prevy not updating

5 years agoMore snapping fixes (this is ridiculous).
Bastien Montagne [Thu, 30 Jan 2014 17:48:49 +0000 (18:48 +0100)]
More snapping fixes (this is ridiculous).

I hope this time we are done!

5 years agoCode cleanup: remove BLI_has_parent
Campbell Barton [Thu, 30 Jan 2014 16:28:53 +0000 (03:28 +1100)]
Code cleanup: remove BLI_has_parent

5 years agoCode cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
Campbell Barton [Thu, 30 Jan 2014 16:09:01 +0000 (03:09 +1100)]
Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie

also use attributes for BLI path functions

5 years agoFix T38409: Snapping Bug
Bastien Montagne [Thu, 30 Jan 2014 16:11:10 +0000 (17:11 +0100)]
Fix T38409: Snapping Bug

Issue partially caused by own errors (glicth in new BKE_boundbox_ray_hit_check() code causing segfault in volume snapping,
and we have to treat ortho and persp differently in case of face snapping, because in persp our ray_start might very well
already be *inside* the boundbox of the checked object), and partly due to the fact that ED_view3d_win_to_vector()
was returning wrong vector (negated one) for ortho views (see previous commit).

5 years agoFix a nice bug in ED_view3d_win_to_vector() - vector returned for an ortho view was...
Bastien Montagne [Thu, 30 Jan 2014 15:48:29 +0000 (16:48 +0100)]
Fix a nice bug in ED_view3d_win_to_vector() - vector returned for an ortho view was negated compared to vector returned for the same view in perspective...

Found while working on snapping issues, confirmed using bisect tool: previous to this commit, inner/outer parts were swapped when switching from otho to persp!

5 years agoFix for crash linking node groups through
Campbell Barton [Thu, 30 Jan 2014 13:53:02 +0000 (00:53 +1100)]
Fix for crash linking node groups through

Defer creating the Python objects until after appending is finished
because NodeTree's types are not initialized until then.

5 years agoFix T38403: Laplacian smooth on instanced objects leads to crash.
Lukas Tönne [Thu, 30 Jan 2014 12:06:48 +0000 (13:06 +0100)]
Fix T38403: Laplacian smooth on instanced objects leads to crash.

The laplacian modifiers (smooth and deform) use the OpenNL library,
which is not threadsafe due to the use of a global context variable.
Ideally this would be changed so that an explicit context can be
created for every caller of the OpenNL functions, but since OpenNL's
most recent version is from 2010 this is unlikely to happen.

As a workaround for now just use a mutex to prevent conflicting OpenNL
calls. Eventually OpenNL can be replaced by eigen or ceres.

5 years agoFix T38358: typo in own rB77089a3bf203.
Bastien Montagne [Thu, 30 Jan 2014 10:51:34 +0000 (11:51 +0100)]
Fix T38358: typo in own rB77089a3bf203.

Also allowed me to fine another potential issue, hit.dist was no more initialized correctly - and I had forgotten to take into account Brecht's remark about normalize_v3() also returning the vector's previous length.

5 years agoSmallhash: refactor and fixes
Campbell Barton [Thu, 30 Jan 2014 09:51:44 +0000 (20:51 +1100)]
Smallhash: refactor and fixes

- BLI_smallhash_remove didnt decrement total entries.
- rename vars to match closer to ghash.
- smallhash_lookup returns NULL when no entry found.
- using a zero value key wasn't supported.
- no need to memset or calloc bucket arrays
- add asserts for unsupported conditions.
- added BLI_smallhash_lookup_p

5 years agoPyAPI: noise.seed_set(), note that zero is a special case.
Campbell Barton [Thu, 30 Jan 2014 06:54:06 +0000 (17:54 +1100)]
PyAPI: noise.seed_set(), note that zero is a special case.

5 years agoFix T38402: invalid message for bad type assignments (Quat, Vector)
Campbell Barton [Thu, 30 Jan 2014 05:45:20 +0000 (16:45 +1100)]
Fix T38402: invalid message for bad type assignments (Quat, Vector)

5 years agoCode cleanup: remove (now) redundant empty text with icon_only
Campbell Barton [Thu, 30 Jan 2014 05:31:57 +0000 (16:31 +1100)]
Code cleanup: remove (now) redundant empty text with icon_only

5 years agoUI: move toggle icons out of layout checks into rna
Campbell Barton [Thu, 30 Jan 2014 05:24:51 +0000 (16:24 +1100)]
UI: move toggle icons out of layout checks into rna

5 years agoUI API: don't use a text label when icon_only is set
Campbell Barton [Thu, 30 Jan 2014 04:28:39 +0000 (15:28 +1100)]
UI API: don't use a text label when icon_only is set

5 years agoWarnings: quiet unused define message
Campbell Barton [Thu, 30 Jan 2014 04:26:22 +0000 (15:26 +1100)]
Warnings: quiet unused define message

5 years agoFix T38400: crash in image_listener accessing deleted object.
Brecht Van Lommel [Wed, 29 Jan 2014 19:28:18 +0000 (20:28 +0100)]
Fix T38400: crash in image_listener accessing deleted object.

Listeners should never dereference this pointer because the object may have
been deleted, it can only be used for comparisons.

5 years agoFix T38358: Face snapping fails on Orthographic view
Bastien Montagne [Wed, 29 Jan 2014 19:10:03 +0000 (20:10 +0100)]
Fix T38358: Face snapping fails on Orthographic view

Issue is caused by start point of ray used to detect faces under the mouse is set rather far away in ortho 3dviews.
The loss of precision on the ray location induced by this can lead to face snapping failures.

Solution is to do the raycasting with a temp start point, much closer to the object we check, and add back
to the found distance the diff to the real start point once detection is done (as we need all hit distances
from all tested objects to be relative to a common point!).

Note this commit only addresses the "face snapping on mesh" case, other kind of snapping do not seem to suffer
from this issue.

Reviewers: brecht, campbellbarton

Differential Revision:

5 years agoFix T37661: color ramps and curve mapping editing not disabled for linked data.
Brecht Van Lommel [Wed, 29 Jan 2014 18:02:32 +0000 (19:02 +0100)]
Fix T37661: color ramps and curve mapping editing not disabled for linked data.