Commit Graph

36776 Commits

Author SHA1 Message Date
Sergej Reich
fda8927d01 rigidbody: Further fix for background scenes
Since rigid bodies need their world to be be updated correctly we now
pass it alongside the parent scene in scene_update_tagged_recursive().

Add BKE_object_handle_update_ex() as well as other object functions
that take a RigidBodyWorld for this.

Ideally this shouldn't be needed but we'd have to restructure scene
handling for that. It's not a small taks however and definitely not
something that can be done before release.

Thanks to Campbell for review.
2013-02-16 16:17:45 +00:00
Mitchell Stokes
d9cc542728 Adding a missing end paren to the Use Material Caching tooltip. 2013-02-16 06:08:07 +00:00
Mitchell Stokes
8c9906eb91 BGE: Fix for issue #34242 "It does not render in "P" mode for Game engine if you UV mapa a face of a cube" reported by joaclint.
Material caching can now be disabled for Multitexture and GLSL Materials.
2013-02-16 04:38:53 +00:00
Sergej Reich
6072322312 rigidbody: Avoid unnecessary simulation updates
Now we flag the world for update on frame change and only call
BKE_rigidbody_do_simulation() when needed.
2013-02-15 23:48:36 +00:00
Bastien Montagne
207dca55f4 And more UI messages issues fixing... Thanks again to Gabriel Gazzán and Leon Cheung! 2013-02-15 18:19:20 +00:00
Brecht Van Lommel
bc29b766df Fix part of #34239: crash with cycles textured draw mode + dynamic topology sculpt. 2013-02-15 16:56:42 +00:00
Pablo Vazquez
4eb90a9d1e 'Reset to Default Theme' wasn't taking into account those themes that enable panel header/background. 2013-02-15 16:42:41 +00:00
Gaia Clary
9fe4dbb9f1 Fix: Collada Import files with X_UP and Y_UP axis where imported with wrong orientation 2013-02-15 15:36:02 +00:00
Bastien Montagne
ec04f98a75 Various fixes for UI translation issues (reported by Leon Cheung on bf-translations ML, thanks!). 2013-02-15 14:30:36 +00:00
Campbell Barton
b948c31258 revert own commit r54450, this works on X11 but not in Windows and caused bug [#34255] (which may be a bug in windows ghost?, not getting key release for modifiers).
Cross platform modifier keys on activating window better be handled at ghost level anyway.
2013-02-15 13:30:30 +00:00
Campbell Barton
7fa256815f skip fix from r54579 when holes aren't used (keeps bmesh ngon filling fast) 2013-02-15 12:57:11 +00:00
Ton Roosendaal
964c35771c Bug fix #34177
Blender's triangulator has been rescued :)
This commit fixes errors with concave holes inside polygons.

Simple explanation:

Blender "ScanFill" works by sorting vertices from top-left to bottom-right, and connecting
these vertices with a sorted list of edges they have.

The inner loop then goes over every vertex, its edges, and tries to make triangles by
checking vertices that are next in the list.
- if the triangle has points inside: it creates an edge to this vertex, and continues
- else: add new triangle.

Very simple, fast and efficient. But it needed one more check for the first step: it should
check every vertex inside the triangle, and pick the best vertex for an edge based on forming 
the sharpest angle with the tested edge. That solves the case for concave holes.

Blender ScanFill was coded 20 years ago, and is an own invention. I wanted a triangulator that
just fills any collection of polygons, including with holes.
No idea if this was ever published in a paper!
2013-02-15 12:26:47 +00:00
Brecht Van Lommel
d5d38ef0c7 Fix #34256: join a mesh with non-uniform scale with another mesh showed wrong
normals, they need to be recalculated then.
2013-02-15 12:08:01 +00:00
Joshua Leung
4d32e9a49e Bugfix [#33970] Background Scene does not show animation of rigid body objects
This was caused by multiple instantiations of the same basic problem. The
rigidbody handling code often assumed that "scene" pointers referred to the
scene where an object participating in the sim resided (and where the rigidbody
world for that sim lived). However, when dealing with background sets, "scene"
often only refers to the active scene, and not the set that the object actually
came from. Hence, the rigidbody code would often (wrongly) conclude that there
was nothing to do.

For example, we may have the following backgound set/scene chaining scenario:
"active"  <-- ... <-- set i (rigidbody objects live here) <-- ... <-- set n

The fix here is a multi-part fix:
1) Moved sim-world calculation from BKE_scene_update_newframe() to
scene_update_tagged_recursive()
    + This is currently the only way that rigidbody sims in background sets will
get calculated, as part of the recursion
     - These checks will get run on each update. <--- FIXME!!!

2) Tweaked depsgraph code so that when checking if there are any time-dependent
features on objects to tag for updating, the checking is done relative to the
scene that the object actually resides in (and not the active scene). Otherwise,
even if we recalculate the sim, the affected objects won't get tagged for
updating. This tagging is needed to actually flush the transforms out of the
RigidBodyObject structs (written by the sim/cache) and into the Object
transforms (obmat's)

3) Removed the requirement for rigidbody world to actually exist before we can
flush rigidbody transforms. In many cases, it should be sufficient to assume
that because the object with rigidbody data attached has been tagged for
updates, it should have updates to perform. Of course, we still check on this
data if we've got it, but that's only if the sim is in the active scene.
   - TODO: if we have further problems, we should investigate passing the
"actual" scene down alongside the "active" scene for BKE_object_handle_update().
2013-02-15 11:49:22 +00:00
Brecht Van Lommel
6786975f78 Fix #34254: cycles brightness/contrast node was missing for GLSL material view. 2013-02-15 11:46:31 +00:00
Bastien Montagne
98b9ed185f Translate "Set Parent To" menu (ctrl-P), reported on bf-translations ML by Satoshi Yamasaki, thanks! 2013-02-15 08:31:00 +00:00
Campbell Barton
f46ca7836d add debug check for mempool double free (or misuse of BLI_MEMPOOL_ALLOW_ITER),
some reports in the tracker show errors on bmesh iteration which could be caused by this.
2013-02-15 04:14:53 +00:00
Campbell Barton
c6b3e0f8e4 style cleanup 2013-02-14 23:49:30 +00:00
Brecht Van Lommel
40720fcdef Fix 3d view DPI issue with object name overlapping axis icon. 2013-02-14 21:40:22 +00:00
Sergej Reich
10305de3ac Fix "Origin to Center of Mass" not working well with ngons
Now we do simple triangulation and calculate signed area of triangles to
account for concave polygons.

This only works correct for planar polygons but gives better results
overall.
2013-02-14 17:35:46 +00:00
Sergej Reich
e3944f5bfa Divide by 3 instead of multiplying by variations of 0.333
Fixes small precision problems.
2013-02-14 17:35:43 +00:00
Thomas Dinges
7ae735dc4a Cycles UI:
* "Use Nodes" for World, did not trigger Node Editor refresh.
2013-02-14 17:09:19 +00:00
Brecht Van Lommel
adbd84c320 Fix #34121: OSL + persistent images option was not freeing shader memory properly,
causing memory to increase continuously during animation render.
2013-02-14 16:11:47 +00:00
Brecht Van Lommel
a47af30561 Fix #34240: cycles material preview of sphere + sky had black sky, now it uses
the current scene world.
2013-02-14 16:01:34 +00:00
Antony Riakiotakis
59a2ed19df Fix: Tiled image painting in image editor was broken for float canvas.
The mask was initialized using texture values, while it needed to be
opaque.
2013-02-14 15:44:09 +00:00
Campbell Barton
8d339a89db fix [#33949] T_ALT_TRANSFORM conflicts with "emulate 3 button mouse"
finally last transform tool relying on alt has an alternative.

Sequencer slide which makes room for the placed strip by moving others - Pressing G a second time toggles this behavior.
2013-02-14 14:50:16 +00:00
Ton Roosendaal
f5398f0fac Bug fix #34230
Error since July 2005, when DerivedMesh was introduced.

Vertex and Face duplicators now work for all modifiers. (not only deformers).
For example mirror and array modifier didn't work.
2013-02-14 14:01:48 +00:00
Campbell Barton
9449866bdc fix (for one case of...) [#33949] T_ALT_TRANSFORM conflicts with "emulate 3 button mouse"
ShrinkFatten operator now uses scale key to toggle 'Even thickness' option.
With the default keymap this is Alt+S,S.

Added functionality so the header print can get the key used for the modal keymap, some other operators should make use of this too.
2013-02-14 14:01:02 +00:00
Sergey Sharybin
ceb3624b11 After scroll bar commit motrack dopesheet went out of sync vertically
Shall be fine now.
2013-02-14 13:47:49 +00:00
Campbell Barton
3cf0c93be1 modify own changes to is_quad_convex_v3() to allow quads with a co-linear side to be considered convex (as it did in last release).
this is needed so zero area faces be dealt with by beauty fill.
2013-02-14 09:17:50 +00:00
Bastien Montagne
26704c0451 More nodes UI translation fixes.
I *hate* this rna_nodetree_types.h file!
2013-02-14 07:49:50 +00:00
Campbell Barton
3dbed0e47f update to operator running test, add option to randomize order, not reset blender for each operator and set data attributes. 2013-02-14 05:10:12 +00:00
Campbell Barton
648f925017 misc changes
- update man page for new additions since last release.
- note that --start-console argument is windows only.
- correct own assertion in own recent commit.
2013-02-14 05:02:20 +00:00
Campbell Barton
ab7ca2dc44 fix for double clicking in the text editor not working usefully (double clicking a pair chars would select 3 - one to the left). 2013-02-14 03:03:12 +00:00
Campbell Barton
12f6d3ad90 fix own bug in weight gradient tool, need to check if mesh dverts will be overwritten, 2013-02-14 02:21:12 +00:00
Campbell Barton
db02420921 tweak vertex group clean limit, it couldn't be set to zero, and you may want to remove only zero weights. 2013-02-14 01:55:10 +00:00
Campbell Barton
a59682f0b7 fix for crash with project paint when there is no brush (possible applying projection from the camera only) 2013-02-14 01:30:13 +00:00
Campbell Barton
9bd1e46b4a add missing NULL checks - could cause crashes in rare cases. 2013-02-14 01:01:08 +00:00
Dalai Felinto
42f9872363 bugfix: [#34220] Blenderplayer no longer working after r54395 commit [segfault due to world not valid]
patch by Sergey Sharybin

note, I still find strange that world was valid and now it is not, but at least we no longer segfaults
2013-02-13 23:09:12 +00:00
Brecht Van Lommel
3cdda97508 Fix color sampling info at the bottom of the image editor not respecting DPI.
(don't bother updating the RC for this, it's not an important fix)
2013-02-13 19:01:33 +00:00
Ton Roosendaal
da4711632c Fix for splitting startup and userpref:
The do-version handling for Userdef is outside file reading, which makes
it needed to store the file version in UserDef, so it gets the correct
version to handle.

Thanks Antonis R. for pointing at the omission!

Also removed the mindboggling define. If you do such, then make it
like "MAIN_VERSION_OLDER_THAN() or so.

In general version hacking could be limited much better... ask me
before even thinking to add one, most optimal is to do it in a way
it's not depending on a version ever - forward/backward compatible.
2013-02-13 16:52:14 +00:00
Gaia Clary
8a20930c71 Collada: Fixed import of textures with path settings relative to main import file 2013-02-13 16:00:46 +00:00
Campbell Barton
4fe94b2ef6 there were more places hook modifier type wasn't checked and could crash - add utility function which doest this. 2013-02-13 15:14:29 +00:00
Campbell Barton
fe855a83d7 fix for missing typecheck on hook-assign operator.
fix for POSELIB_OT_pose_rename getting an enum as an int.
2013-02-13 15:03:36 +00:00
Campbell Barton
5016ea5cb2 update python module loading test. 2013-02-13 14:11:04 +00:00
Bastien Montagne
43f4f807d9 Fix physics' name not translated in main physics panel (reported on bf-translations ML).
This also revealed another bug, as you could not explicitely set default context to text_ctxt UI func parameter (None is not accpeted by RNA string props), so I had to change default context from py POV to "*" instead of None.

Anyway, that physics UI translation remains weak, as the trick used here (helper func) prevents message extractor script to directly find them. Currently it works because specified labels are also defined elsewhere, but it would be nice to have some kind of "translation markers" in py code too (similar to our N_/CTX_N_ C macros, unfortunately python does not have preprocessing ;) )...
2013-02-13 11:52:01 +00:00
Brecht Van Lommel
35629a623b Fix #34216: uv unwrap with some faces pinned to point the normals down will now
automatically flip the unpinned faces to point down too, instead of trying to
unwrap them in the other direction and giving bad results.

If there's a mix of faces pinned up and down it will pick the direction with the
biggest area.
2013-02-13 10:38:05 +00:00
Bastien Montagne
3502fdea4a And more mismatches between RNA struct UI names and type UI names in nodes... BSDF nodes were not translated in UI. 2013-02-13 09:07:34 +00:00
Gaia Clary
6f4ce31320 fix: remove extra qualification in header 2013-02-13 08:53:05 +00:00
Campbell Barton
bfb319925d dont draw stippled lines without z-depth in vertex paint mode. (only weight paint). 2013-02-13 05:48:08 +00:00