8 years agobridge tool could make bow-tie quads when given 2 isolated edges.
Campbell Barton [Wed, 30 Jan 2013 03:12:19 +0000 (03:12 +0000)]
bridge tool could make bow-tie quads when given 2 isolated edges.

8 years agofix [#33987] X-ray mode on bones nullifies weight paint mode
Campbell Barton [Wed, 30 Jan 2013 02:27:13 +0000 (02:27 +0000)]
fix [#33987] X-ray mode on bones nullifies weight paint mode

This effected vertex paint mode too.

8 years agoenable continuous grab for sliders, initially this was disabled because we didnt...
Campbell Barton [Tue, 29 Jan 2013 23:33:58 +0000 (23:33 +0000)]
enable continuous grab for sliders, initially this was disabled because we didnt support un-grabbing at the new slider location.

8 years agoupdate themes.
Campbell Barton [Tue, 29 Jan 2013 21:58:07 +0000 (21:58 +0000)]
update themes.

8 years agoFix #34016: add backwards compatibility for deprecated region.callback_add
Brecht Van Lommel [Tue, 29 Jan 2013 21:34:58 +0000 (21:34 +0000)]
Fix #34016: add backwards compatibility for deprecated region.callback_add
python function, this keep addons working. It's better to use the new function
but might as well avoid breaking compatibility here.

8 years agocorrection to r54188, also don't attempt to triangulate triangles.
Campbell Barton [Tue, 29 Jan 2013 20:49:40 +0000 (20:49 +0000)]
correction to r54188, also don't attempt to triangulate triangles.

8 years agoFix [#34008]: Scaling Smoke Domain In Z-Axis Crashes Blender
Miika Hamalainen [Tue, 29 Jan 2013 19:27:05 +0000 (19:27 +0000)]
Fix [#34008]: Scaling Smoke Domain In Z-Axis Crashes Blender

Also as minor change skip base_res update on domain step if adaptive domain isn't enabled.

8 years agoFix #34031: in the keymap editor, Timer and Text Input types did not show field
Brecht Van Lommel [Tue, 29 Jan 2013 17:30:30 +0000 (17:30 +0000)]
Fix #34031: in the keymap editor, Timer and Text Input types did not show field
to edit the operator name.

8 years agoCycles: collapse preview render panel by default. It's a matter of personal
Brecht Van Lommel [Tue, 29 Jan 2013 17:30:26 +0000 (17:30 +0000)]
Cycles: collapse preview render panel by default. It's a matter of personal
preference, but it slows down 3D view rendering to have two renders going so
I rather disable it by default.

8 years agoFix #34003: hide confusing unlink button for pinned datablock in properties editor.
Brecht Van Lommel [Tue, 29 Jan 2013 17:15:51 +0000 (17:15 +0000)]
Fix #34003: hide confusing unlink button for pinned datablock in properties editor.

8 years agoskip calculating the normal for each face when triangulating, all callers make sure...
Campbell Barton [Tue, 29 Jan 2013 15:05:23 +0000 (15:05 +0000)]
skip calculating the normal for each face when triangulating, all callers make sure its valid. also remove some commented code (more then one generation of bmesh old).

8 years agoPreview Render:
Thomas Dinges [Tue, 29 Jan 2013 14:52:26 +0000 (14:52 +0000)]
Preview Render:
* Changing Material Preview type (Sphere, Monkey...) should not trigger ND_SHADING_DRAW. Caused Cycles 3D View render to re-start.

It now only triggers an ND_SHADER update, which will be handled inside the Properties Editor Listener and executes a Preview Re-Render.

8 years agoCycles Hair: Addition of render settings and static BVH strand width scaling
Stuart Broadfoot [Tue, 29 Jan 2013 12:32:43 +0000 (12:32 +0000)]
Cycles Hair: Addition of render settings and static BVH strand width scaling

Addition of a RNA function to toggle between the hair settings and rebuild the cache. This enables the usage of the render step, child number and full display percentage with f12 rendering.

A scaling to the strand radius has also been added for the static bvh. This only matches up with dynamic for uniform scaling.

A very small fix is included for multiple uvs/vertex colours when using child particles.

8 years agoAlpha display changes:
Sergey Sharybin [Tue, 29 Jan 2013 12:03:38 +0000 (12:03 +0000)]
Alpha display changes:

Previous alpha-overing on black for RGB display wasn't so much useful
for artists, changed in a way:

- Made RGBA display default for node editor backdrop and image editor,
  so it'll be clear that image does have alpha channel
- RGB display will ignore alpha channel completely

Reshuffled buttons for RGBA/RGB so now the order is following:
    RGBA | RGB | Alpha | Z

Still to come: startup.blend shall be altered to make RGBA default.

8 years agosculpt, replace bmo call to triangulate with BM_mesh_triangulate()
Campbell Barton [Tue, 29 Jan 2013 10:43:15 +0000 (10:43 +0000)]
sculpt, replace bmo call to triangulate with BM_mesh_triangulate()

8 years agoTriangulate modifier no longer uses bmesh operator api call, instead add a BM_mesh_tr...
Campbell Barton [Tue, 29 Jan 2013 10:31:05 +0000 (10:31 +0000)]
Triangulate modifier no longer uses bmesh operator api call, instead add a BM_mesh_triangulate() function. Gives ~2x speedup in my tests on an optimized build.

8 years agoSome optimization (their is much more possible here, but it will have to wait for...
Bastien Montagne [Tue, 29 Jan 2013 08:34:26 +0000 (08:34 +0000)]
Some optimization (their is much more possible here, but it will have to wait for complete refactor I’m working on currently).

8 years agoFix #34009: multi user curves + deform modifier behavior
Sergey Sharybin [Tue, 29 Jan 2013 08:21:21 +0000 (08:21 +0000)]
Fix #34009: multi user curves + deform modifier behavior

Issue was caused by storing BB calculated from final displist in
Curve datablock and not having Object's BB at all. This is not
clear at how could have been worked for so long.

Changed it so Curve's BB is calculated from non-deformed displist,
which matches BKE_object_min_max and BKE_curve_texspace_calc and
made it so Object's BB would be calculated from final displist.

8 years agofix [#34024] delete - Edge loop crash
Campbell Barton [Tue, 29 Jan 2013 08:19:23 +0000 (08:19 +0000)]
fix [#34024] delete - Edge loop crash

8 years agoMore UI messages tweaks and fixes. Please do not use points inside tooltips, unless...
Bastien Montagne [Tue, 29 Jan 2013 08:01:50 +0000 (08:01 +0000)]
More UI messages tweaks and fixes. Please do not use points inside tooltips, unless they are absolutely mandatory (they are ugly, as we do not have final points!).

8 years agotweak to edge slide - use a quads opposite vertex when both edges share a quad, gives...
Campbell Barton [Tue, 29 Jan 2013 05:30:39 +0000 (05:30 +0000)]
tweak to edge slide - use a quads opposite vertex when both edges share a quad, gives nicer results.

8 years agofix for fix, ugh!, vertex slide with concave/convex ngons & normal flipping should...
Campbell Barton [Tue, 29 Jan 2013 05:18:30 +0000 (05:18 +0000)]
fix for fix, ugh!, vertex slide with concave/convex ngons & normal flipping should now work properly in all cases.
... somehow I managed to make test-cases that worked in previous commits but failed in other cases.

8 years agoCorrect fix for r54164, the testcase I was using worked but different edge slide...
Campbell Barton [Tue, 29 Jan 2013 03:25:47 +0000 (03:25 +0000)]
Correct fix for r54164, the testcase I was using worked but different edge slide examples didn't.

Edge slide needed to check for concave ngons too.

add BM_loop_is_convex() and expose to python too.

8 years agoSkeleton Sketching bugfixes/tweaks
Joshua Leung [Tue, 29 Jan 2013 03:04:24 +0000 (03:04 +0000)]
Skeleton Sketching bugfixes/tweaks

* Disabling Skeleton Sketching now refreshes the view properly, so that strokes
don't linger on even after being disabled
* Added the delete operator to the panel

8 years agofix for r54166, the average edge length needs to be maintained.
Campbell Barton [Tue, 29 Jan 2013 02:17:19 +0000 (02:17 +0000)]
fix for r54166, the average edge length needs to be maintained.

8 years agoBugfix [#34012] Skeleton Sketching settings unclear
Joshua Leung [Tue, 29 Jan 2013 02:00:33 +0000 (02:00 +0000)]
Bugfix [#34012] Skeleton Sketching settings unclear

Although the bug report here wasn't exactly clear about what exactly was wrong,
it soon became apparent that the UI stuff here was in need of some love.

* Ported over missing tooltips from 2.49 (i.e. most of them)
* Fixed a few incorrect tooltips (mostly the subdivision length settings)
* Made the autonaming and number/side settings slightly clearer - number/side
are used to replace placeholders in the names of template bones (&N and &S
respectively) when autonaming is disabled. When it is enabled, these values are
determined automatically.

8 years agoWindow menu: Make Screencast (should be Save?, to match screenshot?) option.
Pablo Vazquez [Tue, 29 Jan 2013 01:43:03 +0000 (01:43 +0000)]
Window menu: Make Screencast (should be Save?, to match screenshot?) option.

Thought of setting the operator context before so it wouldnt invoke the confirmation dialog, but better leave it by default to confirm since it might be clicked by mistake and start dumping video/image-sequence and can get annoying.

8 years agominor improvement to edge slide, normalize the edge vectors that accumulate the direc...
Campbell Barton [Tue, 29 Jan 2013 01:37:04 +0000 (01:37 +0000)]
minor improvement to edge slide, normalize the edge vectors that accumulate the direction, otherwise longer edges would skew the direction.

8 years agocode cleanup: add some comments about to get_next_loop() for edge slide, also name...
Campbell Barton [Tue, 29 Jan 2013 01:31:42 +0000 (01:31 +0000)]
code cleanup: add some comments about to get_next_loop() for edge slide, also name vars better (was using meaningless names).

8 years agofix for edge slide bug, when there were no edges to slide along the direction calcula...
Campbell Barton [Tue, 29 Jan 2013 01:23:33 +0000 (01:23 +0000)]
fix for edge slide bug, when there were no edges to slide along the direction calculated from the face would be wrong half the time (depending on the edge loop direction which is arbitrary).

8 years agoWhitespace
Joshua Leung [Tue, 29 Jan 2013 01:23:29 +0000 (01:23 +0000)]

8 years agocode cleanup: just variable naming
Campbell Barton [Tue, 29 Jan 2013 01:02:45 +0000 (01:02 +0000)]
code cleanup: just variable naming

8 years agocode cleanup: var rename and add assert, when writing to out of bounds array.
Campbell Barton [Tue, 29 Jan 2013 00:20:04 +0000 (00:20 +0000)]
code cleanup: var rename and add assert, when writing to out of bounds array.
minor edit to recent tip change.

8 years agoBetter tooltips for the Full Screen option on Save Screenshot/Screencast operators.
Pablo Vazquez [Mon, 28 Jan 2013 23:58:09 +0000 (23:58 +0000)]
Better tooltips for the Full Screen option on Save Screenshot/Screencast operators.

8 years agoBugfix [#34019] Limit Constraints still affected transforms when turned off
Joshua Leung [Mon, 28 Jan 2013 23:57:02 +0000 (23:57 +0000)]
Bugfix [#34019] Limit Constraints still affected transforms when turned off

Limit Constraints (i.e. Limit Location/Rotation/Scale/Distance) with 'For
Transform' option enabled would still be applied when transforming objects even
when they were turned off using the eye icon in the constraint panel headers.
The "off" flag was never added to the checks for muted or disabled constraints
to be skipped here.

8 years agoInfo Editor: Adding Save Screenshot option to the Window menu, was only available...
Pablo Vazquez [Mon, 28 Jan 2013 23:06:27 +0000 (23:06 +0000)]
Info Editor: Adding Save Screenshot option to the Window menu, was only available through search or shortcut (CTRL+F3)

8 years agoCycles Preview: Rotated Suzanne a bit for better angle. Raised the intensity of the...
Pablo Vazquez [Mon, 28 Jan 2013 22:08:30 +0000 (22:08 +0000)]
Cycles Preview: Rotated Suzanne a bit for better angle. Raised the intensity of the mesh light, and moved the mesh/lamp to also be in the layer of World Sphere preview (was black previously, since it had no lamps)

8 years agoCycles Preview Blend:
Thomas Dinges [Mon, 28 Jan 2013 19:15:47 +0000 (19:15 +0000)]
Cycles Preview Blend:
* Added UV Mapping for objects, so Image textures will work.

8 years agoFix [#34023] r54146 breaks name-display of default "UI_UL_list"
Bastien Montagne [Mon, 28 Jan 2013 18:46:04 +0000 (18:46 +0000)]
Fix [#34023] r54146 breaks name-display of default "UI_UL_list"

draw_item *is* optional (it then uses default C function), even though there is not much sense to register a class without it, except for our default UI_UL_list!

8 years agoScons:
Thomas Dinges [Mon, 28 Jan 2013 17:49:15 +0000 (17:49 +0000)]
* Fix for new cycles_preview.blend

8 years agoCycles: preview rendering support for world/material/lamp.
Brecht Van Lommel [Mon, 28 Jan 2013 17:37:51 +0000 (17:37 +0000)]
Cycles: preview rendering support for world/material/lamp.

Patch by Sergey, .blend by Thomas and some further tweaks by me.

Still to solve later: allow external engines to specify own preview .blend, for
now the code here is doing too much magic hacking on the preview scene still.

8 years agoFix for RNA function flag conflict: FUNC_USE_REPORTS was using same bits as FUNC_REGI...
Lukas Toenne [Mon, 28 Jan 2013 13:33:40 +0000 (13:33 +0000)]
Fix for RNA function flag conflict: FUNC_USE_REPORTS was using same bits as FUNC_REGISTER. Previously errors resulting from this could go unnoticed because of broken FUNC_REGISTER test (all functions considered optional). Watch this in future ...

8 years agoFix #34004: crash when canceling ongoing render with scene strip
Sergey Sharybin [Mon, 28 Jan 2013 13:29:10 +0000 (13:29 +0000)]
Fix #34004: crash when canceling ongoing render with scene strip

Issue was caused by recursive call of RE_BlenderFrame. Solved by
reshuffling image pool init/free in do_render_all_options.

Should be harmless, but doublecheck on this is welcome.

8 years agoFix for wrong icons buffer initialization happens for cards
Sergey Sharybin [Mon, 28 Jan 2013 12:57:56 +0000 (12:57 +0000)]
Fix for wrong icons buffer initialization happens for cards
without NPOT support. Was wrong stride used for memcpy leading
to wrong memory writes in def_internal_icon.

It's a regression since matcap commit.

Should fix the following reports:
- #33993: Crash on Blender startup (Vista x32)
- #33996: Latest build crashes on win xp

8 years agofix [#34018] Delete Edge Loop undo works not als expected.
Campbell Barton [Mon, 28 Jan 2013 12:42:38 +0000 (12:42 +0000)]
fix [#34018] Delete Edge Loop undo works not als expected.

8 years agoFix for the is_registered_optional property of RNA functions, now only returns true...
Lukas Toenne [Mon, 28 Jan 2013 12:34:18 +0000 (12:34 +0000)]
Fix for the is_registered_optional property of RNA functions, now only returns true for actually optional functions.

8 years agofix for rigid body assuming active object would be selected, also don't check length...
Campbell Barton [Mon, 28 Jan 2013 12:24:25 +0000 (12:24 +0000)]
fix for rigid body assuming active object would be selected, also don't check length of selected objects in poll function (getting and throwing away object selection array on every redraw is no good).

8 years agoFix for errors caused by fixing RNA function register flags. Default UIList class...
Lukas Toenne [Mon, 28 Jan 2013 12:18:00 +0000 (12:18 +0000)]
Fix for errors caused by fixing RNA function register flags. Default UIList class now has a dummy draw_item callback. Panel draw_header is now optional (most panel classes don't define it).

8 years agoFix for RNA FUNC_REGISTER/FUNC_REGISTER_OPTIONAL flags: The test in bpy validation...
Lukas Toenne [Mon, 28 Jan 2013 12:17:49 +0000 (12:17 +0000)]
Fix for RNA FUNC_REGISTER/FUNC_REGISTER_OPTIONAL flags: The test in bpy validation of classes actually always passed for mandatory functions. This only worked since they all use fallback default implementations internally.

8 years agouse more conventional names in rigid body script.
Campbell Barton [Mon, 28 Jan 2013 12:15:50 +0000 (12:15 +0000)]
use more conventional names in rigid body script.

8 years agorigidbody: Don't show dialog for "Connect" operator
Sergej Reich [Mon, 28 Jan 2013 11:56:01 +0000 (11:56 +0000)]
rigidbody: Don't show dialog for "Connect" operator

Use redo last panel to change settings now.
This is more in line with how the rest of blender operates.

Also fix tootip

8 years agoadd mathutils function to intersect 2 circles. Converted to C from a python script...
Campbell Barton [Mon, 28 Jan 2013 11:52:17 +0000 (11:52 +0000)]
add mathutils function to intersect 2 circles. Converted to C from a python script by Alex Fraser.

8 years agoFix for a nasty glicth found by Irie Shinsuke in Freestyle branch.
Bastien Montagne [Mon, 28 Jan 2013 08:58:20 +0000 (08:58 +0000)]
Fix for a nasty glicth found by Irie Shinsuke in Freestyle branch.

Headerless panels are not supposed to be closed ever. But if user saves a blend with a stardard panel closed, then dev decides to make this panel headerless, when user open again its blend, the panel is closed and has no more header, so it becomes invisible!

This commit simply checks, at draw time, that a headerless panel is never closed (and repoen it if necessary)!

8 years agoadd collision masks to copy-game-physics settings. (another GGJ missing feature :) )
Campbell Barton [Mon, 28 Jan 2013 06:56:47 +0000 (06:56 +0000)]
add collision masks to copy-game-physics settings. (another GGJ missing feature :) )

8 years ago[BGE Controllers] reverting my own commits #54103 and #54102, no longer necessary...
Dalai Felinto [Mon, 28 Jan 2013 06:44:06 +0000 (06:44 +0000)]
[BGE Controllers] reverting my own commits #54103 and #54102, no longer necessary after rev/fix #54136

8 years agoBGE Py API docs: correct references to bge.keys
Campbell Barton [Mon, 28 Jan 2013 06:39:23 +0000 (06:39 +0000)]
BGE Py API docs: correct references to bge.keys

8 years agofix for usability issue - navmesh would create the new object on the first layer...
Campbell Barton [Mon, 28 Jan 2013 06:34:13 +0000 (06:34 +0000)]
fix for usability issue - navmesh would create the new object on the first layer, rather then the layer of the source object(s).

8 years agofix annoyance noticed at the global-game-jam, adding controllers would remember previ...
Campbell Barton [Mon, 28 Jan 2013 06:06:55 +0000 (06:06 +0000)]
fix annoyance noticed at the global-game-jam, adding controllers would remember previous name. Would add 'And' controllers and name them 'Python1' for eg.

8 years agominor optimization - don't do double lookups on vertex mask layer for vert_mask_get...
Campbell Barton [Mon, 28 Jan 2013 04:10:47 +0000 (04:10 +0000)]
minor optimization - don't do double lookups on vertex mask layer for vert_mask_get(), vert_mask_set().

add an assert because if the mesh is in an invalid state the mask layer can exist but the mask pointer still be NULL (noticed this while looking into a different bug).

8 years agoMade the tooltip for rigid body constraint "Connect" operator clearer
Joshua Leung [Mon, 28 Jan 2013 02:48:19 +0000 (02:48 +0000)]
Made the tooltip for rigid body constraint "Connect" operator clearer

Previously it wasn't clear what it was supposed to be doing, or what was
required for it to work.
TODO: figure out why the operator redo settings panel won't work. The workflow
here is still a bit clunky.

8 years agostyle cleanup: also remove unneeded NULL check.
Campbell Barton [Mon, 28 Jan 2013 01:59:59 +0000 (01:59 +0000)]
style cleanup: also remove unneeded NULL check.

8 years agovisualkey_can_use() now uses proper booleans
Joshua Leung [Mon, 28 Jan 2013 01:41:15 +0000 (01:41 +0000)]
visualkey_can_use() now uses proper booleans

8 years agoBGE Profile : visual feedback bars and improvements
Dalai Felinto [Mon, 28 Jan 2013 01:26:36 +0000 (01:26 +0000)]
BGE Profile : visual feedback bars and improvements

You can see a screenshot of the funcionality here:

This patch creates a bar-like graph to quickly allow the game dev to see the performance changes.
Also it changes the font to monospace (too allow ' ' padding) and reduced shadow border to
match the blenderplayer one.

Patch finalized and commited at Global Game Jam Vancouver (last one, time to sleep forever now)

8 years agoVisual Keyframing now works for rigid body objects too
Joshua Leung [Mon, 28 Jan 2013 01:02:14 +0000 (01:02 +0000)]
Visual Keyframing now works for rigid body objects too

8 years agoActivate partial redraw of non-power of two textures. This looks like
Antony Riakiotakis [Sun, 27 Jan 2013 20:26:18 +0000 (20:26 +0000)]
Activate partial redraw of non-power of two textures. This looks like
it's working as expected out of the box. I hope nothing breaks.

8 years agoBGE UI: removing "use_occlusion_culling" from the ui
Dalai Felinto [Sun, 27 Jan 2013 19:57:47 +0000 (19:57 +0000)]
BGE UI: removing "use_occlusion_culling" from the ui
(and marking rna as deprecated)

I talked with Benoit Bolsee and Mitchell Stokes and they both agreed that
the feature should be removed.

In case someone was actually using it the rna is still available. But next
release we remove both the rna, the DNA and the flag in the code.

I did a simple benchmark with tons of cubes, and the DBVT culling (use_occlusion_culling=True)
always perform better than when it's off. Even when no occluder objects are in the scene.

8 years agoBunch of fixes for UI messages.
Bastien Montagne [Sun, 27 Jan 2013 18:14:24 +0000 (18:14 +0000)]
Bunch of fixes for UI messages.

Also generate rigid body constraint types in py bullet code from RNA enum values (simpler than having to sync the code when something is changed here!).

Side note: RNA API about icons still needs to expose icons for enum values, and conversion funcs between icon_name and icon_value!

8 years agoPack UI:
Ton Roosendaal [Sun, 27 Jan 2013 17:20:08 +0000 (17:20 +0000)]
Pack UI:

Oops! So there was an Unpack button, hidden in the Nkey properties of Image window.
This was drawn next to greyed-out buttons, didn't notice it well.

I also now found the unpack() menu in editors/util, and there's an Image unpack op.
Also the RNA api has an unpack!

Will remove the generic unpack op, and add a sound and vfont unpack instead.

8 years agoFix drivers and shape keys not handling subframes / frame mapping properly.
Brecht Van Lommel [Sun, 27 Jan 2013 16:45:00 +0000 (16:45 +0000)]
Fix drivers and shape keys not handling subframes / frame mapping properly.

Change Scene.frame_set so that it ensures subframe in range [0,1[ as Blender
expects, otherwise some things like physics point cache lookups don't get
evaluated properly.

8 years agoWindows compile fix:
Thomas Dinges [Sun, 27 Jan 2013 15:12:52 +0000 (15:12 +0000)]
Windows compile fix:
* r54117 broke Windows, __func__ not declared.

8 years agoVery old todo: Packed file UI
Ton Roosendaal [Sun, 27 Jan 2013 14:28:45 +0000 (14:28 +0000)]
Very old todo: Packed file UI

- The "ID" buttons (for browse images, for example) now show a Pack icon, for packed
  Images. Using this button allows unpack.

- Pack and unpack operations now give a Info report on what happened.

- Not restored yet: option to set "AutoPack".

8 years agoremove redundant temp pointer assignment in AVI_write_frame.
Campbell Barton [Sun, 27 Jan 2013 12:03:20 +0000 (12:03 +0000)]
remove redundant temp pointer assignment in AVI_write_frame.

8 years agomake MEM_reallocN and MEM_recallocN behave as libc's realloc() - alloc when receiving...
Campbell Barton [Sun, 27 Jan 2013 11:20:50 +0000 (11:20 +0000)]
make MEM_reallocN and MEM_recallocN behave as libc's realloc() - alloc when receiving a NULL value.

8 years agoOperators name "cleanup"
Dalai Felinto [Sun, 27 Jan 2013 07:23:58 +0000 (07:23 +0000)]
Operators name "cleanup"
The operator names all show up in the Search button. As such is nicer if they
can all have the main words capitalized.

e.g. "Snap strips" should be "Snap Strips"
     "Copy to clipboard" should be "Copy to Clipboard"

This was done with a mix of bash tools, regex, and manual work because I'm too rushed into regex :)

+ fix bge stereo eye separation tooltip

8 years agoBGE bugfix: Material initial object color working in the game
Dalai Felinto [Sat, 26 Jan 2013 23:52:55 +0000 (23:52 +0000)]
BGE bugfix: Material initial object color working in the game
The object color option in the materials always worked, however the initial color of the object
was never passed to the game.

We are now passing it only, only when the object's mesh has a material that has ((shade_flags & OB_COLOR)).
There reason to not always set the object color is probably due to performance (the m_bUseObjectColor
flag in KX_GameObject). This patch still respect that.

Bug report from Mike Pan, as part of our book nitty-gritties review work.
Bugfix during Vancouver Global Game Jam :)

8 years agoFix [#34005] blender will close immediately in debug mode on deleting objects
Sergej Reich [Sat, 26 Jan 2013 17:38:45 +0000 (17:38 +0000)]
Fix [#34005] blender will close immediately in debug mode on deleting objects

Was silly mistake from rigidbody merge, base was used after it's been

Now don't free base in BKE_scene_base_remove() and rename it to

8 years agoCheck for deletion before moving vert in dyntopo collapse edge
Nicholas Bishop [Sat, 26 Jan 2013 17:19:21 +0000 (17:19 +0000)]
Check for deletion before moving vert in dyntopo collapse edge

Fixes [#33964] Dyntopo crash with edge collapse + undo

8 years agoRevert r54058, caused crash when adding paritcles in particle edit mode
Sergej Reich [Sat, 26 Jan 2013 12:30:44 +0000 (12:30 +0000)]
Revert r54058, caused crash when adding paritcles in particle edit mode

MEM_recallocN() doesn't allocate memory when used on a null pointer.

Just revert commit since there is no real benefit to using
MEM_recallocN() in this case.

8 years agoPorting over hotkeys for adding rigidbody objects (from original branch)
Joshua Leung [Sat, 26 Jan 2013 05:34:06 +0000 (05:34 +0000)]
Porting over hotkeys for adding rigidbody objects (from original branch)

* Ctrl-R          = Add Active
* Ctrl-Shift-R = Add Passive
* Ctrl-Alt-R    = Remove

8 years agoMotion Path calculations for objects now takes rigidbodies sim effects into
Joshua Leung [Sat, 26 Jan 2013 05:28:58 +0000 (05:28 +0000)]
Motion Path calculations for objects now takes rigidbodies sim effects into

8 years agoreal fix for Logic Bricks UI smart controller (#33746)
Dalai Felinto [Sat, 26 Jan 2013 03:30:21 +0000 (03:30 +0000)]
real fix for Logic Bricks UI smart controller (#33746)
previous commit (54102) actually reintroduces an old bug where Blender sigfaults when
the sensor and controllers are not from the active object.

The real fix for report #33746 is to clear the "object" property after the operator ran.
I'm not sure why when I call the operator from command line the property is cleared, but not
when I called it from C. Either way all should be working now.

8 years agobugfix for 33746 Unable to add Controller to objects correctly
Dalai Felinto [Sat, 26 Jan 2013 02:46:07 +0000 (02:46 +0000)]
bugfix for 33746 Unable to add Controller to objects correctly
(live from the global game jam Vancouver ;)

8 years agoFix [#33997] Units Scale in Metric mode displays wrong face area.
Bastien Montagne [Fri, 25 Jan 2013 21:21:38 +0000 (21:21 +0000)]
Fix [#33997] Units Scale in Metric mode displays wrong face area.

Also now display nice "area" units (maybe using "length" units was a perf matter, but anyway, you can't have more than a few tens of values displayed at a time, after that they become unreadable). Easy to undo anyway if we really want to keep ugly "10m" as area display!

8 years agoSmall tweak: Allow DPI for UI to go up 144, exactly double size of 72.
Ton Roosendaal [Fri, 25 Jan 2013 15:44:22 +0000 (15:44 +0000)]
Small tweak: Allow DPI for UI to go up 144, exactly double size of 72.
That makes all default icons draw in full unfiltered 32x32 pixel glory!

8 years agoFix warnings about undefined _POSIX_C_SOURCE with gcc 4.2 on Mac.
Brecht Van Lommel [Fri, 25 Jan 2013 13:51:49 +0000 (13:51 +0000)]
Fix warnings about undefined _POSIX_C_SOURCE with gcc 4.2 on Mac.

8 years agoBugfix #33989
Ton Roosendaal [Fri, 25 Jan 2013 10:17:06 +0000 (10:17 +0000)]
Bugfix #33989

Transparent region drawing and blend broke by commit 53919 5 days ago.
This commit reverts the change.

The claim in previous commit "edited code for readability" is quite
disputable :) The error is hard to notice even.

I also like to emphasize that people should check with owners for code
before committing changes! Cleaning code is first a job for maintainers.

8 years agoIncreasing dilate erode number of steps.
Monique Dewanchand [Fri, 25 Jan 2013 09:57:17 +0000 (09:57 +0000)]
Increasing dilate erode number of steps.

8 years agocommitted patch [#33972] dilate/erode optimization
Monique Dewanchand [Fri, 25 Jan 2013 09:47:28 +0000 (09:47 +0000)]
committed patch [#33972] dilate/erode optimization

this patch optimizes the dilate/erode step method (hopefully without any functional change),
making its speed not depend on the distance anymore.

Couldn't detect funtional changes so committing. Haven't tested for speed gain.

 * credits to erwin94 David M

8 years agorigidbody: Improve add/remove operators
Sergej Reich [Fri, 25 Jan 2013 06:26:38 +0000 (06:26 +0000)]
rigidbody: Improve add/remove operators

Now all add/remove operators for rigid body objects and constraints
automatically add objects to the appropriate groups and create groups if they
don't exist yet.

This makes handling rigid bodies easier but doesn't take away functionality.
If users want to handle groups manually they just need to create them before
adding any objects.

The previous behaviour was confusing and was even considered to be a bug since
clicking on rigid body in the physics tab seemed to do nothing.

8 years agoscons: Add missing WITH_BULLET define
Sergej Reich [Fri, 25 Jan 2013 05:02:36 +0000 (05:02 +0000)]
scons: Add missing WITH_BULLET define

Fixes [#33980] Ridid Body crashes when changing Collision shape with playback
as well as several other rigid body bugs wtih scons.

8 years agoFix cycles crash that happened with mesh emission and diffuse/glossy ray
Brecht Van Lommel [Fri, 25 Jan 2013 02:00:57 +0000 (02:00 +0000)]
Fix cycles crash that happened with mesh emission and diffuse/glossy ray
visibility disabled on some objects.

8 years agoheader cleanup, include BLI before BKE, also use bool for ntreeShaderExecTree
Campbell Barton [Thu, 24 Jan 2013 21:57:13 +0000 (21:57 +0000)]
header cleanup, include BLI before BKE, also use bool for ntreeShaderExecTree

8 years agoDo not redefine math functions for floats if compiler complies with C99 or POSIX...
Sv. Lockal [Thu, 24 Jan 2013 20:54:12 +0000 (20:54 +0000)]
Do not redefine math functions for floats if compiler complies with C99 or POSIX.1-2001

This is useful for gcc which does not define sqrtf/powf/... functions with preprocessor and therefore always used sqrt/pow/...
Float functions are generally 20-50% faster than their equivalents for double type.

8 years agoDisabled commit that was rendering Blender Internal for Cycles nodes.
Ton Roosendaal [Thu, 24 Jan 2013 19:31:44 +0000 (19:31 +0000)]
Disabled commit that was rendering Blender Internal for Cycles nodes.

Apparently Material nodes allow a mix of Cycles and BI Materials. Nifty!
I should read more docs, like this cool tutorial:

8 years agoLogic mistake in previous commit, broke node materials for Internal render.
Ton Roosendaal [Thu, 24 Jan 2013 18:56:04 +0000 (18:56 +0000)]
Logic mistake in previous commit, broke node materials for Internal render.

8 years agoPut back minimum window sizes on 320x240.
Ton Roosendaal [Thu, 24 Jan 2013 17:57:38 +0000 (17:57 +0000)]
Put back minimum window sizes on 320x240.
This didnt work well with making blender areas into windows.

Real fix: check such minimums based on what's in the window itself... or just
make scaling work flawless.

8 years agoFix #33953: blender crash after few steps with .exr image in compositor
Sergey Sharybin [Thu, 24 Jan 2013 17:21:22 +0000 (17:21 +0000)]
Fix #33953: blender crash after few steps with .exr image in compositor

Issue was caused by FILE multilayer ImBuf sharing buffers with render
result, and SEQUENCE multilayer ImBufs duplicating buffers. Which is
nice by it's own. But, changing image source wouldn't remove any loaded
image buffers, meaning if you've got loaded FILE multilayers they'll
likely became invalid.

That behavior of handling multilayers on changing source was done as
a fix for #24976, which is now actually not needed (removing check
for multilayer doesn't change behavior at all).

Just to be sure added check to RNA, so signal wouldn't be fired if
source wasn't actually changed form a menu.

8 years agoFix/workaround for cycles crash when enabling it for preview renders.
Brecht Van Lommel [Thu, 24 Jan 2013 16:20:43 +0000 (16:20 +0000)]
Fix/workaround for cycles crash when enabling it for preview renders.

Problem is that preview render database is being used, but the new datablock
function still uses G.main, and the mesh was being added to one database but
(attempted to be) removed from another. The proper fix would get rid of the
globals here, will look into that later.

8 years agoUsability
Ton Roosendaal [Thu, 24 Jan 2013 16:11:07 +0000 (16:11 +0000)]

- Cycles materials now render in Blender Internal too, skipping the nodes.
  Not very useful, but at least things then show up on renders and in

- Node editor: if wrong shader nodes are in a tree, they draw with thene
  color RED ALERT headers now. (Switching render engine will show it).

8 years agouse bool for new code.
Campbell Barton [Thu, 24 Jan 2013 14:48:08 +0000 (14:48 +0000)]
use bool for new code.