Commit Graph

91 Commits

Author SHA1 Message Date
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
38bbd9c778 Text3d: paste additions
- Add paste from system clipboard which behaves like paste from file.
- Paste from file now replaces the selection rather then just adding to the end.
- Move paste operations into the 'Edit' menu.
- Added generic paste functions: font_paste_wchar, font_paste_utf8.
- Fix paste max length check not taking the selection length into account.
2014-01-06 00:39:13 +11:00
42aa19088e Text3d: add select all operator
also add Edit menu for 3d text and move cut/copy/paste there.
2013-12-29 23:55:05 +11:00
c456cd94b2 Curve Handle Recalculate (Ctrl+N)
T37799 Patch from Simon Repp
with added option to recalculate handle lengths.
2013-12-14 02:53:19 +11:00
3a370ec6ec Move curve's boundbox and texspace calculation out of modifier stack
There were several issues with how bounding box and texture space
are calculated:

- This was done at the same time as applying modifiers, meaning if
  several objects are sharing the same curve datablock, bounding
  box and texture space will be calculated multiple times.

  Further, allocating bounding box wasn't safe for threading.

- Bounding box and texture space were evaluated after pre-tessellation
  modifiers are applied. This means Curve-level data is actually
  depends on object data, and it's really bad because different
  objects could have different modifiers and this leads to
  conflicts (curve's data depends on object evaluation order)
  and doesn't behave in a predictable way.

  This commit moves bounding box and texture space evaluation from
  modifier stack to own utility functions, just like it's was done
  for meshes.

  This makes curve objects update thread-safe, but gives some
  limitations as well. Namely, with such approach it's not so
  clear how to preserve the same behavior of texture space:
  before this change texture space and bounding box would match
  beveled curve as accurate as possible.

  Old behavior was nice for quick texturing -- in most cases you
  didn't need to modify texture space at all. But texture space
  was depending on render/preview settings which could easily lead
  to situations, when final result would be far different from
  preview one.

  Now we're using CV points coordinates and their radius to approximate
  the bounding box. This doesn't give the same exact texture space,
  but it helps a lot keeping texture space in a nice predictable way.

  We could make approximation smarter in the future, but fir now
  added operator to match texture space to fully tessellated curve
  called "Match Texture Space".

Review link:

  https://codereview.appspot.com/15410043/

Brief description:

  http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2013/Results#Curve_Texture_Space
2013-12-11 16:32:41 +06:00
95fcf02500 patch [#36336] Split operator for curves and surfaces
by Kevin Mackay (yakca)

The operator follows roughly the same behaviour as the split operator for a mesh (Ykey).
2013-08-29 02:32:51 +00:00
df0114a17a curve only supported radius smoothing, add smooth for tilt and weight. 2013-07-24 14:30:45 +00:00
45d7ebbdf2 Include DNA_scene_types before ED_object instead of forward enum declaration
Forward enum declaration is a bad idea, especially for C++ which requires
enum specification to dteermine which data type to use to store it.

Alternative would be to not use enum as an arument and pass it as int,
but actually would rather be strict on typing -- using explicit enum
as parameter type helps understanding the code and prevents possible
mistakes when using the function.
2013-06-25 09:27:31 +00:00
355f87d3d4 fix [#35670] Selectionmode LMB dont change the controlling for putting curve points with strg+lmb 2013-06-10 02:28:19 +00:00
9fb3d3e032 remove redundant includes from cmake and scons. 2013-05-30 02:16:22 +00:00
ce39c806cf only use OSKEY as a replacement for CTRL on Apple (was already the case in many areas). 2013-05-11 01:12:29 +00:00
6cff0b71a7 style cleanup 2012-06-05 21:54:21 +00:00
47584648dc split up proportional editing keymap functions (adding this in tomato branch was messy) 2012-05-30 08:02:49 +00:00
fef40eda72 Fix related to [#31157]: Tips (descriptions) of macro operators were not set into underlying RNA struct, hence did not show up in UI. 2012-05-05 19:26:53 +00:00
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
e1dd245a1e more keymap edits
- make sure defaults are not assumed (so reuse last settings doesnt
override)
- replace 0/1 for TRUE/FALSE defines.
2012-01-16 16:12:03 +00:00
93017790bc Fix [#29891] Stupid select all behaviour.
More "Reset ops properties" stuff, in select C keymaps this time.

Also ARMATURE_OT_select_inverse -> ARMATURE_OT_select_all(action='INVERT'). Left the select_inverse op code, though, it’s not using the same algo as INVERT of select_all ???
2012-01-14 21:19:41 +00:00
166a37532f remove *.select_inverse operators where the *.select_all operator has an invert option. 2012-01-14 06:58:03 +00:00
c40c323bcd Remove totally crappy and not used operator FONT_OT_buffer_paste 2011-12-29 10:02:42 +00:00
0dbd9ea73f CURVE_OT_extrude doesn't have type property, not sure where it came from here. 2011-12-15 19:32:57 +00:00
9e4d9e066a Fix #29577: repeat curve duplication not working in 2.60(as well as 2.61rc1)
Issue was caused by direct call of transforn operator from extrude and duplicate,
made them macro of duplicate/exturde and transform, so now repeating works nicely.
2011-12-15 07:54:13 +00:00
4b48a5a497 Fix #29101: 2D Tilt on Bezier Curve Bug?
Changing tilt for 2D curves doesn't really hurt, just makes things not so
clear tosee what's going on because you're changing value which isn't used
at all for 2D curves. Disallwo to run TRANSFORM_OT_tilt operator for 2D curves.

Also made a correct fix for incorrect shortcut for tilt in 3D viewport toolbar,
it was really confusing to have almost the same operators (TRANSFORM_OT_tilt and
TRANSFORM_OT_transform with mode=tilt) in keymap. Better to use tilt operator
in toolbar.
2011-11-01 11:00:08 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
2222f536f8 use replace 0 with NULL for pointers, set some functions static
also fixed own errors in recent static check commit.
2011-09-16 08:20:21 +00:00
1741269d30 resolve bad level calls from blenkenel/ into editors/ & remove editors from the include path from CMake & SCons.
* ED_curve_editnurbs --> curve_editnurbs
* ED_sculpt_modifiers_changed --> object_sculpt_modifiers_changed
2011-09-14 00:37:27 +00:00
973ce364a4 fix [#26623] script/console windows: BACKSPACE does not work when SHIFT is held 2011-03-29 16:52:26 +00:00
a79820d284 properties were being used with wrong type functions, this resulted in bad memory access when getting int from an enum. 2011-03-22 12:53:36 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
8b7482892b made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors. 2011-02-14 17:55:27 +00:00
3b413b6fa8 [bugfix] Curve tilt button in 3d toolbar showing wrong shortcut
Added Ctrl-T to Curves Tilt button in the toolbar (edit mode), currently was reporting Alt-S for tilt
(reported by Rickyx here http://www.kino3d.com/forum/viewtopic.php?f=21&t=8485&start=0)

Also added the label "Tilt" to the tilt transform in the Curve > Control points header submenu, currently was just "Transform"
2011-01-10 12:50:46 +00:00
ef0e29269b curve hide keys were still not right, now match mesh editmode. 2010-12-14 11:22:54 +00:00
58f31f8a5d Change set handle types back to menu now menus have key access - V+A, V+V, V+L, V+F
for Graph & Edit Curve view.

Editcurve can be Hkey for hide again.
2010-12-14 10:17:13 +00:00
9aace59708 IRC report fix:
Text edit mode (3d): brought back the ALT+Backspace mode for
typing accented characters. Works with an operator property,
so the hotkey for it is free to define.

Example: type 'a', alt+backspace and then 'o'
works to combine characters with ' ` ~ o / and ^
2010-12-10 13:31:59 +00:00
3ee53d7b5f Related to previous commit:
I still have to learn more of the recent changes in code :)

Didn't know the handle type options became a menu for Curve edit mode. 
Providing much-used tools non-modal (direct) really should have 
preference. Pull down is not very accessible here though, will
check on it later. :)

This restores H, Shift+H, V and alt+H for handle setting.
2010-12-09 19:06:45 +00:00
c8f80fffba IRC fix:
Curve editmode was missing hotkey for operator "Select Inverse"
Is now added like Mesh, CTRL+I
Thanks lmg!
2010-12-03 18:49:38 +00:00
e006d187f4 Applying patch #24822: Select linked for curves as for meshes, CTRL + L version
With some own changes:
- Select pick moved to invoke()
- Used editsurfcurve_region_view3d as poll function for this operator
  due to ogl dependency

Thanks to Elia Sarti (vekoon)!
2010-11-21 18:50:53 +00:00
9fa74e5c59 Fix #24215: Bad shorcut indication for Bezier curve handles.
All existing handle type manipulation hotkeys replaced with unified V-menu
where you could directoly set type you need.
2010-10-11 18:53:11 +00:00
2597377b5c Fix #24054: Shift+A add menu in Surface editmode shows curve items. 2010-09-29 11:48:03 +00:00
4ddc61643a Renaming of Cylindric objects after a good proposal by Conz:
http://www.vrchannel.de/blender/cylinder_rename.png

Mesh Tube > Mesh Cylinder
NURBS Tube > NURBS Cylinder
Metaball Cylinder > Metaball Capsule

I know that naming is something not everyone agrees on, but these terms look geometrically correct.
2010-09-01 21:11:33 +00:00
bd79d80b8a Internal Code Renaming:
Donut > Torus
2010-09-01 20:18:31 +00:00
d1759639dc - remove unused includes IMB_*, BIF_* & MEM_*
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-16 05:46:10 +00:00
8c455e1da8 remove unused includes 2010-08-08 08:33:47 +00:00
327b4d588b Separate proportional edit setting between edit and object mode. They are now used and toggled independently. 2010-07-31 19:26:21 +00:00
e25393a098 reverting commit r28693. Making backspace a 3rd delete key.
We already have 2 keys for delete, no need to add a 3rd, better use backspace only when it makes sense or allow users to hook it up to something.
2010-07-17 18:02:10 +00:00
3580d6229a - text3d was missing menu items for toggling bold/underline/italic/smallcaps.
- made smallcaps use a temp flag so caps can still have the smallcaps flag.
- utility function for getting the char from a font. find_vfont_char(), was inline in ~5 places.
- removed CU_STYLE mix of flags only used in one place, not needed. removed 'style' from rna too.
- fix for some warnings.
2010-07-13 23:51:21 +00:00
91deffc429 Added ability to add and remove text boxes back from Blender 2.4x. One on those small things missing. 2010-06-21 23:20:44 +00:00
e7dd562095 Made Add Surface Operator more atomic, now each primitive has own operator, but calling the same function with different flags.
So they can me used in macros, and addons can use the menu  now, hope to see some very nice surface plugins
2010-06-13 05:48:21 +00:00
a1ada0f21c - remove OBJECT_OT_curve_add
- rename CURVE_OT_primitive_bezier_add --> CURVE_OT_primitive_bezier_curve_add # matches nurbs operator
- rename CURVE_OT_primitive_curve_path_add --> CURVE_OT_primitive_nurbs_path_add
- fix for warnings from 28923
2010-05-24 07:14:55 +00:00
3d417a833c 2010-05-23 02:02:04 +00:00