Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-01-15a new generic invoke function - WM_enum_search_invoke()Campbell Barton
This can search operators enum property. Make proxy menu could easily get too big. use the new search popup.
2010-01-13[#20093] Consistent Crash in properties windowMartin Poirier
Fun bug, took me the better part of the day to track down. Happens because maximizing swaps spacedata lists between the old area and the newly created maximized area (this one being empty) while ui handlers are still hanging with references to the first area (then trying to access spacedata when handled). And then only if a maximizing operator was run before the UI realign timer event from the previous maximize was handled (fun, I told you). After discussion with Matt on irc, we decided the best way to deal with that was to remove ui handlers that reference areas of a screen that is no longer used. That solution reflects the fact that the bug is more general that the reproducing steps would lead to believe. There's also absolutely no reason to run UI handlers on invisible areas.
2010-01-10- fix for crash if drivers were used in the .B.blendCampbell Barton
- fix for problem where proxy objects could enter editmode but not exit
2009-12-24support for registering operators using the same internal rna api as panels, ↵Campbell Barton
menus, headers & render engines since there was a fair bit of duplicate functionality. will remove the old system and update scripts next.
2009-12-24Key map related things:Matt Ebb
* Moved 'change shortcut' (previously directly RMB on menu items) to a context-menu item, and added Remove Shortcut and Add Shortcut. This is all available now in a RMB context menu for operator buttons and menu entries. * Renamed a bunch of key maps to be consistent with UI names, and human-readable. Since these key map names are now being directly used in the UI for people to find things, they should be understandable and in plain language. This renaming may break some older saved key map setups - though previously saved .b25.blends should convert over ok. Exported .py files may need some find/replacing - in this commit check the changes in resources.c to see what's changed.
2009-12-18Keymap conflict detection operator.Martin Poirier
Takes into account the hierarchical structures of keymaps as well as wildcards (KM_ANY) in event definitions, user remaps (emulate numpad, action/select mouse buttons, ...) and event values that overlap (click, press and release) For now, doesn't do anything other than print conflicts in the console. As a result, I cleaned up a lot of keymaps that had double definitions, moved some keymap items in more appropriate places, fixed wrong definitions and removed kmi that were added for testing a long long time ago. Out of all the remaining conflicts, after removing obvious non-issues, here's what remains: http://www.pasteall.org/9898
2009-12-17Fix #19431: gestures would sometimes draw incorrect, now ensures theyBrecht Van Lommel
are always drawn in pixel space.
2009-12-17keymap editorMartin Poirier
New unique ID per keymap item (unique inside their keymap) for default and configuration keymaps. This allows restoring a single user defined kmi to its previous (default or config) values instead of having to restore the whole keymap. The restore item button is disabled for kmi added by the users (they don't have an ID). Also fixes a bug in the rna function for add keymap item (parameter order was incorrect, messing adding back saved configurations).
2009-12-08RNA functions to find keymaps in a keyconfig (from the usual idname + space ↵Martin Poirier
or modal keymaps from operator id)
2009-12-08RNA:Brecht Van Lommel
* Property update functions no longer get context, instead they get only Main and Scene. The RNA api was intended to be as context-less as possible, since it doesn't really matter who is changing the property, everything that uses the property should be updated. * There's still one exception case that use it now, screen operations still depend on context too much. It also revealed a few places using context where they shouldn't. * Ideally Scene shouldn't be passed, but much of Blender still depends on it, should be dropped when we try to support multiple scene editing. Change was planned for a while, but need this now to be able to call update without a context pointer.
2009-12-06wm.invoke_popup(op, width, height) similar to wm.invoke_props_popup(op, ↵Campbell Barton
event) except it doesnt use undo/redo (UI's need to execute operators themselves)
2009-12-05Support for the C Macro system in Python.Martin Poirier
Basic definition works like a python operator but you derive from "bpy.types.Macro" instead. Operators are added to the macro after it has been added with "bpy.ops.add_macro" through the class method "define" which takes an operator id and returns an OperatorMacroType (new RNA type) for which properties can then be defined to be passed to the operator when run. Example: http://blenderartists.org/~theeth/bf/macro.py Using this system, it should be easy to add an operator to the console that converts selected lines into a macro or even a more generic record macro system.
2009-12-02Reset operator properties for keymap items when operator idname is changed.Martin Poirier
This means added operators in the keymap editor will now show options correctly (maybe not for old .B25.blend)
2009-11-301. Extend option for 3d view border select now does something (default True ↵Martin Poirier
to keep same behavior) 2. Add action parameter to Select_All_Toggle operators, rename to Select_All. Options are Toggle (default), Select, Deselect, Invert (same as select swap). This makes it possible to map separate hotkeys for select all and deselect all. NOTE for Aligorith: I didn't change animation operators for select_all which already had an Invert operator. These should be fixed eventually.
2009-11-24avoid operator type lookups when its knownCampbell Barton
2009-11-23Splash screen, implemented by Matt.Brecht Van Lommel
* Now has documentation links and recent files. * Click on image or outside splash to make it go away. * Still has old image, new one will be committed later.
2009-11-17new function WM_keymap_add_menu(), similar to WM_keymap_add_item() except it ↵Campbell Barton
takes a registered menu. the key will then trigger this menu.
2009-11-16Fixing keymap export:Martin Poirier
- Didn't support new userdef keymaps (new "active" rna function to get the active version of a keymap) - Didn't support modal keymaps (new "modal" param to add_keymap function, new "add_modal_item" function on keymaps (both functions now make sure the keymap is of the right type))
2009-11-15=== Better support for user defined modal keymaps ===Martin Poirier
Fixing/Missing RNA properties: - "virtual" property for "ANY" modifier for keymapitem - modal property for keymap - Look up modal_items in usermaps too Lazy init usermaps needs to init modal_items too. New function to initialize a user keymap (fill in modal_item and poll pointers). Operator modal keymaps now look up if there's a user defined keymap that overwrites it. Full Event UI buttons now show "Any" when modifier is set to that (instead of listing all of them). Note: Having the modifiers as boolean still doesn't express the full breath of values possible for them. There is commented code in this commit to represent them as enum, which would solve this, but make the keymap editor more cryptic.
2009-11-11Mitchell Stokes BGE MouseWarp patch + warning fixCampbell Barton
[#19854] [bugfix] Fix for broken Rasterizer mouse functions --- This patch fixes the embedded player's ability to control the mouse. For example, hiding and unhiding the mouse cursor did not work in 2.5, nor could the mouse's position be controlled. This was because these parts still needed to be ported to 2.5 window manager code.
2009-11-11Background mode in more working conditions.Martin Poirier
What works: The usual command line options for rendering. All python scripts are loaded (which includes custom properties) Render engines are loaded and can be used -P to run scripts works partially: rna api works ok, not operators. What doesn't: Most operator calls in python. This is a problem with poll functions. (Brecht and Campbell are aware of this already) Changes: -d now also applied with -b (it was ignored before) user file (.B25.blend) now also loaded in bg mode. This helps for custom paths and all. wm is also initialized (it's needed for a lot of context calls) Ghost, however, is not initialized.
2009-11-07- modal keymap for border selectCampbell Barton
- revert circle select keys adjustments & view navigation while selecting (durian guys liked but allowed activating multiple circle select's at once)
2009-10-20Auto SaveBrecht Van Lommel
Auto save is now working again in 2.5. It will also remember now what the location of the original file was when recovering it, so that library links still work and saving the restored file does not save to the temp directory. There is also a new Recover Auto Save operator which will open the filebrowser in the temp directory and show the auto saved .blends. Implemenation Notes: * Timer storage was moved from window to windowmanager, so we can have windowmanager level timers too now, doesn't make sense to have autosave timer attached to a particular window. * FileGlobal now has a filename field storing where the file was saved. Note that this is only used when loading a file through the recover operators, regular file read doesn't use it, so copying the quit.blend manually over the original file will still work as expected. * Jobs timer no longer uses operator now, this seems more like an internal thing, changing keymaps should not make it possible to break the jobs manager. * Autosave is postponed by 10 seconds when a modal operator is running, e.g. transform or file browsing. * Moved setting G.sce in setup_app_data before depsgraph updates, these can use the filename for pointcaches.
2009-10-17wrap the mouse within the region while grabbing so on release the current ↵Campbell Barton
view never changes and less likelyhood of loosing the cursor when running blender on 2+ screens. (assuming the 3d view isnt stretched over both)
2009-10-17Adjustments to continuous grabCampbell Barton
- Use an enum for grab modes rather then boolean options. -- GHOST_kGrabNormal: continuous grab userpref disabled -- GHOST_kGrabWrap: wrap the mouse at the screen bounds * -- GHOST_kGrabHide: hide the mouse while grabbing and restore the mouse where it was initially pressed * GrabWrap is nice for transform and tools where you want some idea where the cursor is, previously I found both restoring the mouse at its original location and restoring at a clamped location was confusing with operators like transform, wrapping is not ideal but IMHO the best of a bad bunch of options. GrabHide is for numbuts, where restoring the mouse at the initial location isnt so confusing.
2009-10-12macro's can set options for the operators they executeCampbell Barton
changed extrude, rip and duplicate to disable proportional editing however this gives a different problem now. Commented in transform.c // XXX If modal, save settings back in scene this changes disables the option whenever the macro used used.
2009-10-10When in localview, MKey moves objects out of localview, added redraw notifiersCampbell Barton
2009-10-08menus are now global (like operators), so for eg, the info add menu and the ↵Campbell Barton
3D add menu can be shared.
2009-10-08Key ConfigurationBrecht Van Lommel
Keymaps are now saveable and configurable from the user preferences, note that editing one item in a keymap means the whole keymap is now defined by the user and will not be updated by Blender, an option for syncing might be added later. The outliner interface is still there, but I will probably remove it. There's actually 3 levels now: * Default builtin key configuration. * Key configuration loaded from .py file, for configs like Blender 2.4x or other 3D applications. * Keymaps edited by the user and saved in .B.blend. These can be saved to .py files as well to make creating distributable configurations easier. Also, user preferences sections were reorganized a bit, now there is: Interface, Editing, Input, Files and System. Implementation notes: * wmKeyConfig was added which represents a key configuration containing keymaps. * wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap. * Modal maps are not wrapped yet. * User preferences DNA file reading did not support newdataadr() yet, added this now for reading keymaps. * Key configuration related settings are now RNA wrapped. * is_property_set and is_property_hidden python methods were added.
2009-10-08WM: test with context-less add notifier. Notifiers are oneBrecht Van Lommel
of the main reasons for passing along context, while actually they don't need much context at all. Might be removed again, but would like to have this especially for RNA API functions.
2009-10-08- made ungrab a second function - WM_cursor_ungrabCampbell Barton
- ungrab can restore the position of the mouse clamped to the window bounds (much nicer for transform)
2009-10-07Experimental option to allow moving the mouse outside the view, "Continuous ↵Campbell Barton
Grab" in the user-prefs. - Useful for dragging buttons to the far right when theyd otherwise hit the screen edge. - Useful for transform though probably NOT what you want when using the transform manipulator (should make an option). - When enabled, number buttons use this as well as a different conversion of mouse movement float numbuts: mouse 1px == 1-clickstep int numbuts: 2px == 1 (tried 1:1 but its too jitter prone) details... - access as an option to GHOST_SetCursorGrab(grab, warp) - Currently all operators that grab use this, could be made an operator flag - only Ghost/X11 supported currently
2009-09-30Render & Compositing Thread FixesBrecht Van Lommel
* Rendering twice or more could crash layer/pass buttons. * Compositing would crash while drawing the image. * Rendering animations could also crash drawing the image. * Compositing could crash * Starting to rendering while preview render / compo was still running could crash. * Exiting while rendering an animation would not abort the renderer properly, making Blender seemingly freeze. * Fixes theoretically possible issue with setting malloc lock with nested threads. * Drawing previews inside nodes could crash when those nodes were being rendered at the same time. There's more crashes, manipulating the scene data or undo can still crash, this commit only focuses on making sure the image buffer and render result access is thread safe. Implementation: * Rather than assuming the render result does not get freed during render, which seems to be quite difficult to do given that e.g. the compositor is allowed to change the size of the buffer or output different passes, the render result is now protected with a read/write mutex. * The read/write mutex allows multiple readers (and pixel writers) at the same time, but only allows one writer to manipulate the data structure. * Added BKE_image_acquire_ibuf/BKE_image_release_ibuf to access images being rendered, cases where this is not needed (most code) can still use BKE_image_get_ibuf. * The job manager now allows only one rendering job at the same time, rather than the G.rendering check which was not reliable.
2009-09-182.5: Python operators now have a working poll() function,Brecht Van Lommel
solved by wrapping all polling in WM_operator_poll and adding a special callback for python.
2009-09-182.5: Handlers are now evaluated in a different order, fixing someBrecht Van Lommel
issues like Shift+R (repeat last) not giving capital R in the text editor. There is also new modal handler list at the window level, and the API call will always add it to that one now, since modal handlers were not used in other levels. The order used to be: * window modal + keymap * area modal + keymap * region modal + keymap Now it is: * window modal * region keymap * area keymap * window keymap
2009-09-18Keymaps now have a poll() function, rather than adding/removingBrecht Van Lommel
their handlers based on notifiers, which is simpler and more reliable. This fixes for example editmode or uv edit keymaps not working when creating a new 3dview or image space.
2009-09-122.5 filebrowserAndrea Weikert
Appending and Linking * Linking Operator, invokes filebrowser for Append/Link * Separated the append/link function into three parts: ** BLO_library_append_begin finds main for appending ** BLO_library_append_named_part appends one Object,Group, Material, ... ** BLO_library_append_end actually reads and expands the libraries NOTE 1: I also changed the returned properties for the filebrowser operators to the following convention: "path" - the full path to a file or directory, means what is in directory + filename buttons in filebrowser "directory" - the content of the directory button in filebrowser "filename" - the content of the filename button in filebrowser Usually only path should be required, but in some cases it might be more convenient to retrieve the parts separately. Ton, Brecht: If you have time to take a look, let me know if anything needs to be fixed.
2009-09-04allow execution mode to be given as an argument to operators from python ↵Campbell Barton
(requested by algorith) example. bpy.ops.tfm.rotate('INVOKE_REGION_WIN', pivot=(0,1,2), ......) bpy_array.c - was too strict with types, 0 should be allowed as well as 0.0 in a float array.
2009-08-162.5/RNA:Nicholas Bishop
* Added Context access to RNA_property_as_string. This is needed for doing a Python call to the object mode set operator, which has a dynamic enum property that needs context.
2009-07-30better blender doesnt look idiot for siggraph with tips wider then the screen.Campbell Barton
only show operator args in the tooltip that are different from the defaults.
2009-07-30- include operator commands in tooltips (needs sanitizing for transform ↵Campbell Barton
operators, there are massive :|) - WM_operator_pystring can now be used with an operator type and properties (rather then a wmOperator instance) - removed menus from file selector
2009-07-292.5Ton Roosendaal
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-282.5Ton Roosendaal
Fix in include file, missing 'struct'
2009-07-282.5Ton Roosendaal
Keymap feature: RightMouse in pulldown menus allows to assign a new hotkey.
2009-07-282.5: File browserBrecht Van Lommel
* 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-262.5Ton Roosendaal
First step towards keymap editor! Before getting too excited: - doesn't save yet - no rna properties can be defined - no insert/remove keymap options yet - no option yet to set 'key press/release' But what does work; - Keymap list is in outliner, new category (Keymaps are listed in order as being created now) - enable/disable a keymap entry: click on dot icon - it displays python api names for ops - browse new operator for keymap (menu button) - set keymap to use other keys, mouse or tweak events - four modifier key options I first intent to test it all well, there are still quite some modal map conflicts (like border select) and there's problems assigning items to tweaks Another issue is that a visual editor for keymaps might be quite hard to use... the amount of data and options is just not so fun for a buttons menu. There are ways to improve this though. Maybe do this via a script?
2009-07-242.5Ton Roosendaal
New feature: allowing to open temporarily windows for output. Implemented for: - Render output (use output menu "new window" option). - User Preferences (alt+U, plus added in 'File' menu) Currently the window opens where your mouse is. The Render window works as usual, with ESC or F11 moving it to back or front again. That allows the window position to remain where you moved it on new renders. If you close a render window when it renders, the render thread will be killed. User prefs show 'info window' now... i thought we'd use outliner? Anyhoo, I've made the 'save settings' to close the 2nd window as well. Opening a secondary file window for save I'll check on later, this has to be checked with the current event system still. the WM_window_open_temp() api call for this maintains currently a *single* temp window. If you have a render window open, and call for the preferences, the render window will be used for it. And the other way around. On closing the blender window, the temp windows close automatically when there's no regular window open, and blender quits.
2009-07-242.5: Top MenuBrecht Van Lommel
* Clean up File menu, added back recover last session op. * .blend compress now behaves a bit different, previously it would only respect the user preference. Now it saves existing files the same way they are saved, and new files following the user preference. The save operator has a Compress toggle in the file browser left panels now. * Add menu working again, some fixes to make these operators work outside the 3d view were needed. * Timeline menu removed, its contents will be moved to the timeline header menus. * Game menu can now start game, changed the start game op to choose another 3d view if none is available. * Render menu has a few items now. * Help menu contains a few links again.
2009-07-212.5Ton Roosendaal
Modal keymaps. I've tried to make it as simple as possible, yet still using sufficient facilities to enable self-documenting UIs, saving/reading in files, and proper Python support. The simplicity is: the 'modal keymap' just checks an event, uses event matching similarly to other keymap matching, and if there's a match it changes the event type, and sets the event value to what the modal keymap has defined. The event values are being defined using EnumPropertyItem structs, so the UI will be able to show all options in self-documenting way. This system also allows to still handle hardcoded own events. Tech doc: 1) define keymap - Create map with unique name, WM_modalkeymap_add() - Give map property definitions (EnumPropertyItem *) This only for UI, so user can get information on available options 2) items - WM_modalkeymap_add_item(): give it an enum value for events 3) activate - In keymap definition code, assign the modal keymap to operatortype WM_modalkeymap_assign() 4) event manager - The event handler will check for modal keymap, if so: - If the modal map has a match: - Sets event->type to EVT_MODAL_MAP - Sets event->val to the enum value 5) modal handler - If event type is EVT_MODAL_MAP: - Check event->val, handle it - Other events can just be handled still Two examples added in the code: editors/transform/transform.c: transform_modal_keymap() editors/screen/screen_ops.c: keymap_modal_set() Also: to support 'key release' the define KM_RELEASE now is officially used in event manager, this is not '0', so don't check key events with the old convention if(event->val) but use if(event->val==KM_PRESS)
2009-07-18missed this file in last commit.Campbell Barton