Commit Graph

55125 Commits

Author SHA1 Message Date
Campbell Barton
415af0bec8 Cleanup: Adhere to our naming convention for BKE_linestyle.h API 2014-07-16 15:13:40 +10:00
Tamito Kajiyama
647969f9b6 Renamed CTX_data_linestyle_from_scene() to BKE_get_linestyle_from_scene().
The function is to retrieve the active line style ID datablock from a scene and
there is nothing related to bContext.
2014-07-16 13:38:58 +09:00
Campbell Barton
de379c05de bmesh py api: add BMesh.calc_tessface() 2014-07-16 11:57:28 +10:00
Campbell Barton
28940d79b1 bmesh py api: add typed tuple-from-array functions 2014-07-16 11:50:34 +10:00
Campbell Barton
b26daac398 BLI_kdopbvh: assert for bad input
also hint UNLIKELY branches
2014-07-16 11:12:19 +10:00
Campbell Barton
1ae11f71ff BLF: avoid float/int conversion drawing glyphs
also use UNLIKELY for error cases
2014-07-16 11:12:19 +10:00
Mitchell Stokes
dfe1b9b7a7 Fix T40146: BGE Compound parent crash 2014-07-15 17:52:46 -07:00
Martijn Berger
490da48d78 Selective changes picked from: e01449fa4bb0df252d32a3b98ee1e8f195923d96
Author: Jason Wilkins

Improves cmake's ability to find our libraries on Windows / MSVC 2013
2014-07-15 16:33:05 +02:00
Campbell Barton
c2dba7e344 BLI_kdopbvh: Replace realloc's with BLI_stack 2014-07-15 21:35:50 +10:00
Campbell Barton
5c4180d898 BLI_stack: various small additions
- add BLI_stack_count
- add BLI_stack_pop_n to pop into an array
- add BLI_stack_push_r, which returns a pointer that can be filled in

Also remove sanity check in BLI_stack_pop, assert if the stack is empty.
2014-07-15 21:09:03 +10:00
Sergey Sharybin
a378f8d2d8 Fix T40964: Massive shading failures with glass node mixing, whiteouts and blackouts 2014-07-15 15:59:00 +06:00
Lukas Tönne
2f03cccecd No preemptive removal of muted and reroute nodes from compositor node
trees for localization (previews and viewer evaluation).

This is handled entirely by the compositor already. Doing this during
localization is redundant and risks divergent behavior.
2014-07-15 11:03:07 +02:00
Lukas Tönne
2bdb872cfb Fix T41067: Muted nodes still do data type conversions.
Proxy operations from muted nodes would still create conversion
operations where the datatypes don't match, which creates unexpected
behavior. Arguably datatype conversion could still happen even when the
main operation is muted, but this would be a design change and so is
disabled now.
2014-07-15 11:03:07 +02:00
Campbell Barton
fa8ff63b48 Edgehash: Improve magic number for hashing
Gives consistently better results. Tested with wide variety of meshes.
2014-07-15 13:08:46 +10:00
Mitchell Stokes
dbc79e7aba Fix T41074: Several Mouse Look actuators not working well together when reset button are set in one or several of them
Fix provided by lordloki (Jorge Bernal)
2014-07-14 18:36:27 -07:00
Jorge Bernal
1bf87fa26c BGE: TrackTo actuator: increasing up & track axis options
This is related to Task T34861 to increase up & track axis options for TrackTo actuator. I've just added it to differential to facilitate an easier review.

With the patch applied you can select X, Y and Z axis for the Up axis, and X, Y, Z, -X, -Y and -Z for the track axis.

Related to the implementation I have used the algorithm from Trackto constrain placed in constrain.c but adapted to be used with MOTO library.

The wiki docs are here (http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Actuators/Edit_Object#Trackto_Actuator).

Test file is here: {F97623}

I have also uploaded 2 screenshots showing the UI modifications to the TrackTo actuator:

{F91992} {F91990}

Reviewers: moguri, dfelinto

Reviewed By: moguri

CC: Genome36

Differential Revision: https://developer.blender.org/D565
2014-07-14 18:30:27 -07:00
Dalai Felinto
50d30148b6 Fix T41044 Cycles Bake: world space location affects object space normal pass 2014-07-14 17:49:30 -03:00
Antony Riakiotakis
48eececdba Follow up to previous commit.
* Expose is_tablet property to events to determine if event contains
tablet data.
* Expose tablet tilt for events as a 2D vector in python
2014-07-14 17:49:00 +03:00
Antony Riakiotakis
45f0bd6eb1 Feature request:
Expose pressure from event system to python. This will return the tablet
pressure, if a tablet is present, or 1.0 if not.
2014-07-14 17:06:53 +03:00
Campbell Barton
8554fa2fad GHash, EdgeHash: add debugging function to measure the hash quality
Can use to check on improvements to hash functions.
2014-07-14 23:59:47 +10:00
Campbell Barton
8a04bed724 Error in last commit 2014-07-14 21:34:51 +10:00
Campbell Barton
a8e338cee5 Py/API: add bmesh.utils.face_split_edgenet 2014-07-14 21:32:37 +10:00
gaiaclary
1bda27f692 Tooltip improvements for modifier functions 2014-07-14 11:50:21 +02:00
Campbell Barton
98cb7ad237 Remove redundant NULL check 2014-07-14 14:23:23 +10:00
Campbell Barton
3b81aae5c1 BMesh: avoid redundant normalize comparing angles 2014-07-14 14:22:15 +10:00
Campbell Barton
d9f39257f4 Math Lib: add compare_len_squared_v3v3 from paint branch 2014-07-14 11:55:38 +10:00
Campbell Barton
d56e6bf1bf Math Lib: accept a limit of 0.0 when comparing vectors 2014-07-14 11:33:19 +10:00
gaiaclary
a720c4715b Tooltip improvements for modifier functions 2014-07-13 21:52:35 +02:00
Tamito Kajiyama
c7ba6eaacc Freestyle: minor docstring fixes. 2014-07-13 23:17:52 +09:00
Bastien Montagne
0fc05c1c03 Followup to rB320b7a59c3eed: also handle background image ID refcount when duplicating/freeing View3D. 2014-07-13 15:16:01 +02:00
Thomas Dinges
e35845d37c Fix T40987: Distant Lamps have no influence on Volumes.
Differential Revision: https://developer.blender.org/D639
2014-07-13 12:06:54 +02:00
Campbell Barton
cfbc495b8d BMesh: minor speedup to BM_face_split_edgenet 2014-07-13 13:53:08 +10:00
Campbell Barton
15a6911dd1 BMesh: remove error check on radial loops and consistent naming 2014-07-13 12:58:08 +10:00
Campbell Barton
c04f301fc3 Replace BLI_SMALLSTACK_FREE with fake user (quiet warnings in msvc) 2014-07-12 16:48:52 +10:00
Campbell Barton
5e3e095e2e Code Cleanup: use const 2014-07-12 09:09:24 +10:00
HG1
984d6c8677 BGE debug API and actuator
This patch adds some new debug methods to the KX_GameObject for manually adding the debug list and bge.render for controlling the debug visualization.
It also adds a new debug actuator, which allows to control the same functions.

This patch is a updated version of T33701.

Thread on Blenderartists:
http://blenderartists.org/forum/showthread.php?264745-Debug-proerties-for-added-objects-patch&p=2256018&viewfull=1#post2256018

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D635
2014-07-11 16:00:14 -07:00
Campbell Barton
9327816593 Correct error in BM_face_split_edgenet when no faces are split 2014-07-12 08:44:19 +10:00
Bastien Montagne
db1ab7b150 Fix potential bug in loop normals code.
Even if we cannot use computed lnor, we still have to empty the fan stack of lnors!
2014-07-11 19:52:43 +02:00
Antony Riakiotakis
4097f9c3c4 Another attempt for T40981, clipping border does not work with GLSL on
ATIs.

This is actually a test to see if this can be enabled on ATI cards.
According to various sources, newer ATI cards supporting GLSL 3.0
support gl_ClippingDistance in shaders, which is the forward compatible
way to do custom clipping.

This fix will bind 6 additional varying variables on ATIs, which may
lead to some shaders not compiling due to limiting out of those
variables, or to performance degradation. Also I do not have an ATI
handy to test.

Having those in mind, this commit may well be reverted later.

Clipping planes are usually 4 (6 is for cube clipping), but making
shaders depend on viewport state is really bad, and would lead to
recompilation, so I took the worst case here to avoid that.
Hopefully driver does some optimization there.
2014-07-11 19:17:40 +03:00
Dalai Felinto
1aabbf8476 View3D Walk: Use scene gravity instead of hardcoded value (fix T40921)
Differential Revision: https://developer.blender.org/D636
2014-07-11 11:44:05 -03:00
Dalai Felinto
92c8dd16df View3D Walk: Rename gravity by gravity_state (cleanup) 2014-07-11 11:43:39 -03:00
Sergey Sharybin
594ff72bfe Fix T41023: Specific material cause bad render result, different on CPU/GPU
Issue was caused by too much aggressive optimization, which skipped execution
of some nodes leading to an uninitialized memory read in SVM stack.
2014-07-11 18:21:52 +06:00
Lukas Tönne
4633e655dc Fix T41019: Calculate Mass does not calculate actual volume.
This was a ToDo item, for mesh-based rigid body shapes (trimesh, convex)
the operator was simply using the bounding box volume, which can grossly
overestimate the volume and mass.

Calculating the actual volume of a mesh is not so difficult after all,
see e.g.
http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf

This patch also allows calculating the center-of-mass in the same way.
This is currently unused, because the rigid body system assumes the CoM
to be the same as the geometric object center. This is fine most of the
time, adding such user settings for "center-of-mass offset" would also
add quite a bit of complexity in user space, but it could be necessary
at some point. A number of other physical properties could be calculated
using the same principle, e.g. the moment of inertia.
2014-07-11 12:16:32 +02:00
Campbell Barton
78d38a9033 BLI_array: avoid mixing terms count/length 2014-07-11 15:30:42 +10:00
Mitchell Stokes
315609ec0c Fix T40257: Frustum culling not working properly
This is mostly the same fix as before, but now code depending on culling
checks is executed after KX_Scene->CalculateVisibleMeshes(). As a
side-effect, LoD checks and animation culling now use the current
frame's culling information rather than the previous frame's.
2014-07-10 22:14:30 -07:00
Campbell Barton
d419e2e90c WM: add WM_operator_properties_create_ptr
Call operator types directly and avoid a lookup when their known.
2014-07-11 15:07:55 +10:00
Campbell Barton
dd9a33dc83 Add mesh tool to split faces by wire edges (face menu)
This can be used in a similar way to the knife tool, but the edges are manually setup first.
2014-07-11 10:32:33 +10:00
Campbell Barton
48abc65c39 BMesh: new face splitting function BM_face_split_edgenet
This takes a face and an edge-net, splitting the face into regions
defined by the edge-net.
2014-07-11 10:29:53 +10:00
Sergey Sharybin
49c73f2f22 Cycles: Add link to a paper used for Beckmann table calculation
This is for those who'll be reading code and trying to improve it.
2014-07-10 19:04:03 +06:00
Sergey Sharybin
5e216a6aa9 Fix T41005: Seemingly random crashes with cycles rendering
Fix T41013: OSL and Crash
Fix T40989: Intermittent crash clicking material color selector

Issue was caused by not enough precision for inversion threshold.
Use double precision for this threshold now. We might want to
investigate this code a bit more further, stock implementation
uses doubles for all computation. Using floats might be a reason
of bad rows distribution in theory.
2014-07-10 19:04:03 +06:00