Age | Commit message (Collapse) | Author |
|
- calling menu use exec rather then invoke
|
|
|
|
|
|
mouse/tablet/key event happened => enables some actions in inactive windows as per OSX standard
Previous code was assuming an event can only be sent from the active window.
On OSX, Right, Middle mouse buttons, mouse wheel and trackpad events are sent to inactive windows too.
For example, this allows to zoom, pan the view without changing the window order.
|
|
This commit adds a few more execution contexts for operators, given the increasing tendency for some special regiontypes to exist within areas that must have their own set of special operators.
Examples of these include the "channel" operators in the Animation Editors (i.e. those in the 'Channels' menu), and the "Fit to Preview Window" operator for the Sequencer.
Previously, operators such as these would not function when clicked on from the menus, and they would not show the hotkeys they were mapped to.
Also, fixed a few operator definitions in the Animation Editors which were missing ot->prop defines. This meant that some hotkeys (mainly selection) were shown incorrectly in the menus.
|
|
Sensor and Controllers: small fixes and suggestion (comments) for future improvement - mainly to replace text properties to material, text or object datablocks.
Actuators done:
* IPO
* CAMERA
Actuators to be done:
All the others (their structure is in the file)
Adding NC_LOGIC
** If someone want to help on that:
Files used for actuator RNA:
- logic_window.c
- DNA_actuator_types.h
*** my first big RNA operation. critics/suggestions are welcome
**** padded some DNA variables that were not been used.
|
|
operator itself.
|
|
should find a better way to get this matrix for the UI.
|
|
The problem was that wmPushMatrix/wmOrtho/.. and similar functions did not
work well for offscreen rendering. It would have been possible to make a
fake subwindow for this, but I decided to just remove this extra layer as
it does not seem to have much purpose and has been quite confusing when
trying to fix other bugs. The relevant matrices are already stored in
RegionView3D so there will be no increase in calls to glGetFloat, which may
have been a performance reason to use this system in the past.
|
|
on e.g. resizing windows.
|
|
and made that the default for windows software opengl because that
seems to be working better at least on XP. Previously this could only
be specified from the command line.
|
|
When the user double-clicks on a document file in the Finder, OSX doesn't simply give the filename as a command-line argument when calling Blender, as it is done in other OSes.
Instead, it launches the app if needed, and then sends an "openFile" event.
The user can also open a document file by dropping its icon on the app dock icon. But as this is not real Drag'n'drop, I've renamed the Ghost event to a less confusing "GHOST_kEventOpenMainFile" name.
DND Ghost wiki page updated : http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DragnDrop
|
|
set the draw method to triple buffer or overlap depending on the
configuration. Ideally I could get all cases working well with triple
buffer but it's hard in practice. At the moment there are two cases
that use overlap instead:
* opensource ATI drives on linux
* windows software renderer
Also added a utility function to check GPU device/os/driver.
|
|
view, and be stuck there permantenly when leaving the region. Now the
button interaction is cancelled when starting a modal operator, not too
happy about this, but couldn't think of another way to detect this well.
|
|
cleanup compiler warnings about redefined definitions (mingw)
|
|
allowed to show menus in end. But, report API doesn't have a type for this
yet... has been noted, and will be checked soon.
|
|
account in quad split 3d view. Now WM_OP_EXEC/INVOKE_REGION_WIN
context stays in the current region if it is already a region
of type window, so the operator gets executed in the right context.
|
|
printing errors when that keymap included python operators.
|
|
- Icons for brushes disabled List Box to work (paint buttons)
- Mouse-release in secondary Blender windows didn't get registered
in window where mouse-press initiated.
And fixed annoyance: adding image strip makes it 25 frames long, so
you can drag and extend it easily.
|
|
Python operators calling C operators would get too many undo pushes,
causing redo of the python operator not to work. Now the depth of
operator callbacks is counted to detected nested calls, and in that
case skip the undo/register here, and only do a single undo/register
for the mother operator.
|
|
|
|
- Keyconfig are now marked as user_defined when it is the case
- Import keyconfig operator: select an exported keyconfig .py file, copies it to the scripts folder (keep the original copy if wanted, default True), imports and select as active config. The active keyconfig is stored in the user default file, so that still has to be saved after import.
- Remove keyconfig operator and button next to the keyconfig name (poll False if not user_defined). Removes the keyconfig from the list and deletes the file from the folder.
Remaining bug: The file is copied in the user defined script folder (if present) or the /scripts/ui folder. The problem is that it might be imported before operators defined in python are imported themselves. One solution would be to use a separate folder for keyconfigs that is imported after all others.
|
|
not do this while modal handlers are running
|
|
be passed a null context (to return non-contextual items).
This is set on keymap item operator properties and macro definition operator properties to make them non-contextual (since the context at definition time is most likely not the same then at execution time, it's better to have all options visible).
This removes some more errors in keymap export and import.
This commit also sanitize some enum item function, making sure they can cope with null context and have usable defaults in that case.
|
|
|
|
Store last mmb event value to make emulation work when modifier keys are released first.
This is done in a not so nice way for now. Eventually, I'd like for emulation keys to have their own data structures (user creatable and all that)
|
|
would crash when in transform and moving the mouse over another window.
|
|
- keymap item was missing NULL check crash
- editmode object in inactive layer crash
|
|
The 'save over' popup was only appearing based on a string comparison of the operator name ("Save"). Changed this to use a hidden operator property: "check_existing". Python operators must
have this property for the file selector confirmation too.
This property can also be set to false, to prevent checking for existing files, useful in the File->Save menu item to prevent the dangerously missable confirmation popup.
|
|
Blender too now! :)
** Drag works as follows:
- drag-able items are defined by the standard interface ui toolkit
- each button can get this feature, via uiButSetDragXXX(but, ...).
There are calls to define drag-able images, ID blocks, RNA paths,
file paths, and so on. By default you drag an icon, exceptionally
an ImBuf
- Drag items are registered centrally in the WM, it allows more drag
items simultaneous too, but not implemented
** Drop works as follows:
- On mouse release, and if drag items exist in the WM, it converts
the mouse event to an EVT_DROP type. This event then gets the full
drag info as customdata
- drop regions are defined with WM_dropbox_add(), similar to keymaps
you can make a "drop map" this way, which become 'drop map handlers'
in the queues.
- next to that the UI kit handles some common button types (like
accepting ID or names) to be catching a drop event too.
- Every "drop box" has two callbacks:
- poll() = check if the event drag data is relevant for this box
- copy() = fill in custom properties in the dropbox to initialize
an operator
- The dropbox handler then calls its standard Operator with its
dropbox properties.
** Currently implemented
Drag items:
- ID icons in browse buttons
- ID icons in context menu of properties region
- ID icons in outliner and rna viewer
- FileBrowser icons
- FileBrowser preview images
Drag-able icons are subtly visualized by making them brighter a bit
on mouse-over. In case the icon is a button or UI element too (most
cases), the drag-able feature will make the item react to
mouse-release instead of mouse-press.
Drop options:
- UI buttons: ID and text buttons (paste name)
- View3d: Object ID drop copies object
- View3d: Material ID drop assigns to object under cursor
- View3d: Image ID drop assigns to object UV texture under cursor
- Sequencer: Path drop will add either Image or Movie strip
- Image window: Path drop will open image
** Drag and drop Notes:
- Dropping into another Blender window (from same application) works
too. I've added code that passes on mousemoves and clicks to other
windows, without activating them though. This does make using multi-window
Blender a bit friendler.
- Dropping a file path to an image, is not the same as dropping an
Image ID... keep this in mind. Sequencer for example wants paths to
be dropped, textures in 3d window wants an Image ID.
- Although drop boxes could be defined via Python, I suggest they're
part of the UI and editor design (= how we want an editor to work), and
not default offered configurable like keymaps.
- At the moment only one item can be dragged at a time. This is for
several reasons.... For one, Blender doesn't have a well defined
uniform way to define "what is selected" (files, outliner items, etc).
Secondly there's potential conflicts on what todo when you drop mixed
drag sets on spots. All undefined stuff... nice for later.
- Example to bypass the above: a collection of images that form a strip,
should be represented in filewindow as a single sequence anyway.
This then will fit well and gets handled neatly by design.
- Another option to check is to allow multiple options per drop... it
could show the operator as a sort of menu, allowing arrow or scrollwheel
to choose. For time being I'd prefer to try to design a singular drop
though, just offer only one drop action per data type on given spots.
- What does work already, but a tad slow, is to use a function that
detects an object (type) under cursor, so a drag item's option can be
further refined (like drop object on object = parent). (disabled)
** More notes
- Added saving for Region layouts (like split points for toolbar)
- Label buttons now handle mouse over
- File list: added full path entry for drop feature.
- Filesel bugfix: wm_operator_exec() got called there and fully handled,
while WM event code tried same. Added new OPERATOR_HANDLED flag for this.
Maybe python needs it too?
- Cocoa: added window move event, so multi-win setups work OK (didnt save).
- Interface_handlers.c: removed win->active
- Severe area copy bug: area handlers were not set to NULL
- Filesel bugfix: next/prev folder list was not copied on area copies
** Leftover todos
- Cocoa windows seem to hang on cases still... needs check
- Cocoa 'draw overlap' swap doesn't work
- Cocoa window loses focus permanently on using Spotlight
(for these reasons, makefile building has Carbon as default atm)
- ListView templates in UI cannot become dragged yet, needs review...
it consists of two overlapping UI elements, preventing handling icon clicks.
- There's already Ghost library code to handle dropping from OS
into Blender window. I've noticed this code is unfinished for Macs, but
seems to be complete for Windows. Needs test... currently, an external
drop event will print in console when succesfully delivered to Blender's WM.
|
|
|
|
* Adding new Keying Set paths didn't initialise the id-type setting. Make this default to Object
* Fixed bad poll callbacks for Graph Editor operators working on keyframes, which were expecting F-Curves to be selected too to be eligible for editing. This was often too restrictive, resulting in nothing happening.
* Fixed error with default property for Debug Redraw-Timer Operator not being set. However, this operator is currently still no use, since the info popups are now disabled.
|
|
|
|
@ Tool Shelf
Made the RMB menus for manipulating shortcuts a bit more robust (only dealing with mouse
clicks/key events, rather than all tweaks/timers/etc) and added ability to add key shortcuts for
transform tools from the RMB menu.
|
|
Fix a lot of notifier calls to stop abusing ND_TRANSFORM and use more appropriate data flags.
|
|
several animation editors and the property editor to redraw too, which can really slow things down. added a more specific ND_VIEW3D_TRANSFORM notifier to solve this.
|
|
|
|
brecht).
Works correctly with menu, keymap definitions and keymap export/import.
Properties set in the macro definition overwrite those set by the user (there's no way to see that in the UI at this point).
MISSING: Python operator calling code to fill in the properties hierarchy.
Also contains some keymap export changes by Imran Syed (freakabcd on irc): the exported configuration will use the name of the file and the exported script will select the added configuration when ran.
|
|
replaces another so it can do updates (e.g. dopesheet editor can
sync channel selection).
Also coded a simple optimization for allocating small objects,
based on mempools. It's #ifdef'd out, you can enabled it by
defining OPTIMIZE_SMALL_BLOCKS (e.g. adding -DDOPTIMIZE_SMALL_BLOCKS to
your compiler flags).
We suffer from a great deal of performance loss from the system allocator
(vgroups, ghash, edgehash, the singly-linked list implementation in blenlib,
editmesh, and likely a great many areas I'm forgetting), and this is the
common solution for handling the many-small-objects problem. It's not
really production-ready yet (it's long-term memory consequencers need to
be profiled first, and the implementation tweaked as necassary), but for
people on systems with slow system allocators it's worth trying.
Note that since this creates a guardedalloc<->blenlib link, the build systems
need to be updated accordingly (I've already done this for scons, though I'm
not sure if the player builds).
|
|
from Sergey Sharybin (nazgul)
- added own minor changes.
|
|
|
|
|
|
NC_WINDOW notifier as well as NC_SCREEN, since both have changed.
|
|
property if it wasnt found.
this is too arbitrary and could break if roperty order is changed.
store the property in the operator type that is to be used for menu and enum search func's.
python function for searching operator enums on invoke. (just need dynamic python enums now)
wm.invoke_search_popup(self)
|
|
This can search operators enum property.
Make proxy menu could easily get too big. use the new search popup.
|
|
|
|
Converted Command+LMB to send a RMB click event on Mac OS X, if Emulate 3 Button Mouse is switched on.
Also fixes for previous commit, didn't all go through.
|
|
RNA notifiers don't have a window and didn't get picked up correctly by the animation redraw system. If there's no window defined in a scene notifier, handle it anyway if the scene matches (or if there aren't any).
|
|
in modes other than object and edit
Was caused by event emulation (numpad and mmb) happening separately at each level of the keymap, so brush selection was latching on the event before it had time to test emulated values with view navigation entries (at a lower level in the hierarchy).
After discussion with Matt, decided that event emulation should be done at the root of the event loop, replacing the event with the emulated values. This is much more predictable and more logical as far as event emulation goes.
|
|
on new screens. Was preventing openGL render and possibly other
things from working
|