blender.git
6 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.

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

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

6 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`

6 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

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

6 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

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

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

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

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

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

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

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

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

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

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

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

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

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

6 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

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

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

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.