Commit Graph

47214 Commits

Author SHA1 Message Date
Joshua Leung
d0609d09e4 Outliner: Do not show RMB menu for "ID Base" entries 2015-02-16 01:21:45 +13:00
Joshua Leung
16689a1db0 Outliner: Use restriction columns in "Orphaned Datablocks" view to manage usercounts
When in "Orphaned Datablocks" mode, the restriction columns are used to display
usercount indicators and toggles to manage whether datablocks get saved or not.

* The first column shows an icon to indicate whether that datablock is going to get
  saved. A tick indicates the datablock will be saved, while a cross indicates the
  opposite. Clicking on this changes whether the datablock will get saved.

* The second column shows the usercount.

* The third column shows whether the datablock has a fake user.


Notes:
* The second and third columns are pretty much redundant (functionally speaking).
  While it is possible to also toggle fake users by clicking in the third column,
  its role here is more as information for power users (and hopefully to allow others
  to connect the relationship between the saved/not saved status and fake users)

* I'm not sure whether the use of the X here for the "not saved" state stands out enough
  to draw user's attention to items which are "in the danger zone".
2015-02-16 01:21:44 +13:00
Joshua Leung
030b0aab43 Outliner: Added new mode for displaying "orphaned" datablocks
Orphaned datablocks are those which have either:
* 0 users
* A "fake" user only

In the case of the former, they will be quietly discarded from the file on the next
save + reload. Hence, it is helpful to have a view where you can confirm which ones
fall into this category and might be worth saving.

We also include datablocks with a fake user only so that datablocks given a user
above can have that easily turned off again (in case the user makes a mistake).
Another benefit of showing these is that it become easier to remove fake users from
datablocks you no longer want retained without having to hunt for them.
2015-02-16 01:21:43 +13:00
Julian Eisel
0ff56ca2aa Revert/Remove "Auto View" Feature
Turned out that I misinterpreted the feature request, plus there are some
minor issues with the commit that would need to be corrected.
After all, I decided to just remove it again as it seems to not be really
useful for the users.
2015-02-15 04:29:11 +01:00
Campbell Barton
c439d14a9a missed this second last commit 2015-02-15 14:11:05 +11:00
Campbell Barton
fa2f7c69ac mathutils: Implement __hash__() functions
- all mathutils types
- only works on frozen data (so vectors can be used in sets/dict keys)
- uses same method as CPython, (matches hashing a tuple)

D1104 by @juicyfruit with own modifications
2015-02-15 14:02:08 +11:00
Campbell Barton
a9d979c8ef mathutils: add freeze() method, is_frozen attr
This allows you to make any mathutils object immutable.
2015-02-15 14:01:59 +11:00
Campbell Barton
ce85aef0d9 mathutils: remove redundant read callback 2015-02-15 13:46:47 +11:00
Campbell Barton
4feb77cf03 mathutils: avoid extra alloc for Vector.lerp 2015-02-15 13:46:47 +11:00
Campbell Barton
24f9ed0b34 Fix crash setting Euler.order to a non-string 2015-02-15 13:46:47 +11:00
Sybren A. Stüvel
bf157ce927 Fix T42919 & T42218: BGE: Python-driven armature animation got buggy
Due to changes in the way animation updates were handled,
BL_ArmatureObjects were no longer registering to KX_Scene as animated.

Moguri says: It might have been relying on the deformer update which
moved rom being called on every object in the render step. Now
armature deformers are only updated if they need to be.

Fix T42919 & Fix T42218
2015-02-15 02:00:56 +01:00
Julian Eisel
24976dd29d Outliner: Toggle restrict buttons only for selectable child objects
D404 by @rupp with minor edits by me.
2015-02-14 21:54:31 +01:00
Lukas Tönne
db297e7ea3 Revert "Fix T43471, based on patch submitted by @sean_loh."
This reverts commit b2b54b0902045ec4f0c1a4cae3209be863878f5b.

The patch breaks particle distribution even in simple cases, not worth
doing this for keeping a hackish loophole open.
2015-02-14 16:40:57 +01:00
Campbell Barton
cfa1fd1c1f object drawing: only use halo-draw in object mode 2015-02-14 22:29:45 +11:00
Joshua Leung
dd6edac803 Bring copy/free operations into line with changes in previous commit 2015-02-15 00:06:19 +13:00
Joshua Leung
ec2ede4302 Bugfix: Referencing actions from Action Actuator was not setting a user
This reverts the change made in 8872cba7e956a9d9a840e55e5323945497524795
which was contributing to actions being lost in some cases [1], even when
they were assigned to those actuaters, which needed them to be able to
function. Now there's one less case where users are needed but were missing :)

Note that this still doesn't solve the core issue where nothing is responsible
for associating actions created for a particular datablock (and not currently
being used in its active action slot, or in the NLA stack) with that datablock.
That issue is the cause of most action disappearances as well as for other problems
(such as renaming bones being unable to fix unreferenced/unused actions) where there
are diifferences between users' mental models and the data model. Proper fixes are
coming soon (restoring fake users here isn't a proper fix, as it only masks the
fundamental mismatch/problem here).


[1] http://blenderartists.org/forum/showthread.php?357021-BGE-loses-actions
2015-02-15 00:06:18 +13:00
Campbell Barton
7a977df6d4 Refactor array_utils out of BLI_array
BLI_array.h is for resizing array macros, where as array_utils can operate on any arrays.
2015-02-14 08:00:41 +11:00
Campbell Barton
2af905391d cleanup: doxy comments 2015-02-14 08:00:41 +11:00
Campbell Barton
2c1143aa2f Comments: use doxy sections for nodes header 2015-02-14 08:00:41 +11:00
Sergey Sharybin
3ec9b8e0c2 Purge temporary files on abort
This way both BLI_assert() and abort() called directly shouldn't
leave any files in the temp folder.

Previously it was really possible to have gadzillions of files
left over because of assert failures and debug aborts during the
development process.
2015-02-14 01:30:36 +05:00
Antony Riakiotakis
ab77466105 Fix T43585 XRay + transparency broken
We need to turn off restore depth mask in transparency.
2015-02-13 14:38:38 +01:00
Julian Eisel
ef2f31028e Revert "Fix T43646: VSE preview allows displaying channels down to -5"
This reverts commit e652f781a33b3b31fa95b543bf4003ff7b0c57d6.

@schlaile, mentioned in T43646 that this was an intended feature. Checked git
history and it's seems like he's right.
2015-02-13 13:57:48 +01:00
Antony Riakiotakis
90a9415c9a No need to use "SSAO" for SSAO color 2015-02-13 12:15:57 +01:00
Antony Riakiotakis
c01a2aa4bb Alleviate grid creating shadows in Ambient Occlusion effect.
Draw the grid last with depth masking disabled. That should have no ill
effects otherwise as far as I can tell except from some exceptional
cases (axis lines over grid) but this is hardly annoying.

Generally to properly solve such issues we need to have a better render
pipeline with wire objects/materials being drawn after compositing. This
is not impossible but for now doing it the simple way.
2015-02-13 11:56:41 +01:00
Julian Eisel
e652f781a3 Fix T43646: VSE preview allows displaying channels down to -5
Maybe just another typo (tm). (Checked with @psy-fi)
2015-02-13 11:53:29 +01:00
Sergey Sharybin
261cd7f6bf Fix T43649: Geometry node breaks GLSL shading
The issue was caused by the recently added attribute, which is to be
added to the shader function even tho it's not supported.
2015-02-13 15:24:35 +05:00
Sergey Sharybin
46151a6a69 Fix issue with some files having non-unique modifier names
Originally the files are coming from ancient early-2.4x epoch, but in
theory such setups might have been re-saved multiple times already with
more recent blender versions.

So the verisoning code is applied on all the files, including very
recent ones.

Bumped subversion, because this check si not really cheap.
2015-02-13 13:51:10 +05:00
Sergey Sharybin
67fa545ed0 Make modifier_unique_name return whether modifier was renamed or not 2015-02-13 13:46:51 +05:00
Bastien Montagne
34e9f6b956 Fix (revert) mistake in rB1ae2098a6e04359b, causing broken UI (see e.g. Scene buttons).
Reported by  sebastian_k through IRC, thanks!
2015-02-13 09:10:53 +01:00
Campbell Barton
616eb6818f cleanup 2015-02-13 16:17:00 +11:00
Campbell Barton
1ae2098a6e cleanup: ui, use bools 2015-02-13 11:43:28 +11:00
Campbell Barton
4132ca1ac2 UI: show check-boxes pie-menu bool/enums 2015-02-13 11:33:11 +11:00
Campbell Barton
29e19cecd8 BMesh: avoid ugly macro for loop interpolation
Compiler optimizes to practically the same output
2015-02-13 11:06:16 +11:00
Jorge Bernal
1af042d9ed BGE: Fix for T42285 & T38935 crashes. They are Rayhit related.
We make sure that good values are passed to GetPolygon() and we check that the visual mesh doesn't have a wrong displacement when it passes over a object which has a mesh triangle as compound bound.

Reviewers: dfelinto, sergof, agoose77, moguri

Reviewed By: moguri

Subscribers: agoose77

Differential Revision: https://developer.blender.org/D979
2015-02-13 00:12:21 +01:00
Jorge Bernal
9e217ccb2e BGE Fix T39026: No collisions detected with parented rigid body object
Fix for T39026. Preliminary investigation by blenderscripter on D446.
Also it solves bug T41285 (Parenting object leave collission box).

Refactor commit b90de0331df6c92af909b20a3e183596ff3511e4 introduced a
regression bug.

Reviewers: sergof, campbellbarton, moguri

Reviewed By: moguri

Subscribers: blueprintrandom, blenderscripter

Differential Revision: https://developer.blender.org/D1064
2015-02-12 23:56:50 +01:00
Antony Riakiotakis
eda2d563bc Cleanup horrible artifact of Greek to English translation. 2015-02-12 22:05:47 +01:00
Antony Riakiotakis
8de421bbf1 Use the RNA for overriding the name instead. 2015-02-12 19:59:34 +01:00
Antony Riakiotakis
090623c6b6 Revert "Add missing trailing '}' in GLSL files"
This reverts commit ebd4a6e0dd3bdd511f3857dc9192df848f388200.

Trailing '}' is added in C, also we add some extra code as needed.
2015-02-12 19:39:10 +01:00
Campbell Barton
ebd4a6e0dd Add missing trailing '}' in GLSL files 2015-02-13 05:12:15 +11:00
Antony Riakiotakis
5e613198e5 Viewport compositing - first code
This commit introduces a few ready made effects for the 3D viewport
and OpenGL rendering.

Included effects are Depth of Field, accessible from camera view
and screen space ambient occlusion. Those effects can be turned on and
tweaked from the shading panel in the 3D viewport.

Off screen rendering will use the settings of the current camera.

WIP documentation can be found here:

http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing
2015-02-12 18:54:41 +01:00
Bastien Montagne
d40ac45610 Fix (unreported) load_file() func from creator.c not setting G.save_over correctly.
This was rather annoying, since if you were script-editing a .blend file in background
mode, opened through this commandline option system,  and wanted to save over,
a mere `bpy.ops.wm.save_mainfile()` *would not* overwrite expected file,
but instead write/replace the dummy `untitled.blend` one!
2015-02-12 17:30:19 +01:00
Lukas Tönne
d70c7c06e7 Removed the cloth preroll feature.
This feature has been totally broken for a long time. It was added
originally because negative frames were not supported.

Giving simulations (cloth and others) time to settle before animation
starts needs to be solved in a much better and more generic way.
2015-02-12 16:30:07 +01:00
Joshua Leung
719fd5a1ce GPencil: Alt-S can now be used to adjust the pressure values (i.e. thickness) of strokes 2015-02-13 02:48:50 +13:00
Joshua Leung
4f3f9cb280 GPencil: LKEY can now be used for Select Linked too now 2015-02-13 02:48:49 +13:00
Joshua Leung
5c02afb698 Bugfix: Old NLA Strips from 2.4x got converted with no names (since they didn't use to have any) 2015-02-13 02:48:48 +13:00
Campbell Barton
7221fbe9dd cleanup 2015-02-12 23:51:02 +11:00
Antony Riakiotakis
3b68a74c2a Follow functionality: Scrubbing with the arrow keys and during jumps,
will update the editors range.

Offsetting to a certain direction will put the editors min/max to the
new frame if the frame is out of the editor bounds while jumping will
set the new frame at the editor's center.
2015-02-12 13:08:40 +01:00
Campbell Barton
d266733dad Fix T43612: VSE crash clearing proxies 2015-02-12 22:59:48 +11:00
Howard Trickey
dce59530d0 Fix part 1 of T43239, multisegment vertex bevel on 2-edge vertices.
Implemented multisegment rounding of vertices with two edges.
Works both with wire edges and edges that have one or two faces
attached.
2015-02-12 06:55:30 -05:00
Campbell Barton
7f47cd9b17 Correct fix for T43424
Would crash undoing adding a new scene in camera view.
2015-02-12 21:33:59 +11:00
Lukas Tönne
b2b54b0902 Fix T43471, based on patch submitted by @sean_loh.
Particle textures always override timing information of particles.
Previously particle times could be scripted, but now these changes are
discarded by the texture evaluation function.

The patch disables texture overriding when no textures are defined, this
way at least some old scripts can keep working.
2015-02-12 10:15:25 +01:00
Jorge Bernal
a9d09ff7ae BGE: Improve UI of Anisotropic Friction subpanel
Little patch that introduces X: Y: and Z: texts over anisotropic friction sliders

Reviewers: moguri, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1073
2015-02-12 06:38:21 +01:00
Bastien Montagne
e60259c1cd Fix for previous commit - since it's for non-debug unused vars, name it UNUSED_VARS_NDEBUG.
This commit was proudly crafted by the Commit Rate Raising Committee!
2015-02-11 22:22:40 +01:00
Bastien Montagne
e1bdf5333d Add new UNUSED_VARS_DEBUG utils, which is NOP in debug build, but tags given vars as unused in non-debug builds.
Helps handling cleanly pure-debug variables.
2015-02-11 22:10:09 +01:00
Campbell Barton
fbe5282c1e Outliner: use enum for outliner_group_operation()
No functional changes.

D1067 by @lichtwerk
2015-02-12 07:43:32 +11:00
Campbell Barton
23214ecad0 Outliner: ContextMenus for constraints/modifiers
Context menu to toggle render, visibility & delete

D996 by @lichtwerk
2015-02-12 07:29:31 +11:00
Campbell Barton
27b2ab8cf4 Fix VSE strip channel skip overlapping strips
D1096 by @mangostaniko (with some edits)
2015-02-12 06:20:36 +11:00
Antony Riakiotakis
26d7ac5077 Full screen mode did not remember the follow mode of previous screen.
Also make follow mode do something similar in reverse play.
2015-02-11 20:01:21 +01:00
Campbell Barton
de85d6cdbf cleanup: rename enum type to blender convention 2015-02-12 03:30:01 +11:00
Bastien Montagne
b9ffd70960 FileBrowser Bookmarks: fix issue with invalid bookmarks.
Reported by maxon through IRC, thanks.

Invalid (inexistant) bookmarks would not be selectable, hence not removable.

First, made invalid bookmarks grayed out in lists, so that user knows when there are some.

Then, added a new 'cleanup' operator that removes all invalid bookmarks.

This solution may not be completely satisfaying, but should do the work for now.
I do not want to add back those ugly 'X' delete buttons for each entry in list,
so better solution would be to make UIList able to select several items at once...
2015-02-11 17:13:16 +01:00
Bastien Montagne
f60b4228b9 BPY RNA: add is_property_readonly().
This property may be defined dynamically, so mere access to static flag value
through `bl_rna.properties[...].is_readonly` is not enough.
2015-02-11 17:13:16 +01:00
Bastien Montagne
cde1ef403b Fix (unreported) disabled items in UIList not grayed out.
Since we override widget's theme colors in this case in widget_state,
we have to redo 'disabled' alpha shading...
2015-02-11 17:13:16 +01:00
Campbell Barton
2613bfadb2 RNA: sequencer channel range was incorrect
Broke since 2.4x, zero sequence channels shouldn't be allowed
2015-02-12 02:36:33 +11:00
Campbell Barton
3b5eac548f Fix depth-eyedropper crashing outside 3d view
Also set the eyedropper operators as internal.
2015-02-12 02:17:03 +11:00
Antony Riakiotakis
44f09c93d1 Use line curve for cavity mask instead of sharp as default when no curve
is found during loading
2015-02-11 15:29:24 +01:00
Antony Riakiotakis
743a67c6cb Cavity option active even in fill brushes 2015-02-11 15:09:11 +01:00
Antony Riakiotakis
f7e131a6ac Cavity masking - add curve control to cavity mask and move relevant
structs to paint struct (might be useful for vertex paint too in the
future)

Cavity masking now has a curve control. The control will set the amount
of masking for positive cavity ("pointness") or negative cavity
("cavity") with x axis being the amount of cavity and 0.0 = full cavity,
1.0 = full pointness, 0.5 = no cavity and the y axis being the amount of
alpha.
2015-02-11 15:07:24 +01:00
Sergey Sharybin
88efcdc376 Compositor: Expose Alpha socket for multilayer EXR node
This way re-mapping scene nodes to EXR files becomes much easier,
no extra trickery with separate RGBA setups is needed.

Plus makes it more consistent with regular EXR files.

This uses EGBA pass to get alpha from.
2015-02-11 18:28:41 +05:00
Dalai Felinto
560c05e8bd Fix T43628: Circular dependency error preventing multiple highpoly objects to bake
Throwing an RPT_ERROR was stopping baking after the first object.
2015-02-11 11:23:03 -02:00
Nicholas Bishop
259d47a15e Minor code cleanup: move some duplicated texpaint code into function
Reviewers: psy-fi

Reviewed By: psy-fi

Differential Revision: https://developer.blender.org/D1098
2015-02-11 13:33:47 +01:00
Campbell Barton
2d1e072686 UV Island support for vertex & edge slide
This ensures slide with `Correct UVs` enabled, keeps UV's (any loop custom-data) contiguous.

Adds 2 key functions `BM_vert_loop_groups_data_layer_create` and `BM_vert_loop_groups_data_layer_merge`

They work by collecting matching loop custom-data around the vertices loop-fan,
and merging the custom-data after edits are made.

Thanks to @mont29 for review!
2015-02-11 21:30:13 +11:00
Bastien Montagne
8668006519 Fix crasher in own UIList bookmarks commit.
Immediate crash in merged asset-experiments branch, no idea why it did not show in master too?
2015-02-11 11:16:32 +01:00
Campbell Barton
d4934f8f6d cleanup: style/indentation 2015-02-11 18:39:28 +11:00
Joshua Leung
387d91829d Fix T43149: Grease Pencil fill areas look divided by multiples ray lines
The problem here was caused by the usage of GL_POLYGON_SMOOTH (thanks Campbell
for the help tracking this down!). Apparently the issue is that this option
ends up doing some nasty accumulation with whatever is in the framebuffer for
each *tesselated* polygon (instead of the whole polygon as intended/expected).

** IMPORTANT USER NOTES **
With the removal of this option, filled areas and volumetric strokes will now
have jagged edges again. To resolve these artifacts, it is necessary to enable
Viewport Multisampling (found in the User Preferences, under the System tab),
and restart Blender to see the effects of this change.
2015-02-11 17:54:14 +13:00
Campbell Barton
4ae6d58999 Minor optimization for mask modifier
- don't resize ghash buckets (reserve maximum size)
- get vert, edge arrays instead of DM getVert, getEdge
- calloc -> malloc
2015-02-11 10:39:50 +11:00
Bastien Montagne
9e2abbc9ba FileBrowser: Editable Bookmarks.
Bookmarks are now editable (i.e. you can rename them, and reorder them).
They are also listed in regular UILists, so you can filter/sort them as usual too.

Also, FileBrowser 'T' side area is changed to something similar to 3DView one,
in this case because we need op panel to remain at the bottom, and later because
we'll more than likely need tabs here!

Thanks to Campbell and Sergey for reviews.

Differential Revision: https://developer.blender.org/D1093
2015-02-11 00:09:45 +01:00
Bastien Montagne
4f1e387588 UI: add optional tip callback to uiBut, and use it for per-item tooltips in UIList.
When defined, uiBut->tip_func is called when button's tip is generated. This allows
for advanced, dynamic generation of tooltips.

For now, only used by UIList, which can now optionaly use a given string property
of each item for its tooltip.

Thanks to Campbell for the reviews!
2015-02-11 00:07:09 +01:00
Gaia Clary
d18993d4e4 Fix T43297 The Exporter assumed ANSII encoding but we need to support UTF-8 instead 2015-02-10 22:14:31 +01:00
Troy Sobotka
28e76bbb93 Remove legacy color transform functions.
Differential Revision: https://developer.blender.org/D1095
2015-02-10 21:34:19 +01:00
Campbell Barton
1d64dff671 Fix recent vert-slide UV's when cancelled
Added support recently, but wasn't cancelling correctly.
2015-02-11 07:30:11 +11:00
Sybren A. Stüvel
2b01b71339 Fix T43565: BGE removed unneeded if/else in BL_KetsjiEmbedStart 2015-02-10 21:28:18 +01:00
Antony Riakiotakis
a3b7f83cb5 Cavity mask support for texture painting.
Title says it all, options can be found in the options panel,

A slider controls the amount of cavity masking that is applied while
it's also possible to invert the mask and paint outside or inside
cavities.

Again we might greatly benefit from caching of the cavity result, but
that should only affect startup time for the stroke.
2015-02-10 20:23:43 +01:00
Bastien Montagne
bc218cf4d2 BLI_linklist: Add a new helper to move an item (identified by its current index) to a new position in the list. 2015-02-10 19:20:36 +01:00
Antony Riakiotakis
a9c5d0ba51 Slip tool: add enter and space to confirm the operation 2015-02-10 17:40:11 +01:00
Sergey Sharybin
227a94077f Cycles: implement pointiness geometry attribute
This attribute means how "pointy" the geometry surface is, which allows to do
effects like dirt maps and wear-off effects on render geometry. This means the
attribute is calculated for the final mesh which means no baking (which implies
UV unwrap) is needed. Apart from this the behavior is quite close to how vertex
dirty colors works.

The new attribute is available as an output socket of Geometry node.

There's no penalty for the render time, only some delay on scene preparation
(the delay is linear of the mesh complexity).

Reviewers: brecht, juicyfruit

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1086
2015-02-10 20:33:41 +05:00
Campbell Barton
e7d20b0be4 Fix grease-pencil crash without clip/track data 2015-02-10 23:34:16 +11:00
Campbell Barton
1cfe0c1fb2 UI: scale timeline cache-height by DPI/pixelsize
D602 by @blakenator with edits
2015-02-10 22:33:52 +11:00
Campbell Barton
27f81bf6ce correct last commit 2015-02-10 22:03:10 +11:00
Joshua Leung
040b510df1 Fix: Grease Pencil datablocks can be copied using the ID.copy() API method now 2015-02-10 23:30:30 +13:00
Sergey Sharybin
6971bd9a4f Fix T43611: Collision shape of rigid bodies changes inadvertently
The issue was caused by the fix for T34108, which modified DNA in order to
get a fallback box collision shape. Not sue why it's needed, we can just get
box shape directly, without modifying user's settings.
2015-02-10 12:56:25 +05:00
julianeisel
25412d8ae2 Nodes: Various UI cleanups for Image and Environment Texture Nodes
Mainly consistency changes and smaller fixes.

* Environment Texture Nodes:
** show image info
** split layout for menus (showing menu title on the left)
** hierarchical button order

* Image Nodes:
** disable Alpha Mode menu if Use Alpha is disabled
** Don't show "+" icon/button if an image is already loaded
** Consistent alignment of menu buttons (see Input Color Space menu)

Requested and approved by @venomgfx
2015-02-09 23:17:33 +01:00
julianeisel
64ef6e74f7 Nodes: (Un)pack, filepath, refresh buttons for Environment Texture nodes
The same buttons are already used for other image textures and since the
environment tex node does only allow images as well, it makes sense to
have this here too.

Approved by @lukastoenne and @venomgfx,
requested by @venomgfx
2015-02-09 23:17:33 +01:00
julianeisel
4ca4f04c75 Fix file size not drawn using Link/Append
For linking/appending, .blends get the type S_IFDIR added which prevents
the size from being drawn. BLI_is_dir gets the type from the OS so it's
better suited for this case.

Reported by @sergey.
2015-02-09 22:06:45 +01:00
Ines Almeida
4edc1bbe02 BGE - Vehicle Controller - add background and API checks for arguments of function calls
Fixes T41570 crash
For readability, attachDir was renamed to downDir and the Python API docs renamed accordingly
2015-02-09 20:58:15 +00:00
Ines Almeida
a088b9488d Recreating bge python modules instead of using existing
All of the initXPythonBinding functions are changed to always creating the module instead of importing if previously existing.
I can instead only remove the module return when the import is ok, so that it always inits. But then, I don't see the point in importing.

I make sure that these functions are called only once per run, inside initBGE.
This was not the case with GameTypes. I moved initPyTypes inside of initGameTypesPythonBinding due to that.

I reorganized initGamePlayerPythonScripting and initGamePythonScripting so that they run things in the same order.
initGamePlayerPythonScripting imports mathutils and aud, the other only aud. Shouldn't it be the same for both?

Reviewers: campbellbarton

Subscribers: sybren

Projects: #game_engine, #game_python

Differential Revision: https://developer.blender.org/D1070
2015-02-09 20:56:38 +00:00
Campbell Barton
31e26bb83b Fix T43424: undo changes the active scene
Using different scenes with 2+ windows broke entirely using undo.
Now keep track of the current windows scene in each undo-file,
and ensure the undo-scene is on a visible window when undo is executed,
switching the scene only when its not in a visible window.
2015-02-10 05:51:05 +11:00
Campbell Barton
2fe9e3c1f0 more direct fix for last commit 2015-02-10 03:00:37 +11:00
Campbell Barton
c4e8d74563 Fix T43498: New curves fails /w radius & rotation
Scaling matrix assumed no rotation,
also remove unused apply_diameter arg.
2015-02-10 02:50:59 +11:00
Campbell Barton
3c755fd6a5 Fix outliner crash renaming library /w filter
D1045 by @a.romanov
2015-02-10 02:05:22 +11:00
Nicholas Bishop
5544ded2b5 Fix ImBuf leaked by Image from View operator
Running this operator and and closing Blender gives this:
Error: Not freed memory blocks: 2
ImBuf_struct len: 2480 0x69ba4f8
imb_addrectImBuf len: 1048576 0x6ccc2d8

Fixed with added call to IMB_freeImBuf in BKE_image_add_from_imbuf.
Could be fixed in the operator instead, but I think the BKE function
is the correct place since the comment says it should take ownership
of the ImBuf.

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1084
2015-02-09 12:02:59 +01:00
Nicholas Bishop
567e147f61 Code cleanup: remove unused function BKE_image_assign_ibuf
Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1083
2015-02-09 11:28:38 +01:00
Bastien Montagne
9c90c559fe SpaceFile: rework filelist_find, was looping way too much. 2015-02-09 10:10:20 +01:00
Joshua Leung
12ed439d8e GPencil: Show color swatches for GPencil layers in Outliner
Instead of showing a meaningless "dot" icon or having to come up with an arbitrary
icon, the Outliner now shows the stroke/fill color swatches for each layer to
match every other place where these are shown.

NOTE: Like many other widgets in the outliner though, these are not editable.
2015-02-09 12:48:00 +13:00
Joshua Leung
7df0a19d63 GPencil: Viewport visbility and editability toggles for layers in Outliner
* Viewport visibility and locking are currently exposed
* Later on, visibility in renders can also be included
2015-02-09 12:47:59 +13:00
julianeisel
6b107daf23 Fix T43554: Zoom to mousepos makes 2D Views pan after zoom limits are
reached

There are a couple of things that I don't like here, but it seems like
the best way to handle this for now.
2015-02-08 22:35:33 +01:00
Mike Erwin
8aeb9d2158 minor Windows include tweak
Needed a minor change to test committing from a new development system.
2015-02-08 12:41:45 -05:00
Bastien Montagne
0d766aa532 Some minor fixes from latest coverity scan, nothing crucial here. 2015-02-08 16:26:45 +01:00
Sybren A. Stüvel
dd65a44c9a BGE physics: When colliding, report first contact point to Python
This patch adds two parameters to the functions in the
collisionCallbacks list. The callback function should thus be like
this:

```
def on_colliding(other, point, normal):
    print("Colliding with %s at %s with normal %s" % (other, point, normal))

game_ob.collisionCallbacks.append(on_colliding)
```

The `point` parameter will contain the collision point in world
coordinates on the current object, and the `normal` contains the
surface normal at the collision point.

The callback functions are checked for the number of arguments
`co_argcount`. The new `point` and `normal` arguments are only passed
when `co_argcount > 1` or when `co_argcount` cannot be determined.

Reviewers: brita_, campbellbarton

Subscribers: sergey, sybren, agoose77

Projects: #game_physics

Differential Revision: https://developer.blender.org/D926
2015-02-08 15:52:13 +01:00
Campbell Barton
51b645a655 Initial vertex slide UV-correct support
Still need to adjust for contiguous UV's
2015-02-08 17:58:11 +11:00
Campbell Barton
8ff099bc7b BoxPack: avoid using static vars (make threadsafe) 2015-02-08 17:07:47 +11:00
Campbell Barton
d989d8a374 CMake: only quiet warnings for generated rna files
also minor warning cleanup
2015-02-08 15:08:31 +11:00
Campbell Barton
9c9dab095d RNA: use FUNC_USE_MAIN to avoid 'G' global 2015-02-08 02:20:55 +11:00
Campbell Barton
e7c7f57481 RNA: packing functions for vfont & sound
D389 by @kevindietrich
2015-02-07 22:35:32 +11:00
Joshua Leung
5ebae1c0c0 GPencil: Initial support for GP Layers in Outliner
This is still very rudimentary, and lacks many things.
* This needs a better icon. Perhaps we can look into using colour swatches here
  too like in all the other places?
* The "active" check needs to be implemented still
* Various restriction toggles to come still
2015-02-07 12:50:22 +13:00
Joshua Leung
68fc2e210e GPencil: Initial support for Grease Pencil in the Outliner
This commit just adds entries for the Grease Pencil datablocks in the Outliner.
Currently, there's not much more to see here, but the following commits will see
to that.
2015-02-07 12:28:17 +13:00
Miika Hamalainen
1b85ca6fc0 Fix T42950: Smoke particle flow doesn't work with high res and subframes unless "set size" option is ticked. 2015-02-06 21:23:43 +02:00
Bastien Montagne
a42553f986 Fix T43579: FBX Export shading issue (Broken normals?)
Error in custom split normals work, non-autosmooth normals != vertex normals!
Loops from flat faces shall take normal of their face, not their vertex.

Tsst...
2015-02-06 20:14:18 +01:00
Campbell Barton
b12f3cbee7 cleanup: style 2015-02-07 04:50:21 +11:00
Campbell Barton
fa9e42b57d UserPrefs: increase max undo steps to 256 2015-02-07 04:26:57 +11:00
Campbell Barton
8ab1188e39 rename SIPO_AUTOVIEW -> SIPO_AUTO_VIEW_SELECTED
The term auto-view on its own isn't very meaningful
2015-02-07 03:47:06 +11:00
Antony Riakiotakis
0e049e88e2 One more crashing instance for hashes 2015-02-06 17:39:26 +01:00
Antony Riakiotakis
14dbe1c261 Slip tool accepts numerical input. 2015-02-06 16:38:32 +01:00
Antony Riakiotakis
bf54867ff1 Get rid of no scaling for proxies for master, it causes FX to crash,
will code another workaround for gooseberry.
2015-02-06 15:58:50 +01:00
julianeisel
dffdde4cdc Graph Editor: Auto View
Auto View automatically adjusts the view based on selection, so that the view is
always focused on the current selection.
A checkbox in the header is used to access it and it works for the following
selection methods: Toggle All, Border, Circle, Lasso, Left, Right, More, Less,
Linked, Column (so all except of single selection, in which this can be a bit
annoying)

Reviewed by @Aligorith (thanks for that :) )
2015-02-06 15:53:13 +01:00
Bastien Montagne
31170ec19e Fix T43578: Beauty Triangulation would hang in infinite loop, due to float rpecision issue.
Only recompute if cost is below -FLT_EPSILON, we can get cases where both cases generate
very tiny negative costs (see 'Cylinder.004' mesh in .blend attached to report).
2015-02-06 15:11:34 +01:00
Antony Riakiotakis
f4f468fc48 Fix sequencer crashing after recent GHash refactor.
Code frees hash element while iterating - I don't think that's a good
idea but this should keep things working for now at least.
2015-02-06 14:28:08 +01:00
Bastien Montagne
24edab07cc Add a precision to 'show group color' tooltip, that fcurve/action editors option was confusing users a bit. 2015-02-06 12:38:33 +01:00
Bastien Montagne
580bb26213 Fix some UI messages from own recent merge, and RNA code checking for final '.', was a bit too rough. 2015-02-06 09:52:31 +01:00
Campbell Barton
61c66a996c Outliner: DragDrop objects to groups
Support drag&drop objects to groups in the outliner.

D989 by @lichtwerk
2015-02-06 19:03:09 +11:00
Campbell Barton
b752597805 cleanup: use bool args & redundant casts 2015-02-06 18:19:29 +11:00
Campbell Barton
f9f04726e5 GHash: no need to malloc iterators 2015-02-06 15:34:36 +11:00
Campbell Barton
4cbf2ebdc9 Cleanup: style 2015-02-06 13:55:20 +11:00
Antony Riakiotakis
ced4c5fe22 Animation play: Follow feature. Enabled from playback menu in the
timeline.

When enabled, ipo, dopesheet, NLA, timeline, clip and sequence editors
will follow the current frame during animation. When the cursor reaches
the end of the screen, then the next range of frames of the same width
is displayed.
2015-02-05 22:14:38 +01:00
Antony Riakiotakis
d5b1dfa9c6 More fixes for high DPI:
* Radial operators were completely wrong
* Dynamic topology detail was also using unscaled number
2015-02-05 19:15:24 +01:00
Antony Riakiotakis
77698f6010 Fix T43556 clamp brush size before setting it after division by DPI,
avoids nasty zero size brushes.
2015-02-05 19:11:00 +01:00
Antony Riakiotakis
a1ec1b3974 Fix part of T43556 brush increase/decrease size operators do not update
the UI sliders.
2015-02-05 18:14:05 +01:00
Bastien Montagne
f6e7989460 Custom Loop Normals: Add NormalEdit modifier
Nothing much to say here, basic tool to make normals point toward a target,
or to make them point 'outward' as if object was a spheroid (useful for game bushes etc.).

Also, forgot a big thank you to Campbell for the extensive review work he has done on this project!
2015-02-05 14:59:52 +01:00
Bastien Montagne
2c3e4fbd7e Add Custom Loop Normals to Data Transfer.
Titles says everything, just two notes:
* We have to actually transfer plain *normals*, not 'compressed' clnors,
  so had to add pre/post process to transfer to make the conversions.
* Also added interpolation and advanced copy/mixing to CD_NORMAL, for same reasons.
2015-02-05 14:38:59 +01:00
Bastien Montagne
138c9dba9b Add Custom Loop Normals.
This is the core code for it, tools (datatransfer and modifier) will come in next commits).
RNA api is already there, though.

See the code for details, but basically, we define, for each 'smooth fan'
(which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal),
a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store
custom normal as two angular factors inside that space. This allows to have custom normals
'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer.

Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals,
and be converted back into storage format at the end.

Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can
be rather heavy with high poly meshes.

Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-02-05 14:32:57 +01:00
Bastien Montagne
7bae9ee6b6 Mesh validate: add an option to not clean temp/cache CDLayers.
This is mandatory for incoming custom normal imports from io scripts, because
often geometry here is corrupted, so we need to call mesh.validate() to clean it up.

Issue is, we cannot set custom normals before geometry is clean, so we need to store
temporary plain loop normals in a CD_NORMAL layer, validate, and then set custom normals.
So we need a way to prevent 'temp' lnors to be freed by validate.
2015-02-05 14:03:01 +01:00
Bastien Montagne
e442b9916e BLI_math vectors: add minmax_v3v3_v3_array to get min and max values on each components of an array of 3D vectors. 2015-02-05 14:00:58 +01:00
Bastien Montagne
0527fc5fb8 Fix T43566: Missing update event for VSE
VSE was missing NC_ANIMATION | ND_KEYFRAME events.
Also need to invalidate cache on those, else keyframe editing do not get reflected in VSE preview!
2015-02-05 11:54:47 +01:00
Nicholas Bishop
e922903ae8 Use MAX_CUSTOMDATA_LAYER_NAME for size of GPUInput.attribname array
Before this was hardcoded to 32, which I think was incorrect because
this is used to store a customdata layer name.

Reviewers: psy-fi, campbellbarton, sergey

Reviewed By: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1040
2015-02-05 11:20:24 +01:00
Campbell Barton
343ddc52dc UI: UVWarp-Modifier had duplicate names
D1047 by @lichtwerk
2015-02-05 19:30:02 +11:00
Campbell Barton
57e1a5373f Fix T43531: Wrong object center-dot color
Write objects center point to the nearest depth.
2015-02-05 17:01:58 +11:00
Bastien Montagne
4e27f63828 Fix T43560: crash when loading old (2.45 here) file whith multires.
Was trying to free a NULL pointer...
2015-02-04 21:43:01 +01:00
Bastien Montagne
37ae32870e Fix T43567: Freestyle On/Off keyframe is being ignored.
That kind of stuff shall not be animated! :)
2015-02-04 21:21:45 +01:00
Kévin Dietrich
ac2f608fa3 Fix T43450: Texture node tree failed to clamp
Clamping routine was not implemented. This fixes T43450.

Reviewers: #nodes, #rendering, sergey

Reviewed By: sergey

Maniphest Tasks: T43450

Differential Revision: https://developer.blender.org/D1038
2015-02-05 01:20:35 +05:00
Antony Riakiotakis
363a044b4c Sequencer, scaling and audio synch
Don't scale proxies, same as we do in gooseberry, also for sound synch
give a small window around sound where frame is just pushed forward.
Avoids video jumping in the cases when video renders faster than sound
(yes, weirdly enough it happens sometimes). There might be a few jumps
but results looks smoother here.
2015-02-04 20:38:56 +01:00
Dalai Felinto
035d14c029 small typo in a code comment, fixing this before someone does it to prevent uneeded merge conflicts in branches 2015-02-04 17:19:40 -02:00