Commit Graph

93 Commits

Author SHA1 Message Date
b89138564e Changes to Color Management
After testing and feedback, I've decided to slightly modify the way color 
management works internally. While the previous method worked well for 
rendering, was a smaller transition and had some advantages over this
new method, it was a bit more ambiguous, and was making things difficult 
for other areas such as compositing.

This implementation now considers all color data (with only a couple of 
exceptions such as brush colors) to be stored in linear RGB color space, 
rather than sRGB as previously. This brings it in line with Nuke, which also 
operates this way, quite successfully. Color swatches, pickers, color ramp 
display are now gamma corrected to display gamma so you can see what 
you're doing, but the numbers themselves are considered linear. This 
makes understanding blending modes more clear (a 0.5 value on overlay 
will not change the result now) as well as making color swatches act more 
predictably in the compositor, however bringing over color values from 
applications like photoshop or gimp, that operate in a gamma space, 
will give identical results.

This commit will convert over existing files saved by earlier 2.5 versions to 
work generally the same, though there may be some slight differences with 
things like textures. Now that we're set on changing other areas of shading, 
this won't be too disruptive overall.

I've made a diagram explaining the pipeline here:
http://mke3.net/blender/devel/2.5/25_linear_workflow_pipeline.png

and some docs here:
http://www.blender.org/development/release-logs/blender-250/color-management/
2009-12-02 07:56:34 +00:00
cd574f32e6 experemental UI introspection added for mindrones,
in python this gives a map of the ui...
 ui_dict = eval(layout.introspect())
2009-11-28 17:45:23 +00:00
c6dbbde16b Various bugfixes:
* Tweaked the code for operator buttons so that only those operator buttons in the toolbar have their text left-aligned. This is done at layout-block level

* Silenced "file_init" print when opening the file browser

* Disabled animateability of the "active_shape_key_index" for Objects, since this property behaves in a very unpredictable manner, leading to problems with users trying to keyframe shapekey values and ending up keying the list. 

* Remove some unnecessary RNA wrapping code
2009-11-23 09:47:56 +00:00
be143c2244 * Partial fix for bug [#19734] N panel's transform doesn't display the units
Converted the Object transform properties to use rna/rna buttons. This has the advantage of not only displaying/editing units, but also RMB menu, keyframing, drivers, etc too. Part of this was to convert 'Dimensions' to an rna property, converting to and from scale. This also allows you to set the object's dimensions via fcurves or python, but note that it's driving the object scale setting internally so if you animate both dimension and scale at the same time one will override the other (i don't expect many people to attempt this).
2009-11-04 23:14:20 +00:00
e694e30721 UI Icon Toggles Fix:
Boolean settings now use TOG instead of ICONTOG when they have icons, since ICONTOG was causing too much trouble with icons changing when they shouldn't be. Perhaps in future there should be some flag for specifying from RNA/UI-Layouts which one you want, but for now, this will do. 

Reverting r23936 since that fix depended on ICONTOG behaviour.
2009-10-28 10:16:49 +00:00
3ffb695b10 Shape Keys
Blended shape keys can now be displayed & edited in edit mode. This
is much like showing an armature modifier in edit mode, and shape keys
now are a applied as a virtual modifier (for mesh & lattice only, curve
doesn't fit in the stack well due to tilt).

The main thing missing still is being able to switch between the active
shape key in edit mode, that's more complicated.. but the weights of
other shapes can be edited while in edit mode.

One thing to be careful about is that this does automatic crazyspace
correction, which means that if you edit a shape key with a low value,
the actual vertices will be moved to correct for that and actually move
a (potentially much) longer distance.

Also includes some UI tweaks, mainly placing some buttons horizontally
since the vertical list was getting too long.
2009-10-22 16:35:51 +00:00
180d74ab57 UI: List Template tweaks to get it a bit more usable
* Mouse wheel now scrolls the list.
* Up/down key and alt mouse wheel change the active item.
* Adding/removing items from the list now automatically scrolls so the
  active item is in the view.
* Shift mouse wheel changes the size of the list widget to display more
  items. Lazy replacement for a proper grip.

* Shape key list now displays the influence value next to the name,
* Also fix the range of the value slider to match the defined min/max
  range.
2009-10-21 20:58:10 +00:00
a84a59b64e Fix #19638: crash when assiging self in boolean modifier.
Also:
* UI now takes ID self check flag into account so that e.g. it
  doesn't offer to the make object it's own parent.
* Mesh loop cuts number of cuts had wrong limits.
* Don't use mesh_get_derived_final in modifier stack, but
  ob->derivedFinal instead. Avoids crashes on dependency loops,
  and in case there is no loop it should have been created.
2009-10-19 12:13:32 +00:00
73d0c673e8 Fixed Layout-Engine bug that was causing checkbox menu entries to draw with the wrong icon when enabled. 2009-10-19 09:50:02 +00:00
be3da5dfff 3D View panels now show object and bone name again, not sure it
belongs here still, but this came up often, it avoids having to
switch tabs a lot when creating things.

Also renamed uiLayoutFreeBlock to uiLayoutAbsoluteBlock.
2009-10-09 10:45:11 +00:00
5c867406aa menus are now global (like operators), so for eg, the info add menu and the 3D add menu can be shared. 2009-10-08 19:06:32 +00:00
3ebd58673f Key Configuration
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-08 18:40:03 +00:00
dd8e2897ba new operator - bpy.ops.wm.call_menu(name="SOME_MT_menu")
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-10-06 13:04:31 +00:00
f4c697cf7f Keying Sets UI:
Added a way to view and edit Keying Sets via the Scene Buttons. These are still some tweaks needed to make this really workable, but should still work well enough for simply viewing and tweaking existing Keying Sets created using other means.

Additional bugfixes:
* Adjusted the size of labels on properties that had a 'label' for their name. Now it uses 1/3 of the total width instead, which looks much better for most cases.
* Added missing entries for adding Force Fields from the Info-header 'Add' menu. At some point we should unify this menu with the popup operator's one, since this is exactly the kind of situation we had hoped in avoid with new UI architectures.
* Moved all the operator defines for keyframing stuff to the 'intern' anim header instead
2009-10-03 04:21:38 +00:00
31b77420ea Preview icon rendering for menus now runs in a separate thread, to avoid
blocking the user when opening a menu. Material and texture buttons now
display these icons in the list. Also fixes #19387, icon and full preview
render at the same time would crash.

I'm not really convinced this is thread-safe, but on the other hand also
not sure regular preview render is really thread-safe yet.
2009-09-28 18:33:45 +00:00
ba7fb3f969 Fix drawing of MENU buttons with only an icon, was not aligned right
and showing unneeded triangles (+ buttons in Boids Brain).
2009-09-28 15:59:09 +00:00
2d22ea1f92 Drivers: Copy/Paste tools for the RMB Menu
Drivers can now be copied/pasted for single properties, allowing drivers set up on one property to be added to a few other properties relatively easily. 

Also, added description strings for the other driver-button operators.
2009-09-25 04:51:04 +00:00
3c5630a63d Fix #19418: file browse button for strip filename did not work,
sequence RNA now also splits up directory and filename automatic.
2009-09-21 13:23:47 +00:00
3a6bf17b3e UI
* Fix problem with curve mapping / color ramps not updating
  things like previews propertly. Now it uses the RNA update
  of the pointer from the material/texture/.. so each of those
  can define their own update, but still share the RNA struct.
* Code for these templates is now in interface_templates.c
* Fix exception for "axis" property, now it always shows normal
  widget with the PROP_DIRECTION subtype.
* Remove context from uiBlockLayoutResolve, no longer needed.
2009-09-16 18:47:42 +00:00
be69305d85 2.5 Bugfixes
#19302: the spin operator did not redo correct when changing properties.
Actually the problem was somewhere else, the search menu always did an
unnecessary undo push, which conflicted with an operator undo push with
the same name. Only in the case of "Spin" was this noticed, because it's
name is so short and you actually type it completely.
#19328: swapping areas could crash when dragging mouse outside the window.

Attempted fix for #19331, #19335 as well, where backspace and some other
keys give square characters instead of working as expected. Couldn't
reproducable here, so please test.
2009-09-14 20:48:05 +00:00
d0aa03737e * Fix for typo in icon_only commit, causing RNA property buttons text to be doubled up
brecht: I think this is right now...? :)
2009-09-14 11:25:33 +00:00
69496abf1d Crash Fix: Sequencer Add->Effects->... menu crashed.
Unfortunately, this menu is now empty, but this shows that the sequencer code is probably doing something funky...

http://dpaste.com/92865/
2009-09-13 03:56:30 +00:00
cfb6f35f9f UI:
* layout.itemR now has icon_only option to show only icon
  in e.g. enums buttons, for uv editor header.
* Automatic key shortcuts in menus now show the shortcut even if
  operator properties don't match. Not sure this will work well
  everywhere, but seems to be working ok for now.
* Open recent now show shorter filenames instead of the whole
  file path.
* Tweak object Duplicate menu item.
2009-09-10 14:20:21 +00:00
9e7c4ce806 2.5: Layer Buttons
* Added RNA subtype for layers.
* Shift-click works again.
* uiItemR can now also handle armature/bone layers.
* Also makes Move to Layer popup work as expected.
2009-09-09 17:39:19 +00:00
706a4c22b5 Implemented dynamic and multidimensional array support in RNA.
Example code: http://www.pasteall.org/7332/c.
New API functions: http://www.pasteall.org/7330/c.

Maximum number of dimensions is currently limited to 3, but can be increased arbitrarily if needed.

What this means for ID property access:

* MeshFace.verts - dynamic array, size 3 or 4 depending on MFace.v4
* MeshTextureFace.uv - dynamic, 2-dimensional array, size depends on MFace.v4
* Object.matrix - 2-dimensional array

What this means for functions:

* more intuitive API possibility, for example:
  Mesh.add_vertices([(x, y, z), (x, y, z), ...])
  Mesh.add_faces([(1, 2, 3), (4, 5, 6), ...])

Python part is not complete yet, e.g. it is possible to:

MeshFace.verts = (1, 2, 3) # even if Mesh.verts is (1, 2, 3, 4) and vice-versa
MeshTextureFace.uv = [(0.0, 0.0)] * 4 # only if a corresponding MFace is a quad

but the following won't work:

MeshTextureFace.uv[3] = (0.0, 0.0) # setting uv[3] modifies MTFace.uv[1][0] instead of MTFace.uv[3]
2009-08-25 17:06:36 +00:00
3eed35ada1 Adjusted spacing of header items.
Made toggle buttons less wide, with less extra space around them
Made number widgets wider to allow larger numbers, such as the current frame field in the timeline.
2009-08-23 22:22:58 +00:00
1c614f6cf6 2.5: layout.itemO now returns OperatorProperties to be filled in,
when passing properties=True as argument.

Other changes:
* uiItemR, uiItemFullR, uiItemFullO now accept a flag argument rather
  than multiple different "boolean" arguments, but still exposed as
  booleans to python.
* Fix RNA to support setting PROP_RNAPTR for return values.
2009-08-21 12:57:47 +00:00
1be67b60fd 2.5: Modifiers & Menus
* Popup menus now remember the last clicked item again.
* Modifier and File Format menus are now organized in multiple
  columns with categories.
* Hook, explode, uv project modifiers have all their buttons
  again with the relevant operators implemented.
* Modifiers that can't be added by the user, or don't work on
  curves for example, are not in the menu anymore.
* Fix search menu overlapping buttons when near the bottom of
  the screen.
* Fix uv layers search menu not working in some modifiers.
* Cleanup popup menu code a bit, layout engine is used in more
  cases now instead of ugly position calculation code.
2009-08-21 02:51:56 +00:00
184ac26dd0 2.5: Headers
* Fix header menu spacing bug, and make it consistent for all headers.
* For consistency, always put menus first in the header, then any enums
  to switch the type of data displayed.
* Node editor header ported to python layout. Still quite a few
  operators missing to make the menus complete.
* RNA wrapped node editor, and added use_nodes property to material
  and scene.
2009-08-19 00:55:30 +00:00
d823172d6d 2.5
Flaw in python UI for headers: code missing to correctly set the total
width of header, plus obsolete call in view3d header template to set width.

Now MMB scroll of view3d header works again.
2009-08-16 13:01:40 +00:00
41dc419dcb 2.5: fix for layout engine, increase default size of number buttons
in headers.
2009-08-15 19:31:49 +00:00
f6682ab773 RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
  mass, rotation, time, velocity, acceleration). These are not used
  yet anywhere.
* Centralized code that decides the name of array items based on
  subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
  later together with another change.
2009-08-10 21:31:05 +00:00
8dd523a154 2.5: Fixes
* Disable shaded mode for now, it cause too many crashes combined
  with preview render, will be fixed properly later.
* Make 3d view toolbar region a bit wider. Ideally this would not
  be needed, but the sculpt/paint buttons just don't fit otherwise.
* Revert change to icon/text spacing in buttons, it breaks text
  editing and clipping. Will properly fix this later so changing
  the spacing can be done centrally.
* Fix for grease pencil simplify stroke python error. Now button
  is hidden (as in 2.4), but still available through outliner.
* Fix for memory leak in UI code, when using ctrl+Q menu.
* Fix submenu > icon being drawn on some buttons where it was not
  needed.
2009-08-10 20:57:12 +00:00
9a874da36c 2.5: File browse button in ui layouts now works, e.g. for render
output path or fluidsim path.
2009-07-28 18:51:06 +00:00
0bb50594f9 2.5: UI
* Fix issue where it would automatically scroll when collapsing panels.
* Fix panel dragging not taking zoom level into account.
* Fix enum menu having too small default width in headers.
* Fix tooltips not showing shortcuts etc. if there was not tooltip
  defined for the button.
* Fix some refresh issues with color ramps.

* Add a bit more space between columns in the layout engine.
* Make scrollers darker so they are less distracting, and highlight
  instead of reverse shading when dragging.
2009-07-23 20:50:24 +00:00
a78ef19054 2.5: UI
* List template visual changes. Items now look different,
  and it expands to size 5 as more items are added.

* Added LISTROW and LISTBOX elements. The former is like
  a typical ROW button, but looks diffrent. The latter
  looks like a BOUNDBOX, and has no extra features yet.
* Fix some glColor3ubv warnings with casting, did not find
  a nicer way.
2009-07-21 01:26:17 +00:00
41fb3626f3 2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
  better organize things according to the pipeline, and also showing
  important properties by default, and collapsing less important ones.

Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
  do something when there is a node tree using nodes, or a strip in the
  sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
  does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
  but still using FFMPEG. Unfortunately Ogg is broken at the moment
  (also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
  maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
  it work.
* Organized file format menu by image/movie types.

Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.

Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
89830ea0c8 calling operators from python was raising an error without returning an error value.
brecht, switched the order back to fix this, added an argument for WM_operatortype_find() to fail without printing an error.
2009-07-13 08:33:51 +00:00
2e3e044d27 RNA
* Enums can now be dynamically created in the _itemf callback,
  using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
  for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
  for operators. This doesn't fit design well at all, needed to do
  some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
  _itemf callback, for docs and fallback in case there is no context.

* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
  (unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
2a7a8a04da 2.5:
* 3D view Object menu works again, many operators missing still
  because they are not yet implemented.
* Constraint types now have separator, and fix too much spacing
  in the constraints header.
2009-07-10 13:56:29 +00:00
3496437585 2.5:
* RNA: enum items with "" indentifier are now interpreted as separators.
* Add Object menu: added consistent names, separators.
2009-07-10 11:36:02 +00:00
d091856486 2.5: Buttons Window
* Fix poll() callback changes in recent commit, note that these have
  to work with pinned context too.
* Hide header for context panels in py layout.
* Don't jump back when collapsing a panel, allow the view to be
  over some empty space until you scroll back.
* Fix follow context icon, order had to be reversed in icon file.
* ID template now has icon as part of browse button instead of
  outside the buttons.
2009-07-09 19:45:27 +00:00
51ae88aa3b 2.5: Mesh and Various Fixes
* 3D view Mesh menu works again, but incomplete.
* Add Properties and Toolbar to 3D View menu.
* Added "specials" menus back, vertex/edge/face and general.
* Various fixes in existing mesh operators, some were not working.
* Add MESH_OT_merge.
* Merge all subdivide ops into MESH_OT_subdivide, subdivide code
  changes to make smooth + multi give good results.
* Rename all select inverse ops to *_OT_select_inverse.
* Fix "search for unknown operator" prints at startup, and some
  warnings in py code.
* Don't run .pyc files on startup.
* Remove unused image window header C code.
2009-07-08 21:31:28 +00:00
9f33496088 2.5
* Lattices: properties editable, editmode operators, menus working
  again. As a bonus you can now edit u/v/w in editmode.
* Shape Keys: some code cleanup, and added more buttons. The
  value/min/max buttons don't work correct yet though.
* Fix issue with uv textures, vertex colors not being visible outside
  editmode, and a few other issue. Mesh.edit_mesh is now NULL when
  not in editmode.
2009-07-03 15:23:33 +00:00
093ff8202c 2.5: Physics Buttons
All kinds of changes to get it ready for UI layouts. This means RNA
and operators should be working correct, but most buttons are still
not actually there yet.

* Added near empty soft body, fluid, field and collision panels,
  tweaks to cloth panels.
* Fluid bake works, but without escape or showing any progress.
* Fluid/Softbody/Cloth/Collision can now be both added as modifiers
  or in the physics panels.
* Missing: fields & soft body for particles.
* Missing: proper updating softbodies, guess this code still needs
  updates after pointcache refactor?
2009-07-02 19:41:31 +00:00
7ca31bb171 2.5
Search Menu: added feature that on opening, it shows the 
current ID block, and selects it. Same can be used for other
searches, just pass on pointer to active item for the search
callback.

Also fixed arrow triangle draw for search.
2009-06-29 11:29:52 +00:00
222fe6b1a5 UI
* Search popup + autocomplete for bones, vertex groups, etc. This
  is done with layout.item_pointerR, specifying an RNA collection to
  take the items from. Used by constraints and modifiers.

* Some tests with the List template, ignore those for now..
2009-06-27 01:15:31 +00:00
5b26f520bb UI
* Added SCROLL button type, use like a NUMSLI basically, with
  a1 used to define the scroller size.
* Add scroll and toggle colors to the Theme (toggle was set to
  draw like radio in a recent commit, but it's the intention
  these look different).
* Added rudimentary list template, used for object material
  slots, this is WIP though.
* In popup menu, split text with line breaks over multiple
  lines, makes python errors display slightly nicer.
2009-06-24 14:16:56 +00:00
8c1d19020e UI
* Make Directional Order menus the default again.
* Scale up contents panels that do not use layout system.
* Fix for enum size and uncesseray colon in some cases. 
* For item_menu_enumO, show icons if specified in RNA in
  the menu (e.g. in the add modifier menu if there were
  icons specified).
2009-06-22 23:58:16 +00:00
f10541f7cf UI
* 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-06-16 01:08:39 +00:00