* F-Modifier UI drawing/handling is now defined in a separate file so that it will be more suitable for inclusion into the NLA Editor's buttons.
* Started removing F-Curve dependence from the modifier drawing code, which wasn't strictly necessary
* Fixed F-Curve RNA wrapping to correctly use FPoints instead of the bulkier BPoints. Although nobody was likely to have encountered bugs here yet, this would almost certainly have contributed to some segfaults/data corruption along the track.
When auto-keying is enabled, the insertion mode is no-longer blank. The version patching code now takes this into account, but the conversion doesn't work for existing .b25.blend defaults files though.
Started cleaning up FModifiers in preparation for allowing them to be used on NLA Strips.
This commit separates the 'Built-in Function' mode for the Generator modifier out into its own modifier, since it was being quite frequently used (and the RNA wrapping for this used to be quite hackish).
BACKWARDS COMPATABILITY WARNING:
Old files with FModifiers saved (i.e. old 2.5 files, but not any others) will not load correctly as a result of these changes (the wrong modifiers will be shown). I've decided that there are not likely to be many files affected by this yet, but doing this will result in a much nicer modifiers-define list in the long run.
For now, some of these polls may be a bit too restrictive, but at least we have some unified+cleaned bases to work from now (instead of relying on the generic ED_operator_area_active).
While trying to fix the mapping conversions for repeat, I came across some limitations with the current (soon to be previous) mapping methods.
Now the mapping conversions should work nicely for all places that use them.
Improved sculpting in perspective mode; starting a stroke on the background would sometimes result in the brush having a huge effect on the mesh. Fixed by waiting to start the stroke until the mouse moves over the model.
The fix is not quite perfect, because detection of the edge of the model is based on the depth buffer, so other things that change the depth buffer, like the grid and axis lines in the 3d view, can throw off the calculation.
Removed a bunch of old code that was #ifdef'd out. Mostly relates to partial visibility and partial redraw. Both of these are important features, but need better design updated for 2.5.
Also removed the old (huge/ugly!) sculpt() function that is now handled by the stroke operator code.
Two bugfixes:
- When making 2d windows small (zero sized) the view2d data could get
corrupted with NaN values. Clipped values correctly to 1.
- Search menu (ctrl+alt+f) had wrong color for selected text in text
button
* Adding/removing particle systems to an object.
* Changing of particle settings.
* Currently showing an object's particle systems in a list (like materials).
* Based on what happens during simulation the cache is marked (also in cache panel, this could possibly be extended to 3d view as well) as:
- exact (not marked)
- outdated (simulation is not done completely with current settings)
- non-exact (frames were skipped during simulation)
* The parameter "cache step" effects the number of frames between saved cache frames.
- This can save a lot of memory (or disk space) if absolutely frame accurate simulation is not required.
- Speeds up the "quick caching" very much.
- Frames between cached frames are interpolated from the cached frames.
- Current default value of 10 frames works nicely with up/down-arrows (skip 10 frames forwards/backwards on timeline), but can be changed if wanted.
* The caching can work in normal or "quick" mode:
[Normal cache]
- Basic: Calculate what even happens (settings change, big frame steps etc.) and cache results, if possible try to use "cache step" when saving cache frames.
- Becomes non-exact: After larger than 1 frame steps.
- Becomes outdated: After any change effecting the simulation other than frame steps.
- Pros/cons: Freedom of doing anything and playing with particles, but exact results have to calculated from the beginning.
[Quick cache]
- Basic: Calculate simulation up to current frame automatically on changes with cache step sized jumps in simulation. With multiple "quick cached" simulations the smallest cache step is used.
- Becomes non-exact: Always from frame 1 (unless cache step = 1).
- Becomes outdated: Never.
- Pros/cons: Not very accurate, but super fast!
- Todo: Transform of any animated (non-autokeyed) object is locked! Probably needs some tinkering with anim sys overrides.
* The simulation can be run forwards or backwards even if it's cache is outdated or non-exact, the following rules apply in these situations:
- step forwards (to unknown) -> simulate from last exact frame, store result
- step backwards (to known) -> result is interpolated from existing frames, store result, clear cache forwards if current frame is after last exact frame
* "Calculate to current frame" runs the simulation from start to current frame with a frame steps of 1.
- Baking does the same, but runs the simulation all the way to the end of simulation.
- Rendering does this automatically if the simulation is outdated of non-exact, so all rendered simulations will always be updated and exact.
* Every cache panel also holds buttons to "Bake all dynamics", "Free all dynamics" and "Update all dynamics to current frame".
* Cloth simulation supports the new cache too.
Test commit; toolbar has 'add operator' menu in mesh editmode.
Nothing stored, freed here...
Also: removed reading .B.blend, since a much better default has
been compiled in now, prevents confusing testers who run 2.5
for the first time. :) Of course .B25.blend still works.
These operators may be temporary only, depending on if a workable solution via transform is found.
* PageUp moves strips into the track above if there's space
* PageDown moves strips into the track below if there's space
* Also fixed a button-alignment bug in the DopeSheet header
* Strip evaluation now takes into account repeats
* Increasing the number of repeats lengthens the strip, while decreasing the number of repeats does the opposite.
TODO:
- inverse correction doesn't take into account repeats != 1, so tweaking strips with repeats is currently not recommended!
* Search popup + autocomplete for bones, vertex groups, etc. This
is done with layout.item_pointerR, specifying an RNA collection to
take the items from. Used by constraints and modifiers.
* Some tests with the List template, ignore those for now..
* Added support for passing collections to/from RNA functions,
this is done using a ListBase of CollectionPointerLink, which
is a standard ListBase link + PointerRNA.
* Added editable active uv/vcol layer to Mesh.
* Armature.bones now includes all bones, not only the ones without
parents.
* Modifier UV layer fields now are allowed to be empty, previously
this would set the name during modifier evaluation if there was
none.
Part one (of probably many :) of Operator review/validation.
Nothing final nor defined, it's reseach :)
- Added tool buttons in "Toolbar" (Tkey). Just four examples
for objectmode, and six for mesh editmode.
(Review in progress is operator internal state vs context, what
do redo exactly, undo vs redo syncing, when op->invoke or not,
etc. This has to be pinned down exactly and frozen asap)
- On undo, clear redo-operator-stack for now (won't work)
- Added call to better detect active/current view3d region.
ED_view3d_context_rv3d(C)
- Fixed some operators that missed correct redo (add-prim etc).
Later more fun!
Rendering preview icons is back!
Note for Andrea: the render code has been decoupled from
drawing, it needs Scene context to be able to run...
At the moment only the search menu calls the new render
code (which is the ID browse menu default anyway)
* Compiling broke for some users on this file due to my scaling-fixes commit. Dunno why this didn't give any errors here (silly compiler!)
* Restored code to make ghost poses (and supposedly paths) work again. This doesn't totally seem to be the case yet though.
* all mathutils types now have optional callbacks
* PyRNA returns mathutils quat and euler types automatically when they have the rotation subtype.
* PyRNA, reuse the BPy_StructRNA PyObject rather name making a new one for each function returned.
* use more arithb.c functions for Mathutils quaternion type (less inline cruft).
* BGE Mathutils integration mostly finished- KX_PyMath now converts to Mathutils types rather then lists.
* make all mathutils types share the same header so they can share a number of functions - dealloc, getWrapped, getOwner.
Pointer for accessing settings of active NLA-strip was not getting set. The code for this was accidentally removed during an earlier commit to clean up the poll callbacks here.
check Save Image or Export PLY operator for example.
Also these code changes:
* Added some RNA collection iterator macros to simplify code.
* Fix bpy.props.BoolProperty not working correct.
* Merge uiDefAutoButsRNA/uiDefAutoButsRNA_single into one.
- Added ND_SHADING notifier on linking materials, so it gives
refreshes in UI
- Removed reduntant debug prints
Crucial fixes in other code while checking warnings;
- Particle buttons were assigned to short, whilst data was int
- Filesel border select used float rect API, on an int rect.
* Added SCROLL button type, use like a NUMSLI basically, with
a1 used to define the scroller size.
* Add scroll and toggle colors to the Theme (toggle was set to
draw like radio in a recent commit, but it's the intention
these look different).
* Added rudimentary list template, used for object material
slots, this is WIP though.
* In popup menu, split text with line breaks over multiple
lines, makes python errors display slightly nicer.
* RNA_struct_name_get_alloc function to get the name from a
pointer, instead of having to deal with name property.
* CTX_data_pointer_get_type to get data from context with
a check for the RNA type.
Medium sized Color Picker; consisting of number sliders, row buttons to
select rgb/hsv/hex, HS circle and V slider. It opens persistant, like
old picker.
This one opens default, other two can be accessed with ALT or SHIFT click.
On todo;
- eyedropper tool back
- method for click-drag to make mini picker appear
Note for UI coders (brecht :), added a UI_HIDDEN flag in buttons, to
support switching buttons in menus. Hidden buttons are not activated nor
drawn.
These two operators work only on Action-Clip strips.
* Clear (Alt-S) resets the scale of selected strips to 1.0
* Apply (Ctrl-A) applies the scale of the selected strips to their referenced Actions. If this referenced Action is also used by several other strips, a copy of the Action is made, and the scaling is applied to that Action instead.