Commit Graph

530 Commits

Author SHA1 Message Date
Sergey Sharybin
5bf5d5a844 Camera tracking: tracks copy/paste operator
This commit implements basic clipboard support for movie tracking data
int clip editor. Used own implementation of clipboard like it's done
for sequencer.
Ideally it needed to be switched to more general clipboard system, but
currently this system is designed for text data only and it need to
be re-designed itself. But this feature is quite useful since object
tracking is implemented, so it should be OK to live with such own
implementation for a while.
2012-01-09 20:18:48 +00:00
Dalai Felinto
6bd8097765 ui typo + small fix
Blender internally deals with Font Objects, but as far as the user is concerned they are Text Objects.
Which, btw, makes me wonder why we have an 'F' as the logo for Text objects, and why the ob.type is 'FONT' in python

(I guess it's a Font Data for a Text object)
2012-01-09 20:13:03 +00:00
Brecht Van Lommel
d7932ceea8 Cycles: multi GPU rendering support.
The rendering device is now set in User Preferences > System, where you can
choose between OpenCL/CUDA and devices. Per scene you can then still choose
to use CPU or GPU rendering.

Load balancing still needs to be improved, now it just splits the entire
render in two, that will be done in a separate commit.
2012-01-09 16:58:01 +00:00
Thomas Dinges
549c75fc61 Fix for last commit, missed check for ob, could cause errors when object was removed. 2012-01-06 22:55:15 +00:00
Sergey Sharybin
d919c30ac3 More whitespace cleanup in python scripts 2012-01-06 21:25:28 +00:00
Sergey Sharybin
2899e5584c Whitespace cleanup in curve properties script 2012-01-06 21:24:10 +00:00
Thomas Dinges
7ff5a17ff2 Tweaks for Node Header UI code:
* Don't show "New material" operator, when object type can't have materials
* Don't show "Use Nodes" for lamps in Blender Internal.
2012-01-06 16:37:07 +00:00
Thomas Dinges
dd858d6cd9 Cycles / Nodes:
* Make it possible to add a new material from the Node header, if no material exists in the (active) material slot.
2012-01-06 01:31:36 +00:00
Thomas Dinges
f983fe709d 3DView / Properties Region:
* Simplify UI inside the Transform Orientation Panel.
2012-01-06 01:14:57 +00:00
Thomas Dinges
33ba505ef4 Properties Window UI:
* Some tweaks to the stamp panel to make it more compact. 
* Remove "Stamp" Prefix for the color values, redundant info.
2012-01-05 23:49:57 +00:00
Thomas Dinges
e95a05b29d 2.6 UI Files:
* Some code cleanup.
2012-01-05 16:04:25 +00:00
Dalai Felinto
d560b33f74 logic editor ui adjustment, all gameprop types are replaced by the ob.data.body (not only Text) 2012-01-05 08:08:58 +00:00
Campbell Barton
cda279b525 edit on recent font UI changes.
don't show the text objects body in the ui - this could be pages of text and even though it only draws part of this, it still allocates and frees the string on every draw.
2012-01-05 06:12:26 +00:00
Campbell Barton
e039a631a9 add bpy collection method .find(key), so you can get the index of an item in a collection, -1 if not found.
use this to replace bge text ui py function.
2012-01-05 06:05:45 +00:00
Dalai Felinto
be025ea319 This patch creates an interface for ["Text"] properties in Font objects.
Interface:
http://www.pasteall.org/pic/show.php?id=23785

Simple test file:
http://www.pasteall.org/blend/10616
(I'll commit this to the text suite later)

Code Explanation:
---------------
(1) it adds a toggle to add/remove a "Text" gameproperty.
 - internally this property is just another game property (so we can find it within the game.properties lookup).
 - the property itself has no 'value', the interface shows the content of ob.data.body instead (why? because gameproperties are per object, while the text is per data).

(2) at BGE converter time it sets the current value of the object.data.body to the ["Text"] property.

(3) if you change object.text (bge text property) it automatically convert ["Text"] to a CStringValue.

*** that means if the original property was a CIntegerValue, it will be converted to CStringValue forever ***

* the only to do I can think of is to add a warning at doversion time if user has ["Text"] property for a Font object *
* when that happens we print a warning in console/popup.*
2012-01-04 21:40:00 +00:00
Sergey Sharybin
cd84a43334 Camera tracking: added depth object to Follow Track constraint
If this object is defined, object with Follow Track constraint would be
projected into surface of this depth object.
If object is not set or there's no projection onto it, projection plane
calculated based on original object position would be used.

This allows to make cheap facial mocap.
2012-01-04 17:20:08 +00:00
Sergey Sharybin
ea9f5e3d2a Fix for follow track constraint using incorrect icon name 2012-01-03 14:56:48 +00:00
Campbell Barton
aa43cab820 weight paint buttons now work in weight paint vertex select mode 2012-01-02 16:59:46 +00:00
Campbell Barton
77bdef4d22 py scripts - replace bad uses of len(),
checking if the collection is True is faster since it only checks if it has at least one item, rather then going over all items.
2012-01-02 16:18:39 +00:00
Campbell Barton
a49e80c48a use props all over for operator properties vars 2012-01-01 13:09:58 +00:00
Campbell Barton
5543928aa7 rna_xml module - write colors as hexadecimal values, also swap import/export order of key config buttons, since they didnt match other uses where import is first. 2012-01-01 10:05:04 +00:00
Campbell Barton
c99975e24f pep8 edits 2012-01-01 08:52:54 +00:00
Campbell Barton
418d66242f theme import/export - uses generic rna_xml py module. 2012-01-01 08:12:51 +00:00
Campbell Barton
1d152c77a5 minor style edits to space_clip & unused var 2011-12-31 02:40:33 +00:00
Nicholas Bishop
289c8b5758 Add remesh modifier (dual contouring).
This patch adds a new remeshing modifier. The algorithm is based on
the paper "Dual Contouring of Hermite Data", and the implementation
was contributed to Blender by Dr. Tao Ju.

The contributed code is in intern/dualcon, and was modified to compile
under gcc and work on 64-bit systems. Files not needed for Blender
were removed and a small C wrapper was added in order to interface it
with Blender. The rest of the patch is just standard modifier stuff.

Reviewed by Sergey, code review link:
http://codereview.appspot.com/5491053/

The remesh icon was contributed by Zafio:
http://blenderartists.org/forum/showthread.php?240751-Request-for-modifier-icon/page2.
Thanks to everyone in that thread for the icon proposals and
discussion.

Documentation and examples on the Blender wiki:
http://wiki.blender.org/index.php/User:Nicholasbishop/RemeshModifier

In case the history is needed for anything, check the remesh-modifier
branch of this git repository:
https://gitorious.org/~nicholasbishop/blenderprojects/nicholasbishop-blender
2011-12-30 21:11:40 +00:00
Sergey Sharybin
3c6e818b22 Object tracking integration
This commits merges object tracking implementation from tomato branch.

Summarized changes from branch:

- Added list of objects to be tracked. Default there's only one object called
  "Camera" which is used for solving camera motion. Other objects can be added
  and each of them will have it;s own list of tracks. Only one object can be used
  for camera solving at this moment.
- Added new constraint called "Object Tracking" which makes oriented object be
  moving in the save way as solved object motion.
- Scene orientation tools can be used for orienting object to bundles.
- Object has got scale to define "depth" in camera space.
- All tools which works with list of tracks or reconstruction data now
  gets that lists from active editing object.
- All objects and their tracking data are available via python api.
- Improvements in witness cameras workflow,
2011-12-30 18:06:02 +00:00
Brecht Van Lommel
d7d856a23d Color management: add "Color Unpremultiply" option for images and render settings.
For premultiplied alpha images, this makes any color space conversion for the image
or render output work on color without alpha multiplied in.

This is typically useful to avoid fringing when the image was or will be composited
over a light background. If the image will be composited over a black background on
the other hand, leaving this option off will give correct results.

In an ideal world, there should never be any color space conversion on images with
alpha, since it's undefined what to do then, but in practice it's useful to have
this option.

Patch by Troy Sobotka, with changes by me.
2011-12-30 14:17:11 +00:00
Sergey Sharybin
c21cfb4fcd Camera tracking: improvements of track preview widget
- Enable bicybic filtering fir image displayed in track preview
- Option to show grayscale content of track preview
- When some channels are disabled, display exactly the same
  content of preview image which is sending to tracker library.

Merged from tomato branch using command:
    svn merge -r42382:42383 -r42384:42385 -r42394:42395 \
	    -r42397:42398 -r42398:42399 -r42406:42407 \
		-r42410:42411 -r42417:42418 -r42471:42472 \
		^/branches/soc-2011-tomato
2011-12-30 10:20:29 +00:00
Dalai Felinto
2ca9a6a004 more mist settings should be accesible to BGE 2011-12-29 01:38:11 +00:00
Sergey Sharybin
fd134927dd Merging r42800 through r42895 from trunk into soc-2011-tomato 2011-12-27 10:11:07 +00:00
Campbell Barton
4537061e55 patch [#29673] Visualize Indices (developer aid)
by Howard Trickey (howardt)
2011-12-22 05:39:23 +00:00
Sergey Sharybin
9774c93435 Merging r42770 through r42799 from trunk into soc-2011-tomato 2011-12-21 14:50:05 +00:00
Dalai Felinto
056c49e9ec Patch [#29654] New menu option under Object > Game with "Copy All Physics Attributes" by Daniel Macedo
"This is a patch that adds an option under the menu Object > Game to copy all the physics attributes from Game Engine."
2011-12-21 02:41:27 +00:00
Sergey Sharybin
921b2ee2d4 Merging r42723 through r42769 from trunk into soc-2011-tomato 2011-12-20 17:24:20 +00:00
Daniel Stokes
0be004bb2f Cleaning up some issues that found their way into the python ui files with the first Cucumber merge. 2011-12-20 07:39:30 +00:00
Thomas Dinges
a17f4dfda6 First fix after Cucumber merge starts.
* Restore COMPAT_ENGINES for particle panel, caused error on startup. (Cycles needs it)
2011-12-20 06:26:03 +00:00
Dalai Felinto
32b23b9f74 Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting

[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]


Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593

36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)

37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.

37157:
Making the bake options available in Blender Game

37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)

37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.

[37517: committed previously]

37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API

39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]

40552: space_logic.py (* fixed an error in space_logic.py *)

40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me



########################################################
code left behind (to be included in next commit):
########################################################
		{
			/* Initialize default values for collision masks */
			Object *ob;
			for(ob=main->object.first; ob; ob=ob->id.next)
				ob->col_group = ob->col_mask = 1;
		}
2011-12-20 03:11:56 +00:00
Sergey Sharybin
1dc74acc12 Object tracking: configurable scale for object solution
Added slider to define scale of object solution which is used to define
"depth" of object relative to camera position. This slider effects on all
"users" of object solution such as bundles display, constrained objects and so.

Added new operator called "Set Solution Scale" to set real scale for object
solution based on real distance between two bundles reconstructed for this object.

New slider and operator can be found on "Object" panel in toolbox when in
reconstruction mode and active tracking object isn't a camera.
2011-12-19 15:12:33 +00:00
Brecht Van Lommel
a64d92eb13 Fix #29655: keyboard shortcuts missing from text editor text menu, and removed
confirmation popup for creating new text datablock.
2011-12-19 14:23:19 +00:00
Sergey Sharybin
737648a0bf Merging r42648 through r42722 from trunk into soc-2011-tomato 2011-12-19 10:39:40 +00:00
Lukas Toenne
24785cc16a Removed buttons in node headers for hiding unused sockets and for hiding the (non-socket) option buttons. These are rarely used buttons that only complicate the UI. Alternatively these operators can still be accessed in the Node menu of the node editor window, "Toggle Hidden Node Sockets" and "Toggle Node Options" respectively. 2011-12-18 17:59:04 +00:00
Sergey Sharybin
8a9d901c81 Camera tracking: add camera to follow track and object solver constraint
Object used to be parented to active camera which isn't very convenient when
working with witness cameras.

Now parent camera can be specified in constraint (if it's not specified, active camera is used)
2011-12-15 20:38:23 +00:00
Sergey Sharybin
e534af906a Object tracking: various fixes and improvements
- Bundles selection is now available for object's bundles
- If bundles selection wasn't changed in 3D viewport, fallback to regular
  object selection, so objects behind bundles can be selected
- Snap cursor to selection now respects object's bundle selection
- Object and rack name now can be selected from list in constraint settings
- Added preset for tracks used for object tracking
2011-12-15 16:10:49 +00:00
Sergey Sharybin
ba16e7d631 Object tracking: object with object solver constraint is now parented to scene's camera
Made Object Solver operator parent object to scene's camera. Behavior is pretty much
familiar to Child Of constraint -- it stores inverted transformation matrix which gives
constant offset in parent's space.
Current files would open incorrect, to make object aligned well again, just press
"Set Inverse" button in Object Solver constraint.
Fixed orientation operators so now they should work in all cases.
Also changed behavior of Set Origin operator which now sets origin to the median
point of all selected tracks/
2011-12-15 16:09:57 +00:00
Sergey Sharybin
deb95ddb44 Merging r42621 through r42647 from trunk into soc-2011-tomato 2011-12-15 16:04:59 +00:00
Antony Riakiotakis
6ccc605660 Bicubic bump map filtering.
This commit introduces bicubic bump map capabilities for the viewport for OpenGL 3.0+ capable GPUs. 

To use the functionality change the bump mapping method to "best quality"
Previous "best quality" setting becomes "medium quality" now.
For non OpenGL 3.0 GPUs this becomes the same as "medium quality"

Also:
* added tooltip descriptions to the bump method settings.
* modified the shader to ommit extraneous matrix multiplications for matrices already provided by OpenGL.

Bicubic shader by Morten Mikkelsen. Thanks a lot!

Oh...and FIRST!
2011-12-15 13:58:09 +00:00
Sergey Sharybin
b865c0314f Merging r42533 through r42601 from trunk into soc-2011-tomato 2011-12-13 11:58:59 +00:00
Sergey Sharybin
a912afd202 Fix #29516: Twist brush giving crazy results
- Rotation now happens around initial stroke location rather than around scene origin
- Added slider for rotation strength which helps in cases only few rotation is needed
  to be to increase the precision of such strokes
2011-12-10 14:45:30 +00:00
Sergey Sharybin
3717a4a9e1 Merging r42482 through r42532 from trunk into soc-2011-tomato 2011-12-09 10:02:01 +00:00
Sergey Sharybin
d568f56f18 Merging remained part of hybrid tracker which adds correlation threshold
Keir's comment:
  Add support for detecting tracking failure in the ESM tracker component of
  libmv. Since both KLT and Hybrid rely on ESM underneath, KLT and Hybrid now
  have a minimum correlation setting to match. With this fix, track failures
  should get detected quicker, with the issue that sometimes the tracker will
  give up too easily. That is fixable by reducing the required correlation (in
  the track properties).

Command used for merge: svn merge -r 42396:42397 -r 42399:42400 ^/branches/soc-2011-tomato
2011-12-07 14:54:03 +00:00