Commit Graph

42325 Commits

Author SHA1 Message Date
Sergej Reich
ead6d397fd Units: Make grams base unit for mass 2013-12-31 18:10:30 +01:00
Sergej Reich
33a027b3a3 Fix T37993: mass of Rigid Body ignores scene unit scale
Mass units weren't scaled in the ui.
2013-12-31 18:10:30 +01:00
aaabac069f Cycles Volume Render: these changes should have included in the last commit. 2013-12-31 18:03:22 +01:00
Lawrence D'Oliveiro
9939ec06dd Fix T37994: crash in preview render after recent color management changes.
Reviewed By: brecht
2013-12-31 15:03:06 +01:00
Bastien Montagne
1fa63b317a Fix T37992: german NUMPAD-COMMA is not tranlated to decimal dot (for modal numinput). 2013-12-31 13:42:23 +01:00
0775e739b7 Fix T37947: large cursors now also work on linux/mac for the edit mode cross. 2013-12-31 02:00:21 +01:00
Andrew Buttery
a1c740a420 UI: improve tooltip for use preview range option in timeline.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D161
2013-12-31 00:01:55 +01:00
Campbell Barton
a857a6fcf9 Fix T37970: Node scale/rotate use incorrect pivor
note: added code to use real node center, but ifdef'd for now since it
doesnt work well with absolute snapping.
2013-12-30 20:09:16 +11:00
Campbell Barton
4606ded232 Node Editor: enable transform helper line 2013-12-30 19:23:29 +11:00
Campbell Barton
6a473305af Fix T37920: BGE LibLoad failed for meshes with no materials 2013-12-30 15:49:13 +11:00
Campbell Barton
0d6ae3fda2 Main API: refactor naming, use BKE_main_ prefix and add main arg. 2013-12-30 13:25:27 +11:00
Campbell Barton
d44132d0d0 Fix for crash with game engines LibLoad feature 2013-12-30 12:18:41 +11:00
Campbell Barton
24c807ffd4 Code Cleanup: unused defines & style 2013-12-30 10:58:18 +11:00
Campbell Barton
42aa19088e Text3d: add select all operator
also add Edit menu for 3d text and move cut/copy/paste there.
2013-12-29 23:55:05 +11:00
Campbell Barton
1c8d1569da correction to previous commit 2013-12-29 23:34:13 +11:00
Campbell Barton
451343022a Fix crash moving the cursor after deleting 3d text 2013-12-29 23:18:38 +11:00
Campbell Barton
748b800eba Text3d: add assert's to check the selection and length are valid 2013-12-29 23:16:02 +11:00
Sergey Sharybin
873c6e5479 Fix movie output when using render border
Reported by @plasmasolutions in IRC.
2013-12-29 17:25:56 +06:00
Sergey Sharybin
3b08ee8996 Follow up to the previous commit: vfont_get_data is to use the same RW lock 2013-12-29 17:07:38 +06:00
Sergey Sharybin
df5631216a Fix T37980: Multiple font objects sharing an external font gives problems
Solved by adding RW lock to BKE_vfont_to_curve.

So now all the threads are allowed to read chars from ghash,
but they'll be locked as soon as one thread would need to load
more chars from font to the ghash.
2013-12-29 16:44:07 +06:00
Campbell Barton
57e8c5870a Text3d: setting upper/lower case now uses the selection 2013-12-29 21:05:39 +11:00
Campbell Barton
9a3855e655 Text3d: remove redundant call to wcslen 2013-12-29 21:04:54 +11:00
Campbell Barton
d0ec1b1caa Fix for 3d text ctrl+arrow keys failing for multi-byte characters. 2013-12-29 16:54:43 +11:00
Campbell Barton
07851dd8df Math Lib: replace point in polygon function with one thats ~23x faster.
rather then using angle summing, use line intersection checks.
2013-12-29 14:50:15 +11:00
Campbell Barton
28f5573197 Fix for inexact 3d cursor placement especially when zoomed out.
Even with the startup scene clicking multiple times in the corner of the
view without moving the mouse would move the cursor a little each time.
2013-12-29 13:35:00 +11:00
Campbell Barton
eb4090dadf Fix missing check if isect_plane_plane_v3 fails to find an intersection. 2013-12-29 12:51:27 +11:00
e369a5c485 Cycles Volume Render: support for rendering of homogeneous volume with absorption.
This is the simplest possible volume rendering case, constant density inside
the volume and no scattering or emission. My plan is to tweak, verify and commit
more volume rendering effects one by one, doing it all at once makes it
difficult to verify correctness and track down bugs.

Documentation is here:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Materials/Volume

Currently this hooks into path tracing in 3 ways, which should get us pretty
far until we add more advanced light sampling. These 3 hooks are repeated in
the path tracing, branched path tracing and transparent shadow code:

* Determine active volume shader at start of the path
* Change active volume shader on transmission through a surface
* Light attenuation over line segments between camera, surfaces and background

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-28 16:57:10 +01:00
a35db17cee Cycles Volume Render: work on nodes and closures.
* Henyey-Greenstein scattering closure implementation.
* Rename transparent to absorption node and isotropic to scatter node.
* Volume density is folded into the closure weights.
* OSL support for volume closures and nodes.
* This commit has no user visible changes, there is no volume render code yet.

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-28 16:57:02 +01:00
Campbell Barton
a06c9c277a Fix regression T37971: Crash setting recursive dupli-verts 2013-12-29 01:38:10 +11:00
Lukas Tönne
fa9b5d5449 Fix T37939, concern raised in rBd9e0a94: Avoid access to linked node
tree ID data when freeing bNodeTree data blocks, while also making sure
localized node group copies get freed properly.
2013-12-28 14:54:53 +01:00
Campbell Barton
2654b28f04 Text3d: avoid calculating the font boundbox scale for every character 2013-12-28 19:45:54 +11:00
Campbell Barton
1aa62605cd Fix for text3d issue, \n was attempting to find a character too 2013-12-28 19:34:50 +11:00
Campbell Barton
1a91b8bd5d Fix for 3d fonts loading the character of the string terminator.
also remove redundant call to wcslen and ensure FT_Init_FreeType runs
once the font loads.
2013-12-28 19:06:45 +11:00
Campbell Barton
961d0409c8 3D Text: use ghash for character lookups 2013-12-28 17:40:13 +11:00
Campbell Barton
2b3fc4dea7 Fix for BKE_nurb_handles_autocalc using 2d tests on 3d data 2013-12-28 17:29:58 +11:00
Campbell Barton
6f5ced4a30 Math Lib: add dist_squared_to_line_v2, avoids sqrt in scanfill and 3d-text 2013-12-28 17:23:59 +11:00
Sergey Sharybin
602dcb47b0 Fix T36474: Blender 2.68a crashes upon rendering
Summary:
Original issue was caused by wring detection of whether
SS modifier is being applied for render/viewport. After
recent dependency graph commit this was no longer an
issue.

But it still might have happen conflict between viewport
draw and scene_update_for_newframe() invoked from render
thread when using external engines like Cycles.

Solved by adding viewport lock while scene is being
updated and objects being exported to the render engine.

Same lock was already used for Blender Internal.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T36474

Differential Revision: https://developer.blender.org/D138
2013-12-27 18:52:41 +06:00
Sergey Sharybin
8632aab88d Remove TODO. Those args could be useful in the future. 2013-12-27 18:34:36 +06:00
Sergey Sharybin
8870af6d37 Typo fix in a comment 2013-12-27 17:09:19 +06:00
Campbell Barton
d09a8ea9e7 Code Cleanup: style 2013-12-27 14:21:03 +11:00
Sergej Reich
4841acbecd Rigidbody: Code cleanup
Make some functions private.
Remove unneeded nested if statements.
Avoid mixing short and bool.
2013-12-26 21:33:58 +01:00
Sergey Sharybin
79d8f1e4a5 Fix T37955: Freestyle render misalignment
Issue was caused by missing objects update for temporary
freestyle objects. This happened because of the fact that
such objects doesn't have any relations, as in they're
corresponding to root nodes in the DAG.

This situation wasn't handled by DAG_threaded_update_begin()
which considered there's only one root node in the DAG.
2013-12-27 02:32:56 +06:00
Sergey Sharybin
feac8ee090 Fix out-of-date comment which came from DAG-MT branch 2013-12-27 02:32:56 +06:00
Sergej Reich
ceb2430dd7 Rigidbody: Allow triangle mesh shapes to deform during simulation
Only supported when using the "Deform" mesh source.
2013-12-26 18:38:06 +01:00
Sergej Reich
c96601138d Rigidbody: Use own structure to store mesh data for collision shapes
This gives us better access to the data and should also be faster to
create.
2013-12-26 18:38:06 +01:00
Sergej Reich
2260a7dbc0 Rigidbody: Add option to choose mesh source for collision shapes
The options are:
Base: Base mesh
Deform: shape keys and deform modifiers
Final: All deformations and modifiers

It would be nice to have a way of specifying where exactly in the
modifier stack the collision shape is generated. However this is not
staight forward since the rigid body simulation is not part of the
modifier system and would require hacks to make it work.
2013-12-26 18:38:05 +01:00
Bastien Montagne
55397c690d Usual minor UI messages fixes... 2013-12-26 17:16:11 +01:00
Sergey Sharybin
6727bf3a21 Avoid temporary change of animation data flags for nodes filter
Use temporary runtime flag of filter_mode argument instead.

This commit also fixes some weirdo mix of filter_mode with
filterflag bits.
2013-12-26 18:50:22 +06:00
Sergey Sharybin
709041ed0b Threaded object update and EvaluationContext
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.

Technical details:

- Uses task scheduler which was recently committed to trunk
  (that one which Brecht ported from Cycles).

- Added two utility functions to dependency graph:
  * DAG_threaded_update_begin, which is called to  initialize threaded
    objects update. It will also schedule root DAG node to the queue,
    hence starting evaluation process.

    Initialization will calculate how much parents are to be evaluation
    before current DAG node can be scheduled. This value is used by task
    threads for faster detecting which nodes might be scheduled.

  * DAG_threaded_update_handle_node_updated which is  called from task
    thread function when node was fully handled.

	This function decreases num_pending_parents of node children and
	schedules children with zero valency.

    As it might have become clear, task thread receives DAG nodes and
    decides which callback to call for it.

    Currently only BKE_object_handle_update is called for object nodes.

    In the future it'll call node->callback() from Ali's new DAG.

- This required adding some workarounds to the render pipeline.
  Mainly to stop using get_object_dm() from modifiers' apply callback.
  Such a call was only a workaround for dependency graph glitch when
  rendering scene with, say, boolean modifiers before displaying
  this scene.

  Such change moves workaround from one place to another, so overall
  hackentropy remains the same.

- Added paradigm of EvaluaitonContext. Currently it's more like just a
  more reliable replacement for G.is_rendering which fails in some
  circumstances.

  Future idea of this context is to also store all the local data needed
  for objects evaluation such as local time, Copy-on-Write data and so.

  There're two types of EvaluationContext:

  * Context used for viewport updated and owned by Main. In the future
    this context might be easily moved to Window or Screen to allo
    per-window/per-screen local time.

  * Context used by render engines to evaluate objects for render purposes.
    Render engine is an owner of this context.

  This context is passed to all object update routines.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

CC: lukastoenne

Differential Revision: https://developer.blender.org/D94
2013-12-26 17:24:42 +06:00
Sergey Sharybin
7025a1bd78 Fix T37945: Crash after undo
Issue was caused by some typos in readfile.c made in
original commit of image cache rewrite.
2013-12-26 16:34:57 +06:00