Commit Graph

15037 Commits

Author SHA1 Message Date
Kent Mein
efe6acb58a Fix for makefiles (was missing rna include)
Kent
2008-12-23 15:53:46 +00:00
Andrea Weikert
7563e5e454 2.5 MSVC9 projectfiles
* update for editors/animation editors/space_outliner and editors/screen
* also fix compile error when INTERNATIONAL is set (will likely be solved with new font API)
2008-12-23 12:25:44 +00:00
Joshua Leung
00d2cf3ddb 2.5 Action Editor - Brought back Select All (AKEY)
Now, selecting keyframes with mouse behaves more like before.

Note: this still mostly uses old code, since other parts of code also call this. For later, it'd be nice to store as RNA prop, method of selecting.
2008-12-23 11:58:02 +00:00
Joshua Leung
67888ee34b 2.5 Action Editor Bugfix - Select keys now works
It is now possible to select individual keyframes again in the Action Editor.

* Temporarily disabled markers keymap in Action Editor, as it was stealing all the events. Waiting for solution from Ton...
* Fixed a crash and wrong coordinate conversion errors
2008-12-23 11:42:14 +00:00
Joshua Leung
87c05f7836 2.5 Action Editor - Big WIP Commit
* Brought back backend for editing keyframes IPO/IPO-Curves. Did some refactoring work here that will still have to be verified when operators using them are added.

* Animation channel filtering code now returns the number of channels filtered (for Action Editor to set totrect of channels - TODO still!)

* View2D - made function to check if mouse is in View2D scrollers an API function

* Renamed keyframe related files. The old names were too clumsy.

* Started porting click-select operators for Action Editor. These don't work currently, as the events are being stolen by the markers. This needs to be fixed ASAP.
2008-12-23 11:02:39 +00:00
Ton Roosendaal
58da63cd3e 2.5
View3D Numpad operator, by Michael Foxx. Yay!
Todo: use same call for view3d pulldown.
2008-12-23 09:59:02 +00:00
Brecht Van Lommel
76c035bd11 2.5: Data Context
* Worked out data context implementation more, now with initial context
  callbacks implemented for the screen and 3d view.
* For collections, switch from iterators to simpler ListBase. Though that still
  means it uses LinkData* rather than the actual Object* for example, since
  those can only be part of one list. So I added a macro as well to make
  iteration easier when possible.

CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
	printf("object name: %s\n", ob->id.name);
}
CTX_DATA_END;
2008-12-23 02:07:13 +00:00
Matt Ebb
8d6c2e6ec0 Initial commit working on an updated consistent colour scheme -
following these guidelines:
http://wiki.blender.org/index.php/BlenderDev/ColourMeaning
2008-12-23 02:03:08 +00:00
Brecht Van Lommel
cc9d3786f8 2.5: fix a crash switching to space types with old space data. 2008-12-23 01:08:02 +00:00
Joshua Leung
892be750e5 2.5 - Bugfixes
* View Pan Operator now stores area, etc. values from context in case user moves out of view
* Moved the invalid-context check for Action Editor so that mode can still be changed when there's no data to show.
2008-12-22 22:59:48 +00:00
Nathan Letwory
261d130872 * bring back some drawing code for node editor (grid, roundbox emboss) 2008-12-22 20:53:38 +00:00
Ton Roosendaal
3b0c42136b 2.5
Our precious outliner is back! :)
Currently no operations are active there, nor notifiers to refresh
other windows. Be patient!

You can switch to RNA with the 'view' menu. 
Later we'll sort out how much of both get integrated in 1 system, or
have both options, or make designated 'data view' for rna? ALso the
old Oops... bring back?
2008-12-22 19:31:23 +00:00
Ton Roosendaal
9e38e6aeb0 2.5
Better implementation of own window timers, not using ghost.
That makes blender's WM nice in control, and gives callers
of timers the opportunitie to evaluate time passed since
previous step. This system also only generates one timer 
event per main loop (events - handlers - notifiers - draw)

Small fix: allow keymap modifier to give KM_ANY to ignore
modifier keys, this to have TIMER keymap work.
2008-12-22 12:57:53 +00:00
Joshua Leung
5e443fd45d 2.5 - Commented out unused code in keyframing.c. This will be restored later. 2008-12-22 11:28:02 +00:00
Joshua Leung
fe29e6699c 2.5:
Brought back basics for Action Editor header. The contents of the menus have yet to come, but at least now the Action Editor 'looks' functional.

Fixed mistake in previous commit for TimeLine header (button collision).
2008-12-22 11:12:48 +00:00
Joshua Leung
cedb19ef3e 2.5 - Animation tweaks - bringing back more code
* Action Editor - IPO curve names are shown properly again. Added anim_ipo_utils.c (old editipo_lib.c) file back. This will need to be removed when I port IPO system to RNA.

* Keyframing code - uncommented more of the code that's now working

* Made the 'preview range' button on timeline header draw more clearly
2008-12-22 10:15:02 +00:00
Ton Roosendaal
bac4d10174 2.5
Small area/space api fix: space->new() callbacks now require
Context pointer. Too many cases you want to initialize stuff...

Also: added dummy draw function for NLA channel region, was
too ugly.
2008-12-22 10:09:56 +00:00
Andrea Weikert
fa12c089b1 2.5 MSVC9 projectfiles
* small update for anim_keyframes_draw.c and space_action/action_draw.c
2008-12-22 10:07:13 +00:00
Joshua Leung
2474329ba8 2.5 - Action Editor Bugfixes
* Restored y-position translations needed for gla-stuff, as gla stuff sets viewport + matrices!
* Fixed alpha-problems with icons. The ft-font drawing was turning off GL_BLEND when it was done, which screwed up the icon drawing (previous names were drawn with 'standard' fonts only)
* Removed Context arg from drawing funcs. Passing anim-context instead. 
* Properly initialised new theme settings ported over from animsys2.
2008-12-22 09:43:54 +00:00
Ton Roosendaal
42def9a351 2.5
Cleanup

- for portablity we can keep the old ugly defines for retrieving
  active object, cfra and so on. But, they will use 'scene' not
  G.scene.
- fixed code that uses those defines.
- some unused variables/functions removed
2008-12-22 09:43:29 +00:00
Ton Roosendaal
6d31872298 2.5
Removed unused variables and commented out unused function.
It's very helpful for code porting work to keep commits 
warning free! If you compile debug, also disable O2 to get
these warnings.
2008-12-22 09:10:02 +00:00
Joshua Leung
5959df8bf8 2.5 - Action Editor / Dopesheet
Initial commit of drawing code for Action Editor / Dopesheet. By default, the Dopesheet is now enabled (like in AnimSys2). There are still a few unresolved problems (like bad alpha blending for icons, and keyframes still not being drawn). However, these will be resolved in due course.
2008-12-22 08:13:25 +00:00
Matt Ebb
3c1204024b started some cleanups in button drawing code.
* Made normal 'rounded' theme use the same fake AA outline as round shaded
* Made rounded theme respect the 'button outline' theme colour - it never did before.
2008-12-22 06:55:24 +00:00
Matt Ebb
e898bcad79 * Fixed alignment in round shaded buttons 2008-12-22 05:51:34 +00:00
Joshua Leung
1c3e358fd8 View2D - View alignment flags are now taken into account in curRect_Validate()
Alignment flags are now checked for after keeptot settings, as these flags are of even greater importance. This is necessary for the syncing of the channels region and timeline areas in Action Editor (and later NLA Editor).
2008-12-22 00:11:33 +00:00
Joshua Leung
48a93c3ea6 2.5 - Bugfix for interactive slider in timeline not correctly updating view. Also, added note in playback code that it needs to use preview-range settings not global frame range (I'm leaving this as-is for now, since it's still likely to change). 2008-12-21 23:39:52 +00:00
Ton Roosendaal
f1e0cf36f8 2.5
Animated screen! (unfinished, now only draws, no animation code yet).
Fun though to see it all work. :)

NOTE: Mac ghost has timer bug, the GHOST_ProcessEvents() doesnt wake
up for timers.

NOTE2: Added while loop in wm_window_process_events() to force Ghost
giving all events to Blender. Timers otherwise don't accumulate...
might be needed to fix in ghost too.

I tend to think to code own timer, this ghost stuff is totally different
per platform.
2008-12-21 19:58:25 +00:00
Ton Roosendaal
05aa83ad1e 2.5
Enabled cool hidden feature from Brecht: "interactive" mode for buttons,
which executes button handling on each change.
Try sliding the current frame, or even: type in values there! Cooool! :)
2008-12-21 17:44:27 +00:00
Ton Roosendaal
4bb20689c5 2.5
Added 'header print' feature back.

ED_area_headerprint(ScrArea *sa, const char *str);

Give it a NULL string to disable the feature.
On each call it tags the header for redraw.
2008-12-21 17:18:36 +00:00
Ton Roosendaal
eb8e220f26 2.5
- Added default Circle 'gesture' operator callbacks.
  As test, added in view3d window as Ckey, paint over object centers.
- Fixed notifier for gesture, to only cause redraws in own region.
2008-12-21 16:24:19 +00:00
Andrea Weikert
bdb3e2eb2b 2.5 MSVC9 projectfiles
* update for view3d_draw and view3d_select
* update for bpy_operator
2008-12-21 16:20:28 +00:00
Ton Roosendaal
c694c8f39e 2.5
- Bugfix: loading files should close running handlers and subwindows, gave
  memory leaks that way.
- Bugfix: space image copy function didn't do curvemap
- Cleanup: moved view operators from view3d_select to view3d_view
2008-12-21 12:43:34 +00:00
Campbell Barton
b163840dfb Adding back python 3.0 calls, they didn't build with py2.x because I missed including bpy_compat.h, tested building with 2.6 2008-12-21 12:40:02 +00:00
Joshua Leung
ad4d061091 View2D - Vertical (within area) syncing for channel lists to stay in sync with the relevant keyframes...
I still need to work out how to get this to work correctly as soon as an Action Editor instance is created.
2008-12-21 11:56:42 +00:00
Ton Roosendaal
841f376a1c 2.5
- View3D: added ALT+B clipping operator. Note this needs a call to
  the new function view3d_operator_needs_opengl(C) to ensure you 
  can use opengl functions. Event handling by default doesn't set
  opengl per subwindow, it's also forbidden to draw then!

  We might consider to tag operators that need opengl...

- Forgot to include creator.c fix for loading builtin vector font
2008-12-21 11:05:43 +00:00
Ton Roosendaal
f44d8c2780 2.5
New Python code: Fixes for Makefile and compat hacks for py 2.3 
Campbell should check though!
2008-12-21 10:56:14 +00:00
Joshua Leung
db77f6abd7 2.5 - Ported new-style 'sphere' drawtype for empties from animsys2. This draws in a much simpler/cleaner way, with only 3 disks, which should help distinguish it from standard geometry. 2008-12-21 10:52:57 +00:00
Joshua Leung
170b748c81 2.5 - Compiling 'hacks' for py
* Unicode calls in bpy_idprop.c were causing linking errors here. Probably Py-libs for windows would need recompiling with unicode before we can enable this. For now, commented out the offending calls.
2008-12-21 10:36:29 +00:00
Joshua Leung
3eaca525f2 2.5 - Object name display in 3d-view now highlights on frames with keyframes again.
* Re-exposed relevant parts of anim_keyframing.c code that doesn't have external dependencies. 
* Added get_active_posechannel() to blenkernel api for poses/posechannels to solve the only missing link I found. This should have been moved there ages ago!
2008-12-21 10:33:24 +00:00
Ton Roosendaal
c288eab363 2.5
Brought back WIN32 hack to disable glScissor before swapbuffer.
Joshua was reporting swapbuffer glitches...
2008-12-21 09:58:32 +00:00
Campbell Barton
4a86a07f8a wip operator py-api
"operator.ED_VIEW3D_OT_viewhome(center=1)" calls the operator, converting keyword args to properties.
Need a way to run scripts in the UI for useful testing.

Still need to deal with operator exceptions and verifying args against operator options. 

Added temporary WM_operatortype_first() to allow python to return a list if available operators, can replace this with something better later (operator iterator?)
2008-12-21 08:53:36 +00:00
Joshua Leung
449e7777f7 2.5 - Restored Preview Range tools
Set and Clear Preview Range (Ctrl P and Alt P respectively) now work again for all Animation Editors.
2008-12-21 08:45:13 +00:00
Joshua Leung
df274a8b58 2.5 - Time operations to Animation Module
Moved time_ops.c contents to anim_ops.c, as the operators there are applicable to all other Animation Editors too. anim_ops.c will therefore contain all operators which will apply to all Animation Editors (i.e. change frame, frames/seconds display toggle, and soon Preview Range tools).

As such, added new global 'Animation' keymap like for View2D and Markers, which will ensure that these tools can be accessed in an uniform way across editors. 
Note that the order that these things are added is important, as the Animation ones will often 'steal' events from the View2D and Markers ones if placed before the others. To prevent that, we'd need to be able to set boundboxes here...
2008-12-21 08:02:24 +00:00
Joshua Leung
e2cca3320a 2.5 - Animation Editors - Filtering API
Brought back the Filtering API for Animation Editors. This is the 'backbone' of the current Action/Dopesheet Editor code, so it is essential to have this working.
2008-12-21 04:11:19 +00:00
Campbell Barton
62f4d2884c incorrect spelling 2008-12-21 03:43:01 +00:00
Joshua Leung
12439031c9 2.5 - Animation Editors - common drawing stuff
* Fixed current frame number drawing in Animation Editors, so that the little frame number indicator box gets shown (animsys2 feature).

* Made all Animation Editors draw markers and preview range
2008-12-21 03:14:01 +00:00
Ton Roosendaal
4d2ae9431b 2.5
View3D: ported selection code, another 2000 lines :)
Border select (BKEY) in 3d window now works. For lasso
and circle I have to add WM support still.
2008-12-20 18:43:21 +00:00
Ton Roosendaal
1550573360 2.5
- View3D: selecting added. Note it nicely respects user preset, by using
  the keymap define SELECTMOUSE.
- Added missing initialize of default vector font, so text draws.
2008-12-20 15:42:48 +00:00
Brecht Van Lommel
08db8198c4 2.5:
- fix crash opening submenus
- fix disappearing main menu when going into submenu
2008-12-20 14:15:58 +00:00
Ton Roosendaal
5f7ad70811 2.5
Put back armature drawing code.
The BIF_editarmature.h is a placeholder... need it to get it work.
2008-12-20 13:29:35 +00:00