Commit Graph

77 Commits

Author SHA1 Message Date
53b7bc8f1f Change !BLI_ghashIterator_isDone to BLI_ghashIterator_notDone. It is
always used in that context so we can at least avoid reverting it twice
:p.
2013-03-06 20:55:04 +00:00
a02c8c4177 move toggle drag into a UI handler (was modal operator) 2013-03-03 03:29:57 +00:00
2de8dfd784 fix for drag-toggle, bit-buttons weren't handled which made drag toggle fail for buttons in the graph editor for eg. 2013-03-01 00:35:01 +00:00
fcac25e08d simplify drag toggle operator, use BLI_rctf_isect_segment between mouse events rather then many calls to ui_but_find_mouse_over(). 2013-02-26 00:09:26 +00:00
ac345fce9a fix for toggle buttons not taking effect on mousedown. 2013-02-25 11:52:18 +00:00
5f09090cad remove 'register' from drag-toggle operator (so it doesn't show in the redo panel).
update credits script.
2013-02-22 11:06:25 +00:00
4aea4c2cb3 change to drag-toggle don't exit when the mouse is outside the region - its annoying for setting layers in the 3d header. 2013-02-22 07:28:45 +00:00
a9e25ac433 Toggle-Drag UI Feature
Dragging on toggle buttons can now be used to press multiple buttons at once, especially useful for layer and outliner buttons.


notes:
- automatically enabled for all toggle buttons
  (may change this if it becomes a problem).
- only buttons of the same type are pressed
  (helps avoid annoyances eg; dragging past layer buttons onto other 3d header buttons and pressing by accident).
- automatic axis locking - dragging will lock to X/Y depending on the initial drag direction,
  makes swipe motions work better, especially with the outliner.


implementation details:
- may re-implement as a region handler (currently its a modal operator).
- checking buttons in-between cursor motion events could be more efficient (but currently works ok).
- button execution needs to be improved
  (currently executing a button thats not under the mouse needed a workaround for passing uiHandleButtonData),
  requires further changes to UI code, will do next.
2013-02-22 05:56:20 +00:00
fdfa5910b5 Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashes
Issue was caused by couple of circumstances:

- Normal Map node requires tesselated faces to compute tangent space
- All temporary meshes needed for Cycles export were adding to G.main
- Undo pushes would temporary set meshes tessfaces to NULL
- Moving node will cause undo push and tree re-evaluate fr preview

All this leads to threading conflict between preview render and undo
system.

Solved it in  way that all temporary meshes are adding to that exact
Main which was passed to Cycles via BlendData. This required couple
of mechanic changes like adding extra parameter to *_add() functions
and adding some *_ex() functions to make it possible RNA adds objects
to Main passed to new() RNA function.

This was tricky to pass Main to RNA function and IMO that's not so
nice to pass main to function, so ended up with such decision:

- Object.to_mesh() will add temp mesh to G.main
- Added Main.meshes.new_from_object() which does the same as to_mesh,
  but adds temporary mesh to specified Main.

So now all temporary meshes needed for preview render would be added
to preview_main which does not conflict with undo pushes.

Viewport render shall not be an issue because object sync happens from
main thread in this case.

It could be some issues with final render, but that's not so much
likely to happen, so shall be fine.

Thanks to Brecht for review!
2013-02-05 12:46:15 +00:00
f7f4148b40 change uiButGetStrInfo() to use a trailing NULL arg rather then passing the number of args as an arg. 2012-12-02 04:51:15 +00:00
c9dade4fe0 Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()... 2012-10-26 17:32:50 +00:00
b7f4c69ef7 More UI messages and BKE_reportf->BKE_report fixes... 2012-10-14 15:29:09 +00:00
b50fc8ac68 More UI messages fixes.
Also forgot to translate reports' titles, and change some usages of BKE_reportf to simple BKE_report, when the former is not needed!
2012-10-13 15:44:50 +00:00
67e2768570 quiet some -Wshadow warnings 2012-10-12 14:35:10 +00:00
8b7896814f code cleanup: reduce change the size of some float vectors that were bigger then they needed to be.
update to clang_array_check.py - parse function definitions lazily for some speedup.
2012-10-08 07:08:29 +00:00
3a788ffd66 Fix/enhancement of "locale to po file name" code. Now should handle nicely locales like "gez_ER@abegede", and never read uilng string beyond its end! 2012-09-27 14:38: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
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
a4b71f4e01 fix for various redundant checks and possibly fix some crashes in rare situations. 2012-09-05 01:42:52 +00:00
56b28635e7 code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our naming convention. 2012-08-23 18:25:45 +00:00
ff876a473a HDR color picker now works in the clip space. 2012-08-20 16:56:11 +00:00
d36da8a8a1 style cleanup 2012-08-19 10:41:27 +00:00
a5b5f5d3fb code cleanup: use BLI rect functions for interface button and block code. 2012-08-18 18:11:51 +00:00
63f143a3cc use rctf struct for UI buttons and blocks, easier to read and means we can use BLI_rctf functions. 2012-08-18 16:53:46 +00:00
81dd80f1d3 support fro HDR color picking (values over 1.0) when color picking in the image editor or node space. 2012-08-16 14:47:14 +00:00
0dafa97ea3 UI translation from inside Blender UI: first part.
This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator.

It also adds a few getters (to get RNA i18n context, and current language iso code).

Finally, it adds to C operators needed for the py ui_translation addon:
*UI_OT_edittranslation_init, which gathers requested data and launch the py operator.
*UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files).

For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.
2012-07-09 14:25:35 +00:00
35d1a1cbd8 fix for own mistake - sampling was adjusting alpha when it shouldn't, also make spacebar reset the accumulated color while eyedropping. 2012-06-15 08:33:33 +00:00
9355bece59 click dragging with the eye dropper now averages out colors - useful when you have grainy footage of a green screen. 2012-06-14 22:48:40 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
ed33320e3f Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.

GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);

Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
369f5b79ea Fix #31371: copy data path should be disabled in places where it doesn't work,
like the user preferences.

Also renamed "View Docs" menu entry to "Python Documentation".
2012-05-09 15:54:25 +00:00
34b18fcbc1 code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image. (not use existing one) 2012-05-05 14:52:04 +00:00
250560a423 Fix #30998: copy to selected in properties editor not working for bones. 2012-04-19 10:49:45 +00:00
4f06c15202 Fix properties editor, right click menu "Copy to Selected" not working for
object modifier/constraint/physics properties. Now uses RNA path rather than
only properties on the object itself.
2012-04-10 15:49:41 +00:00
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
a6ebffe182 style cleanup: interface 2012-03-30 01:51:25 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
4c3bb77012 style cleanup: spaces aroudn operators for operator definitions. 2012-03-22 07:26:09 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
297a21c39a Code Cleanup:
don't call CTX_data_scene(C) for every marker drawn
also remove unneeded call when scene was already defined as well as redundant scene cast.
2012-02-06 22:17:41 +00:00
ea467d3228 use FILE_MAX instead of 240 or comment where define cant be used. 2012-01-16 05:52:33 +00:00
4a364d2362 fix for 2 crashes running operators in background mode. 2011-12-12 03:25:10 +00:00
49ccf975f2 minor cleanup
- use NULL rather then 0 for pointers
- use static functions where possible
- add own includes to ensure func's and their declarations don't get out of sync.
2011-11-14 16:05:44 +00:00
2d787e6e01 utility function to find the biggest area: BKE_screen_find_big_area(...), was being done with static functions that were copied about. 2011-11-04 01:15:04 +00:00
29575c9ac8 compile without python works again 2011-11-03 23:20:54 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
e58eb5db6f use defines for keying set names to avoid confusing them with text and having some incorrect names (as fixed in last commit) 2011-10-23 05:08:02 +00:00
8e2bc6cdbc Context menu 'Edit Source' operator no longer needs to be enabled as a build option, improved this so the python file:line lookups are only done when the operator runs (previously this was done for every button, every draw when the build option was enabled).
Perhaps this should be hidden when not running with --debug, easy to change.
2011-10-23 04:13:56 +00:00
ceb81b1960 no-longer select handles when transforming in the dopesheet since now the dope sheet acts as if handles are hidden.
also remove invalid comment.
2011-09-29 06:13:25 +00:00