Commit Graph

48210 Commits

Author SHA1 Message Date
Dalai Felinto
22b564f93e Fix T44498 - Blender crashes in some files after render slots fix
This is a temporary fix until I get to investigate it more carefully.
It will help if the report could include the steps to reproduce it
besides the buggy file.

Note: RenderResult should *always* have at least a valid RenderView,
which is not what happens here.
2015-04-23 11:01:56 -03:00
Antony Riakiotakis
bcac112dde Fix T44494 crop node changes values during execution.
We used the node data as a store for node execution,
bad idea, since the data itself is a template from which
execution data should be derived, never to be modified during execution.
2015-04-23 14:23:42 +02:00
Julian Eisel
2dfbf31a41 Display slot menu in Properties Region even if render slot is empty
For the records, this one is caused by 31f984bc3ffcc838343, it wasn't
implemented at all ;)
2015-04-23 13:33:29 +02:00
Julian Eisel
85e455b245 Fix slot menu not displayed if render result slot is empty
Caused by own mistake in 31f984bc3ffcc83834, reported by @sebastian_k in
IRC
2015-04-23 13:21:36 +02:00
Campbell Barton
8010672bbc BMesh: mesh-data picking, edge+vert improvement
When zoomed out vert bias over edges meant it wasn't possible to select edges.
Now pick the edge if the cursor is closer to its center.
2015-04-23 16:11:54 +10:00
Campbell Barton
87b3e62b3d Cleanup: warnings 2015-04-23 16:09:30 +10:00
Dalai Felinto
ecb3362a24 Fix T44396 - Compositing render slots don't work
Note 1: If you go to a render slot previously rendered and change
something in the compositing the buffer will still vanish.

This is an old bug, T44181, and not addressed here
(I'm basically just fixing the regression introduced with multiview)

Note 2: I have a work in progress patch to get rid of
RenderResult->rectf/rect32/rectz entirely. It still not working, and we
should have a working code base before doing refactoring anyways.
2015-04-22 18:48:31 -03:00
Bastien Montagne
6a1c123df4 Fix broken uiTemplateIconView().
Was using enum **value** as **icon id**... tripple sigh!
Guess it was working for its only current use (matcaps), but still.
2015-04-22 22:48:40 +02:00
Julian Eisel
90b7652334 Fix T44472: Stereo 3D save options missing in File Browser 2015-04-22 21:50:49 +02:00
Dalai Felinto
4a8421faa4 Fix T44463 - crash on "Full Sample" 2015-04-22 16:40:21 -03:00
Julian Eisel
31f984bc3f Show buttons to change render layer/pass in UV Editor header
Previousely this was "hidden" in the Properties Region, this makes it
more visible/usable.

Requested by @sebastian_k
2015-04-22 20:43:43 +02:00
Sergey Sharybin
147d0cdf98 Tracking: Show plane track outline if image failed to load 2015-04-22 23:20:00 +05:00
Sergey Sharybin
f35489fa94 Tracking: Fix missing pointer array check when reading plane track
This could cause memory corruption when moving files from system with one
bitness to another.
2015-04-22 23:00:41 +05:00
Antony Riakiotakis
3174cbe8f2 Double click selection on animation channels selects all keyframes of the range 2015-04-22 19:28:07 +02:00
Tamito Kajiyama
3da7226844 Freestyle: Fixed a crash due to missing call of StrokeShader.__init__() in Python.
Many thanks to the problem report by flokkievids (Folkert de Vries)
through a comment in Patch D963.
2015-04-23 01:12:55 +09:00
Julian Eisel
798facbff3 Fix crashes when moving game property with invalid index (from py/redo
panel)

Also hides index option in redo panel to be consistent with similar
operators
2015-04-22 17:20:10 +02:00
Antony Riakiotakis
d354eeab74 Placeholder image strips feedback session changes no.2:
Change paths operator can also have the same placeholder logic now
2015-04-22 14:11:51 +02:00
Antony Riakiotakis
e7c2d244c3 Placeholder image strips feedback session changes no.1:
Autodetect range of strips.
2015-04-22 14:11:51 +02:00
Antony Riakiotakis
62d10cd833 Placeholders for sequencer take one.
Placeholder images, means that the image sequence reserves a range for
images, displaying black while we wait for them to finish rendering.

This is meant as a feature to not break the layout of gooseberry
sequence edits while we wait for those frames to arrive.
2015-04-22 14:11:51 +02:00
Julian Eisel
dc36e1fe39 Fix T44476: Hiding Grease Pencil from Outliner RMB doesn't update 3D
View
2015-04-22 14:02:48 +02:00
Julian Eisel
18aaae101a Fix T44477: Overlapping tooltips in Outliner
Tooltips for buttons in the Outliner could overlap the Outliner's RMB
menu in some cases (and there's no way to get rid of the tooltip again).
This disables the button's tooltip before creating the menu (as we do it
for the normal RMB menu)
2015-04-22 13:41:43 +02:00
Antony Riakiotakis
1044dfd965 Fix and simplify vertical positioning and calculation of metadata
display more.
2015-04-22 13:19:58 +02:00
Antony Riakiotakis
818a0cdc76 Fix stamp missing after multiview merge.
Was not using acquired render result correctly, most likely a copy paste
error.
2015-04-22 12:03:06 +02:00
Antony Riakiotakis
97587dc5d6 Stamp cannot be written to file.
Make sure stamp data is avaliable before writing stamp to image - this
still does not fix stamp, looks like issue is availability of the images
themselves for the view, investigating next.
2015-04-22 11:50:57 +02:00
Sergey Sharybin
414990b0f1 Tracking: Some more code de-duplication 2015-04-22 12:46:29 +05:00
Sergey Sharybin
18a47b67fd Tracking: Code cleanup, de-duplicate some code in tracking context finish 2015-04-22 12:34:01 +05:00
Campbell Barton
e6ceecdf97 Cleanup: pep8, spelling 2015-04-22 16:26:54 +10:00
Bastien Montagne
4da050674e Fix T44470: File Selection sometimes surpresses last Character.
Tweak hack of `file_draw_string()` (there may be better solution, but not worth
spending time on this, the whole filebrowser drawing code is to be rewritten anyway).
2015-04-22 08:15:05 +02:00
Bastien Montagne
e1a53b6d52 Fix T44475: Merge option of Mirror Modifier behavior reversed.
Glitch in rB57d9badc.
2015-04-22 07:54:14 +02:00
Tristan Porteries
a8adeeb6fb Logic Editor: Buttons for moving game properties up/down
D1163 by @panzergame, with minor edits by me (@Severin)
2015-04-21 23:33:45 +02:00
Sergey Sharybin
b35743d39f Tracking: Add missing plane track remapping when joining two point tracks 2015-04-22 02:10:50 +05:00
Sergey Sharybin
260f75a2ca Tracking: Cleanup, move some plane tracks code to utility functions 2015-04-22 02:10:50 +05:00
Dalai Felinto
9425a8ff38 BGE: scene.pre_draw_setup[] callback
This callback allows the user to change the camera data right before the
rendering calculations.

scene.pre_draw[] is not enough here, because if you want to change the
camera matrices (projection/modelview) the culling test is done before
that (after pre_draw_setup[] though).

Reviewers: moguri, campbellbarton

Differential Revision: https://developer.blender.org/D1251

Python sample code using this. The sample scene would need a default
camera (not used for rendering), a dummy camera ('Camera.VR'), and two
cameras ('Camera.Left', 'Camera.Right') that will be used for the actual
rendering.

```
import bge

def callback():
    scene = bge.logic.getCurrentScene()
    objects = scene.objects

    vr_camera = objects.get('Camera.VR')

    if bge.render.getStereoEye() ==  bge.render.LEFT_EYE:
        camera = objects.get('Camera.Left')
    else:
        camera = objects.get('Camera.Right')

    vr_camera.worldOrientation = camera.worldOrientation
    vr_camera.worldPosition =  camera.worldPosition

def init():
    scene = bge.logic.getCurrentScene()
    main_camera = scene.active_camera
    main_camera.useViewport = True

   scene.pre_draw_setup.append(callback)

    objects = scene.objects
    vr_camera = objects.get('Camera.VR')
    vr_camera.useViewport = True
    vr_camera.setViewport(
            0,
            0,
            bge.render.getWindowWidth(),
            bge.render.getWindowHeight() )
```
2015-04-21 17:41:23 -03:00
Sergey Sharybin
f2956d5fc7 Tracking: Fix over-allocation in plane track's point tracks pointers when removing point track 2015-04-22 01:36:15 +05:00
Julian Eisel
6885d316b1 Fix T44474: Rotation manipulator not hidden completely with all axes
locked

Really doesn't look like a bug on a first glance but the line of code
that was there previously seemed to be there to prevent the manipulator
from drawing in this case.
2015-04-21 21:55:19 +02:00
Campbell Barton
bf69453ae7 BLI_string: add BLI_snprintf_rlen
use when the length of the destination string is needed.
2015-04-22 05:37:22 +10:00
Campbell Barton
c9f9e29538 Math Lib: handling bits handling into own file 2015-04-22 04:44:24 +10:00
Campbell Barton
b47892e9f5 Minor edits to metadata commit
No need to calculate height of each line, just use height of font.
2015-04-22 04:43:13 +10:00
Antony Riakiotakis
e1ce83f762 Initialize and use the theme for metadata text 2015-04-21 19:01:09 +02:00
Antony Riakiotakis
58c511fb01 Stamp refactoring:
Write those on render result during rendering, so we can cleanly write a
render result image after rendering.
2015-04-21 18:37:06 +02:00
Antony Riakiotakis
3091ea49fe Metadata:
* Theme support for metadata display
* Increase text DPI with scaling.
2015-04-21 18:37:06 +02:00
Antony Riakiotakis
50bfc4bfa0 Metadata display support - patch by Julian and me.
Basically, blender adds a few metadata fields to images when
we render an image. Those metadata can now be viewed in the
image editor.

Also, made sure metadata are available when we write imbufs
to disc with "Save As". There may be more cases here that need
fixing, but this means that loading an image with metadata
will now properly preserve them in blender.
2015-04-21 18:37:06 +02:00
Julian Eisel
f9972fa53e VSE: Allow GPencil drawing without having a strip loaded
Previously the GPencil strokes were just not drawn (even though they
were generated) until a strip was loaded.
2015-04-21 17:44:11 +02:00
Campbell Barton
84d117b3ad Minor edit to edit-mesh selection bias
only choose verts over edges (not faces)
2015-04-22 00:43:31 +10:00
Campbell Barton
3a3f80673c Cleanup: minor corrections 2015-04-22 00:16:26 +10:00
Julian Eisel
de687b6fa0 Fix T44465: Crash using VSE OGL render + Grease Pencil
Likely caused by rBd5f1b9c22233
2015-04-21 16:04:14 +02:00
Campbell Barton
e3a6440e7a BMesh: mesh-data picking, general improvements
Generalize logic for vert/edge/face selection:
- index cycling.
- selection bias with mixed modes.

Details:
- Edges now support index cycling (as verts/faces did already)
- Cycling over near elements is now only enabled when the mouse position remains the same.
- No longer do 2 selection passes to perform index cycling.

Fixes:
- Edges behind the view could be selected (surprising nobody reported!)
- Selection bias now only changes the element that gets picked without interning the return distance
  (was buggy with mixed modes).
2015-04-21 21:25:43 +10:00
Antony Riakiotakis
907d4d310f Backdrop strictly shows image result only - it could get influenced by
scopes setting of space if one changed the space type back and forth.

Thanks to Sergey for reporting.
2015-04-21 12:13:02 +02:00
Campbell Barton
b82d571c85 Cleanup: style 2015-04-21 15:53:32 +10:00
Campbell Barton
f36e91ad0a Correct crash in last commit (spacebar search) 2015-04-21 15:18:34 +10:00
Julian Eisel
56a93e9cb1 Add eyedropper for selecting object & obdata
In addition to the unlink icon to clear a value,
When cleared, show an eyedropper to select objects or object-data
(was already available via the EKey).
2015-04-21 14:25:03 +10:00
Campbell Barton
912397756a Fix T44432: Zoom to mouse fails /w FCurve editor 2015-04-21 13:10:32 +10:00
Campbell Barton
62e149881a Fixes for backbuf selection logic
- Fix ED_view3d_backbuf_sample_rect, r_dist was set completely wrong.
- Avoid duplicate calculations picking the nearest edge.
- Bias against picking selected edges is now optional.
- Remove unused callback reading the backbuf.
- Remove unused strict option picking vertices.
2015-04-21 04:50:39 +10:00
Campbell Barton
aa880bb815 Cleanup: use ED_view3d_backbuf_* prefix 2015-04-21 03:19:27 +10:00
Campbell Barton
d57a93a7cb Fix T44383: Select face fails in some positions
When mixing vert/edge/face with select-visible,
face selection could fail when not close enough to the center.

This also fixes a bug where the bias for verts over edges would
prefer faces over edges too, making edges harder to pick.

Mixing edge with other selection modes works more predictably now.
2015-04-21 03:10:32 +10:00
Campbell Barton
0626d27bf6 Editmesh select nearest fixes
- distance from edge check wasn't clamping 0-1
- vertex bias wasn't taking pixelsize into account.
- index & pass counter were floats

Also some improvements

- use BMesh lookup tables when available.
- use structs to avoid issues getting out of sync.
2015-04-21 01:50:21 +10:00
Campbell Barton
60e8e20132 Cleanup: use macro for common view3d zbuf check 2015-04-21 01:50:20 +10:00
Campbell Barton
57d9badc21 Cleanup: use bool /w flag checks 2015-04-21 01:50:20 +10:00
Bastien Montagne
4d5446cea7 Usual UI messages fixes... 2015-04-20 14:46:09 +02:00
Campbell Barton
6bc26540c2 Fix T44452: Inconsistent gpencil color in prefs 2015-04-20 21:20:39 +10:00
Campbell Barton
fa761dfe6d Fix T44419: extruding when using lasso deselect 2015-04-20 21:10:52 +10:00
Campbell Barton
437f69ab45 Allow Python overrides for materials. 2015-04-20 20:20:33 +10:00
Antony Riakiotakis
9b4c8a2507 Fix T44458 strip modifier mask not copied correctly when doing scene
copy.

What happens is that the strip is copied, but it still refers to the old
scene. Here we need to fix this by referring to the copy of the strip
and also do it after copying to make it order independent.
2015-04-20 11:51:43 +02:00
Sergey Sharybin
0aa2eed0c2 Compilation error fix for MSVC: It does not support expressions in array
declarations
2015-04-20 14:07:26 +05:00
Sybren A. Stüvel
bf6bde232d Fix: BGE crashes when RunPythonCallBackList() is called with maxargcount != minargcount 2015-04-20 13:53:54 +08:00
Joshua Leung
dbb2b29bea Action Stashing: Newly stashed strips now get "sync length" option enabled by default 2015-04-20 17:27:59 +12:00
Joshua Leung
a0e1b6573a Action Editor "Browse" Fix: Stash active action if nothing else uses it
Following the initial action management commits for 2.74, blurrymind pointed out a
problematic workflow involving the "Browse Action" dropdown in the Action Editor
which would lead to actions being accidentally lost. Namely, it turns out that
game animators frequently flip between different actions from the Browse menu while
working.

While the new up/down operators and/or other NLA based tools are better suited to this
without the problems of actions getting lost, some additional precautions were needed
for the Browse menu as well. So now, if the active action will have no users as a result
of the switch (i.e. it was a new action, and the user is checking on a previous action
via the Browse menu), this action will now get stashed. This workflow is not perfect though,
as there is the problem of the stashed action strips not reflecting the actions they reference.
2015-04-20 17:27:58 +12:00
Joshua Leung
689241b6e5 Fix for potential null-pointer-dereference if the new action is NULL 2015-04-20 17:27:57 +12:00
Joshua Leung
e4fbc8fc8d Fix: Changing actions in the Action Editor using the Browse dropdown should happen in tweakmode
When a NLA strip is being tweaked, it should not be possible to use the Action Editor to change
the action that it uses. Instead of changing the action in tweakmode, it now exits tweakmode
first before doing so.
2015-04-20 17:27:56 +12:00
Joshua Leung
5f6b958e96 Fix: "show_points" setting for Grease Pencil drawing didn't work
As reported by zeffi, the "show_points" option was not working in master.
It probably broke recently, after some changes meant that the point sizes
weren't geting set prior to drawing these points anymore. Since this was
originally added as a debugging tool (though it is now somewhat redundant
due to the stroke editing functionality, which uses/exposes the same points),
this option wasn't really that important. I have decided to add back a toggle
for this to the UI though, since it can be used for some interesting effects...
2015-04-20 17:27:55 +12:00
Campbell Barton
79319b3fba Sculpt: remove workaround T25371
It's no longer needed,
and made calc_area_normal different to the normal from calc_area_normal_and_center.
2015-04-20 13:36:51 +10:00
Campbell Barton
436004b6b1 Sculpt: clay-strips was missing accumulate button
Correct & de-duplicate check for accumulate.
2015-04-20 13:23:47 +10:00
Sybren A. Stüvel
07a7d77ec1 Fix: solved BGE compiler error on Linux/gcc 2015-04-20 10:58:25 +08:00
Porteries Tristan
62f79856e9 BGE : Standardization of callbacks execution.
A new function (RunPythonCallBackList) to call all python functions
contained in a python list was developed.

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

It improves flexibility and supports *args.

Reviewers: moguri, dfelinto, campbellbarton, sybren

Reviewed By: campbellbarton, sybren

Subscribers: sybren

Projects: #game_engine

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

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

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

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

Thanks to agoose77 for his help.

Reviewers: scorpion81, hg1, agoose77, sergof

Reviewed By: agoose77, sergof

Subscribers: sergof, moguri

Projects: #game_physics, #game_engine

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

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

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

Reviewed By: moguri, lordloki

Projects: #game_logic, #game_engine

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

Minor tweaks by Campbell Barton and Jorge Bernal

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

Reviewed By: lordloki, campbellbarton

Subscribers: sergey, lordloki

Projects: #game_engine

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

Reviewers: sybren, hg1, moguri

Reviewed By: hg1, moguri

Projects: #game_engine

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

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

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

Reviewers: sergey

Subscribers: pildanovak, marcclintdion, monio, metalliandy, brecht

Maniphest Tasks: T41092

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

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

Thanks Sergey Sharybin for the review and feedbacks.

Reviewers: sergey

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

This commit reverts the fixes made for T36831 in:
rBf18f2fbb33d90ecc91e6f3d063cb9f97f217e808

After thinking this over, I think these checks against drawing on negative
frames aren't needed. Even if the current userpref setting doesn't allow
navigating to negative frames, this may not be true for other users that
may work on the same file (in a team environment). Also, negative frame
values can get set via the dopesheet.
2015-04-17 13:02:45 +12:00
Jorge Bernal
4cd37541b0 BGE: Fix for T44374 Crash when collision sensor deactivated
Don't allocate memory for sensor logic brick if it is deactivated
2015-04-17 02:12:57 +02:00
Campbell Barton
afc2f415ab Cleanup: use const for sculpt code 2015-04-17 03:11:26 +10:00
Gaia Clary
bbae0664a3 Added Support for Custom Vertex Normals to Collada exporter 2015-04-16 19:02:26 +02:00
Antony Riakiotakis
a7cae2987d OpenGL does not like line thickness less than 1.0.
Check here is not completely correct either, we should check against
GL_ALIASED_LINE_WIDTH_RANGE and GL_SMOOTH_LINE_WIDTH_RANGE
2015-04-16 18:35:07 +02:00
Joshua Leung
6589d07c8f Action Editor: Preemptive fix for null-pointer dereference
A few weeks ago, I got a random crash while testing som edge cases
(IIRC, it was trying to assign an action with no active object),
which I haven't been able to reproduce since then. This commit though
adds some extra sanity checks here, as a user may try to assign an
action to an animdata block which did not have an action already.
2015-04-17 01:11:56 +12:00
Joshua Leung
0b691563ea Fix T44408: "Rest Length" property in the Stretch To constraint was getting clipped when using Metric Units
Increased the upper bound for the "Rest Length" property to cope with metric
units, especially when large (i.e. > 2 m) distances are involved. It may be
necessary to increase this again in the future, if even larger distances get
used (though it then starts getting a bit difficulty to justify such setups).
2015-04-17 01:11:55 +12:00
Campbell Barton
6603a10331 Cleanup: remove redundant initializers 2015-04-16 22:26:20 +10:00
Antony Riakiotakis
69b33b6ed3 Draw smoke domain in transparent pass. Should composite smoke domains
correctly in scene - with known limitations of blending between
transparent objects.
2015-04-16 13:02:09 +02:00
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