This is work-in-progress patching support for converting animation saved in old system to work in the new one.
* Only IPOs/Actions directly attached to Objects + Shapekeys are converted for now. More types will follow...
* This is currently done as a step outside of do_versions() due to problems with various pointers not having been resolved yet, but which are necessary for correct resolution of issues such as drivers... However, the current code does illustrate how the data should be converted to give best results/compat between the two systems.
* Still need to get the converted data working with depsgraph correctly. Currently, some of my testfiles work, but the BBB files still don't.
cleaned up selection code
new operators:
- highlight file under cursor
- select all/nothing (AKEY)
- border select (BKEY)
changed selection to be invoked by LEFTMOUSE
can transform the strips or move their handles
Still todo, click-drag transform, metastrips support, snapping, markers overlap checks and constrain to valid channels.
Added missing 'break;' 's skipped during the sprint towards the "first working prototype" stage. The temporary Insert Keyframe operator should now work correctly for rotation/scaling keys now by not adding extra keys.
* Drawing code from wm_event_system.c split into separate wm_draw.c file.
Now there's 3 different draw methods implemented, not sure what survives
or will be added but is useful for debugging.
* Draw All: redraws everything each time, for reference.
* Draw Overlap All: what the code did before this commit, only draw
regions marked for redraw, and anything that overlaps them.
* Triple Buffer: copies/retores all area regions into a texture, and
blits that before drawing. Menus, brushes, gestures, etc are redrawn
always on top of that.
Currently "Draw Overlap All" is set hardcoded to be used still. Triple
Buffer code is not complete, it doesn't handle window resize yet. Cards
that don't support non power of two textures can need quite large
textures as well, this could be split into multiple smaller ones.
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()
Couldn't leave to finish this; four-split 3d view now
syncs the ortho views to a box-view. Brings back good
old Amiga Sculpt4D feeling! :) What's not done is to
use the box to clip away invisible stuff.
Note that it still allows to switch top-bottom,
left-right or front-back. The 4th window is entirely
free.
Test: use shift+alt+ctrl+S. In due time will all go
the headermenu, configurable, of course.
* Added back Auto Preview-Range tool (i.e. set preview-range from keyframe extents)
* Restored delete keyframe tool. For now, this doesn't delete empty F-Curves, even though its keyframe-api counterpart still does. I still need to figure out how to do this in the best way.
* Fixed crashes when selecting keyframes in 'object' summary channels
* Removed prototypes for a few unused/depreceated functions...
- Previewrender code back, commented out a lot of bad cruft,
nothing works or is linked even!
- Added NC_GROUP notifier type, used in editgroup.c and
listened to in 3dview and outliner
* Streamlined the filtering code to remove a few redundant options, which required tweaking the code for most tools
* F-Curves are simply displayed using their full paths right now. This should eventually be the UI-string stored in RNA, but right now there are still a few missing things.
* There are a few tools which are not available yet which were available in 2.5 before Animato was added:
- Copy/Paste
- Rearrange channels
Also, the DopeSheet is not totally functional (in terms of displaying animation data for sub-object data yet). That will be added tomorrow.
* Added 'Action Group' pointer to F-Curves, as it will be handy for allowing Bone channels to still remain grouped as they were before with the Action Channels. However, reintroducing such a structure to the data-storage is not anticipated...
*****
- made Group operators more atomic, no menus, able to build on top of each other
- add/remove selected from group will be done later
- new notifier is needed, ton will code
- Group Create adds the object to the new group, and a string can be passed to it toi make a custum named group from Py, etc
-keymaps remains the same (ctrl-g, create group - alt-ctrl-g, remove object from all groups)
- Added 2 more operators , GROUP_OT_objects_remove_active (alt-shift-g) , GROUP_OT_objects_add_active (ctrl-shift-g)
- adds/removes object from groups that are attached to the active object
******
- Ported , add selected to group (Ctrl-G), remove selected from group(Alt-Ctrl-G)
- add selected now has a add new entry which will put the object into a new group
- remove selected now has an ALL option which removes the object from all groups
- remove code is currently very messy, this will have to do until a better solution arrises, menus return strings instead of numbers perhaps
- add/remove to/from group of active object still need to be done
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
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.
* Reorganised all animation-related file-writing code to be in the same area in the code, and clearly marked which parts of code are only used to ensure we can load old files to version-patch.
* Added file reading code for new datatypes, so it is possible to load the quit.blend file saved from the previous session. Version patching to work with the new system has yet to be done...
* Assorted whitespace fixes in places I skimmed through...
* slightly improved drawing code
* temporarily added creation of thumbnails within thread in the background until thread job manager is available in WM.
* fixed missing icons in thumbnail view
Python operator api was using WM_operator_name_call() which was confusing things too much.
Added WM_operator_call_py() which ended up being a very small function and split out operator creation into wm_operator_create()
Python operator now runs the poll() function and raises an error if it fails.
Eventually there should be error messages for poll that python can use to give the exact reason for failing (eg - library linked data, no active object...)
* Removed nAction struct. We'll be using good ol' bAction structs again, but putting new data in a different list. Apart from that, the data is similar enough to do so.
* Rearranged code in DNA_action_types.h while renaming the structs to avoid confusion over what is currently in use...
* Added freeing and AnimData execution loops for many other ID-types too. (NOTE: I've added AnimData in NodeTree struct too, but it's not clear to me where the relevant data-management calls should go in Nodes code).
* File writing code should now only write the new data to files
(when in debug "-d" mode only)
copy & paste duplicate and transform operations can now be copied from user input and pasted into ./test.py and run with the Pkey (fixed some minor bugs preventing this)
Would be nice if the "mode" setting used a proper RNA Enum rather then an int.
# example, duplicate and transform
bpyoperator.OBJECT_OT_add_duplicate(mode=1)
bpyoperator.TFM_OT_transform(mode=1, options=0, values=(-1.23989, 0.570745, 0, 0), constraint_orientation=0, constraint_mode=0, constraint_matrix=(0, 0, 0, 0, 0, 0, 0, 0, 0))
******
-ported some of the Object mode select menu to use uiDefMenuButO
- select random/layer still uses the hard coded value as no sutible popup exists
- select by type suffers from random crashes, somthing to do with Context
- need some way of doing sub menu's using the operator's invoke
- the old menu is just #if'ed out
- and did a little hous cleaning aswel
- added some undo pushes to the select operators