Commit Graph

15037 Commits

Author SHA1 Message Date
Andrea Weikert
cc80111b2b 2.5
* fix lost declaration and missing includes after blenlib cleanup.
* bump warning level to W3 for Debug in a few libraries for MSVC9 projectfiles. Others will follow.
2008-12-20 12:43:53 +00:00
Ton Roosendaal
851f437361 2.5
- Ported over view3d header buttons.
  Most of the options don't work :) but some do!
- Fixed makefiles for new animation module
- added icon definitions in resources to match current trunk.
2008-12-20 12:36:14 +00:00
Campbell Barton
95e458fd03 view3d operators ED_VIEW3D_OT_viewhome and ED_VIEW3D_OT_viewcenter for Home, Shift+C and PadPeriod keys. 2008-12-20 11:33:16 +00:00
Andrea Weikert
019c15c1c9 2.5 MSVC9 projectfiles
* update for editors/animation
2008-12-20 10:19:24 +00:00
Andrea Weikert
ebb6628a01 2.5 BLI_blenlib cleanup
DONE:
* moved almost all declarations from BLI_blenlib.h into their own proper header files.
* BLI_blenlib.h still includes all the declarations for convenience and to avoid changes in existing code
* split util.c into several files, where it wasn't done already
*    DynamicList -> dynamiclist, 
*    ListBase    -> listbase, 
*    String utility functions -> string.c
* removed a few unused macros and functions, if they're needed back, they're still in svn ;)
TODO:
* btempdir global
* further cleanup in the code of the different modules (especially util.c)
2008-12-20 10:02:00 +00:00
Joshua Leung
6343d4e233 2.5 - Start of porting of Animation Editors
* Added new 'Animation' submodule under Editors. This will be used to house all code + features that are used by many different Animation Editors (Action/Dopesheet and IPO) as well as other parts of Blender. 

* Added back some of the core code need by the Action/Dopesheet editor, which will also be used by IPO Editor.
* Brought back file for keyframing management code (i.e. keyframing.c), but there's still quite a lot of missing stuff that I'll need to restore, so in the meantime, it's #if 0'd out.

* Moved markers code to this new module (I'm not sure whether SVN will recognise this change, as TortoiseSVN doesn't seem to have any obvious copy/move commands)
2008-12-20 08:24:24 +00:00
Ton Roosendaal
3b15fd4707 2.5
View3d: added zoom with padplus/minus and scrollwheel.
2008-12-19 19:27:41 +00:00
Brecht Van Lommel
3bda5490f7 2.5: globals cleanup
* G.version removed, use BLENDER_VERSION
* G.order removed, ENDIAN_ORDER
* G.vd, G.sipo, G.buts, G.sima, .. removed.
* G.qual removed
* G.simulf removed (was unused in 2.4x)
* error() and some other unused stubs removed
2008-12-19 19:11:02 +00:00
Ton Roosendaal
12ad72ba8f 2.5
Two bugfixes:
- new WM_error() needed 'struct' in definition 
- fixed crash rrors reading files with curves.
2008-12-19 18:48:41 +00:00
Ton Roosendaal
a3d3619898 2.5
- CTRL+O "open recent file" is back. Need it for testing :)
- Added a simple WM_error() to replace old error()
2008-12-19 18:28:37 +00:00
Andrea Weikert
7729ddd424 2.5 MSVC9 projectfiles
updates for briging back view3d.
2008-12-19 18:11:17 +00:00
Nathan Letwory
ed259629c8 * little swap-eroo to get things compiled with msvc.
- first the declarations, then the code! :)
2008-12-19 17:59:54 +00:00
Ton Roosendaal
4db8d5a365 2.5
Moved GPU init to the right location, it has to be called per
window you open. Now rip and add-window gives good views. :)
2008-12-19 17:26:15 +00:00
Ton Roosendaal
663612c70c 2.5
View3d: middle mouse rotate, translate, zoom.
(using default mouse map)
2008-12-19 17:14:02 +00:00
Brecht Van Lommel
92b1d3f946 2.5: blenloader/ cleaning:
- removed context usage, should not be in this module
- remove G.main usage, now is passed along
- still some globals in use here, goal is to get rid of those too,
  so that it's possible to load/save blendfiles without having to
  think about some global state.
2008-12-19 16:36:15 +00:00
Ton Roosendaal
62a03ea1b6 2.5
All of the view3d drawing code is now 'Context' free.
The idea is:

- ED_region_do_draw() sets and freezes drawing context
- regiontype draw() callback then can pass on other relevant 
  context stuff as function args.

Also cleaned up the WM opengl wrappers, to mimic opengl state;
no reason to give window pointer anymore.
2008-12-19 14:14:43 +00:00
Ton Roosendaal
63195b0179 2.5
Compile fix; MAXFLOAT is not defined uniformly on platforms.
Note for the coders: 

ED_types.h: has editor wide defines and structs
ED_util.h: has editor wide functions

Both includes also are containing old cruft to get things
to compile (and work), for later cleanup.
2008-12-19 12:48:30 +00:00
Ton Roosendaal
d92b45d558 2.5
Drawing code for space_view3d module.
It's still not cleaned, have to check on context usage still.
Also missing is editmodes, armatures, and probably more.

Known issue: splitting to 2nd window gives bad opengl lighting.
Picture for fun:
http://www.blender.org/bf/rt2.jpg

Current stat: brought back almost 10k lines! :)
2008-12-19 12:14:58 +00:00
Joshua Leung
c752ec9fc4 2.5
Merged 'backend' changes from AnimSys2. Many of these changes are necessary for the Dopesheet and other changes I'm currently still stabilising. Those will come in due course.
2008-12-19 11:45:46 +00:00
Matt Ebb
242695011e some initial rna description tweaks 2008-12-19 06:05:00 +00:00
Campbell Barton
4ea449129e string args were given in wrong order. 2008-12-19 05:09:17 +00:00
Campbell Barton
b6121d2423 epy doc generator that runs inside blender2.5, in background mode.
Automatic support for...
* cross references to struct types
* extracts descriptions/names
* RNA "base" types are converted to python subclasses
* number min/max, string max length, array's, array lengths, valid enum types, readonly flag.

interesting pages (abusing autobuilder ftp :/)
http://www.graphicall.org/builds/builds/autobuilds/rna/class-tree.html
http://www.graphicall.org/builds/builds/autobuilds/rna/rna.Sequence-class.html
http://www.graphicall.org/builds/builds/autobuilds/rna/identifier-index.html

docs are generated in source/blender/python/doc
2008-12-19 05:05:23 +00:00
Campbell Barton
04428d6750 added "description" and "readonly" properties to RNA Structs (also accessible via python)
Many descriptions are not written, grep for DOC_BROKEN if you have some spare time to write struct descriptions.
2008-12-19 04:06:24 +00:00
Brecht Van Lommel
d9de6fca6c 2.5: Change blenloader module to use the Report system for reporting errors. 2008-12-19 00:50:21 +00:00
Brecht Van Lommel
ea81c58429 2.5: fix small memory leak when closing window with X-button rather than Ctrl+Q. 2008-12-19 00:43:37 +00:00
Brecht Van Lommel
dfb8b21340 2.5: fix for crash reading regions of inactive spaces in an area. 2008-12-19 00:18:16 +00:00
Campbell Barton
9178dc8596 Small RNA changes
* rna_validate_identifier now checks identifiers are not python keywords such as if, and, from (builtins like max, object and sort are ok)
* rna_validate_identifier prints an error explaining why it fails
* renamed Struct's "from" to "base" - to point to the struct inherited from.
* renamed ImageUsers's "pass" and "layer" to "renderPass" and "renderLayer"
* use the identifier as the key for ENUM's (matching structs and properties)
2008-12-18 23:34:19 +00:00
Joshua Leung
1dcbafa4e4 2.5 - Assorted tweaks for anim editors before porting AnimSys2 stuff over to this branch 2008-12-18 23:23:09 +00:00
Andrea Weikert
54cc5c493d 2.5
remove unnecessary include dependency.
2008-12-18 20:08:24 +00:00
Brecht Van Lommel
93cc4629e3 2.5: fix for crashes due to access to free'd memory in joining areas,
ripping areas and duplicating windows.
2008-12-18 19:41:36 +00:00
Andrea Weikert
af746acaad 2.5
Adding back internal files for file/imagebrowser.
2008-12-18 19:21:30 +00:00
Andrea Weikert
1d3a42451d 2.5 MSVC9 projectfiles
updates: 
* context.c and report.c in blenkernel (moved from wm)
* view3d_draw in editors 
* rna for sequence
2008-12-18 18:49:38 +00:00
Ton Roosendaal
a3f583ecf3 Removed ugly call to G.curscreen in derivedmesh.
Just to prevent crashing for now.
2008-12-18 18:34:37 +00:00
Ton Roosendaal
c7f6f25a9d 2.5
Drawing and viewing code for view3d back (no not objects :).

Quick test: converted 2250 ugly lines of code in 2.5 hours.
With about 300k lines todo, this will be 333 hours = 30 days? Whoa!
2008-12-18 17:38:21 +00:00
Ton Roosendaal
e8e903cd53 2.5
- WM subwindows now get freed on every ED_region_exit(). Was not
  a leak, but it's cleaner this way (and saves some kilobytes!).
- fixed debug print for operators (on blender -d) to print correct
  subwindow id.
2008-12-18 14:53:39 +00:00
Ton Roosendaal
9ca1760525 2.5
Missing context.h for apple compiling.
2008-12-18 11:25:17 +00:00
Joshua Leung
dae839639d View2D: More bugfixes
* Added flags to View2D to specify whether the view should have pixel offsets applied (this is able to be specified per axis, just in case the need arises). Currently, this is only used for headers, where the UI elements were not as smooth + round as they could be

* Fixed IPO/Action/NLA so that new instance will show channel lists by default and with scrollers

* Fixed Outliner zoom-in/out on changing windowsize. I didn't notice this on my previous custom .B.blend file, but the problem was apparent in the default setup.
2008-12-18 09:20:29 +00:00
Campbell Barton
ced396ce6d Use the identifier for struct property access too
struct.properties['pulse_false_level'] instead of struct.properties['Pulse False Level']
2008-12-18 07:22:28 +00:00
Campbell Barton
96bad930de Added checks so invalid struct and property identifiers while preprocessing,
Changed curve '3d' property to 'planer' and set to a negative bool.
2008-12-18 06:43:03 +00:00
Campbell Barton
a196d283ed Use the identifier rather then the struct name to access a collection of structs.
bpydoc.structs.keys() - ['Actuator', 'ActuatorSensor', 'AlwaysSensor', 'AndController'.... etc
now reads...
bpydoc.structs.keys() - ['Actuator', 'Actuator Sensor', 'Always Sensor', 'And Controller'...

This is more correct since an identifier is supposted to be unique when a name might not be.
2008-12-18 05:28:17 +00:00
Brecht Van Lommel
ecc4e55b66 2.5
Context API

This adds the context API as described here. The main practical change
now is that C is not longer directly accessible but has to be accessed
through accessor functions. This basically adds the implementation of
the API and adaption of existing code with some minor changes. The next
task of course is to actually use this design to cleanup of bad level
calls and global access, in blenkernel, blenloader.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context

Error, Warning and Debug Info Reporting

This adds the error reporting API as described here. It should help
clean up error() calls in non-ui code, but eventually can become used
for gathering messages for a console window, and throwing exceptions
in python scripts when an error happens executing something.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Reports
2008-12-18 02:56:48 +00:00
Brecht Van Lommel
241dbe6e85 2.5: Fix crash moving area to fullscreen with tooltips. Happened
because C->window->screen and C->screen were different, now made
sure they are set at the same time.
2008-12-18 01:48:24 +00:00
Ton Roosendaal
7a5186c53f 2.5
Added operator for moving area to 'full screen'.
This is instable with tooltips on... fishy stuff then goes on,
which Brecht will first look at. :)
2008-12-17 19:40:19 +00:00
Ton Roosendaal
6634ed9a87 2.5
Added screen-set notifier. Works for arrow keys now. For those who
know the messy old code, admire the simple 2-function call method
now :) Only context setting is messy a bit, that'll be solved.

Also: removed redundant code, and move freeing window handlers up
one level; windows can keep their handlers while screen switches.
2008-12-17 17:33:45 +00:00
Brecht Van Lommel
065155a17d UI:
* Changed pupmenu function name and added back some standard popups.
2008-12-17 16:53:56 +00:00
Ton Roosendaal
3051647c98 2.5
Patch from Michael Fox; adding operator + key definitions for arrow keys, 
to change frame.
2008-12-17 16:21:14 +00:00
Ton Roosendaal
d6b677ba42 2.5
Small commit, too much fun to not do separately:

- removed notifier restriction to go only to own window, so multiwindow
  setups redraw correctly. (when other windows show other scenes we have
  to handle still).
- fixed cursor type outside of window (got stuck to area-move cursor).
2008-12-17 15:51:32 +00:00
Ton Roosendaal
07d63eb679 2.5
- Made a nice generic 'OK confirm' implementation for operators.
  Just use in operator type definition this line:

  ot->invoke= WM_operator_confirm;

  It will autmatically use operator name for asking OK. It will
  also use properties (if set before).

  Note for Brecht: the test okee_operator() you coded could better not
  be used in operators themselves.

  In future we can also add menus that get automatically generated
  based on operator properties. Like 'add constraint' showing the
  constraint types.

- Added this confirm call for most of the keys you'd expect it for.
  (user settings, delete marker, rip area, split region, etc).

- Cleanup: moved ed_markers.c to the util/ directory, it doesnt belong
  in space_time. Also made separate function for the marker keymap
  definition.

- removed ancient redraw notifier from ghost event level (every key
  press gave full screen draw)
2008-12-17 15:38:40 +00:00
Joshua Leung
616edcca12 View2D: Cleanup of presets and fixed errors in various views
Now, preset view configurations are only to be used if they define all (scrollers not included) relevant settings for the view they are set for. This should be less confusing than in the previous situation with V2D_COMMONVIEW_TIMELINE stuff.

One implication of this though, is that all Animation Editors (for example), will have to define their own version of the relatively commonly shared info. However, given the great diversity in the range of settings each have, this should not be too much of an issue.

Also, added a 'standard' view config for main 'window' regions. At this stage, it is recommended that this view config should be used only as a placeholder template on which a set of custom settings could be based. I've put it into use for the buttons window/scripts window/info window so far.
2008-12-17 10:25:02 +00:00
Brecht Van Lommel
c1379f6613 UI:
* Added support for defining properties for operator buttons, with
  uiButGetOperatorPtrRNA. Needed to cleanup a hack that was there
  for operator properties in RNA, now a separate OperatorProperties
  type is used for storing operator properties, instead of being part
  of the Operator type itself.
* Allow selecting menu items with mouse release instead of press again.
* Fix some cases with hanging tooltips in the UI.
2008-12-16 20:03:28 +00:00