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
2009-06-20ContextBrecht Van Lommel
Python dir(context) now gives the items from the data context too, modified context callbacks to also return a list of items in the context.
2009-06-162.5: Text editor, port menu code to python.Brecht Van Lommel
2009-06-16RNABrecht Van Lommel
* Added icon to property and enum property items. The latter is responsible for the large number of files changed. * For RNA functions, added PROP_RNAPTR flag to ask for a PointerRNA as argument instead of a C pointer, instead of doing it implicitly with the AnyType type. * Material: properly wrap diffuse/specular param variables, and rename some things for consistency. * MaterialTextureSlot: added "enabled" property (ma->septex). * Image: make animated property editable. * Image Editor: make some things editable, notifiers, respect state. * Context: fix issue with screen not being set as ID.
2009-06-14Blender/Python APICampbell Barton
Send the full python stack trace to the reporting api, added BPY_exception_buffer which temporarily overrides sys.stdout and sys.stderr to get the output (uses the io module in py3 StringIO in py2 to avoid writing into a real file), pity the Py/C api has no function to do this. fix for crash when showing menu's that have no items.
2009-06-13text live_edit feature useful for UI scripts (run python scripts on every ↵Campbell Barton
keystroke, careful with the os module) http://www.graphicall.org/ftp/ideasman42/realtime_ui.ogv current kerning makes this a bit cryptic.
2009-05-292.5: fix text editor issue with scrolling and an invalid memory read.Brecht Van Lommel
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-05-15UI: Layout EngineBrecht Van Lommel
* Buttons are now created first, and after that the layout is computed. This means the layout engine now works at button level, and makes it easier to write templates. Otherwise you had to store all info and create the buttons later. * Added interface_templates.c as a separate file to put templates in. These can contain regular buttons, and can be put in a Free layout, which means you can specify manual coordinates, but still get nested correct inside other layouts. * API was changed to allow better nesting. Previously items were added in the last added layout specifier, i.e. one level up in the layout hierarchy. This doesn't work well in always, so now when creating things like rows or columns it always returns a layout which you have to add the items in. All py scripts were updated to follow this. * Computing the layout now goes in two passes, first estimating the required width/height of all nested layouts, and then in the second pass using the results of that to decide on the actual locations. * Enum and array buttons now follow the direction of the layout, i.e. they are vertical or horizontal depending if they are in a column or row. * Color properties now get a color picker, and only get the additional RGB sliders with Expand=True. * File/directory string properties now get a button next to them for opening the file browse, though this is not implemented yet. * Layout items can now be aligned, set align=True when creating a column, row, etc. * Buttons now get a minimum width of one icon (avoids squashing icon buttons). * Moved some more space variables into Style.
2009-05-06Big, big commit!!Diego Borghetti
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2 2) Remove the old bmfont 3) Remove ftfont and bFTGL library 4) Implement a new BLF_draw_default function for place that still need/use the old BMF api. I try to update both, scons and cmake, but I only can test with make, so hope all work fine. MSVC is broken, but I don't have Windows, things to search and fix are any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont). Always have to link/include the freetype2 library Remove any reference to libbmfont Remove any reference to libftfont Remove any reference to libbftgl (or libbFTGL)
2009-04-27UI:Brecht Van Lommel
* Made separator item work horizontal & vertical. * Add colon (:) automatic for int/float/enum/string. * Added space variables to uiStyle and use them in the layout engine. * Added initial World buttons by Thomas Dinges, thanks! * Added some code for modifiers in the Object Data context. This will become a template though. * Use a common poll() callback in the scripts to reduce code.
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.
2009-04-202.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender ↵Brecht Van Lommel
-r19323:HEAD Notes: * blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-19RNA:Brecht Van Lommel
* Wrapped HeaderType/Header. * Some tweaks to get type properties wrapped with less code. * Made Panel space and region types enum instead of string.
2009-04-19RNA: Generic Type RegistrationBrecht Van Lommel
The Python API to define Panels and Operators is based on subclassing, this makes that system more generic, and based on RNA. Hopefully that will make it easy to make various parts of Blender more extensible. * The system simply uses RNA properties and functions and marks them with REGISTER to make them part of the type registration process. Additionally, the struct must provide a register/unregister callback to create/free the PanelType or similar. * From the python side there were some small changes, mainly that registration now goes trough bpy.types.register instead of bpy.ui.addPanel. * Only Panels have been wrapped this way now. Check rna_ui.c to see how this code works. There's still some rough edges and possibilities to make it cleaner, though it works without any manual python code. * Started some docs here: http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNATypeRegistration * Also changed some RNA_property and RNA_struct functions to not require a PointerRNA anymore, where they were not required (which is actually the cause of most changed files).
2009-04-16UI:Brecht Van Lommel
* Don't call generic layout hints templates anymore, i.e. TemplateRow becomes Row, etc. * Added more general layout nesting, using uiLayoutSplit() and uiLayoutBox() functions, for which the sublayouts can then be accessed using uiLayoutSub(), to put items in those sublayouts. * Some steps to make the layout decisions, like which items to put in which columns, independent of the width of the window or the text in the buttons. We want the layout to be stable under resizes and translations. * Added an "expand" parameter to uiItemR, used now to expand enums into a row instead of using a menu.
2009-04-142.5Ton Roosendaal
More cleanup! - removed old UI font completely, including from uiBeginBlock - emboss hints for uiBlock only have three types now; Regular, Pulldown, or "Nothing" (only icon/text) - removed old font path from Userdef - removed all old button theme hinting - removed old "auto block" to merge buttons in groups (was only in use for radiosity buttons) And went over all warnings. One hooray for make giving clean output :) Well, we need uniform definitions for warnings, so people at least fix them... here's the real bad bugs I found: - in mesh code, a call to editmesh mixed *em and *me - in armature, ED_util.h was not included, so no warnings for wrong call to ED_undo_push() - The extern Py api .h was not included in the bpy_interface.c, showing a several calls using different args. Further just added the missing includes, and removed unused vars.
2009-04-11UI:Brecht Van Lommel
* Template slots are no longer specified per item, but are a state now, set with uiTemplateSlot. * Some renaming of Layout functions for consistency. * Fix for roundbox in stack template, now is always behind the other buttons. * Improved python API for layout: http://www.pasteall.org/5008/python
2009-04-102.5Ton Roosendaal
Grand cleanup: - removal of FTF and ftfont dir - removal of text.c which wrapped it - wrapped old text drawing code temporarily, need to decide how 'style' will behave per editor when you draw strings outside interface code.... wouldn't be very useful to set fonts locally all over?
2009-03-29UI:Brecht Van Lommel
* Added a PanelType and HeaderType for registering panels and headers in regions. When the region draws, it will then automatically draw the ones that were registerd with poll and draw callbacks. Used for text header, properties and object buttons now.
2009-03-29- renamed CURVE_OT_select_inverse -> CURVE_OT_select_invertCampbell Barton
- TEXT_OT_scroll_bar and TEXT_OT_scroll ops had the lines property default/min/max args swapped around.
2009-03-29- use clear, set, add, enable, disable and toggle as a prefix in operator namesCampbell Barton
- use select as a suffix eg UV_OT_loop_select -> UV_OT_select_loop - Each select all operator was using slightly different wording... select_all, deselect_all, de_select_all, select_de_select_all -> select_all_toggle - selection -> select - POSE_OT_select_connected -> POSE_OT_select_linked to match other operators - NODE_OT_delete_selection -> NODE_OT_delete since its not used in other operators - ANIM_OT_previewrange_define -> ANIM_OT_previewrange_set to match other operators - NODE_OT_fit_all -> NODE_OT_view_all to match other operators - View2D_OT_* -> VIEW2D_OT_* to match VIEW3D - View2D_OT_view_downscroll -> VIEW2D_OT_scroll_down more logical - removed MARKER_OT_mouseselect_extend and made extend a boolean property of MARKER_OT_mouseselect - MARKER_OT_mouseselect -> MARKER_OT_select - GROUP_OT_group_remove -> GROUP_OT_objects_remove more logical since its removing objects from groups - MESH_OT_removedoublesflag -> MESH_OT_remove_doubles - redundant words MESH_OT_split_mesh -> MESH_OT_split, OBJECT_OT_object_delete -> OBJECT_OT_delete renamed selection operator properties extend_select -> extend column_select -> column select_children_only -> children_only ... Since these are all in the context of selection operators there is no need for the extra 'select' in the property name. Updated docs http://www.graphicall.org/ftp/ideasman42/html/bpyoperator-module.html
2009-03-27* sequencer transform needs t->data not to be freed by postTrans so ↵Campbell Barton
special_aftertrans_update can use it. * text header needs a static char* so text is not rendered as gibberish. (until labels own their own strings) * epy_doc_gen.py - write out a graphviz representation of the data api.
2009-03-19ContextBrecht Van Lommel
* Made it based on string lookups rather than fixed enum, to make it extensible by python scripts. * Context callbacks now also have to specify RNA type when returning pointers or collections. For non-RNA wrapped data, UnknownType can be used. * RNA wrapped context. The WM entries are fixed, for data context only main and scene are defined properties. Other data entries have to be dynamically looked up. * I've added some special code in python for the dynamic context lookups. Tried to hide it behind RNA but didn't find a clean way to do it yet. Still unused/untested. * Also minor fix for warning about propertional edit property in transform code, and fix for usage of operator poll with checking if it was NULL.
2009-03-182.50: some warning fixes.Brecht Van Lommel
2009-03-132.5: UI Layout Engine, initial code.Brecht Van Lommel
* As a test, used by: * Object buttons, tried to make it match the mockup. * Text window header. * Text window properties panel. * Panel interaction with view2d is still problematic, need to make this work properly still. * Templates are very basic, the ones there are simple but already can follow the object buttons mockup quite closely. * It's based on a three level system: panels, templates and items. To get an idea of what that means in practice, see: http://wiki.blender.org/index.php/BlenderDev/Blender2.5/UI_LayoutEngine#Panels.2C_Templates_and_Items
2009-03-062.5 / SConsNathan Letwory
* make sure we can still compile WITH_BF_PYTHON=0
2009-03-04run script in the text editor is back. UI scripts dont work yet.Campbell Barton
2009-03-02scons errorCampbell Barton
2009-03-022.5: bugfix, new text space was not initialized correct.Brecht Van Lommel
2009-03-012.5: Text Editor back.Brecht Van Lommel
There was very little structure in this code, using many globals and duplicated code. Now it should be better structured. Most things should work, the main parts that are not back yet are the python plugins and markers. Notes: * Blenfont is used for drawing the text, nicely anti-aliased. * A monospace truetype font was added, since that is needed for the text editor. It's Bitstream Vera Sans Mono. This is the default gnome terminal font, but it doesn't fit entirely well with the other font I think, can be changed easily of course. * Clipboard copy/cut/paste now always uses the system clipboard, the code for the own cut buffer was removed. * The interface buttons should support copy/cut/paste again now as well. * WM_clipboard_text_get/WM_clipboard_text_set were added to the windowmanager code. * Find panel is now a kind of second header, instead of a panel. This needs especially a way to start editing the text field immediately on open still. * Operators are independent of the actual space when possible, was a bit of puzzling but got it solved nice with notifiers, and some lazy init for syntax highlight in the drawing code. * RNA was created for the text editor space and used for buttons. * Operators: * New, Open, Reload, Save, Save As, Make Internal * Run Script, Refresh Pyconstraints * Copy, Cut, Paste * Convert Whitespace, Uncomment, Comment, Indent, Unindent * Line Break, Insert * Next Marker, Previous Marker, Clear All Markers, Mark All * Select Line, Select All * Jump, Move, Move Select, Delete, Toggle Overwrite * Scroll, Scroll Bar, Set Cursor, Line Number * Find and Replace, Find, Replace, Find Set Selected, Replace Set Selected * To 3D Object * Resolve Conflict
2009-01-302.5: UI & MenusBrecht Van Lommel
* Cleaned up UI_interface.h a bit, and added some comments to organize things a bit and indicate what should be used when. * uiMenu* functions can now be used to create menus for headers too, this is done with a uiDefMenuBut, which takes a pointer to a uiMenuCreateFunc, that will then call uiMenu* functions. * Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are specific to making popup menus. Will convert the other conformation popup menu functions to use this too so we can remove some code. * Extended uiMenu functions, now there is is also: BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator. * Converted image window headers to use uiMenu functions, simplifies menu code further here. Did not remove the uiDefMenu functions as they are used in sequencer/view3d in some places now (will fix). * Also tried to simplify and fix bounds computation a bit better for popup menus. It tried to find out in advance what the size of the menu was but this is difficult with keymap strings in there, now uiPopupBoundsBlock can figure this out afterwards and ensure the popup is within the window bounds. Will convert some other functions to use this too.
2009-01-042.5Ton Roosendaal
Small cleanup in region-based cursor handling. - callback was in spacetype, now in regiontype - made screen listener catch ND_MODE notifier and call the active region cursor callback, if it's there.
2008-12-26UI: PanelsBrecht Van Lommel
* API and usage is basically the same still. * Panels were moved to region level. I first thought of keeping them at area level, but having them at region level it's simpler to handle events and do drawing, and also to integrate with view2d. They can still become area level overlapping regions, if we make a floating (or docked) region that can contain panels. * Added back a few panels from the scene buttons for testing. Issues still: * The view2d handling and alignment refresh of panels is not correct yet in the buttons window. * I did not yet bring back the block handlers system. It was basically a system that stored which panel was open and where the events for that panel would go. Just a few functions, but not sure how it fits in 2.5. * There was a case where dragging panels would not properly remove the window level handler, but could not redo anymore even though I don't think I fixed it. * Some text in the panels goes past the end of the button, that is due to the checkmark button drawing, not related to this commit. Other UI code changes: * Renamed interface.h to interface_intern.h for consistency. * Fixed some issues with freeing of blocks when they changed due to context. * uiDrawBlock now takes a context pointer (mostly for block drawextra).
2008-12-242.5 / SConsNathan Letwory
New priorities for most libs, at least core. This is still for Blender proper, BGE and such still to come.
2008-12-232.5 / SConsNathan Letwory
Blender builds and links on Linux. For now without BGE and its player, but that will come. Priorities are still a mess, so expect more commits soon.
2008-12-222.5Ton Roosendaal
Small area/space api fix: space->new() callbacks now require Context pointer. Too many cases you want to initialize stuff... Also: added dummy draw function for NLA channel region, was too ugly.
2008-12-192.5Ton Roosendaal
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-182.5Brecht Van Lommel
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-17View2D: Cleanup of presets and fixed errors in various viewsJoshua Leung
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-16View2D: Presets for Initialising ViewsJoshua Leung
Improved the View2D API so that initialising View2D data in init() callbacks (called on new regions and also on resizing regions) for regions is easier. Added a few preset view configurations for use when initialising new views. Views with the V2D_IS_INITIALISED flag set will not be reinitialised in the init() callbacks. Currently, some of these configurations will set/override all settings (like V2D_COMMONVIEW_LIST and V2D_COMMONVIEW_HEADER), while other ones serve a more supplimentary role (i.e. V2D_COMMONVIEW_TIMELINE only sets the x-axis settings, relying on the region to have already set the relevant y-axis settings). The future of such supplimentary configurations is yet to be seen, as I'm currently not sure whether they will cause the code to become too confusing, as you'd have to keep track of which settings belong/are set where. So far, only a few areas have been ported to use this. Tomorrow I'll check on a few more. As this commit touches a lot of files, hopefully there aren't any critical bugs I've missed here.
2008-12-152.5Ton Roosendaal
Mouse cursors now work again - centralized screen-level cursor changes, no more operator running for it. - spacetypes have callback to check/set individual cursor types. Use notifier SCREEN_CHANGED to make sure it works on mode changes etc. - new calls WM_cursor_modal() and WM_cursor_restore() to make temporarily cursor types during modes. - used above for view2d cursors.
2008-12-152.5Ton Roosendaal
- depricated area "headbutofs" and "headbutlen", which is now fully replaced with view2d handling. - needed to add header default V2D_ALIGN_NO_NEG_Y, V2D_LOCKOFS_Y seems to not do anything atm :) - new: running blender in debug (blender -d) will print the current handler and operator in use (not mousemove)
2008-12-142.5Ton Roosendaal
Basics for the remaining 6 spacetypes. Note: Andrea prefers to merge SpaceImaSel with SpaceFile for that I'll provide a good readfile.c patch later