Campbell Barton
aae8e21100
BMesh Py API: Expose color alpha
2017-11-12 15:48:24 +11:00
Sergey Sharybin
7ea7fd45d0
Merge branch 'master' into blender2.8
2017-10-24 12:19:48 +02:00
Campbell Barton
8661ab12a6
Fix BMesh PyAPI internal flag clearing logic
...
Would leave the flag set on raising an exception.
2017-10-24 16:52:54 +11:00
Brecht Van Lommel
f5456df095
Merge branch 'master' into blender2.8
2017-10-24 02:05:41 +02:00
Campbell Barton
1aa5b63661
Docs: improve bmesh exception message
...
Suggested in T53131
2017-10-23 21:57:32 +11:00
Bastien Montagne
557dc7d343
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/editors/screen/screen_edit.c
2017-10-12 16:40:35 +02:00
Campbell Barton
b29e37ed81
Docs: add note for bmesh face_split_edgenet
2017-10-12 23:36:42 +11:00
Campbell Barton
572b1a644f
Merge branch 'master' into blender2.8
2017-09-05 22:56:03 +10:00
Campbell Barton
85d53620aa
Cleanup: avoid confusing assignment
2017-09-04 14:35:35 +10:00
Campbell Barton
32e36a1782
Correct own error simplifying matrix checks
2017-09-03 00:05:11 +10:00
Campbell Barton
2f8c8ec8fb
Docs: BMesh.from_mesh behavior w/ multiple calls
2017-08-28 14:25:00 +10:00
Campbell Barton
cb7f1f8160
Docs: BMesh.from_mesh behavior w/ multiple calls
2017-08-28 12:40:36 +10:00
Campbell Barton
f8f6f8f26e
Merge branch 'master' into blender2.8
2017-08-25 20:45:16 +10:00
Campbell Barton
738d942d29
Correct error in recent use of PyC_Long_*
...
Regression in 46cf33bf0
2017-08-25 02:09:23 +10:00
Campbell Barton
7497488149
Merge branch 'master' into blender2.8
2017-08-20 15:50:15 +10:00
Campbell Barton
46cf33bf01
PyAPI: Make use of PyC_LongAs... API
...
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.
Some inline exceptions are kept because they show useful details.
2017-08-20 15:49:10 +10:00
Sergey Sharybin
5605c26fcd
Fix function declaration of some modifiers
...
Those functions did not use evaluation context.
Also fixed lots of unused variables warnings caused by commented out code which
needs to be ported away from DerivedMesh and to evaluation context.
2017-07-21 15:54:42 +02:00
Luca Rood
1c4c288727
Pass EvaluationContext argument everywhere
...
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
2017-07-21 14:47:26 +02:00
Campbell Barton
819f3b37da
BMesh face map layer access
2017-07-20 19:52:26 +10:00
Campbell Barton
bdbf4471a6
TexFace removal part 3
...
- MTexPoly structure & layer type.
- The 'Mesh.uv_textures' layers.
- DerivedMesh TexFace drawing.
- Scripts & UI.
2017-05-25 15:19:58 +10:00
Campbell Barton
7a9ad029dd
Remove TexFace, per-face images
...
TexFace complicates the now more popular shading pipeline by having
per-face images, see: T51382 for details.
To keep the ability to select a per-material edit-image
(used with UV-mapping workflow), the material now stores an image
which will be set when changing images in edit-mode.
This is used as a bake-target when not using Cycles too.
2017-05-24 23:38:15 +10:00
Sergey Sharybin
2d80f37bce
Depsgraph: Remove old depsgraph header from python
2017-04-06 16:36:15 +02:00
Campbell Barton
fc9fa07c0e
BMesh: BM_face_exists no longer uses return arg
...
Just return the face or NULL, like BM_edge_exists(),
Also for BM_face_exists_overlap & bm_face_exists_tri_from_loop_vert.
No functional changes.
Old code did some partial overlap checks where this made some sense,
but it's since been removed.
2016-11-14 04:33:35 +11:00
Campbell Barton
a96c9def6f
PyAPI: minor optimization for dictionary creation
...
Pass size when its known.
2016-07-31 17:22:04 +10:00
Campbell Barton
cca57bf04c
PyAPI: Use module names on initializaton
...
No need to re-convert from C strings to PyUnicode.
2016-07-14 15:51:56 +10:00
Campbell Barton
124bfa4d2d
Cleanup: spelling, style
2016-07-08 00:48:45 +10:00
Campbell Barton
0a026033ae
BMesh: make toolflags optional
...
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
2016-07-01 19:29:22 +10:00
Campbell Barton
65df2fd997
bmesh py api: expose BM_face_calc_tangent_*
...
D1988 by @wisaac, with own edits and improvements.
This improves on existing tangent calculation functions too.
- BM_face_calc_tangent_auto: Chooses method based on number of sides, used by manipulator (not exposed to Python).
- BM_face_calc_tangent_edge: from longest edge.
- BM_face_calc_tangent_edge_pair: from longest edge-pair (most useful with quads).
- BM_face_calc_tangent_edge_diagonal: edge farthest from any vertex.
- BM_face_calc_tangent_vert_diagonal: vert farthest from any vertex.
Also optimize BM_vert_tri_calc_tangent_edge* functions to avoid sqrt.
2016-06-12 15:12:34 +10:00
Campbell Barton
6d0cae56e8
Fix T48290: Hook fails after deleting geometry
...
Now CD_SHAPEKEY_INDEX customdata is stored in edit-mode when hooks and vertex parents are used.
This also fixes a bug where undo would loose key-index data.
Move to structs for BM_mesh_bm_to/from_me to avoid passing many argument, which mostly aren't used.
2016-04-29 23:39:50 +10:00
Campbell Barton
727f15f7d8
Docs: note that BMesh loops are accessed via faces
...
Resolves T48258
2016-04-25 11:57:52 +10:00
Campbell Barton
2a9bc888d0
Fix T47784: BMesh.from_object broken keyword args
2016-03-15 00:38:33 +11:00
Campbell Barton
f5604af464
Cleanup: use BM_mesh_* prefix for BMesh functions
2016-01-14 13:00:11 +11:00
Campbell Barton
8ca76d15b2
Add bmesh.select_history.discard
...
Follows convention for set, useful to avoid error handling with remove().
2016-01-13 04:03:47 +11:00
Campbell Barton
22ec7b17d2
BMesh: raise exception face-split w/ adjacent loops
...
Was raising "internal error".
2015-11-25 12:08:50 +11:00
Campbell Barton
b8c40d47e0
Cleanup: remove unused bmesh iterator
2015-11-19 22:13:35 +11:00
Campbell Barton
2eb50d450c
Cleanup: simplify PyBMesh customdata API use
2015-09-18 16:40:54 +10:00
Campbell Barton
09e40a4956
Cleanup: spelling
2015-09-14 02:22:22 +10:00
Campbell Barton
1140238acf
Fix T45976: Crash accessing BMesh customdata
...
Layers returned from items() and values() could have an invalid index.
2015-09-01 19:59:26 +10:00
Campbell Barton
9304df5182
Fix T45939: Crash w/ BMesh.*.sort()
2015-09-01 16:07:34 +10:00
Campbell Barton
c86a519898
Use qsort_r for BMesh Py API
2015-09-01 13:56:08 +10:00
Campbell Barton
cff288cf3a
Use PyC_ParseBool to parse bools
...
This could cause problems since they could be any int,
then passed directly to internal functions that assume bools.
2015-08-04 18:49:42 +10:00
Campbell Barton
339915a962
Optimize PySequence_Fast usage
...
Access arrays directly, avoiding type-check every time.
2015-07-29 10:49:35 +10:00
Campbell Barton
376e4c945e
Fix leak in BPy_BMElem_PySeq_As_Array
...
Also add BPy_BMElem_PySeq_As_Array_FAST
2015-07-29 10:49:34 +10:00
Campbell Barton
a2d4c26aa2
BMesh: use define for string
2015-06-14 08:27:29 +10:00
Tamito Kajiyama
dbee634572
Fix typos.
2015-05-04 01:53:34 +09:00
Campbell Barton
f283b959e7
BMesh: BM_vert_separate double edge fix
...
Splitting edges could give duplicates.
2015-05-02 16:24:35 +10:00
Campbell Barton
a5869945c6
Cleanup: bmesh src/dst order in API args
2015-05-02 15:46:03 +10:00
Campbell Barton
f553aba69f
Correct docstring
2015-04-30 09:55:54 +10:00
Campbell Barton
89f5a09ab4
Cleanup: use 8 space indent for multi-line args
2015-04-25 20:15:20 +10:00
Campbell Barton
18ee593729
Expose CD_PAINT_MASK to Python API
...
D782 by Stanislav Blinov
2015-04-24 04:10:51 +10:00