Commit Graph

339 Commits

Author SHA1 Message Date
e537fae726 fix error with merge operator not handing error cases properly (errors wouldn't cancel the operator as they should).
was mixing up OPERATOR_CANCELLED with 0.
2013-03-22 04:39:43 +00:00
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
3be732f3ef don't create empty mesh object when separating if nothing is selected. 2013-03-16 16:38:18 +00:00
85b6299747 Fix #34633: Merge First/Last crashes Blender
It was check happening when generating menu with available modes
for merge operator, but no checks happened when executing operator.

Since operator could be called from python or shortcut, it was
possible to bypass all the checks.
2013-03-15 07:08:00 +00:00
25e579c631 fix for minor glitch in recent addition to create faces from partial selections.
BM_edge_exists() would return an edge if both verts passed match, now assert instead.
2013-03-13 14:54:47 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
f9f7070336 add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh. 2013-03-10 06:18:03 +00:00
06b3d4f7bb code cleanup:
- use BM_ITER_* macros in more places.
- avoid sign int conversion when calling EDBM_backbuf_check()
2013-03-09 16:19:07 +00:00
c56b39c0e4 bmesh operator 'contextual_create' wasn't flagging single faces that were created (caused glitch in some cases with recent create-select functionality). 2013-03-09 14:42:10 +00:00
6a59f71d04 bmesh: face creation from a single selected vertex/edge, now extends the selection along wire/boundary edges and makes a face.
Selection is specifically so you can continuously fill in holes by tapping the Fkey.

Similar functionality to the F2 addon, however the mouse location isn't used.
2013-03-09 14:14:20 +00:00
4a01ba4ba5 ruler3d: replace ED_view3d_cursor3d_position() with lower level function view3d_get_view_aligned_coordinate() 2013-03-09 10:28:28 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
dfa8540cdf use bool for rna funcs. 2013-03-07 02:44:55 +00:00
0ac07404ba style cleanup: braces with multi-line statements, also add some comments. 2013-03-01 14:47:06 +00:00
20220d47e3 Dependency Graph: some refactoring which should have no user visible impact
besides performance in some cases.

* DAG_scene_sort is now removed and replaced by DAG_relations_tag_update in
  most cases. This will clear the dependency graph, and only rebuild it right
  before it's needed again when the scene is re-evaluated.

  This is done because DAG_scene_sort is slow when called many times from
  python operators. Further the scene argument is not needed because most
  operations can potentially affect more than the current scene.

* DAG_scene_relations_update will now rebuild the dependency graph if it's not
  there yet, and DAG_scene_relations_rebuild will force a rebuild for the rare
  cases that need it.

* Remove various places where ob->recalc was set manually. This should go
  through DAG_id_tag_update() in nearly all cases instead since this is now
  a fast operation. Also removed DAG_ids_flush_update that goes along with
  such manual tagging of ob->recalc.
2013-02-21 19:33:04 +00:00
ac6e44887e code cleanup: remove references to old bevel code (which has been removed for a while) 2013-02-21 17:13:25 +00:00
04d628a5b5 Another huge bunch of new UI translations (some reported by Leon Cheung, thanks!)... 2013-02-19 15:45:56 +00:00
ec04f98a75 Various fixes for UI translation issues (reported by Leon Cheung on bf-translations ML, thanks!). 2013-02-15 14:30:36 +00:00
0b8bfbebc8 correct rna identifiers
- compositor viewer: use_straight_alpha -> use_alpha
- bevel tool: percent -> offset
2013-02-13 04:04:14 +00:00
555bcc3298 add beauty option for triangle fill since you might want to use the initial scanfill result. 2013-02-09 15:49:20 +00:00
c30fb009cc problem with own changes to triabgulate: calling beauty fill directly would re-allocate the faces which mean't triangulates output slots pointers became invalid. (noticed when using from py api) 2013-02-06 15:57:12 +00:00
441c7fb79a fix for crashes running some operators in background mode and some divide by zero errors. 2013-02-06 02:48:03 +00:00
95a13a2c02 Fix projection texture painting crash
It was caused by own mistake by not noticing externtex is used not
only by render engine. Now this function uses pool passed as argument
rather than using R.pool.
2013-01-22 08:05:00 +00:00
162c331417 style cleanup 2013-01-19 06:12:25 +00:00
9f2e845181 code cleanup: use BMW_begin insode for loops body. 2013-01-14 09:53:56 +00:00
5e6917a18e patch [#33738] Extend Selection option unified and added to few operators
from Sebastian Nell (codemanx), with minor edits
2013-01-12 10:48:10 +00:00
8ca977b16e change limited dissolve angle limit default from 15 -> 5 deg. since 15deg is quite high for 2 surfaces to be considered co-planar 2013-01-03 08:09:57 +00:00
ec1681fae7 style cleanup 2013-01-02 01:49:07 +00:00
ab960eea88 Add symmetrize operator for dynamic-topology sculpt mode 2012-12-30 18:31:01 +00:00
4e88bfca1b fix [#33677] Lambda is un-settable for mesh.vertices_smooth_laplacian
lambda is python keyword.
2012-12-28 11:12:46 +00:00
4e5d5e0d84 Add 'vertex_only' option to bevel tool.
Right now, changing segments to > 1 doesn't do anything,
but intend to work on making that cause rounded corners.
2012-12-28 02:45:10 +00:00
2a5cabb039 code cleanup and minor changes
- use DummyRNA_NULL_items to replace empty enums.
- replace calloc with malloc in copy_dverts since its copied over after.
- add wmGesture->userdata, so operators that use gestures have somewhere to store their own data (not used yet).
2012-12-22 01:08:42 +00:00
c27d22ab71 fix own regression in 2.65 [#33643] Rotation does not work at certain zoom level
caused by not projecting points behind the perspective view,
even though this worked in 2.64 the values were flipped (rotating direction was reversed and the center point was flipped).

added V3D_PROJ_TEST_CLIP_NEAR, when omitted ED_view3d_project_*** will project points from behind a perspective view plane.
2012-12-21 03:49:47 +00:00
66cac9ba71 extrude individual was crashing. 2012-12-19 15:15:00 +00:00
1f3e3b0d68 include cleanup 2012-12-19 04:49:32 +00:00
83b03b8dfd Fix [#33590] The Screw Tool in Edit Mode isn't calculating the correct angle step divisions per turn.
Degrees were used as radians... :p
Also tweaked min values of steps and turns!
2012-12-17 19:26:09 +00:00
18cb2d208c code cleanup: use 'const float *' when getting the 3d cursor and not editing it. 2012-12-17 05:38:50 +00:00
9a2290cf5f fix for bevel using the wrong property name when shift was held. 2012-12-16 14:22:48 +00:00
d5c2a1f8f4 remove context argument from EDBM_update_generic() 2012-12-12 15:22:54 +00:00
44b634bcb1 make EDBM_index_arrays's stay in memory, blender was allocating an array and filling it for verts/edges/faces on every redraw.
this may introduce bugs which I didn't catch, but they are very easy to identify in a debug build which has asserts to ensure the arrays are valid before use.

in my own test drawing ~98,304 quads - this gave an overall ~16% drawing speedup.
2012-12-12 06:53:39 +00:00
5446dc0bf3 fix for various asserts running operator tests - not likely any of these would cause real user bugs though. 2012-11-30 16:41:43 +00:00
c5a8bd498d use radians for 'spin' bmesh operator (since the rest of the py api uses radians). also rename BMO_OP_SLOT_SUBTYPE_MAP_FLOAT -> BMO_OP_SLOT_SUBTYPE_MAP_FLT for consistency. 2012-11-28 00:47:33 +00:00
8ecce451ab bmesh operator naming - use clearer names for args eg: (mat -> matrix, use_singleedge -> use_single_edge)
also remove duplicate docs for operator arg formatting.
2012-11-28 00:16:06 +00:00
7c36100930 new bevel was still referring to old property name (holding shift wasnt working while beveling). 2012-11-27 09:47:22 +00:00
c00a1b7493 use clearer names for 'single' bmesh operator args & add '%e' to BMO_op_vinitf comments. 2012-11-27 09:41:08 +00:00
f8bc346eff bmesh/py operator api:
add type checking for element buffers, there was nothing stopping python from passing any element type into an argument when in some cases only verts/edges/faces were expected.
now operator args define which types they support.
2012-11-27 00:50:59 +00:00
cf2c459325 Fix #33285: loop cut is not supposed to cut through triangles/ngons, but it
still happened  when the loop would go all the way around the mesh with just one
triangle/ngon inbetween to close the loop.
2012-11-26 06:59:59 +00:00
7ecf054295 Bevel: allow page up / page down shortcuts for segments in addition to mousewheel. 2012-11-26 06:59:50 +00:00
e77e1f183a fix for uninitialized memory use with numeric input:
bevel/inset/marker-move would use uninitialized memory when used as modal operators and pressing backspace after entering values.
2012-11-26 03:47:20 +00:00
3d64381e4d use more rigid type checking for bmesh slot subtypes. 2012-11-26 03:16:29 +00:00