Commit Graph

13994 Commits

Author SHA1 Message Date
Joshua Leung b47605d841 NLA SoC: Separating F-Modifier UI drawing into its own file
* 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.
2009-07-02 04:47:36 +00:00
Joshua Leung 3373850e95 NLA SoC: Bugfix for Auto-Keyframing version patching
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.
2009-07-02 03:50:20 +00:00
Joshua Leung b1a106dd49 NLA SoC: Merge from 2.5
21210 to 21300

Note to self: the next merge will be messy again, since 2 commits occurred this one was complete
2009-07-02 03:32:57 +00:00
Joshua Leung 1588de008a NLA SoC: Separated 'Built-In Function Generator' FModifier into a separate FModifier
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.
2009-07-02 02:12:37 +00:00
Joshua Leung ede921fdfa NLA SoC: Proper poll callbacks for Graph Editor
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).
2009-07-02 01:01:18 +00:00
Joshua Leung 66c8627820 NLA SoC: Renamed a few options for the Mirror operators since their purpose wasn't clear (in practice) 2009-07-01 01:17:58 +00:00
Joshua Leung 2c3e8850a5 NLA SoC: Insert Keyframe Operator Tweaks (Anim Editor Versions)
* Insert Keyframe (IKEY) operator for Graph Editor 
* Renamed the DopeSheet version to make it more consistent with the other keyframing operators
2009-06-29 03:02:41 +00:00
Joshua Leung 26c7c01c32 NLA SoC: Lines are now drawn on action-clip strips for indicating the timing of repeats 2009-06-29 01:00:35 +00:00
Joshua Leung aa4ed13e4a NLA SoC: NLA Mapping Cleanup
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.
2009-06-28 07:32:00 +00:00
Joshua Leung 500507ddb1 NLA SoC: Merge from 2.5 - 21179 to 21209 2009-06-28 03:26:10 +00:00
Joshua Leung 61e30f0f00 NLA SoC: Renamed NLA-Editor operators to be more in line with those in other editors 2009-06-28 03:13:01 +00:00
Nicholas Bishop 67073db49c 2.5/Sculpt:
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.
2009-06-27 21:14:04 +00:00
Nicholas Bishop b097f7250d 2.5/Sculpt:
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.
2009-06-27 17:10:19 +00:00
Ton Roosendaal c79e57dba8 2.5
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
2009-06-27 16:35:42 +00:00
Janne Karhu 7b547f7ce7 Particle ID block controls:
* Adding/removing particle systems to an object.
* Changing of particle settings.
* Currently showing an object's particle systems in a list (like materials).
2009-06-27 15:41:47 +00:00
Janne Karhu 912c2f440b Pointcache refresh part 2
* 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.
2009-06-27 15:28:58 +00:00
Ton Roosendaal 9becf3c310 2.5
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.
2009-06-27 15:21:37 +00:00
Brecht Van Lommel c9513df561 UI:
* Fix issue with icon not being left-aligned in text field.
* Put modifier tab after data tab in buttons header.
2009-06-27 14:35:24 +00:00
Brecht Van Lommel 1d135cb955 RNA: move softbody flags from Object to SoftBodySettings. 2009-06-27 14:02:21 +00:00
Thomas Dinges ce15921a68 2.5 RNA:
* Added more softbody properties (collision, solver) and some flags in object RNA.
2009-06-27 13:20:19 +00:00
Ton Roosendaal 5d6801a472 2.5
Mesh editmode fix: Add new primitive often was on wrong location.
Viva Vazquez testing! :)
2009-06-27 13:10:18 +00:00
Joshua Leung bc0cd9607e NLA SoC: Move Strips Up/Down Operators
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
2009-06-27 13:00:22 +00:00
Ton Roosendaal d55b460419 2.5
Bugreport; on dragging area edges, the mouse-release event was 
swallowed by the panel animation handler. Thanks Pablo Vazquez 
for report. :)
2009-06-27 12:41:28 +00:00
Joshua Leung d3557fc487 NLA SoC: Recoded the strip<->global time conversion code
* 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!
2009-06-27 12:35:11 +00:00
Thomas Dinges 5d6ef223fb 2.5 RNA:
* Started Wrapping softbody RNA.
2009-06-27 11:57:50 +00:00
Joshua Leung f508319fc8 NLA SoC: Apply-Scale Operator now recalculates action length after scale is applied 2009-06-27 04:56:20 +00:00
Joshua Leung bbf793472e NLA SoC: Merge from 2.5 - 21146 to 21178 2009-06-27 03:19:55 +00:00
Brecht Van Lommel 222fe6b1a5 UI
* 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..
2009-06-27 01:15:31 +00:00
Brecht Van Lommel d839a9ae9c RNA
* 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.
2009-06-27 01:10:39 +00:00
Joshua Leung 13d18c5f77 NLA SoC: Theme colours in old defaults files for NLA now get replaced with the nice new colours 2009-06-27 00:40:25 +00:00
Ton Roosendaal 524b861437 2.5
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!
2009-06-26 15:48:09 +00:00
Ton Roosendaal 07e9c4ef2b 2.5
Makes toolbar region in 3d editor work correctly overlapping, also
when area is subdivided in 4-split, and/or with properties region.
2009-06-26 12:55:46 +00:00
Campbell Barton 4b914c7f75 Made Mathutils use radians rather then degrees. defining USE_MATHUTILS_DEG for testing existing scripts.
Added conversion for BGE Quaternion WXYZ (Blender/C) -> XYZW (Moto C++).
BGE Python API now uses WXYZ following mathutils (break script warning).
2009-06-25 20:47:41 +00:00
Ton Roosendaal 47ca543b32 2.5
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)
2009-06-25 15:41:27 +00:00
Joshua Leung 6510da4ce2 NLA SoC: Fix transforms for transition strips. 2009-06-25 12:30:49 +00:00
Joshua Leung deffe4a315 NLA SoC: Armature Drawing Code Fixes
* 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.
2009-06-25 10:52:09 +00:00
Campbell Barton d428ba1de8 PyAPI RNA/BGE
* 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.
2009-06-25 10:11:37 +00:00
Joshua Leung a50be876d3 NLA SoC: Quick crash fix
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.
2009-06-25 05:05:35 +00:00
Joshua Leung a1c5c501a6 At last... this merge should finally do the trick!
21073 to 21145
2009-06-25 04:33:21 +00:00
Brecht Van Lommel 7a357cba39 2.5: File Selector: display operator properties in the side region,
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.
2009-06-24 21:27:10 +00:00
Brecht Van Lommel 169fdf9e97 2.5: bug fixes for some erratice materials buttons drawing. 2009-06-24 18:39:00 +00:00
Ton Roosendaal b6241e7b7c 2.5
Bugfix: added refresh for modifiers for enable/disable
2009-06-24 17:57:10 +00:00
Ton Roosendaal ee9c260c38 2.5
- 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.
2009-06-24 17:22:22 +00:00
Ton Roosendaal 627abe0acf 2.5
Added support for icons in search menu.
It already displays icons for saved materials etc. from old files.
Have to add previewrenders for this still.
2009-06-24 16:44:54 +00:00
Brecht Van Lommel 5b26f520bb UI
* 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.
2009-06-24 14:16:56 +00:00
Brecht Van Lommel a379fdd7fb 2.5: Object material slot operators add/remove/assign/select/deselect. 2009-06-24 14:07:48 +00:00
Brecht Van Lommel 242d9c31d3 RNA
* 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.
2009-06-24 14:03:55 +00:00
Ton Roosendaal 9abce5dfba 2.5
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.
2009-06-24 13:44:19 +00:00
Joshua Leung e5f6a41b1b NLA SoC: Scale Operators - Clear (Alt-S) and Apply (Ctrl-A)
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.
2009-06-24 12:50:20 +00:00
Joshua Leung 3533cda80c NLA SoC: Delete Tracks Operator (XKEY / DELKEY) over the channel list
This deletes all the strips in the relevant (selected) tracks too.
2009-06-24 12:12:11 +00:00