Commit Graph

419 Commits

Author SHA1 Message Date
8c00c57187 style cleanup: var naming for ui list 2012-12-28 10:32:49 +00:00
7504cf34b4 This commit frees list ui items from their dependencies to Panel, and hence 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-12-28 09:20:16 +00:00
2fe36c0139 Separate image input and sequencer's color spaces in the UI
This two things were using the same DNA and RNA structures because
internally they're completely the same. However, that was confusing
from the interface point of view.

Now it should be much more clear what's going on there.
2012-12-24 15:51:27 +00:00
ba14beb000 Code cleanup: add usual 'BKE_' prefix to 'public' constraint functions from blenkernel... 2012-12-23 11:31:15 +00:00
edf826d924 Various minor fixes to i18n code (mostly, translation of enum items' tooltips was wrongly bound to iface option, not tooltips one, and recent changes in r53119 were incorectly using BLF_pgettext, made them simpler by using CTX_IFACE_ macro).
Also fixed CTX_FOO_ macros when building without i18n, those were kinda wrong.

And hid i18n ui section in userpreferences when built without its support too.
2012-12-18 18:25:48 +00:00
1ab6306177 minor edits
- add BLENDER_QUIT_FILE define.
- use const for passing rcti's in widget drawing.
2012-12-13 02:40:49 +00:00
96b2dc8e13 style cleanup: changes from recent commits 2012-12-13 01:00:21 +00:00
12b642062c Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability

Short list of main changes:

- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
  Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
  This allows keeping UI and data without actual saves, until you actually save.
  When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). 
  Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. 
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
  Old option is called "Save Startup File" the new one "Save User Settings".
  To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
  This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
302856f4b1 operator spacebar search menu wasn't ignoring internal operators,
turns out there were copy-pasted functions for operator search popups which were identical except that one skipped internal ops.
de-duplicate so both work the same now.
2012-12-04 18:22:41 +00:00
ca25fd0307 fix [#33389] Curve points restricted to 0..1 range,
also added note on python3.3's faulthandler module.
2012-12-03 07:10:31 +00:00
818a345be3 Silent a bunch of gcc warnings (usually dummy, but noisy!). 2012-12-02 16:01:06 +00:00
90666d3436 code cleanup: bmesh operator comments, readying for doc-generation. 2012-11-27 06:53:26 +00:00
2ffa538f7d search box width's now scale with DPI setting.
was checking on: [#33294] too small place for material names

this helps in some cases but doesn't resolve issue with very long names.
2012-11-26 13:23:37 +00:00
00b1d50532 Basic work to solve "New" translation mismatch (this is an adjective, which often takes several forms depending on its related noun's gender, in non-english languages). Note though this does not completly solve the problem (python "New" is still uncontextual).
Moved AUDIO context to ID_SOUND (let's try to keep this as simple as possible!).

Also done some cleanup. Relevant i18n tools edits will follow.
2012-11-23 15:33:44 +00:00
d94b2efbb9 disable applying constructive modifiers when in sculpt mode with multi-res data, since this would crash.
also rename modifier_sameTopology -> modifier_isSameTopology(), modifier_nonGeometrical -> modifier_isNonGeometrical()
2012-11-13 14:21:55 +00:00
c046b13b56 rename template_color_wheel() to template_color_picker() 2012-11-09 11:03:53 +00:00
3ce1d54e95 Bugfix #33124
User Preference setting for Color Picker type only affected the popup
version. Now it uses it for all color pickers in Panels too.

Note for UI Py team: col.template_color_wheel() function follows
the userpref - might be a need for rename here? Dunno how to handle
this. Comment noted in template code.
2012-11-09 10:33:42 +00:00
b6da3611eb Bugfix, IRC reported
In texture buttons, changing the preview could crash.
The preview template was accidentally providing a Texture ID where a Material
was meant to be given.

Crash occurred due adding code in material update that checked/cleared node
previews.
2012-10-27 16:47:08 +00:00
9fc95bd7ee use min/max inline functions where MIN2/MAX2 were doing type conversion. 2012-10-27 11:18:54 +00:00
481dcd83be UI: datablock selector widgets now show as a tooltip the datablock description
from RNA, instead of the less useful "Unique datablock ID name".
2012-10-25 13:32:05 +00:00
b4d9037dfb Fix #30940: layout.prop_search() item not drawing correct inside menus. 2012-10-24 21:57:07 +00:00
d57e130478 Fix [#32934] Some UI texts translated/untranslated regardless of "Interface" checkbox. Patch [#32935] by Shinsuke Irie, thanks! 2012-10-21 08:13:34 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
cc26da4421 Fix #32707: texture preview not loaded 2012-10-05 07:17:45 +00:00
e1897f8c4a fix [#32678] Changing RGB Curve via 'X' or 'Y' coordinates does not update 2012-09-28 01:47:45 +00:00
Dalai Felinto
184a232ccc 2.49 feature: Game Controller State name shows up when mouse over them (the name of a state is the name of the top controller of this state)
review and small tweaks by Campbell Barton
2012-09-21 04:09:09 +00:00
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
7f32f412ad fix for bug setting single user obdata while in editmode, it didnt work (made many copies but didn't assign them), so disable it. 2012-09-17 22:19:50 +00:00
42dd135be0 style cleanup: multiple statements on a single line in interface code. 2012-09-16 23:40:03 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
a73dd3476e Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.

This introduces two configurable color spaces:

- Input color space for images and movie clips. This space is used to convert
  images/movies from color space in which file is saved to Blender's linear
  space (for float images, byte images are not internally converted, only input
  space is stored for such images and used later).

  This setting could be found in image/clip data block settings.

- Display color space which defines space in which particular display is working.

  This settings could be found in scene's Color Management panel.

When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.

This conversions are:

- View, which defines tone curve applying before display transformation.
  These are different ways to view the image on the same display device.
  For example it could be used to emulate film view on sRGB display.

- Exposure affects on image exposure before tone map is applied.

- Gamma is post-display gamma correction, could be used to match particular
  display gamma.

- RGB curves are user-defined curves which are applying before display
  transformation, could be used for different purposes.

All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.

This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).

Some technical notes:

- Image buffer's float buffer is now always in linear space, even if it was
  created from 16bit byte images.

- Space of byte buffer is stored in image buffer's rect_colorspace property.

- Profile of image buffer was removed since it's not longer meaningful.

- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
  to support other spaces, but it's quite large project which isn't so
  much important.

- Legacy Color Management option disabled is emulated by using None display.
  It could have some regressions, but there's no clear way to avoid them.

- If OpenColorIO is disabled on build time, it should make blender behaving
  in the same way as previous release with color management enabled.

More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management

--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
306e2b4878 stule cleanup 2012-09-04 18:47:08 +00:00
68563134d4 Mango request: display sliders for current point in curve mapping
--
svn merge -r49893:49894 ^/branches/soc-2011-tomato
2012-09-04 12:40:47 +00:00
e58548706f Fix regression introduced in recent jobs system refactoring
Fluid simulation job progress wasn't displayed anymore.
2012-09-03 16:05:37 +00:00
29dd72ea84 code cleanup: some legacy compo nodes were not ifdef'd 2012-08-21 08:58:47 +00:00
3204731209 code cleanup: don't use magic numbers for curve flag & use bool args for curvemapping_changed() 2012-08-21 08:47:36 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
d36da8a8a1 style cleanup 2012-08-19 10:41:27 +00:00
e2cffbe732 rendering now stops the composite job first, then renders. 2012-08-15 10:31:52 +00:00
502dfcce5f use job types when checking for jobs in areas of the code that made assumptions about job types (that could be wrong) 2012-08-15 10:23:06 +00:00
97859e8709 add wm job types they are not used yet, so this just defines them for new jobs add add argument to search by job type. 2012-08-15 09:42:06 +00:00
f0951f58ca code cleanup: rename G.afbreek --> is_break, G.rendering --> is_rendering 2012-08-08 18:37:06 +00:00
61469d2e3e code cleanup: remove unneeded 'struct' qualifiers 2012-07-26 22:47:05 +00:00
3af938918a fix annoying bug where image open from ID template didn't open in the existing images path. 2012-07-25 09:04:59 +00:00
7881d2c1a8 correct own error in logic for skipping mask layers, inverted mask layers with zero alpha still need to be evaluated. 2012-07-16 15:40:47 +00:00
13b56dec78 show alpha in the mask buttons item list 2012-07-16 14:27:45 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
468ef74ed7 More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). 2012-07-03 19:09:07 +00:00
37dc4006c7 First load of spell and typo fixes (mostly UI messages, but also one or two pieces of code using mis-spelled names). 2012-07-03 17:20:21 +00:00
358f7d40b6 style cleanup: use TRUE/FALSE for ui align args. 2012-06-19 23:08:16 +00:00