Commit Graph

63 Commits

Author SHA1 Message Date
4ac17b3f0c Fix T37671: Edit Texture Space on Skin Resize crash
Texture space editing from TFM_SKIN_RESIZE is not supported,
so hide the option and don't use it for such a transform.
2013-12-02 18:05:49 +06:00
4a6802b00b Transform: internal changes for orientations calculations.
- use (const char *) for the 'name'
- use bool where possible.
- remove unused return value for initTransInfo
2013-11-25 09:40:52 +11:00
067d52cd48 Transform: rename Warp to Bend 2013-11-20 12:14:10 +11:00
292d1f55fd refactor transform.c - minor changes
- use TREDRAW_HARD define
- use apply prefix for transform callbacks.
- make callbacks static.
2013-10-23 03:57:42 +00:00
7998b2f6a7 transform - use 2d float's for the viewport center (allows for vector math functions to be used more easily). 2013-10-12 03:42:06 +00:00
723eaa36ce fix own error in BM_mesh_calc_edge_groups() was clearning wrong dirty-index flag.
also remove unused transform defines.
2013-08-14 08:14:50 +00:00
fcc4251c07 resolve [#33374] Extrude and mirror editing
mirror editing option was only added to extrude so mirror editing would always be disabled.
the option is now hidden to avoid confusing users.
2013-06-16 05:35:44 +00:00
dc39ecf010 code cleanup: remove old/unused bmesh bevel transform mode, remove commented character list UI widget and the members these used in 'G' global. 2013-05-28 13:01:31 +00:00
bbd533d4ac Fix for [#35238] Blender does not save custom orientations from "view"
Actually more a feature request... Now create orientations operator has an additional option, use_view, when this one is enabled it will use current view instead of active object to create the new space.

Also made some cleanup (made some funcs static).
2013-05-12 15:52:05 +00:00
127c39b8a4 Fix for [#35224] Transform Orientation - order inconsistency
Fix turned out to remove as much "manual UI" from 3D view header as possible. Mode selector and all transform manipulators/orientations stuff are now RNA-based UI (leaving basically only edit mesh select modes with custom handlers, as they have some quite specific features).

To achieve this, four main modifications were done:
* enum-operator-generated menus are now MENU (i.e. dropdown lists) in headers too.
* All bit-flag enums expanded in ROW buttons now have a handling consistent with e.g. layers, or what we already have for transform manipulators, i.e. clicking select only one element, shift-click to select multiple ones.
* Consequently, the three RNA booleans manipulators flags are merged into a single bit-flag enum (yes, this is also an API change, though I doubt many scripts use it).
* Now the width of enum-based dropdown lists is computed from longest item name in enum, no more from a dummy place holder string (when no label/name is given).

All this allows to remove some code from 3DView/transform areas, that was actually mostly duplicating RNA/operator one.

Also done a few optimizations here and there (among others, do not pass &numitems to RNA_property_enum_items() when you do not need it, saves at least an iteration over enum items to count them).

Many thanks to Brecht for the reviews!
2013-05-12 13:16:11 +00:00
a25703eb36 ruler snap adjustments
- when in wireframe mode: don't snap to faces, instead snap to the closest edge/vertex.
- when not in wireframe mode: snap to the front-most element (was a problem that it could snap to an edge/vert behind the face)
- reduce the distance for selecting ruler points, was too easy to accidentally drag a ruler.
2013-04-25 09:39:03 +00:00
00d04e1924 rna api function scene.ray_cast now returns the object and its matrix (incase its a dupli). 2013-04-24 17:49:13 +00:00
ba283d6c9b modify snapObjectsRayEx() to use a pointer to 'ray_dist' rather then passing the dist, this is to better support multiple calls to ray-cast where only closer distances are accepted. 2013-04-14 05:37:43 +00:00
94c9010e24 make scene.ray_cast() behave like object.ray_cast(), add distance arg to snapObjectsRayEx(). 2013-04-11 10:17:06 +00:00
03b07a719f code cleanup: unused functions 2013-04-03 15:04:24 +00:00
9a901691ee pass snap arguments so the ruler doesn't have to temp overwrite scene vars.
also expose snapObjectsRayEx() for more convenient ray-casting about the scene.
2013-04-03 09:48:21 +00:00
beb4d385bb use floats for transform snapping distance comparisons 2013-04-03 07:36:37 +00:00
75a5e239d7 correct enums which were in fact variables defined in headers. 2013-03-22 05:46:39 +00:00
8655be437d code cleanup: use bool where values are true/false, for view3d and related functions. 2013-03-20 23:14:18 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
d695d7c2ff code cleanup: use bool's for snapping functions. 2013-03-08 18:28:26 +00:00
af5d994b15 add new vertex slide transform operator, different from the existing vertex slide tool based on user feedback.
- no 2-step select edge, then slide.  Instead you can slide and select the edge at the same time.
- ability to slide multiple verts at one.

supports proportional option for vertex slide and flipping, both matching edge slide functionality.
2013-01-13 14:08:53 +00:00
7c699a217a define the size of matrix args for both rows/cols. 2012-12-11 14:29:01 +00:00
Lukas Toenne
83093d6770 Extended modes for snapping in the node editor.
The transform operators in nodes will now use the unselected nodes to generate snapping points. Unlike object snapping, node snapping works for the x/y axes separately and snaps node borders to same borders of unselected nodes. The sensitive area for node borders extends over the whole view2D range, to enable simple alignment of nodes in both x and y direction.

For snap points in the node editor an additional enum value is stored to indicate the type of node border (left/right/top/bottom). This works as a constraint on possible node alignments: only same border types align with each other.
2012-06-29 14:34:46 +00:00
6e9e758d60 fix for un-initialized memory use for modal inset/bevel. 2012-06-10 09:05:49 +00:00
d5032657ed style cleanup 2012-06-06 22:38:39 +00:00
8c71157af6 shrink/fatten transform for mask - adjusts the feather weight.
works in proportional editmode too.
2012-06-05 14:13:14 +00:00
68a9dd54ec mask mode for clip editor developed by Sergey Sharybin, Pete Larabell and myself.
see:
http://wiki.blender.org/index.php/User:Nazg-gul/MaskEditor


note - mask editing tools need continued development, feather option is not working 100%
2012-06-04 16:42:58 +00:00
6c67fc83ea Add vertex skin radii scaling as a transform operator.
Add a new transform operator, "Skin Resize", which scales the X and Y
axes of the radius field in MVertSkin. It's bound to CTRL+AKEY.

Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
2012-05-22 15:30:14 +00:00
5ff7ede1b5 modal operation for bevel and inset:
This commit adds some first building blocks for the two operators to work modally based on mouse input. To make their function easier, two hotkeys are introduced, Ctrl+B for bevel and I for inset.

TODO:
After discussion with Campbell, we would like to add scale-style line indicators for the operators. This is already done for transform operators but a new interface for mesh operations may have to be written using pieces from that code since, strictly speaking bevel and inset are not exactly "transform" operators.

Also, a better input method for inset is needed and more options exposed. The method implemented right now uses mouse move for thickness and ctrl-mouse move for depth. These are calculated using the distance of the selection center in screen space and the mouse position. While that may work and prevents abrupt changes in values when switching from thickness tweak mode to depth tweak mode, it limits the magnitude of values that can be put into the tool especially in small or large scale. 

Alternatives until a better method is written include:

* use relative offset (works but may give strange results)
* tweak manually after the operation.
2012-05-16 14:30:41 +00:00
9892736206 code cleanup: header cleanup and remove some duplicate defines. 2012-05-12 20:39:39 +00:00
67f1e83508 [#30373] Which part to snap in volume snapping is removed
By Bug reported by Pep Ribal

Also fixed an object mode bug with volume snapping and made it compatible with the edit mode "Snap on self" option
2012-03-10 21:40:35 +00:00
7cc206ddca Code Cleanup: remove non existing function declarations.
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
2012-02-29 15:00:37 +00:00
2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
14ddf19ad2 make it clearer which arguments in transform snap are return values (no functional change) 2011-11-19 00:52:54 +00:00
27d42c63d9 Camera tracking integration
===========================

Commiting camera tracking integration gsoc project into trunk.

This commit includes:

- Bundled version of libmv library (with some changes against official repo,
  re-sync with libmv repo a bit later)
- New datatype ID called MovieClip which is optimized to work with movie
  clips (both of movie files and image sequences) and doing camera/motion
  tracking operations.
- New editor called Clip Editor which is currently used for motion/tracking
  stuff only, but which can be easily extended to work with masks too.

  This editor supports:
  * Loading movie files/image sequences
  * Build proxies with different size for loaded movie clip, also supports
    building undistorted proxies to increase speed of playback in
    undistorted mode.
  * Manual lens distortion mode calibration using grid and grease pencil
  * Supervised 2D tracking using two different algorithms KLT and SAD.
  * Basic algorithm for feature detection
  * Camera motion solving. scene orientation

- New constraints to "link" scene objects with solved motions from clip:

  * Follow Track (make object follow 2D motion of track with given name
    or parent object to reconstructed 3D position of track)
  * Camera Solver to make camera moving in the same way as reconstructed camera

This commit NOT includes changes from tomato branch:

- New nodes (they'll be commited as separated patch)
- Automatic image offset guessing for image input node and image editor
  (need to do more tests and gather more feedback)
- Code cleanup in libmv-capi. It's not so critical cleanup, just increasing
  readability and understanadability of code. Better to make this chaneg when
  Keir will finish his current patch.

More details about this project can be found on this page:
    http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011

Further development of small features would be done in trunk, bigger/experimental
features would first be implemented in tomato branch.
2011-11-07 12:55:18 +00:00
33accdb725 use (const char*) rather than (char*) where possible.
also removed some unused function definitons.
2011-11-05 11:04:28 +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
e320db1066 fix [#28135] Edge slide changes UV 2011-08-03 08:02:32 +00:00
a19e917782 Bugfix [#26269] Initiating a duplication with shift D and cancelling
in dope sheet/ graph editor leads to duplicated keys

The old hack using the transform "undostring" didn't work anymore, as
this wasn't set. Instead, I've added a special mode transform mode for
this that the duplicate operators can set to get this functionality.
2011-03-02 23:39:08 +00:00
Nathan Letwory
8172207d20 doxygen: editor entry 2011-02-21 07:25:24 +00:00
37931a6b1a Todo item: brought transform texture space back.
Code changes are minimal, re-using the code as already was there.

Options are in pulldown menu, or SHIFT+T and SHIFT+ALT+T

Might be that Martin likes to see it different... do we need
a special operatortype for it?
2011-01-05 17:27:26 +00:00
263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
5a805c5fc3 [#21840] When clicking to move a Node it sticks to the mouse
Add hidden property to be able to force confirm on release (drag immediately is a silly name) on or off.

Streamline method for adding common properties to transform operators.
2010-04-02 19:40:51 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
95db4d16dd Missing file in previous commit. 2009-12-21 18:56:00 +00:00
4d32e002ed [#20441] 3D manipulator widget problem
calculateTransformCenter function passing event to transform init when it shouldn't have.
2009-12-21 15:37:19 +00:00
20a2100a36 Add missing snap properties to transform operator.
This is used to force snap on and off when needed.

Also, when transform is not run modal, it will use default values for PET and snap properties (False) instead of scene settings. No need to force them off when calling transform with Exec.
2009-11-27 16:15:34 +00:00
0b027b4097 Make orientation matrix access function public.
Fix bug in previous code: passing 3x3 matrix to a function expecting a 4x4 (warnings are for something)
2009-11-06 21:31:14 +00:00
3a1216a2f2 Project option for snap to faces.
This is similar to the old retopo all option but uses the snapping code and not the openGL depth buffer (it's thus more precise).

Not sure if making it available as a snap option is sensible, this is up for discussion.

NOTE: it will get slow fast on large meshes, we need to plug in an acceleration structure into snapping.

This will need an icon too.
2009-10-12 22:33:32 +00:00