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
2016-06-22ID-Remap - Step one: core work (cleanup and rework of generic ID datablock ↵Bastien Montagne
handling). This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock was pretty much impossible, except for a few special cases. Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite a few ID usages were missed or wrongly handled that way). One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling by using library_query utils to allow generic handling of those, which is now the case (now, generic ID links handling is only "knwon" from readfile.c and library_query.c). This commit also adds backends to allow live replacement and deletion of datablocks in Blender (so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one, or NULL one in case of unlinking). This will allow nice new features, like ability to easily reload or relocate libraries, real immediate deletion of datablocks in blender, replacement of one datablock by another, etc. Some of those are for next commits. A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core. Though it was tested rather deeply, being totally impossible to check all possible ID usage cases, it's likely there are some remaining issues and bugs in new code... Please report them! ;) Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2015-12-01Cleanup: struct declarationsCampbell Barton
2015-05-13UI: check visible layers when reading contextCampbell Barton
This resolves a problem where selected items edited for multi-value-editig could include objects not in any visible views (unlocked layers, local view... etc).
2015-05-04Fix T44376: Buttons context, invalid data accessCampbell Barton
Removing a scene from the buttons window would crash from a Python operator.
2015-04-27Fix T44011: Ruler/Knife/Loop-cut fail in quad-viewCampbell Barton
This is a kind of sloppy-focus, resolving long standing bug with loop-cut/knife/ruler /w quad-view. Where activating a tool would lock onto one of quad-views, especially problematic when activating from the toolbar or menus.
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-02-12Viewport compositing - first codeAntony Riakiotakis
This commit introduces a few ready made effects for the 3D viewport and OpenGL rendering. Included effects are Depth of Field, accessible from camera view and screen space ambient occlusion. Those effects can be turned on and tweaked from the shading panel in the 3D viewport. Off screen rendering will use the settings of the current camera. WIP documentation can be found here: http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing
2015-01-21BKE_screen: add BKE_screen_find_area_xyCampbell Barton
Use from eyedropper & screen operators also define SPACE_TYPE_ANY for readability.
2015-01-07PyAPI: Call to get the pixel x,y in a text blockMartin Felke
This allows scripts to request the screen location of any (line, column) pair.
2014-09-02Fixes localview and view-local layersCampbell Barton
- Drawing grease pencil fail without scene-lock. - Converting to curve failed without scene-lock. - Outliner drag into viewport failed with local-view.
2014-02-07Quiet warningCampbell Barton
2013-12-16UI: Tabs categories for panels (D75)Campbell Barton
- works by defining panel categories, currently restricted to the toolbar. - no panels define bl_categories yet, so no user visible changes since tabs only show when there are multiple. - panel pinning is available in rmb menu or alt+lmb.
2013-11-25Transform: old todo, removing an orientation now checks all screens.Campbell Barton
also fix for using uninitialized matrix when an out-of-range index is set for custom orientations.
2013-08-29Last uiList patch (for now!): filtering and reordering of shown elements.Bastien Montagne
Thanks to Brecht for the reviews. :) This commit adds a show/hide extension below each uiList, containing by default an option to filter and/or reorder items by name (and to reverse those filtering and reordering). Each derived uiList class in Python can define more specific filtering by implementing callbacks: the draw_filter() function to draw options in UI, and the filter_items() function to effectively filter/reorder items. Note: the advanced options for vgroups shown as "proof od concept" in patches do not go in trunk for now, we have to find a better way to get those vgroups info for UI code, we can't afford to loop over each vertex here! And doc (release notes and uiList example) is still to be updated, will do this in next days.
2013-08-11BGE: Fixing the memory leaks reported when the BlenderPlayer exits.Mitchell Stokes
They were caused by not having a free_windowmanager_cb set and by not having registered SpaceTypes, which meant data allocated for thosse SpaceTypes could not be freed. These were solved by defining a free_windowmanager_cb for the player that just frees wmWindows, and by making sure we only allocate memory for registered SpaceTypes.
2013-06-25Fix unnecessary 3D viewport redraws in various cases, in particular when editingBrecht Van Lommel
node materials. Area and region listener callbacks now get the screen and area pointers passed, so they can do more fine grained checks to see if redraw is really needed, for example depending on the 3D view drawtype.
2013-03-15Screen: add exit callback for area and region types, this gets called whenBrecht Van Lommel
hiding or removing an area or region.
2013-03-15Add the possibility to define the translation context for py rna classes ↵Bastien Montagne
(operators, panels and menus). Thanks to Campell and Brecht for the reviews!
2013-01-30Add active region for operator execution.Campbell Barton
This means you can for example, uv unwrap in quad-view and change settings in the toolbar without defaulting back to the first quad-view region available. This may be displayed to the user later, for now this is set on executing registrable operators.
2012-12-28This commit frees list ui items from their dependencies to Panel, and hence ↵Bastien Montagne
from all the limitations this implied (mostly, the "only one list per panel" one). It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels! This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore! To make all this work, other changes were also necessary: * Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox. * DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not. * UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon. * UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews). Note: not sure whether we should add that one to all UILayout's prop funcs? Note: will update addons using template list asap.
2012-08-24Code cleanup: comment referenced an outdated file path + spelling errorNicholas Rishel
2012-05-22A number of new features for the node editor in general and the Frame node ↵Lukas Toenne
in particular. For an detailed user-level description of new features see the following blogpost: http://code.blender.org/index.php/2012/05/node-editing-tweaks/ TL;DR: * Frame node gets more usable bounding-box behavior * Node resizing has helpful mouse cursor indicators and works on all borders * Node selection/active colors are themeable independently * Customizable background colors for nodes (useful for frames visual distinction).
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-05-05code cleanup: function naming, use BKE_*type* prefix.Campbell Barton
2012-03-04style cleanup / comment formatting for bli/bke/bmeshCampbell Barton
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2011-11-15add support for python __doc__ comments in menu classes showing in the ↵Campbell Barton
tooltip, since menus are used as buttons too.
2011-11-04utility function to find the biggest area: BKE_screen_find_big_area(...), ↵Campbell Barton
was being done with static functions that were copied about.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-05-20make api functions for converting rv3d->camzoom, so the odd logic for this ↵Campbell Barton
isn't inlined all over.
2011-03-25Bugfix #26195Ton Roosendaal
When rendering, during processing scene data, drawing in 3d window is now locked. Can get extended to more areas in UI easily. At least this solves all crashes with conflicting memory access in render && 3d drawing. Deleting objects via operators or delete modifiers isn't locked yet. Also fixed: crash on quitting a renderwindow when it was rendering.
2011-02-18doxygen: blenkernel under core as module.Nathan Letwory
2010-04-22chaning the camera from the scene buttons didnt update the views. moved some ↵Campbell Barton
scene/view functions from view3d_view.c into BKE_screen since they need to be accessed when changing cameras from outside the view.
2010-04-06Area Swap: fix memory leak and access to freed memory.Brecht Van Lommel
2010-02-12correct fsf addressCampbell Barton
2010-02-08Operator Execution Contexts Bugfix:Joshua Leung
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.
2010-01-26Drag and drop 2.5 integration! Finally, slashdot regulars can useTon Roosendaal
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.
2009-12-29* speedup for animating bones, in one scene with sintel and a dragon ↵Campbell Barton
animated its over 4x faster. * utility function BLI_findstring to avoid listbase lookup loops everywhere. eg: ListBase *lb= objects= &CTX_data_main(C)->object; Object *ob= BLI_findstring(lb, name, offsetof(ID, name) + 2); * made some more math functions use const's, (fix warnings I made in previous commits)
2009-12-22quite a few python panels (10 or so) had names longer then the PanelType ↵Campbell Barton
allowed, for panels it would fail silently but for menu's it meant further references would give errors. increase the registered class name from 32 to 64 and raise an error if the limit reached.
2009-12-04Cleaning: update a couple of functions to use scene from context instead of ↵Martin Poirier
from screen.
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-06new operator - bpy.ops.wm.call_menu(name="SOME_MT_menu")Campbell Barton
This calls a registered menu as a popup so we can reuse header menus , currently used for Node editor and Sequencer add menu (Shift+A), can be used for toolbox too.
2009-09-14Depsgraph:Brecht Van Lommel
* Move function to compute visible screen layers to BKE. * Use this now in the depsgraph, was still using this all layers to flush. Still missing a way to get the current scene in background mode.. * Also two more function to not require a scene pointer anymore: * DAG_object_update_flags is now DAG_id_update_flags. * DAG_ids_flush_update is now available next to DAG_scene_flush_update.
2009-07-22RNABrecht Van Lommel
* ID blocks can now get RNA properties defined from python, e.g.: bpy.types.Scene.BoolProperty(..) * RNA structs/functions/properties can now get pointers duplicated (mostly strings), since we can't point to some static string then. * Added ExtensionRNA struct to add into *Type structs for subclassing, is a bit more compact than defining the 4 variables each time. Only disadvantage is it requires including RNA in more places.
2009-07-21RNABrecht Van Lommel
* Added suppport for generating code without verifying with DNA, this doesn't give good errors and is more error prone, but makes it easier to wrap things like EditBone which are not in DNA. * RNA_define_verify_sdna(0), and set to 1 again afterwards.
2009-07-022.5Ton Roosendaal
More toolbar functionality for workflow review. - Split the region in two parts, bottom has the Tool Properties, the top part shows 2 panels, one for python defined tools, other for a "tool shelf" which (later) will get saved in files. - Added a full context driven framework for this toolbar, showing the tools depending on 3D window 'mode'. Both python defined tools as the shelf respect this. So - for example - you will see different tools in editmode mesh, as in vertex paint mode, etc. - First template for the python tools will be committed after this commit; it has placeholder tools to just show/test functioning. NOTE: if you had saved a layout that shows tools region, open/close it once to get the new region created for properties. TODO: - Moving paint properties to tool settings - Test a layout with horizontal toolbar (without properties) - Bring back floating panels, and put tool-properties here. (as option)
2009-06-16UIBrecht Van Lommel
* Added option for panel to be closed by default. * Added support for RNA property and enum icons in buttons. * Remove some deprecated RNA menu code. * Fix issue with newly created panels not being inserted in the right place. * Fix issue with 3-split layout not being divided correctly. * FIx issue with menu items not drawing correct using python UI.
2009-05-19UIBrecht Van Lommel
* Fix buttons jumping around when resizing and zoom. Part of this was adding a tiny a 0.001f offset in UI_view2d_view_ortho, otherwise the rounding is unpredictable (used to be 0.375f, but that was disabled). * Fix various issues with zooming, panning panels. V2D_LOCKOFS_X/Y is now taken into account in more places in the view2d code, to avoid zooming into the center or panning out of the view. * Remove "Free" align mode in buttons window (it's not really useful). * View3D/Graph/Image editors now use the same PanelType system as the buttons window, means some deprecated panel code could be removed. * Some small visual tweaks for panels. * View 2D Reset operator (Home key), to reset zoom and panning for panels. * Added argument to set number buttons as sliders (slider=True for itemR). * Ignore labels for button alignment (doesn't look right). * Fix some use of context.main in py scripts, should get data from active object instead. * Fix autotexspace -> auto_texspace in py script.
2009-04-22UIBrecht Van Lommel
* Headers and menus can now be created in python. * Replaced the uiMenuItem functions to create menus with equivalent uiItem functions using a layout, removing duplicated code. * More uiItem functions are now exposed to python. * The text editor header, panels and one of its menus are now created in space_text.py. * Buttons window data context icon new changes depending on active object. Issues * Icons are not wrapped yet, hardcoded ints at the moment. * The ID browse template is unfinished.