Commit Graph

83230 Commits

Author SHA1 Message Date
c7ec1fa5e6 Cleanup: use BKE_object_* prefix for object API
Also minor style cleanup.
2018-12-11 15:09:09 +11:00
7fe3d1e7d7 Fix T57934: non-empty duplicators don't render
Convert non-empty duplicators to empties.
2018-12-11 15:02:58 +11:00
8216e9f8a2 DNA: version patch Camera.drawsize to twice it's value
Draw size represented half the actual size used.
2018-12-11 14:42:50 +11:00
42126bdf06 Merge branch 'master' into blender2.8 2018-12-11 14:05:16 +11:00
6bc828ed87 Fix T59161: Edge Rotate CW is CCW 2018-12-11 14:03:42 +11:00
53928f479c Gizmo: update camera ortho-size
This needs to be improved further,
for now it shows in the right location.
2018-12-11 13:19:44 +11:00
65b930af39 Merge branch 'master' into blender2.8 2018-12-11 13:10:56 +11:00
908b6d8be3 Fix T52051: Orthographic camera display size error
It was impractical to create a small orthographic camera with a usable
size in the view-port.

No longer scale the draw-size by ortho-size.
2018-12-11 13:05:32 +11:00
9a8b6d51c1 Fix T58850: NDOF navigation guide not shown 2018-12-11 12:35:18 +11:00
3dfbb72b29 Workbench: Fix shadow artifact caused by degenerate triangles
Fixes T58735 Incorrect workbench shadow from n-gons

This also optimize the degenerate triangle detection by searching if
their area is near 0.0.
2018-12-11 01:25:45 +01:00
a49fdbcc67 Fix building w/o bullet 2018-12-11 10:13:05 +11:00
8c8e9b5586 DRW: Deprecate / Remove DRW_STATE_STIPPLE_*
This was unused and used the old drawing paradygm
2018-12-10 23:17:20 +01:00
1d23024014 Object Mode: Make point clouds a bit less like uniform blobs
Also this display is optimized. It does not use blending and pixel discard.
Working with scanned data should be more pleasant with this.

A better option would be to use gl_FragDepth to have a better sense of
volume but this discards early depth test.
2018-12-10 23:17:20 +01:00
bfb9680e9e GP: Fix problems with stroke Caps
Now the start cap is done and during drawing the end cap is not set because needs to have a UV calculated and this is not done while drawing.
2018-12-10 20:18:45 +01:00
33785baafe GP: Set Brush default material when add new GP Object
Before the brush color was not set equal to object active color.
2018-12-10 20:18:22 +01:00
18d354a5eb GP: Remove Object Onion Skin switch
It was confusing to have two switches.
2018-12-10 20:18:15 +01:00
2debee96ec GP: Replace Clamp icon 2018-12-10 20:18:10 +01:00
b34ff01487 GP: Make Onion Skin ON as default RNA value 2018-12-10 20:18:00 +01:00
bcb5293b9b GP: Enable Object Onion Skin by default
Now, the main switchis on, and the layer onion skin is off.
2018-12-10 20:17:49 +01:00
9def295d57 Edit Mesh: Opti: Reduce max_vertices in geometry shader
This is a really small win that had been overlooked when optimizing the
shader.
2018-12-10 19:02:17 +01:00
0c3535df9f Edit Mesh: Fix edges poking through the verts points in xray/seethrough mode 2018-12-10 19:02:17 +01:00
8e37eb10a1 Edit Mesh: Make "fresnel effect" not transparent but mix between 2 colors
Alpha blending is causing too many issues.
Revert back to something simpler.
2018-12-10 19:02:17 +01:00
834bf357c8 Edit Mesh: Draw inner edge selected in vert edit mode if both verts selected
This only make the edge fully selected. There is still no gradient like in
2.79 when only one vertex is selected.
2018-12-10 19:02:17 +01:00
f7b558cbdc DRW: Batch Cache: Mesh: Port edit mesh batches to batch request method
This also do some renaming/cleanups.
2018-12-10 19:02:17 +01:00
ae1f563899 DRW: Batch Cache: Mesh: Port more batches to batch request method 2018-12-10 19:02:17 +01:00
1d92888ee8 DRW: Batch Cache: Add batch request system
This makes it possible for engines to ask for batches and only fill their
data after all engine populate functions have run.
This means that, when creating the batches data we already know all the
batches that are needed for this redraw and the needed data.

This allows for less redundant data preparation and better attrib masking.
Ideally, we should run all viewports populate function before executing
the batch construction but this is not the scope of this patch.

Conversion from the old request method will be progressive and both can
coexist (see uses of mesh_create_pos_and_nor()).
2018-12-10 19:02:17 +01:00
33cc3344a2 GPU: Make changes to GPUIndexBuf and GPUVertBuf to allow multithreading
This is a small change. We delay all gl calls at the first use of the
GPUIndexBuf / GPUVertBuf in order to be able to create multiple buffers
from different threads without having many gl contexts.
2018-12-10 19:02:17 +01:00
a99eb0ca68 GPU: Cleanup: Rename vbo to ibo for index buffers 2018-12-10 19:02:17 +01:00
f179ac9fc1 Fix T58932: Impossible to influence the particle system 2018-12-10 17:37:30 +01:00
9fa408f51b Fix T58928: New Action causes crash when duplicating bone
Basically, armature update is not supposed to be run in edit mode.
This worked in master and new dependency graph because nobody was
tagging armature for an update.

But with all those copy-on-write and other things we can't ensure
tag doesn't happen (and we shouldn't). So now we ensure unwanted
code is not run from the code itself.

P.S. Deeper reason of this goes to the optimization of not updating
pose channels when in edit mode. Since pose doesn't define anything
there we don't want to be bothered with a pose update after every
operation which changes it.
2018-12-10 15:59:15 +01:00
d7e7c4ddf7 Cycles: Restore properties in the interface
They got lost in one of the merges it seems.
2018-12-10 15:54:45 +01:00
5bd485844c Cleanup: Variable naming 2018-12-10 15:54:45 +01:00
1bf0a4f4d0 Tweak UI message of Ruler tool.
It's much simpler to just click on one end, than dragging it outside of
view. ;)

Related to T59084.
2018-12-10 15:53:53 +01:00
c2b0d8b6d6 Fix T57633: Particle texture update problem
Textures are now hooked up to the RESET operation of particle
settings, which ensures particles being re-distributed when
texture is changed.

This is limited to a direct user modifications, which matches
old behavior in 2.79.
2018-12-10 15:11:57 +01:00
fc52d51d73 Cleanup: Someone forgot again to do the versioning_280 handling when bumping subversion.
Seriously... There is no point in having those subversions if one does
not take advantage of them to reduce doversion work on file load! Now we
have to raise subversion again just for that. :(
2018-12-10 15:10:29 +01:00
7f98ba4725 Proper fix for rigidbody collections's objects missing rb data.
We cannot let those data be generated on-the-fly in RBW evaluation
anymore, since those would be added to CoW eval object and never ported
back to orig objects.

We *could* get orig objects in eval code, of course, but as in
constratints, this is not really threadsafe and future proof, depsgraph
evaluation should really write back to orig data as little as possible.

So instead, add code to ensure required data is generated to objects
when their collection is added to rigidbody world.

Note that we *may* want to clean that up once collection is no more used
by RB? On the other hand, people might want to keep those data around to
be able to switch between different setups easily... So think it's OK to
keep them at least for now.
2018-12-10 15:10:29 +01:00
073a011f91 Fix T58993: Duplicating after setting a rigid body world crashes Blender.
There is no guarantee that object in rigidbody collection already have a
valid rgigidbody data when rebuilding deg relations, that is often
generated on-the-fly by actual rigid body simulation.

Note that this can be an issue when generating deg relations I guess...
But at least it won't crash anymore.
2018-12-10 15:10:29 +01:00
448731ac92 Fix part of T58964: Changing driver path/array index crashes
The issue here is that in the new dependency graph drivers are
individual nodes which depends on what they are driving. This
means that changes to RNA path or property index should ensure
those nodes are updated. Easiest way to do so is to tag relations
for update.
2018-12-10 14:50:05 +01:00
51dbf8d71a Fix T59087: Empty meshes have large bound-box
Initialize to default values for meshes w/o vertices,
note that zeroing for BKE_object_boundbox_calc_from_mesh
matches old derived mesh code.
2018-12-10 19:32:35 +11:00
979a5c34e4 Fix T59107: F3 does not work in Python console 2018-12-10 17:33:36 +11:00
929ad440d7 Fix T57086: Offset Even option is unclickable 2018-12-10 16:51:53 +11:00
155b02a196 Merge branch 'master' into blender2.8 2018-12-10 12:45:38 +11:00
cecd4fe254 Merge branch 'master' into blender2.8 2018-12-10 12:44:24 +11:00
642c315bae Fix T53544: Undo in pose mode selects all fcurves 2018-12-10 12:30:41 +11:00
9df2b6da3a DNA: add runtime struct to for graph & action editor
Move struct members, no functional change
2018-12-10 12:19:18 +11:00
168a6a4bfc Merge branch 'master' into blender2.8
Conflicts:
	source/blender/makesrna/intern/rna_dynamicpaint.c
2018-12-09 21:51:23 +01:00
d7ef1af22b Fix T59059: Blender crashing after adding particle system and dynamic paint (Brush).
Looks like this bug has been there since ages (at least present before
2.79 official release...).
2018-12-09 21:48:37 +01:00
879877295d Simplified #ifdef to not silently fail on certain platforms 2018-12-09 19:24:12 +01:00
e79bb957fc User Interface: Add button color for indicating that the value differs from the interpolated one
One issue that especially newer users often run into is that they accidentally reset changes to the scene by switching frame without creating a keyframe first.

Therefore, this commit adds a new color that is used to draw properties if their current value differs from the one that would be set when switching to this frame.
This works both for existing keyframes as well as for currently interpolated frames.

Unfortunately the flags in but->flag are full, so I had to move the new flag to but->drawflag and pass that to all relevant functions.

I went with orange for the color since afaics it fits with the green and yellow that are currently used for keyframe states and since it's somewhat reddish to signify that there might be something to look out for here.

Reviewers: campbellbarton, #user_interface, brecht

Reviewed By: campbellbarton

Subscribers: brecht, predoe

Differential Revision: https://developer.blender.org/D3949
2018-12-08 18:06:23 +01:00
aff9ccbade Fix T51057 Modifiers lose bevel weight and crease
This is for 2.80 (though bug I mistakenly merged into was for 2.78.
Duplicate bugs T58127, T58411, T58440, and T58789 all fixed.
Bevel weights and crease are not real Mesh layers so get lost
on coversion of mesh to bmesh unelss the mesh's cd_flag member
tells the converter to create layers for them.
Most code the copies or partially copies meshes uses
mesh_new_nomain_from_template_ex, so copied the flag there.
2018-12-08 06:39:46 -06:00