blender.git
6 years agoremove snapping for first point added to the ruler.
Campbell Barton [Thu, 18 Apr 2013 17:31:58 +0000 (17:31 +0000)]
remove snapping for first point added to the ruler.
its often nice but you can accidentally snap onto far-off objects too which is annoying.

6 years agofix for problem with too low epsilon when calculating thickness, also increase limits.
Campbell Barton [Thu, 18 Apr 2013 17:23:02 +0000 (17:23 +0000)]
fix for problem with too low epsilon when calculating thickness, also increase limits.

6 years agoadd display mode for sharp edges.
Campbell Barton [Thu, 18 Apr 2013 17:09:56 +0000 (17:09 +0000)]
add display mode for sharp edges.

6 years agoFix #34997: when starting the game engine in one window and switching to a second
Brecht Van Lommel [Thu, 18 Apr 2013 16:28:39 +0000 (16:28 +0000)]
Fix #34997: when starting the game engine in one window and switching to a second
window, the game would stop drawing in the first and mess up the OpenGL state of
the second.

Also fixes glPushAttrib/glPopAttrib getting out of sync in some cases.

6 years agoFix "duplicate area into new window" making the window too big with high DPI / retina.
Brecht Van Lommel [Thu, 18 Apr 2013 16:28:36 +0000 (16:28 +0000)]
Fix "duplicate area into new window" making the window too big with high DPI / retina.

6 years agoUV unwrap: decrease ABF minimum angle, I couldn't find cases where it needs to
Brecht Van Lommel [Thu, 18 Apr 2013 16:28:31 +0000 (16:28 +0000)]
UV unwrap: decrease ABF minimum angle, I couldn't find cases where it needs to
be this high, and give better results lower, especially with tesselated ngons.

6 years agoBugfix #34895
Ton Roosendaal [Thu, 18 Apr 2013 16:26:58 +0000 (16:26 +0000)]
Bugfix #34895

Error in shadowbuffer with halo effect. It had render error when you look straight into
the lamp, with something in front of lamp.

The code that was sampling the shadowbuffer exited too soon (for ray going perpendicular to buffer it should take at least 1 sample).

Code from 90ies. And still got a bug fix. Whoa :)

6 years agoSome i18n tools fixes (I'm ashamed...), and merge func for I18nMessages objects.
Bastien Montagne [Thu, 18 Apr 2013 15:26:22 +0000 (15:26 +0000)]
Some i18n tools fixes (I'm ashamed...), and merge func for I18nMessages objects.

6 years agocode cleanup: removed unneeded null check in object drawing, some warnings, style.
Campbell Barton [Thu, 18 Apr 2013 15:09:30 +0000 (15:09 +0000)]
code cleanup: removed unneeded null check in object drawing, some warnings, style.

6 years agoBug fix #34822
Ton Roosendaal [Thu, 18 Apr 2013 14:55:04 +0000 (14:55 +0000)]
Bug fix #34822

Tiny tweak in "Any key modifier" code. It now refuses to accept events when you hold
any key, and then press another key - unless that has key-modifier set.

This enables Houdini style "Hold Spacebar - Leftmouse" view moves.

6 years agoDisabling live resize for Windows for now.
Alexander Kuznetsov [Thu, 18 Apr 2013 13:30:41 +0000 (13:30 +0000)]
Disabling live resize for Windows for now.
Bug #34990

However, cleanscreen on redraw is still disabled, so when resizing blender will have frozen image.

6 years agoA few fixes for recent own commit r56133.
Lukas Toenne [Thu, 18 Apr 2013 13:16:38 +0000 (13:16 +0000)]
A few fixes for recent own commit r56133.

* Index was assigned after increment, leading to NULL pointer access later on when looking up socket from list
* Copying default_value requires a valid NULL pointer for clean check
* Was using default_values as parameters instead of sockets, void pointers just passed through without warning ...

6 years agoFix for #35015, Alpha input in color selectors was showing 0 precision. Probably...
Lukas Toenne [Thu, 18 Apr 2013 12:43:30 +0000 (12:43 +0000)]
Fix for #35015, Alpha input in color selectors was showing 0 precision. Probably caused by r55910. The NUMSLI button now needs either -1 or an explicit precision value in a2.

6 years agoBeware of SUBSURAFACES (sounds latin)
Antony Riakiotakis [Thu, 18 Apr 2013 12:40:04 +0000 (12:40 +0000)]
Beware of SUBSURAFACES (sounds latin)

6 years agoEnable numpy install for buildbot
Sergey Sharybin [Thu, 18 Apr 2013 12:25:13 +0000 (12:25 +0000)]
Enable numpy install for buildbot

Numpy is compiled at build environment, but
importing it from blender somehow fails.

Will need help of Campbell for this.

6 years agoFix for access freed scene when doing freestyle render
Sergey Sharybin [Thu, 18 Apr 2013 12:11:50 +0000 (12:11 +0000)]
Fix for access freed scene when doing freestyle render

It's more like an ownership thing, but it's not so much
clear who actually is an owner of temporary scene, so
for now just ensure Render does not have link to it
after strokes are rendered.

There're also suspicious thing related on why separate
RE_free_database is needed for freestyle renders, but
that's also another story.

6 years agoFix: view plane for sculpting did not work correctly for rotated
Antony Riakiotakis [Thu, 18 Apr 2013 12:03:27 +0000 (12:03 +0000)]
Fix: view plane for sculpting did not work correctly for rotated
objects. Reuse the object space view vector. Also, minor cleanup, reused
cache values instead of requering.

6 years agoBug fix #35017
Ton Roosendaal [Thu, 18 Apr 2013 11:44:00 +0000 (11:44 +0000)]
Bug fix #35017

Blender Render: setting alpha to zero for ray-transp material with refraction did not
render. Was optimized away.

6 years agoFix for #35010, Node Groups don't show up anymore in Material Surface. Fixing the...
Lukas Toenne [Thu, 18 Apr 2013 11:36:11 +0000 (11:36 +0000)]
Fix for #35010, Node Groups don't show up anymore in Material Surface. Fixing the node tree view was a bit of a todo item after pynodes.

To make the type-dependent socket linking in this template a bit more manageable, there are now separate functions that generate "items" for a particular node type consisting of the socket index, name and possibly additional properties required (currently only node groups vs. all other types). This is still nowhere near flexible enough to be used as a generic template all node systems, but works for now.

In order to make this usable as a generic tool we will have to devise a way of storing, comparing, applying node settings *outside of actual node instances*. Then each node needs to tell how sockets are generated based on these properties. For the current nodes this would be far too complicated ...

6 years agoMore i18n tools tweaks:
Bastien Montagne [Thu, 18 Apr 2013 11:09:25 +0000 (11:09 +0000)]
More i18n tools tweaks:
* Remove difflib's quick_ratio() call, from quick tests looks it is four times slower than ratio(), and yet it gives the same results...
* Moved code to find all po's in a dir into its own func (will be used by i18n addon tools too).

6 years agoFix #34970: in glsl mode the vertex paint face mask is not visible
Sergey Sharybin [Thu, 18 Apr 2013 10:39:53 +0000 (10:39 +0000)]
Fix #34970: in glsl mode the vertex paint face mask is not visible

Added face selection code to GLSL draw. We do this for Cycles
already, shall behave expected now.

Checked by Ton, thanks!

6 years agoView2D could potentially divide stuff by zero, giving bad matrices.
Ton Roosendaal [Thu, 18 Apr 2013 10:22:42 +0000 (10:22 +0000)]
View2D could potentially divide stuff by zero, giving bad matrices.

6 years agoBug fix #34943
Ton Roosendaal [Thu, 18 Apr 2013 10:10:58 +0000 (10:10 +0000)]
Bug fix #34943

With extreme narrow scaled editors, the slider/mask code in View3d could deliver
zero sized or invalid window matrices.

Needs confirmation from Sergey if it works :)

6 years agofix range for face distortion and display for concave ngons.
Campbell Barton [Thu, 18 Apr 2013 09:12:06 +0000 (09:12 +0000)]
fix range for face distortion and display for concave ngons.

6 years agoMake freestyle use local Main for temporary objects
Sergey Sharybin [Thu, 18 Apr 2013 08:58:21 +0000 (08:58 +0000)]
Make freestyle use local Main for temporary objects

This means main database is no longer pollutes with
temporary scene and objects needed for freestyle
render.

Actually, there're few of separated temporary mains
now. Ideally it's better to use single one, but it's
not so much trivial to pass it to all classes. Not
so big deal actually.

Required some changes to blender kernel, to make it
possible to add object to a given main, also to
check on mesh materials for objects in given main.
This is all straightforward changes.

As an additional, solved issue with main database
being infinitely polluted with text blocks created
by create_lineset_handler function.

This fixes:
- #35003: Freestyle crashes if user expands objects in FRS1_Scene
- #35012: ctrl+f12 rendering crashes when using Freestyle

6 years agoBug fix #34868
Ton Roosendaal [Thu, 18 Apr 2013 08:51:07 +0000 (08:51 +0000)]
Bug fix #34868

Pulldown menus with long shortcut text labels got clipped badly occasionally.
Made the offset follow DPI better.

6 years agoadd mesh distort display mode (highlights distorted faces)
Campbell Barton [Thu, 18 Apr 2013 04:24:18 +0000 (04:24 +0000)]
add mesh distort display mode (highlights distorted faces)

6 years agomake bmbvh call BM_mesh_elem_index_ensure(), further calls to utility functions asser...
Campbell Barton [Thu, 18 Apr 2013 02:01:59 +0000 (02:01 +0000)]
make bmbvh call BM_mesh_elem_index_ensure(), further calls to utility functions assert if the index values becomes dirty.

6 years agostyle cleanup
Campbell Barton [Thu, 18 Apr 2013 01:52:38 +0000 (01:52 +0000)]
style cleanup

6 years agouse modified vertex coords for calculating display thickness and intersections.
Campbell Barton [Thu, 18 Apr 2013 01:20:04 +0000 (01:20 +0000)]
use modified vertex coords for calculating display thickness and intersections.

internal improvement to editmesh_bvh.c

- optionally pass cage-coords as an arg, rather then calculating the coords in BKE_bmbvh_new(),
  since all callers already have coords calculated.
- de-duplicate coords creation function from knife and bmbvhm, move into own generic function: BKE_editmesh_vertexCos_get()

6 years agobmbvh was allocating an array for vert coords but not using it, removed.
Campbell Barton [Thu, 18 Apr 2013 00:24:44 +0000 (00:24 +0000)]
bmbvh was allocating an array for vert coords but not using it, removed.
also use generic name for callback data.

6 years agofix for BMBVH_USE_CAGE option,
Campbell Barton [Thu, 18 Apr 2013 00:19:57 +0000 (00:19 +0000)]
fix for BMBVH_USE_CAGE option,
knife tool with modifier was broken when modifier cage was used.

6 years agoSupport object scale for mesh display options. (currently only uniform scale for...
Campbell Barton [Wed, 17 Apr 2013 23:30:19 +0000 (23:30 +0000)]
Support object scale for mesh display options. (currently only uniform scale for thickness test)

6 years agoCycles: code refactoring to deduplicate the various BVH traversal variations.
Brecht Van Lommel [Wed, 17 Apr 2013 20:07:22 +0000 (20:07 +0000)]
Cycles: code refactoring to deduplicate the various BVH traversal variations.
Now there is a single BVH traversal code with #ifdefs for various features.
At runtime it will then select the appropriate variation to use depending if
instancing, hair or motion blur is in use.

This makes scenes without hair render a bit faster, especially after the
minimum width feature was added. It's not the most beautiful code, but we can't
use c++ templates and there were already 4 copies, adding 4 more to handle the
hair case separately would be too much.

6 years agoTurn OpenMP on for MinGW, it works the 32 bit compiler.
Antony Riakiotakis [Wed, 17 Apr 2013 19:54:25 +0000 (19:54 +0000)]
Turn OpenMP on for MinGW, it works the 32 bit compiler.

6 years agoFix thumbnails not appearing on MinGW64, was actually a mistake on
Antony Riakiotakis [Wed, 17 Apr 2013 19:35:33 +0000 (19:35 +0000)]
Fix thumbnails not appearing on MinGW64, was actually a mistake on
MinGW-w64 headers (where _stat is actually _stati64), but since we
recommend a specific compiler build it's OK for now. Also tweaked other
places where _wstat is used.

6 years agoFix for #34911, Compositor with multiple views autozooms to node when creating a...
Lukas Toenne [Wed, 17 Apr 2013 17:12:12 +0000 (17:12 +0000)]
Fix for #34911, Compositor with multiple views autozooms to node when creating a link. In order to allow node trees have different offsets in different editor instances, the view_center is now stored primarily in the bNodeTreePath struct for each tree in a node space. The view_center in bNodeTree is only used as an initial setting when opening a node group or switching node trees.

6 years agoFix for node editor lib_link and memfile restore (undo): The snode->nodetree/first...
Lukas Toenne [Wed, 17 Apr 2013 15:55:10 +0000 (15:55 +0000)]
Fix for node editor lib_link and memfile restore (undo): The snode->nodetree/first tree path pointer was not properly mapped on file load due to the fact that it's stored locally in other ID data blocks. Undo was restoring the pointer correctly, but used an ugly hack. Now the SpaceNode->id pointer is linked first, then the datablock is checked for an internal node tree, which is then used instead of trying to lib-link the node tree pointer.

6 years agoCycles: initialize LCG for sss and hair sampling without using the sobol sampler,
Brecht Van Lommel [Wed, 17 Apr 2013 14:48:01 +0000 (14:48 +0000)]
Cycles: initialize LCG for sss and hair sampling without using the sobol sampler,
slightly faster but also fixes the u/v sampling dimensions not longer being at even
values which is needed for best results.

6 years agoFix #35004: fireflies with .tif image in cycles, try to avoid extreme values when
Brecht Van Lommel [Wed, 17 Apr 2013 14:47:58 +0000 (14:47 +0000)]
Fix #35004: fireflies with .tif image in cycles, try to avoid extreme values when
openimageio can't detect premul/straight alpha correct.

6 years agoFix for render results acquire/release in viewport render, should only release
Brecht Van Lommel [Wed, 17 Apr 2013 14:47:52 +0000 (14:47 +0000)]
Fix for render results acquire/release in viewport render, should only release
after drawing to be thread safe.

6 years agoBug fix #34974
Ton Roosendaal [Wed, 17 Apr 2013 13:40:00 +0000 (13:40 +0000)]
Bug fix #34974

The open region indicator (with +) didn't do alpha blending properly, so it wasn't
visible for any theme color.

6 years agoCycles Hair: Corrected own stochastic hair rng mistake and removed an unnecessary...
Stuart Broadfoot [Wed, 17 Apr 2013 11:27:56 +0000 (11:27 +0000)]
Cycles Hair: Corrected own stochastic hair rng mistake and removed an unnecessary padding variable

- Corrected the Sobol dimension and removed a pad variable in Curve Struct.

6 years agoDon't use auto vectorization for MinGW-w64. It may be a source for
Antony Riakiotakis [Wed, 17 Apr 2013 11:16:53 +0000 (11:16 +0000)]
Don't use auto vectorization for MinGW-w64. It may be a source for
trouble. Also fixed a few harmless warnings.

6 years agodisplay options to help with 3d printing.
Campbell Barton [Wed, 17 Apr 2013 09:27:23 +0000 (09:27 +0000)]
display options to help with 3d printing.

editmesh debug info,
- overhang (with axis angle options)
- wall thickness (with min/max distance)
- self-intersections.

access below 'Mesh Display' panel.

6 years agoAdded back the basic Search operator to the node Add menu. This operator should be...
Lukas Toenne [Wed, 17 Apr 2013 07:47:00 +0000 (07:47 +0000)]
Added back the basic Search operator to the node Add menu. This operator should be implemented a bit nicer using the new categories system as well, but for now works just as before.

6 years agoadd function BKE_bmbvh_find_face_segment()
Campbell Barton [Wed, 17 Apr 2013 06:29:13 +0000 (06:29 +0000)]
add function BKE_bmbvh_find_face_segment()
given a segment, finds finds an intersecting faces from the first point to the second, needed for checking self intersections (not used yet).

6 years agocode cleanup: bmesh bvh
Campbell Barton [Wed, 17 Apr 2013 06:18:21 +0000 (06:18 +0000)]
code cleanup: bmesh bvh
- remove unused members from BMBVHTree
- move per-raycast vars from BMBVHTree into per-callback structs (weren't threadsafe).
- simplify BKE_bmbvh_find_vert_closest().

6 years agoadd interp_v3_v3v3v3_uv() to use for use with uv value from isect_ray_tri_v3(), renam...
Campbell Barton [Wed, 17 Apr 2013 05:49:06 +0000 (05:49 +0000)]
add interp_v3_v3v3v3_uv() to use for use with uv value from isect_ray_tri_v3(), rename tree -> bmtree for BMBVHTree.

6 years agotext editor reload no-longer resets scroll & cursor - annoying when making tweaks...
Campbell Barton [Wed, 17 Apr 2013 04:53:23 +0000 (04:53 +0000)]
text editor reload no-longer resets scroll & cursor - annoying when making tweaks to UI scripts.
also restrict freestyle hack to WITH_FREESTYLE define.

6 years agostyle cleanup
Campbell Barton [Wed, 17 Apr 2013 01:16:23 +0000 (01:16 +0000)]
style cleanup

6 years agoBlender Internal Render in viewport
Ton Roosendaal [Tue, 16 Apr 2013 17:39:20 +0000 (17:39 +0000)]
Blender Internal Render in viewport

Because of our release soon, feature has been added behind the Debug Menu.
CTRL+ALT+D and set it to -1. Or commandline --debug-value -1.

When debug set to -1, you can put the viewport to 'render' mode, just like
for Cycles. Notes for testers: (and please no bugs in tracker for this :)

- It renders without AA, MBlur, Panorama, Sequence, Composite
- Only active render layer gets rendered. Select another layer will re-render.
- But yes: it works for FreeStyle renders!
- Also does great for local view.
- BI is not well suited for incremental renders on view changes. This only
  works for non-raytrace scenes, or zoom in ortho or camera mode, or for
  Material changes. In most cases a full re-render is being done.
- ESC works to stop the preview render.
- Borders render as well. (CTRL+B)
- Force a refresh with arrow key left/right. A lot of settings don't trigger
  re-render yet.

Tech notes:

- FreeStyle is adding a lot of temp objects/meshes in the Main database. This
caused DepsGraph to trigger changes (and redraws). I've prepended the names
for these temp objects with char number 27 (ESC), and made these names be
ignored for tag update checking.

- Fixed some bugs that were noticable with such excessive re-renders, like
  for opening file window, quit during renders.

6 years agoSet min value for sampling value of freestyle line geometry modifier to 0.
Sv. Lockal [Tue, 16 Apr 2013 17:12:04 +0000 (17:12 +0000)]
Set min value for sampling value of freestyle line geometry modifier to 0.

Negative sampling does not make any sense and leads to crash.

6 years agoFix: texture scaling for sculpting is different between overlay and
Antony Riakiotakis [Tue, 16 Apr 2013 16:22:26 +0000 (16:22 +0000)]
Fix: texture scaling for sculpting is different between overlay and
stroke. The reason is that we use a different sampling function.
Reported by Michalis Zissiou, thanks!

6 years agoCycles: when render layers have per layer number of samples set, the Sampling
Brecht Van Lommel [Tue, 16 Apr 2013 16:18:14 +0000 (16:18 +0000)]
Cycles: when render layers have per layer number of samples set, the Sampling
panel now has an option to specify how to use them. There's three options:

* Use: render layer samples override scene samples
* Bounded: bound render layer samples by scene samples
* Ignore: ignore render layer sample settings

6 years agoFix some names, and move overlay flag to overlay_flags.
Antony Riakiotakis [Tue, 16 Apr 2013 15:59:02 +0000 (15:59 +0000)]
Fix some names, and move overlay flag to overlay_flags.

6 years agoadd missing call to flush selection on selecting manifold geometry.
Campbell Barton [Tue, 16 Apr 2013 15:45:30 +0000 (15:45 +0000)]
add missing call to flush selection on selecting manifold geometry.

6 years agofix for BKE_bmbvh_ray_cast() returning one of the vertices normals rather then the...
Campbell Barton [Tue, 16 Apr 2013 15:35:01 +0000 (15:35 +0000)]
fix for BKE_bmbvh_ray_cast() returning one of the vertices normals rather then the face normal. also remove redundant NULL checks.

6 years agoadd distance arg to BKE_bmbvh_ray_cast(). currently unused.
Campbell Barton [Tue, 16 Apr 2013 15:16:48 +0000 (15:16 +0000)]
add distance arg to BKE_bmbvh_ray_cast(). currently unused.

6 years agoOption to hide overlay during a stroke. To enable, press the brush icon
Antony Riakiotakis [Tue, 16 Apr 2013 15:02:41 +0000 (15:02 +0000)]
Option to hide overlay during a stroke. To enable, press the brush icon
next to the overlay alpha.

6 years agobmesh speedup for bvh building, replace SmallHash with BLI_bitmap, using a hash doesn...
Campbell Barton [Tue, 16 Apr 2013 14:57:02 +0000 (14:57 +0000)]
bmesh speedup for bvh building, replace SmallHash with BLI_bitmap, using a hash doesn't make much sense since in most cases all vertices are accessed and the hash isn't guaranteed to be small.
gives ~9x speedup to filling 'cagecos' in my own tests on a high poly mesh.

6 years agoFix crash when no brush is active. Reported by Francesco Siddi, on irc
Antony Riakiotakis [Tue, 16 Apr 2013 14:00:18 +0000 (14:00 +0000)]
Fix crash when no brush is active. Reported by Francesco Siddi, on irc
thanks!

6 years agoFix #34966: cycles packed PNG images were showing alpha fringe, packed images
Brecht Van Lommel [Tue, 16 Apr 2013 13:52:38 +0000 (13:52 +0000)]
Fix #34966: cycles packed PNG images were showing alpha fringe, packed images
were not properly premultiplied.

6 years agoskip calling BKE_editmesh_tessface_calc() from BKE_bmbvh_new(), also quiet float...
Campbell Barton [Tue, 16 Apr 2013 13:01:46 +0000 (13:01 +0000)]
skip calling BKE_editmesh_tessface_calc() from BKE_bmbvh_new(), also quiet float/double warnings.

6 years agoFixed compilation error with gcc 4.4 and 4.5
Sergey Sharybin [Tue, 16 Apr 2013 11:27:19 +0000 (11:27 +0000)]
Fixed compilation error with gcc 4.4 and 4.5

Was giving structure re-declaration error,
made it one typedef and struct declaration only.

6 years agoFix #34897: Select edge loop shortcut not working in Maya preset
Sergey Sharybin [Tue, 16 Apr 2013 10:19:21 +0000 (10:19 +0000)]
Fix #34897: Select edge loop shortcut not working in Maya preset

Made it so loop/ring selection are assigned to RELEASE button,
so they're not conflicting with regular selection.

There's still seems to be a conflict between loop and ring
selection, but it was here for ages and that's another story.

6 years agouse psys->seed for smoke random number generator, increase size of MATHUTILS_TOT_CB...
Campbell Barton [Tue, 16 Apr 2013 09:04:34 +0000 (09:04 +0000)]
use psys->seed for smoke random number generator, increase size of MATHUTILS_TOT_CB and reduce float->double conversions.

6 years agoFix for line instability with the Polygonization geometry modifier.
Tamito Kajiyama [Tue, 16 Apr 2013 07:13:49 +0000 (07:13 +0000)]
Fix for line instability with the Polygonization geometry modifier.
Extra long straight lines showed up randomly due to the use of an uninitialized
variable as a line length parameter.

6 years agocode cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_edit...
Campbell Barton [Tue, 16 Apr 2013 05:59:48 +0000 (05:59 +0000)]
code cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_editmesh_bvh.h

6 years agomove editmesh functions out editderivedmesh.c into editmesh.c
Campbell Barton [Tue, 16 Apr 2013 05:46:17 +0000 (05:46 +0000)]
move editmesh functions out editderivedmesh.c into editmesh.c

6 years agomove editmesh_bvh.c into blenkernel.
Campbell Barton [Tue, 16 Apr 2013 05:23:34 +0000 (05:23 +0000)]
move editmesh_bvh.c into blenkernel.

6 years agoupdate uncrustify config, use floats for FloatProperty() min/max
Campbell Barton [Tue, 16 Apr 2013 03:27:51 +0000 (03:27 +0000)]
update uncrustify config, use floats for FloatProperty() min/max

6 years agoCompile fixes for recent commits
Antony Riakiotakis [Tue, 16 Apr 2013 00:56:24 +0000 (00:56 +0000)]
Compile fixes for recent commits

6 years agoFix crash rendering environment maps. I think this freestyle code was not
Brecht Van Lommel [Mon, 15 Apr 2013 23:12:54 +0000 (23:12 +0000)]
Fix crash rendering environment maps. I think this freestyle code was not
intended to be here and probably was left over from some earlier code, as
resetting the configuration on render would lead to data loss.

6 years agoFix crash rendering environment maps.
Brecht Van Lommel [Mon, 15 Apr 2013 23:12:52 +0000 (23:12 +0000)]
Fix crash rendering environment maps.

6 years agoFix a few warnings. One was an actual bug in freestyle where stroke attributes
Brecht Van Lommel [Mon, 15 Apr 2013 23:12:49 +0000 (23:12 +0000)]
Fix a few warnings. One was an actual bug in freestyle where stroke attributes
were not properly interpolated.

6 years agoRandom number generator: replace a bunch of usage of the global random number
Brecht Van Lommel [Mon, 15 Apr 2013 23:12:40 +0000 (23:12 +0000)]
Random number generator: replace a bunch of usage of the global random number
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.

Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.

6 years agoCycles Hair: Strand Minimum Pixel Size
Stuart Broadfoot [Mon, 15 Apr 2013 21:38:31 +0000 (21:38 +0000)]
Cycles Hair: Strand Minimum Pixel Size

Code is added to restrict the pixel size of strands in cycles. It works best with ribbon primitives and a preset for these is included. It uses distance dependent expansion of the strands and then stochastic strand removal to give a fading. To prevent a slowdown for triangle mesh objects in the BVH an extra visibility flag has been added. It is also only applied for camera rays.

The strand width settings are also changed, so that the particle size is not included in the width calculation. Instead there is a separate particle system parameter for width scaling.

6 years agoFix #34978: for cycles, images displayed in the UV editor where coupled to the
Brecht Van Lommel [Mon, 15 Apr 2013 18:05:53 +0000 (18:05 +0000)]
Fix #34978: for cycles, images displayed in the UV editor where coupled to the
active image texture node in the material, now this is removed and the image in
the image editor is decoupled and not changed upon entering edit mode.

This system caused more confusion then it's worth, changing or removing textures
would modify the material but users would often not be aware of this.

6 years agoFix #34975: crash rendering curve/text with modifiers that alter topology,
Brecht Van Lommel [Mon, 15 Apr 2013 17:45:15 +0000 (17:45 +0000)]
Fix #34975: crash rendering curve/text with modifiers that alter topology,
was issue in new freestyle code.

6 years agoTouch properties when clearing/adding to a collection.
Sergey Sharybin [Mon, 15 Apr 2013 16:24:35 +0000 (16:24 +0000)]
Touch properties when clearing/adding to a collection.

Fixes an issue when adding several movie strips fails
second time in sequencer.

6 years agoCMake: add LLVM_STATIC as cmake build option, so linux distributions can link
Brecht Van Lommel [Mon, 15 Apr 2013 16:18:35 +0000 (16:18 +0000)]
CMake: add LLVM_STATIC as cmake build option, so linux distributions can link
LLVM dynamically. Patch by Dan Eicher.

6 years agoFix for cycles border render optimization commit, render status bar was off by 1...
Brecht Van Lommel [Mon, 15 Apr 2013 16:18:33 +0000 (16:18 +0000)]
Fix for cycles border render optimization commit, render status bar was off by 1 pixel.

6 years agoFix #34967: Display transform makes byte image with alpha=0 black
Sergey Sharybin [Mon, 15 Apr 2013 15:41:53 +0000 (15:41 +0000)]
Fix #34967: Display transform makes byte image with alpha=0 black

Skip premultiplication/de-premultiplication when acquiring display
buffer for a byte image. Will make conversion a bit faster also :)

6 years agorename axis_angle_to_mat3_no_norm() --> axis_angle_normalized_to_mat3().
Campbell Barton [Mon, 15 Apr 2013 15:16:11 +0000 (15:16 +0000)]
rename axis_angle_to_mat3_no_norm() --> axis_angle_normalized_to_mat3().
this matches closer to convention from existing functions - angle_v3v3() angle_normalized_v3v3().

also added assert to ensure argument given to axis_angle_normalized_to_mat3() is in fact normalized.

6 years agoFix: when using a search menu with an operator's enum prop, the operator was previous...
Bastien Montagne [Mon, 15 Apr 2013 15:01:12 +0000 (15:01 +0000)]
Fix: when using a search menu with an operator's enum prop, the operator was previously always executed with default options (appart from the search-set enum, of course). Now we store the op's properties in search button, so that you can specify non-default options (as it was already possible with e.g. pop-up menu from an operator's enum prop).

To achieve this, some code (callbacks and search button creation) was moved from wm_operators.c to interface/interface.c, and a new UI function was added, uiDefSearchButO_ptr.

Note: This new code uses the fact that uiButHandleFunc callbacks get executed before operator when one of its arg is the button itself!

Many thanks to Campbell who helped me a lot with this patch!

Cleanup: also removed two unused pointers from uiBut struct.

6 years agoNew implementation for twist brushes.
Antony Riakiotakis [Mon, 15 Apr 2013 14:55:42 +0000 (14:55 +0000)]
New implementation for twist brushes.

It has much better rotation and avoids the compression effect that old
twist brushes have. Also twisting is now non periodic, meaning you can
twist beyond 180 degrees. The amount of twist is also calculated
relative to the angle formed after first translating the mouse away from
the brush center.

6 years agoWIP, jason's patch
Antony Riakiotakis [Mon, 15 Apr 2013 14:55:36 +0000 (14:55 +0000)]
WIP, jason's patch

6 years agoFix #34972: Blender crashes when Force Field-> Curve Guide is created
Sergey Sharybin [Mon, 15 Apr 2013 12:04:55 +0000 (12:04 +0000)]
Fix #34972: Blender crashes when Force Field-> Curve Guide is created

Made it so where_on_path works correct when Curve does
have editNurbs but no Curve->nurbs.

6 years agoadd back attribution field from script.
Campbell Barton [Mon, 15 Apr 2013 11:29:31 +0000 (11:29 +0000)]
add back attribution field from script.

6 years agoFix compilation with current FFmpeg trunk
Sergey Sharybin [Mon, 15 Apr 2013 11:08:02 +0000 (11:08 +0000)]
Fix compilation with current FFmpeg trunk

AVCODEC_MAX_AUDIO_FRAME_SIZE was deprecated and
finally removed from current trunk.

Initial patch by Lawrence D'Oliveiro (ldo) with
own modification, Thanks!

6 years agoMake it so FATAL messages from libmv are print to the console
Sergey Sharybin [Mon, 15 Apr 2013 10:02:33 +0000 (10:02 +0000)]
Make it so FATAL messages from libmv are print to the console
even when --debug-libmv is not passed via command line.

6 years agominor edits to DM_update_weight_mcol(), skip getting vars when in editmode, also...
Campbell Barton [Mon, 15 Apr 2013 08:43:17 +0000 (08:43 +0000)]
minor edits to DM_update_weight_mcol(), skip getting vars when in editmode, also remove old/invalid comment.

6 years agoRemoved the extra ntree->update flag check in lib_verify_nodetree in readfile.c....
Lukas Toenne [Mon, 15 Apr 2013 07:58:15 +0000 (07:58 +0000)]
Removed the extra ntree->update flag check in lib_verify_nodetree in readfile.c. This is unnecessary as the update flag will be checked internally in ntreeUpdateTree anyway, except for the generic bNodeTreeType->update callback (it could even be harmful by preventing necessary updates that don't use the ntree->update flag). Executing this once after loading a node tree is a useful feature for pynodes, so they can do initial verification.

6 years agocode cleanup: minor BMESH_TODO's, some were left in even though they were done/invalid.
Campbell Barton [Mon, 15 Apr 2013 04:34:14 +0000 (04:34 +0000)]
code cleanup: minor BMESH_TODO's, some were left in even though they were done/invalid.

6 years agoFix for bundle adjusting with motion restricted
Sergey Sharybin [Sun, 14 Apr 2013 23:43:00 +0000 (23:43 +0000)]
Fix for bundle adjusting with motion restricted

This commit bundles new libmv version from own branch
which brings fix for wrong parameter block used for
modal solver parameterization.

Fixes #34985: Crash with Motion tracker (Tripod Motion)

6 years agoCycles: optimization for 3D viewport border render with heavy scenes, the OpenGL
Brecht Van Lommel [Sun, 14 Apr 2013 21:42:58 +0000 (21:42 +0000)]
Cycles: optimization for 3D viewport border render with heavy scenes, the OpenGL
render of objects could slow things down when redrawing the view each time a new
sample is displayed.

Now it does a partial redraw of the viewport with only the render border area,
skipping OpenGL object drawing while the render is refining.

6 years agoCycles / Non-Progressive integrator:
Thomas Dinges [Sun, 14 Apr 2013 19:22:12 +0000 (19:22 +0000)]
Cycles / Non-Progressive integrator:
* Subsurface samples were not taken into account for the Sobol directions table.

6 years agoBGE: Cleaning up BL_ShapeDeformer's use of Blender's Key. This also fixes a bug with...
Mitchell Stokes [Sun, 14 Apr 2013 18:54:06 +0000 (18:54 +0000)]
BGE: Cleaning up BL_ShapeDeformer's use of Blender's Key. This also fixes a bug with replicas (added objects) crashing when using shape keys.

6 years agoFreestyle stroke rendering is now done before lens flare. Suggested by Ton on IRC.
Tamito Kajiyama [Sun, 14 Apr 2013 17:24:02 +0000 (17:24 +0000)]
Freestyle stroke rendering is now done before lens flare.  Suggested by Ton on IRC.