Commit Graph

48210 Commits

Author SHA1 Message Date
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
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
Campbell Barton
b88421aa62 Dyntopo: avoid redundant loop collapsing edges 2015-04-16 12:24:59 +10:00
Campbell Barton
f57b904807 Dyntopo: blend vertex normals when collapsing 2015-04-16 11:59:48 +10:00
Campbell Barton
6675fd6b52 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.
2015-04-16 04:32:16 +10:00
Campbell Barton
7f4b6a345e Fix crash loading file without scene in bg mode 2015-04-16 01:45:30 +10:00
Campbell Barton
99299da4b5 Cleanup: warnings, ws 2015-04-16 01:12:22 +10:00
Campbell Barton
34c1319d06 Cleanup: use const for event->tablet_data 2015-04-16 01:07:54 +10:00
Campbell Barton
f660085e2f Increase max brush size from 200 to 500 2015-04-16 00:59:43 +10:00
Porteries Tristan
7730391d74 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)
2015-04-15 22:02:16 +10:00
Campbell Barton
b9ea6fbb30 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.
2015-04-15 20:56:59 +10:00
Campbell Barton
240c5704e4 BMesh: Missed normal from example /w skip-cd flag
We may still want to use the normal as a reference but skip customdata.
2015-04-15 20:56:11 +10:00
Bastien Montagne
255fb79ff3 Fix T44395: String untranslated in open file window. 2015-04-15 11:11:22 +02:00
Campbell Barton
730684f976 BMesh: avoid ghash lookups splitting the pbvh
This isn't a bottleneck but may as well avoid the extra ghash overhead.
2015-04-15 16:14:27 +10:00
Campbell Barton
9a711f98a7 typo in last commit 2015-04-15 15:34:06 +10:00
Campbell Barton
356ceded27 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.
2015-04-15 15:27:27 +10:00
Campbell Barton
b216f7abd6 RNA: use lock_ prefix for booleans 2015-04-15 14:51:17 +10:00
Julian Eisel
9b9978656d Fix T44389: Tooltips swapped in Logic Editor 2015-04-14 17:24:55 +02:00
Dalai Felinto
2d33057c75 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.
2015-04-14 12:19:11 -03:00
Dalai Felinto
66e2fc39ce Fix T44343 Compositor image node cannot properly load multilayer EXRs 2015-04-14 11:21:01 -03:00
Mai Lavelle
f1355d0b45 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: https://developer.blender.org/D1214
2015-04-14 19:04:12 +05:00
Joshua Leung
f1e1ec2d8d 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.
2015-04-15 01:19:38 +12:00
Antony Riakiotakis
04daaee0fd 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.
2015-04-14 12:31:23 +02:00
Antony Riakiotakis
ed40d5eaa7 Add flag that prevents editing of markers. Can be located in marker
menu.

When active, all editing operators for markers will not fire up.
2015-04-14 12:12:17 +02:00
Campbell Barton
68eeeea57e 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.
2015-04-14 18:56:49 +10:00
Campbell Barton
7daa921359 BMesh: avoid customdata copy for new dyntopo verts 2015-04-14 18:41:01 +10:00
Campbell Barton
d36429b930 initialize members in-order 2015-04-14 18:41:01 +10:00
Sergey Sharybin
825b015e92 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.
2015-04-14 13:25:25 +05:00
Campbell Barton
8486ee39bd PBVH: use realloc/recalloc 2015-04-14 17:58:07 +10:00
Joshua Leung
34d4ad326c Animation Editors: Name filter now updates as you type, making it a true "live search" 2015-04-14 18:50:15 +12:00
Joshua Leung
1e488802dc NLA: The "filter by name" functionality now works with NLA strips too 2015-04-14 18:39:09 +12:00
Joshua Leung
bb1bc7ecda 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.
2015-04-14 18:39:07 +12:00
Joshua Leung
c95f38b92a 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.
2015-04-14 18:39:05 +12:00
Joshua Leung
5361339ba0 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
all.
2015-04-14 18:39:03 +12:00
Joshua Leung
097801e701 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.
2015-04-14 18:39:02 +12:00
Campbell Barton
d841b75c5f BMesh: avoid redundant face-exists check (dyntopo) 2015-04-14 15:27:27 +10:00
Campbell Barton
6fb0563aee BMesh: optimize BM_face_exists
Avoid flagging/clearing flags,
just walk over the face until a mismatch is found.
2015-04-14 15:27:08 +10:00
Campbell Barton
c448196bb4 Cleanup: warnings 2015-04-14 10:34:32 +10:00
Dalai Felinto
2bceb3ae18 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
2015-04-13 19:56:56 -03:00
Antony Riakiotakis
54c18d4849 Fix T44362 no easy way to repeatedly duplicate keyframes in action
editors.

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.
2015-04-13 23:58:50 +02:00
Mike Erwin
27ded012d6 cleanup: style
to match my earlier commit in temp_viewport_fx_merge branch
https://developer.blender.org/rBc3f3b958dc0b

plus more

no functional changes
2015-04-13 16:56:43 -04:00
Bastien Montagne
057c7c6fab Cleanup: do not use _reportf() when not doing any string formating!
Also usual minor i18n messages stuff...
2015-04-13 21:00:45 +02:00
Julian Eisel
86fe894f86 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
2015-04-13 20:31:40 +02:00
Antony Riakiotakis
aed97c9efb 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)
2015-04-13 18:37:15 +02:00
Campbell Barton
cae23bab6b Fix for crash with non-camera as a camera 2015-04-14 01:00:07 +10:00
Antony Riakiotakis
f27e0b7c5e After user feedback:
* Allow ctrl click to do negative stroke in line strokes
* Use alt for angle constraints.
2015-04-13 16:31:06 +02:00
Sergey Sharybin
4ce437fff0 Revert "Fix hair random rotation limited to 180 degrees"
This reverts commit 176ed5bfe280ef2151f93c0940d54498aaf00d71.
2015-04-13 19:16:54 +05:00
Antony Riakiotakis
198ca57ae4 Graph editor:
Normalization feature now uses the full range of the data instead of
just one semiaxis for the maximum size.
2015-04-13 15:57:57 +02:00
Bastien Montagne
8ad37b0d22 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!
2015-04-13 15:44:09 +02:00
Campbell Barton
17a9b05b9d Fix T44350: View3D layer out of sync /w scene 2015-04-13 23:10:43 +10:00
Campbell Barton
41350a91b5 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.
2015-04-13 22:44:08 +10:00
Antony Riakiotakis
364b6b29ff New operator for action and graph editor that centers around current
scene frame, bound to numberpad zero.
2015-04-13 14:30:24 +02:00
Campbell Barton
d1f9fcaabc Cleanup: style 2015-04-13 22:08:51 +10:00
Campbell Barton
d2da8aa27a 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
2015-04-13 21:25:39 +10:00
Gaia Clary
a50955ee0f Minor edits of python class documentation (regarding ID tagging) 2015-04-13 13:22:55 +02:00
Antony Riakiotakis
8c616e86b5 Calculate auto normalization maximum from keyframes within range if
preview is on
2015-04-13 12:44:06 +02:00
Sergey Sharybin
fdc653e8ce 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.
2015-04-13 15:40:44 +05:00
Antony Riakiotakis
efe90384b7 Be a bit more specific in the message. 2015-04-13 12:28:12 +02:00
Antony Riakiotakis
8a97d46296 Windows:
Only print backtrace on debug builds, since on release builds there is
only some useless output from a python library and fftw.
2015-04-13 12:21:32 +02:00
Sergey Sharybin
97ae0f22cd 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.
2015-04-13 14:41:02 +05:00
Campbell Barton
890e533c76 Fix adding to paint-curves from the first point
- add_index now works when selecting the first point.
- sliding now selects the correct handle.
2015-04-13 19:30:43 +10:00
Mai Lavelle
176ed5bfe2 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.
2015-04-13 14:17:00 +05:00
Bastien Montagne
4fb33d82e2 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.
2015-04-13 10:51:04 +02:00
Campbell Barton
f684dfc432 Fix T44364: Remove shape key crashes Blender 2015-04-13 15:54:37 +10:00
Campbell Barton
dd0cba0076 error in last commit 2015-04-13 15:46:27 +10:00
Campbell Barton
919de1e4c9 BMesh: diagram for dyntopo edge subdiv 2015-04-13 15:43:25 +10:00
Campbell Barton
e688ba0304 GHash: use unsigned int for ghash_size 2015-04-13 13:45:48 +10:00
Campbell Barton
542a0c41d2 Dyntopo: redundant length check subdividing edges 2015-04-12 19:14:28 +10:00
Campbell Barton
690b90f1e2 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.
2015-04-12 17:38:14 +10:00
Campbell Barton
6d2c3a2456 BMesh: avoid ghash realloc's making log entry 2015-04-12 17:38:14 +10:00
Julian Eisel
f50fed6a6d 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 ;)
2015-04-12 08:07:34 +02:00
Campbell Barton
17b4f57bf0 Missed this last commit (dyntopo hashing) 2015-04-12 11:12:57 +10:00
Thomas Szepe
87b6d3c796 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: https://developer.blender.org/D705
2015-04-11 16:17:07 +02:00
Benoit Bolsee
b329016b29 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
2015-04-11 16:08:15 +02:00
Campbell Barton
a6421e1291 BMesh: intersect was using ptr hash for int keys 2015-04-11 23:41:10 +10:00
Campbell Barton
ccf44c400c 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.
2015-04-11 23:36:37 +10:00
Campbell Barton
7447a0173c Remove splash link to support gooseberry
Was included only for initial campaign.
2015-04-11 19:41:31 +10:00
Thomas Szepe
465a5d29c0 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: https://developer.blender.org/D1170
2015-04-10 20:20:52 +02:00
Campbell Barton
d850fd8244 Disable strict flags for msvc 2015-04-11 00:43:15 +10:00
Dalai Felinto
02a5cf75a2 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,
KM_MOD_FIRST, KM_MOD_SECOND.

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

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1227
2015-04-10 11:10:10 -03:00
Bastien Montagne
f75bbe27e2 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... :/
2015-04-10 15:34:31 +02:00
Bastien Montagne
8a99dc2324 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.
2015-04-10 15:34:31 +02:00
Bastien Montagne
a36c43fc8c 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...
2015-04-10 15:34:31 +02:00
Campbell Barton
ec710775cf Use off_t for filesize (was int)
Resolves finding >2gig files.

Also enable strict flags.
2015-04-10 22:06:28 +10:00
Campbell Barton
b0906bcc5e Cleanup: remove win32 workaround 2015-04-10 22:06:28 +10:00
Bastien Montagne
085fa2e3d7 Fix T44329: Second part: prevent 'cachebuffer' and 'fullOSA' in preview renders. 2015-04-10 13:17:08 +02:00
Antony Riakiotakis
711a5c79d8 Don't use vertex colors in textured mesh display during texpaint.
Wasn't that irritating?
2015-04-10 13:05:32 +02:00
Antony Riakiotakis
237c53fbf1 Only selected keys will get cleaned by the action and graph clean
operators
2015-04-10 12:45:13 +02:00
Bastien Montagne
1e71270f77 Fix T44329: Blender Crash when rendering in 3DView.
This commit fixes two different issues actually:
* When view name is unknown/irrelevant, you should pass a NULL str pointer to
  `RE_RenderLayerGetPass()`, not an empty string!
* `render_result_rescale()` would unconditionnaly free re->result (at the end),
  even if it did not replaced it at all, leading to freed memory access later.

This is only a partial fix though, "CacheBuffer" (i.e. saving tiles in EXR files)
shall not be used in 3DView rendering, and yet it is here...
2015-04-10 12:32:19 +02:00
Antony Riakiotakis
253d15ea16 Move clean operator from action/ipo editors to the delete menu, now that
O key is bound to proportional editing.
2015-04-10 11:56:18 +02:00
Campbell Barton
31d354dfa3 rename _ipo -> _fcurve 2015-04-10 13:41:57 +10:00
Dalai Felinto
52f511269b Multiview: remove option to preview the selected stereo 3d mode and error when quadbuffer not supported
This was causing glitches when switching from/to fullscreen modes (e.g.,
side by side to anaglyph).

As for the quadbuffer errors this is part of a more complete solution to
be committed later.
2015-04-09 20:44:03 -03:00
Dalai Felinto
33028d17a0 Multiview: fix crashes with pageflip mode - by Cédric Paille (cedricp) 2015-04-09 15:22:53 -03:00
Antony Riakiotakis
866532360c Fix T31546 fragment program gets created every frame
That was really crappy indeed. Now we have a separate API
for low level OpenGL programs, plus a nice interface for GPU, also
removes some GL calls from main code as a plus :)

The source for the programs is also moved to nice external .glsl files
(not sure which extension convention GPU assemply uses)
2015-04-09 20:20:50 +02:00
Antony Riakiotakis
851ea206d0 Separate proportional editing options for graph and action editor. 2015-04-09 18:30:14 +02:00
Antony Riakiotakis
ae5f2c2025 Fix regression after multiview, basically we appended the wrong frames
to movie file.

We have to resort to use crappy workarounds with preview arguments again
since preview range is only for OpenGL preview.
2015-04-09 18:02:43 +02:00
Bastien Montagne
b30a2fe3f4 Fix T44322: Crash when trying to render spotlight halos.
Trying to access rl's from full samples in non-full-OSA context (with uninitialized
sample index even :P ).

Caused by rBd5f1b9c2, probably a copy/paste typo or so.
2015-04-09 16:32:45 +02:00
Bastien Montagne
4cadbb03a8 Seriously... Fix building! 2015-04-09 16:17:51 +02:00
Antony Riakiotakis
5197aa04c6 Fix part of T44320 selecting islands can fail.
Issue here is simple and has been fixed in other places such as
texpainting: Basically if face has different winding, do not calculate
it as adjucent to the other face, even if UV is identical.

This allows us to stack islands of symmetrical closed meshes on top of
one another and still be able to select the two identical island halfs
(provided the normals are correct of course).
2015-04-09 16:12:43 +02:00
Antony Riakiotakis
8a1c444c93 Disable proportional editing when duplicating keyframes 2015-04-09 12:49:06 +02:00
Sergey Sharybin
9749b2cb81 Fix partial image update during rendering
Was broken since 5d212fb.
2015-04-09 15:33:44 +05:00
Antony Riakiotakis
d75bfdfafc Fix T44308 painting in 2D editor offset by one pixel.
Not sure why this was so in the first place but changing it seems OK.
2015-04-09 12:18:51 +02:00
Campbell Barton
8732c1a8b7 WM: allow 'save as' to path set by operator
Invoke assumed the filepath was never set.
Scripts couldn't invoke save-as at a custom location.
2015-04-09 19:49:05 +10:00
Campbell Barton
bdad2c0595 Fix uninitialized var use reading view prefix 2015-04-09 17:30:26 +10:00
Campbell Barton
55ee436618 Fix missing NULL checks 2015-04-09 17:23:51 +10:00
Campbell Barton
089fc24c76 Fix for passing -1 to close() 2015-04-09 17:21:17 +10:00
Campbell Barton
5467260ce9 Cleanup: redundant NULL checks 2015-04-09 17:20:02 +10:00
Campbell Barton
0b59865115 Fix missing NULL check 2015-04-09 17:09:10 +10:00
Campbell Barton
12661de087 Remove invalid assert 2015-04-09 13:00:58 +10:00
Bastien Montagne
aa24704749 Fix T44235: UNC Path Fails in open.
Here again, stat on '\\MYSERVER\foo\..' does not work...

Anyway, we can handle this in a much much simpler way using
BLI_access and BLI_parent_dir...
2015-04-08 21:59:05 +02:00
Bastien Montagne
114d1b23d2 Fix T44113: Some System Folders do not contain go back arrow.
On windows empty dirs are completely empty - no par or current entries
are listed either, in those cases artificially add those.

Furthermore, stat on UNC paths do not support current/parent 'shortcuts'
(i.e. things like '\\SERVER\foo\bar\..' do not work), so we have to hack
around that mess...

This should ensure us we always do have valid parrent entry...
2015-04-08 21:59:05 +02:00
Dalai Felinto
5d212fb812 Fix T44310: Other render slots cleared after each render 2015-04-08 16:17:56 -03:00
Sergey Sharybin
c523e82e31 Particles: Fix for missing particles in render if they're disabled for viewport
The issue was introduced in rB4b685e1 and it appears some crazy area still
accesses particles for render after deleting it's render data, which broke
viewport/render behavior.

This commit restores previous G.is_rendering logic and adds corresponding
checks to cache construction, so counting is all consistent.

Goes to the TODO list to either replace G.is_rendering with eval_ctx or to
make it so psys->renderdata always exists during render sync.
2015-04-08 20:17:44 +05:00
Sergey Sharybin
2d05466700 Fix T44213: Bevel object from different scene won't update generated bezier curve geometry
The issue was caused by bevel object being automatically added to the scene graph
by dag_get_node() and had no incoming relations, even form the scene. This confused
scene update flush logic.

Now there'll be a scene relation added to such nodes, so they're always reachable
from the root node.
2015-04-08 20:06:42 +05:00
Antony Riakiotakis
62f863b78a Fix memory leak in bump GLSL node 2015-04-08 16:48:15 +02:00
Antony Riakiotakis
7fcb0bf71e Attempt GLSL compile fix in opensuse linux basically, we passed a vec3
as a float.
2015-04-08 16:30:45 +02:00
Campbell Barton
2c91f9dc11 Transform: use relative motion for vertex slide
Vertex slide was using absolute mouse position unlike all other kinds of transform.

also remove need for allocated 2d projections.
2015-04-08 23:01:38 +10:00
Campbell Barton
01b1eb445c Math Lib: add project_plane_v3_v3v3
Useful for projecting one vector onto another (as a plane).

This is a rather common operation,
doing inline isn't always obvious whats happening.
2015-04-08 23:01:37 +10:00
Antony Riakiotakis
d249db9755 Action editor proportional editing:
Fix crash when extending instead of translating
2015-04-08 14:36:25 +02:00
Bastien Montagne
3b440dbf66 FileBrowser previews: Get rid of ugly, stupid and confusing 'FILE_TYPE_ICON_MOVIE' hack.
Was only handling failures in video thumbnails, was confusing (giving two different types
for video files, *sigh*), and... useless, since thumbnail code already handles smartly
failures in preview generation!
2015-04-08 14:31:49 +02:00
Antony Riakiotakis
c5c60099c5 Proportional editing in action editor: display circle in center of
region.

It's -really- hard getting the center of selection here in the y axis, I
feel this is the best compromise.
2015-04-08 14:31:11 +02:00
Antony Riakiotakis
235f1feaf4 Fix opengl render preview in image editor broken
During multiview, invalidation of the display imbuf of the preview image
was eaten by code eating elves.
2015-04-08 12:49:54 +02:00
Antony Riakiotakis
bb19c7c3f7 Forgot this last commit. 2015-04-08 12:02:23 +02:00
Antony Riakiotakis
d6d4d5e094 Fix multiview issue: play animation crashes
We need to avoid passing a NULL string here, and also we need to pass
the correct suffix we used to pass view string directly which is
probably not what we want.
2015-04-08 11:53:14 +02:00
Campbell Barton
a18e5d6a67 warning: unused 2015-04-08 16:26:58 +10:00
Campbell Barton
ab2a8832dd Use IS_EQF for floats 2015-04-08 16:20:53 +10:00
Dalai Felinto
60ecc6b3b3 Multiview: Expose current drawn eye to API (viewport only) 2015-04-08 03:12:45 -03:00
Dalai Felinto
796b17b843 Multiview: Fullscreen modes (sidebyside/topbottom) were not working
* WM_window_is_fullscreen() is not the correct test.
* Also, we no longer change window to fullscreen automatically.
2015-04-08 02:02:59 -03:00
Porteries Tristan
f5648f6db9 BGE : Fix T36285 Wrong viewport scale.
Fix of T36285, I just invalidate projection matrix when a camera switch
to viewport mode, because we need to rewrite the projection matrix in
RenderFrame.
It worked with old blender version because when you use viewport render
one camera is added in the camera list and initialize its projection
matrix for the first time. But when we used several cameras + viewport
for splitscreen we had issues.

Reviewers: dfelinto, hg1, ben2610, lordloki, moguri

Reviewed By: moguri

Projects: #game_rendering, #game_engine

Differential Revision: https://developer.blender.org/D1202
2015-04-08 06:56:17 +02:00
Joshua Leung
441f68e2b0 Partial fix for T44219
Prevent crashes from out of bounds array access if an invalid rotation mode
is passed to the euler rotation blenlib calculations.
2015-04-08 14:34:07 +12:00
Joshua Leung
1492db09d1 Partial fixes for issues raised in T44219
* The breakdowner tool will no longer operate directly on properties
  of type "enum", as this doesn't make sense most of the time. This
  is still not much use though when custom properties (ints) are used
  to drive some underlying enum property though (as in blenrig)
* The breakdowner no longer tries to perform any blending if the
  start and end values are the same, to avoid float precision issues.
2015-04-08 14:34:06 +12:00
Campbell Barton
808ea6271a Cleanup: confusing if statements & alignment 2015-04-08 12:24:52 +10:00
Campbell Barton
8c539b0ab5 Font preview for file browser
D1002 by @plasmasolutions, with own refactoring.

Note, needed to do a bad-level call here (IMB -> BLF)
Also can't use the BLF API directly because its not thread-safe.
So keep the function isolated (blf_thumbs.c).
2015-04-08 10:38:19 +10:00
Campbell Barton
c56c493cf4 BLF: use regular unsigned int's
So GL isnt needed to include BLF types.
2015-04-08 10:30:18 +10:00
Campbell Barton
a2ea4ce70d Cleanup: IMB/thumb naming 2015-04-08 09:55:02 +10:00
Campbell Barton
a57b898d17 BLF: Fix clamping drawing into byte buffer 2015-04-08 09:55:01 +10:00
Julian Eisel
7e52d810f3 Muliview: Minor UI-tweaks
* Don't grey multiview options in file browser and in Node Editor Properties out if multi-view is disabled, hide them completely (I think greying out single buttons is fine, but in case of entire blocks we should just hide to save space)
* Move multiview settings in Node Editor Properties above alpha settings to prevent the alpha buttons from appearing above multiview settings if multiview is enabled and Stereo 3D format is chosen (making them appear below is much nicer)
2015-04-08 00:41:37 +02:00
Campbell Barton
796c3c7748 Fix T44290: Clear users & fake-user conflict
The purpose of clearing users in this case is not to save the data,
so keeping fake-user doesn't make sense.
2015-04-08 06:50:38 +10:00
Campbell Barton
c89637be30 BGE: use tuple for returning display size 2015-04-08 06:28:05 +10:00
Dalai Felinto
cc9c049ff7 Multiview: compositor - avoid trashing image viewer views/buffers when multiview is off
I found this while investigating why the backdrop shows 'blank' while I
update a node influence factor. This problem still persist, but maybe it
was there before multiview. In release it is not noticeable, but in my
debug build is quite evident.
2015-04-07 16:56:31 -03:00
Dalai Felinto
4c2306d21a Multiview: compositor was not updating when multiview was off 2015-04-07 16:38:21 -03:00
Antony Riakiotakis
c1e5d966c6 Proportional editing support for the action editor.
There are a few things here which are not so nice:

* Position of proportional edit circle is not centered on data
(difficult to predict positions here since those are completely custom,
 will probably be positioned at center of area later instead)

* Result is flushed to curve handles only at the end of the transform,
so if people have the graph editor open they will see handles lagging behind.
2015-04-07 20:49:47 +02:00
Dalai Felinto
662c2cd910 Multiview: update Set Stereo 3D menu when the selected stereo mode changes 2015-04-07 15:43:06 -03:00
Thomas Szepe
e36b0cb8f3 BGE: New API method getDisplayDimensions
This patch adds a new API function to get the actual display dimensions in pixels.

Reviewers: dfelinto, sybren, lordloki, moguri

Reviewed By: lordloki, moguri

Differential Revision: https://developer.blender.org/D648
2015-04-07 18:32:25 +02:00
Antony Riakiotakis
f9f3c29a3a Fix crash when changing proxy storage type for editing (was own
stupidity casting from Scene to Editing in RNA)

Move versioning for proxy storage to multiview version check (not really
correct but it was orphaned before and it doesn't hurt either).
2015-04-07 16:08:46 +02:00
Julian Eisel
cc78664d50 Revert Sticky Keys (and everything related to that)
Our current keymap doesn't give us enough room to make such changes in
the event system. To fix small issues caused by this, we would need to do
drastic changes in Blender's keymaps and internal handling. It was worth
a try, but it didn't work.

I can write down a more descriptive statement in a few days, but for now
I need a break of this stuff.
2015-04-07 14:13:20 +02:00
Campbell Barton
d60ff6c112 Fix for own last commit
resolved bug but wasn't correct
2015-04-07 20:27:08 +10:00
Antony Riakiotakis
34818a44b2 Make image strips also follow the project directory storage options. 2015-04-07 12:15:18 +02:00
Campbell Barton
20a780e3e8 Fix T44258: Can't select similar regions 2015-04-07 19:56:24 +10:00
Sergey Sharybin
4b685e1b90 Fix T44268: Particles: too many virtual parents + non-100 display% = crash
Issue was caused by mismatched logic in counting child/parent particles in
job initialization and actual job execution. Confusion here came from mixed
usage of psys->renderdata and G.is_rendering.

We need to get rid of G.is_rendering and use eval_ctx if it's really needed,
but we also might just use psys->renderdata check since it's expected psys
to have this structure anyway.
2015-04-07 13:52:42 +05:00
Krzysztof Recko
98f4106694 Metaball tessellation optimization (Octree to BVH)
Speedup is non-linear, 2x-10x faster is quite normal.
Patch T43678.

- Switched from an Octree to BVH.
- Finding first points of surface no longer "wastes" density function evaluation: every result is cached.
- Use MemArena instead of using own memory management.
- Correct calculation of metaelem bounding box.
- Remove mball_count(): mballs are now counted "on the go".
2015-04-07 13:19:50 +10:00
Campbell Barton
9510137d12 Cleanup: brace placement /w structs 2015-04-07 11:25:42 +10:00
Campbell Barton
e2eeb46a1b Cleanup: rename treehash -> outliner_treehash
This is an API specifically for the outliner,
not some generic hierarchical hash structure.
2015-04-07 11:01:47 +10:00
Campbell Barton
5217d2bc0e Use BKE_edgehash_ensure_p where possible 2015-04-07 10:53:58 +10:00
Campbell Barton
808de65d91 EdgeHash: ensure function, avoids multiple lookups 2015-04-07 10:53:20 +10:00
Campbell Barton
1b9f1519bc Cleanup 2015-04-07 08:46:48 +10:00
Julian Eisel
3dcdacffca This commit doesn't deserve a title
Today just wasn't my day...
2015-04-06 23:23:13 +02:00
Julian Eisel
bcc9a23548 Various Sticky fixes (tm)
* Revert 776bfa64a53191b and c3dad7953afccd4 (some X11 systems are doing
stupid things forcing me to do an extra check that completely breaks the
click type handling on other systems using the slightly changed
implementation from those commits - see T44278)
* Fix sample lines in Compositor+VSE

(And yes, this time I tested on both of my systems to make sure
everything is fine)
2015-04-06 23:10:21 +02:00
Bastien Montagne
33a9247334 UI i18n cleanup...
And some general style cleanup as well (line length...).
2015-04-06 22:06:06 +02:00
Jens Verwiebe
2aa79679dc OSX: add also license for iomp5 using cmake and fix all textfiles wrong destination 2015-04-06 19:55:51 +02:00
Sybren A. Stüvel
593b4d84c4 BGE: followup of renaming parameter "other" to "reference"
See commit 3e5332bb959c686cb5bc5b6007d96088d5d1bc23
2015-04-06 18:23:56 +02:00
Sybren A. Stüvel
3e5332bb95 BGE: fixed nomenclature of KX_Scene::addObject and KX_Scene::AddReplicaObject
KX_Scene::addObject: Changed the parameter "other" to "reference", as "other" doesn't mean anything.
KX_Scene::AddReplicaObject: Changed the parameter "parentobject" to "referenceobject", as the parameter did NOT contain a parent object in any way.

Now both functions use the same kind of name for the same thing.

Thanks to panzergame / Porteries Tristan.
2015-04-06 17:11:36 +02:00
Dalai Felinto
36f352a4e4 Fix doversion check - patch by Sergey Sharybin 2015-04-06 11:11:36 -03:00
Dalai Felinto
d5f1b9c222 Multi-View and Stereo 3D
Official Documentation:
http://www.blender.org/manual/render/workflows/multiview.html

Implemented Features
====================
Builtin Stereo Camera
* Convergence Mode
* Interocular Distance
* Convergence Distance
* Pivot Mode

Viewport
* Cameras
* Plane
* Volume

Compositor
* View Switch Node
* Image Node Multi-View OpenEXR support

Sequencer
* Image/Movie Strips 'Use Multiview'

UV/Image Editor
* Option to see Multi-View images in Stereo-3D or its individual images
* Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images

I/O
* Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images

Scene Render Views
* Ability to have an arbitrary number of views in the scene

Missing Bits
============
First rule of Multi-View bug report: If something is not working as it should *when Views is off* this is a severe bug, do mention this in the report.

Second rule is, if something works *when Views is off* but doesn't (or crashes) when *Views is on*, this is a important bug. Do mention this in the report.

Everything else is likely small todos, and may wait until we are sure none of the above is happening.

Apart from that there are those known issues:
* Compositor Image Node poorly working for Multi-View OpenEXR
(this was working prefectly before the 'Use Multi-View' functionality)
* Selecting camera from Multi-View when looking from camera is problematic
* Animation Playback (ctrl+F11) doesn't support stereo formats
* Wrong filepath when trying to play back animated scene
* Viewport Rendering doesn't support Multi-View
* Overscan Rendering
* Fullscreen display modes need to warn the user
* Object copy should be aware of views suffix

Acknowledgments
===============
* Francesco Siddi for the help with the original feature specs and design
* Brecht Van Lommel for the original review of the code and design early on
* Blender Foundation for the Development Fund to support the project wrap up

Final patch reviewers:
* Antony Riakiotakis (psy-fi)
* Campbell Barton (ideasman42)
* Julian Eisel (Severin)
* Sergey Sharybin (nazgul)
* Thomas Dinged (dingto)

Code contributors of the original branch in github:
* Alexey Akishin
* Gabriel Caraballo
2015-04-06 10:40:12 -03:00
Sergey Sharybin
74df307ca4 Cycles: Free unused image buffers when rendering with locked interface
It is still possible to free a bit more memory by detecting buildin images
which are not used by shaders, but that's not going to improve memory usage
that much to bother about this now.

Such change brings peak memory usage from 4.1GB to 3.4GB when rendering
01_01_01_D layout scene from the Gooseberry project. Mainly because of
freeing memory used by rather huge environment map in the viewport.

Reviewers: campbellbarton, juicyfruit

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D1215
2015-04-06 17:47:08 +05:00
Julian Eisel
bb2300de94 Fix T44282: Image sampling line disappears after a while
Now even to master
2015-04-06 14:12:05 +02:00
Julian Eisel
883663a0ad Fix T44278: Tab, Z-Key and Spacebar not working
Seems like a fix that is needed for some X11 systems causes this bug on
others :| Not sure if the systems that needed this fix are now still
fine (since I did a slight change to the click type check procedure),
but I need to check that on my system in the institute in a bit.
2015-04-06 13:13:35 +02:00
Campbell Barton
26e50295ce Use BKE_ghash_ensure_p where possible 2015-04-06 20:41:37 +10:00
Campbell Barton
dd129125b6 GHash: ensure function, avoids multiple lookups 2015-04-06 20:33:02 +10:00
Campbell Barton
dd3aa1b372 Cleanup: replace confusing 'if' statements 2015-04-06 16:40:26 +10:00
Campbell Barton
8cc475c40b Fix T43696: Baking tearing normals
Patch D1207 by @chrisr
2015-04-06 15:56:33 +10:00
Campbell Barton
986972701e Fix T44249: Cursor depth offset 2015-04-06 15:00:07 +10:00
Campbell Barton
434087981a Fix minor glitch getting depth from mouse cursor 2015-04-06 15:00:07 +10:00
Joshua Leung
46b42dba14 Fix: Stroke Edit Mode warning for GPencil draws correctly with Region Overlap enabled 2015-04-06 13:21:18 +12:00
Joshua Leung
5574f4c59d Fix: It was difficult to select control points for NLA Control FCurves in the Graph Editor 2015-04-06 12:19:20 +12:00
Campbell Barton
7157f3dbce GHash: no reason to use GSetEntry in ghash API 2015-04-06 09:08:10 +10:00
Julian Eisel
c3dad7953a Stickies: Remove redundant fixes
Those fixes aren't needed anymore due to
776bfa64a53191b6f6aba107449be9353b7a2bee
2015-04-05 20:04:37 +02:00
Julian Eisel
776bfa64a5 Stickies: Don't send extra event on KM_CLICK
Just add KM_CLICK to the already sent KM_RELEASE, don't send a new one
for this.

This might help us to get rid of quite some glitches and workarounds \o/
(why didn't this come earlier to my mind? :S)
2015-04-05 19:32:57 +02:00
Julian Eisel
af23e8d44a Fix T44275: CTRL+LMB to extrude to mouse position conflicts with snapped
extruding

More practical description of the bug: extruding with ctrl to use
snapping and confirming the action added another extrusion to the mouse
position.
This was caused from the second event that is now sent if a key release
happens within the click timeout. It triggers the "Extrude to Cursor"
operator since it is called by CTRL+LMB wich is exactly the event that
is sent in this case.

I'm not totally happy with this workaround since it changes the Confirm/
Abort event for all transformation actions to key release which *might*
result in more conflicts (fingers crossed this isn't the case). If this
happens we might need to write some special transformation handling for
extrusion.

This is an example of the difficulties we get from loading too much
functions on the same keys - we need to be careful with that!
2015-04-05 18:52:36 +02:00
Julian Eisel
92755da471 Fix T44251 (2nd try): Changing views using numpad broken 2015-04-05 15:41:20 +02:00
Thomas Szepe
29e968a315 BGE: Fix T36703: Character motion actuator local movement not working correct.
The character motion actuator local movement does not taking account of the object rotation.
It is necessary to rotate the motion vector before adding the local movement.

Reviewers: sybren, lordloki, moguri

Reviewed By: lordloki, moguri

Maniphest Tasks: T42709

Differential Revision: https://developer.blender.org/D1206
2015-04-05 10:13:04 +02:00
Bastien Montagne
1a117ad40c Fix T44263: Invalid parameters to fill_vn_fl in deform.c.
Own fault, thanks a bunch to LazyDodo for finding that - and odd
GCC did not warn about it...
2015-04-05 09:50:16 +02:00
Campbell Barton
59bfc5c76e Fix T44270: Similar face region crash /w wire edge 2015-04-05 09:44:30 +10:00
Campbell Barton
2f42be6995 Cleanup: remove MSVC2008 workaround 2015-04-05 06:54:34 +10:00
Campbell Barton
26979d45b1 Cleanup: use float math funcs 2015-04-05 06:54:34 +10:00
Campbell Barton
cedd7cde44 WM: prefer define over zero wmEvent.val 2015-04-05 06:54:34 +10:00
Antony Riakiotakis
8eac4085be Fix T44264 copy paste error, checking same condition twice. 2015-04-04 22:39:25 +02:00
Julian Eisel
1604a26fe6 Fix T44251: Changing views using numpad broken
For KM_ANY I've filtered out every event that has a click type, although
that was only needed for the additional event sent on KM_HOLD. A bit weird
that this only happened on a few machines though.
2015-04-04 19:17:39 +02:00
Julian Eisel
59df941ea5 Fix T44259: Secondary strokes get terminated early when drawing in Continuous Drawing mode 2015-04-04 14:27:05 +02:00
Campbell Barton
f5949efb53 Missed in recent cleanup 2015-04-04 18:58:49 +11:00
Campbell Barton
eca22d076c Cleanup: move filelist out of storage
Depends on imbuf, problematic for tests
2015-04-04 17:21:18 +11:00
Campbell Barton
12cede5ca3 Cleanup: use BKE_ocean_* prefix 2015-04-04 15:19:24 +11:00
Campbell Barton
7acd69958b Cleanup: use BKE_sculptsession_* prefix 2015-04-04 15:19:21 +11:00
Campbell Barton
1c96a84320 Cleanup: use BKE_animdata_* prefix 2015-04-04 15:13:56 +11:00
Campbell Barton
89a3e4deff Cleanup: redundant normalize in expmap_to_quat 2015-04-04 14:45:54 +11:00
Campbell Barton
519e20f984 Cleanup 2015-04-04 10:48:17 +11:00
Campbell Barton
92c7632835 Add missing break statements 2015-04-04 10:48:05 +11:00
Campbell Barton
4a4aaabfa9 CMake: treat inline C files as headers 2015-04-04 10:37:38 +11:00
Campbell Barton
f9b6709a17 Add missing declarations 2015-04-04 10:37:38 +11:00
Joshua Leung
53f4aa7817 WIP: Added dedicated operator for unlinking actions from the Action Editor (NLA buttons support to come)
After looking into this more carefully, I've found that we do in fact need a dedicate
operator to add some custom logic when trying to unlink an action from the editor/datablocks.

Specifically, this new operator does the following:
1) When in Tweak Mode, it shouldn't be possible to unlink the active action,
   or else, everything turns to custard.
2) If the Action doesn't have any other users, the user should at least get
   a warning that it is going to get lost.
3) We need a convenient way to exit Tweak Mode from the Action Editor
4) If none of the above apply, we can just unlink normally

This commit implements this for the Action Editor, with stubs for the NLA Editor too.
Those will be fixed next.
2015-04-04 11:37:06 +13:00
Joshua Leung
34c4133daf Tweaks to descriptions for Action Layer Up/Down 2015-04-04 11:37:05 +13:00
Julian Eisel
53a3850a8a Sticky Keys backend
Design task: T42339
Differential Revision: D840
Initial implementation proposal: T41867

Short description:
With this we can distinguish between holding and tabbing a key. Useful
is this if we want to assign to operators to a single shortcut. If two
operators are assigned to one shortcut, we call this a sticky key.

More info is accessible through the design task and the diff.

A few people that were involved with this:
* Sean Olson for stressing me with this burden ;) - It is his enthusiasm
that pushed me forward to get this done
* Campbell and Antony for the code and design review
* Ton for the design review
* All the other people that gave feedback on the patch and helped to
make this possible

A big "Thank You" for you all!
2015-04-03 16:21:22 +02:00
Bastien Montagne
b444887054 Fix T44243: File browser behavior is inconsistent between append and open.
Only basic fix, the whole 'dir' field handling needs rework to correctly support
lib stuff (will be done as part of asset-experiment rewriting work)...

All this code is doing way too much filesystem inspection by itself, instead of
reusing flielist.c work - this is stupid, and will completely break with future
asset engines!
2015-04-03 16:20:18 +02:00
Bastien Montagne
3f30ebf64a Fix related to T44243: do not systematically do live-update when tab-completing textedit buttons.
We now have a specific flag for that, use it! Note that for all 'search menu' buttons,
there is already a similar behavior, so there is no need to force apply butt in this case
anyway, which means in practice this change only has effect in the single place
it is needed currently - file browser dir/file fields.

In this case (dir field), applying button even on partial matches leads code
to ask to create a new dir, which breaks completely the expected behavior of
completion. And we do not need immediate apply at all here.

Note this is the only 'autocomplete' button not using search menu, so this change
does not affect anything else in UI.
2015-04-03 16:20:18 +02:00
Joshua Leung
03f2e5d4a6 Fix: Drawing glitch when renaming animation channels
When renaming animation channels, the old names are no longer drawn behind the
text boxes anymore. This used to cause problems if the names were long, or
if text boxes were set to have transparent backgrounds.

Thanks to kopias for reporting on IRC.
2015-04-04 01:40:01 +13:00
Joshua Leung
6ef7e0a194 Bugfix: Stashed actions now get added to the bottom of the NLA Stack if there weren't any stashed actions already 2015-04-04 01:40:00 +13:00
Joshua Leung
b30836dad7 Fix: Action/NLA Tweakmode Checks
Made all action management operators use the AnimData-local flag instead of the scene
global one. Technically, this is more accurate and results in less blocking
situations (i.e. another object may be in tweakmode, but because of that, the active
object's action couldn't be stashed).

The main impetus for this though was that the Action Up/Down feature doesn't clear
the global flag, since it is not in a position to do so (since it can't load up
everything to clear it).

TODO:
I'll need to review how this global flag works and/or potentially ditch it (or
perhaps add some better ways to ensure that it stays valid), since while thinking
this over, I've noticed a few problems here. But, for the meantime, this commit
at least makes things more usable here in the short term.
2015-04-04 01:39:59 +13:00
Joshua Leung
943b830bf6 Action Layer Up/Down: Fixes for NLA Solo / NLA Muting
Now marking NLA Tracks as Solo'd and muting the NLA stack are linked together
when using the Action Layer Up/Down tools. That is, when switching from a NLA strip
to the active action, if the track was solo'd, then the NLA stack will get muted;
and when switching from the active action to a NLA track, if the stack was muted,
the track will get solo'd. This linkage means that we ensure that when moving up
and down the stack, we can continue to check the actions in isolation without things
messing up when you switch to and from the active action.

Also fixed a bug where this wasn't getting applied when going in the other direction.

TODO:
- When we get the rest/reference track support, we're going to need to insert
  some calls to flush the restpose values so that values from the previously
  used action do not pollute the pose for the new action (if not all the
  same controls get keyed across both). For now, it's best to only do this
  switching from the first frame.
2015-04-04 01:39:56 +13:00
Joshua Leung
961dac55cf Code Cleanup: Deduplicate logic to switch between NLA Strips/Actions 2015-04-04 01:39:55 +13:00
Joshua Leung
f350e9f3fc Code Cleanup: Split out duplicate code for finding an available NLA strip above/below 2015-04-04 01:39:54 +13:00
Joshua Leung
bcf1abbc83 Action Editor: Go to Next/Previous Animation Layer
With this feature, it is now possible to quickly switch between different actions
stacked/stashed on top of each other in the NLA Stack without having to go to the
NLA Editor and doing a tab-select-tab dance, thus saving quite a few clicks. It
was specifically designed with Game Animation / Action Library workflows in mind,
but also helps layered animation workflows.

Usage:
Simply click on the up/down arrow buttons (between the action datablock selector
and the pushdown/stash buttons) to go to the action in the NLA Track above/below
the NLA Strip being whose action is being tweaked in the Action Editor.

Notes:
- These still work when you're not editing the action used by a NLA Strip.
If you're just animating a new action normally, it is possible to use the "down arrow"
to temporarily jump down to the previous action without losing the new action you're
working on, and then use the "up arrow" to get back to it once you're done checking
the other action(s).

- If there are multiple actions/strips on the same layer/track, then only the one
closest to the current frame will be used.
2015-04-04 01:39:53 +13:00
Bastien Montagne
99d8e08ed9 Fix T44237: translation does not work in spacebar search.
Added translation there, also fixed a stupid bug which was leading most internal
operators to have 'dual' i18n_context (default NULL one and default 'Operator' one).
2015-04-03 12:26:29 +02:00
Bastien Montagne
89530f1486 Fix T44240: Lamp Halo invisible in rendering.
Halo is not possible when using 'deep' buffer shadow - reflect that in UI.
When not using buffered shadows, switch lamp bufftype to 'regular' on render, as already
done with 'halfway' method.
2015-04-03 11:17:58 +02:00
Antony Riakiotakis
43101289a6 Fix T44183 particles in linked group offset from object
A nice bug combining all the broken features of blender:
Particles, duplis and multiple scene dependencies.

Fortunately this was solvable: Basically, we need to
make sure derivedmesh for dupli instance is generated before
obmat is overriden. This also makes sense, since no instance
has "true" obmat apart from original. Lazy initialization of
derivedmesh just does not work here (or it -does- work but first
use should be before instance drawing).

Fingers crossed nothing else breaks after this...
2015-04-02 17:13:45 +02:00
Joshua Leung
5d4beee8c6 Code Cleanup: Split Action management operator stuff into action_data.c 2015-04-03 02:17:44 +13:00
Bastien Montagne
64fed6841a Cleanup: followup to rBf87d7c605dcfb - use __func__ instead of literal func name in string.
Since we are already using BKE_reportf... This way, no more issue if/when we copy/paste
or rename that!
2015-04-02 14:51:37 +02:00
Dalai Felinto
f87d7c605d Fix error messages for RE_layer_load_from_file() and RE_layer_load_from_file() 2015-04-02 09:08:25 -03:00
Antony Riakiotakis
77ff544d93 Fix issue reported by copias on irc, shift duplicate and snap crashes in
sequencer.

Missing snap callback case. Quick patch is to use the sequencer specific
operator instead of generic translate. We really need to support proper
snap/snap options at some point though.
2015-04-02 13:47:53 +02:00
Sergey Sharybin
ff45930cc5 Cleanup: Make strict flags happy
We might also just remove those arguments perhaps?
2015-04-02 16:01:23 +05:00
Joshua Leung
f30b60d139 Fix: Crash when using "On Selected Markers" mode for Propogate Pose with no markers present
The function to get a list of markers was not clearing the list before it exited
early, and with no way to tell that the method failed, callers could make the
mistake of trusting that the list was now valid (i.e. either full of marker
frames or empty, vs being invalid)
2015-04-02 23:48:25 +13:00
Joshua Leung
838c3503a7 Expose the Pose Propagate tool a bit more in the UI
From the various forum threads and the fact that a new addon has cropped up,
it appears that it is not that well known that this tool exists, and that it
can be used solve a very common problem that animators face. Namely:
  When you've gone through blocking out your key poses and then realise
  that you need to adjust parts of the rig which don't change much, this
  tool solves the problem of needing to go through doing grunt-work to
  fix all the other keyframes which now need to change as well.

So, this tool is now available in the following two places (in addition to
the existing Pose -> Propagate menu):
* Toolbar - The "Propagate" button will use the default mode (or the last
            used mode for each subsequent invocation).
            The arrow-button beside this will allow choosing between the different
            modes. (NOTE: The UI team may have different thoughts on this, but,
            let's give this a try for a while first, to see if this sort of thing works)
* Alt-P   - In Pose Mode, this will now bring up a menu allowing you to choose
            which mode is used. Since this sort of thing is something that does
            get run several times in a row when you need it, having this hotkey
            will make it a bit more convenient.
2015-04-02 23:48:24 +13:00
Joshua Leung
97f6bff45a Propagate Pose: Added 'Selected Keyframes' mode
This commit adds a new mode for the Propagate Pose tool. With this new option,
the Propagate Pose will copy the current pose over to all selected keyframes
after the current frame.

For reference, some of the other/existing options are: to copy it to each subsequent
keyframe with the same value (WHILE_HELD - the default), to the next keyframe,
or to the last keyframe.
2015-04-02 23:48:23 +13:00
Joshua Leung
f5adbcc3a2 GPencil: Draw status indicator in top-right corner when in Stroke Edit Mode
When in Stroke Edit Mode, an indicator/warning message is now shown in the top-right
corner to make it easier to notice that operations will apply to Grease Pencil
strokes instead.
2015-04-02 23:48:22 +13:00
Joshua Leung
2cac2e7213 GPencil: H/Shift-H/Alt-H now work to Hide and Reveal Layers in Strokes Edit Mode
* H       = Hide active layer
* Shift-H = Hide non-active layers
* Alt-H   = Show all layers
2015-04-02 23:48:21 +13:00
Antony Riakiotakis
146be8e258 Fix proportional editing always turned on in graph editor. 2015-04-02 12:34:35 +02:00
Campbell Barton
2fc69d11c8 Add custom properties to sequence strips 2015-04-02 21:07:23 +11:00
Sergey Sharybin
ac2530be8c Cleanup own todo: RE_pipeline is not a bad include from BKE, it's already used in few places 2015-04-02 14:39:58 +05:00
Campbell Barton
77667ad80f Cleanup 2015-04-02 16:12:33 +11:00
Joshua Leung
efc7c355b2 Code Cleanup: Pruning back the unusued includes now 2015-04-02 16:33:09 +13:00
Joshua Leung
26fa13e6f8 Code Cleanup: Reshuffling some of the GPencil code
* Moved the context handling stuff into gpencil_utils.c

* Moved the datablock and layer operators out into their own file too. Again,
  these weren't related to the other stuff that much

* Split the GPencil to Curves operator out into its own file (gpencil_convert.c).
  This was quite a massive blob of code (48kb) that was not that related to the
  other operators still in that file (gpencil_edit.c)
2015-04-02 16:29:33 +13:00
Joshua Leung
b6d878fa96 Fix for incorrect description 2015-04-02 12:12:35 +13:00
Julian Eisel
4b847595ee Fix T44217: Crash when starting .blend without "Load UI" enabled
Caused by changes in 31e26bb83b. This makes it fall back to the old
method if we can't find a screen.

Patch is actually by @LazyDodo with minor edits by me.
2015-04-02 00:24:58 +02:00
Antony Riakiotakis
8e6e7010bc Proportional editing for graph editor did not work outside edit mode 2015-04-01 11:24:58 +02:00
Bastien Montagne
71af08e1c9 Fix T44212: Crash on Group Rename.
Nice offset-by-one index error. ;)
2015-04-01 09:48:48 +02:00
Bastien Montagne
f7dbce9914 Real fix for T44127: Python does not guarantee to free all objects on exit...
All kudos to Campbell for the head-up and patch!
2015-04-01 09:34:01 +02:00
Campbell Barton
6461fbd9ce Fix glitch scaling bone radius
connected parents radius could get out of sync with child.
2015-04-01 17:07:04 +11:00
Campbell Barton
879f5c832b Match corrective-smooth UI to smooth modifier 2015-04-01 09:29:56 +11:00
Mike Erwin
c59ca9e477 silence MSVC warning
‘*/‘ found outside of comment
2015-03-31 14:58:41 -04:00
Antony Riakiotakis
f3b45eb76f Fix T43987 ambient occlusion wrong for Intel cards on windows (tested on
HD3000 and HD4000 cards so far).

Similar issue to Radeon 3xxx series but Intels need the opposite factors
for dfdy.
2015-03-31 17:37:17 +02:00
Campbell Barton
7ee340c0b4 Fix writing freed memory, exiting full view 2015-04-01 02:01:02 +11:00
Antony Riakiotakis
66a028a576 Proportional editing for IPO editor - version ready for feedback by artists.
This works by using the distance in the x axis only (usually artists want to influence nearby
keyframes based on timing, not value). Tweaking handles is the same as tweaking
the central handle. It's a bit ambiguous if proportional editing is really meaningful
for handles but will leave that for artists to decide.
2015-03-31 16:45:30 +02:00
Antony Riakiotakis
b98c7bcf3a Fix T44077 material update fails in textured mode when VBOs are off.
The issue has been here since we changed drawing code for meshes to use
vertex arrays instead of immediate mode when VBO was off. Basically we
should now always invalidate the GPU objects regardless of the VBO
setting in the preferences.

The bug has been there since 2.73 at least, but what made it apparent
now is that new version resets preferences and as an extension the VBO
flag.

Should be included in final 2.74 release
2015-03-31 11:42:39 +02:00
Bastien Montagne
4153ff3610 Fix T44201: Crash Deleting Hierarchy in Outliner
Typical error using '->next' member of a freed linked list item. A bit trickier
even here, since we have some recursion...

Trivial fix for nasty crasher, safe for 2.74 imho?
2015-03-31 08:36:48 +02:00
Campbell Barton
c16a8983ef Corrective Smooth Modifier (aka delta-mush)
This modifier can be used to correct bad deformations,

Original patch D1183 by @sazerac, with own modifications
2015-03-31 10:20:11 +11:00
Thomas Szepe
660173ed72 BGE: Fix: VehicleWrapper compiler warning.
The return type of raise_exc_wheel() is bool, but the method return -1. The compiler will change the return type type to an int. This can cause some problems on 64bit systems.

Reviewers: lordloki, sybren

Reviewed By: lordloki, sybren

Differential Revision: https://developer.blender.org/D1204
2015-03-30 22:47:46 +02:00
Antony Riakiotakis
9b4172cc6c Fix T43266, when we have a blendfile name use only that without the pid
for autosave. Will save Windows users from polluting their tmp folders
too much.
2015-03-30 19:21:38 +02:00
Antony Riakiotakis
050f28f03f Remove wrong back jump detection on looping 2015-03-30 18:27:28 +02:00
Bastien Montagne
bacdfc70e2 Fix T41191: Custom Loop Normals Viewport shading not updating when set from py script
Missing update tagging...

Safe for 2.74.
2015-03-30 15:04:42 +02:00
Antony Riakiotakis
c6ce8200dd Attempt to fix T44056, dof high quality shader error in ATI cards.
ATI driver does not like declaration of gl_FragColor and glFragData in
the same source file (even though only one of the two is ever
referenced), just use one of the two.
2015-03-30 14:45:14 +02:00
Campbell Barton
79a68617b3 Pass bool arg to RNA_property_boolean_set 2015-03-30 23:31:42 +11:00
Antony Riakiotakis
590efaacb8 Potential fix for T43987, ambient occlusion different between offscreen
and on screen rendering.

Aaaaah, the beauty of driver implementations of OpenGL!

Turns out the problem here is that drivers calculate df/dy differently
in some cases (probably because OpenGL counts y reverse to how the
window system does, so drivers can get confused).

Fixed this for the ATI case based on info we have so far, there's also
the Intel case which will be handled separately (missing info on Intel's
renderer string etc).

Unfortunately we can't really fix this for the general case so we'll
have to haldle cases as they come in our tracker and by adding silly
string comparisons in our GPU initialization module <sigh>.
2015-03-30 14:14:52 +02:00
Campbell Barton
4aeb34dc82 Cleanup: use const for typeinfo 2015-03-30 22:15:06 +11:00
Antony Riakiotakis
98cbde91d2 Fix compilation of game engine in ubuntu 2015-03-30 13:06:54 +02:00
Antony Riakiotakis
bfe63bbfc4 Grey out high quality depth of field when it's not supported by GPU 2015-03-30 12:49:05 +02:00
Campbell Barton
01e0062b4c missed last commit 2015-03-30 21:25:28 +11:00
Campbell Barton
268524c025 Cleanup: use const for typeinfo 2015-03-30 21:18:49 +11:00
Campbell Barton
09397ac2c1 Fix for invalid buffer access on zero-face meshes 2015-03-30 20:50:23 +11:00
Bastien Montagne
1b327aa219 Fix T44186: Bezier Bevel facto mapping broken when 'start' was set to 'Resolution' and 'end' was not.
Trivial, we need totla_length in that case too.

Safe to be backported to 2.74.
2015-03-30 10:24:26 +02:00
Mike Erwin
786763ca4c remove zero translations
within draw_emtpy_*
These are no-ops.

Also const-ified some variables there.
2015-03-30 02:53:39 -04:00
Mike Erwin
e47a96463d cleanup: remove unused code & vars 2015-03-30 01:25:34 -04:00
Mike Erwin
8d1dc22bec cleanup: typos in comments, style
no functional changes
2015-03-30 00:51:00 -04:00
Campbell Barton
dea0e3833f Remove use_invert_vertex_group use_ prefix
To match other modifiers.
2015-03-30 10:46:53 +11:00
Bastien Montagne
70d9c01325 Fix T44162: Outliner: modifier's icons toggle update issue
Use same notifier for button callback as the one used in matching outliner operator...
2015-03-29 13:14:59 +02:00
Sergey Sharybin
47c1112e6e Make internal functions of point density independent from Render 2015-03-29 02:34:44 +05:00
Sergey Sharybin
94b0193196 Make point density sampling functions a bit easier for re-use
Still not ideal but getting closer. Main annoying thing so far is
dependency of Render structure for now. It is used to switch particles
to render mode and could probably also be eliminated.
2015-03-29 02:14:06 +05:00
Sergey Sharybin
b25c208d5b Code cleanup: whitespace, line wrapping 2015-03-28 23:50:36 +05:00
Sergey Sharybin
2c5ba41413 Code cleanup: Get rid of set but unused matrix 2015-03-28 23:40:56 +05:00
Jens Verwiebe
44a4b90b4f Fix collada compile after BKE cleanup 2015-03-28 18:17:54 +01:00
Campbell Barton
b1d758ae6b Cleanup: redundant struct declarations 2015-03-29 03:56:39 +11:00
Campbell Barton
8a183aa26b Cleanup: use BKE_texture_ prefix 2015-03-29 03:16:55 +11:00
Campbell Barton
8c1c2b40a2 Use union for EditBone's
Avoids complicated casts accessing as int
2015-03-29 01:30:44 +11:00
Campbell Barton
fcc086a92b Cleanup: unused args 2015-03-29 01:26:09 +11:00
Joshua Leung
7a1e7295a5 NLA Strip Keyframes: Nullified the risk that NLA mapping can get applied to NLA Curves 2015-03-29 03:03:05 +13:00
Joshua Leung
b253be1a19 Nla Strip Keyframes: Active FCurve Keyframes panel displays names properly now (and doesn't disable the FCurves) 2015-03-29 02:45:24 +13:00
Joshua Leung
0c5d0422b4 NLA Strip Keyframes: Insert keyframe tools in Anim Editors work now
* Insert Keyframe tool for Dopesheet/Graph Editors needed to be modified to
  not try to resolve the paths for NLA Control Curves
* For now, the poll callback to get the "Active FCurve" also works when given
  a NLA control curve. They're really the same in most cases, and this should
  be fine until one of the channels does something funky.
2015-03-29 02:20:57 +13:00
Joshua Leung
0ffd7f721e Nla Strip Keyframes: Sliders in channel list insert keyframes now 2015-03-29 01:39:59 +13:00
Joshua Leung
34209b59b8 Nla Strip Curves: This works with anim channel rearranging tools now 2015-03-29 01:39:58 +13:00
Joshua Leung
182e84da88 Nla Strip Curves: Getting more stuff working
* Clicking anywhere on the expander collapses it (like for the gpencil one)
* Deleting these curves works now (but has the side effect of turning off
  the animated influence/time options too, as it is assumed that when those
  are enabled there is a corresponding fcurve)
2015-03-29 01:39:57 +13:00
Joshua Leung
67f983ac53 Nla Strip Controls: Added special FCurve type (in the animfiltering code)
Using the standard "FCurve" animchannel type didn't work that well for
the control FCurves on NLA Strips, as the paths would not resolve correctly,
and the indentation was wrong. Also, there would likely be issues down the
track with applying NLA mapping. Hence, it's easier to just create a separate
type for this case, and adapt the rest of the code to also consider these (todo).
2015-03-29 01:39:56 +13:00
Joshua Leung
8f4c5ff0ec Nla Strip Controls: Added dedicated "Expander" channel to Action/Graph Editors
The "Nla Strip Controls" channel is used to house the per-strip
FCurves for controlling the strip_time and influence properties.
It sits above the active action's first group, at the same level
in the hierarchy as other groups.

TODO: It looks like a dedicated FCurve channel is needed for these
control FCurves, so that we won't accidentally apply NLA mapping
or have these FCurves disabled by the path lookups failing.
2015-03-29 01:39:55 +13:00
Joshua Leung
6dac874d68 Fix for various small issues which may cause crashes 2015-03-29 01:39:54 +13:00
Joshua Leung
da0d0b2f20 Compile fix
New parameter added by these fixes did not exist when this call got added
2015-03-29 01:39:53 +13:00
Joshua Leung
90e9a22eaa Fix for earlier commit - Turning off "animated" influence/time didn't work
Reshuffled order that in which NLA Strip's F-Curves vs its automatic settings are
evaluated so that the automatic settings can always override the custom settings,
since it's not that easy to get things working correctly the other way around.
2015-03-29 01:39:53 +13:00
Joshua Leung
fc0a576c30 Keyframes on NLA-Strip F-Curves are detected by RNA buttons too 2015-03-29 01:39:52 +13:00
Joshua Leung
59b2316e82 Code Cleanup / Preemptive Bug Fixing: "action" parameter may get set when it shouldn't be
Logically, it makes sense that this parameter only gets used to describe the action
that the F-Curve actually belongs to (if it belongs to one). Otherwise, it should not
be set at all.
2015-03-29 01:39:51 +13:00
Joshua Leung
2b4ff142ab Fix T36385: Animated Strip-Time doesnt update
This commit implements proper evaluation + keyframing support for animating influence
and time on NLA Strips (among other properties) by resolving a few long standing issues
which prevented the original design for this from working.

The original design for animating these properties (and/or some of the other settings
on NLA Strips) is that NLA Strips actually have some of their own F-Curves that are
used for animating settings which will affect how they are evaluated. As seen in this
bug report, the alternative of having these animated as part of the stack (which the
strips work above/outside/on-top of) means that glitches can occur.

Although one of the original considerations for why this wasn't implemented earlier
was that introducing keyframes there isn't so clean cut, and causes UI design issues
for how we expose these via the animation editors for editing (NOTE: support for that
is still to come). Another concern is that this sets a precedent for how FModifiers
might get evaluated.
2015-03-29 01:39:50 +13:00
Joshua Leung
b7afbaf8cc Bugfix: Fix for crash when trying to create new action in Shape Key DopeSheet mode
When the active object had no shapekey data, trying to create a new action from the
Shape Keys mode of the DopeSheet would crash. The segfault here was a silly regression
caused by my earlier Action Stashing work.

However, the old (pre-Action Stashing) code here also wasn't that great either.
While it didn't crash, it would still silently create a new action, even if that
could not get assigned/used anywhere. To prevent both of these problems from
happening again, I've added additional null checks, as well as beefing up the poll
callback here to forbid keyframing
2015-03-28 23:23:23 +13:00
Sergey Sharybin
469ba8a30a Tracking: Code cleanup, missing break statements 2015-03-28 00:46:59 +05:00
Sergey Sharybin
5498629906 Freestyle: Code cleanup, silence warning in release mode 2015-03-28 00:34:16 +05:00
Campbell Barton
6f43e1dfef Cleanup: win32 mixed declare/statements in main()
Make it a more clear where declarations end
(ifdef's all over made it a bit confusing).
2015-03-28 04:12:12 +11:00
Campbell Barton
59b578e320 Cleanup: use const char for stats arg 2015-03-28 04:12:12 +11:00
Campbell Barton
d18e8ad1f3 Cleanup: view3d headers 2015-03-28 01:05:50 +11:00
Campbell Barton
267904dd3c Cleanup: gpencil headers 2015-03-28 01:05:50 +11:00
Campbell Barton
7cbb659400 Use squared dist /w comparisons (mask, edge-slide) 2015-03-28 01:05:49 +11:00
Antony Riakiotakis
7b7eac9211 Add profiling prints for audio synch to detect how continuous our frame
progression is
2015-03-27 15:00:13 +01:00
Sergey Sharybin
74e8e14cce Makesrna: Fix function prototypes for struct used RNA_def_struct_sdna_from
Previously makesrna would have generated code expecting DNA structure from
RNA_def_struct_sdna_from() to be passed to it. This was wrong because actual
PointerRNA points to a "parent" structure, making it impossible to add
functions to certain RNA structures.

It so far never needed and we didn't notice this issue, but it's needed for
some ongoing development now.
2015-03-27 18:44:11 +05:00
Sergey Sharybin
1c2f1ff725 Compositor: Cleanup, remove unused need_sync parameter 2015-03-27 18:23:32 +05:00
Sergey Sharybin
d84cc6a18f Compositor: Followup to previous stats commit
No need to mark tree for localization, it was never done and
it all just worked. We can save some CPU ticks by skipping doing
this.
2015-03-27 18:23:32 +05:00
Sergey Sharybin
da170d9dc3 Compositor: Fix heap overflow when copying previews 2015-03-27 18:23:32 +05:00
Sergey Sharybin
8af5390968 Fix T44149: Compositing : Node Groups do not work correctly
Input constants are to be connected before removing proxies,
otherwise node groups might give totally different result.

This is a regression and to be put into final release.
2015-03-27 18:23:32 +05:00
Sergey Sharybin
3366b30bf1 Compositor: Code cleanup, debug mode is now fine with strict flags 2015-03-27 18:23:32 +05:00
Sergey Sharybin
6cd82dbf57 CMake: Enable strict flags for C++ 2015-03-27 18:23:31 +05:00
Sergey Sharybin
061e73a270 Physics: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
Sergey Sharybin
052ebd6564 C++ RNA API: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
Sergey Sharybin
4393b60579 ImBuf: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
Sergey Sharybin
13358d049e Freestyle: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
Sergey Sharybin
2ada3512a2 Compositor: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
Campbell Barton
38c4645f0a rename BGE attr from D1091 (match methods) 2015-03-27 22:23:19 +11:00
Antony Riakiotakis
34c92848a7 Use preview option to detect frame range for filename when using ctrl
F11.
2015-03-27 11:39:09 +01:00
Sergey Sharybin
e7afba4b29 Compositor: Cleanup, don't pollute namepace with all symbols from std 2015-03-27 14:41:20 +05:00
Sergey Sharybin
408a2a8420 Compositor: Improve reports to the interface about what's going on
The functionality was got lost when new compositor system was landed
and it wasn't always clear what's causing the hicucps. Now it's nicely
reported to the stats line.
2015-03-27 14:38:02 +05:00
Porteries Tristan
a12b2ec66d BGE: New isDynamicSuspended python attribute
This is a new KX_GameObject attribute that it increments the
possibilities of optimization during the game

Additionally the unused m_bSuspendDynamics variable is removed.

Reviewers: moguri, agoose77, lordloki

Reviewed By: agoose77, lordloki

Subscribers: agoose77, lordloki

Differential Revision: https://developer.blender.org/D1091
2015-03-27 06:11:23 +01:00
Severin
c8f95cbb60 Only enable IME for supported translation contexts
For me, weird characters are drawn if IME is enabled but translation
is not set to a supported language.
Could become an utility function if needed later.
2015-03-26 22:16:00 +01:00
Severin
065e5896c4 IME: Minor API cleanup 2015-03-26 21:24:01 +01:00
Antony Riakiotakis
d26c18c05e Project directory proxies:
Use BL_proxy if directory is blank to avoid filling the whole folder
with files.
2015-03-26 18:25:25 +01:00
Antony Riakiotakis
4c7876c740 New option proxy placement, project directory.
There are two per-editor settings now, the Per-Strip setting (default)
and the Project setting.

The per strip setting basically uses the previous, per-strip options for
storing the proxies.
The project setting though will use a specified directory for -all-
proxies, or the blend file directory if no directory is given.
2015-03-26 17:54:16 +01:00
Antony Riakiotakis
d084967627 Revert "Change Enables proxy operator to Copy proxy operator."
This reverts commit ec03ab021f171bf529746bb440756fbc986b45e7.

Changing this since it looks like Mattieu does not really like the change.
Will be adding another way to tweak the directories
2015-03-26 15:44:51 +01:00
Antony Riakiotakis
c0ef4e9b78 Fix T44122, rendering OpenGL preview movie with audio has wrong audio
range and extra frames.

Issue here is that the movie backend would unconditionally use the start
frame of the scene instead of the preview frame. Solved by passing an
explicit "preview" argument.

Strictly speaking, the preview argument is part of the renderdata
struct, that is also passed to the code, but when rendering the final
result we want to unconditionally render the full range regardless of
the preview setting of the render structure.

However, OpenGL rendering does use the preview range so we need to
account for that when making those exports.

This is also a nice chance to correct the filenames, which still used
the full range.
2015-03-26 14:50:18 +01:00
Jens Verwiebe
f80064f2d2 Fix compiling after sound changes 2015-03-26 13:19:33 +01:00
Sergey Sharybin
59132e6481 Fix building with audaspace disabled after 828c85a 2015-03-26 16:33:20 +05:00
Antony Riakiotakis
dc3b869c9a Missed those last commit 2015-03-26 11:39:08 +01:00
Antony Riakiotakis
828c85a1bf sound module: Append functions with BKE (makes it easier to make them
out from local functions)
2015-03-26 11:35:41 +01:00
Bastien Montagne
d97b97460c Fix T44138: Crash in DataTransfer modifier when selecting a source with no loops.
Simply check and early return in case we have no source or destination items
(verts/edges/loops/polys) available...

Also, fix an assert in `BKE_mesh_calc_normals_poly()`, when called with no poly.
2015-03-26 09:20:37 +01:00
Julian Eisel
92f305a490 A more forward thinking version of previous commit
Basically same as 581afa9da37, but I guess we can assume that scopes added in future
to the image preview may also want to use the viewrect from the original ibuf.
2015-03-25 22:15:56 +01:00
Julian Eisel
581afa9da3 Fix T44121: VSE Preview scaling issue when using proxies and Show Overexposed 2015-03-25 21:52:54 +01:00
Lukas Tönne
4dc141f933 Yet another fix for crashing particles. 2015-03-25 20:09:02 +01:00
Mike Erwin
5e2cc06518 minor cleanup: alignment 2015-03-25 14:29:08 -04:00
Lukas Tönne
d4ac58d049 Fix T43694, by Krzysztof Rećko (chrisr), reviewed in D1177.
Added some guards to prevent clumping to non existing particles. Also, adjusted threaded child path evaluation, so each child is evaluated once - previously virtual parents were done twice.
2015-03-25 18:34:52 +01:00
Antony Riakiotakis
4fd2f678ea Fix T44133 SSAO in OpenGL rendering from orthographic camera did not
work

Safe to include in final release
2015-03-25 15:05:36 +01:00
Antony Riakiotakis
1a866d55ac Fix crash with computers not supporting high quality depth of field. 2015-03-25 14:43:28 +01:00
Antony Riakiotakis
0ef9f61410 Attempt to fix an error in compilation of geometry shaders in Intel 4000
cards (see T44072)
2015-03-25 13:05:52 +01:00
Campbell Barton
7bc8ddc6e2 use BKE_mball_tessellate.h include
also remove unused includes
2015-03-25 22:40:09 +11:00