Commit Graph

2278 Commits

Author SHA1 Message Date
Campbell Barton
cb023ce0fd Fix T34255: Modifier keys ignored when activating windows 2014-05-20 14:21:13 +10:00
Campbell Barton
3e38be0000 Fix T40202: File selector operators not reported in info view 2014-05-16 21:25:48 +10:00
Campbell Barton
48881ad1e0 Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
Campbell Barton
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
Campbell Barton
d964bad67b Fix for crash when userprefs fails to read. 2014-05-08 06:36:43 +10:00
Campbell Barton
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
Campbell Barton
7b0bce1946 Code cleanup: remove redundant filename copy & simplify splash 2014-05-01 11:59:25 +10:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
48446870a8 Code cleanup: remove redundant CTX calls 2014-04-30 08:11:47 +10:00
Campbell Barton
23b4e246e3 Remove link from Link/Append UI, since we have 2 menu items 2014-04-30 05:09:22 +10:00
Campbell Barton
b6e967be63 Code cleanup: const args and arrays 2014-04-27 08:56:54 +10:00
Campbell Barton
15d77d201d Code cleanup: use 'const' for arrays (windowmanager) 2014-04-27 00:25:15 +10:00
Campbell Barton
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
Jens Verwiebe
88a22632a3 OSX: always create a window in normal state, not fullscreen or iconized … 2014-04-21 19:43:10 +02:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
726628518d WM: expose file loading operator property init functions 2014-04-03 11:04:02 +11:00
Campbell Barton
b2b4f2c033 Code cleanup: use BKE_BIT_TEST_SET to set flags 2014-04-03 10:45:08 +11:00
Bastien Montagne
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
Campbell Barton
def5999f9b UI: support for dragging popups title area 2014-04-02 18:43:53 +11:00
Campbell Barton
442f2df736 Code cleanup: avoid redundant lookups for subwindows 2014-04-02 17:33:20 +11:00
Grigory Revzin
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
Campbell Barton
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
Campbell Barton
097a3756c0 Code cleanup: use bool 2014-03-31 23:39:08 +11:00
Campbell Barton
7199e2288f Code cleanup: use sqrtf when input and output are float 2014-03-28 14:53:37 +11:00
Antony Riakiotakis
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
Antony Riakiotakis
b701c92588 Code cleanup:
* Separate some common code for sculpt raycasting
* Cleanup to radial operator commit
2014-03-24 23:46:30 +02:00
Campbell Barton
7bb84912ef Code cleanup: ifdef debug only checks and simplify manifold test 2014-03-25 07:54:41 +11:00
Antony Riakiotakis
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
Lukas Tönne
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
Campbell Barton
a91247c2b4 Code cleanup: unreachable break/return 2014-03-19 12:47:09 +11:00
Campbell Barton
f127f49b4d UI: Add splash link to gooseberry (remove user community link) 2014-03-19 07:19:43 +11:00
Campbell Barton
433d55e9b4 Code cleanup: spelling & style 2014-03-15 23:46:02 +11:00
Jens Verwiebe
82333049b9 Typos in last commit, sorry 2014-03-13 18:04:58 +01:00
Jens Verwiebe
36006220c3 GHOST: cover now both win and osx case for T39153 2014-03-13 18:03:04 +01:00
Jens Verwiebe
b7712a761a OSX/GHOST: fix T39153, pls check on win minimized window load 2014-03-13 17:08:28 +01:00
Thomas Dinges
e097c987a8 Maintenance: Start of 2.71 release cycle, BCon1, Alpha. 2014-03-07 13:43:59 +01:00
Sergey Sharybin
43b5f0af2d tweaks to buildinfo
We wouldn't really have release branches, building will happen
from annotated tags.

Made it so building tag revision equals to a master branch.
2014-03-07 18:27:16 +06:00
Campbell Barton
f56a74566a Bump version to Blender2.70rc and new splash
Splash concept art & paint-over: David Revoy. 3D artwork by Mathieu Auvray.
2014-03-06 04:40:49 +11:00
Sergey Sharybin
d5aa12742c Don't show branch name on the splash if it's a release branch 2014-03-05 23:11:06 +06:00
Campbell Barton
0e47e29823 UI: Splash text for 'a' releases and the upcoming 'Release Candidate'
This avoids re-uploading splashes for minor version changes.

Enabling now so any glitches can be found before we do the real rc.
2014-03-03 17:29:03 +11:00
Campbell Barton
a04c132a7e NDOF: minor tweaks based on feedback.
- invert Y axis when swap YZ is enabled.
- allow rotating when not in ortho mode.
2014-02-28 22:07:53 +11:00
Brecht Van Lommel
d7a2d2b693 Fix T38876: hide area split widget in lower left of widget on OS X.
This is already used by the operating system for window resizing, you must use
the widget in the top right of the area to split.
2014-02-27 23:41:01 +01:00
Bastien Montagne
c35ac8f7ac Fix T38678: Long strings on Search widget not getting shortened/no tooltip.
Note this commit only makes search menus wider and adds shortening to their strings.
Adding tooltips here is not trivial, would need much bigger changes...

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D341
2014-02-26 21:53:56 +01:00
Brecht Van Lommel
0e492ac482 Fix T36652: .blend file with minimized window not loading correctly on Windows. 2014-02-26 20:50:55 +01:00
Brecht Van Lommel
0de1df49e1 Fix T37756: file > open with file selector already open not restoring screen correctly. 2014-02-26 19:50:12 +01:00
Campbell Barton
739ae1d809 NDOF: fix for view3d ignoring lens values when panning
image, mce, view2d and view3d now have matching pan speed.
2014-02-22 16:30:48 +11:00