Commit Graph

41 Commits

Author SHA1 Message Date
a1082a6d32 Switch to non-array parameters.
Add mising property find checks and remove uneeded param.
2009-03-10 18:10:24 +00:00
d7479f99b0 Share enum types with rna and small bugfix because Ton needs to make keymodifier bitflag work. 2009-03-07 10:28:08 +00:00
c07acfb4fd Transform fun
extracting params in split transform operators.

work in progress still, but lots of fun with operator replay (F6)
2009-03-06 15:50:15 +00:00
06629033b3 Pose Channels - changing settings in RNA updates them correctly again 2009-03-02 01:22:02 +00:00
9322bddf2c 2.5
Fix for the 'repeat last operator' option. It didn't work yet well
outside editmode. Now undo/redo has to fully keep the UI alive,
even when called from within a running popup.

Another fix: when regions collapse/hide they were not effectively
disabled, still accepting events. (like Nkey in 3d window).
2009-02-17 15:53:52 +00:00
283926aa2d 2.5: UV Editor module porting pretty much finished now, only missing
still is mirror transform. This commits adds the remaining operators:

* UV mapping operators (U key menu): cube, sphere, cylinder, etc.
* Hide/Show operators.

And solves most XXX's, including:

* Fix bad includes and calls into space image.
* Aspect ratio correction.
* Create UVs if they don't exist yet on unwrap.
* Assign image to UVs.
* Drawing proportional edit circle.
2009-02-09 20:58:31 +00:00
5e0c553b15 Armature Editing: Subdivide Operators
* Added back the Subdivide tools. Use the Alt-S hotkey (for now) to get a menu with the subdivision options. There are also two standalone operators which are not used yet.

* Fixed the PoseMode checking callback to make sure that it doesn't override any tools in EditMode.

* Fixed an old comment in transform code, and a few warnings in editarmature.c
2009-02-09 01:27:44 +00:00
591ab657d6 2.5: UV Editor, more operators.
Border Select
Circle Select
Pin
Select Pinned
Unwrap
Minimize Stretch
Pack Islands
Average Islands Scale
Snap Cursor
Snap Selection
2009-02-07 01:27:46 +00:00
7114486e8b 2.5:
* UV Editor Transform, translate, rotate, scale, live unwrap, snap, gesture,
  etc work.
* Also for selection operators, used OPERATOR_FINISHED|OPERATOR_PASS_THROUGH
  instead of just OPERATOR_PASS_THROUGH to make gestures work, seems more
  correct to me.
2009-01-28 21:43:43 +00:00
8006134a9c 2.5
Made 'select-tweak-grab' work in 3d window, fcurve and nodes.
For nodes it works with both left/right, the others follow
user preset for select.

Tweak is a WM event, which also follows user preset for 
tablet-style tweaks (release = apply).

You enable tweak events with an operator WM_OT_tweak_gesture.
Keymap entries can assign to left/middle/right button or to
action/select button tweaks.
2009-01-28 15:39:39 +00:00
a0fa83a9dc Graph Editor - Restored all Transform tools
I've ported the transform tools for this editor as they existed in the AnimSys2 branch (minus some of the experimental pivot options which were not useful enough yet).

Hotkeys are:
* GKEY - transforms points as always
* RKEY - rotates points (only useful for a single 'knot') 
* SKEY - scales points
* EKEY - like in the DopeSheet, the 'extend' translation tool only moves all the keyframes on the same side of the current frame indicator as the mouse

Useful tweaks ported from AnimSys2 include:
* Auto-snapping is on by default for time-values on the keyframes only. Handles are not snapped (or shouldn't be).
* Rotating/Scaling new keyframes using default handles (i.e. Auto-Handles) now works, as the handle is now converted to aligned so that changes can be seen.
2009-01-28 02:56:58 +00:00
8078bc65d6 Graph Editor:
* Cleaned up code for borderselect with BKEY. There's still a bug here where y-values don't seem to be getting properly checked, so nothing seems to happen.

* Set up some code for transforming keyframes. It currently uses the wrong code though (i.e. it uses the code for Action Editor which is 1D not 2D, and doesn't have some of the special checks needed). More work on this later.
2009-01-27 11:09:30 +00:00
cfd9342600 2.5
Use proper function to check if prop is defined instead of relying on default.
2009-01-25 17:08:56 +00:00
e68b7e6d87 * operators for toggling, making, separating metastrip's. (tab, m, alt+m)
* transform support for metastrips
* active strip is set to NULL if its freed again.
2009-01-23 23:14:02 +00:00
88e244ebb9 basic transform for sequencer strips
can transform the strips or move their handles
Still todo, click-drag transform, metastrips support, snapping, markers overlap checks and constrain to valid channels.
2009-01-21 07:01:20 +00:00
5ddc9ed1da 2.5
cleanup image window apsect ratio correction mess (still disabled, this just cleans fonction call locations and name)
2009-01-20 20:44:36 +00:00
228c0c760f 2.5
EditMesh snap still had stubs instead of proper editmesh calls
Misc correction for 2D edit with NDOF (not testable without ndof support)
2009-01-20 19:58:05 +00:00
d9a0a477a4 2.5
Redraw at the end of transform even if not cancelled, to make sure all special transform draw doesn't stay on screen.
2009-01-20 19:18:22 +00:00
bd9e896e96 2.5
View3D four-split: added box-clip for the three ortho
windows. Is all on by default, waiting for headers and
buttons to come back.

Also: hotkey for foursplit now also removes it (toggle)

Also: window_to_3d() function only did delta's, 
renamed it to window_to_3d_delta  and coded a 
real window_to_3d()
2009-01-20 18:31:11 +00:00
bc63213844 2.5
View3D has been split now in a local part (RegionView3D) and a
per-area part (old View3D). Currently local is:

- view transform
- camera zoom/offset
- gpencil (todo)
- custom clipping planes

Rest is in Area still, like active camera, draw type, layers,
localview, custom centers, around-settings, transform widget,
gridlines, and so on (mostly stuff as available in header).

To see it work; also added new feature for region split, 
press SHIFT+ALT+CTRL+S for four-split. 
The idea is to make a preset 4-split, configured to stick
to top/right/front views for three views.
Another cool idea to explore is to then box-clip all drawing
based on these 3 views.

Note about the code:
- currently view3d still stores some depricated settings, to
  convert from older files. Not all settings are copied over
  though, like custom clip planes or the 'lock view to object'.
- since some view3d ops are now on area level, the operators
  for it should keep track of that.

Bugfix in transform: quat initialize in operator-invoke missed
one zero.

Als brought back GE to compile for missing Ipos and channels.
2009-01-19 16:54:41 +00:00
6d85a0feba 2.5
Transform orientations (Alt-Space and in header)

enum for transform operator parameter.
2009-01-18 21:36:38 +00:00
f08032e8f9 UI: various changes
* View2D to region now returns ints instead of shorts.
* Use "Numpad" instead of "Pad" in automatic keymap menu info.
* Menus can now use buttons other than BUTM and SEPR, in
  particular TOG and ROW are now supported instead of flipping
  bits manually.
* Added a simpler uiDefMenu* api for making menus now, and it
  only supports Operator and RNA buttons at the moment, will be
  used in next commit. Not sure how this will evolve .. makes
  menu code look cleaner anyways.
* Ensure that interface code doesn't crash when getting unknown
  Operators and RNA properties, and display their buttons grayed
  out in that case.
2009-01-15 04:13:38 +00:00
6ab86a7572 2.5
Transform operator replay support for constraints.

Code isn't nice, will have to split some properties to separate what's part of the "saved data" from operator arguments.
2009-01-10 19:45:48 +00:00
3c2b772a23 2.5
Transform draw callback: constraints, snapping, prop circle
2009-01-10 18:33:16 +00:00
6bb75d2d19 2.5
Add notifiers to transform to insure all windows of the correct type are redrawn.
2009-01-07 16:52:18 +00:00
f7cb86df3a 2.5
Think global, act local!

The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.

Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
  meant for permanent, but it can probably stick there until we
  cleaned the anim system and depsgraph to cope better with
  timing issues.
- Game engine G.scene should become an argument for staring it.
  Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
  is too tightly wrapped to do it easily.
2009-01-04 14:14:06 +00:00
Nathan Letwory
610a56843e 2.5 / Nodes / Transformations
- after talking with Martin P (theeth), I have now shuffled code around
  so that there is no more exception code for nodes in the wrong places.
  This means node editor now also use entirely common translation.
  As proof of concept, there is now also resize and rotate support. It already
  works, but there need to be a bit more thought in how those
  actions are initialised for node editor. Probably some way to tell
  what to use as pivot point, etc.
2009-01-04 01:08:01 +00:00
ecc5f17e4d 2.5
Transform operator replay

Basic support working. Only saves mode and values, not constraint setup.

Removed event pointer from TransInfo (it's not available in operator exec). Replaced checks to event->modifiers to a functional modifier bitfield in TransInfo (that is, instead of checking for Shift, it checks for MOD_PRECISION) to make it remappable later.

Misc:
	X-Mirror for mesh now working with transform
2009-01-03 22:15:59 +00:00
38fcc20580 2.5 - Silenced various compiler warnings 2009-01-03 10:03:26 +00:00
Nathan Letwory
bdf6a002aa 2.5 / Nodes
* add Context accessor for selected nodes
* node translation uses transform code
* put transform defines in an enum (mode and numinput flags)
2009-01-02 23:58:03 +00:00
a6721c60d9 2.5
From the anti-globalization department: 
G.obedit terminated!

Wherever possible, use CTX_data_edit_object(C) to get this
now. It's stored in scene now, and the screen context has
it defined.
2009-01-02 19:10:35 +00:00
e2e282989e 2.5
- Put back vertex/edge/face select 
- Mode menu allows going in/out editmode

- Tested some tweak event stuff in WM, made tweak event follow
  user preset for 'action' or 'select' mouse.
  (Wanted to try this for transform, but better get advise from
  Martin first :)
2009-01-01 18:05:12 +00:00
c2de1373d1 2.5:
First commit for 2009!

Started of porting of Animation Editor Channels stuff.
This code will be used for both the Action and IPO editors, so any existing code involving this has now been moved to the Animation module.

* Added mouse-click operator for this channels view. Note: the selection stuff currently uses temporary toggling code only (i.e. it only toggles the selection of the channels in the editor, but does not update status of rest of database).
* Fixed bugs in View2D listview functions. Reduced the amount of code needed, and makes the code here simpler.
* Renamed action_edit_keyframes.c to action_edit.c, since channels are not handled there anymore.
* Dopesheet now refreshes correctly when object selection elsewhere changes.
2009-01-01 00:18:23 +00:00
c9b60a7b64 2.5
So, editmode mesh is back! :)
At the moment only TABkey works and mouse select, 1 vertex at a
time. More will follow of course.

Note for the devs:
- G.editMesh has been removed, be careful with old code.
- EditMesh now is property of Mesh itself
  Although it means unlimited editmodes, for migration purposes we
  better stick to 1 "obedit" per scene, which is in Context too
- G.obedit will get removed soon, so use CTX_data_edit_object(C)
  Or if you can't, just scene->obedit for now
- Also removed the CTX_data_edit_mesh(), this has no meaning 
  anymore. EditMesh is not context senstitive anymore, only the
  edit-object for time being is.
- Martin: I've already tucked some EditMesh pointer in T and
  removed all G.editMesh there.
2008-12-31 17:11:42 +00:00
2629095828 2.5 - Transform Code for Animation Editors (Part 1)
Remove context pointer from transform code. Solved the need for this by modifying the code that needed it.
2008-12-30 00:28:11 +00:00
34b53def70 2.5
Transform house cleaning. Gattering input methods in specialized code. It's not missing much before it can be used standalone (for example, to use the mouse to specify remove doubles threshold interactively).

Note to Aligorith: Transformations using INPUT_NONE (most Time* stuff) would use a cleanup.
2008-12-29 20:37:54 +00:00
a91e79ba70 2.5 - Action Editor Transforms now work again
Note: there were some crashes that would occur if context was not reset everytime the modal callback was run. Probably there's something about the context info we need to be more careful about.
2008-12-29 07:19:16 +00:00
d249110213 2.5 Transform - Resolving more warnings, etc 2008-12-29 06:22:45 +00:00
fc243ed361 2.5 Transform Code - Preparing for Action Editor Support
* Fixed up most of the relevant Fixme's for Action Editor and/or some animation stuff

* Added keymap for action editor transforms to transform keymap.

* Added context pointer to TransInfo struct. This was needed to avoid passing context to everything. As such, renamed the old 'context' setting to options.
2008-12-29 06:06:59 +00:00
c3ccc8a5ac 2.5
Widden some #if 0 to completely remove harmful code.
2008-12-29 04:23:41 +00:00
b6b61681ef 2.5
Transform:
First working port of the transform code:
- Object mode only (other conversions need to be ported)
- Contraints (global and local only) working
- Snap (no edit mode, obviously) working
- Numinput working
- Gears (Ctrl and Shift) working
- Only grap, rotate, scale, shear, warp and to sphere have been added as hotkey, but the rest should work too once accessible
- No manipulator
- No drawn feedback other than moving stuff and header print (no constraint line, snap circle, ...)
- No NDOF support

I've only tested Scons support, though Makefil *should* work, I *think*.

Misc:
-QuatIsNull function in arith
-Exporting project_* and view[line|ray] functions from view3d
2008-12-29 01:41:28 +00:00