Commit Graph

59029 Commits

Author SHA1 Message Date
Thomas Dinges
5db143efbb Fix T44449, sm_52 kernel missing in CMake builds. 2015-04-19 22:04:23 +02:00
Porteries Tristan
62f79856e9 BGE : Standardization of callbacks execution.
A new function (RunPythonCallBackList) to call all python functions
contained in a python list was developed.

This function has:
  - first argument is the python list of callbacks
  - second argument is a python list of arguments
  - third argument is the minimum quantity of arguments
  - forth argument is the maximum quantity of arguments

It improves flexibility and supports *args.

Reviewers: moguri, dfelinto, campbellbarton, sybren

Reviewed By: campbellbarton, sybren

Subscribers: sybren

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1102
2015-04-19 20:33:08 +02:00
Campbell Barton
6f0f1dc3be Cleanup: warnings 2015-04-19 22:03:42 +10:00
Campbell Barton
e5048dd4ca Dyntopo: non-topology tool origdata support
Brushes that don't change topology didn't have access to original data.
2015-04-19 19:56:46 +10:00
Campbell Barton
ac73fe5fe0 Cleanup: use meaningful names re: (fc, an, sn) 2015-04-19 18:38:58 +10:00
Campbell Barton
fb6a0d24e1 Dyntopo: support for original normal access
Rename calc_flatten_center to calc_area_center,
since theres no 'flatten' spesific logic there.

Also refactor calc_area_center, calc_area_normal, calc_area_normal_and_center
so they're next to eachother - they're almost the same,
having them scattered about isn't helpful.
2015-04-19 18:24:21 +10:00
Campbell Barton
fe39ebea12 Cleanup: move project code into util function 2015-04-19 17:52:35 +10:00
Campbell Barton
57b020528b Cleanup: calculating sculpt center & normal
also avoid sqrt calculating dyntopo center (only checks for flipping)
2015-04-19 17:03:51 +10:00
Campbell Barton
eb4fb4f4fe disable verify from last commit (too slow) 2015-04-19 16:06:40 +10:00
Campbell Barton
d09a9a9597 Dyntopo: USE_EDGEQUEUE_TAG broke even subdiv
While adding edges to the queue multiple times is redundant,
walking over them is still needed.
2015-04-19 16:03:12 +10:00
Campbell Barton
550c3c2c1e Dyntopo: avoid over-counting /w neighbor average 2015-04-19 14:46:32 +10:00
Campbell Barton
2448c21cb3 Sculpt: avoid CD lookup /w mask smooth 2015-04-19 14:46:32 +10:00
Campbell Barton
9ac618a90e Sculpt: smooth brush, exclude self from average
Was including the vertices own location when accumulating.
2015-04-19 14:46:32 +10:00
Porteries Tristan
3d55859924 BGE: Support for collision group/mask from the api + activated on EndObject.
A Python API for the collision group / mask has been added:
```
KX_GameObject.collisionGroup
KX_GameObject.collisionMask
```
The maximum number of collision groups and masked has been increased from eight to sixteen.
This means that the max value of collisionGroup/Mask is (2 ** 16) - 1

EndObject will now activate objects that were sleeping and colliding with the removed object.
This means that, unlike now, if a rigid body starts sleeping on top of another object, when the latter is removed the rigid body will activate and fall, rather than float midair as before.

Collision groups that do not intersect used to collide on the first frame. Now this has been fixed so that they collide appropriately.

Thanks to agoose77 for his help.

Reviewers: scorpion81, hg1, agoose77, sergof

Reviewed By: agoose77, sergof

Subscribers: sergof, moguri

Projects: #game_physics, #game_engine

Differential Revision: https://developer.blender.org/D1243
2015-04-19 01:04:22 +02:00
Porteries Tristan
a2f9a0cfd9 BGE: Fix T43536 logic.getCurrentScene() returning wrong scene in
pre_draw and post_draw calls

A simple insert of KX_SetActiveScene(scene) before pre_draw and
post_draw calls solves the issue.

Reviewers: dfelinto, sybren, brita_, campbellbarton, moguri, lordloki

Reviewed By: moguri, lordloki

Projects: #game_logic, #game_engine

Differential Revision: https://developer.blender.org/D1129
2015-04-18 21:37:59 +02:00
Campbell Barton
252b0cf5d2 Cleanup: API naming use BKE_undo_ prefix 2015-04-18 18:25:07 +02:00
Campbell Barton
38bea4e86c Cleanup: use BLO_memfile prefix 2015-04-18 18:11:01 +02:00
Antony Riakiotakis
230712e6cb Autosave:
Flush edits only when saving global undo. This will stop freeing of PBVH
in sculpt mode, which introduces some pretty severe freezes, especially
in dyntopo. For global undo we flush the contents of the global undo
buffer which does not include localized edits of sculpt/edit mode, so
those data will not get saved anyway.
2015-04-18 15:50:29 +02:00
Porteries Tristan
4f2657bf47 BGE: New Draw debug shadow box for sun lamp
New Check option "Show Shadow Box" in shadow panel of sun lamp to get
feedback about which objects project shadows.

Minor tweaks by Campbell Barton and Jorge Bernal

Reviewers: moguri, sybren, kupoman, dfelinto, lordloki, campbellbarton

Reviewed By: lordloki, campbellbarton

Subscribers: sergey, lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1149
2015-04-18 12:30:02 +02:00
Campbell Barton
3a4a2a9427 Fix T44390: Clay brush weirdness part-2
Use the normal of the plane instead of the vertex normal,
since projecting using the vertex normal frequently causes artifacts.
2015-04-18 05:08:14 +10:00
Campbell Barton
05b6de545a Fix T44390: Clay brush weirdness part-1
Clay brush had a feedback loop with dyntopo,
getting the plane from the cursor center didn't support original data.
2015-04-18 05:08:03 +10:00
Campbell Barton
b0c2fdd927 Cleanup: simplify sculpt normal accumulation 2015-04-18 03:09:16 +10:00
Campbell Barton
28b9a0276f Cleanup: simplify sculpt plane accumulation 2015-04-18 02:54:49 +10:00
Porteries Tristan
e0aeafdf0a BGE : Fix light layer check
The layers in Blender are using a bit field for the 20 layers. The light layer value was limited to 20, so the highest usable light layer was five.
The patch modify the range and add layer out of range error messages.

Reviewers: sybren, hg1, moguri

Reviewed By: hg1, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1238
2015-04-17 18:12:51 +02:00
Dalai Felinto
394c5318c6 Bake-API: reduce memory footprint when baking more than one object (Fix T41092)
Combine all the highpoly pixel arrays into a single array with a lookup
object_id for each of the highpoly objects.

Note: This changes the Bake API, external engines should refer to the
bake_api.c for the latest API.

Many thanks for Sergey Sharybin for the complete review, changes
suggestion and feedback. (you rock!)

Reviewers: sergey

Subscribers: pildanovak, marcclintdion, monio, metalliandy, brecht

Maniphest Tasks: T41092

Differential Revision: https://developer.blender.org/D772
2015-04-17 12:25:37 -03:00
Campbell Barton
45e929dc12 Cleanup: redundant casts 2015-04-18 00:16:05 +10:00
Bastien Montagne
fa0f936a64 Fix BPlayer (c) 2015-04-17 16:03:14 +02:00
Sergey Sharybin
3a015bb76b Depsgraph: Report total time spent on scene update
Previously was only per-thread timing.
2015-04-17 18:57:13 +05:00
Campbell Barton
15d3d8560d Cleanup: remove unused face normals
also use const
2015-04-17 23:50:23 +10:00
Dalai Felinto
80b4b43727 Code cleanup (for previous commit) 2015-04-17 10:41:31 -03:00
Dalai Felinto
cd729e9a4e Image Editor: Fix passes increase/decrease buttons
This was half-broken even in 2.74 (if you were using compositor), multiview did us the favour of breaking this for all cases (you are welcome).
It is all working now.
2015-04-17 10:38:17 -03:00
Dalai Felinto
479b669693 Fix T44336: Unable to select cycles-specific passes in UV/image editor
This approach gets rid of iuser->pass for good.

Also, I'm commenting out the pass increase/decrease. This was broken
since multiview. I will fix it later (before 2.75), but I didn't want to
get this patch mangled with that fix.

Thanks Sergey Sharybin for the review and feedbacks.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1232
2015-04-17 09:48:31 -03:00
Campbell Barton
02fba106fa Dyntopo: save 4 bytes per BMLogVert 2015-04-17 18:07:08 +10:00
Campbell Barton
e05f719b8b Dyntopo: avoid redundant lookup on original data 2015-04-17 17:34:14 +10:00
Bastien Montagne
50522cba92 Fix T44411: poll() function of MESH_OT_knife_project was not strict enough.
We need a 3DView region here, not only the 3DView...
2015-04-17 08:09:16 +02:00
Joshua Leung
09f2aa9382 Fix T44412: Crash when trying to paint on a GPencil frame when the frames are out of order 2015-04-17 13:32:57 +12:00
Joshua Leung
582fa5e36e Fix for Grease Pencil and negative frames
While investigating T44412, I noticed some weirdness going on when trying to
draw on frame 0 (i.e. strokes were getting added to frame 1 instead). Clearly,
this seemed like an off-by-one error related to clamping to prevent negative
frames which was also excluding frame 0.

This commit reverts the fixes made for T36831 in:
rBf18f2fbb33d90ecc91e6f3d063cb9f97f217e808

After thinking this over, I think these checks against drawing on negative
frames aren't needed. Even if the current userpref setting doesn't allow
navigating to negative frames, this may not be true for other users that
may work on the same file (in a team environment). Also, negative frame
values can get set via the dopesheet.
2015-04-17 13:02:45 +12:00
Jorge Bernal
4cd37541b0 BGE: Fix for T44374 Crash when collision sensor deactivated
Don't allocate memory for sensor logic brick if it is deactivated
2015-04-17 02:12:57 +02:00
Campbell Barton
afc2f415ab Cleanup: use const for sculpt code 2015-04-17 03:11:26 +10:00
Gaia Clary
bbae0664a3 Added Support for Custom Vertex Normals to Collada exporter 2015-04-16 19:02:26 +02:00
Antony Riakiotakis
a7cae2987d OpenGL does not like line thickness less than 1.0.
Check here is not completely correct either, we should check against
GL_ALIASED_LINE_WIDTH_RANGE and GL_SMOOTH_LINE_WIDTH_RANGE
2015-04-16 18:35:07 +02:00
Joshua Leung
6589d07c8f Action Editor: Preemptive fix for null-pointer dereference
A few weeks ago, I got a random crash while testing som edge cases
(IIRC, it was trying to assign an action with no active object),
which I haven't been able to reproduce since then. This commit though
adds some extra sanity checks here, as a user may try to assign an
action to an animdata block which did not have an action already.
2015-04-17 01:11:56 +12:00
Joshua Leung
0b691563ea Fix T44408: "Rest Length" property in the Stretch To constraint was getting clipped when using Metric Units
Increased the upper bound for the "Rest Length" property to cope with metric
units, especially when large (i.e. > 2 m) distances are involved. It may be
necessary to increase this again in the future, if even larger distances get
used (though it then starts getting a bit difficulty to justify such setups).
2015-04-17 01:11:55 +12:00
Campbell Barton
6603a10331 Cleanup: remove redundant initializers 2015-04-16 22:26:20 +10:00
Antony Riakiotakis
69b33b6ed3 Draw smoke domain in transparent pass. Should composite smoke domains
correctly in scene - with known limitations of blending between
transparent objects.
2015-04-16 13:02:09 +02:00
Bastien Montagne
eced87b2d6 Fix T44406: the Hebrew font causes trouble.
Looks like the droidsans hebrew font we used back in the days had some kerning bug or so...
Updated with latest version from Debian Testing repo, works nice now.
2015-04-16 12:37:03 +02:00
Campbell Barton
59db8d74b9 RNA: avoid past tense in property names 2015-04-16 16:41:12 +10:00
Campbell Barton
c5a126ee70 Docs: BLI_rand non-obvious behavior 2015-04-16 16:14:30 +10:00
Jorge Bernal
8c98b1649d BGE: Fix for T42341 Sensor.frequency is badly named
"Frequency" parameter is renamed to "Skip" in the LogicBricks sensors as it represents skipped frames between pulses.

Naming something (frequency) the exact opposite of what it represents (period) was the worst choice.

Also, a new BGE python attribute 'skippedTicks' was introduced. 'frequency' attribute is maintained but deprecated.

Internally, freq variable is used yet at DNA_Sensor to maintain compability and to avoid do_versions.

Thanks to Sybren for the investigation.

{F162440}

Reviewers: campbellbarton, sybren, moguri, hg1

Reviewed By: sybren, hg1

Differential Revision: https://developer.blender.org/D1229
2015-04-16 06:39:33 +02:00
Tamito Kajiyama
b466a82fa5 Partial fix for T44404: freestyle crashes blender.
Logical predicates AndUP1D and OrUP1D were instantiated even with an empty
list of unary 1D predicates, causing an exception in the constructors of
the logical predicate classes.

This is a regression made in b408d8af31c9fba5898e353c97f95f7ce8dc19c1.
2015-04-16 13:35:24 +09:00