Commit Graph

38860 Commits

Author SHA1 Message Date
Tamito Kajiyama
5725be6f08 Minor code clean-up & removal of unused code segments. 2013-04-20 23:00:27 +00:00
Tamito Kajiyama
62e6d8e757 Fix for a crash due to uninitialized local Main (introduced in revision 56127). 2013-04-20 21:15:17 +00:00
Lukas Toenne
c66acbf3d9 Removed the group_tree_idname property from node types. This was a bit of a hack to associate node group types to specific tree types for node group operators. Since the node group operators now work independent from this property (see r56183) that property is no longer needed and just pollutes the bNodeType struct. 2013-04-20 17:57:45 +00:00
Campbell Barton
01f8b229c9 revert own change from 56177, game bounds can be useful to see in editmode,
also use gcc attributes for smallhash header and some style edits to recent commit.
2013-04-20 17:24:40 +00:00
Lukas Toenne
ef170c16be Fix #34846, Node->Ungroup menu entry is broken. The standard node group operators now don't require the node_type string property any more. They are limited to the Shader, Compositing and Texture node tree types and will pass through for other (pynodes) tree types. Associated node group types are hardcoded.
The original rationale for adding the node_type property was to allow node group operators work generically on any node group type automatically. The problem is that detecting the appropriate node group type and node tree type to use for a group depends on using a node base type. Due to the fact that RNA does not allow multiple inheritance (mixin classes) this is impossible to achieve if node types also have to use a base type such as ShaderNode, CompositingNode or TextureNode.

The idea is now to just "make it work" by limiting the node group operators to the standard tree types. For future pynodes we can implement these operators nicely in Python, which will allow pynodes to use mixin base classes or derive their own operator types and re-use the same keymapping.
2013-04-20 16:50:05 +00:00
Campbell Barton
46b40e112b skip checks in statvis_calc_thickness(). also remove paranoid NULL checks in smallhash.c 2013-04-20 16:49:02 +00:00
Campbell Barton
106d41699a fix [#35025] Mesh Debug samples strange behavior 2013-04-20 16:29:37 +00:00
Campbell Barton
5999aebe4e fix for glitch in object drawing, color of texspace was last used editmode draw color.
also disable BGE bounds drawing when outside of object mode.
2013-04-20 06:22:17 +00:00
Campbell Barton
0e5d4fcd7d code cleanup: remove unused var from drawobject 'warning_recursive'. also remove unused colors from 'colortab'. 2013-04-20 05:50:22 +00:00
Sergey Sharybin
349b71fd02 Bring back support of FFmpeg >= 0.7
After planar codecs support minimal FFmpeg was
bumped to 0.10 which was not so much nice because
it was only released only later last year.

Didn't find a way to make compatibility code local
in ffmpeg_compat, so there're some ifdefs in
audaspace and writeffmpeg.

Not entirely happy, but having a bit of ifdefs in
code better than lots of real PITA for platform
maintainers.
2013-04-19 17:23:08 +00:00
Campbell Barton
1210c8493c style cleanup: edge slide 2013-04-19 15:53:24 +00:00
Campbell Barton
98ef2d1d2e uv project from camera now sets defaults so the image maps to the camera bounds,
also rename newly added `Mesh Debug` -> `Mesh Analysis`
2013-04-19 15:50:17 +00:00
Bastien Montagne
7776e7e7d8 Usual Stupid Blenderplayer Stub Fix™! :P 2013-04-19 15:46:32 +00:00
Ton Roosendaal
ed8b199ac5 UI drawing fix:
Wrongly replaced a "&" with "|" for a define. That made node headers in node editor
draw too dark. Also made header for default node not use alpha.

In general this drawing is not very good - it gets too transparent and dark.
Needs nicer AA function in interface, will be done later.
2013-04-19 15:02:37 +00:00
Gaia Clary
1c502d8316 Added minimal support for progressbar in python 2013-04-19 14:47:11 +00:00
Sergey Sharybin
1d008de24f Fix #34818: Sculpting Mode only rotates around geometry origin (bring bug back)
Made it so average coordinate of previous stroke is used as
a viewport rotation center when Rotate Around Selection is
enabled in user preferences.
2013-04-19 13:26:17 +00:00
Bastien Montagne
e430ee20d5 More fix (cleanup) to r56063: remove call to RNA_create_pointer, it has already been called by uiButGetOperatorPtrRNA() if needed.
(I thought it would also copy idproperties, but as it does not...).
2013-04-19 13:03:30 +00:00
Campbell Barton
c4dbd8bc49 fix for crash in r56063, was just missing an ID property copy (which menu does) 2013-04-19 12:14:15 +00:00
Campbell Barton
5977fa5e2b fix for bug where edge slide could set mouse start/end points to the same value - so you couldnt move the edge loop at all,
now check that the screenspace projection of the start/end points have some length and fallback to fixed offset if none do.

also rename confusingly named vars.
2013-04-19 10:23:48 +00:00
Campbell Barton
73ee226647 fix for incorrect edge slide interpolation at loop endpoings with ngons. 2013-04-19 10:04:23 +00:00
Campbell Barton
0f7fbe13ba fix [#35009] Edge/Vertex Slide issue using G-G.
add support for edge slide on boundary edge loops as well as loops with mixed in boundary faces.
2013-04-19 08:42:11 +00:00
Lukas Toenne
9f8c3783cd Fix for bug reported by Dalai Felinto on IRC, crash in blenderplayer after r56055. The ntreeUpdateTree function uses G.main, which is not defined in blenderplayer (NULL). Using G.main is in itself an ugly hack required for the node verification. Just added a sanity check for now. 2013-04-19 06:50:07 +00:00
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
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
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
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
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