6 years agoCleanup: use const for sculpt code
Campbell Barton [Thu, 16 Apr 2015 17:10:57 +0000 (03:10 +1000)]
Cleanup: use const for sculpt code

6 years agoAdded Support for Custom Vertex Normals to Collada exporter
Gaia Clary [Thu, 16 Apr 2015 17:02:00 +0000 (19:02 +0200)]
Added Support for Custom Vertex Normals to Collada exporter

6 years agoOpenGL does not like line thickness less than 1.0.
Antony Riakiotakis [Thu, 16 Apr 2015 16:34:53 +0000 (18:34 +0200)]
OpenGL does not like line thickness less than 1.0.

Check here is not completely correct either, we should check against

6 years agoAction Editor: Preemptive fix for null-pointer dereference
Joshua Leung [Thu, 16 Apr 2015 13:10:27 +0000 (01:10 +1200)]
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.

6 years agoFix T44408: "Rest Length" property in the Stretch To constraint was getting clipped...
Joshua Leung [Thu, 16 Apr 2015 13:07:05 +0000 (01:07 +1200)]
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).

6 years agoCleanup: remove redundant initializers
Campbell Barton [Thu, 16 Apr 2015 12:26:20 +0000 (22:26 +1000)]
Cleanup: remove redundant initializers

6 years agoDraw smoke domain in transparent pass. Should composite smoke domains
Antony Riakiotakis [Thu, 16 Apr 2015 11:01:57 +0000 (13:01 +0200)]
Draw smoke domain in transparent pass. Should composite smoke domains
correctly in scene - with known limitations of blending between
transparent objects.

6 years agoFix T44406: the Hebrew font causes trouble.
Bastien Montagne [Thu, 16 Apr 2015 10:37:03 +0000 (12:37 +0200)]
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.

6 years agoRNA: avoid past tense in property names
Campbell Barton [Thu, 16 Apr 2015 06:41:12 +0000 (16:41 +1000)]
RNA: avoid past tense in property names

6 years agoDocs: BLI_rand non-obvious behavior
Campbell Barton [Thu, 16 Apr 2015 06:07:46 +0000 (16:07 +1000)]
Docs: BLI_rand non-obvious behavior

6 years agoBGE: Fix for T42341 Sensor.frequency is badly named
Jorge Bernal [Thu, 16 Apr 2015 04:31:25 +0000 (06:31 +0200)]
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.


Reviewers: campbellbarton, sybren, moguri, hg1

Reviewed By: sybren, hg1

Differential Revision:

6 years agoPartial fix for T44404: freestyle crashes blender.
Tamito Kajiyama [Thu, 16 Apr 2015 00:13:40 +0000 (09:13 +0900)]
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.

6 years agoDyntopo: avoid redundant loop collapsing edges
Campbell Barton [Thu, 16 Apr 2015 02:24:59 +0000 (12:24 +1000)]
Dyntopo: avoid redundant loop collapsing edges

6 years agoDyntopo: blend vertex normals when collapsing
Campbell Barton [Thu, 16 Apr 2015 01:59:48 +0000 (11:59 +1000)]
Dyntopo: blend vertex normals when collapsing

6 years agodyntopo: don't allocate tessfaces while sculpting
Campbell Barton [Wed, 15 Apr 2015 18:14:01 +0000 (04:14 +1000)]
dyntopo: don't allocate tessfaces while sculpting

Tessellation data isn't used for drawing or sculpting.

This frees up some memory ~approx 10% in own tests.
Also slight spee-up since it avoids calculating it in the first place.

6 years agoFix crash loading file without scene in bg mode
Campbell Barton [Wed, 15 Apr 2015 15:45:30 +0000 (01:45 +1000)]
Fix crash loading file without scene in bg mode

6 years agoCleanup: warnings, ws
Campbell Barton [Wed, 15 Apr 2015 15:12:22 +0000 (01:12 +1000)]
Cleanup: warnings, ws

6 years agoCleanup: use const for event->tablet_data
Campbell Barton [Wed, 15 Apr 2015 15:07:54 +0000 (01:07 +1000)]
Cleanup: use const for event->tablet_data

6 years agoIncrease max brush size from 200 to 500
Campbell Barton [Wed, 15 Apr 2015 14:59:43 +0000 (00:59 +1000)]
Increase max brush size from 200 to 500

6 years agoBGE: subclass with more than 1 argument, D1237
Porteries Tristan [Wed, 15 Apr 2015 11:45:43 +0000 (21:45 +1000)]
BGE: subclass with more than 1 argument, D1237

In the BGE you can't create a subclass with more than 1 argument like : "player = Player(owner, 10)"
I have modified the py_base_new to check only the first argument of args tuple.
Now we can do :

    class Player(types.KX_GameObject):
        def __init__(self, gameobj, life):
            print("create new player :", self, ", life :", life)

    player = Player(own, 50)

6 years agoBMesh: dyntopo used lopsided normals
Campbell Barton [Wed, 15 Apr 2015 10:52:51 +0000 (20:52 +1000)]
BMesh: dyntopo used lopsided normals

Normals from subdivided edges were only taken from the edges first vertex.

Interpolate between the two to give more even results.

6 years agoBMesh: Missed normal from example /w skip-cd flag
Campbell Barton [Wed, 15 Apr 2015 10:46:33 +0000 (20:46 +1000)]
BMesh: Missed normal from example /w skip-cd flag

We may still want to use the normal as a reference but skip customdata.

6 years agoFix T44395: String untranslated in open file window.
Bastien Montagne [Wed, 15 Apr 2015 09:11:22 +0000 (11:11 +0200)]
Fix T44395: String untranslated in open file window.

6 years agoBMesh: avoid ghash lookups splitting the pbvh
Campbell Barton [Wed, 15 Apr 2015 06:14:27 +0000 (16:14 +1000)]
BMesh: avoid ghash lookups splitting the pbvh

This isn't a bottleneck but may as well avoid the extra ghash overhead.

6 years agotypo in last commit
Campbell Barton [Wed, 15 Apr 2015 05:34:06 +0000 (15:34 +1000)]
typo in last commit

6 years agoSculpt: change behavior of crease brush
Campbell Barton [Wed, 15 Apr 2015 05:22:37 +0000 (15:22 +1000)]
Sculpt: change behavior of crease brush

Pinch would give a flat result on either side of the stroke,
because points were dragged towards a single point.

Now pinch is projected on the sculpt plane, which gives a tighter crease.
The reverse is true too - blob brush which shares the code is also more curved.

6 years agoRNA: use lock_ prefix for booleans
Campbell Barton [Wed, 15 Apr 2015 04:51:17 +0000 (14:51 +1000)]
RNA: use lock_ prefix for booleans

6 years agoFix T44389: Tooltips swapped in Logic Editor
Julian Eisel [Tue, 14 Apr 2015 15:15:28 +0000 (17:15 +0200)]
Fix T44389: Tooltips swapped in Logic Editor

6 years agoMultiview: compositor openexr multiview images fully working
Dalai Felinto [Tue, 14 Apr 2015 15:19:07 +0000 (12:19 -0300)]
Multiview: compositor openexr multiview images fully working

This is from my original missing-bits/TODO list.
Basically multiview openexr was only working when multiview was on.

6 years agoFix T44343 Compositor image node cannot properly load multilayer EXRs
Dalai Felinto [Tue, 14 Apr 2015 14:19:23 +0000 (11:19 -0300)]
Fix T44343 Compositor image node cannot properly load multilayer EXRs

6 years agoSecond round of hair random rotation limited to 180 degrees
Mai Lavelle [Tue, 14 Apr 2015 14:00:17 +0000 (19:00 +0500)]
Second round of hair random rotation limited to 180 degrees

This time roll back to originally discussed in the code review page approach
with simply bumping UI range for the property.

It's still not totally free from forward compatibility breaking (which is
already broken comparing to previous release) but at least it'll keep files
working inbetween of git blender versions in cases random factor was not
set above 2.0.

Differential Revision:

6 years agoAction Editor: Make the warning on unlinking actions a bit less intrusive
Joshua Leung [Tue, 14 Apr 2015 13:18:45 +0000 (01:18 +1200)]
Action Editor: Make the warning on unlinking actions a bit less intrusive

venomgfx was complaining that having it do the popup everytime was too intrusive,
so demoting it to just showing the warning in the header.

6 years agoFix T44385 SSAO inverted with new Intel drivers.
Antony Riakiotakis [Tue, 14 Apr 2015 10:31:23 +0000 (12:31 +0200)]
Fix T44385 SSAO inverted with new Intel drivers.

Intel has decided to fix this for newer devices and drivers only, so we
can't really avoid keeping a list of buggy drivers here.

6 years agoAdd flag that prevents editing of markers. Can be located in marker
Antony Riakiotakis [Tue, 14 Apr 2015 10:11:24 +0000 (12:11 +0200)]
Add flag that prevents editing of markers. Can be located in marker

When active, all editing operators for markers will not fire up.

6 years agoDyntopo queue added the same edges multiple times
Campbell Barton [Tue, 14 Apr 2015 08:39:40 +0000 (18:39 +1000)]
Dyntopo queue added the same edges multiple times

Use tagging to avoid re-evaluating the same edges while sculpting.

While gives only minor speedup,
it allows for changes to the queue without additional redundant checks.

6 years agoBMesh: avoid customdata copy for new dyntopo verts
Campbell Barton [Tue, 14 Apr 2015 08:32:10 +0000 (18:32 +1000)]
BMesh: avoid customdata copy for new dyntopo verts

6 years agoinitialize members in-order
Campbell Barton [Tue, 14 Apr 2015 08:24:40 +0000 (18:24 +1000)]
initialize members in-order

6 years agoFix T44348: Blender crashes when selecting bone from inactive scene in outliner
Sergey Sharybin [Tue, 14 Apr 2015 08:24:17 +0000 (13:24 +0500)]
Fix T44348: Blender crashes when selecting bone from inactive scene in outliner

Pose is not guaranteed to be existing in object, so can't be used for selection
flag clear. Use bones themselves for that.

6 years agoPBVH: use realloc/recalloc
Campbell Barton [Tue, 14 Apr 2015 06:02:38 +0000 (16:02 +1000)]
PBVH: use realloc/recalloc

6 years agoAnimation Editors: Name filter now updates as you type, making it a true "live search"
Joshua Leung [Tue, 14 Apr 2015 06:50:15 +0000 (18:50 +1200)]
Animation Editors: Name filter now updates as you type, making it a true "live search"

6 years agoNLA: The "filter by name" functionality now works with NLA strips too
Joshua Leung [Tue, 14 Apr 2015 06:27:05 +0000 (18:27 +1200)]
NLA: The "filter by name" functionality now works with NLA strips too

6 years agoNLA: Store track that the strip being tweaked comes from
Joshua Leung [Tue, 14 Apr 2015 05:10:04 +0000 (17:10 +1200)]
NLA: Store track that the strip being tweaked comes from

There should be no functional changes visible from this change, but this commit
should make it easier to code tools which need to check on tweeakmode status,
by making it easier to figure out which NLA Track contains the strip which
owned the action being edited. (The strip is already saved, so this commit just
adds the track alongside it).

For now there is no version patch for this. The worst that happens is that an
extra refresh is needed in the NLA editor to get these to show up.

6 years agoFix for another NLA drawing bug uncovered by the previous commit
Joshua Leung [Tue, 14 Apr 2015 04:51:20 +0000 (16:51 +1200)]
Fix for another NLA drawing bug uncovered by the previous commit

With multiple strips in tweakmode, only the one tagged as being "active"
would get drawn in the correct colours, while all the others would just
get drawn as a selected strip instead.

6 years agoTemporary fix for NLA strips not getting drawn in tweakmode with multiple strips...
Joshua Leung [Tue, 14 Apr 2015 04:48:34 +0000 (16:48 +1200)]
Temporary fix for NLA strips not getting drawn in tweakmode with multiple strips selected

When entering tweakmode on multiple strips (from different AnimData blocks)
simultaneously, only the track containing the last selected strip would be
shown. All the other tracks with strips being tweaked would not appear at

6 years agoNLA: Shift-Tab toggles tweakmode AND makes that track solo
Joshua Leung [Sun, 12 Apr 2015 08:42:34 +0000 (20:42 +1200)]
NLA: Shift-Tab toggles tweakmode AND makes that track solo

To help make it more convenient to edit stashed actions, Shift-Tab
(i.e. holding down the Shift key, which "tabbing" into tweakmode as
usual to edit the action referenced by the active NLA strip) now flags
the NLA Track that the strip occupies as being "solo" too.

This allows you to use the NLA to select a stashed action, then Shift-Tab
to start editing it without any other actions in the NLA stack interfering.
Like the "Next/Previous Layer" tools in the Action Editor, this is designed
to help with checking on stashed actions.

6 years agoBMesh: avoid redundant face-exists check (dyntopo)
Campbell Barton [Tue, 14 Apr 2015 05:27:27 +0000 (15:27 +1000)]
BMesh: avoid redundant face-exists check (dyntopo)

6 years agoBMesh: optimize BM_face_exists
Campbell Barton [Tue, 14 Apr 2015 05:24:32 +0000 (15:24 +1000)]
BMesh: optimize BM_face_exists

Avoid flagging/clearing flags,
just walk over the face until a mismatch is found.

6 years agoCleanup: warnings
Campbell Barton [Tue, 14 Apr 2015 00:30:14 +0000 (10:30 +1000)]
Cleanup: warnings

6 years agoCleanup: don't use single sets for comparisons
Campbell Barton [Tue, 14 Apr 2015 00:29:11 +0000 (10:29 +1000)]
Cleanup: don't use single sets for comparisons

6 years agoFix for *harmless* T44342 Error when saving multilayer EXR
Dalai Felinto [Mon, 13 Apr 2015 22:56:56 +0000 (19:56 -0300)]
Fix for *harmless* T44342 Error when saving multilayer EXR

This was introduced with multiview, and it was an oversight on my end.
There is no error, we simply was never returning True

6 years agoFix T44362 no easy way to repeatedly duplicate keyframes in action
Antony Riakiotakis [Mon, 13 Apr 2015 21:58:50 +0000 (23:58 +0200)]
Fix T44362 no easy way to repeatedly duplicate keyframes in action

Reporter used a hacky work-around by placing cursor at end of keyframe
range and doing ctrl-C ctrl-V repeatedly. This was working on 2.73 but
not anymore since the old selection is not kept.

Much better is to have duplication operator be repeatable. This commit
takes care of that.

6 years agocleanup: style
Mike Erwin [Mon, 13 Apr 2015 20:56:43 +0000 (16:56 -0400)]
cleanup: style

to match my earlier commit in temp_viewport_fx_merge branch

plus more

no functional changes

6 years agoCleanup: do not use _reportf() when not doing any string formating!
Bastien Montagne [Mon, 13 Apr 2015 19:00:06 +0000 (21:00 +0200)]
Cleanup: do not use _reportf() when not doing any string formating!

Also usual minor i18n messages stuff...

6 years agoMoar precision for Color Stop position slider in Color Ramps
Julian Eisel [Mon, 13 Apr 2015 18:27:32 +0000 (20:27 +0200)]
Moar precision for Color Stop position slider in Color Ramps

Normal dragging now uses a precision of 0.01 instead of 0.1, shift+dragging now uses 0.001. (0.1 steps can still be done using ctrl)

Requested by @venomgfx

6 years agoFix bug with autonormalization and transform (after own range commit).
Antony Riakiotakis [Mon, 13 Apr 2015 16:37:15 +0000 (18:37 +0200)]
Fix bug with autonormalization and transform (after own range commit).

Transforming the center after transforming a handle would continuously
flush an extra offset to the handles.

Also use normalization range of -1.0 to 1.0 instead of -0.5 to 0.5 (not
really important, just for better comparisons)

6 years agoFix for crash with non-camera as a camera
Campbell Barton [Mon, 13 Apr 2015 14:59:28 +0000 (00:59 +1000)]
Fix for crash with non-camera as a camera

6 years agoAfter user feedback:
Antony Riakiotakis [Mon, 13 Apr 2015 14:09:45 +0000 (16:09 +0200)]
After user feedback:

* Allow ctrl click to do negative stroke in line strokes
* Use alt for angle constraints.

6 years agoRevert "Fix hair random rotation limited to 180 degrees"
Sergey Sharybin [Mon, 13 Apr 2015 14:16:40 +0000 (19:16 +0500)]
Revert "Fix hair random rotation limited to 180 degrees"

This reverts commit 176ed5bfe280ef2151f93c0940d54498aaf00d71.

6 years agoGraph editor:
Antony Riakiotakis [Mon, 13 Apr 2015 13:57:46 +0000 (15:57 +0200)]
Graph editor:

Normalization feature now uses the full range of the data instead of
just one semiaxis for the maximum size.

6 years agoFix T44359: `mesh_normals_loop_custom_set()` would not behave correctly with zero...
Bastien Montagne [Mon, 13 Apr 2015 13:41:57 +0000 (15:41 +0200)]
Fix T44359: `mesh_normals_loop_custom_set()` would not behave correctly with zero-normals.

Zero-normals here are used as a shortcut to say 'use auto-computed values'.
So we have to do so in pre-process steps!

6 years agoFix T44350: View3D layer out of sync /w scene
Campbell Barton [Mon, 13 Apr 2015 13:10:43 +0000 (23:10 +1000)]
Fix T44350: View3D layer out of sync /w scene

6 years agoWorkaround T44351: Scopes make editmesh lag
Campbell Barton [Mon, 13 Apr 2015 12:39:27 +0000 (22:39 +1000)]
Workaround T44351: Scopes make editmesh lag

Scopes are very heavy to calculate and editmesh uv's can cause the image view to redraw.

Best just disable scopes in this case.

6 years agoNew operator for action and graph editor that centers around current
Antony Riakiotakis [Mon, 13 Apr 2015 12:30:17 +0000 (14:30 +0200)]
New operator for action and graph editor that centers around current
scene frame, bound to numberpad zero.

6 years agoCleanup: style
Campbell Barton [Mon, 13 Apr 2015 12:08:51 +0000 (22:08 +1000)]
Cleanup: style

6 years agoBMesh: resolve skinny face artifacts /w dyntopo
Campbell Barton [Mon, 13 Apr 2015 10:40:52 +0000 (20:40 +1000)]
BMesh: resolve skinny face artifacts /w dyntopo

Dyntopo can currently create skinny faces,
especially when the faces are much larger then the resolution.

To get the old behavior, set debug value to 1234

6 years agoMinor edits of python class documentation (regarding ID tagging)
Gaia Clary [Mon, 13 Apr 2015 11:22:40 +0000 (13:22 +0200)]
Minor edits of python class documentation (regarding ID tagging)

6 years agoCalculate auto normalization maximum from keyframes within range if
Antony Riakiotakis [Mon, 13 Apr 2015 10:43:56 +0000 (12:43 +0200)]
Calculate auto normalization maximum from keyframes within range if
preview is on

6 years agoNodes: Remove hardcoded BLENDER_MAX_THREADS number of threads
Sergey Sharybin [Mon, 13 Apr 2015 09:45:56 +0000 (14:45 +0500)]
Nodes: Remove hardcoded BLENDER_MAX_THREADS number of threads

Use actual available number of threads now, which will make it easier
to increase max number of threads, without having some sloppy memory
usage and without doing some redundant checks on thread data which was
never used.

6 years agoBe a bit more specific in the message.
Antony Riakiotakis [Mon, 13 Apr 2015 10:28:12 +0000 (12:28 +0200)]
Be a bit more specific in the message.

6 years agoWindows:
Antony Riakiotakis [Mon, 13 Apr 2015 10:21:21 +0000 (12:21 +0200)]

Only print backtrace on debug builds, since on release builds there is
only some useless output from a python library and fftw.

6 years agoDepsgraph debug: Remove hardcoded array of BLENDER_MAX_THREADS elements
Sergey Sharybin [Mon, 13 Apr 2015 09:37:12 +0000 (14:37 +0500)]
Depsgraph debug: Remove hardcoded array of BLENDER_MAX_THREADS elements

Allocate statistics array dynamically, so increasing max number of threads does
not increase sloppyness of the memory usage.

For the further cleanups: we can try alloca-ing this array, but it's also not
really safe because we can have quite huge number of threads in the future.
Plus statistics will allocate memory for each individual entry, so using alloca
is not going to give anything beneficial here.

6 years agoFix adding to paint-curves from the first point
Campbell Barton [Mon, 13 Apr 2015 09:27:10 +0000 (19:27 +1000)]
Fix adding to paint-curves from the first point

- add_index now works when selecting the first point.
- sliding now selects the correct handle.

6 years agoFix hair random rotation limited to 180 degrees
Mai Lavelle [Mon, 13 Apr 2015 09:14:43 +0000 (14:14 +0500)]
Fix hair random rotation limited to 180 degrees

The issue was caused by phase being limited from 0 to 1, which gave only
0..M_PI distribution which is not good enough for good randomness.

Now the phase is being randomized across full 0..2*M_PI range.

6 years agoMake python gotchas more clear (regarding handling of stale data)
Gaia Clary [Mon, 13 Apr 2015 08:59:47 +0000 (10:59 +0200)]
Make python gotchas more clear (regarding handling of stale data)

6 years agoFix T44361: array modifier "fit curve" mode not working properly
Bastien Montagne [Mon, 13 Apr 2015 08:51:04 +0000 (10:51 +0200)]
Fix T44361: array modifier "fit curve" mode not working properly

'tot_length / step_length' gives the number of 'segments', not the number of
copies - we have to add 1 here.

6 years agoFix T44364: Remove shape key crashes Blender
Campbell Barton [Mon, 13 Apr 2015 05:54:37 +0000 (15:54 +1000)]
Fix T44364: Remove shape key crashes Blender

6 years agoerror in last commit
Campbell Barton [Mon, 13 Apr 2015 05:43:57 +0000 (15:43 +1000)]
error in last commit

6 years agoBMesh: diagram for dyntopo edge subdiv
Campbell Barton [Mon, 13 Apr 2015 05:42:00 +0000 (15:42 +1000)]
BMesh: diagram for dyntopo edge subdiv

6 years agoPy API: default arg for location_3d_to_region_2d
Campbell Barton [Mon, 13 Apr 2015 04:35:16 +0000 (14:35 +1000)]
Py API: default arg for location_3d_to_region_2d

This function could return None for points behind the view,
note this in the doc-string and add an optional fallback argument.

6 years agoGHash: use unsigned int for ghash_size
Campbell Barton [Mon, 13 Apr 2015 03:45:14 +0000 (13:45 +1000)]
GHash: use unsigned int for ghash_size

6 years agondof: fix Linux device detect regression
Mike Erwin [Sun, 12 Apr 2015 23:58:17 +0000 (19:58 -0400)]
ndof: fix Linux device detect regression

6 years agomaking add>lamp its own menu so it can be extended by addons
Ines Almeida [Sun, 12 Apr 2015 10:38:18 +0000 (11:38 +0100)]
making add>lamp its own menu so it can be extended by addons

6 years agoDyntopo: redundant length check subdividing edges
Campbell Barton [Sun, 12 Apr 2015 09:14:28 +0000 (19:14 +1000)]
Dyntopo: redundant length check subdividing edges

6 years agoBMesh: minor optimization counting adjacent data
Campbell Barton [Sun, 12 Apr 2015 05:21:40 +0000 (15:21 +1000)]
BMesh: minor optimization counting adjacent data

add BM_***_count_is_over(), _count_is_equal()

Useful if we only want to know if the count is a smaller value.

6 years agoBMesh: avoid ghash realloc's making log entry
Campbell Barton [Sun, 12 Apr 2015 05:01:38 +0000 (15:01 +1000)]
BMesh: avoid ghash realloc's making log entry

6 years agoReset view after ctrl-clicking a Panel
Julian Eisel [Sun, 12 Apr 2015 06:03:46 +0000 (08:03 +0200)]
Reset view after ctrl-clicking a Panel

Using ctrl+LMB to collapse all panels except of the clicked one resulted
in an empty area if done from a view that is scrolled down to some
degree. Resetting the view makes this much better, although it still
doesn't work that well if the area is really small, but I don't think
it's worth over-complicating things here.

"Feature-Request" by @maxon ;)

6 years agoMissed this last commit (dyntopo hashing)
Campbell Barton [Sun, 12 Apr 2015 01:12:16 +0000 (11:12 +1000)]
Missed this last commit (dyntopo hashing)

6 years agoBGE: Add keyword arguments to createConstraint API
Thomas Szepe [Sat, 11 Apr 2015 14:16:46 +0000 (16:16 +0200)]
BGE: Add keyword arguments to createConstraint API

Added keyword arguments to createConstraint.
Changed initial values for the pivod XYZ  form 1 to 0.0.
Changed initial values for the axis Z form 1 to 0.0.
Delete the parsing for 4 parameters, because parsing only the X pivot is not necessary, also it was not working correctly (int instead of  float).

Reviewers: brita_, sybren, lordloki, campbellbarton, moguri

Reviewed By: lordloki, campbellbarton

Subscribers: campbellbarton

Differential Revision:

6 years agoBGE: FIX T43537: ImageMirror does not work in BlenderPlayer with quad buffer
Benoit Bolsee [Sat, 11 Apr 2015 14:07:45 +0000 (16:07 +0200)]
BGE: FIX T43537: ImageMirror does not work in BlenderPlayer with quad buffer

In quad-buffer stereo mode, the GE render pass ends with the right eye on the right buffer, but we need to draw on the left buffer to capture the render.

Reviewed By: agoose77, HG1

6 years agoBMesh: intersect was using ptr hash for int keys
Campbell Barton [Sat, 11 Apr 2015 13:41:10 +0000 (23:41 +1000)]
BMesh: intersect was using ptr hash for int keys

6 years agoBMesh: simplify hashing for dyntopo
Campbell Barton [Sat, 11 Apr 2015 13:36:37 +0000 (23:36 +1000)]
BMesh: simplify hashing for dyntopo

Was using pointer hashing when the keys are in fact uint's.
Since they're well distributed from the rangetree,
no need to do bit-shifting tricks. just use int as hash.
Gives ~8% speedup in own tests.

6 years agoRemove splash link to support gooseberry
Campbell Barton [Sat, 11 Apr 2015 09:41:31 +0000 (19:41 +1000)]
Remove splash link to support gooseberry

Was included only for initial campaign.

6 years agoBGE : Fix T43800: getScreenVect()/getScreenPosition()/modelview_matrix returns incorr...
Thomas Szepe [Fri, 10 Apr 2015 18:20:52 +0000 (20:20 +0200)]
BGE : Fix T43800: getScreenVect()/getScreenPosition()/modelview_matrix returns incorrect results

The getScreenVect(), getScreenPosition() and modelview_matrixmethod returns an incorrect results if called after the camera has been translated on the same frame.
The model view matrix will be update only once per frame with Cam->SetModelviewMatrix in KX_KetsjiEngine::RenderFrame.
Using GetWorldToCamera as model view matrix to get an actual view matrix even if the camera is moved.

Reviewers: sergey, dfelinto, brita_, sybren, hg1, campbellbarton

Reviewed By: hg1, campbellbarton

Projects: #game_engine

Differential Revision:

6 years agoCycles: Fix compilation error on windows after recent logging changes
Sergey Sharybin [Fri, 10 Apr 2015 17:35:10 +0000 (22:35 +0500)]
Cycles: Fix compilation error on windows after recent logging changes

6 years agoDisable strict flags for msvc
Campbell Barton [Fri, 10 Apr 2015 14:42:35 +0000 (00:42 +1000)]
Disable strict flags for msvc

6 years agoFix for debug-only crash when setting "Any" keymap input type
Dalai Felinto [Fri, 10 Apr 2015 14:03:47 +0000 (11:03 -0300)]
Fix for debug-only crash when setting "Any" keymap input type

Another one of those assert crashes when passing values != than 1 and 0
(in this case the value is -1)

Notes from reviewer:
These should really be enums. since valid values are KM_ANY,

But can see at some point this was changed from an enum so... I guess
this is the only way.

Reviewers: campbellbarton

Differential Revision:

6 years agoThumbnails: Add translations to font preview.
Bastien Montagne [Fri, 10 Apr 2015 13:31:38 +0000 (15:31 +0200)]
Thumbnails: Add translations to font preview.

Not much to say, this is pretty straightforward.
We just have to add current locale to thumbnails 'signature', so that
previews get re-generated when we change locale...

Tested with Japanese and French.

Btw, I do not really understand why using BLF in ImBuf is badlevel... :/

6 years agoBLF translation: fix BLF_lang_get(), add UI-agnostic BLF_translate/_do helpers.
Bastien Montagne [Fri, 10 Apr 2015 13:28:47 +0000 (15:28 +0200)]
BLF translation: fix BLF_lang_get(), add UI-agnostic BLF_translate/_do helpers.

BLF_lang_get() shall return 'default' Blender locale (en_US) when translations
are completely disabled!

Also, add BLF_translate() and BLF_translate_do() to allow translating some strings
outside of label/tip context, but still only when i18n global flag is enabled.

6 years agoThumbnails: some reorganization, decouple actual path of file to preview from 'ref...
Bastien Montagne [Fri, 10 Apr 2015 12:46:17 +0000 (14:46 +0200)]
Thumbnails: some reorganization, decouple actual path of file to preview from 'ref' one.

(Partial) backport from asset-experiments branch.

Reorganization: previously we could recompute name/path of thumb file two or three times,
now added lower-level internal functions that take those as parameters, so in most case
they are computed only once. Very minor optimization, but simple too.

Also, path of file to preview is now decoupled from path used to generate its URI
(and hence thumbnail path). In asset-experiments branch this is needed because
we also handle datablock previews in/as thumbnails (file_path is .blend path,
URI is .blend path + datablock 'path').

Here this will be needed for same kind of reason - once translated, font thumbnails
need to be re-generated when we change current language...

6 years agoUse off_t for filesize (was int)
Campbell Barton [Fri, 10 Apr 2015 12:01:10 +0000 (22:01 +1000)]
Use off_t for filesize (was int)

Resolves finding >2gig files.

Also enable strict flags.