Commit Graph

16474 Commits

Author SHA1 Message Date
Ton Roosendaal 6124933781 2.5
Nicer implementation of blurred font draw, moved to blenfont
module. Set it with BLF_blur(value). Current kernels implemented
are 3 and 5 only. Blenfont module can extend this once.
2009-04-10 14:27:29 +00:00
Ton Roosendaal d2cc19dcc6 2.5
More font style work;

- hooked up almost all ui buttons code to new font
  system, including text clipping
- panel headers scale now too to smaller fonts
- added further style hints, for shadow/emboss. Is all going to
  be in UI designer control!
- for fun; changed layout engine to spread vertical buttons in
  window width

Next: removal of all usage of old font system, using 'styles'.
Will also move font blurring to blenfont module.
2009-04-10 14:06:24 +00:00
Joshua Leung a4c4ee2f99 2.5 Drivers - Widget Colours
* Widgets now get coloured when driven. The colour used is debatable, but I've just set it to a purplish colour so that it's easy to distinguish from animated/keyframes/highlight colours.

* New drivers are given generator F-Curve modifiers by default so that they at least show up in the view.
2009-04-10 13:16:50 +00:00
Joshua Leung 6593bbaca2 2.5 - Groundwork for Adding/Removing Drivers
Drivers can now be Added/Removed from buttons using the D/Alt-D hotkeys, and also through the menu. Driver settings (i.e. the target) are not set by default. To set those, go to the Graph Editor (see notes).

Notes:
* Buildsystem maintainers - I've added a new file "editors/animation/drivers.c"
* Widget colours for the driven-setting indications are needed 
* To see the new drivers, go into Graph Editor -> "Drivers" mode. Currently, there's a little bug there which prevents editing of the new drivers.
2009-04-10 13:08:12 +00:00
Joshua Leung be8b7ead51 Action Editor - Part 2 of Code Cleanups
Nothing much to see here... there's still a few things to recode a bit nicer...
2009-04-10 12:06:31 +00:00
Joshua Leung 487561882d Animation Editors - Part 1 of Code Cleanups
* Fixed a few typos in the code
* Switched the meaning of the Ctrl and Alt modifiers when selecting keyframes. 
- Ctrl is now select all keyframes on one side of time cursor
- Alt is now select all keyframes at same time as a particular keyframe. 

TODO:
While testing these changes, I've found that this column-select is not working yet as the tolerances are too low. This will be rectified soon.
2009-04-10 03:34:20 +00:00
Elia Sarti 92e17f1fa9 2.5 / RNA
DNA_texture_types almost finished, missing still plugin type.
I noticed many texture share the same noise settings maybe this can be grouped into a common function.
Also testing out first commit.
2009-04-09 20:33:39 +00:00
Ton Roosendaal 79c30a0752 2.5
WIP commit for UI drawing.

- Hooked up Diego's new Font API
- Added Style definitions for fonts, currently it uses
  a different font for panel titles to show it.
- Styles are in Userdef now too, still not finished 
- Userdef "DPI" will offer global control over font size,
  to match monitor size/resolution. It's meant to scale
  widgets and headers too btw, later.
- Lots of code removed for old fonts, but that's unfinished.

On todo: too much to mention, will continue happily tomorrow!
2009-04-09 18:11:18 +00:00
Campbell Barton 46d8c1ebc7 talked to vekoon and he's ok about using pythons CFunction rather then our own pytype.
If printing PyTypes becomes important we can do it a different way which is still less then 10 lines.
2009-04-09 17:31:23 +00:00
Campbell Barton bca1ca9d1e Added rna functions so they get included in a dir(rna_struct) from python.
Added a check that a panel panel is a subclass of bpy.types.Panel (need a better way to access this type)
2009-04-09 16:52:18 +00:00
Brecht Van Lommel 26568d0303 RNA: makefiles aren't working correct on Mac currently,
temporary workaround.
2009-04-09 13:32:14 +00:00
Campbell Barton 9196d88242 Experimental removal of pyrna_func_Type (ifdef'd out)
Since adding a new type gives quite a lot of extra boiler plate functions.

Return PyCFunction's main disadvantage is it does not have a uniqie name when you print it.
2009-04-09 13:20:48 +00:00
Joshua Leung 84f3e7d94d 2.5 Bugfix: Trying to insert/delete keyframes on old-style buttons would crash
Fixed the problems with using uninitialised vars in the calls for inserting keyframes from buttons. Oldstyle buttons (i.e. those without any RNA links, such as the 3D-View header buttons) would crash otherwise.
2009-04-09 11:36:12 +00:00
Joshua Leung a59ee83916 Animation Editors - Bugfixes:
* Collapse selected channels should now work for most channels. It still doesn't work for Action Groups for some reason...
* Objects are now deemed to only be selected in Animation Editors if the are selected (i.e. if they are active but not selected, they are no longer considered to be selected)
* Outliner updates when scrubbing the TimeLine. As a consequence, anim playback with an Outliner open is a bit slower now.
2009-04-09 07:26:49 +00:00
Brecht Van Lommel 41b8259580 2.5: clipboard fix to only do the conversion to \r\n line endings on windows. 2009-04-08 18:48:17 +00:00
Brecht Van Lommel 25d0720dc4 2.5:
* Fix to make python panels callbacks get the actual
  blender Panel as an argument, instead of any instance.
* Fix for callback validation in python 2.5, worked OK
  in python 3.0 but gave error in 2.5 because it's a
  method instead of a function there.
2009-04-08 18:45:41 +00:00
Ton Roosendaal d979085614 2.5
- Updated panel tabbing code to at least make it work again
- And some more minor UI tweaks
2009-04-08 16:51:35 +00:00
Brecht Van Lommel 9b3b52dfd6 RNA:
* Added the build system code to compile files named
  editors/*/*_api.c into the makesrna preprocessing.

  The reason to do this is to keep operators and API
  close together, but it doesn't fit well with the build
  system, especially Makefiles use an ugly hack here.

* Some fixes to pass an RNA AnyType through the API,
  this will give a PointerRNA, for use in the interface
  code for example.

* Added RNA wrapping of some UI template code as a test.
2009-04-08 16:40:46 +00:00
Joshua Leung 4b2072bec3 Animation Editors: Restored operators to expand and collapse channels
There are two operators: one for expanding channels and one for collapsing them. These operators each have a property, "All", which specifies if they should expand/collapse all channels regardless of selection.

TODO:
* A few of the sub-object channel types still needs to be supported by this.
2009-04-08 12:35:38 +00:00
Joshua Leung 0f4a07afb9 Builtin KeyingSets Bugfix:
* Builtin KeyingSet for Scale works now. Was using the wrong RNA-paths
* Added LocRotScale builtin KeyingSet
2009-04-08 12:01:23 +00:00
Joshua Leung ad2c860baf Graph Editor: 'Ghost Curves' functionality from Apricot
This feature takes a 'snapshot' of the visible+selected F-Curves, and displays these in the background as 'ghosts curves' in the background. Such curves are drawn semi-transparent, slightly darker, and with dotted lines. 

To use, simply click the 'curve' button beside the Auto-Snapping selector. To clear, simply click that button again (with a different icon now). 

These 'ghost curves' are stored per Graph Editor instance, and are not saved to file (i.e. per session only). They are useful to be used as guides when refining the shape of existing curves.
2009-04-08 01:07:46 +00:00
Campbell Barton c80133e1bc Added a message when people try build docs outside of blender 2009-04-07 23:22:20 +00:00
Ton Roosendaal 654a30aa2d 2.5
- Widgets now draw projected themselves, putting window/region matrix
  on 1:1 pixelspace. This allows zoomable buttons, but crispy.
- Note: text in smaller buttons dont get clipped correct now, WIP
- Fixed error with button types in some  menus.
- removed temp UI_2_50 define hack.
2009-04-07 17:08:26 +00:00
Campbell Barton 7c74d1dfa3 py <2.5 dont have lenfunc 2009-04-07 17:08:24 +00:00
Brecht Van Lommel 0482325805 RNA: fix for compile error on msvc, and a warning fix. 2009-04-07 15:20:12 +00:00
Diego Borghetti 59190778a8 New Bitmap draw mode for Freetype2 fonts.
The library can load any font supported by the Freetype2 library or
used the internal bitmap font.

With both types it's possible draw the text as texture or bitmap,
and using texture it's possible rotate, scale and clipping text.

Still have things to fix/add, but I think it's ready to move-on
and start droping the old api, most of (if it's not all) the
editors/interface/text.c will be remove, but some things still
has to be define, like:

 * Where is store the fonts ? (default font, panel font, filesel font, etc)
   I mean, every space have own fonts ? or we keep it on the context ?
   It's not a really problem from the blenfont side, because every font
   have reference number, so it's load only the first time.

 * What we do about gettext ?
   Keep the old system that call gettext inside the blenfont or replace
   it for _() in the Blender source ?
   Also things like pupmen has to be take care, if we want translate the menu.

Ok, time to sleep, back tomorrow to start moving the things :)
2009-04-07 08:42:28 +00:00
Joshua Leung 44877d0add 2.5 - Two Bugfixes:
* Insert Keyframe operator (IKEY) works in Pose Mode for bones again
* 'Parent type' is now correctly wrapped in RNA. Previously, it had been wrapped as a bitfield, while it was in fact a plain enum. I found out when trying to manually fix some bugs in the Set Parent operator...
2009-04-07 05:01:42 +00:00
Brecht Van Lommel 767db1b716 RNA: Commit of the API patch by vekoon. This adds Functions to RNA,
which can be defined to call C functions with defined parameters.

* Parameters are RNA properties, with the same types.
* Parameters are stored in a ParameterList, which is like a small
  stack with the values. This is then used to call the C function.
* Includes Python integration.

* Only one test function is part of this commit, ID.rename.
* Integration with the editors/ module is not included in this
  commit, there's some issues to be worked out for that still.
2009-04-07 00:49:39 +00:00
Ton Roosendaal 88ab62c031 2.5
- fixed pixel offset error for listview (outliner)
- removed a lot of old drawing code
- put back special widgets Normal, Curve, Colorband
2009-04-06 15:44:30 +00:00
Ton Roosendaal 6e91947cda 2.5
Bugfix.
File window uses new layout pointer, but doesnt set it to zero here, 
giving memory issues on 2.5 file reading.
2009-04-06 15:07:01 +00:00
Joshua Leung 51f6d6cbda Graph Editor - Ctrl-LMB (Click Insert Keyframes) Operator
Now it is possible to add more keyframes to the 'active' F-Curve by simply Ctrl-LMB clicking in the graph space. 

NOTE: more advanced polling callbacks are needed in the Graph Editor...
2009-04-06 12:07:33 +00:00
Diego Borghetti e430816cde Add back bitmap draw mode, right now only internal font, tomorrow
freetype2.
2009-04-06 04:12:31 +00:00
Joshua Leung c99b9d7922 Animato - RNA Wrapping:
RNA-Paths + Array Indices for Keying Sets, F-Curves, and Drivers are now editable. We could disable these later if need be, it is useful to be able to edit these (especially for debugging purposes now).
2009-04-05 11:26:33 +00:00
Brecht Van Lommel 3906a62cc1 2.5: Added basic insert/remove keyframes from UI buttons.
- I key over a button inserts a keyframe.
- Alt+I removes a keyframe.
- With right mouse button a menu with these options pops up.
- Buttons are colored green if the property is animated, yellow
  if it is on a keyframe. I followed the colors from the UI
  mockups, but the flicker on keyframes seems too distracting in
  practice?

- This only works for properties on the ID itself at the moment,
  path callbacks need to be filled in for all structs but mesh
  still.
- It doesn't work when you're over a related label, that needs to
  be made to work.
- I made it insert keyframes outside of any keyingset. Not sure
  how this is supposed to integrate?
2009-04-03 23:30:32 +00:00
Ton Roosendaal 30568b9e4e 2.5
Next part of UI drawing migration coding.

Now all calls go via the new wrapper; apart from some special types
(Colorband, HSV picking, Curve, Normal) they draw OK.

Also added new menu system, nicer shadow, and using same AA code.
Used dark theme suggestion from William btw. Don't get afraid, it'll all
be tweakable. :)

Next steps:
- move over all special button types
- make external calls for AA draw (nodes for example)
- remove old draw code
- make new colors save in theme

I also have to check on how to treat icons in buttons; this is a bit
cumbersome in cases.

Then the layout system comes back on agenda, will go over this with 
Brecht tomorrow.

So; all WIP, be patient!
2009-04-03 16:26:03 +00:00
Guillermo S. Romero 3598f96838 Automatic consistency check of generated vs commited .mo files.
Yeah, this should had gone to trunk, but as the first patch was applied here,
let's follow on and wait for merge.
2009-04-03 12:11:09 +00:00
Benoit Bolsee 8a840c35be MSVC9 project file update. 2009-04-02 21:53:52 +00:00
Diego Borghetti 879a7529fd Add clipping option to the internal font. 2009-04-02 20:01:37 +00:00
Ton Roosendaal 742cf72631 2.5
Added number slider drawing.
Color for dark part will be themeable. :) (optional rgb?)
2009-04-02 18:16:15 +00:00
Ton Roosendaal f408689e72 2.5
Some more work on UI drawing code, added a generic structure
for how widgets will be defined. It's still a wrapper on top
of old buttons. Docs follow still.

Some visual improvements;

- more button types supported (check render buttons)
- pressed state is shown
- better 'panel' triangle AA, and new divider style

Still a lot of work here. I expect the next days/weeks to
be much more coding too, had to catch up with a lot of other
Blender stuff. There's more (excitement) going on than code. :)
2009-04-02 15:01:11 +00:00
Brecht Van Lommel e9ad9f894e 2.5: weight paint mode fix for corrupted layer data, and added
a customdata layer specifically to store weightpaint colors
instead of abusing the vertex colors layers.
2009-04-02 14:38:40 +00:00
Brecht Van Lommel 4bb41c3dcd UI: various panels fixes.
* Fix sometimes non-working close/open button.
* Fix panels being a bit out of the view on startup.
* Fix too large totrct region for view2d.
* Fix wrong panel order when changing vertical <-> horizontal.
* Fix wrong panel positions after switching contexts.
* Fix an access of freed memory when collapsing panels.

* Free align mode works again.
* Animations work again.
2009-04-02 01:39:33 +00:00
Campbell Barton ecdd332021 forgot to add bpy_panel_wrap.c 2009-04-01 22:02:22 +00:00
Brecht Van Lommel 7e5057809f 2.5: Temporary compile fix. Campbell, bpy_panel_wrap.c seems to be missing. 2009-04-01 15:23:46 +00:00
Brecht Van Lommel f3b84c9d52 2.5: added generic WM_operator_redo for use as invoke callback, similar
to WM_operator_menu for example, but popping up the redo menu. This is
useful for operators like particles rekey, which makes no sense without
specifying the number of keys.
2009-04-01 14:02:06 +00:00
Campbell Barton 3224efc384 Python Panels WIP
- Register python panels
- Added a generic class checking function BPY_class_validate() for panels/operators.
- No button drawing yet

Brecht, Added RNA_enum_value_from_id() and RNA_enum_id_from_value() to rna_access.c to do lookups between identifiers and values of EnumPropertyItem's, Not sure if these should go here.
2009-04-01 12:43:07 +00:00
Joshua Leung 3a28a74505 Animato - Support for 'BuiltIn' and 'Relative' Keying Sets
When inserting keyframes in the 3D-View (support will be extended to other editors in due course) using the IKEY hotkey, the menu which appears will now consist of 3 parts: 
* 'Active Keying Set' - this option allows you to use the user-defined KeyingSet which is active for the current scene (i.e. the one seen in the TimeLine/Outliner headers)
* User defined Keying Sets - a list of all such available KeyingSets is included, and entries can be chosen from there
* Built-In Keying Sets - see later...

To achieve this, several changes needed to be made first:
* Added support for 'relative' in addition to 'absolute' Keying Sets. Relative Keying Sets are Keying Sets which operate on data from the current context (i.e. a 'location' KeyingSet will add location keyframes for selected objects/bones/nodes as opposed to location keyframes for some particular object). The is a tentative 'templates' requirement system here, which still needs to be fully fleshed out.
* Added support for builtin Keying Sets (i.e. 'Location', 'Rotation', 'Scaling', and 'LocRot' as a few initial demonstrations), which replaces the temporary Insert Keyframe operator for the 3D-View (IKEY). These are effectively relative Keying Set definitions which are included in Blender by default and stored in a list separate from user-defined ones. Volunteer help in defining a few more of these for other editors will be welcome soon.
* Removed/replaced much of the crappy temporary Keyframing operator code, though a few tweaks could still be done.
2009-03-31 22:36:13 +00:00
Diego Borghetti 4861ddf350 Small cleanup, all this options are now in the User Preferences, RNA. 2009-03-31 21:19:23 +00:00
Diego Borghetti 466628778c Add back the others font: helvb 8/10/12 and scr 12/14/15. 2009-03-30 19:48:18 +00:00
Daniel Genrich e5bc44bcb2 Make cmake work out of the box for win64 systems (disabling openal and fixing zlib)
Command: cmake -G"Visual Studio 9 2008 Win64" ../blender-2.5-svn-folder
2009-03-30 18:42:36 +00:00