Commit Graph

2375 Commits

Author SHA1 Message Date
Campbell Barton
1dd1d286c6 Select nth option to skip steps
Patch T43752 @codemanx, added matching curve option.
2015-03-19 04:40:43 +11:00
Sergey Sharybin
2ef2f085fb Add an option to mesh.calc_tessface() to get rid of polygons and loops
The purpose of this change is to add extra possibility to render engines and
export scripts to reduce peak memory footprint during their operation.

This new argument should be used with care since it'll leave mesh in not really
compatible with blender format, but it's ok to be used on temp meshes.

Unfortunately, it's hard to get scene where it'll show huge benefit because
in my tests with cycles peak memory is reached in MEM_printmemlist_stats().

However, in the file with sintel dragon it gives around 1gig of memory benefit
after removing the polys which would allow other heavy to compute stuff such as
hair (or even pointiness calculation) to not be a peak memory usage.

In any case, this change is nice to have IMO, and only means more parts of
scene export code should be optimized memory-wise.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1125
2015-03-13 17:39:21 +05:00
Campbell Barton
e2c24a18e3 Knife: fix glitch dragging mouse outside the face
Had a small gap between the last-vertex & new-cut
2015-03-03 09:29:44 +11:00
Campbell Barton
d2b6c6fd9b Fix T43862: Knife fails with concave ngon 2015-03-03 00:26:20 +11:00
Campbell Barton
cfd176bcb1 MEM_SAFE_FREE caused issues /w const & GCC5 2015-02-27 15:26:22 +11:00
Campbell Barton
87dc01e690 Fix T43806: Knife project crashes
Need to re-create the bmbvh after executing the cut.
2015-02-27 09:53:23 +11:00
Campbell Barton
b1dbda143d BMesh: Connect path, use select order
Could connect a pair of verts previously,
now connect all vertices along the path, running a second time closes the loop.

Can also be used for without faces to connect edges between selected points.
2015-02-16 09:44:30 +11:00
Campbell Barton
d4934f8f6d cleanup: style/indentation 2015-02-11 18:39:28 +11:00
Campbell Barton
2fe9e3c1f0 more direct fix for last commit 2015-02-10 03:00:37 +11:00
Campbell Barton
c4e8d74563 Fix T43498: New curves fails /w radius & rotation
Scaling matrix assumed no rotation,
also remove unused apply_diameter arg.
2015-02-10 02:50:59 +11:00
Bastien Montagne
138c9dba9b Add Custom Loop Normals.
This is the core code for it, tools (datatransfer and modifier) will come in next commits).
RNA api is already there, though.

See the code for details, but basically, we define, for each 'smooth fan'
(which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal),
a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store
custom normal as two angular factors inside that space. This allows to have custom normals
'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer.

Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals,
and be converted back into storage format at the end.

Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can
be rather heavy with high poly meshes.

Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-02-05 14:32:57 +01:00
Bastien Montagne
37a08ae5c5 UI messages: minor fixes... 2015-02-03 20:25:14 +01:00
Campbell Barton
64124ba904 BMesh: tool to ensure all faces are convex
Access from Mesh -> Cleanup
2015-02-02 09:23:44 +11:00
Sergey Sharybin
d9c77a490c Fix T43427: Particle system children sometimes not generated on reload
The issue was caused by the conflict between preview render which would set
R_NO_IMAGE_LOAD flag on the renderer and texture samplers called outside of
the render pipeline trying to use this flag.

Now the sampler functions accepts extra argument so render pipeline can
still skip image load, but calls outside of the pipeline will nicely load
all the images.

Not cleanest change in the world but good enough to unlock gooseberry team,
and assuming we already had pool passed all over the place it should be all
fine.

Will need to reshuffle arguments into SamplerOptions structure later.
2015-01-27 16:14:53 +05:00
Bastien Montagne
fca515838e Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
2015-01-26 16:59:24 +01:00
Bastien Montagne
a8fa291b8c Fix two potential bugs reported by latest coverity scan. 2015-01-19 17:51:25 +01:00
Campbell Barton
45d131ff08 Recent extrude rework caused bug with single faces
extrude_discrete_faces doesn't duplicate faces on extrude, see: T43237
2015-01-14 05:24:16 +11:00
Campbell Barton
ef80914c99 error in last commit 2015-01-14 05:11:19 +11:00
Campbell Barton
a97c5d1f9f Fix T42459: Knife fails at small scale
Occluding geometry failed when near overlapping (or cutting small objects).
2015-01-14 01:36:03 +11:00
Campbell Barton
b77dd13004 Fix T43229: Knife-project regression (broke knife-project)
There have been quite a few issues with knife precision,
tested reports (T43229, T42864, T42459, T41164) and this works with all.
2015-01-13 21:28:58 +11:00
Campbell Barton
1b8240f5af Fix T43154: Extrude edges ignored isolated verts
Also cleanup extrude code.

- remove normal calculation.
- remove return values for transform type.
- use enums.

Thanks to Psy-fi for finding the initial fix.
2015-01-09 07:31:05 +11:00
Campbell Barton
aab4f2b762 cleanup: redundant casts & const cast correctness 2015-01-01 23:42:28 +11:00
Bastien Montagne
c79c48cc93 Fix T40930: Add a new option to select faces by smooth/flat shading.
Org code by robschia (Roberto Schiavone), first review by campbellbarton (Campbell Barton),
final review and minor changes by mont29 (Bastien Montagne).

Reviewers: cambellbarton, mont29

Subscribers: mont29, campbellbarton

Maniphest Tasks: T40930

Differential Revision: https://developer.blender.org/D638
2014-12-28 19:08:43 +01:00
Campbell Barton
cadcb12292 Fix leak in select-similar regions 2014-12-28 16:00:08 +11:00
Campbell Barton
5ea243bbec cleanup: knife tools, use generic sort function 2014-12-27 12:37:11 +11:00
Campbell Barton
72341537e8 Fix T42864: Knife-project fails with 'cut-through'
Removing edge-hit-doubles could incorrectly de-duplicate intersections between different edges.

Gave noticeable errors cutting through geometry that overlapped exactly.
2014-12-15 21:17:10 +01:00
Campbell Barton
db0e2e7347 Fix T42864 (partial): knife-project included uncut backfaces
When knife-project ran with cut-through disabled,
it would still try to select faces behind the cut.

Now check if the faces are obscured.
2014-12-15 15:10:49 +01:00
Campbell Barton
2329b58fd3 Fix T42864 (partial): Knife-project had too-low precision 2014-12-15 15:10:49 +01:00
Campbell Barton
cea086dd97 cleanup: disallow NULL arg to uvedit_aspect
also some typo's
2014-12-12 11:18:03 +01:00
Campbell Barton
17f0a01a56 Correct last commit checking knife edges 2014-12-09 20:57:37 +01:00
Campbell Barton
6fb1e1680b Knife: cuts along existing edges are now selected
This means cuts along existing edges don't have gaps in the selection.

Fixes T42616
2014-12-09 19:51:08 +01:00
Campbell Barton
2efc3211ab Knife: rename vert & edge 'draw' to 'is_cut'
More logical for checking if the edge is a cut into the mesh.
2014-12-09 17:24:19 +01:00
Campbell Barton
4d9f2f7e86 Knife: fix edge aligned cuts, could add redundant verts 2014-12-09 17:23:10 +01:00
Campbell Barton
781db5f8a6 Knife: test if an edge is on the face boundary
Was checking if an edges midpoint was inside the face,
giving random results (point-inside for an edge location).
2014-12-09 15:57:59 +01:00
Campbell Barton
171a6bb5dc Fix T42488: Knife (selected_only + occlude) failed 2014-12-09 15:51:58 +01:00
Campbell Barton
b7d053beaa Cleanup: warnings & space 2014-11-30 19:28:59 +01:00
Bastien Montagne
fd4cd626be More fixes related to D&D:
* Same issue as T42760 was also reproducible in some cases in 3DView.
* You got an error message about missing RNA prop in some drop-called operators.
* You could not drop a movie file in nodes, (some cases of) 3DView, nor ImageEditor.
2014-11-30 17:21:39 +01:00
Campbell Barton
1cb59394ae Cleanup: use const, avoid float -> double in matrix invert 2014-11-29 17:49:38 +01:00
Campbell Barton
bcbbc66795 Cleanup: unused headers 2014-11-28 15:52:30 +01:00
Campbell Barton
929dbc6644 Cleanup: de-duplicate image drag & drop logic
also don't make library paths relative on image load.
2014-11-23 22:48:48 +01:00
Campbell Barton
46e2d5ee41 Cleanup: typo 2014-11-21 14:16:35 +01:00
Campbell Barton
4dae5a7c3a correct uninitialized var use 2014-11-18 10:56:17 +01:00
Bastien Montagne
dab0bd9de6 Fix T35170: Undoing edit op on a basis shapekey could generate extra offset on its 'children'.
Based on investigation by sergey (Sergey Sharybin) and revzin (Grigory Revzin).
Based on patch D460 by revzin (Grigory Revzin).

Differential Revision: https://developer.blender.org/D460
2014-11-17 11:19:54 +01:00
Bastien Montagne
d526ef607d Cleanup: rename BKE_key_convert/update to BKE_keyblock_convert/update.
We are handling a keyblock here, not a whole key(set). Names are alreay a bit confusing,
let's be consistent at least.
2014-11-17 11:19:54 +01:00
Campbell Barton
902ba7b25c Cleanup: use SUBD_CORNER_* prefix for Subdiv flags 2014-11-16 15:46:30 +01:00
Campbell Barton
6dcf8ba189 Knife: fix recent drag option /w loop close
It would miss adding an edge when closing the loop.
2014-11-16 14:57:28 +01:00
Campbell Barton
c31f74de6b Cleanup: use BLI_listbase_count_ex to avoid redundant looping 2014-11-16 14:23:37 +01:00
Campbell Barton
7d040d2a08 Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r 2014-11-16 13:57:58 +01:00
Campbell Barton
497a26665c Knife: double clicking now closes the loop 2014-11-16 12:59:47 +01:00
Campbell Barton
c6ab67bffc Fix T42611: Knife fails from an edge to a vertex 2014-11-15 22:17:37 +01:00