Commit Graph

35017 Commits

Author SHA1 Message Date
Ton Roosendaal
23929c4c53 Bugfix #32996
Backspace event is messed up - it was inserting weird characters in the editors.
Added check for proper keypress now. Will check real issue later.
2012-10-29 08:59:47 +00:00
Campbell Barton
74c60dc5bf fix [#32998] Decimate modifier - Planar
error in recent decimator upgrade, missing NULL check.
2012-10-29 05:31:40 +00:00
Campbell Barton
99c6b53cbc correct use_fast_update for vertex painting, it wasn't swapping red/blue as it should have.
(pointed out by Bastien Montagne in relation to [#33002]).
2012-10-29 03:53:02 +00:00
Campbell Barton
dbb40e805d py api: add mathutils.Matrix adjugate(d) methods, also add adjoint_m2_m2() to BLI_math_matrix 2012-10-29 03:36:55 +00:00
Campbell Barton
5549904171 style cleanup 2012-10-29 02:11:40 +00:00
Lukas Toenne
dd106b5c7a Removed the initial HIDDEN flag from the UI sidebar region in node editor. This way the sidebar is visible by default when making a new node editor.
Rationale is that the sidebar contains some extra detail settings for several node types. Many users don't seem to even know that this feature exists, so making it visible by default should be helpful.
2012-10-28 17:47:47 +00:00
Lukas Toenne
5464979dfd Fix for freeing node trees that are part of other data blocks (material, world, lamp, texture, scene). These node trees were not properly freeing the IDProperty data, due to not being called from BKE_libblock_free.
Now there is an extra function BKE_libblock_free_data, which is called explicitly in ntreeFreeTree if the tree is not part of the library data (ntreeCopyTree does a similar thing using BKE_libblock_copy_data).
2012-10-28 17:09:50 +00:00
Campbell Barton
656b884387 fix for extruding edges giving incorrect (swapped) loop data for new faces. 2012-10-28 16:17:20 +00:00
Campbell Barton
0d5a6dccf7 code cleanup: minor changes before committing functional changes. 2012-10-28 15:37:29 +00:00
Campbell Barton
0c6a0b293f style cleanup 2012-10-28 15:23:16 +00:00
Ton Roosendaal
d800cffaf1 Event system fix:
Now modifier key press gets generated without having own modifier set.
Same happens for double clicks on modifiers.

This also fixes case: press shift twice first, modifier fails.
2012-10-28 14:49:40 +00:00
Ton Roosendaal
520e1b2090 Bugfix #24016
Removed dubious code for checking CTRL+C CTRL+V on buttons.
This made copy/paste fail if you keep the modifier key holding.
2012-10-28 12:20:38 +00:00
Sergey Sharybin
694aef1933 Fix #32981: Render baking redraw 2012-10-28 12:08:36 +00:00
Ton Roosendaal
dca3587edd Event system cleanup: bringing KM_CLICK back in control.
- Solved Modal Keymap hijack of event codes
  (with note this should be coded better)

- Added dedicated state variable check_click in event to trigger it

All this in an attempt to get code understandable and predictable again. :)

This solves error like:
- editmode mesh
- select a vertex
- grab it, press control for grid snap
- on LMB assign, it also did an extrude.
2012-10-28 11:19:35 +00:00
Ton Roosendaal
5819833191 Another leftover debug print, sorry! 2012-10-28 09:26:50 +00:00
Brecht Van Lommel
b4642d203d Fix #32979: proportional edit connected was too slow with many vertices on
some meshes, now use the system qsort instead of a custom one (which I guess
suffered from poor choice of pivot point in some cases).
2012-10-27 18:54:45 +00:00
Andrea Weikert
8a6797d6a9 == file browser ==
PATCH: [#32989] Activate backup files filter in File Browser
Contributed by Georg Kronthaler, many thanks!
(I just moved the icon to a different place reserved for file browser icons)

* enables the filtering of backup files in the file browser
* adds a 'filter backup files'-icon to the filter buttons
* adds new icons for backup files in list and thumbnail view
* enables file preview for the backup files
2012-10-27 18:31:52 +00:00
Andrea Weikert
89b7e22578 == filebrowser ==
PATCH: [#32985] File Browser text file icon does not match text filter icon
Contributed by Georg Kronthaler, many thanks!

* set correct icon for text files and drag&drop
* remove duplicate if for filter_text
* fixed a couple of blanks at the end of line.
2012-10-27 17:47:58 +00:00
Ton Roosendaal
3f88ca0d80 Bugfix #32823 (probably) or from Thomas Dinges in irc:
- Camera mode fly a bit
- Apply view change
- Middlemouse to go out of camera view

Zoom then fails. Appears the flymode is resetting values that have to be set.

The bugreporter claims same, but blames it on particles ;)
2012-10-27 17:21:21 +00:00
Miika Hamalainen
c64fa6a344 Smoke/Dynamic Paint: Allow use of fluid sim generated particles as emitter/brush. 2012-10-27 17:19:55 +00:00
Ton Roosendaal
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
Campbell Barton
65bc9ee8d0 revert last commit, it broke regular face extrude. need to look into it further. 2012-10-27 15:34:54 +00:00
Ton Roosendaal
e106003cdb Bugfix 32988
"Area prev space" was setting areas to "Info" - in case no previous editor
could be found. That goes wrong for cases like:

- goto composite screen
- make image editor full
- render
- esc
2012-10-27 15:27:27 +00:00
Campbell Barton
71a0fb5dde fix for extruding single edges from faces giving flipped loop data - UV's/VCols 2012-10-27 15:24:19 +00:00
Campbell Barton
9c2d72a27d comment testing typechecking code, was causing issues on gcc 4.4 for some reason. 2012-10-27 15:08:40 +00:00
Campbell Barton
c9e5b1e6ee add --debug-handlers so --debug-events isnt so noisy. 2012-10-27 15:05:12 +00:00
Campbell Barton
7413adce04 add back debug prints for event handlers. not sure why they were removed in r51683 2012-10-27 14:55:31 +00:00
Ton Roosendaal
4959c8767e Bugfix:
Menu accellerator now accepts fast clicking again. (ctrl-q + q)
2012-10-27 14:10:25 +00:00
Ton Roosendaal
4682e7c7ce Another tweak in event code to get KM_CLICK work.
It was copying 'prevval' and 'prevtype' too often - can cause issues with
different event systems or perifirals.
2012-10-27 13:35:33 +00:00
Joshua Leung
9b2a0f3824 Comment + whitespace tweaks for constraints
* Radiant -> Radians

* Noted down revision number for when Jahka removed the old constraint blending
logic. I spent some time hunting this down while trying to check if it might've
caused any obvious changes leading to one of the (now closed) bugreports. Better
to note this in the code then.
2012-10-27 13:22:44 +00:00
Ton Roosendaal
16544fb54b Putting back mysterious lines that check KM_CLICK keymap conflicts
It's a real puzzle this click bizz!
2012-10-27 13:15:11 +00:00
Ton Roosendaal
601cd0215c Removed leftover debug print. 2012-10-27 12:31:35 +00:00
Lukas Toenne
9c2eaad7aa Fix #32982, Segault when trying to show a node material.
This was caused by incomplete pointer mapping of the node->internal_links list in r51630, my bad. In intermediate revisions this could lead to corrupted .blend data. This patch adds a do_versions check to remove such bad links. The correct internal_links list will get restored on node update.
2012-10-27 11:56:21 +00:00
Campbell Barton
9fc95bd7ee use min/max inline functions where MIN2/MAX2 were doing type conversion. 2012-10-27 11:18:54 +00:00
Bastien Montagne
ec67334e25 A few more BMesh errors messages translated, and "automated" translation for modifers too! 2012-10-27 11:12:09 +00:00
Lukas Toenne
91584b0f0c Fix for missing bracket in r51674. 2012-10-27 11:10:12 +00:00
Campbell Barton
aeba4950c3 style cleanup 2012-10-27 10:42:28 +00:00
Ton Roosendaal
25f2439c47 Transform: didn't set "event handled" to zero on undhandled events.
(like double click)
2012-10-27 10:22:41 +00:00
Ton Roosendaal
3189dac959 The UI wasn't capable of handling Double Click events; causing fast typing to
not work.

This is a temporary fix to make button type work. I'll check on other cases
now too. 

Best would be to have UI code return correct flags for whether it has
done something or not. This hasn't been coded really - so that's a todo for
a later cleanup there.
2012-10-27 09:52:26 +00:00
Campbell Barton
d6d8de015c change BLI_strlen_range_utf8 to the more conventional BLI_strnlen_utf8 2012-10-27 02:47:39 +00:00
Campbell Barton
e903701450 style cleanup 2012-10-27 01:46:47 +00:00
Campbell Barton
bf4be941fc fix for filled rip copying loop customdata (fix in BM_edge_other_loop broke it)
also assert when customdata can't be copied because of invalid args.
2012-10-27 01:33:33 +00:00
Thomas Dinges
818710f082 * Windows compile fix for __func__ (r51642) 2012-10-26 18:06:14 +00:00
Bastien Montagne
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
Bastien Montagne
6abd7fda52 Fix Sound Bake op always using 'use_' prefix for all its bool RNA props. Also tweaked new tips, and a few other UI messages edits... 2012-10-26 17:29:21 +00:00
Ton Roosendaal
dd176509fd Bugfix for new handling of double-click:
The modifier keys were getting own key as modifier :)
Made it not possible to use them for events.

Still open issue: for some reason modifer key 'press' gets swallowed.
Digging into that.
2012-10-26 16:46:26 +00:00
Ton Roosendaal
3dfceecace Bugfix: because of fixed event checking, the 'area zone' didn't work anymore.
Event that gets added should get zero'ed value.
2012-10-26 16:17:48 +00:00
Ton Roosendaal
37bf6ef044 Bugfix #28734
Double clicks were never working reliably in Blender - this mostly because
it wasn't a real event, but something generated in the handler code.

Now it is an actual event - meaning it always gets handled (if you have
a keymap item for it of course), but if there's no doubleclick handling
it treats the doubleclick as a normal click.

Also cleaned code. No recursion anymore.
2012-10-26 15:21:31 +00:00
Bastien Montagne
d24aaf5958 Fix for a nasty (and dangerous, buffer overflow) bug that quite oddly seems to have never shown its ugly face until today (at least for me)... It was revealed by mocap's addon stupidly long operators label names (fix comming in next commit): the rna_Operator_bl_idname_set() and rna_Operator_bl_label_set() were clamping there string copy to RNA_DYN_DESCR_MAX instead of OP_MAX_TYPENAME! 2012-10-26 14:45:56 +00:00
Jiri Hnidek
2821f822c5 * New string property subtype: PASSWORD
When this new subtypes is used, then string of property is hidden using
asterisks, e.g.: mysecretpassword -> ****************

This code was reviewed and modified by Brecht. Thanks very much:
 - https://codereview.appspot.com/6713044/

This new subtype of string property is intended mostly for Add-on developers
writing Add-on which communicates with some server (http, sql, ftp, verse,
etc.). When this server requires user authentication and user has to type
username and password, then current API didn't allow to type 'hidden' password,
e.g. when you want to demonstrate this script, then everybody can see this
security password. Some examples of Add-on which could use this new subtype:
 - On-line database of textures
 - Integration of render farm
 - Integration of Verse

Security Notes:
 - You can copy paste hiddent string of property from text input using (Ctrl-C, Ctrl-V),
but you can do this in other GUI toolkits too (this behavior it is widely used).
 - Text of string property is stored in plain text, but it is widely used in other
GUI toolkits (Qt, Gtk, etc.).

Simple examples:
 - https://dl.dropbox.com/u/369894/draw_op_passwd.py
 - https://dl.dropbox.com/u/369894/blender-password.png
2012-10-26 12:58:54 +00:00
Sergey Sharybin
608d62f6a6 Descriptions should never have dots on the end of sentence 2012-10-26 12:42:59 +00:00
Sergey Sharybin
9b110f2f64 Camera tracking fixes
- Dopesheet should be invalidated after solution
- Prevent crash when non-camera object is set as scene camera
2012-10-26 12:36:50 +00:00
Joerg Mueller
de72ffa69b Patch [#32030] Tooltips for Bake Sound to F-Curves
by Gottfried Hofmann
2012-10-26 11:34:15 +00:00
Sergey Sharybin
d9f220ed96 Show warning message when multires baking happens for preview level of 0 2012-10-26 11:30:00 +00:00
Ton Roosendaal
13af773398 Bugfix #32975
Shader nodes didn't redraw correct on preview-type changes.
Also made shader node previews draw nicely, without flashing empty images.
2012-10-26 11:29:30 +00:00
Campbell Barton
0e3de1df4b fix [#31661] Custom properties do no respect min/max values
also renamed function added prev commit
2012-10-26 10:54:02 +00:00
Campbell Barton
0e6f8e3e25 fix for crash when a python operator or render engine was freed in the C code and then referenced from python.
now further access in python gives an exception at the line when the freed data is accessed.
2012-10-26 10:33:57 +00:00
Ton Roosendaal
6cc79fc3d0 Bugfix #31842
Proportional editing of Objects in Object Mode didn't reset positions when
changing the circle influence size. Fix provided by Phillipp Oeser. Thanks!
2012-10-26 09:55:19 +00:00
Ton Roosendaal
c04b3df1af Bug report #32970
Added "not animatable" properties to Image animation options; that's not supported.
2012-10-26 09:13:26 +00:00
Campbell Barton
dbde62d124 fix [#30087] operator_context is different for popup and submenu's *TODO, after 2.62*
having context different for menu vs submenu is quite confusing, now they are both: WM_OP_INVOKE_REGION_WIN
this changes WM_menu_invoke behavior.
2012-10-26 06:22:54 +00:00
Campbell Barton
2d39533da8 add a function for merging 2 bmesh element flags into a 3rd item. 2012-10-26 06:19:49 +00:00
Campbell Barton
3b7dee7cba fix for another error reported in [#26712], use count failing with 3 levels of linking. 2012-10-26 05:33:06 +00:00
Campbell Barton
f30ab48dac fix [#26712] Particle group instance 'Use Count' value gets reset on file-load. 2012-10-26 05:22:24 +00:00
Campbell Barton
1794ab47c5 fix own error when refactoring projection code, [#32971] Edge Select unusable beyond certain zoom distance. 2012-10-26 04:54:55 +00:00
Campbell Barton
0e494b74c4 style cleanup 2012-10-26 04:14:10 +00:00
Campbell Barton
e5a31eff37 code cleanup: use squared length for comparisons and is_zero_v# rather then checking length == 0. 2012-10-25 23:04:33 +00:00
Campbell Barton
b32bf2c462 code cleanup: use min_/max_ math functions, add minmax_v2_v2v2. 2012-10-25 22:47:54 +00:00
Brecht Van Lommel
2223ca1c20 Fix #32973: crash adding python property with update=None parameter passed. 2012-10-25 22:37:05 +00:00
Bastien Montagne
a4eacfa867 Fix for r51634, without this define, translation won’t happen (all i18n macro would be no-op for this editor!). 2012-10-25 20:12:11 +00:00
Sergey Sharybin
821cc6769e Correction to viewport's lens description - lens works in ortho mode now. 2012-10-25 19:49:30 +00:00
Jens Verwiebe
d90b03572d fix scons compilation after 51634 2012-10-25 19:16:07 +00:00
Dalai Felinto
930c916e6c adding logic editor strings to .po
for the records I was chasing the strings using:
/\"\u[^\".]*\"/IFACE_(\0)/cg
2012-10-25 18:28:12 +00:00
Bastien Montagne
0025692d19 Fix compilation in paranoid gcc warnings=errors mode... 2012-10-25 18:26:07 +00:00
Sergey Sharybin
bb783c9a7b Correction to recent makesrna commit 2012-10-25 17:25:14 +00:00
Ton Roosendaal
ce77c5af1c Bugfix #27585
Oldie: Texture buttons - "Add New Image" - crashes on changing X or Y resolution.

I've greyed out these buttons now, changing image memory that's in use by the
preview render is not supported.

A real fix I did was assigning the new image to the texture, that was missing.
2012-10-25 16:58:52 +00:00
Lukas Toenne
09ed97afc5 Internal node links are now cached in a per-node list, instead of being generated as a transient list that is returned from the callback and had to be freed by the caller. These internal links are used for muted nodes, disconnect operators and reroute nodes, to effectively replace the node with direct input-to-output links.
Storing this list in the node has the advantage of requiring far fewer calls to the potentially expensive internal_connect callback. This was called on every node redraw ...

Also it will allow Cycles to properly use the internal links for muted nodes, which ensures consistent behavior. The previous method was not applicable in Cycles because transient list return values are not supported well in the RNA and particularly the C++ API implementation.
2012-10-25 16:49:06 +00:00
Lukas Toenne
7107b8eef8 Support for string and index lookup operators on collections in the C++ RNA API. 2012-10-25 15:42:36 +00:00
Brecht Van Lommel
85d9ba5cbb Fix issue after commit 50282: float texture painting non-color data textures did
not do correct partial updates, now it remembers if the opengl texture is a
non-color data texture or not and takes that into account for the update.

Also includes some renaming ncd => is_data for consistency with color space
terminology used elsewhere.
2012-10-25 15:25:28 +00:00
Campbell Barton
e0a4ca00ac fix (own issue with recent addition) [#32966] wireframe shading doesn't work right with decimator unsubdivide mode 2012-10-25 15:11:02 +00:00
Ton Roosendaal
d34f2410a1 Bugfix #24343
Ancient 2.5 UI issue:

The button views in Property Editor have an internal storage, to ensure the view
on the buttons stays same when you switch contextes or select objects.

Bug was that - in case buttons were all scrolled invisible - sometimes no slider
was drawn to indicate that.

Discussion on whether this is a good feature or not: the only improvement would
be to store such settings even per object... but that's a feature creep I think.
2012-10-25 14:49:50 +00:00
Brecht Van Lommel
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
Brecht Van Lommel
a64016c71a Camera: bring Title Safe display up to date, making it a Safe Areas option that
shows both title safe and action safe areas following more modern standards.

Patch #32822 by Harley Acheson, full description:

Our current "title safe" camera display option is anachronistic. It shows a
border of 10% on all edges, which used to be the recommended title safe area
for 4:3 content on standard definition CRT televisions. However we are very
unlikely to create new projects that output for SD TV at that aspect ratio.

This patch change the option to "safe areas" with and indicates the
"title safe" area (also known as "graphic safe") as well as the "action safe"
area. "Title Safe" is an area visible by all reasonably maintained sets, where
text was certain not to be cut off. "Action Safe" is a larger area that
represented where a "perfect" set (with high precision to allow less
overscanning) would cut the image off.

The current recommendation for Action Safe is 3.5% on all edges, which is the
maxiumum overscan for TVs now. The recommended title safe is now 5% vertically
and 10% horizontally for content that is of wider aspect ratio than 4:3. The
reason for the difference between horizontal versus vertical margin is because
wider content would be letterboxed on an older 4:3 television, giving it
additional margin.
2012-10-25 13:31:45 +00:00
Sergey Sharybin
15362e1c02 Fix for strict compiler setup 2012-10-25 13:12:37 +00:00
Brecht Van Lommel
575886f37c UI: add hide/show menus item in header right click menu (same as +/- button).
Patch #32872 by Harley Acheson.
2012-10-25 13:08:47 +00:00
Brecht Van Lommel
aab78de27c Better fix for #32837: DDS compressed textures now no longer need to be flipped
when saving, rather we flip the compressed texture during load. The code used
here comes from the chromium O3D project:
http://src.chromium.org/chrome/trunk/o3d/core/cross/bitmap_dds.cc

Also made it only load compressed for power-of-two resolution images, it doesn't
seem to work for other resolutions, just falls back to non-compressed then.
2012-10-25 12:54:16 +00:00
Ton Roosendaal
0405406280 Bugfix #28298
When I added DPI support in the UI, I added code that refreshes views for 2d
regions. These refreshes also happened on screen switches or file select, causing
header views (horizontal scrolled) to clear.

Now the code less intrusive, changing header views in fewer cases. 

This is a patch provided by Anthony Edlin. Thanks dude!
2012-10-25 12:53:27 +00:00
Campbell Barton
4f812f6b21 fix for nasty bug with frame dropping playback.
When playback was running fast the frame step could be 0, making playback jittery.
this commit just makes sure the frame step is at least 1, but there is still an issue with framedrop skipping too many frames (or too few) which Ill check on next.
2012-10-25 11:48:56 +00:00
Ton Roosendaal
1e74e1c1f7 Usability improvement!
Duplicators and particles are now part of the selection code (mouse clicks).
Very annoying you couldn't select hair, particles or duplication systems.
2012-10-25 11:18:05 +00:00
Ton Roosendaal
7cf6786f31 Bugfix #32962
Menu buttons: the text label in a button was clipped on right too soon, there's
more space. Noticable especially on popup buttons with labels like "X" or "Y".
2012-10-25 10:51:03 +00:00
Bastien Montagne
0632da0829 Cleanup: remove old, commented code for constraints' space conversion for bones. 2012-10-25 10:14:35 +00:00
Campbell Barton
53d4685c95 skip updating tessface customdata layers when joining meshes & clear tessface data on the target mesh so stale tessface data isnt used. 2012-10-25 08:48:05 +00:00
Campbell Barton
95ddd19d13 fix for build error in own commit with non gcc compilers. (and remove invalid comment) 2012-10-25 07:53:11 +00:00
Campbell Barton
9804515cf0 bmesh todo: dont calculate normals in editmesh with modifiers applied, its assumed modifiers output correct normals at the moment. 2012-10-25 04:58:27 +00:00
Campbell Barton
9e6d27bbf0 add BLI_STATIC_ASSERT macro. 2012-10-25 04:44:46 +00:00
Nicholas Bishop
69fa77d279 Various convex hull fixes
* Lower the required number of vertices from four to three. The new
  backend correctly outputs a triangle in this case.

* Fix the check for the number of input vertices. Before it was
  counting total number of input elements including edges and faces.

* Don't mark edges as holes if they are loose.

* Don't allow duplicate faces to be created.

* If use_existing_faces isn't enabled, but a face in the convex hull
  has the same vertices as an existing face in the mesh, mark it as
  output geometry rather than interior geometry.

* Fixes bug [#32960] Convex hull operator crashes when 'make holes' is
  selected.
  projects.blender.org/tracker/?func=detail&atid=498&aid=32960&group_id=9
2012-10-25 04:08:51 +00:00
Campbell Barton
ade7a000fd hide text overlays when 'Only Render' option is enabled. 2012-10-25 03:10:35 +00:00
Campbell Barton
95b8a64889 fix [#32938] The Splash Screen doesn't show up correctly .....
applying window clipping to the splash on startup gave strange/annoying problems.
2012-10-25 02:57:55 +00:00
Brecht Van Lommel
1298357581 Fix #32964: IK constraint had a "Target" option, which actually is an internal
flag that shouldn't have been exposed in the user interface. Also avoided many
calls to pchan.is_in_ik_chain in UI script, it's somewhat slow.
2012-10-24 22:36:06 +00:00
Brecht Van Lommel
5aa6327e2f Cycles UI: keep node input sockets collapsed by default in the properties editor,
when doing the linking in the node editor, to keep the properties editor more
clean in this case.
2012-10-24 21:57:16 +00:00
Brecht Van Lommel
b4d9037dfb Fix #30940: layout.prop_search() item not drawing correct inside menus. 2012-10-24 21:57:07 +00:00
Alexander Pinzon
87108a7bc6 Solved the problem when WITH_PLAYER activated.
blenderplayer had not added the library Opennl, was added to the CMakeLists.txt file.
2012-10-24 19:24:55 +00:00
Campbell Barton
7c846bbe75 add section on how to run scripts in blender for the API intro, found there were no simple docs like this in the wiki.
also set the window type to normal on start when -p argument is given, since the view could be maximized/fullscreen.
2012-10-24 16:55:06 +00:00
Sergey Sharybin
1fecf8ff31 Patch #29142: Reduce hopping when switching between perspective and orthographic on 3D view
Patch by Yasuhiro Fujii, thanks!

Original issue was that in vases viewport's lens are different from default
value switching between perspective and orthographic projections will change
viewplane a lot, which is disorienting and annoying.
2012-10-24 16:15:46 +00:00
Campbell Barton
f07b291591 fix for maximized startup blend preventing -p command line argument from working. 2012-10-24 16:15:36 +00:00
Jeroen Bakker
2dbc6e56b4 set default value of defocus maxblur when this is unset during reading. 2012-10-24 16:00:27 +00:00
Sergey Sharybin
68249f4ed6 Patch #31641: Text editor: unindent even if no selection
Patch by Sebastian Nell, thanks!

Still not ideal (it could some smarter selection policy in such case perhaps),
but it's less annoying than it was before.
2012-10-24 15:43:42 +00:00
Ton Roosendaal
927e14376f Bugfix #31527
Using "outliner data operation" on vertexgroup suggested it should work, but this is not
supported yet. Similar to all the other cases it throws a Report warning now.
2012-10-24 14:45:23 +00:00
Jeroen Bakker
a49b1d7b5e Oeps... Enabled the pixelate node added documentation, removed unneeded
code
2012-10-24 13:43:32 +00:00
Ton Roosendaal
f746f3ea09 Bugfix #32496
You don't believe it, this bug traces back to 2002. Went by unreported for a decade.

If you link in an object, delete it, and relink again its materials are lost!
Easy fix, annoying error. :)
2012-10-24 13:24:34 +00:00
Lukas Toenne
2af81d4a5e Fix #32835, Reroute node on shading nodes connection gives wrong renders.
Problem here is that muted nodes and reroute nodes are supposed to be removed from the execution node tree during the localize function. However, this is function is apparently only used during preview renders and must be considered a hack (is there anything that is not a hack in BI?)

Now the mute/reroute check happens in the node tree exec functions still used by BI and the legacy compositor and texture nodes. It uses the same internal_connect function from nodes to assign input stack indices directly to outputs (which also avoids overhead). Localize function also still does this. Cycles/Tile should also implement muting/reroute in their intermediate node layers by using this function, then it could be removed from localize too.
2012-10-24 12:57:48 +00:00
Campbell Barton
0a3e0b816c no need to update normals when running edge-split modifier since the normals are now set on conversion.
don't show 'Auto-Key' message when in editmode.
2012-10-24 11:53:48 +00:00
Campbell Barton
f40d77ec96 reneme volume_preservation -> use_volume_preserve 2012-10-24 11:44:32 +00:00
Campbell Barton
c93978d445 code cleanup: some edits for unused vars in recent smooth addition and some style edits. 2012-10-24 11:31:57 +00:00
Thomas Dinges
e4fcc07a10 UI fixes for Laplacian Smooth (r51578):
* Make UI look more like Smooth Modifier.
* Don't use RNA property names like "lamb", use a more descriptive one instead.
2012-10-24 11:13:43 +00:00
Thomas Dinges
ba48c94a8b Compile fix for r51578:
* Scons include missed the comma, caused Bullet Include to fail.
2012-10-24 10:54:50 +00:00
Daniel Genrich
3ce334e188 Merge GSoC project from branch: Laplacian Smooth (Operator & Modifier)
by Alexander Pinzon Fernandez (apinzonf)

Supported by Google Summer of Code 2012

Project Documentation:
http://wiki.blender.org/index.php/User:Apinzonf

Manual Page:
http://wiki.blender.org/index.php/User:Apinzonf/Doc:2.6/Manual/Modifiers/Deform/Laplacian_Smooth
2012-10-24 10:39:11 +00:00
Lukas Toenne
cbae51bc93 Removed the experimental (and commented-out) code for FOR and WHILE loops in nodes. This was a feature i tested a while back but was only partially supported by Blender Internal renderer and the old compositor. The main idea was to have nodes that automatically mirror input and output sockets to support incremental changes of "internal variables".
It is not a well-supported feature of the primary node systems (shader, compositor, texture) in Blender. If anybody wants to create a node system that has actual use for loops, they can do so much more elegantly with Python nodes, but it does not have to be a core node type in Blender. Removing this should ease node code maintenance a bit.
2012-10-24 10:00:28 +00:00
Ton Roosendaal
c9e489b53b Bugfix #32617
Text object render error.

Issue was caused by FLT_EPSILON being used to check for zero-sized faces, for
getting a reliable normal of front/backfaces of polygons. This value is too
small, giving occasional bad looking faces.

In other parts of code FLT_EPSILON10 was being used, that works much better.

Note for the future: here using doubles internally would be advised.
2012-10-24 09:33:29 +00:00
Campbell Barton
6d79568f66 style cleanup 2012-10-24 09:07:54 +00:00
Jeroen Bakker
b0fc0baafe Updated crop image setting to make every pixel outside the crop black as
it is expected.

Fix for [#32955] Compositer "Crop" node option "Crop Image Size" doesn't
really crop the input image
2012-10-24 08:59:36 +00:00
Jeroen Bakker
0fb9b7beda Adding a pixelate node.
This makes it possible to create pixelized scale in the Tile compositor.

Just append the node in front of a scale node or where you want the pixelization to take place.

There were some bugs on this subject, but they used the work around to add a blur size of 0 in the place where they need the pixelization.
2012-10-24 08:36:10 +00:00
Campbell Barton
0cba4e6d6f use smaller type for kdopbvh - this change was made as a size optimization, and I moved back to ints since there were many int comparisons.
now define axis_t and an unsugned char.
2012-10-24 08:16:49 +00:00
Campbell Barton
2de2acc681 add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers. 2012-10-24 07:24:11 +00:00
Campbell Barton
879d92062a code cleanup: move doxy comments into the C files. 2012-10-24 06:08:28 +00:00
Campbell Barton
3fab39f76f style cleanup: modifier structs 2012-10-24 05:45:54 +00:00
Campbell Barton
dd36983520 enable decimate modifier for curves. 2012-10-24 05:44:27 +00:00
Campbell Barton
90f4ed3a0e use int's for kdopbvh start/stop axis since there were loops comparing with other ints. 2012-10-24 05:08:33 +00:00
Campbell Barton
81eafc49e6 use min_ii/max_ii over MIN2 MAX2 2012-10-24 05:06:40 +00:00
Campbell Barton
db250a48f6 fix [#32855] Obj im and export and the file path and name
file selector now uses previously used settings for operators rather then over riding them with the currently open blend file.
2012-10-24 04:29:35 +00:00
Campbell Barton
cbc734dd79 comment R_SEQ_GL_REND flag, opengl render now does gl previews. 2012-10-24 03:37:32 +00:00
Campbell Barton
17530108f4 enable rendering from the sequencer again. this was working since 2.4x and shouldn't have been disabled. 2012-10-24 03:27:11 +00:00
Campbell Barton
2da6039e63 rename axis_primary_v3() to max_axis_v3() to avoid confusion with axis_dominant_v3(). also add min_axis_v3(). 2012-10-24 02:25:00 +00:00
Janne Karhu
9055ec3e0a Final fix for [#31017] Particles not generated on Grid Distribution
* In some cases a quad would be intersected twice so particles near this double-intersection point were not generated in grid distribution due to being marked as outside the surface.
2012-10-24 01:43:59 +00:00
Nicholas Bishop
1dadd3b7c6 Partially replace convex hull implementation with Bullet implementation
* Bullet's convex hull implementation is significantly more robust
  than the one I implemented, as well as being faster.

* This fixes bug [#32864] "Convex Hull fails in some cases."
  projects.blender.org/tracker/?func=detail&aid=32864&group_id=9&atid=498

  That bug, and others like it, relate to the poor handling of
  co-planar surfaces in the input. Pretty much any model that is
  simple-subdivided a few times gave very bad results before, Bullet's
  implementation handles this much better.

* In order to ensure a smooth transition, the Bullet output is
  translated into the existing HullTriangle hash structure. This makes
  it easy to ensure that the existing slot output stays the same; the
  interactions between the slots are somewhat complicated, detangling
  is a TODO.

* Reviewed by Brecht:
  https://codereview.appspot.com/6741063
2012-10-23 23:54:15 +00:00
Bastien Montagne
9edec9f0f3 Fix #2 for [#32954] Crash when activating 'International Fonts' in User Preferences
I though allocating zero-sized mem would return a NULL pointer, but it looks like it does not... :/ Anyway, Blender should no more crash in case languages file is missing, will just use default (system) locale...
2012-10-23 19:39:32 +00:00
Brecht Van Lommel
84032e97aa Fix #27834: AAO color bleeding failure case with raytraced shadows. 2012-10-23 19:10:21 +00:00
Howard Trickey
be5e2a0dd4 Fix knife sensitivity issue (#30637): better calculation of how
to clamp distances in ortho mode.
2012-10-23 18:17:51 +00:00
Sergey Sharybin
9756c85239 Fix #32954: Crash when activating 'International Fonts' in User Preferences 2012-10-23 17:58:46 +00:00
Sergey Sharybin
a32d134dc7 Solve unresolved call of min(int&, unsigned int&)
Alternative could be using unsigned ints for min/max chunks.
2012-10-23 16:46:13 +00:00
Campbell Barton
e038a1c613 reduce float comparisons for keying operation and despill. 2012-10-23 16:32:39 +00:00
Campbell Barton
fec81d9b56 use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
2012-10-23 16:21:55 +00:00
Brecht Van Lommel
c623ba5e4b Fix #32837: DDS images flipped in viewport compared to render. This happened
after adding compressed DDS texture loading.

DDS images can be flipped compared to the Blender standard, however we do not
unflip them because we also don't flip compressed textures. If we would flip
those we'd need to uncompress, flip and recompress them, and so losing the
speed benefit that you get from using them. Users are expected to save DDS
image in OpenGL compatible format.
2012-10-23 15:46:44 +00:00
Campbell Barton
267d6fdf2d skip hidden datablocks when switching screens. 2012-10-23 15:30:41 +00:00
Campbell Barton
90f7b9e9cc comment quick cache RNA and quiet compiler werning. 2012-10-23 15:07:09 +00:00
Ton Roosendaal
88a23b5327 Related to previous commit I did:
Removed checks for PTCACHE_QUICK_CACHE for exception handling. This to ensure normal
cache works as if old PTCACHE_QUICK_CACHE wasn't set.

Thanks Campbell for pointing at this!
2012-10-23 15:01:41 +00:00
Brecht Van Lommel
b131359834 Fix #32867: normal map baking issue with flat shaded faces since bmesh. Also
removed the old unused normal map tangent computation code.
2012-10-23 14:57:49 +00:00
Brecht Van Lommel
cfcab31c45 Fix #30801: cycles rendering issue with missing particle instances in a dupligroup. 2012-10-23 14:57:33 +00:00
Howard Trickey
d677e4b8b3 Use better epsilon for line intersection, fixes bug where
missed some hits on very small scale meshes, e.g., bug #31143.
2012-10-23 14:57:25 +00:00
Ton Roosendaal
d273ddfd4f Bugfix 30974
- Disabled "Quick Cache" option. It was causing ridiculous updates
  on the entire animation system for start-end frame on every user
  event causing changes here (like during transform). Worst was that you
  couldn't transform animated objects for that reason either.

  Most of the code is still there, waiting for a moment to revise it...

- Constraint "Follow Track" (marker) wasn't using inverse matrix code
  in transform, making it wacko to use (wrong pivot, crazyspace)
2012-10-23 14:07:32 +00:00
Campbell Barton
101660c809 code cleanup: give rng functions BLI prefix. 2012-10-23 13:50:44 +00:00
Campbell Barton
da9f9c27bc debug output: stop printing event handlers for mouse moves of mouse inbetween events. 2012-10-23 13:29:56 +00:00
Campbell Barton
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
Lukas Toenne
9599c2a02b Fix for direct_link of local ID data blocks (node trees in material/lamp/world/scene/texture). These data blocks also need to link the id properties group in their ID base, otherwise custom properties stored in such local node trees will lead to dangling pointers on file load. 2012-10-23 12:38:47 +00:00
Sergey Sharybin
7bf4a2d374 Fix #32941: Sequencer Preview shows texture which is apart of the window.
Issue was caused by buffer shadows were binding buffer after offscreen buffers
was bind which lead to some unpredictable results.

Made it so ED_view3d_draw_offscreen wouldn't bind any buffers and for proper
shadows ED_view3d_draw_offscreen_init should be manually be called before
drawing to an offscreen.

This should also make open gl render with AA enabled a bit faster.

Also fixed missing sequencer cache invalidation when open gl render type is
changing.

Material and Rendered modes are still a TODO for sequencer.
2012-10-23 12:25:08 +00:00
Campbell Barton
9c58865d20 code cleanup: remove $Id's that crept back in, also osl style edits 2012-10-23 11:47:23 +00:00
Sergey Sharybin
b518197db7 Correction to recent fix for shader nodes -- image could be not loaded yet
when tree is being executed. This could lead to nor initialized color space
for the image.

Solved by insuring image buffer is loaded before checking for whether color
conversion is needed.
2012-10-23 11:44:47 +00:00
Sergey Sharybin
38a76aff8b Sizeerror 8 fix for DecimateModifierData 2012-10-23 11:10:40 +00:00
Brecht Van Lommel
2b9e70c81e Fix #32943: sculpt mode draw crash with VBO and flat shaded, hidden faces. 2012-10-23 11:07:05 +00:00
Campbell Barton
0760308551 fix for crash using an uninitialized pointer when fcurves reference missing collections (removing animated shape keys could crash). 2012-10-23 11:03:52 +00:00
Sergey Sharybin
2f82e7f808 Display buffer should be marked as invalid when setting pixels from python 2012-10-23 09:59:04 +00:00
Jeroen Bakker
0c1b6ac3b3 Fix for [#28927] Z-Transp disables Material Pass Index 2012-10-23 07:20:37 +00:00
Campbell Barton
13940cc78e fix for issues in new decimator
- when an edge exists across a quad, dont attempt to triangulate it. (such a case isn't so common anyway)
- silly mistake when checking if anything needed to be done in the modifier, percent was being checked for 1.0 even when not used.
2012-10-23 06:37:58 +00:00
Campbell Barton
a82af0d220 add option to planar decimator to collapse all verts that define face boundries (verts that 2 faces share and have 2 edge users).
avoids ugly stepping between faces when applying on curves surfaces. (but less useful for architectural style models)
2012-10-23 06:13:56 +00:00
Campbell Barton
c297605665 fix for edge collapse decimator re-combining triangles that make degenerate quads. 2012-10-23 05:48:21 +00:00
Campbell Barton
1ea210a8dc add option for decimate-collapse to keep triangulated geometry (normally quads stay as quads when not collapsed). 2012-10-23 05:30:10 +00:00
Campbell Barton
bbe0deb8af add limited dissolve as a decimation type to the decimate modifier. 2012-10-23 05:20:02 +00:00
Campbell Barton
0636886715 add un-subdivude as an optional method for the decimate modifier, gives more even geometry & nicer results in some cases. 2012-10-23 04:26:39 +00:00
Campbell Barton
ed4b2d9738 code cleanup: quiet warning 2012-10-23 03:45:35 +00:00
Campbell Barton
1767b65846 style cleanup: also rename bmesh_decimate.c --> bmesh_decimate_collapse.c 2012-10-23 03:38:26 +00:00
Andrea Weikert
05f147f12e fix: drivers on materials and texture don't update when rendering animation
* Added additional tag_main_idcode in BKE_scene_update_for_newframe similar to what was done previously in BKE_scene_update_tagged to fix #32017 (unlimited recursion issue for material updates) by Joshua Leung
* So issue wasn't the dependencies, but the material was already tagged (from previous drawing), so wouldn't be updated each frame.
2012-10-22 19:45:16 +00:00
Brecht Van Lommel
7effd54d56 Fix #32937: cycles missing update when changing scene simplify settings. Note that
DAG_id_tag_update used to be slow to call, but now it just tags and flushes delayed,
so it can be called for every object.
2012-10-22 19:00:15 +00:00
Brecht Van Lommel
15b561ea41 Fix related to #32933: UV unwrap had 0.0 margin by default in .blend files,
change it now to 0.001 in existing files.
2012-10-22 18:48:50 +00:00
Brecht Van Lommel
948a9f16db Fix build when WITH_INTERNATIONAL is disabled. 2012-10-22 18:19:55 +00:00
Sergey Sharybin
8a2c30ac57 RNA C++ API improvements
Added support of such features, as:

- Ability to call RNA functions using C++ classes
  For example RenderEngine.tag_update

- Property setters (for scalars and arrays)
  Used Qt/jQuery-like getters/setters style, meaning Class.prop() is a getter,
  Class.prop(value) is a setter.

Still to come:

Collection functions are not currently registering inside a property
Meaning BlendData.meshes wouldn't be a subclass of BlendDataMeshes result
you'll need to explicitly create BlendDataMeshes for now instead of doing
BlendData.meshes.remove()
2012-10-22 17:34:16 +00:00
Sergey Sharybin
3285d47842 Fix #32930: texture colors in material nodes (blender internal) are brighter than normal
There was a missing byte buffer linearization for shader nodes.

Also fixed incorrect image input color space refresh when image is packed.
2012-10-22 17:34:06 +00:00
Sergey Sharybin
6e62491c5a Fix #32522: Object's diffuse color not showing in Sculpt Mode
Added option to display object's diffuse color multiplied by sculpting
mask. This option could be found in Options panel of toolshelf when in
sculpting mode.

Thanks to Nicholas and Brecht for reviewing the patch!
2012-10-22 17:33:53 +00:00
Campbell Barton
c6b4494727 decimator - small optimization on check for degenerate edges. 2012-10-22 17:33:11 +00:00
Campbell Barton
23baf8c9c3 code cleanup: check defgroup_name_index() return value != -1, rather then checking >= 0.
also remove unused bmesh decimator code.
2012-10-22 17:19:05 +00:00
Sergey Sharybin
612768760a Apparently msvc doesn't have isnan. 2012-10-22 16:12:27 +00:00
Campbell Barton
3526ae9805 add vertex group option to decimate modifier, handy if you want to pin some parts of the geometry. 2012-10-22 15:39:06 +00:00
Ton Roosendaal
63f042250f Bugfix #30378
Full Sample Antialiasing render gave fireflies with halos - especially on edges of polygons.
Reason was FSA exception case in code, using uninitialized color array.

Probably these fireflies were hunting us already for many many years.
2012-10-22 14:49:37 +00:00
Sergey Sharybin
fc5da14dad Fix for inline functions of new cineon library 2012-10-22 14:28:43 +00:00
Bastien Montagne
40da6bb531 Update of the tools for the new "dynamic" i18n menu, to generate the languages file into locale dir... 2012-10-22 14:17:30 +00:00
Bastien Montagne
b5e85cae70 New "dynamic" i18n menu.
Now both UI translation menu (in userprefs) and isocodes are defined in a text file (release/datafiles/locale/languages), parsed at lunchtime. This way:
* No more need to edit Blender code each time we want to add an new language or reorganize the existing menu;
* Translators can easily add a new language for testing, by just editing the text file, so no more need to ask to change Blender code and wait for a new build to see your new translation work in Blender!

Remaining todo:
* Commit i18n py tools
* Update wiki doc!
2012-10-22 14:04:40 +00:00
Sergey Sharybin
c727f8cbde Some more fixes for cineon 2012-10-22 14:01:16 +00:00
Sergey Sharybin
6a979acbf0 Compilation fix for windows platform 2012-10-22 13:52:56 +00:00
Sergey Sharybin
d8d7664dbd Compilation error fix for scons caused by recent dpx commit 2012-10-22 13:13:00 +00:00
Campbell Barton
436bbdfd24 style cleanup: use more const's in BLI_heap & dpx/cineon style cleanup 2012-10-22 13:00:02 +00:00
Sergey Sharybin
4e11fe6c5a Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!

From the patch comment:

It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
  filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.

It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
  type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
  For Log colorspace, the common default values are used for gamma,
  reference black and reference white (respectively 1.7, 95 and 685 for
  10 bits files).
- Saved DPX/Cineon files now match the viewer.

Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
  I haven't seen any file that was not top-bottom/left-right oriented.
2012-10-22 12:49:00 +00:00
Campbell Barton
ddc2dbc2a4 style cleanup 2012-10-22 08:15:51 +00:00
Campbell Barton
30fd258a0b fix for own error in BLI_heap_new_ex() when zero size is passed. 2012-10-22 07:57:21 +00:00
Antony Riakiotakis
ffd98941b5 Support for connected style proportional editing in UV editor. Now when connected proportional editing is on, only UVs on the same island will be proportionally moved. The implementation simply rejects UVs whose island does not belong to islands of selected vertices and decrements the total count of transform elements appropriately. Memory usage could be better but it would require some more preprocessing. 2012-10-22 07:29:38 +00:00
Bastien Montagne
492518f5e4 Fix [#32884] select by group not working when active object in more than one group.
Would have liked to rework this whole area, but it's kind of tricky, so better to first fix that bug!
2012-10-22 06:53:51 +00:00
Campbell Barton
a4b2783169 small optimization for BLI_heap(), give some speedup in decimeter.
- use unsigned ints only (where mixing signed/unsigned)
- turn heap_swap into an inline function, add SWAP_TVAL macro to swap values using a temp value as storage.
- added type checking SHIFT3/4 macros

also style cleanup for CTR_Map
2012-10-22 03:25:53 +00:00
Campbell Barton
226a5ee834 remove LOD_Decimator (c++ decimator), now replaced by bmesh decimator. also remove CTR c++ classes that are no longer used. 2012-10-22 02:39:26 +00:00
Joshua Leung
91ceb8f552 Tooltip/Description fixes for recent "tweaks"
1) "AnimData" is a technical term used for a specific entity in the system.
"anim data" is mangled fluff.
2) Old tooltip for DopeSheet.source is no longer valid. It's nearly always used
to represent the current scene now.
2012-10-22 02:20:41 +00:00
Campbell Barton
2342209c95 enable bmesh decimator by default. 2012-10-22 02:09:41 +00:00
Campbell Barton
39ed660bc6 fix own mistake - passing wrong argument to bmesh decimator when calculating boundary quadric. 2012-10-22 02:02:52 +00:00
Jeroen Bakker
4426e7bcb4 Fix for [#32931] Crop node resets values to 0
Patch done by Markus Kasten
Thanks for that!
2012-10-21 18:56:48 +00:00
Campbell Barton
248b2fc6d6 bmesh-decimator update
- update face normals when triangulating.
- avoid divide by zero when interpolating customdata on a zero length edge.
- replace zero float comparisons with fabsf() < FLT_EPSILON to avoid numeric error.

also renamed BLI_heap_empty() --> BLI_heap_is_empty() so its obviously readonly function.
2012-10-21 15:20:53 +00:00