blender-staging.git
4 years agoAction Editor: Stash Action Operator
Joshua Leung [Fri, 27 Feb 2015 14:32:13 +0000 (03:32 +1300)]
Action Editor: Stash Action Operator

This operator (the snowflake icon, beside the pushdown button on the Action Editor
header) adds the currently active action to the NLA stack in a muted track, then
creates + loads a new action ready to be populated with new keyframes.
Since the NLA is being used to hang on to all the actions here, no actions are
getting lost.

Usage Notes (there will be some additional tweaks to make this nicer):
* To preview different actions that have been "stashed", simply click the "Solo"
  toggle for the track containing the action in question. Playing back the NLA will
  now show the stashed track
* To edit a previously stashed action - simply enter tweakmode on it in the NLA
  while the "Solo" toggle is enabled.

Todo:
* Add some more operators here to polish up the Action <-> NLA bridge to make the
  layered and stash workflows smoother. Examples include some tools to easily
  switch between the different actions layers in the stack, as well as making it
  easier to get out of tweakmode (and sync up the action lengths)

* Review and cleanup the behaviour of the "new" operator here to avoid the old
  problems that users were running into

* After the next release - Implement the full Action Libraries functionality, with
  ways to bridge the stashed strips over to a full-blown library.

4 years agoNLA: Auto-Blends option is no longer enabled on all newly added strips
Joshua Leung [Fri, 27 Feb 2015 13:43:44 +0000 (02:43 +1300)]
NLA: Auto-Blends option is no longer enabled on all newly added strips

This may be put back again later, but currently, this is a bit too trigger-happy
to have it on. It tends to mess up results more than it helps.

4 years agoFix for NLA Solo/Mute behaviour
Joshua Leung [Fri, 27 Feb 2015 06:36:13 +0000 (19:36 +1300)]
Fix for NLA Solo/Mute behaviour

The Solo and Mute functionality for the NLA system should really be mutually
exclusive features. They both affect whether a given track applies or not.
The only difference is that the Solo option mutes all the others, while the Mute
only does this on a per track basis.

Before this fix, muting a strip and then making it solo meant that the solo'd
track would not play at all, which isn't really what we want.

4 years agoFix for previous commit: Pop up a warning in cases where the operator will refuse...
Joshua Leung [Fri, 27 Feb 2015 05:29:53 +0000 (18:29 +1300)]
Fix for previous commit: Pop up a warning in cases where the operator will refuse to do anything

4 years agoAction Editor: Added "Push Down" operator to send the current action on to the NLA...
Joshua Leung [Fri, 27 Feb 2015 04:06:44 +0000 (17:06 +1300)]
Action Editor: Added "Push Down" operator to send the current action on to the NLA Stack

This commit exposes the "Push Down" button/functionality found in the NLA Editor
to the Action Editor, so that actions can be added NLA Stack from here too. The
main point of this for now is to make the whole layered-animation workflow nicer
more efficient, but not requiring the second editor be visible in common cases.
It also conveniently sets things up for the next few changes (already hinted at
here)...

4 years agoCode Cleanup: Clarify some comments regarding usercount management
Joshua Leung [Fri, 27 Feb 2015 04:03:10 +0000 (17:03 +1300)]
Code Cleanup: Clarify some comments regarding usercount management

(Note for the uninitiated looking at the diffs: this is very much *not* what
 you're probably thinking right now, if you're looking at the line in
 act_new_exec())

4 years agogameengine physics: moving collision filtering inside the collision panel and relabel...
Ines Almeida [Fri, 27 Feb 2015 11:11:49 +0000 (11:11 +0000)]
gameengine physics: moving collision filtering inside the collision panel and relabeling some parts

4 years agoUI: place camera DOF buttons to be more compact
Campbell Barton [Sat, 28 Feb 2015 06:26:05 +0000 (17:26 +1100)]
UI: place camera DOF buttons to be more compact

4 years agoOutliner: rename "Orphaned Datablocks" menu item
Campbell Barton [Sat, 28 Feb 2015 05:24:54 +0000 (16:24 +1100)]
Outliner: rename "Orphaned Datablocks" menu item

Makes the drop-down push searchbox out of the view (which is already quite cramped)
change to "Orphan Data".

4 years agoBGE: Fix ShowDeprecationWarning macro.
Thomas Szepe [Fri, 27 Feb 2015 22:05:06 +0000 (23:05 +0100)]
BGE: Fix ShowDeprecationWarning macro.

Reviewers: lordloki, brita_, sybren, moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D1144

4 years agoPy Enum props definition: 'default' parameter cleanup/fix.
Bastien Montagne [Fri, 27 Feb 2015 22:02:13 +0000 (23:02 +0100)]
Py Enum props definition: 'default' parameter cleanup/fix.

* There was no real default value for this parameter (neither "" nor None would work the same as
  not specifying that parameter). Now, 'None' is considered as default value, and you get
  exact same behavior with this value and if not specifying it. This is important at least for
  consistency, and potentially too in some esoteric cases (like generated code or so).
* Add a warning about the fact that 'default' parameter shall not be psecified when items
  are given a callback function.

4 years agoFix T43834: Text object looses one char after another by entering/leaving edit mode.
Bastien Montagne [Fri, 27 Feb 2015 20:31:54 +0000 (21:31 +0100)]
Fix T43834: Text object looses one char after another by entering/leaving edit mode.

Own mistake in refactoring of `BLI_strncpy_wchar_as_utf8()`, if given size was exactly
the one needed, we'd lost last char (off-by-one error).

Many thanks to plasmasolutions (Thomas Beck) who found the issue and did
all the investigation work here!

4 years agoGet rid of gluScaleImage in our game engine as well.
Antony Riakiotakis [Fri, 27 Feb 2015 13:47:39 +0000 (14:47 +0100)]
Get rid of gluScaleImage in our game engine as well.

4 years agoMake some adjustments to the units for viewport camera dof.
Antony Riakiotakis [Fri, 27 Feb 2015 13:05:12 +0000 (14:05 +0100)]
Make some adjustments to the units for viewport camera dof.

This is still not so correct, to make it work we really have to do a
blurring pass based on the real coc (currently we are just blending 3
levels of blur)

4 years agoFix WPaint inactive when painting on a vgroup and the only other vgroup is locked.
Bastien Montagne [Fri, 27 Feb 2015 10:43:10 +0000 (11:43 +0100)]
Fix WPaint inactive when painting on a vgroup and the only other vgroup is locked.

`enforce_locks()` would reset weights of non-locked modified vgroups if it could not
find any other non-modified non-locked vgroup to 'distribute' weights into.
Sounds rather stupid, yet I hope I did not break something else, this code
is rather convoluted to say the least.

Side-reported by zeauro (ronan ducluzeau) in T43814, thanks!

4 years agoFix T43814: Skinning : set parent with automatic weights doesn't take into account...
Bastien Montagne [Fri, 27 Feb 2015 10:39:03 +0000 (11:39 +0100)]
Fix T43814: Skinning : set parent with automatic weights doesn't take into account locked vertex groups.

Simply skip a bone's vgroup when it already exists and is locked.

4 years agoerror in last commit
Campbell Barton [Fri, 27 Feb 2015 09:58:32 +0000 (20:58 +1100)]
error in last commit

4 years agoFix T43605: Spot Cone+Curve creates odd shadow
Campbell Barton [Fri, 27 Feb 2015 09:54:57 +0000 (20:54 +1100)]
Fix T43605: Spot Cone+Curve creates odd shadow

Curves could leave glFrontFace in an unknown state.

4 years agoFix T42833: Kink on nurbs curve
Campbell Barton [Fri, 27 Feb 2015 09:14:15 +0000 (20:14 +1100)]
Fix T42833: Kink on nurbs curve

Threshold for normalizing was too big.

4 years agoFix T43807: invalid mesh from 2-sided cyclic curve
Campbell Barton [Fri, 27 Feb 2015 06:43:10 +0000 (17:43 +1100)]
Fix T43807: invalid mesh from 2-sided cyclic curve

4 years agocleanup: typos
Campbell Barton [Fri, 27 Feb 2015 04:41:50 +0000 (15:41 +1100)]
cleanup: typos

4 years agoMEM_SAFE_FREE caused issues /w const & GCC5
Campbell Barton [Fri, 27 Feb 2015 04:26:22 +0000 (15:26 +1100)]
MEM_SAFE_FREE caused issues /w const & GCC5

4 years agocleanup: double promotion
Campbell Barton [Fri, 27 Feb 2015 03:26:34 +0000 (14:26 +1100)]
cleanup: double promotion

4 years agocleanup: use GHOST_PRINT instead of stdio
Mike Erwin [Fri, 27 Feb 2015 02:21:11 +0000 (21:21 -0500)]
cleanup: use GHOST_PRINT instead of stdio

Mostly from my own NDoF stuff.

4 years agocleanup: ghost Win32 event processing functions
Mike Erwin [Fri, 27 Feb 2015 00:53:55 +0000 (19:53 -0500)]
cleanup: ghost Win32 event processing functions

Removed window arg from key conversion functions.

Removed processModifierKeys declaration since that function was
apparently never implemented.

Using Win32-specific classes instead of their generic superclass -- this
helps in a few cases like WinTab.

4 years agoCompile fixes for mingw64
Joshua Leung [Fri, 27 Feb 2015 00:12:21 +0000 (13:12 +1300)]
Compile fixes for mingw64

* m_hDC was always included after m_hWnd in all the constructors and other functions,
  but the order was reversed in the struct, meaning that they would not get initialised
  correctly

* Got rid of the gotos for the error handling case in initializeDrawingContext()
  This was causing "jump to label ... crosses initialisation" errors for the calls
  to get GL version string info (i.e. const char *vendor = ...;  etc.)  I wasn't sure
  if those glGetString calls needed the rest of the context to be defined first, so
  I decided to leave them where they are now, and got rid of the gotos (which were
  making this particular piece of code a bit confusing) instead.

TODO:
There are still a bunch of warnings about around 660, which I haven't managed to solve
(but at least they won't prevent Blender from compiling)

  narrowing conversion of '(stereoVisual ? 1063 : 1061)' from 'int' to
  'DWORD {aka long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]

4 years agocleanup: ghost Win32 IME
Mike Erwin [Thu, 26 Feb 2015 23:40:09 +0000 (18:40 -0500)]
cleanup: ghost Win32 IME

Took out lots of redundant function calls (getters). Also wrapped more
code in WITH_INPUT_IME guards.

4 years agoFix T43806: Knife project crashes
Campbell Barton [Thu, 26 Feb 2015 22:46:56 +0000 (09:46 +1100)]
Fix T43806: Knife project crashes

Need to re-create the bmbvh after executing the cut.

4 years agocleanup: spelling & typos
Mike Erwin [Thu, 26 Feb 2015 19:11:39 +0000 (14:11 -0500)]
cleanup: spelling & typos

Comments only, no functional change.

4 years agoBGE: Fix for CreateConstraint API
Thomas Szepe [Thu, 26 Feb 2015 19:08:22 +0000 (20:08 +0100)]
BGE: Fix for CreateConstraint API

This patch fix two bugs related to CreateConstraint().
1. Disable linked collision only working with 6DoF constraints.
2. If all pivot axis rotations setted to zero the linked object disappears.

{F101374}

Reviewers: moguri, sybren, brita_, lordloki

Reviewed By: lordloki

Subscribers: p9ablo

Differential Revision: https://developer.blender.org/D704

4 years agoFix T43303 impossible to select a joint in stick bone edit mode.
Antony Riakiotakis [Thu, 26 Feb 2015 14:44:06 +0000 (15:44 +0100)]
Fix T43303 impossible to select a joint in stick bone edit mode.

Things here are simple, selected bone joint could have same priority as
unselected bone, so bone would always win. Gave joints a little more
priority than bones, usually user will be more precise just to select
the joint anyway.

4 years agoRemove redundant glInitNames calls (shouod be handled in selection code
Antony Riakiotakis [Thu, 26 Feb 2015 14:20:30 +0000 (15:20 +0100)]
Remove redundant glInitNames calls (shouod be handled in selection code
now.)

4 years agoFix T43479 animated textures lost after going to a frame before animated
Antony Riakiotakis [Thu, 26 Feb 2015 14:10:19 +0000 (15:10 +0100)]
Fix T43479 animated textures lost after going to a frame before animated
frame start.

Issue here is that if we failed to get an image from the cache, we would
try to load from file. This would fail when the queried frame was less
than the animated sequence start frame, and invalidate the OK state of
the image.

Solution is that when loading from cache succeeds, we also reset the OK
state of the image for animated textures.

The fix might be relevant elsewhere too, but kept it isolated just in
case.

4 years agoFix T42506 sequencer not limiting zoom.
Antony Riakiotakis [Thu, 26 Feb 2015 13:26:42 +0000 (14:26 +0100)]
Fix T42506 sequencer not limiting zoom.

Fix by Campbell thanks!

4 years agoRevert "Cleanup: Simplify camera sample motion blur code."
Thomas Dinges [Thu, 26 Feb 2015 12:27:02 +0000 (13:27 +0100)]
Revert "Cleanup: Simplify camera sample motion blur code."

This reverts commit 8197f0bb645f73f41071daaccf205a7583e695f5.

4 years agoWorkaround T43491: Python readline causes crash
Campbell Barton [Thu, 26 Feb 2015 11:50:29 +0000 (22:50 +1100)]
Workaround T43491: Python readline causes crash

loading 'readline' module could crash blender if 'libedit' was already linked (via LLVM).

Workaround the problem for now since we don't even need readline,
a _real_ fix likely involves changing how LLVM or Python are built.

4 years agoGrmll, sorry for the noise, fix stupi cpoypaste typo in previous commit.
Bastien Montagne [Thu, 26 Feb 2015 10:46:05 +0000 (11:46 +0100)]
Grmll, sorry for the noise, fix stupi cpoypaste typo in previous commit.

4 years agoAttempt to fix BGE build on windows.
Bastien Montagne [Thu, 26 Feb 2015 10:42:22 +0000 (11:42 +0100)]
Attempt to fix BGE build on windows.

Caused by rBb5b359b48f7f35a79b3eec, better to try a full build before pushing that type of commit. :/

4 years agoFix T43817: issue with non-utf8 encodings in Windows paths, again...
Bastien Montagne [Thu, 26 Feb 2015 10:21:21 +0000 (11:21 +0100)]
Fix T43817: issue with non-utf8 encodings in Windows paths, again...

We need to use 'W' widechar variants of win funcs and convert wchar to utf8-encoded bytes
in those cases, sigh...

Note: theoritical fix only, need org reporter to test it...

4 years agoFix potential buffer overflow in `BLI_strncpy_wchar_as_utf8()`.
Bastien Montagne [Thu, 26 Feb 2015 10:20:47 +0000 (11:20 +0100)]
Fix potential buffer overflow in `BLI_strncpy_wchar_as_utf8()`.

4 years agoCleanup: Simplify camera sample motion blur code.
Thomas Dinges [Thu, 26 Feb 2015 09:17:59 +0000 (10:17 +0100)]
Cleanup: Simplify camera sample motion blur code.

4 years agoFix T43643: Solidify crashes with 'only-rim'
Campbell Barton [Thu, 26 Feb 2015 07:44:45 +0000 (18:44 +1100)]
Fix T43643: Solidify crashes with 'only-rim'

When verts were shared by 2+ face-islands, the number of allocated edges was wrong.

Cleanup the logic for new verts/edges.

4 years agomesh_validate: don't add invalid edges into the hash
Campbell Barton [Thu, 26 Feb 2015 06:47:41 +0000 (17:47 +1100)]
mesh_validate: don't add invalid edges into the hash

4 years agoChange samples variable for SSAO - now it is actual samples, not squared
Antony Riakiotakis [Wed, 25 Feb 2015 22:30:50 +0000 (23:30 +0100)]
Change samples variable for SSAO - now it is actual samples, not squared
- spiral scheme is much more intuitive here. Also use float number for
spirals to avoid having samples on the same radial direction when sample
number is divisible by spiral number.

4 years agoUse spiral mapping for SSAO - it reduces banding a lot, especially in
Antony Riakiotakis [Wed, 25 Feb 2015 22:10:01 +0000 (23:10 +0100)]
Use spiral mapping for SSAO - it reduces banding a lot, especially in
higher sample counts. Probably a blurring pass might be a good addition
here as well.

4 years agoSSAO: sampling coordinates go out of screen, reject the sample
Antony Riakiotakis [Wed, 25 Feb 2015 21:05:03 +0000 (22:05 +0100)]
SSAO: sampling coordinates go out of screen, reject the sample

Previous behaviour would get occlusion at borders which could create
over occlusion at edges of the screen.

4 years agoMinor message fixes - thanks to S.J.Bennett for the heads up
Antony Riakiotakis [Wed, 25 Feb 2015 13:41:54 +0000 (14:41 +0100)]
Minor message fixes - thanks to S.J.Bennett for the heads up

4 years agoFix silly mistake with flags which would make stereo buffers unsupported
Antony Riakiotakis [Wed, 25 Feb 2015 13:15:07 +0000 (14:15 +0100)]
Fix silly mistake with flags which would make stereo buffers unsupported

4 years agoMake the message even more clear in case someone does not know what GPU
Antony Riakiotakis [Wed, 25 Feb 2015 13:09:40 +0000 (14:09 +0100)]
Make the message even more clear in case someone does not know what GPU
is

(we are talking about people who won't have installed a driver -
anything is possible)

4 years agoWarning messagebox for windows when an unsupported implementation of
Antony Riakiotakis [Wed, 25 Feb 2015 12:51:53 +0000 (13:51 +0100)]
Warning messagebox for windows when an unsupported implementation of
OpenGL is detected:

Hoping to decrease the frequency of by far one of the most frequent bug
reports by windows users.

There is some reorganization of the GHOST API to allow easy addition of
further OpenGL options in the future. The change is not propagated too
deep to keep the size of the patch managable. We might reorganize things
here later.

For OpenGL we do two checks here:
One is a combination of GDI generic renderer or vendor microsoft
corporation and OpenGL version 1.1. This means the system does not
use GPU acceleration at all. We warn user to install a graphics
driver and of cases where this might happen (remote connection, using
blender through virtual machine)

The other one just checks if OpenGL version is less than 1.4 (we can
easily change that in the future of course) and warns that it is
deprecated.

Both cases will still let blender startup correctly but users should now
have a clear idea of the system being unsupported.

A user preference flag is provided to turn the warning off.

Now stop posting those bug reports without installing a driver first -
please?

4 years agoerror in last commit
Campbell Barton [Wed, 25 Feb 2015 07:19:39 +0000 (18:19 +1100)]
error in last commit

4 years agoCMake: error making get_blender_version a function
Campbell Barton [Wed, 25 Feb 2015 07:15:54 +0000 (18:15 +1100)]
CMake: error making get_blender_version a function

Incorrect use of PARENT_SCOPE meant the vars would be used uninitialized elsewhere.

4 years agoFix T43798: Individual origins disabled object PET
Campbell Barton [Wed, 25 Feb 2015 02:39:01 +0000 (13:39 +1100)]
Fix T43798: Individual origins disabled object PET

4 years agoT43771: Fix
Jeroen Bakker [Tue, 24 Feb 2015 19:28:12 +0000 (20:28 +0100)]
T43771: Fix

There is a difference between the socket order of the BokehBlur node and
the BokehBlur operation. Socket[2] and Socket[3] have switched their
order.

4 years agoFix T43535 - weight paint issues
Antony Riakiotakis [Tue, 24 Feb 2015 19:12:21 +0000 (20:12 +0100)]
Fix T43535 - weight paint issues

Two issues in this report:

* Shift-F key conflict between painting and selecting mirrored bone
(moved select mirrored to ctrl-shift-F)
* It was possible to display texture overlay in weight painting, even
though the mode does not support textures yet.

4 years agoAdd Inset Faces to the mesh edit mode toolbar.
Jonathan Williamson [Tue, 24 Feb 2015 18:19:24 +0000 (12:19 -0600)]
Add Inset Faces to the mesh edit mode toolbar.

Inset has been missing from the toolbar for a long time, even though it's a fundamental mesh tool. It now lives, happily, alongside Extrude.

4 years agoCleanup leftover code from previous commit
Antony Riakiotakis [Tue, 24 Feb 2015 16:28:43 +0000 (17:28 +0100)]
Cleanup leftover code from previous commit

4 years agoFix T43785 crash with border select.
Antony Riakiotakis [Tue, 24 Feb 2015 16:19:07 +0000 (17:19 +0100)]
Fix T43785 crash with border select.

Naming here is slightly misleading. We have:

* Number of elements (objects) that can be picked
* Buffer size
* Number of integers in buffer.

Interestingly enough, bufsize in OpenGL (as far as I could find in
examples on the web) and in most of the code refers to the latter and
actual buffer size is only used whenever we do allocations on the heap.
Added an extra defines here to make things a bit clearer:

* MAXPICKELEMS refers to the number of objects that can be picked
* MAXPICKBUF   refers to the number of integers in the selection buffer

Also made all buffers use MAXPICKBUF where some used MAXPICKBUF * 4.
That means that some parts of blender will use less space for selection
now. MAXPICKBUF is set to 10000 for 2500 object selection, which can be
changed at any time, but I think 10000 integers on the stack touches the
borders of uglyland anyway.

4 years agoPatch D843 by Alexander Romanov, fixes to the naming of the material
Antony Riakiotakis [Tue, 24 Feb 2015 15:05:06 +0000 (16:05 +0100)]
Patch D843 by Alexander Romanov, fixes to the naming of the material
node so it's more similar to the names in the material properties

4 years agoFix T43792: Connect faces fails with ngons
Campbell Barton [Tue, 24 Feb 2015 13:04:13 +0000 (00:04 +1100)]
Fix T43792: Connect faces fails with ngons

Complex ngons that intersected the path multiple times would fail to connect.

Now find closest intersections in both directions.

4 years agoModifier: no need to calloc (immediately filled)
Campbell Barton [Tue, 24 Feb 2015 07:25:56 +0000 (18:25 +1100)]
Modifier: no need to calloc (immediately filled)

4 years agoFix T43743 R key not working after recent rake/random source
Antony Riakiotakis [Tue, 24 Feb 2015 10:56:26 +0000 (11:56 +0100)]
Fix T43743 R key not working after recent rake/random source
refactoring.

Use a new menu instead of old enum key.

4 years agoFix T43634: Selecting 'Drop Color' from spacebar menu causes instant close
Sergey Sharybin [Tue, 24 Feb 2015 09:38:08 +0000 (14:38 +0500)]
Fix T43634: Selecting 'Drop Color' from spacebar menu causes instant close

This is an internal operator, should not be invoked manually.

4 years agoRNA: correct enum flag callback
Campbell Barton [Tue, 24 Feb 2015 08:41:48 +0000 (19:41 +1100)]
RNA: correct enum flag callback

Was returning NULL, auto-completing:

    bpy.types.Material.bl_rna.properties["type"].

Would crash, accessing 'default_flag', thanks to @lukastoenne for investigating.

4 years agoFix T43783: Cycles clipping doesn't match viewport when camera is inside volume
Sergey Sharybin [Tue, 24 Feb 2015 08:06:29 +0000 (13:06 +0500)]
Fix T43783: Cycles clipping doesn't match viewport when camera is inside volume

Ray length adjustment got lost in some refactor commit back to 2.71 days.

4 years agoFix T43784: Compositing scale node border error
Sergey Sharybin [Tue, 24 Feb 2015 07:42:31 +0000 (12:42 +0500)]
Fix T43784: Compositing scale node border error

This was still the known issue with pixel center, original commit didn't cover all the
cases by the looks of it.

Should be all fine now, but much more intense testing is welcome.

4 years agoFix BKE_mesh_validate_arrays, ignored do_fixes
Campbell Barton [Tue, 24 Feb 2015 02:08:07 +0000 (13:08 +1100)]
Fix BKE_mesh_validate_arrays, ignored do_fixes

4 years agoCleanup: use bit-shift for bmesh_elem_check
Campbell Barton [Tue, 24 Feb 2015 02:04:00 +0000 (13:04 +1100)]
Cleanup: use bit-shift for bmesh_elem_check

4 years agoDisable Bake Jitter code (recently added)
Dalai Felinto [Mon, 23 Feb 2015 20:46:52 +0000 (17:46 -0300)]
Disable Bake Jitter code (recently added)

The following commits were supposed to add anti-alias and help with OSL
baking:

7b16fda3799d5b7167ef7ffe533d654810f44e36
1b92dfa96160f8151972d73337d5a927d8b89297

However they introduced other issues (artifacts mostly), see T43550 .
Leaving the code ifdef'ed for now.

4 years agoRNA: use 0/1 for pose layer operator
Campbell Barton [Mon, 23 Feb 2015 20:43:04 +0000 (07:43 +1100)]
RNA: use 0/1 for pose layer operator

4 years agoFix interpolation functions ignoring number of components when doing early output
Sergey Sharybin [Mon, 23 Feb 2015 19:36:33 +0000 (00:36 +0500)]
Fix interpolation functions ignoring number of components when doing early output

4 years agoGooseberry request:
Antony Riakiotakis [Mon, 23 Feb 2015 17:49:29 +0000 (18:49 +0100)]
Gooseberry request:

Show World will now influence if world is rendered in opengl rendering.

This is a little undefined according to blender history, since sky used
to always be drawn when offscreen rendering, as if "Only Render" was
ticked. Since if we don't draw sky in that case there's no valid color
really (and using theme colors is not so nice) we just draw transparent
background.

4 years agoMove allocation of imbuf from array to allocimbuf.
Antony Riakiotakis [Mon, 23 Feb 2015 16:19:06 +0000 (17:19 +0100)]
Move allocation of imbuf from array to allocimbuf.
Skip allocation of temporary imbuf

4 years agoCleanup: Simplify brick texture code a bit.
Thomas Dinges [Mon, 23 Feb 2015 15:49:17 +0000 (16:49 +0100)]
Cleanup: Simplify brick texture code a bit.

4 years agoRNA: use 1/0 for move layers operator
Dalai Felinto [Mon, 23 Feb 2015 15:17:28 +0000 (12:17 -0300)]
RNA: use 1/0 for move layers operator

internal api Consistency.

For the records, I suspect there are still a few cases of this. I found
this by chance (moving an object to a different layer), and I ran into
the previous one (fixed by Campbell) as well (by adding a cube).

Anyways, since it only happens when building with crash on asserts is
not a big issue. But by the time we change RNA to use bool instead of
int it would be nice to do a call for test to prevent those breaks.

4 years agoGPU module: get rid of gluscaleimage - game engine also uses that but
Antony Riakiotakis [Mon, 23 Feb 2015 15:33:18 +0000 (16:33 +0100)]
GPU module: get rid of gluscaleimage - game engine also uses that but
commit to remove from there will be done separately due to issues with
linking.

4 years agoAfter discussion on irc change new function to only allocate from a
Antony Riakiotakis [Mon, 23 Feb 2015 15:30:37 +0000 (16:30 +0100)]
After discussion on irc change new function to only allocate from a
buffer only. scaling can be done separately

4 years agoIMB library: Add function that scales an array of byte or float pixels.
Antony Riakiotakis [Mon, 23 Feb 2015 14:51:01 +0000 (15:51 +0100)]
IMB library: Add function that scales an array of byte or float pixels.

Function just wraps the array in an imbuf and does regular imbuf
scaling.

4 years agoFix compilation error after recent GPU debug changes
Sergey Sharybin [Mon, 23 Feb 2015 13:09:28 +0000 (18:09 +0500)]
Fix compilation error after recent GPU debug changes

4 years agoFix mismatch (missing 'const' to mactch funcs declarations).
Bastien Montagne [Mon, 23 Feb 2015 12:55:11 +0000 (13:55 +0100)]
Fix mismatch (missing 'const' to mactch funcs declarations).

Was breaking windows compile, reported by bdancer over IRC, thanks.

Also, quite some annoying 'unused vars' warnings (debug-only vars).

4 years agoDebug GPU functionality from soc-viewport_fx by Jason Wilkins
Antony Riakiotakis [Mon, 16 Feb 2015 20:19:12 +0000 (21:19 +0100)]
Debug GPU functionality from soc-viewport_fx by Jason Wilkins

patch number D706 with changes:

- WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging
system functions) but leaves the checks we had intact. Old patch
added the debug functionality only if we had the flag on to save some
performance.

Rationale here is that we might not want to recompile blender just to get
the extra information, and having users start blender with a -d flag to
get the extra information is also useful for bug reports. Those checks already
existed and most expensive ones are hidden behind a debug mode check
so performance should not be that bad.

- Did some cleanup of existing functionality:
When things go wrong blender side, just print the error,
don't check for GL errors first.

- Did not port changes needed for GLES to regular glew.h

- Got rid of duplicate or very similar new functionality.

Generally, code is more moving things around/cleanup and should work exactly
as before apart from the debug context, so it's safe to add even now.

It also provides a nice substitute function for glu error descriptions

4 years agoSnap to Active: missing armature/pose/mball/curve
Campbell Barton [Mon, 23 Feb 2015 12:05:54 +0000 (23:05 +1100)]
Snap to Active: missing armature/pose/mball/curve

de-duplicate active center calc between transform & snap-to-selected.

4 years agoFix T43774: Snap to Cursor ignores active pivot
Campbell Barton [Mon, 23 Feb 2015 11:24:48 +0000 (22:24 +1100)]
Fix T43774: Snap to Cursor ignores active pivot

4 years agoFix T43776: Rigging : Clear User transform is not working when mesh is in weight...
Bastien Montagne [Mon, 23 Feb 2015 11:23:13 +0000 (12:23 +0100)]
Fix T43776: Rigging : Clear User transform is not working when mesh is in weight paint mode.

Use same trick as for regular 'clear transform' operators to get a valid armature
in weight paint mode (where active object is weight-painted one).

4 years agoFix T43740: 'Back to Previous' failed on reload
Campbell Barton [Mon, 23 Feb 2015 10:33:14 +0000 (21:33 +1100)]
Fix T43740: 'Back to Previous' failed on reload

Would restore with the file-selector where the 'info' header should be.

4 years agoScreen: remove redundant NULL check in ED_area_prevspace
Campbell Barton [Mon, 23 Feb 2015 10:06:55 +0000 (21:06 +1100)]
Screen: remove redundant NULL check in ED_area_prevspace

4 years agoPartial fix for T43740
Campbell Barton [Mon, 23 Feb 2015 09:02:54 +0000 (20:02 +1100)]
Partial fix for T43740

ED_area_data_swap would put the screen in an invalid state and crash.
(SpaceLink.spacetype didn't match ScrArea.type)

However behavior is still odd in the instance of the report.

4 years agoFix T43769: Envmap Texture copy looses image
Campbell Barton [Mon, 23 Feb 2015 07:22:09 +0000 (18:22 +1100)]
Fix T43769: Envmap Texture copy looses image

4 years agoCustomData: const correctness
Campbell Barton [Mon, 23 Feb 2015 04:55:48 +0000 (15:55 +1100)]
CustomData: const correctness

4 years agoBLI_utildefines: correct comment
Campbell Barton [Mon, 23 Feb 2015 05:16:23 +0000 (16:16 +1100)]
BLI_utildefines: correct comment

4 years agoEdge/Vert Slide: avoid redundant loop angle calls
Campbell Barton [Mon, 23 Feb 2015 04:44:28 +0000 (15:44 +1100)]
Edge/Vert Slide: avoid redundant loop angle calls

No need to calculate loop angle for each layer

4 years agoError in last commit
Campbell Barton [Mon, 23 Feb 2015 04:40:43 +0000 (15:40 +1100)]
Error in last commit

Accidentally left in malloc/free

4 years agoFix error in recent vert/edge-slide commits
Campbell Barton [Mon, 23 Feb 2015 02:43:09 +0000 (13:43 +1100)]
Fix error in recent vert/edge-slide commits

`CustomData_bmesh_interp_n` was expecting the 'dest' arg not to have its offset applied.

This was a bit confusing since the source args have it applied,
and in some cases we only have the destination with the offset.

4 years agoCustomData: replace calloc -> malloc
Campbell Barton [Mon, 23 Feb 2015 02:55:33 +0000 (13:55 +1100)]
CustomData: replace calloc -> malloc

stack array is uninitialized, relying on calloc here would just hide bugs.

4 years agoCustomData: const correctness for interp()
Campbell Barton [Mon, 23 Feb 2015 02:51:55 +0000 (13:51 +1100)]
CustomData: const correctness for interp()

4 years agoBLI_utildefines: add pointer offset macro
Campbell Barton [Mon, 23 Feb 2015 02:50:12 +0000 (13:50 +1100)]
BLI_utildefines: add pointer offset macro

Handy since it keeps the type of the original.

4 years agoSubsurf: missing NULL checks on free
Campbell Barton [Sun, 22 Feb 2015 21:33:32 +0000 (08:33 +1100)]
Subsurf: missing NULL checks on free

4 years agoFix T43768: Pointcache end frame ignores preview range
Julian Eisel [Sun, 22 Feb 2015 16:14:19 +0000 (17:14 +0100)]
Fix T43768: Pointcache end frame ignores preview range

Fix for T43768

This way it works consistent with cloth, softbodys, etc.

Reviewers: lukastoenne

Differential Revision: https://developer.blender.org/D1134

4 years agoCycles: Make it survive if preview_cycles.blend uses persistent data
Sergey Sharybin [Sat, 21 Feb 2015 14:17:09 +0000 (19:17 +0500)]
Cycles: Make it survive if preview_cycles.blend uses persistent data

Currently should be no functional changes, but nice thing to have fixed
for some further experiments.

4 years agoFix T43748: MouseLook actuator raises an Assert error
Sybren A. Stüvel [Sat, 21 Feb 2015 13:39:04 +0000 (14:39 +0100)]
Fix T43748: MouseLook actuator raises an Assert error

An assertion seems to be inverted by mistake, as MT_assert(!m_mouse); is followed
by using m_mouse->XXXX.