Commit Graph

15703 Commits

Author SHA1 Message Date
Brecht Van Lommel
408ba429e6 2.5: Buttons View
* When resizing the window, the top position is now preserved,
  instead of the center position.
* Fix zoom level not being preserved in various cases, when
  changing both with and height. This replaces some earlier code
  which did this at screen level but wasn't very reliable.
* Different tabs now each preserve their own scroll.
* When switching between tabs, it now scrolls to show as many
  buttons as possible, instead of possibly showing empty space.
  There is a trade-off here between doing that keeping the
  buttons in the same place, no ideal solution exists I think.
* Change zooming in/out to be symmetric, for example doing
  numpad + then - did not give the original zoom level back.
* Added some calls to avoid hanging tooltips when manipulating
  the view.

Internals:
* Added V2D_KEEPOFS_X and V2D_KEEPOFS_Y to keep the top/bottom
  rather than the center.
* Renamed V2D_KEEPZOOM to V2D_LIMITZOOM (seems more appropriate),
  and make V2D_KEEPZOOM preserve the zoom level.
2009-07-29 22:57:53 +00:00
Guillermo S. Romero
2df1eeba0e Only show ~/Desktop/ if really exists. 2009-07-29 22:37:33 +00:00
Brecht Van Lommel
80015c8867 2.5: File Browser on Unix
* Attempt to better filter file systems, it displayed all kinds
  of devices which are not interesting to the user. The trick
  used is now to use mounts starting with "/dev".
* Add / at the end to properly highlight directories in the list.
* Fix for non-linux unixes, this now falls back to showing / again.
2009-07-29 21:35:03 +00:00
William Reynish
992382ddb3 Even more metaball layout changes.
Added icons in menu, moved type setting at top of panel. Need to make the size widgets only show the relevant options.
2009-07-29 20:56:22 +00:00
Elia Sarti
49faf9011a 2.5 / Drag & Drop
Removed all related code. Talked with Ton about this and agreed to postpone it at indefinite time in the future, when things get more relaxed.
Files saved since my first commit should not break although I'm not 100% sure.
2009-07-29 20:51:05 +00:00
Thomas Dinges
2621dd90e3 2.5 MetaBalls:
* Layout tweaks by nudelZ. Thanks!
2009-07-29 18:44:54 +00:00
Ton Roosendaal
da14738624 2.5
Two bugfixes, reported by Sebastian Skejo in IRC:

- File operator poll wasn't secure, search for it crashed
- Knife tool depends on having view3d context, fixed poll for it
2009-07-29 18:15:46 +00:00
Ton Roosendaal
785bf413f3 2.5
On 2nd thought: added back undopushes on every button use.
Operator re-use works with it now!
2009-07-29 18:04:35 +00:00
Ton Roosendaal
3d70e21c17 2.5
Makefile fix: added metaball.a lib
2009-07-29 18:03:25 +00:00
Ton Roosendaal
4a1266baad 2.5
Operator goodies!

--- Macro operators

Operators now can consist of multiple operators. Such a macro operator
is identical and behaves identical to other opererators. Macros can
also be constructed of macros even! Currently only hardcoded macros are
implemented, this to solve combined operators such as 'add duplicate' or
'extrude' (both want a transform appended).

Usage is simple:
- WM_operatortype_append_macro() : add new operatortype, name, flags
- WM_operatortype_macro_define() : add existing operator to macro

(Note: macro_define will also allow properties to be set, doesnt work
 right now)

On converting the macro wmOperatorType to a real operator, it makes a
list of all operators, and the standard macro callbacks (exec, invoke,
modal, poll) just will use all.

Important note; switching to a modal operator only works as last in the
chain now!

Macros implemented for duplicate, extrude and rip. Tool menu works fine
for it, also the redo hotkey F4 works properly.

--- Operator redo fix

The operators use the undo system to switch back, but this could give
errors if other actions added undo pushes (buttons, outliner). Now the
redo for operator searches back for the correct undo level.

This fixes issues with many redos.

Note for brecht: removed the ED_undo_push for buttons... it was called
on *every* button now, which is probably too much? For example, using
the 'toolbar' redo also caused this...
2009-07-29 17:56:38 +00:00
Jiri Hnidek
9547fc48ac - Fix some things I missed in my last commit
- Change name of OBJECT_OT_object_add operator
 - Use new OBJECT_OT_object_add operator in space_info.py
2009-07-29 14:07:51 +00:00
Jiri Hnidek
f75005c2a8 2.5 MetaBalls
- It is possible to work with MetaBalls in edit mode now
 - Added basic UI to the button window (feel free to change it :-))
 - Header menus should work
 - Undo & redo should work
 - Removed global variable editelems and lastelem (moved it to the MetaBall struct)
 - All tools from old editmball.c was converted to the operators
 - Added lastelem to the RNA
 - Experimental: mb->editelems is only pointer at mb->elems or NULL (depends on Mode). ListBase of MetaElems is not duplicated in edit mode.

Tested with scons at Linux and mac OS X

TODO:
 - Recalc data after Undo or Redo
 - Solve issue with basic MetaBall and Python UI script (only base MetaBall object influence Wiresize and Threshold)
 - Fix orientation of manipulator in "Normal mode"
2009-07-29 12:35:09 +00:00
Joshua Leung
b3d0753467 2.5 - Small tweaks to order of buttons for Animation Editor header buttons to have more consistent layout 2009-07-29 11:59:21 +00:00
Ton Roosendaal
1744061a91 2.5
Small fix: SHIFT+D caused transform to move with more precision, as if
shiftkey was pressed.
2009-07-29 11:53:37 +00:00
Martin Poirier
208c535869 Use the Ramer-Douglas-Peucker algorithm instead of a reverse Chaikin filter to reduce stroke complexity.
Divergence limit is 4 pixels (could be tweakable but 4 is a nice number).
2009-07-29 04:53:10 +00:00
Campbell Barton
cacc5f782a - console remove doubles with command history
- povray file removal was uncommented
2009-07-29 00:37:37 +00:00
Campbell Barton
a638f611a8 list the filesystems on linux. 2009-07-28 22:44:50 +00:00
Andrea Weikert
e3f6770bd3 2.5 file browser
* small tweak for tab completion of directory: make TEX button interactive again

Note1: only TAB key triggers update (see ui_do_but_textedit, line 1599)
2009-07-28 21:08:28 +00:00
Diego Borghetti
4ba8397ab0 Forget add the bearing X, a little better now (hinting). 2009-07-28 21:06:23 +00:00
Diego Borghetti
4ad9dd7c8e Bitmap mode is back.
The option of Texture or Bitmap font is working again, yes it's really
uuuuugly right now, but it work.

On the next commit I go to put this at the same level that texture font.

Change this from User Preferences -> Language -> Textued Fonts, save
the preferences and run blender again.
2009-07-28 20:02:09 +00:00
Brecht Van Lommel
8cf4ef091c 2.5: various one-liner fixes
* Image window only show game properties in game mode.
* Fix image window render info drawing wrong with alpha enabled.
* Win32 editmode cursor now uses a different one than the system
  cursor, that one is barely visible, especially in the new theme
  colors.
* Center text in operator header print.
* Fix sequencer unlock shortcut key.
* Fix uv layer / vertex color active render button now graying out.
* Workaround to get default zoom level 1:1 again for new buttons
  (will try to fix properly later, is due to scrollbars).
2009-07-28 18:59:36 +00:00
Brecht Van Lommel
801d44a09e 2.5: Materials and textures can now be assigned again
even if not slot for them is available.
2009-07-28 18:54:02 +00:00
Brecht Van Lommel
9a874da36c 2.5: File browse button in ui layouts now works, e.g. for render
output path or fluidsim path.
2009-07-28 18:51:06 +00:00
Andrea Weikert
5d7a7525a4 2.5 file browser
Bugfix: scrollwheel in left panel area should pan, not zoom.
2009-07-28 18:25:02 +00:00
Andrea Weikert
c645f3660d 2.5 file browser
* Bugfix: keep the filename when changing directory, either by clicking on it or by selecting a bookmark
* MSVC uninitialized variable runtime check fix in widget_draw_text
2009-07-28 18:20:16 +00:00
Andrea Weikert
86336f5cdd 2.5 file browser
Bugfix: revert to previous behaviour of BLI_rename, is used for safe blendfile saving.
Added guard in file browser though to prevent user from invoking this.
2009-07-28 18:07:00 +00:00
Brecht Van Lommel
a5e1ff294e 2.5: UI
* Text editing in buttons now hides the label, to give more space.
* Tweak slider buttons text clipping, happened a bit too early.
* Move editing text closer to the left, because the < > buttons
  are not visible then anyway.
2009-07-28 17:59:59 +00:00
Ton Roosendaal
e3d17ca33d 2.5
OSX fix:
carbon code can not be included in blender code, it conflicts with struct ID
2009-07-28 16:56:22 +00:00
Ton Roosendaal
87b547c79f 2.5
Fix in include file, missing 'struct'
2009-07-28 16:50:13 +00:00
Ton Roosendaal
347a1f4376 2.5
Keymap feature: RightMouse in pulldown menus allows to assign 
a new hotkey.
2009-07-28 16:48:02 +00:00
Brecht Van Lommel
aa44603146 2.5: File browser
* Side panels now use list widgets.
* Enabled theme colors for side panel.
* Add button in bookmarks panel.
* Operator panel title now uses operator name.
* For unix, added / to system, and home and desktop to bookmarks.

* For opening fileselect with filter, cleaned up the code a bit,
  adding WM_operator_properties_filesel instead of duplicating code.
* Also added filter for all operators calling fileselect, only image
  and file open did it before.
* Hide . files by default, and also hide files ending with ~.

* Added back .. (but not .) in the file list, I really missed this.
* File highlight now only happens when you're actually over a file,
  instead staying after you move the mouse away.
* Fix some redraw/refresh issues.
2009-07-28 16:46:14 +00:00
Brecht Van Lommel
74e4ad20c9 2.5: code cleanup, added CTX_wm_space_* for each space type,
instead of casting everywhere.
2009-07-28 16:33:02 +00:00
Matt Ebb
b2ceadc359 * copy io scripts into osx bundle with cmake, in post-build process 2009-07-28 10:40:08 +00:00
Campbell Barton
1e237e7e2f console copy text was upside down.
made ctrl+space operator find and autocomplete in the console, need a bette way to make these key bindings co-exist.
2009-07-28 08:50:11 +00:00
Joshua Leung
17b0a794c7 NLA: Mute/Disable NLA Playback
Exposed toggles (defined on AnimData) that will mute the evaluation of that AnimData block's NLA stack. It's active action will then be the only thing that gets evaluated.
2009-07-28 07:24:25 +00:00
Joshua Leung
61178b19ea 2.5 - Anim Editor cleanups + Graph Editor Clutter Reduction
* Cleaned up some parts of the code that were unused/could be done a bit nicer

* Added a new option for only showing the keyframes of the selected F-Curves in the Graph Editor, as another way of reducing the clutter.
2009-07-28 06:50:30 +00:00
Thomas Dinges
9cbdf73cf0 2.5 Part 2 of Layout Code Cleanup:
* Cleanup of Modifier and Text Data Panels. 
* Made some small layout tweaks.

* Added missing RNA properties for Cast Modifier.
2009-07-28 06:26:10 +00:00
Joshua Leung
8584507671 2.5 - Start of Make Proxy Operator
The code has been ported to the operator+rna system, however, there are currently issues related to how the pointer-rna's work for use as operator properties. (NOTE: RNA_property_pointer_set only takes into account builtin props for now, but not id-props, while the corresponding get method seems to take them into account)

The alternative to using pointer-properties for the operator, is to store strings and look up the relevant objects later, but there should be a nicer way...
2009-07-28 03:54:40 +00:00
Campbell Barton
fe881aa7ad - lamp UI was missing y samples for rectangle area lamps
- returned ID types from RNA funcs didnt get their ID's assigned which crashed in some cases (still not working for members of ID types).
- ob.create_remder_mesh() wasnt assigning any materials.
2009-07-28 01:06:56 +00:00
Campbell Barton
396ebf0c91 better loading partially written TARGA's, dont read over the end of the buffer and set the remaining pixels 0. 2009-07-27 22:41:35 +00:00
Matt Ebb
71e0e22ae0 * cmake / mac - unzip python modules from /lib/release into .blender/python on build
This last commit should make everything right for compiling out of the box with python 3.1 on Mac OS X intel. I've been testing/developing this on 10.5 and I'd be very interested to hear feedback from people on other OS versions! Scons and PPC to go...
2009-07-27 22:02:47 +00:00
Shaul Kedem
793324ef83 small msvc fix 2009-07-27 19:33:06 +00:00
Andrea Weikert
a869bdc44e 2.5 file browser
New:
* added filter and display to some operator properties. Now file browser opens showing only .blend files and folders on file->open and on image->open changes to image display and only shows images and movies.
Fixes:
* fixed stupid removal of wrong prototype in last commit
* fixed a few warnings
2009-07-27 19:06:33 +00:00
Campbell Barton
eb40d8ef0f render api utility function to initialize a render layer from an image rather then loading through python.
lay = result.layers[0]
	lay.rect_from_file("somefile.png", part.x, part.y)

If the source image is bigger then the render layer x/y offsets can be used to choose the part of the image use.
2009-07-27 18:50:10 +00:00
Elia Sarti
324187b61a 2.5 / Drag & Drop
Small tweak for MOUSEDRAG/DROP event generation
2009-07-27 18:26:48 +00:00
Campbell Barton
9dc819a56d readonly face normal option eg.
me.faces[0].normal
2009-07-27 18:17:21 +00:00
Andrea Weikert
d0422dec35 2.5 file browser
* fix some notifiers, so directory is correctly shown
2009-07-26 19:23:07 +00:00
Campbell Barton
6c0e9e21cb indentation error with some operators (strip the descriptions)
if 0'd the exec() workaround for running python scripts incase windows devs want to test.

theeth said the problem is when you compile a debug blender against a non debug python (or the ther way I assume), you can get a FILE struct mismatch.

A quick way to test this on windows is to run this from the command line.
 blender -P somescript.py
 
Somescript.py can be anything
2009-07-26 18:56:27 +00:00
Andrea Weikert
cbb9dfaab8 2.5 file browser
* operator for create new directory activated (IKEY)
* operator for rename (works on files and directories so far) (CTRL+LMB)

Note: fail to rename is rather quiet, no message popup, just doesn't rename if it can't.
So far checked that (On Windows Vista) rename fails on system directories, which I think acceptable.

Note: I removed the code that (silently) deletes file if I rename file to an existing one. Considered harmful :)
2009-07-26 18:52:27 +00:00
Campbell Barton
4741137fc9 misc py/rna changes
- running a script from a file now uses the PyRun_File(FILE *, ...) rather then PyRun_String("exec(open(r'/somepath.py').read())"...), aparently FILE struct on windows could not ensured to be the same between blender and python, since we use our own python on windows now it should be ok.

- generating docs works again (operator update for py style syntax broke them)

- python operator doc strings was being overwritten

- added rna property attribute "default" to get the default value of a property, not working on arrays currently because variable length arrays are not supported.
2009-07-26 18:18:14 +00:00