Commit Graph

119 Commits

Author SHA1 Message Date
824be96dc0 More work on Drag Immediate:
- Rename option and flag to something more sane
- Add property to manipulator operator and set true by default

Confirm on Release can now be forced true or false per operator, in which case it won't use the default value (the user preference).
2010-04-03 17:38:43 +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
9105f6f0bd rna naming, *_frame --> frame_* 2010-04-01 21:44:56 +00:00
19fb497d13 Fix a few warning in editors/ module. 2010-03-30 11:38:06 +00:00
b09ee4923d Fix [#21711] Position of 2d cursor is not displayed correctly and cannot be set
in uv/image editor properties panel

Note: Moved UV editor 2d cursor to SpaceImage rather than View2d, so it's 
more accessible to RNA.
2010-03-30 05:52:05 +00:00
5497c2004c Mirror clipping for curves and surfaces. 2010-03-29 09:29:50 +00:00
f743b583bf more lint includes
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing:  UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
2010-03-23 14:09:09 +00:00
6a4b39ed2c Bugfix #21508: Hidden bones remain "selected" and are affected by transforms
Made hidden bones get ignored by transform code. This should be quite an old bug...
2010-03-09 08:31:41 +00:00
ca7b6e2cd0 fix for more crashes with baked fcurves 2010-03-03 13:20:18 +00:00
9e35777019 Revert back debuging code that made drawing transform constraints only work on one side. 2010-02-28 17:51:23 +00:00
a8d364ce4a Move increment value into numinput structure.
Easier for transform to have different values per transform then (also different from gears values).

(Based on a bug reported by Jonathan Smith)
2010-02-22 23:25:34 +00:00
ddc0c68a5c Bugfix #21234: Autokey "insert only available" userpref inserts keys for all bones in an armature
-- 

Bugfix: When autokey is enabled, notifiers to refresh the animation editors *after* transforms finished for objects were missing.
While I understand the need to limit these to not doing this during transform, after transform, this lead to lag/inconsistent UI problems.

-- 

* Added 'Damped Track' Option to 'Make Track' Operator
* Improved the code of the 'Clear Track' operator to include other types of tracking constraint too
2010-02-21 11:42:32 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
ac45c743f8 realtime updates in the graph editor were updating all visible fcurves, update all selected fcurves instead. 2010-02-10 18:22:55 +00:00
9916e0193c New Transform 3D view recalculate scheme.
Only recalculate changes when absolutely necessary (mouse move triggers a soft recalc that will only happen before the next redraw other events trigger hard recalcs). The problem was that mouse moves are reported as lots of events (with small dx,dy) between each redraw which would trigger often heavy recalculations every time while only the last one was really important (the one before the redraw).

This makes snap project (retopo) much more manageable but induces a very small lag equal to one refresh cycle. Confirming transform does a hard refresh, so the final result is always consistent with mouse position.
2010-02-03 21:01:41 +00:00
26cfe812f8 Proportional Edit Connected: Use connectivity distance for falloff (connectivity distance now also calculated across inner face edges). 2010-02-01 21:31:32 +00:00
0e1eca2d08 Finishing off the Transform code changes for Degrees/Radians:
Added flags for the mapping function offering more control over what values were affected and when. In the WIP code, the values for unselected verts were getting the restoration conversion being repeatedly applied, resulting in the values tending to zero.
2010-01-26 09:25:32 +00:00
07a4986be7 WIP commit - degree conversions for transform fcurve editing - grabbing a point works fine, but still
issues with grabbing a single handle.

Using the Radians unit setting still goes fine though so you can use that for now.
2010-01-26 05:58:03 +00:00
946cdd8ff6 Proxy + Transforms Bugfix:
This commit fixes some update issues for some rig setups used for Durian, with proxies not updating correctly during transforms.

The setup involves an armature that has been proxified, which deforms a mesh in the group it came from. One of the bones in this armature is constrained to an empty that was added in the shot file.  
When the empty is moved around, the mesh does not deform in response to the armature until the transform is confirmed. 

This was because the depsgraph tagging was not comprehensive enough, since only a few cached tags got restored (but not all). For now, full depsgraph tagging is now performed for objects as they are transformed.
2010-01-20 22:21:10 +00:00
6307c65534 Animation Editors: Restored 'Realtime Updates' toggle
- In 2.4x, this setting was the lock button in the headers. 
- Now, this option can be found in the View menus of all relevant editors

- Basically, this option toggles whether objects (using animation data that's being edited) get updated during animation editor transforms to give realtime feedback on the effects of tweaks. 
- By default, this is enabled, since this fits in nicer with 2.5's everything 'live' paradigm. However, it is recommended to disable this on slower computers or when updates for heavy rigs are causing too much workflow lag

- Also, removed some old crufty settings from action editor data
2010-01-20 11:20:20 +00:00
a9aea7e6bf Edge Crease Transform is back. Now in edge menu (Ctrl-E) with Edge Slide and the rest. 2010-01-09 20:42:35 +00:00
509c2e9614 Bugfix: [#20403] transform manipulation widgets with normal coordinates
Disable manipulator drawing during transform
2009-12-17 17:50:55 +00:00
2c3eb59f0f A few KeyingSet + Transform Tweaks:
Autokeying for transform functions now gets context-info, allowing for bone paths to be recalculated. 

However, the main purpose of this is to allow KeyingSets to eventually have poll functions.
2009-12-14 03:20:17 +00:00
7e333010f3 Animation System: Handling Updates
* Added ANIM_list_elem_update and ANIM_id_update functions to call when
  changing animation curves, which will then call the RNA property update
  functions for those curves.

  This is to replace just calling DAG_id_flush_update, that may not always
  be the right thing to do, and doesn't send proper notifiers for redraw.

  Still only used/usable when transforming in the graph editor, not sure
  how this do this with NLA for example, .. needs to be improved.

* Added function wm_data_handle_update function to contain the object
  update function, and also added scene animation update there. Actually
  it should be doing all datablocks, this makes it work for sequencer.


Joshua, do you agree this is the right direction to go in? I can revert or
change the code if you think it should be done differently. Mainly wanted
to get this working well for sequencer now.
2009-12-08 18:28:09 +00:00
1962afa2a6 Use custom cursor draw in transform to draw the new arrow cursors (to indicate direction of motion for a particular transformations). This insures that it's drawn under the cursor and not far away when cursor is warped (rubber band still points to event location, this helps visualize too). 2009-12-07 18:10:11 +00:00
63fc267929 [#20213] Align to Transform Orientation crashes Blender
Align needs to be call with region context.

Also added checks to prevent this from crashing if not called properly.
2009-12-02 19:59:57 +00:00
9f251ce301 Additive snap for Transform. Easy snapping between two vertices, in the middle of three faces, ...
A to add the current snapping point to the list
Alt-A to remove the last one

The resulting snapping point is the average of all snap points in the list (and the one under the mouse pointer, if valid).

Snapping between two verts is a matter of moving over the first, pressing A, moving over the other, confirming transform.
2009-12-01 18:26:18 +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
74715d00cc First changes to implement the 2.5 snapping proposal (discussed back in May and recently on IRC).
http://wiki.blender.org/index.php/User:Theeth/Snapping

The new widget isn't there yet, but the rest works, including:

Increment (gears) is now a snap mode

Ctrl click to toggle snap on or off (in transform and 3d view)
Shift+Ctrl click to select snap mode (3d view only)

Snap status (on/off) is persisted in tool settings, no need to always turn it back on when entering transform.

It's still possible to have something resembling the old system by editing the transform modal keymap to snap on on ctrl press and snap off on key release.
2009-11-26 19:47:55 +00:00
37e4a311b0 Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
  conversion script instead, if they use a lot of math functions
  in new code:
  http://www.pasteall.org/9052/python
2009-11-10 20:43:45 +00:00
ce973efd4f Fix for [#19780] pivot for rotation/scaling doesn't use "active vert/edge/face"
Martin please doublecheck, but it should be all good.
2009-11-05 04:37:42 +00:00
69feedf139 Object PET works with autokey.
Reordering some function calls in transform cleanup to make it simpler (that means other fixes are possible too, sequencer probably don't need it's own freeing function anymore).
2009-11-01 02:52:38 +00:00
d5921a274f Proportional edit for object mode.
Limitations:

1) Parents and children of selected objects are excluded from the pool (siblings are ok) Making it work with that would required unparenting and reparenting after transform, that would turn nasty really quick.

2) Does not support Connected (this could be done through parent links, but see 3 first).

3) Parent relationships in affected objects aren't taken into account. When parent and children in the area of effect, remember that the children will also take the motion of the parents (with additive results). This could perhaps be fixed, but it could be nasty.


Other stuff:
New BASE_EDITABLE macro that checks if base is editable (like TESTBASELIB except it doesn't check for selection)
Add scene parameter to TESTBASELIB_BGMODE macro (using it from current scope is nasty)
2009-10-30 17:48:50 +00:00
1c1659eb28 - Right click menu can open links directly to API reference docs (rna and operators)
- Generated and uploaded api docs - http://www.blender.org/documentation/250PythonDoc
- Added Edit docs menu item & operators as discussed with Mindrones, Brecht, Stani & Letterip @ bconf, needs some web backend. python operator can aparently use xml/rpc to upload docstrings.
- Added operator invoke function - context.manager.invoke_props_popup(self.__operator__, event)
  this calls a popup for invoke by default (which intern calls execute())

- Own recent commit to game framing applied to non-camera views too.
- v3d->persp is deprecated but still used in some places.

- Transforming strips could overlap 1 frame if moving them below frame 0
- Transforming overlapping strips could go into an eternal loop (though overlapping strips should not exist)
2009-10-27 02:54:25 +00:00
7685def9af Graph Editor: Pivot Modes for Transform
It is now possible to choose from 'Bounding Box' (default), '2D-Cursor', and 'Individual Centers' as the pivot point(s) that rotation/scaling is performed around.
2009-10-21 10:36:46 +00:00
cac0e48dfb Region post redraw is now split up in a view space and pixel space
part. This fixes a bug where transform help line drawing would not
work with view clipping and mess up the z-buffer. This avoids the
transform code having to figure out what kind of opengl state is
enabled and disable it temporarily.
2009-10-20 21:05:22 +00:00
1f4d07fd19 run flushTransParticles after snapping applyProject so you can project/snap particles in editmode 2009-10-19 17:50:26 +00:00
0445ff1ae9 Give sequencer its own transform freeing function.
Updating the sequencer after transform could not use special_aftertrans_update because it relies on data that is freed

theeth: moved the customFree function to run before freeing t->data, t->data2d in postTrans(), checked that customData is not needed.
2009-10-19 08:01:30 +00:00
53624a53d9 Assorted tweaks for animation editors:
* Changing to the ShapeKey editor now automatically enables the value sliders
* Filtering code for ShapeKey editor can now do AnimData block filtering too (internal details...)
* Silenced console warnings when inserting keyframes on F-Curves with no keyframes already (for Animation Editor sliders)
* Made the update code for keyframe transforms send more general depsgraph updates. Unfortuately, this still doesn't resolve the update problems with shapekeys
2009-10-17 04:22:52 +00:00
6ffb79107c X Mirror editmesh with PET
Lock vertice near the middle (|x| < 0.0001) on the mirror's plane.
Don't propagate transformation across mirror plane (this could probably be smarter)
2009-10-15 21:54:22 +00:00
4ef0ef1927 added mesh mirror flag, now store this per mesh
button in mesh interface
also dont register operators that change context
2009-10-14 14:28:05 +00:00
daebfaaa49 Bugfix: uv editor transform operators were not working anymore
after the recent retopo/snap commit.
2009-10-14 09:08:48 +00:00
edfe78aec9 Context operators for adjusting context values directly to avoid adding operators for adjusting single values which also need duplicate notifiers.
wm.context_set(path="scene.tool_settings.someattr", somevalue)
wm.context_toggle(path="scene.tool_settings.somebool")
wm.context_toggle_values(path="scene.tool_settings.some_enum", value_1="somevalue", value_2="othervalue") # switch between 2 values
wm.context_cycle_enum(path="scene.tool_settings.some_enum", reverse=False)

the path value is taken from the context so the full path is 
context.scene.tool_settings...

This means in keymaps you can cycle draw modes, change PET- anything with rna access.
If its not so nice to map keys to operators like wm.context_set we could use macro's to wrap it and have its own name

Use this for PET and setting pivot options

- Made userpref key shortcut Ctrl+Alt+U since its not used in 2.4x
- added pivot_point_align (Alt+Comma)
- added PET wasnt rna wrapped correctly.
2009-10-13 15:30:19 +00:00
4063c230af fix for warnings, wkey menu wasnt registered 2009-10-13 07:39:08 +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
0eab183a66 Following up on revision 23783
Transform saves back tool settings only when they weren't set as operator argument (and only when running modal).
2009-10-12 13:37:07 +00:00
d143627b62 Fix #19468: particle mode crash in transform, when there are
no editable particles.
2009-09-28 14:51:42 +00:00
7d2fd5449e Durian Feature Request: Rotation Modes for Objects
This (biggish) commit generalises the rotation modes functionality added for Bones, allowing Objects to use the various Euler Rotation orders, Axis-Angle, and Quaternion rotation representations.

I've also cleaned up the nomenclature of the rotation-related settings so that the naming styles are more consistent with each other. Unfortunately, this will break all files involving object or bone rotation animation made in 2.5 versions (2.4x will still get correctly converted).

General Notes:
* By default, Objects still default to using Eulers, while Bones will use Quaternions by default still.
* I've fixed all areas that I'm currently aware of to work with these changes. However, there are probably a few places where I've missed a few changes (i.e. auto-keyframing will need attention later).
* Removed the old "IPO-Keys" stuff from Transform code. I'm unlikely to restore this in the near future, and trying to fix that to include support for this commit would have been too much work.
2009-09-28 10:19:20 +00:00
930542540a Make edge slide a proper operator
Clean up a couple of things in transform (PET settings, custom data, ...)
2009-09-22 20:16:56 +00:00
b1d4d75aab brought back edge slide. 2009-09-22 08:41:03 +00:00