Commit Graph

207 Commits

Author SHA1 Message Date
e6cdce725c Code cleanup: use bools & const args 2014-04-17 02:53:34 +10:00
1f58bfb8be Code cleanup: de-duplicate cotangent weight function & add arg sizes 2014-03-30 11:08:33 +11:00
a32588b174 Fix for transform setting T_CAMERA
This was only set when the camera was active, however non active cameras
can be transformed too.
2014-03-01 01:28:15 +11:00
2e0a33745d Revert editbone roll correction changes.
This reverts commit f72acc38d 65c5be967 eff6b385e 3fe487217
2014-02-28 10:35:11 +01:00
f72acc38dd Transform: remove recently added ival2, use editbones temp data 2014-02-27 09:47:37 +11:00
65c5be9676 Fix T38843: Bone parallel to world z axis flicking when scale in edit mode.
This commit hopefully fixes all glitches we had when bone was Z-aligned. Note that when you init a transform
with a Z-aligned bone and change it to be non-Z-aligned, you will still get some brutal roll change,
there is not much things we can do here afaik...
2014-02-26 21:36:24 +01:00
da8c6360b1 Revert 7142b97085 (transform toggle node hiding)
D187 was committed without review and later rejected by Brecht and myself.
2014-02-17 14:46:16 +11:00
19da32abf3 Fix T38128: snapping to node border uses node centers.
This was caused by recent change to transform locations being changed
to the upper-left corner of nodes (rBa857a6f).
2014-01-21 13:13:41 +01:00
7142b97085 Make it possible to hide/unhide a node during node transform operations.
During drag the H key can be used to toggle the hide flag of the selected nodes.
This makes it easier to 'attach' nodes to available links in narrow places.
2014-01-18 18:20:21 +01:00
d305df2226 Transform: old todo, removing an orientation now checks all screens.
also fix for using uninitialized matrix when an out-of-range index is
set for custom orientations.
2013-11-25 09:40:52 +11: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
Lukas Toenne
7398600090 True grid snapping for nodes: This snaps nodes to the actual background grid instead of using incremental offset (which is not useful for nodes). Increment snapping has been disabled for nodes to avoid
confusion, grid snap is now the default as it seems to be the most wanted and easy to use mode.

Absolute grid snapping happens in a somewhat generic function 'applyGridAbsolute', which could also be used for objects and other transforms later on. It is conceptually similar to the 'project' snapping
option, in that it calculates a delta vector for each element on top of the overall transform, which places each node on the grid.

Node transform now uses the top-left node corner for TransformData->loc. The transform center is still the average of node centers, so that scaling and rotation works nicely.

snapGrid*** functions have been renamed to snapGridIncrement*** to distinguish better between incremental and absolute grid snapping.
2013-11-06 17:46:32 +00:00
48c1e0c0fc spelling: use American spelling for canceled 2013-10-26 01:06:19 +00:00
5816aa42bf code cleanup: minor transform refactor
redraw flag were mixing up types - int/char/bool, add enum type to use instead.
2013-10-23 06:48:36 +00: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
b00a8122e3 improve warp transform so it can be used as a general bending tool too. 2013-10-13 01:09:23 +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
Lukas Toenne
29b546fe7f Fix for #36739: Delete new nodes added via the Add menu or toolbar if the subsequent transform operator is cancelled. This prevents ugly situations where nodes stick "under" the toolbar after clicking a
wrong button.

Works by adding a flag to transform operators "remove_on_cancel". This is currently only used for node transforms, the idea is that if set, the operator will remove the transformed elements when it is
cancelled. It's not possible to do that in the original NODE_OT_add_node operator, because transform is modal and there is no way of reacting to a cancel outside of the transform itself (previous attempt
used a macro operator, but that also doesn't work because subsequent operators don't get executed if the previous transform cancels).
2013-09-17 13:07:48 +00:00
347ba7f159 fix [#36517] You can edit a texture space (Shift-T) of a linked mesh
also enable other errors to show up which were previously commented.
2013-08-20 06:04:46 +00:00
24ce60cfe4 Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.

Movie clip editor changes:

- Artist might create a plane track out of multiple point
  tracks which belongs to the same track (minimum amount of
  point tracks is 4, maximum is not actually limited).

  When new plane track is added, it's getting "tracked"
  across all point tracks, which makes it stick to the same
  plane point tracks belong to.

- After plane track was added, it need to be manually adjusted
  in a way it covers feature one might to mask/replace.

  General transform tools (G, R, S) or sliding corners with
  a mouse could be sued for this. Plane corner which
  corresponds to left bottom image corner has got X/Y axis
  on it (red is for X axis, green for Y).

- Re-adjusting plane corners makes plane to be "re-tracked"
  for the frames sequence between current frame and next
  and previous keyframes.

- Kayframes might be removed from the plane, using Shit-X
  (Marker Delete) operator. However, currently manual
  re-adjustment or "re-track" trigger is needed.

Compositor changes:

- Added new node called Plane Track Deform.

- User selects which plane track to use (for this he need
  to select movie clip datablock, object and track names).

- Node gets an image input, which need to be warped into
  the plane.

- Node outputs:
  * Input image warped into the plane.
  * Plane, rasterized to a mask.

Masking changes:

- Mask points might be parented to a plane track, which
  makes this point deforming in a way as if it belongs
  to the tracked plane.

Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578

This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
b6f58d0ea1 - add individual origin support for curves and improve the orientation calculations for curve handles,
- add support for using the active point's orientation.
- add support for creating new custom orientations from curves.
- fix error where only the last selected curve handle was taken into account for manipulator orientations.
2013-07-24 13:56:36 +00:00
7fec23ae0a fix for problem with edge slide where it would stop shapekey modifier from being applied (because of added vertices),
now, instead of making hidden copies of faces, the faces are copied into a temp bmesh.

also remove a hash that was being created and not used (old code).
2013-07-11 04:24:36 +00:00
99fe6d29eb skip duplicating faces for edge slide unless its used, this causes update problems for shape keys at the moment, Ill check on that but no need to run in most cases. 2013-07-10 12:37:15 +00:00
28dd9c6a40 Fix #35767: transforming nodes in the node editor changed the wireframe color
of the active object in the 3D view. This was due to sharing a global G.moving
flag to indicate that transform is active, now it's only set per transform data
type so different editors don't influence each other.
2013-06-24 22:41:37 +00:00
7021251043 transform: 2d option for proportional editmode,
Uses for view orientation for distance calculation, can give nicer results when you dont want twisting caused by changes in depth.
2013-06-20 13:24:07 +00:00
972c01ac0c remove NULL checks for return values from EDBM_***_at_index calls. 2013-06-20 07:00:57 +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
30c7183874 use 'normal' orientation rather then 'local' with individual origins to use the per-element axis-matrix. 2013-05-01 05:26:10 +00:00
9697493c77 allow to scale and rotate from edge/vertex slide. 2013-04-24 15:15:01 +00:00
e0464a0549 code cleanup: remove unused vars in edge slide, only store the initial vertex coords rather then a copy of the whole vertex, name edge slide directions a/b rather then up/dowb. 2013-04-19 02:22:23 +00:00
3f7f07faf5 style cleanup 2013-04-18 01:52:38 +00:00
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
ba845f6313 fix for own recent addition of transform indervidual-axis in editmode, not working if the object was rotated. 2013-04-12 02:16:44 +00:00
ef1af9f9c4 fix [#34802] Individual Transformation Confusing in Edit Mode
Individual transformation now works in editmode mesh faces/edge, armature bones and metaballs.
2013-04-04 09:20:46 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
abd1748e48 code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use. 2013-03-09 11:40:42 +00:00
4f4e45540d fix for harmless glitch rotating the camera in camera mode, having the center point so close to the viewpoint caused the helper line to erratically move about because of float precision. 2013-02-28 11:29:27 +00:00
9ab3d4ff1e fix [#34303] Rotation fcurves don't work with transforming with individual centers 2013-02-18 16:35:13 +00:00
18f12c3fa4 allow alt or Ckey to toggle clamping for vertex slide. 2013-02-17 05:39:55 +00:00
9449866bdc fix (for one case of...) [#33949] T_ALT_TRANSFORM conflicts with "emulate 3 button mouse"
ShrinkFatten operator now uses scale key to toggle 'Even thickness' option.
With the default keymap this is Alt+S,S.

Added functionality so the header print can get the key used for the modal keymap, some other operators should make use of this too.
2013-02-14 14:01:02 +00:00
b59ba34c37 fix [#34152] Vertex Slide - misleading description
also use C key to toggle clamping rather then alt (reported in [#33949]).
2013-02-11 01:55:58 +00:00
c734808fb0 fix error with flipped vertex slide failing, also fix bug where you could be flipped and in proportional vertex slide mode. 2013-01-31 22:18:37 +00:00
419ce840f9 rigidbody: Make rigid bodies kinematic during transformation
This allows moving rigid bodies on frame > startframe.
Also rigid bodies can now be picked up and trown around while the
simulation is running.

Note: There is a small glitch with cancelling tansform during simulation
but it's tricky to get rid of.

TODO: Avoid static-static collision warnings
2013-01-23 12:06:18 +00:00
d4bf47350f Holding Alt now removes [-1, 1] clamping in vertex slide, Thanks to Psy-Fi for the original patch. 2013-01-18 23:20:17 +00:00
769ab3eed8 code cleanup:
- cycles ui used 'cscene' for scene.cycles and scene.cycles_curves
- style cleanup
2013-01-15 23:17:45 +00:00
d8f2672be7 style cleanup 2013-01-15 13:08:51 +00:00
2e154f7ce5 vertex slide was using flipped value, wasnt so noticable unless you types in a value. 2013-01-15 03:35:31 +00:00
e0388a881b fix for own error with unwrap selection checking uvedit_have_selection() failed with no UV layer.
also add some safety checks for BM_ELEM_CD_GET_* macros.
2013-01-14 08:02:06 +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