Commit Graph

2288 Commits

Author SHA1 Message Date
6c0926e802 Code cleanup: use const for mouse location arg 2014-06-14 00:47:12 +10:00
2e56182311 Detect version suffix based on release cycle and version char
Should make it less error-prone for release tagging/ahoy.
2014-06-13 20:19:02 +06:00
7aea3acc03 Splash: enable rc label 2014-06-13 04:39:10 +10:00
ce460c6179 Fix crash running in background mode 2014-06-13 01:05:56 +10:00
f1f33ba7be Fix T40549: box selection starting point in the file requester.
We need to 'reset' mouse coordinates to the one it was when the gesture handling started,
else org coords are where the tweak event is created, which gives a noticeable gap
(several pixels) and unwanted behavior like the one retported about file box selection.
2014-06-09 15:31:27 +02:00
918f6a49a7 Replace open() with BLI_open 2014-06-07 11:30:08 +10:00
f46b384fc5 Change to key modifier should trigger re-evaluation of drag-and-drop
This change is part of a fix for T40435, but will postpone for now.

Original patch by Sergey Sharybin
2014-06-03 23:00:39 +10:00
bf640a6a7f Code cleanup: use typedefs for ui handler functions 2014-06-03 09:30:08 +10:00
fd781c1095 Disable key-modifier detection when activating windows
Causes issues on X11 for some users
2014-06-02 22:33:42 +10:00
34862b5b57 Workaround T40317: Ghost/Win32 keys sticking for new windows
Ghost win32 ignores key-up events for newly activated windows.
for now just disable code for win32 to initialize modifiers for new windows.
2014-05-26 16:37:21 +10:00
cb023ce0fd Fix T34255: Modifier keys ignored when activating windows 2014-05-20 14:21:13 +10:00
3e38be0000 Fix T40202: File selector operators not reported in info view 2014-05-16 21:25:48 +10:00
48881ad1e0 Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
164841e30e Code cleanup: style 2014-05-09 18:29:42 +10:00
Dalai Felinto
20c90eae14 Bake API: renaming WM_JOB_RENDER_BAKE to WM_JOB_OBJECT_BAKE and use it consistently
Note: that doesnt change much. It definitively doesnt change the random crash OSX is experiencing sometimes.
2014-05-08 22:56:50 -03:00
d964bad67b Fix for crash when userprefs fails to read. 2014-05-08 06:36:43 +10:00
a8dddca0fe playanim: check for escape key while loading images
(todo from 2.4x)
2014-05-07 18:18:21 +10:00
Dalai Felinto
97641a0ec9 Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.

The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.

The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit

Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake

bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.

Supported Features:
------------------
 * Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.

 * Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.

 * Cage Extrusion - distance to use for the inward ray cast when using selected to active

 * Custom Cage - object to use as cage (instead of the lowpoly object).

 * Normal swizzle - change the axis that gets mapped to RGB

 * Normal space - save as tangent or object normal spaces

Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"

Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)

* For a complete implementation example look at the Cycles Bake commit (next).

Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge

Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.

The entire commit history can be found on the branch: bake-cycles
2014-05-02 21:19:08 -03:00
7b0bce1946 Code cleanup: remove redundant filename copy & simplify splash 2014-05-01 11:59:25 +10:00
4b75956330 Fix T39974: Popups lead to crash if 'UNDO' isn't set
This isn't supported, raise an error instead
2014-05-01 05:28:52 +10:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
48446870a8 Code cleanup: remove redundant CTX calls 2014-04-30 08:11:47 +10:00
23b4e246e3 Remove link from Link/Append UI, since we have 2 menu items 2014-04-30 05:09:22 +10:00
b6e967be63 Code cleanup: const args and arrays 2014-04-27 08:56:54 +10:00
15d77d201d Code cleanup: use 'const' for arrays (windowmanager) 2014-04-27 00:25:15 +10:00
1eb1351976 Fix T38924: wm.link_append() could fail to append
When the library path was changed by BLI_cleanup_path
appending would fail.
2014-04-25 18:43:53 +10:00
88a22632a3 OSX: always create a window in normal state, not fullscreen or iconized … 2014-04-21 19:43:10 +02:00
9ae0e585b0 View2d: API Cleanup for view<->region conversion
View2D had some inconsistencies making it error prone in some cases.

- Inconstant checking for NULL x/y args.
  Disallow NULL args for x/y destination pointers, instead add:
  - UI_view2d_region_to_view_x/y
  - UI_view2d_view_to_region_x/y

- '_no_clip' suffix wasn't always used for non-clipping conversion,
  switch it around and use a '_clip' suffix for all funcs that clip.

- UI_view2d_text_cache_add now clips before adding cache.

- '_clip' funcs return a bool to quickly check if its in the view.

- add conversion for rectangles, since this is a common task:
  - UI_view2d_view_to_region_rcti
  - UI_view2d_region_to_view_rctf
2014-04-21 16:59:40 +10:00
dd54b721c6 Add load_ui to WM_OT_read_homefile
Useful for implementing templates.

Patch D423 by Gaia Clary
2014-04-03 11:29:45 +11:00
726628518d WM: expose file loading operator property init functions 2014-04-03 11:04:02 +11:00
b2b4f2c033 Code cleanup: use BKE_BIT_TEST_SET to set flags 2014-04-03 10:45:08 +11:00
35747ee3d5 Rename "BLI_cpu.h" to "BLI_system.h" and add to it BLI_getpid() helper.
There is not much sense to have a whole BLI file just to check SSE2 on CPUs...
So idea is to rename it to more generic "BLI_system", and add to it more system-related
utils, like e.g. an include helper for getpid(), which allows to hide unix/windows
internals from rest of the code...

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D439
2014-04-02 11:59:43 +02:00
def5999f9b UI: support for dragging popups title area 2014-04-02 18:43:53 +11:00
442f2df736 Code cleanup: avoid redundant lookups for subwindows 2014-04-02 17:33:20 +11:00
420da872a6 Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.
Now they do, to make it harder to accidentally press them and lose work.

Reviewed By: brecht, carter2422

Differential Revision: https://developer.blender.org/D440
2014-04-01 18:00:07 +02:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
097a3756c0 Code cleanup: use bool 2014-03-31 23:39:08 +11:00
7199e2288f Code cleanup: use sqrtf when input and output are float 2014-03-28 14:53:37 +11:00
a2c002acb9 Add a slight shadow to the radial operator text. It helps when brush
color is close to the cursor color.
2014-03-25 01:25:01 +02:00
b701c92588 Code cleanup:
* Separate some common code for sculpt raycasting
* Cleanup to radial operator commit
2014-03-24 23:46:30 +02:00
7bb84912ef Code cleanup: ifdef debug only checks and simplify manifold test 2014-03-25 07:54:41 +11:00
76d32a3f16 Improvements to radial control operator:
* Factor values get a minimum circle too, which denotes the maximum
value. This makes it easy to set the maximum value while previously
maximum was at center, much more difficult to set exactly.

* Added text indication of value at center of the widget.
2014-03-24 22:50:59 +02:00
d2660a079c Fix T39260: "Redo Last" operator popup shows macro operator labels twice.
The popup was showing an explicit uiItemL as well as using the
UI_LAYOUT_OP_SHOW_TITLE flag. Both do the exact same thing.
2014-03-19 13:20:44 +01:00
a91247c2b4 Code cleanup: unreachable break/return 2014-03-19 12:47:09 +11:00
f127f49b4d UI: Add splash link to gooseberry (remove user community link) 2014-03-19 07:19:43 +11:00
433d55e9b4 Code cleanup: spelling & style 2014-03-15 23:46:02 +11:00
82333049b9 Typos in last commit, sorry 2014-03-13 18:04:58 +01:00
36006220c3 GHOST: cover now both win and osx case for T39153 2014-03-13 18:03:04 +01:00
b7712a761a OSX/GHOST: fix T39153, pls check on win minimized window load 2014-03-13 17:08:28 +01:00
e097c987a8 Maintenance: Start of 2.71 release cycle, BCon1, Alpha. 2014-03-07 13:43:59 +01:00