Commit Graph

47197 Commits

Author SHA1 Message Date
Campbell Barton
5aef06fc04 code cleanup: edge slide, avoid building BVH tree, more logical var names. 2013-04-19 02:47:31 +00:00
Campbell Barton
79ac3576ca fix for incorrect edge loop slide direction when one of the loop sides was lost walking around the loop. 2013-04-19 02:36:52 +00:00
Campbell Barton
e0464a0549 code cleanup: remove unused vars in edge slide, only store the initial vertex coords rather then a copy of the whole vertex, name edge slide directions a/b rather then up/dowb. 2013-04-19 02:22:23 +00:00
Campbell Barton
34f9932418 simple optimization, replace BM_face_other_edge_loop() with BM_loop_other_edge_loop() in situations where the loop is known this avoids a lookup. 2013-04-19 01:02:58 +00:00
Campbell Barton
f2f27bf832 style cleanup 2013-04-19 00:37:30 +00:00
Dalai Felinto
43998d6a38 BGE: Extend Framing Mode + Camera sensor
If the "Framing" mode is set to extend,
the camera frustrum changes when you
resizes the blenderplayer window.

Before this patch, there were no way to
control which part of the framing you want
to extend (vertical, horizontal or arbritary).

Now:
If the camera sensor fit is set to HORIZONTAL,
the horizontal field of view doesn't change.
If set to VERTICAL, the vertical fov doesn't change.

If set to AUTO the old behaviour takes place, arbitrarly
showing more of the horizontal or vertical field of view
depending on the aspect ratio of the window.

Test file:
https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests/gameengine/framing_extend.blend

Bugfix supported by NF-UBC Nereus Program as part of the development
of OceanViz/NereusViz
2013-04-18 23:34:32 +00:00
Brecht Van Lommel
c846e3c750 Fix #35014: collada import crash with UV coordinates. 2013-04-18 21:40:06 +00:00
Brecht Van Lommel
116f1ae4d6 Fix #35011: UV unwrap giving poor results for ngons.
Problem is that the scanfill result gives poorly shaped triangles, which is fine
for OpenGL drawing but does not work well for unwrapping. Another problem was
that it was doing random float offsets to avoid some degenerate cases, but this
meant that unwrapping a part of a mesh or the whole thing could give different
results for a UV island. Now UV unwrap does own triangulation of ngons.
2013-04-18 21:00:29 +00:00
Campbell Barton
443d58f65a 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.
2013-04-18 17:31:58 +00:00
Campbell Barton
5502c74a1a fix for problem with too low epsilon when calculating thickness, also increase limits. 2013-04-18 17:23:02 +00:00
Campbell Barton
5c72a19c09 add display mode for sharp edges. 2013-04-18 17:09:56 +00:00
Brecht Van Lommel
feeab1ad53 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.
2013-04-18 16:28:39 +00:00
Brecht Van Lommel
fb2b3155f7 Fix "duplicate area into new window" making the window too big with high DPI / retina. 2013-04-18 16:28:36 +00:00
Brecht Van Lommel
8d756ef914 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.
2013-04-18 16:28:31 +00:00
Ton Roosendaal
4ad289a22d 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 :)
2013-04-18 16:26:58 +00:00
Bastien Montagne
01ffbab8f5 Some i18n tools fixes (I'm ashamed...), and merge func for I18nMessages objects. 2013-04-18 15:26:22 +00:00
Campbell Barton
6db3375e4f code cleanup: removed unneeded null check in object drawing, some warnings, style. 2013-04-18 15:09:30 +00:00
Ton Roosendaal
58a00e7396 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.
2013-04-18 14:55:04 +00:00
Alexander Kuznetsov
177080a15d Disabling live resize for Windows for now.
Bug #34990

However, cleanscreen on redraw is still disabled, so when resizing blender will have frozen image.
2013-04-18 13:30:41 +00:00
Lukas Toenne
1d004e571a 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 ...
2013-04-18 13:16:38 +00:00
Lukas Toenne
0b0abfe6fb 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. 2013-04-18 12:43:30 +00:00
Antony Riakiotakis
a34acd0de4 Beware of SUBSURAFACES (sounds latin) 2013-04-18 12:40:04 +00:00
Sergey Sharybin
85363c79bf 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.
2013-04-18 12:25:13 +00:00
Sergey Sharybin
23d636eaf5 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.
2013-04-18 12:11:50 +00:00
Antony Riakiotakis
3bb53bbeae 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.
2013-04-18 12:03:27 +00:00
Ton Roosendaal
7669d3c17d Bug fix #35017
Blender Render: setting alpha to zero for ray-transp material with refraction did not
render. Was optimized away.
2013-04-18 11:44:00 +00:00
Lukas Toenne
4f23bd8904 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 ...
2013-04-18 11:36:11 +00:00
Bastien Montagne
4587ecd45b 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).
2013-04-18 11:09:25 +00:00
Sergey Sharybin
3430068654 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!
2013-04-18 10:39:53 +00:00
Ton Roosendaal
bde6a939e6 View2D could potentially divide stuff by zero, giving bad matrices. 2013-04-18 10:22:42 +00:00
Ton Roosendaal
dfa30f8207 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 :)
2013-04-18 10:10:58 +00:00
Campbell Barton
5f613886ef fix range for face distortion and display for concave ngons. 2013-04-18 09:12:06 +00:00
Sergey Sharybin
4df0c46f83 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
2013-04-18 08:58:21 +00:00
Ton Roosendaal
093f95afaa Bug fix #34868
Pulldown menus with long shortcut text labels got clipped badly occasionally.
Made the offset follow DPI better.
2013-04-18 08:51:07 +00:00
Campbell Barton
8a06acfd7a add mesh distort display mode (highlights distorted faces) 2013-04-18 04:24:18 +00:00
Campbell Barton
e7895abb32 make bmbvh call BM_mesh_elem_index_ensure(), further calls to utility functions assert if the index values becomes dirty. 2013-04-18 02:01:59 +00:00
Campbell Barton
3f7f07faf5 style cleanup 2013-04-18 01:52:38 +00:00
Campbell Barton
9cceec40c4 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()
2013-04-18 01:20:04 +00:00
Campbell Barton
2fefbf24a5 bmbvh was allocating an array for vert coords but not using it, removed.
also use generic name for callback data.
2013-04-18 00:24:44 +00:00
Campbell Barton
67034c378d fix for BMBVH_USE_CAGE option,
knife tool with modifier was broken when modifier cage was used.
2013-04-18 00:19:57 +00:00
Campbell Barton
4a7feafa49 Support object scale for mesh display options. (currently only uniform scale for thickness test) 2013-04-17 23:30:19 +00:00
Brecht Van Lommel
ed1a08382f 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.
2013-04-17 20:07:22 +00:00
Antony Riakiotakis
f3f5e9553e Turn OpenMP on for MinGW, it works the 32 bit compiler. 2013-04-17 19:54:25 +00:00
Antony Riakiotakis
3fcb75f0b9 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.
2013-04-17 19:35:33 +00:00
Lukas Toenne
2cf167cd21 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. 2013-04-17 17:12:12 +00:00
Lukas Toenne
3d78032251 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. 2013-04-17 15:55:10 +00:00
Brecht Van Lommel
45552a4595 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.
2013-04-17 14:48:01 +00:00
Brecht Van Lommel
cf0e457e52 Fix #35004: fireflies with .tif image in cycles, try to avoid extreme values when
openimageio can't detect premul/straight alpha correct.
2013-04-17 14:47:58 +00:00
Brecht Van Lommel
0fc4f4b791 Fix for render results acquire/release in viewport render, should only release
after drawing to be thread safe.
2013-04-17 14:47:52 +00:00
Ton Roosendaal
96dffe952b Bug fix #34974
The open region indicator (with +) didn't do alpha blending properly, so it wasn't
visible for any theme color.
2013-04-17 13:40:00 +00:00