blender.git
8 years agotweak to vertex slide drawing, reduce line alpha, could cover vertex and make it...
Campbell Barton [Mon, 22 Apr 2013 15:13:47 +0000 (15:13 +0000)]
tweak to vertex slide drawing, reduce line alpha, could cover vertex and make it hard to see whats happening.

8 years agoFix #35051: when viewing a complex node setup in the material properties, the
Brecht Van Lommel [Mon, 22 Apr 2013 15:03:19 +0000 (15:03 +0000)]
Fix #35051: when viewing a complex node setup in the material properties, the
properties were continuously redrawing, which slowed down everything else.

The problem was integer overflow, with a short only capable of storing values
up to 32767. Note that sockets are collapsed by default since the previous
release, and that's it's not very useful to edit such complex node setups in
the properties editor, it's mainly meant for simple setups or group nodes to
present just a few sockets.

8 years agoFix #34350: Maya Keyboard map preset problems
Sergey Sharybin [Mon, 22 Apr 2013 14:56:41 +0000 (14:56 +0000)]
Fix #34350: Maya Keyboard map preset problems

Two main things:

- Made a python operator for selection in a viewport
  which will de-select everything if nothing is under
  the mouse.

  To do so needed to modify VIEW3D_OT_select, so invoke
  sets mouse location which is later used by exec
  function.

  This way it's possible to select stuff from python
  defined operator.

  Not best-ever solution since ideally exec() shall not
  do OpenGL stuff, but we've got this issue in some
  other operators. We'll solve this later.

- Used a keymap from Gianmichele Mariani as a reference,
  updated his keymap to latest changes in operators.

  We shall match Maya keymap much better now, thanks
  for the keymap dude!

8 years agoAttempt to fix #35041 and #34725: cycles crash with OSL and both a 3D viewport
Brecht Van Lommel [Mon, 22 Apr 2013 14:27:12 +0000 (14:27 +0000)]
Attempt to fix #35041 and #34725: cycles crash with OSL and both a 3D viewport
and preview running at the same time.

It seems there's something in OSL/LLVM that's not thread safe, but I couldn't
figure out what exactly. Now all renders share the same OSL ShadingSystem which
should avoid the problem.

8 years agoFix #35054: adjust tooltip for Render Border option in 3D view panel to say
Brecht Van Lommel [Mon, 22 Apr 2013 14:26:57 +0000 (14:26 +0000)]
Fix #35054: adjust tooltip for Render Border option in 3D view panel to say
it has an effect outside of the camera view.

8 years agoBugfix [#34836] Crash when driver variable has path == 'data'
Joshua Leung [Mon, 22 Apr 2013 13:22:07 +0000 (13:22 +0000)]
Bugfix [#34836] Crash when driver variable has path == 'data'

Most of the places which relied on RNA_path_resolve() did so believing that if
it returned true, that it had found a valid property, and that the returned
pointer+property combination would be what the path referred to. However, it
turns out that if the property at the end of the path turns out to be a
"pointer" property (e.g. "data" for Object.data), this would automatically
become the pointer part, while the prop part would be set to null. Hence, if a
user accidentally (or otherwise) specifies a path for the single-property driver
variable type like this, then Blender would crash.

This commit introduces two convenience functions - RNA_path_resolve_property()
and RNA_path_resolve_property_full() - which mirror/wrap the existing
RNA_path_resolve() functions. The only difference though is that these include a
check to ensure that what was found from resolving the path was in fact a
property (they only return true iff this is the case), and make it explicitly
clear in the name that this is what they will do so that there's no further
confusion. It is possible to do without these wrapper functions by doing these
checks inline, but the few cases that had been patched already were pretty
hideous looking specimens. Using these just make it clearer and simpler for all.

I've also beefed up the docs on these a bit, and changed these to using bools.

8 years agofix [#35026] Curve build modifier
Campbell Barton [Mon, 22 Apr 2013 12:00:37 +0000 (12:00 +0000)]
fix [#35026] Curve build modifier

8 years agoFootage information panel
Sergey Sharybin [Mon, 22 Apr 2013 11:19:12 +0000 (11:19 +0000)]
Footage information panel

Displays such information as current frame dimension,
frame number within image sequence/movie and in case
of image sequence input displays current file name of
a frame.

Not entirely happy with such approach, but was requested
a lot by artists.

8 years agoSupport more mapping modes for alpha masks. Tiled, stencil and random
Antony Riakiotakis [Mon, 22 Apr 2013 10:46:01 +0000 (10:46 +0000)]
Support more mapping modes for alpha masks. Tiled, stencil and random

8 years agoFix #35037: Compositor: MultilayerEXR + undo loses image. Crash when selecting in...
Sergey Sharybin [Mon, 22 Apr 2013 10:08:58 +0000 (10:08 +0000)]
Fix #35037: Compositor: MultilayerEXR + undo loses image. Crash when selecting in Image Editor

Issue was cause dby ima->ibufs being stored in a ma on
undo/redo and ima->rr not. In case of multilayer image
ibufs hares pointer with render result, so current
undo/redo policy lead to a dead pointer stored in ibuf.

Made it so ima->rr also stores in the map and restores
on redo/undo keeping all the pointers fine.

8 years agoFix #35039: two other issues with curve caps
Sergey Sharybin [Mon, 22 Apr 2013 09:26:02 +0000 (09:26 +0000)]
Fix #35039: two other issues with curve caps

- Skip filling caps if spline is cyclic
- Use hard limit of 1024 for curve resolution

8 years agoUpdate Ceres to current upstream version
Sergey Sharybin [Mon, 22 Apr 2013 09:25:37 +0000 (09:25 +0000)]
Update Ceres to current upstream version

This brings a fixes for threading issue in BLAS
making BA step more robust (there were some in-detemrinacy
caused by this threading issue).

Also brings some optimizations, which does not directly
affect on blender.

8 years agofix for error in own recent changes to vertex weight drawing in editmode.
Campbell Barton [Mon, 22 Apr 2013 06:16:03 +0000 (06:16 +0000)]
fix for error in own recent changes to vertex weight drawing in editmode.
where disabling show_weight, the colors would still draw.

8 years agorevision r56196 adding uv select more/less used 4 nested 'for' loops,
Campbell Barton [Mon, 22 Apr 2013 06:02:30 +0000 (06:02 +0000)]
revision r56196 adding uv select more/less used 4 nested 'for' loops,
rewrite to use only 2.

also use generic, reusable functions for selection flushing so each operator doesn't need to implement its own.
and merge more-less operation into the same function, just call the selection flush function with select/deselect arg.

8 years agoremove unneeded null checks from commit r56194, also minor style cleanup.
Campbell Barton [Mon, 22 Apr 2013 03:08:56 +0000 (03:08 +0000)]
remove unneeded null checks from commit r56194, also minor style cleanup.

8 years agorigidbody: Add function to perform convex sweep test
Sergej Reich [Sun, 21 Apr 2013 19:53:40 +0000 (19:53 +0000)]
rigidbody: Add function to perform convex sweep test

This is a experimental collision detection function, so the API might
change in the future.

Note: The simulation needs to be stepped before this function can be
used, otherwise the rigid body world might not be valid.

Patch [#34989]  Bullet Convex sweep test API
by Vilem Novak (pildanovak), thanks!

8 years agoAdd Select More (ctrl np+) and Select Less (ctrl np-) to UV editor
Sv. Lockal [Sun, 21 Apr 2013 19:04:04 +0000 (19:04 +0000)]
Add Select More (ctrl np+) and Select Less (ctrl np-) to UV editor

These tools allow to extend or shrink uv selection like in edit mode, but also take selection mode, sync mode and sticky mode into account.

8 years agoFix for NULL pointer bug, reported by Jens Verwiebe in IRC. ED_node_tag_update_id...
Lukas Toenne [Sun, 21 Apr 2013 18:11:00 +0000 (18:11 +0000)]
Fix for NULL pointer bug, reported by Jens Verwiebe in IRC. ED_node_tag_update_id tries to get a node tree from the active id pointer, but this only works for standard node types, not for pynodes.

8 years agofix [#35043] Camera view breaks with multiple scenes and the "view center camera...
Campbell Barton [Sun, 21 Apr 2013 16:08:49 +0000 (16:08 +0000)]
fix [#35043] Camera view breaks with multiple scenes and the "view center camera" action.

8 years agoFix for add nodes search box showing nasty "UUUUUUUU"-like entries with some python...
Bastien Montagne [Sun, 21 Apr 2013 13:51:51 +0000 (13:51 +0000)]
Fix for add nodes search box showing nasty "UUUUUUUU"-like entries with some python builds...

Workaround for an issue with python: strings generated by py scripts should also exist in python as long as they are used in C. Else C code may access freed memory.

Simply store the generated list of items in the class, for now. :/

8 years agomissed this previous commit (r56188), using normalized angle function.
Campbell Barton [Sun, 21 Apr 2013 13:29:24 +0000 (13:29 +0000)]
missed this previous commit (r56188), using normalized angle function.

8 years agoutility function volume_tetrahedron(), for mathutils and BLI math.
Campbell Barton [Sun, 21 Apr 2013 13:24:45 +0000 (13:24 +0000)]
utility function volume_tetrahedron(), for mathutils and BLI math.

8 years agocode cleanup: avoid unneeded normalizations when joining tris -> quads, also correct...
Campbell Barton [Sun, 21 Apr 2013 13:10:05 +0000 (13:10 +0000)]
code cleanup: avoid unneeded normalizations when joining tris -> quads, also correct assert with edge-collapse-decimate.

8 years agoMinor code clean-up & removal of unused code segments.
Tamito Kajiyama [Sat, 20 Apr 2013 23:00:27 +0000 (23:00 +0000)]
Minor code clean-up & removal of unused code segments.

8 years agoFix for a crash due to uninitialized local Main (introduced in revision 56127).
Tamito Kajiyama [Sat, 20 Apr 2013 21:15:17 +0000 (21:15 +0000)]
Fix for a crash due to uninitialized local Main (introduced in revision 56127).

8 years agoRemoved the group_tree_idname property from node types. This was a bit of a hack...
Lukas Toenne [Sat, 20 Apr 2013 17:57:45 +0000 (17:57 +0000)]
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.

8 years agorevert own change from 56177, game bounds can be useful to see in editmode,
Campbell Barton [Sat, 20 Apr 2013 17:24:40 +0000 (17:24 +0000)]
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.

8 years agoFix #34846, Node->Ungroup menu entry is broken. The standard node group operators...
Lukas Toenne [Sat, 20 Apr 2013 16:50:05 +0000 (16:50 +0000)]
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.

8 years agoskip checks in statvis_calc_thickness(). also remove paranoid NULL checks in smallhash.c
Campbell Barton [Sat, 20 Apr 2013 16:49:02 +0000 (16:49 +0000)]
skip checks in statvis_calc_thickness(). also remove paranoid NULL checks in smallhash.c

8 years agofix [#35025] Mesh Debug samples strange behavior
Campbell Barton [Sat, 20 Apr 2013 16:29:37 +0000 (16:29 +0000)]
fix [#35025] Mesh Debug samples strange behavior

8 years agoForgot disable else and it became: else /* */ break;
Alexander Kuznetsov [Sat, 20 Apr 2013 16:14:31 +0000 (16:14 +0000)]
Forgot disable else and it became: else /* */ break;
Caused a crash on Windows on alt-key when a tablet was plug in.

8 years agocode cleanup: minor improvements to scripts.
Campbell Barton [Sat, 20 Apr 2013 13:23:53 +0000 (13:23 +0000)]
code cleanup: minor improvements to scripts.
- make wm-property operators use INTERNAL option.
- make console use str.expandtabs() rather then replacing tab->spaces.

8 years agocode cleanup: simplify python rigidbody operators.
Campbell Barton [Sat, 20 Apr 2013 13:22:08 +0000 (13:22 +0000)]
code cleanup: simplify python rigidbody operators.

8 years agofix for glitch in object drawing, color of texspace was last used editmode draw color.
Campbell Barton [Sat, 20 Apr 2013 06:22:17 +0000 (06:22 +0000)]
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.

8 years agocode cleanup: remove unused var from drawobject 'warning_recursive'. also remove...
Campbell Barton [Sat, 20 Apr 2013 05:50:22 +0000 (05:50 +0000)]
code cleanup: remove unused var from drawobject  'warning_recursive'. also remove unused colors from 'colortab'.

8 years agoBring back support of FFmpeg >= 0.7
Sergey Sharybin [Fri, 19 Apr 2013 17:23:08 +0000 (17:23 +0000)]
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.

8 years agoRestore usage of difflib's quick_ratio()... Don't actually know what happens here...
Bastien Montagne [Fri, 19 Apr 2013 16:23:02 +0000 (16:23 +0000)]
Restore usage of difflib's quick_ratio()... Don't actually know what happens here, my tests with timeit showed it much slower than ratio(), but real-life says the contrary...

8 years agostyle cleanup: edge slide
Campbell Barton [Fri, 19 Apr 2013 15:53:24 +0000 (15:53 +0000)]
style cleanup: edge slide

8 years agouv project from camera now sets defaults so the image maps to the camera bounds,
Campbell Barton [Fri, 19 Apr 2013 15:50:17 +0000 (15:50 +0000)]
uv project from camera now sets defaults so the image maps to the camera bounds,
also rename newly added `Mesh Debug` -> `Mesh Analysis`

8 years agoUsual Stupid Blenderplayer Stub Fix™! :P
Bastien Montagne [Fri, 19 Apr 2013 15:46:32 +0000 (15:46 +0000)]
Usual Stupid Blenderplayer Stub Fix™! :P

8 years agoUI drawing fix:
Ton Roosendaal [Fri, 19 Apr 2013 15:02:37 +0000 (15:02 +0000)]
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.

8 years agoAdded minimal support for progressbar in python
Gaia Clary [Fri, 19 Apr 2013 14:47:11 +0000 (14:47 +0000)]
Added minimal support for progressbar in python

8 years agoFix #34818: Sculpting Mode only rotates around geometry origin (bring bug back)
Sergey Sharybin [Fri, 19 Apr 2013 13:26:17 +0000 (13:26 +0000)]
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.

8 years agoMore fix (cleanup) to r56063: remove call to RNA_create_pointer, it has already been...
Bastien Montagne [Fri, 19 Apr 2013 13:03:30 +0000 (13:03 +0000)]
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...).

8 years agoPy API doc generation: add bpy.app.translations module, and fix a few errors found...
Bastien Montagne [Fri, 19 Apr 2013 13:00:21 +0000 (13:00 +0000)]
Py API doc generation: add bpy.app.translations module, and fix a few errors found while building the doc. Thanks to Campbell for review.

8 years agofix for crash in r56063, was just missing an ID property copy (which menu does)
Campbell Barton [Fri, 19 Apr 2013 12:14:15 +0000 (12:14 +0000)]
fix for crash in r56063, was just missing an ID property copy (which menu does)

8 years agofix for bug where edge slide could set mouse start/end points to the same value ...
Campbell Barton [Fri, 19 Apr 2013 10:23:48 +0000 (10:23 +0000)]
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.

8 years agofix for incorrect edge slide interpolation at loop endpoings with ngons.
Campbell Barton [Fri, 19 Apr 2013 10:04:23 +0000 (10:04 +0000)]
fix for incorrect edge slide interpolation at loop endpoings with ngons.

8 years agofix [#35009] Edge/Vertex Slide issue using G-G.
Campbell Barton [Fri, 19 Apr 2013 08:42:11 +0000 (08:42 +0000)]
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.

8 years agoFix for bug reported by Dalai Felinto on IRC, crash in blenderplayer after r56055...
Lukas Toenne [Fri, 19 Apr 2013 06:50:07 +0000 (06:50 +0000)]
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.

8 years agocode cleanup: edge slide, avoid building BVH tree, more logical var names.
Campbell Barton [Fri, 19 Apr 2013 02:47:31 +0000 (02:47 +0000)]
code cleanup: edge slide, avoid building BVH tree, more logical var names.

8 years agofix for incorrect edge loop slide direction when one of the loop sides was lost walki...
Campbell Barton [Fri, 19 Apr 2013 02:36:52 +0000 (02:36 +0000)]
fix for incorrect edge loop slide direction when one of the loop sides was lost walking around the loop.

8 years agocode cleanup: remove unused vars in edge slide, only store the initial vertex coords...
Campbell Barton [Fri, 19 Apr 2013 02:22:23 +0000 (02:22 +0000)]
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.

8 years agosimple optimization, replace BM_face_other_edge_loop() with BM_loop_other_edge_loop...
Campbell Barton [Fri, 19 Apr 2013 01:02:58 +0000 (01:02 +0000)]
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.

8 years agostyle cleanup
Campbell Barton [Fri, 19 Apr 2013 00:37:30 +0000 (00:37 +0000)]
style cleanup

8 years agoBGE: Extend Framing Mode + Camera sensor
Dalai Felinto [Thu, 18 Apr 2013 23:34:32 +0000 (23:34 +0000)]
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

8 years agoFix #35014: collada import crash with UV coordinates.
Brecht Van Lommel [Thu, 18 Apr 2013 21:40:06 +0000 (21:40 +0000)]
Fix #35014: collada import crash with UV coordinates.

8 years agoFix #35011: UV unwrap giving poor results for ngons.
Brecht Van Lommel [Thu, 18 Apr 2013 21:00:29 +0000 (21:00 +0000)]
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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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 :)

8 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.

8 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.

8 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.

8 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.

8 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 ...

8 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.

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

8 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.

8 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.

8 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.

8 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.

8 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 ...

8 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).

8 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!

8 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.

8 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 :)

8 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.

8 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

8 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.

8 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)

8 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.

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

8 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()

8 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.

8 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.

8 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)

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.