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
2008-06-22BGE patch: add state engine support in the logic bricks.Benoit Bolsee
This patch introduces a simple state engine system with the logic bricks. This system features full backward compatibility, multiple active states, multiple state transitions, automatic disabling of sensor and actuators, full GUI support and selective display of sensors and actuators. Note: Python API is available but not documented yet. It will be added asap. State internals =============== The state system is object based. The current state mask is stored in the object as a 32 bit value; each bit set in the mask is an active state. The controllers have a state mask too but only one bit can be set: a controller belongs to a single state. The game engine will only execute controllers that belong to active states. Sensors and actuators don't have a state mask but are effectively attached to states via their links to the controllers. Sensors and actuators can be connected to more than one state. When a controller becomes inactive because of a state change, its links to sensors and actuators are temporarily broken (until the state becomes active again). If an actuator gets isolated, i.e all the links to controllers are broken, it is automatically disabled. If a sensor gets isolated, the game engine will stop calling it to save CPU. It will also reset the sensor internal state so that it can react as if the game just started when it gets reconnected to an active controller. For example, an Always sensor in no pulse mode that is connected to a single state (i.e connected to one or more controllers of a single state) will generate a pulse each time the state becomes active. This feature is not available on all sensors, see the notes below. GUI === This system system is fully configurable through the GUI: the object state mask is visible under the object bar in the controller's colum as an array of buttons just like the 3D view layer mask. Click on a state bit to only display the controllers of that state. You can select more than one state with SHIFT-click. The All button sets all the bits so that you can see all the controllers of the object. The Ini button sets the state mask back to the object default state. You can change the default state of object by first selecting the desired state mask and storing using the menu under the State button. If you define a default state mask, it will be loaded into the object state make when you load the blend file or when you run the game under the blenderplayer. However, when you run the game under Blender, the current selected state mask will be used as the startup state for the object. This allows you to test specific state during the game design. The controller display the state they belong to with a new button in the controller header. When you add a new controller, it is added by default in the lowest enabled state. You can change the controller state by clicking on the button and selecting another state. If more than one state is enabled in the object state mask, controllers are grouped by state for more readibility. The new Sta button in the sensor and actuator column header allows you to display only the sensors and actuators that are linked to visible controllers. A new state actuator is available to modify the state during the game. It defines a bit mask and the operation to apply on the current object state mask: Cpy: the bit mask is copied to the object state mask. Add: the bits that set in the bit mask will be turned on in the object state mask. Sub: the bits that set in the bit mask will be turned off in the object state mask. Inv: the bits that set in the bit mask will be inverted in the objecyy state mask. Notes ===== - Although states have no name, a simply convention consists in using the name of the first controller of the state as the state name. The GUI will support that convention by displaying as a hint the name of the first controller of the state when you move the mouse over a state bit of the object state mask or of the state actuator bit mask. - Each object has a state mask and each object can have a state engine but if several objects are part of a logical group, it is recommended to put the state engine only in the main object and to link the controllers of that object to the sensors and actuators of the different objects. - When loading an old blend file, the state mask of all objects and controllers are initialized to 1 so that all the controllers belong to this single state. This ensures backward compatibility with existing game. - When the state actuator is activated at the same time as other actuators, these actuators are guaranteed to execute before being eventually disabled due to the state change. This is useful for example to send a message or update a property at the time of changing the state. - Sensors that depend on underlying resource won't reset fully when they are isolated. By the time they are acticated again, they will behave as follow: * keyboard sensor: keys already pressed won't be detected. The keyboard sensor is only sensitive to new key press. * collision sensor: objects already colliding won't be detected. Only new collisions are detected. * near and radar sensor: same as collision sensor.
2008-05-08NLA - Bugfix:Joshua Leung
Scale and Repeat fields in NLA Transform Properties panel will now ignore negative values instead of clamping them to a near-zero value, which can easily be confused with the strip being 'destroyed'. This shouldn't affect other interface elements, as this change has only been used here. (Note: negative scaling should be avoided)
2008-04-17Patch from GSR that a) fixes a whole bunch of GPL/BL licenseChris Want
blocks that were previously missed; and b) greatly increase my ohloh stats!
2007-12-12for button popups, dont close unless you click or press escape, this would ↵Campbell Barton
often close when dragging a button value (or when using a tablet I am told)
2007-07-30Font previewJoilnen Leite
2007-05-17Added highlighting of non-existant names and autocomplete forBrecht Van Lommel
specifying the uv layer name in a material. Also added generic autocomplete_begin/do_name/end functions, this code was copied five times.
2007-04-04moved source and text to american spellingCampbell Barton
* colour -> color * centre -> center * normalise -> normalize * modelling -> modeling
2006-12-07Work on RenderLayer and Pass control:Ton Roosendaal
Full log: http://www.blender3d.org/cms/Render_Passes.829.0.html In short: - Passes now have option to be excluded from "Combined". - RenderLayers allow to override Light (Lamp groups) or Material. - RenderLayers and Passes are in Outliner now, (ab)using Matt's nice 'restriction collumns'. :)
2006-11-16New stuff:Ton Roosendaal
- Weight paint options now also show in Nkey panel - added uiNewPanelTitle() in interface API to rename panels. In use now for the Nkey panel title. (Note: original name is identifier, do not change that)
2006-11-11Experimental feature, especially for the animation department:Ton Roosendaal
THE OBJECT PROXY Or simple said; local control of referenced data from libraries. Having library files with references is a very common studio setup, and Blender did do quite well in that area. Were it not that for character setups it was impossible to use still. This commit will enable a full rig+character to remain in the library, and still have - under strict control - local access for animation edits. Full log: http://www.blender3d.org/cms/Proxy_Objects.824.0.html
2006-01-24Giant commit!Ton Roosendaal
A full detailed description of this will be done later... is several days of work. Here's a summary: Render: - Full cleanup of render code, removing *all* globals and bad level calls all over blender. Render module is now not called abusive anymore - API-fied calls to rendering - Full recode of internal render pipeline. Is now rendering tiles by default, prepared for much smarter 'bucket' render later. - Each thread now can render a full part - Renders were tested with 4 threads, goes fine, apart from some lookup tables in softshadow and AO still - Rendering is prepared to do multiple layers and passes - No single 32 bits trick in render code anymore, all 100% floats now. Writing images/movies - moved writing images to blender kernel (bye bye 'schrijfplaatje'!) - made a new Movie handle system, also in kernel. This will enable much easier use of movies in Blender PreviewRender: - Using new render API, previewrender (in buttons) now uses regular render code to generate images. - new datafile 'preview.blend.c' has the preview scenes in it - previews get rendered in exact displayed size (1 pixel = 1 pixel) 3D Preview render - new; press Pkey in 3d window, for a panel that continuously renders (pkey is for games, i know... but we dont do that in orange now!) - this render works nearly identical to buttons-preview render, so it stops rendering on any event (mouse, keyboard, etc) - on moving/scaling the panel, the render code doesn't recreate all geometry - same for shifting/panning view - all other operations (now) regenerate the full render database still. - this is WIP... but big fun, especially for simple scenes! Compositor - Using same node system as now in use for shaders, you can composit images - works pretty straightforward... needs much more options/tools and integration with rendering still - is not threaded yet, nor is so smart to only recalculate changes... will be done soon! - the "Render Result" node will get all layers/passes as output sockets - The "Output" node renders to a builtin image, which you can view in the Image window. (yes, output nodes to render-result, and to files, is on the list!) The Bad News - "Unified Render" is removed. It might come back in some stage, but this system should be built from scratch. I can't really understand this code... I expect it is not much needed, especially with advanced layer/passes control - Panorama render, Field render, Motion blur, is not coded yet... (I had to recode every single feature in render, so...!) - Lens Flare is also not back... needs total revision, might become composit effect though (using zbuffer for visibility) - Part render is gone! (well, thats obvious, its default now). - The render window is only restored with limited functionality... I am going to check first the option to render to a Image window, so Blender can become a true single-window application. :) For example, the 'Spare render buffer' (jkey) doesnt work. - Render with border, now default creates a smaller image - No zbuffers are written yet... on the todo! - Scons files and MSVC will need work to get compiling again OK... thats what I can quickly recall. Now go compiling!
2006-01-08Orange:Ton Roosendaal
- New UI element: the "Curve Button". For mapping ranges (like 0 - 1) to another range, the curve button can be used for proportional falloff, bone influences, painting density, etc. Most evident use is of course to map RGB color with curves. To be able to use it, you have to allocate a CurveMapping struct and pass this on to the button. The CurveMapping API is in the new C file blenkernel/intern/colortools.c It's as simple as calling: curvemap= curvemapping_add(3, 0, 0, 1, 1) Which will create 3 curves, and sets a default 0-1 range. The current code only supports up to 4 curves maximum per mapping struct. The CurveMap button in Blender than handles allmost all editing. Evaluating a single channel: float newvalue= curvemapping_evaluateF(curvemap, 0, oldval); Where the second argument is the channel index, here 0-1-2 are possible. Or mapping a vector: curvemapping_evaluate3F(curvemap, newvec, oldvec); Optimized versions for byte or short mapping is possible too, not done yet. In butspace.c I've added a template wrapper for buttons around the curve, to reveil settings or show tools; check this screenie: http://www.blender.org/bf/curves.jpg - Buttons R, G, B: select channel - icons + and -: zoom in, out - icon 'wrench': menu with tools, like clear curve, set handle type - icon 'clipping': menu with clip values, and to dis/enable clipping - icon 'x': delete selection In the curve button itself, only LMB clicks are handled (like all UI elements in Blender). - click on point: select - shift+click on point: swap select - click on point + drag: select point (if not selected) and move it - click outside point + drag: translate view - CTRL+click: add new point - hold SHIFT while dragging to snap to grid (Yes I know... either one of these can be Blender compliant, not both!) - if you drag a point exactly on top of another, it merges them Other fixes: - Icons now draw using "Safe RasterPos", so they align with pixel boundary. the old code made ints from the raster pos coordinate, which doesn't work well for zoom in/out situations - bug in Node editing: buttons could not get freed, causing in memory error prints at end of a Blender session. That one was a very simple, but nasty error causing me all evening last night to find! (Hint; check diff of editnode.c, where uiDoButtons is called) Last note: this adds 3 new files in our tree, I did scons, but not MSVC!
2005-12-30Orange: daily noodle updates;Ton Roosendaal
- Texture Node: now displays 'intensity values' in node too, and has input, and shows in buttons when activated in Node editor. (no browsing buttons yet...) - New: "Normal Node". This uses a new UI button, which allows to quickly input a normal vector, based on spherical coordinates. The Normal Node has optional vector input, and delivers a dot product then. This can be used as a blending factor between nodes, or for fake extra light in a certain direction. - New: "Geometry Node". This actually replaces the Input node. It offers all coordinates (vectors) as being the starting point for shading and for textures. Note: for preview render this doesn't give much different results yet... this is the start for real render support! - http://www.blender.org/bf/rt5.jpg The two new nodes in action - Bugfix: the "Block" button (which delivers popups) did not return a correct event when nothing happened (mouse moved out), which could cause mouse clicks to be passed on to the queue.
2005-12-28Christmas coding work!Ton Roosendaal
********* Node editor work: - To enable Nodes for Materials, you have to set the "Use Nodes" button, in the new Material buttons "Nodes" Panel or in header of the Node editor. Doing this will disable Material-Layers. - Nodes now execute materials ("shaders"), but still only using the previewrender code. - Nodes have (optional) previews for rendered images. - Node headers allow to hide buttons and/or preview image - Nodes can be dragged larger/smaller (right-bottom corner) - Nodes can be hidden (minimized) with hotkey H - CTRL+click on an Input Socket gives a popup with default values. - Changing Material/Texture or Mix node will adjust Node title. - Click-drag outside of a Node changes cursor to "Knife' and allows to draw a rect where to cut Links. - Added new node types RGBtoBW, Texture, In/Output, ColorRamp - Material Nodes have options to ouput diffuse or specular, or to use a negative normal. The input socket 'Normal' will force the material to use that normal, otherwise it uses the normal from the Material that has the node tree. - When drawing a link between two not-matching sockets, Blender inserts a converting node (now only for value/rgb combos) - When drawing a link to an input socket that's already in use, the old link will either disappear or flip to another unused socket. - A click on a Material Node will activate it, and show all its settings in the Material Buttons. Active Material Nodes draw the material icon in red. - A click on any node will show its options in the Node Panel in the Material buttons. - Multiple Output Nodes can be used, to sample contents of a tree, but only one Output is the real one, which is indicated in a different color and red material icon. - Added ThemeColors for node types - ALT+C will convert existing Material-Layers to Node... this currently only adds the material/mix nodes and connects them. Dunno if this is worth a lot of coding work to make perfect? - Press C to call another "Solve order", which will show all possible cyclic conflicts (if there are). - Technical: nodes now use "Type" structs which define the structure of nodes and in/output sockets. The Type structs store all fixed info, callbacks, and allow to reconstruct saved Nodes to match what is required by Blender. - Defining (new) nodes now is as simple as filling in a fixed Type struct, plus code some callbacks. A doc will be made! - Node preview images are by default float ********* Icon drawing: - Cleanup of how old icons were implemented in new system, making them 16x16 too, correctly centered *and* scaled. - Made drawing Icons use float coordinates - Moved BIF_calcpreview_image() into interface_icons.c, renamed it icon_from_image(). Removed a lot of unneeded Imbuf magic here! :) - Skipped scaling and imbuf copying when icons are OK size ********* Preview render: - Huge cleanup of code.... - renaming BIF_xxx calls that only were used internally - BIF_previewrender() now accepts an argument for rendering method, so it supports icons, buttonwindow previewrender and node editor - Only a single BIF_preview_changed() call now exists, supporting all signals as needed for buttos and node editor ********* More stuff: - glutil.c, glaDrawPixelsSafe() and glaDrawPixelsTex() now accept format argument for GL_FLOAT rects - Made the ColorBand become a built-in button for interface.c Was a load of cleanup work in buttons_shading.c... - removed a load of unneeded glBlendFunc() calls - Fixed bug in calculating text length for buttons (ancient!)
2005-12-21Orange; daily noodler update commit.Ton Roosendaal
- Adding execution code for Node trees. Was a bit a puzzle, since I want it to be multithreading by design. This now is solved by defining a stack per tree for all data that's being written into. This stack, which resides now in the NodeTree itself, then can be allocated per thread. - For testing pleasure, I've added a 'mix node' and a 'show node', so you can already see it do something. :) - reshuffled structure, to put things nice together, and have easier node adding. Current state is still WIP though, structure might change. For the record; new file node_shaders.c will contain all shader node definitions, apart from the drawing callbacks. Next: I'm going to check on Andrea's work on icons now, since this is very much needed for true shader/composit work. Now back to release work...
2005-12-18Orange:Ton Roosendaal
- Sunday merger with bf-blender - Foundations for new Node editor in Blender, generic framework that can be used for Material/Texture, Compositing, Logic or maybe even Sequencer. Note: this doesn't do anything yet, nor save! Is just to get this nice in CVS now. :)
2005-11-19Removed static from shade_buttons_change_3d declaration and includedAlexander Ewering
it in BIF_interface.h for general use in other files
2005-10-28Autocomplete for buttons that need Blender data names (ID's and Bones).Ton Roosendaal
Just press TAB and it completes up to the level a match is found. If more matches exist a menu could pop up, thats for later. Now an evening off! :)
2005-10-05Missing file, must have slipped between 2 of the phone calls :)Alexander Ewering
2005-09-14On behalf of Mika Saari, the famous Unicode Font support!Alexander Ewering
Further information is available here: http://wiki.blender.org/bin/view.pl/Blenderdev/UnicodeFont3D Shortlist of features: - Unicode character support for Font3D - UI to select characters from Unicode character list - UI to select Unicode table areas - Optimized character loading (Load only those characters which are used in font object) Please test extensively if it breaks anything, try also loading/saving files, packing fonts, etc. The official text regression file in the regression suite should be a good start. Thanks to mikasaari for this very useful addition!
2005-08-15Added new button type: ROUNDBOXTon Roosendaal
This replaces drawing with uiRoundBox() or glRect() in button Panels, which just fails for dynamic constructed button views where Panels are sometimes invisible. Also eliminates hack with PanelPop(). Error was visible with new Modifier panel, entering/exiting EditMode. Done Modifier and Constraints. Syntax: The last 4 free variables in the uiDefBut() call are: - float, corner-rounding (0.0-pixels), - not used, - short: roundbox type (bits, 1 2 4 8 for clockwise corners starting left/top) - short: color shade offset (color range 0-255)
2005-08-05 - added UI_EMBOSSR option (rounded emboss)Daniel Dunbar
- added support for vector icons, from user API side is just like using a regular icon... on icon side is defined by a function in resources.c instead of using the blenderbuttons png file. vector icons are much easier to add and scale properly. intent is that vector icons would be drawn in window coordinates which lets icon developers make the most beautiful icons, but this requires some tweaking of the interface drawing that I am not going to do atm. - changed BIF_draw_icon* to take coordinates of where to draw icon instead of using passed in raster position - switch modifier UI to using vector icons, and tweaked some position and style stuff. - replaced most uses of UI_EMBOSSX with UI_EMBOSS (do same thing, just there to confuse people I guess) After the window coordinate stuff is sorted out with vector icons it probably makes sense to move all non-photorealistic icons in blenderbuttons to vector form just so scaling goes better.
2004-10-14Color picker fixes... (bug #1490)Ton Roosendaal
Since color is stored RGB only in Blender, the conversion from and to HSV causes values to be clipped all the time. Solution found is adding a persistant hsv storage to the uiBut struct, and have it working on that only while hsv button is open. Still, after usage (leaving picker) the conversion will change values to rgb. Also added; redraw event for editing buttons, to show correct changed color while using nkey picker
2004-10-04Fix for new UI system and vertexpaint/faceselect/weightpaint/texturepaintTon Roosendaal
If backbuffer is in use for selection codes, the system switches back to frontbuffer drawing temporally. Is easier solution now. Next commit; fix for new 'zbuffer clipped selection', which also doesnt work after using a pulldown or popup menu.
2004-10-03Lots of small changes, all for UI in Blender;Ton Roosendaal
----- Killed UI frontbuffer draw The interface toolkit was drawing all live updates (while using menus/buttons) in the frontbuffer. This isn't well supported cross-platform, so time to be killed once. Now it uses *only* glReadPixels and glCopyPixels for frontbuffer access. Live updates or menus now are drawn in backbuffer always, and copied to front when needed. NOTE: it was tested, but needs thorough review! On PC systems I suspects backbuffer selection to screw up (check!). On SGI/SUN workstations it should work smooth; but I need evidence ----- Smaller fixes; - AA fonts were garbled on ATI systems. Now the AA fonts are drawn exact on pixel positions. Needs the new FTGL libb too, patch is on maillist - Rounded theme uses antialiased outlines - Pulldown and popup menus have nice softshadow now - New button type 'PULLDOWN', thats the one that callsup a pulldown menu. Should be added to themes, as is the full menu/pulldown drawing - Screendump for 1 window does the full window now, including header - Empty pulldowns (for example running blender without scripts) give no drawing error anymore For review & fun; - added curved lines as connectors, for Oops window
2004-10-01- Improved memory system for pupmenu(), which now stores 255 entries max.Ton Roosendaal
Meaning menus come back to previous selection almost always. Also fixed annoying bug that caused Mirror menu (M in editmode) to start at 2nd item - New hotkey (test :) CTRL+TAB in editmode gives (and shows!) current selectmode. I prefer this over cycling, since the menu is informing you what happens. - To enforce pupmenus to start at specific item, use pupmenu_set_active() - pupmenu_col() to be done
2004-07-11Long on the todolist: a patch to have pointsize working on systems thatTon Roosendaal
don't have them larger than 1, since vertices are drawn with it. It is solved by patching code with minimal confusement. So you can get automatic patched glPoints with: bglBegin(GL_POINTS); bglVertex3fv(vector); bglEnd(); In glutil.c the wrapper can be found, that checks for maximum Pointsize, and bypasses it to a glBitmap then.
2004-07-05New: color picker!Ton Roosendaal
With a click on the 'COL' buttons (the ones showing RGB) a menu pops up with three colorpicking fields and a palette. The fields are the three planar intersections of a HSV cube, each allowing choosing in the field without the field changing. The palette is 'modal' unfortunately (couldn't find a simple working other method) where the button "paste to color" denotes the state that click in palette copies to edited color, and "copy to palette" means the active color is copied into the palette... Todo: - saving of palette in file - decide whether ESC leaves without changes...
2004-01-08 - committed new uiDef{Icon,IconText,}ButBit? functionsDaniel Dunbar
- change object draw flag buttons to use new functions (just an example) While I probably wouldn't recommend patching other buttons to use the new functions a week before release, it is a good (simple but tedious) project to complete. Note that some code actually defined the constants for the bit index, when such code is fixed the _BIT constant should be removed from the headers. Example: DNA_constraint_types.h: #define CONSTRAINT_DISABLE 0x00000004 #define CONSTRAINT_DISABLE_BIT 2 buttons_object.c: uiDefIconButS(block, ICONTOG|BIT|CONSTRAINT_EXPAND_BIT, ...); The button definition should change to: uiDefIconButBitS(block, ICONTOG, CONSTRAINT_EXPAND, ...); (whats that, the more correct way uses less typing, GOOD GOD!) and the CONSTRAINT_DISABLE_BIT define should be removed.
2003-11-14- Bug fix: at osx, default AA font couldnt be written in .b.blendTon Roosendaal
(unless you manually install font) - Bug fix: string for AA font was only 64 chars... made 256. - Changed API for buttons aligning... it now detects automatic what rows are, or collums, and aligns buttons. This makes call easier: uiBlockBeginAlign(block); ... defBut.... uiBlockEndAlign(block); Only works when you provide buttons in row order! - made sure only 'rounded' theme uses this align stuff - still work in progress.. I commit now because I leave to denmark for 2 days! http://www.blender.org/bf/rt.jpg <- now also groups with rows+collums
2003-11-14- Added button align code:Ton Roosendaal
uiBlockBeginAlign(block, 'v'); 'v'= vertical. 'h'=horizontal ..... (button def calls) uiBlockEndAlign(block); this will allow new themes to have buttons nicely drawn together. - added new rounded draw theme, to test & illustrate the above. - only did parts of button code with align... rest for later - fixed 'minimal' theme to make it usable (with some decoration) - put back 'oldskool' theme... but it just looks plain ugly! remove? Lazy people: http://www.blender.org/bf/rt.jpg check the top header, or Nkey menu, to see the meaning of 'align'.
2003-10-28Fixing loose ends:Ton Roosendaal
- nkey menu for buttonswindow (hex values) couldnt be restored yet, is for next release - replaced Nkey in IpoWindow with Panel, this now displays the buttons that were formerly in 'anim buttons' as well; to view the boundbox values of all visible curves, and adjust it. - the new panel also has the 'set speed' option, fixed stuff in it and added better errorwarning... still not a very well coded tool!
2003-10-25First commit of a new toolbox system.Ton Roosendaal
Aim was to find a simple & easy system, script alike, to add and configure a toolbox system, so that others can experiment, but also of course Python. Summary: - spacebar calls it up. SHIFT+A still does old toolbox - hold left or rightmouse for 0.4 second, and it pops up as well this is experimental! Can be tweaked with Userdef var "ThresA" - it is a little bit complete for Object mode only. Needs still work at information desing/structure level - the code works like an engine, interpreting structs like this: static TBitem addmenu_curve[]= { { 0, "Bezier Curve", 0, NULL}, { 0, "Bezier Circle", 1, NULL}, { 0, "NURBS Curve", 2, NULL}, { 0, "NURBS Circle", 3, NULL}, { 0, "Path", 4, NULL}, { -1, "", 0, do_info_add_curvemenu}}; - first value is ICON code, - then name - return value - pointer to optional child last row has -1 to indicate its the last... plus a callback to event function. I also built an old toolbox style callback for this: static TBitem tb_object_select[]= { { 0, "Border Select|B", 'b', NULL}, { 0, "(De)select All|A", 'a', NULL}, { 0, "Linked...|Shift L", 'L', NULL}, { 0, "Grouped...|Shift G", 'G', NULL}, { -1, "", 0, tb_do_hotkey}}; here the return values are put back as hotkeys in mainqueue. A mainloop can do all context switching, and build menus on the fly. Meaning, it also allows other designs such as radials...
2003-10-20Another mega commit... loadsof restructure, and a pretty good one! :)Ton Roosendaal
- changed the BIF_DrawString() function. it used to work different for AA fonts as for default fonts. Now it's identical. Setting color for fonts can just be done with OpenGL, for both font types. Removed: BIF_DrawStringRGB() - added theme color options for Buttons - recoded DefButton, so it automatically chooses the right color. - had to remove a 1000 uiBlockSetCol() calls for that reason... - uiBlockSetCol() still works, to override automatic color - removed entirely the silly old color system (BIFColorID). All color calls can now be done with a BIF_ThemeColor() call, including fonts and buttons and opengl stuff - all buttons in button header have headercolor by default - recoded drawing icons, it was a really bad & old loop doing manually colorshading and blending... which was per pixel a load of code! Now it uses a single OpenGL call to blend or colorize. Quite faster! - (as test, for review) icons don't colorize anymore with button color, but have a different alpha to blend in (when not active) - recoded the entire interface_draw.c file...: - drawing buttons is separated in three parts: 1. main drawing function for text and icons 2. free definable callback for button itself 3. free definable callback for slider - removed a load of redundant code for this! - coded a minimal theme, and adjusted Matt's buttons to match new callback system - adding new drawing themes is piece of cake now - for coders, default 'themes' to be aware of: UI_EMBOSS : the themable drawing style UI_EMBOSSP: the pulldown menu system (apart from color not themable) UI_EMBOSSN: draw nothing, only text and/or icon UI_EMBOSSM: minimal theme, still in use for Logic and Constraintsa this can be set with uiBlockSetEmboss(block) or in the uiNewBlock() call. TODO: make UI API call for button alignment (plus removed another series of warnings from code...) Plus: fixed bug in Matts commit: he used a 'short' button for an 'int'
2003-10-17- The basic layer for Themes in place!Ton Roosendaal
- currently only implemented for 3d window - create as many themes you like, and name them - default theme is not editable, and always will be defined at startup (initTheme) - saves in .B.blend - themes for spaces can become local too, so you can set individual 3d windows at theme 'Maya' or so. (to be implemented) - it uses alpha as well...! API: This doesnt use the old method with BFCOLORID blahblah. The API is copied from OpenGL conventions (naming) as much as possible: - void BIF_ThemeColor(ScrArea *sa, int colorid) sets a color... id's are in BIF_resources.h (TH_GRID, TH_WIRE, etc) - void BIF_ThemeColorShade(ScrArea *sa, int colorid, int offset) sets a color with offset, no more weird COLORSHADE_LGREY stuff - void BIF_GetThemeColor3fv(ScrArea *sa, int colorid, float *col) like opengl, this gives you in *col the three rgb values - void BIF_GetThemeColor4ubv(ScrArea *sa, int colorid, char *col) or the one to get 4 bytes ThemeColor calls for globals (UI etc) can also call NULL for *sa... this is to be implemented still. Next step: cleaning up interface.c for all weird colorcalls.
2003-10-16- fix for drawing buttons in fileselectors, it used an old exceptionTon Roosendaal
and special 'EMBOSSF' drawing function. Now complies to standard.
2003-10-16- further work on view3d panels:Ton Roosendaal
- you can close them (x icon) or press ESC - option to open panel at mouse location (try Nkey) - using 'collapse' (triangle icon) stows header in bottom - opening again restores at old location - dragging panels or zooming clips nicely with window evaluate: an 'auto close' when mouse goes outside panel Warning: vertex selecting still broken! :) It's 2 am now, bedtime...
2003-10-15- removed all #include "interface.h" from files. this is a local/internalTon Roosendaal
include only (use BIF_interface.h instead) - split up interface.c in two files: NEW: interface_panel.c - removed the temporal text files WARN: FIX AUTOMAKE AND MSVC!
2003-10-15- expanded internal windowmanager that it allows button panels in anyTon Roosendaal
window (type) - each SpaceData struct (not the window!) can get 'block handlers' assigned, basically event codes that invoke drawing button panels. - this is saved in files, and Panels behave in any window like it does now in buttonswindow - it also means that a 'space window' should leave with a matrix set for buttons level - try it in view3d header menu, 'view'->'backdrop'. this opens the old viewbuttons - it all works non blocking! instant updates of viewbuttons visible in 3d window now. Not done yet: - checking and fixing frontbuffer drawing (select a wireframe draws over) - temporally vertices cannot be selected, is my next project - closing or hiding Panels... - styling stuff... i committed for others to review as well. Have fun. this is certainly a huge improvement over the old viewbuttons!
2003-10-12- added radiobuttonsTon Roosendaal
- cleaned unused calls and defines
2003-10-12- Converted lamp buttons and world buttons, they're pretty!Ton Roosendaal
- menu auto open now is user preset, including 2 thresholds you can set - hilites of pulldown menus were not cleared, fixed - changed F4 key to logic. F5 will show lamp buttons, when lamp active - in 'shader context' buttons, clicking camera will show world - Converted lamp buttons and world buttons, they're pretty! - menu auto open now is user preset, including 2 thresholds you can set - hilites of pulldown menus were not cleared, fixed - changed F4 key to logic. F5 will show lamp buttons, when lamp active - in 'shader context' buttons, clicking camera will show world
2003-10-12- converted full materialbuttons...Ton Roosendaal
EEEK! It doesn't look well yet! Hopefully it inspires others to come with great solutions. - the material buttons have 6 panels, three of them merged - some drawing errors in preview render - made settings for new Material that makes sense for Flares
2003-10-11- added method to have a preview render in panelTon Roosendaal
- increased size of preview from 100 to 125 pix :) - put back header buttons for databrowse, but they need to move to buttonswindow itself
2003-10-10Another huge commit!!!Ton Roosendaal
First, check on the new files, which are listed below. The new butspace.h is a local include, only to be used for the buttons drawn in the buttonswindow. - editbuts, animbuts, gamebuts, displaybuts, paintbuts, work now - i quite completely reorganized it, it's now nicely telling you what context it is in - sorting error in panel align fixed (tabs were flipping) - align works correctly automatic when you click around in Blender - editsca.c renamed to buttons_logic.h - button names are truncated from the right for allmost all buttons (except text buttons and number buttons) - while dragging panels, you cannot move them outside window anymore And of course fixed loads of little bugs I encountered while testing it all. This is a version I really need good test & feedback for. Next step: restoring material/lamp/texture/world
2003-10-07- changed header from buttonwindow into new typeTon Roosendaal
- changed meaning of F4-F10 keys (as compatible as possible, but we need something!) check UI design doc for proposal - made new call for switching direction of buttons in Y, for when pulldown moves direction - cleaned up all redundant manual switching code from headerbuttons.c
2003-10-05huge commit, sorry!Ton Roosendaal
this is part 1 of the UI makeover. It has: - menu system from Matt integrated - buttons drawing from Matt - generic button panel system implemented - converted displaybuttons (not the rest yet) - cleaned up a lot in drawing spaces itself, to make it aligned and pixel exact. - cleaned loads of little compiler warnings, protos... still a lot of work needed, will all be in next week i hope! (warn: 2 new c files! butspace.c and buttons_scene.c)
2003-07-07* removed the global uiFrontbuf from interface.c (and python, it was usedTon Roosendaal
there) * replaced with nice local (uiBlock) storage of what goes on in drawing. it now only calls a glDrawBuffer() and glFinish() when it is actually needed Result: interface drawing in general is speedy again, especially for gfx cards that dont allow frontbuffer drawing, and copy stuff to the frontbuf with a glFinish() call. Needs to be tested on all platforms... report to me when you see problems like menus not drawing correctly, tooltips not drawing or not disappearing, etc.
2003-05-09added a labelbutton that displays the selected avi/quicktime codec.Rob Haarsma
2003-05-07pulldown menus now scale according to textwidthsRob Haarsma
2002-12-27Removed the config.h thing from the .h's in the source dir.Kent Mein
So we should be all set now :) Kent -- mein@cs.umn.edu