blender.git
2 years agoBase list refcount with Bastien Montagne layers
Dalai Felinto [Thu, 24 Nov 2016 17:07:19 +0000 (18:07 +0100)]
Base list refcount with Bastien Montagne

2 years agoFix reading collection objects and small refactors here and there
Dalai Felinto [Thu, 24 Nov 2016 15:26:48 +0000 (16:26 +0100)]
Fix reading collection objects and small refactors here and there

2 years agocollections.objects.link()
Dalai Felinto [Thu, 24 Nov 2016 14:50:59 +0000 (15:50 +0100)]
collections.objects.link()

2 years agoUse BLI_genericNodeN
Dalai Felinto [Thu, 24 Nov 2016 10:38:18 +0000 (11:38 +0100)]
Use BLI_genericNodeN

2 years agoLayers doversion: use 1, 2, 3, ... for new collections
Dalai Felinto [Wed, 23 Nov 2016 18:10:42 +0000 (19:10 +0100)]
Layers doversion: use 1, 2, 3, ... for new collections

2 years agoRNA: layer.collections[2].objects
Dalai Felinto [Wed, 23 Nov 2016 18:09:29 +0000 (19:09 +0100)]
RNA: layer.collections[2].objects

This does not include objects from nested collections.
Missing bits: objects.link, objects.unlink

2 years agoFix mem leak for recursive collections and get layer.bases and objects
Dalai Felinto [Wed, 23 Nov 2016 16:44:28 +0000 (17:44 +0100)]
Fix mem leak for recursive collections and get layer.bases and objects
to work

(also some base util functions, and a refactor to unify the functions
for nested and non nested collections)

2 years agoCleanup: silence unused prop warning
Dalai Felinto [Wed, 23 Nov 2016 13:45:43 +0000 (14:45 +0100)]
Cleanup: silence unused prop warning

2 years agoFinish nested collections rna (recursions ftw)
Dalai Felinto [Wed, 23 Nov 2016 13:08:12 +0000 (14:08 +0100)]
Finish nested collections rna (recursions ftw)

2 years agoFix nested collection write/read
Dalai Felinto [Wed, 23 Nov 2016 11:27:30 +0000 (12:27 +0100)]
Fix nested collection write/read

2 years agoFix crash when dupli scene
Dalai Felinto [Wed, 23 Nov 2016 10:42:10 +0000 (11:42 +0100)]
Fix crash when dupli scene

2 years agoLayer collection nesting (DNA/RNA)
Dalai Felinto [Tue, 22 Nov 2016 16:24:48 +0000 (17:24 +0100)]
Layer collection nesting (DNA/RNA)

2 years agoLayer collection initial RNA
Dalai Felinto [Tue, 22 Nov 2016 14:26:09 +0000 (15:26 +0100)]
Layer collection initial RNA

new/remove/active

2 years agoBKE_scene_ layer/collection API touch ups
Dalai Felinto [Tue, 22 Nov 2016 14:20:56 +0000 (15:20 +0100)]
BKE_scene_ layer/collection API touch ups

2 years agoFix compiling with Cycles enabled
Julian Eisel [Tue, 22 Nov 2016 15:48:24 +0000 (16:48 +0100)]
Fix compiling with Cycles enabled

Brings back some code that was removed in 17beb573563c8a4 to avoid naming conflicts. Now did some renaming to avoid these.

2 years agoMerge branch 'blender2.8' into layers
Julian Eisel [Tue, 22 Nov 2016 13:52:47 +0000 (14:52 +0100)]
Merge branch 'blender2.8' into layers

2 years agoUse const for color array arguments
Julian Eisel [Tue, 22 Nov 2016 13:51:34 +0000 (14:51 +0100)]
Use const for color array arguments

2 years agoFix missing conversion of uchar color to float
Julian Eisel [Tue, 22 Nov 2016 13:40:57 +0000 (14:40 +0100)]
Fix missing conversion of uchar color to float

Decided to just pass float [4] args, so no type conversion is needed at all.

2 years agoUse enum instead of preprocessor defines
Julian Eisel [Tue, 22 Nov 2016 13:23:52 +0000 (14:23 +0100)]
Use enum instead of preprocessor defines

2 years agoAdd/use DNA_DEPRECATED_LAYERS
Julian Eisel [Tue, 22 Nov 2016 13:04:23 +0000 (14:04 +0100)]
Add/use DNA_DEPRECATED_LAYERS

Using DNA_DEPRECATED resulted in thousands of warnings, so rather not use this. These warnings can still be handy though to check for usage of deprecated struct members as we go, so this quick way to toggle them could be handy. Note that this should eventually be replaced by DNA_DEPRECATED once stuff is actually deprecated.

2 years agoInitial RNA for scene layers
Dalai Felinto [Tue, 22 Nov 2016 12:02:58 +0000 (13:02 +0100)]
Initial RNA for scene layers

Next will be the collections, and then the other missing props of rna_def_scene_layer

Note: it would be nice to have a way to tag rna properties asa
deprecated. For example, scene.engine can still be valid (and mapped to
scene.layers.active.engine), but it would be nice to indicate the addon
writers of the new API.

2 years agoFixup for versioning: name initial layer ... "Layer"
Dalai Felinto [Tue, 22 Nov 2016 11:32:21 +0000 (12:32 +0100)]
Fixup for versioning: name initial layer ... "Layer"

2 years agoLayers - initial commit
Dalai Felinto [Mon, 21 Nov 2016 19:10:16 +0000 (20:10 +0100)]
Layers - initial commit

This is mostly DNA + doversion and some util functions.
I need to look at the layer-manager branch to see how
Julian Eisel (Severin) managed to handle nested lists
(required for collections).

Also, since I think doversioning may get more complex as the project
evolves, I started the vesioning_280.c file.

And the changes in readfile.c were so that I could include into the
versioning_280.c file only the DNA_* that were really needed.

(if someone feels like doing a cleanup, I'm sure the other
versioning_*.c files could use the same treatment)

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Sat, 19 Nov 2016 15:28:39 +0000 (16:28 +0100)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/blenloader/intern/versioning_270.c
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/editors/space_view3d/drawobject.c

2 years agobgl do not bind parts of OpenGL that are not exposed in core profiles
Martijn Berger [Sat, 19 Nov 2016 14:07:01 +0000 (15:07 +0100)]
bgl do not bind parts of OpenGL that are not exposed in core profiles

2 years agoFix T49991: reloading librairies doesn't update node groups.
Bastien Montagne [Sat, 19 Nov 2016 11:20:29 +0000 (12:20 +0100)]
Fix T49991: reloading librairies doesn't update node groups.

We need to check node tree links are still valid, after we remapped
some NodeGroup.

Note: In fact, we have to run that for *all* ID types, since nodes may
use any kind of data-block (in theory)... :/

2 years agoFix NodeGroup generic verify function crashing if node's ID pointer is NULL.
Bastien Montagne [Sat, 19 Nov 2016 11:18:32 +0000 (12:18 +0100)]
Fix NodeGroup generic verify function crashing if node's ID pointer is NULL.

Another nice crasher - in this case, we just want to nuke all sockets...

Related to T49991.

2 years agoFix (unreported) nodeRemoveAllSockets() not clearing inputs/outputs sockets lists.
Bastien Montagne [Sat, 19 Nov 2016 11:16:14 +0000 (12:16 +0100)]
Fix (unreported) nodeRemoveAllSockets() not clearing inputs/outputs sockets lists.

Nice crasher (though seems to not be much used so far)!

Related to T49991.

2 years agoFix forward-compat Nodes write code being executed also for undo steps writing.
Bastien Montagne [Fri, 18 Nov 2016 21:41:56 +0000 (22:41 +0100)]
Fix forward-compat Nodes write code being executed also for undo steps writing.

Forward compatibility code should never, ever be run during undo saving.

Note: related to T49991 (but does not fix it either, crash now happens
when doing a real file save...).

2 years agoFix Node space ID remap callback not handling node trees.
Bastien Montagne [Fri, 18 Nov 2016 21:36:52 +0000 (22:36 +0100)]
Fix Node space ID remap callback not handling node trees.

Yep. Kinda ridiculous, but forgot to handle the very node trees
data-blocks in that editor!

Related (but not fixing) to T49991.

2 years agoFix T50071: Radience HDR fomat does not support alpha at all.
Bastien Montagne [Fri, 18 Nov 2016 21:34:04 +0000 (22:34 +0100)]
Fix T50071: Radience HDR fomat does not support alpha at all.

2 years agoFix UV layer bug in object_utils.object_data_add()
Campbell Barton [Fri, 18 Nov 2016 19:57:55 +0000 (06:57 +1100)]
Fix UV layer bug in object_utils.object_data_add()

Adding a torus in edit-mode, with 'Generate UVs'
for example would either create another UV layer with the default name or
switch to the default UV layer name if it exists.

Now use the existing UV layer if present.

2 years agoAdd Torus: avoid excessive attr access
Campbell Barton [Fri, 18 Nov 2016 19:57:13 +0000 (06:57 +1100)]
Add Torus: avoid excessive attr access

2 years agoBMesh: invalid return from BM_mesh_validate
Campbell Barton [Fri, 18 Nov 2016 19:26:25 +0000 (06:26 +1100)]
BMesh: invalid return from BM_mesh_validate

Returned value was always false, even for valid meshes,
note that this is a debug-only function.

Also set internal-tag cleared.

2 years agoMinor debug-report tweak to autosave code.
Bastien Montagne [Fri, 18 Nov 2016 17:46:10 +0000 (18:46 +0100)]
Minor debug-report tweak to autosave code.

Print in cosole a warning when we skip autosave due to runnning modal op.

Related to T49974.

2 years agoCycles: Different noise seed for stereoscopic rendering (Fix #T50024)
Dalai Felinto [Fri, 18 Nov 2016 17:23:45 +0000 (18:23 +0100)]
Cycles: Different noise seed for stereoscopic rendering (Fix #T50024)

Patch by Sergey Sharybin.

2 years agoDepsgraph: Fix residue of debug-only code
Sergey Sharybin [Fri, 18 Nov 2016 16:47:17 +0000 (17:47 +0100)]
Depsgraph: Fix residue of debug-only code

2 years agoconvert icon_draw_texture to gawain imm mode replacements
Martijn Berger [Fri, 18 Nov 2016 15:04:25 +0000 (16:04 +0100)]
convert icon_draw_texture to gawain imm mode replacements

2 years agoFix T50035: Minor interface bug: UV/ImageEditor - Paint Mode - Fill Brush
Bastien Montagne [Fri, 18 Nov 2016 14:49:41 +0000 (15:49 +0100)]
Fix T50035: Minor interface bug: UV/ImageEditor - Paint Mode - Fill Brush

Patch by @LucaRood, added some cleanup of DRAW/FILL conditions in this
code too...

2 years agoFix (unreported) bad handling of brush's fill threshold value.
Bastien Montagne [Fri, 18 Nov 2016 14:32:50 +0000 (15:32 +0100)]
Fix (unreported) bad handling of brush's fill threshold value.

'1' threshold value would only allow to access a third of the basic
'color space' (from black to white, from 0.0 to 1.0 component values),
when you expect it to access the whole range.

Unfortunately, this needs a subversion bump to allow already defined
brushes to keep exact same behavior!

Also, did not change default value (0.2) for new brushes, think here
keeping current one makes more sense.

Thanks to @LucaRood for confirming the issue.

2 years agoFix T50052: bpy.utils.unregister_module doesn't unregister classes of submodules...
Bastien Montagne [Fri, 18 Nov 2016 14:14:22 +0000 (15:14 +0100)]
Fix T50052: bpy.utils.unregister_module doesn't unregister classes of submodules in reload scenario.

reload case would clear TypeMap before unregistering addons, which made
all calls to unregister_module() to do absolutely nothing.

2 years agoFix T50063: Editing driver's expression eliminates "Zero" number
Julian Eisel [Fri, 18 Nov 2016 12:37:04 +0000 (13:37 +0100)]
Fix T50063: Editing driver's expression eliminates "Zero" number

Disables trimming of trailing zeros in case button contains an expression.

2 years agoImplement multi-view stereo support for image empties
Dalai Felinto [Fri, 18 Nov 2016 11:37:39 +0000 (12:37 +0100)]
Implement multi-view stereo support for image empties

Empty images were implemented to expand (and eventually replace)
the background images functionalities. If we are ever to drop
background images "image empties" should support stereo/multi-view as well.

2 years agoFix potential NULL dereference in mesh sequence cache modifier.
Bastien Montagne [Fri, 18 Nov 2016 11:03:12 +0000 (12:03 +0100)]
Fix potential NULL dereference in mesh sequence cache modifier.

Reported by coverity.

2 years agoFix copy/paste typo in new depsgraph object geometry builder (found by coverity).
Bastien Montagne [Fri, 18 Nov 2016 10:55:28 +0000 (11:55 +0100)]
Fix copy/paste typo in new depsgraph object geometry builder (found by coverity).

2 years agofix problem from D2360
Mike Erwin [Fri, 18 Nov 2016 05:40:40 +0000 (00:40 -0500)]
fix problem from D2360

I was too eager to get patch in after a last-minute change. My bad!

2 years agoMoved UI_view2d_grid_draw() to immediate functions
Benjamin N. Summerton [Fri, 18 Nov 2016 03:45:51 +0000 (22:45 -0500)]
Moved UI_view2d_grid_draw() to immediate functions

Part of T49043

Reviewers: krash, merwin

Reviewed By: krash, merwin

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

2 years agoOpenGL: textview port to immediate mode -> T49043
Mike Erwin [Fri, 18 Nov 2016 03:02:12 +0000 (22:02 -0500)]
OpenGL: textview port to immediate mode -> T49043

Updated the GL calls to the new immediate mode.
I left some glcolor calls which I'm not sure wether thats right?
Part of T49043

warm regards,
Sebastian Witt

Reviewers: merwin

Reviewed By: merwin

Tags: #bf_blender_2.8

Maniphest Tasks: T49043

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

2 years agouse new enum types in glutil & imm_util
Mike Erwin [Thu, 17 Nov 2016 21:10:53 +0000 (16:10 -0500)]
use new enum types in glutil & imm_util

2 years agodelete deprecated fdrawXORcirc function
Mike Erwin [Thu, 17 Nov 2016 20:03:55 +0000 (15:03 -0500)]
delete deprecated fdrawXORcirc function

Only one place used it, and that place was dead code already.

2 years agomark certain glutil functions as deprecated
Mike Erwin [Thu, 17 Nov 2016 19:43:58 +0000 (14:43 -0500)]
mark certain glutil functions as deprecated

These will be removed before we ship 2.8

2 years agoBMesh: avoid using temp array for face-area
Campbell Barton [Thu, 17 Nov 2016 18:55:37 +0000 (05:55 +1100)]
BMesh: avoid using temp array for face-area

2 years agoBMesh: minor cleanup
Campbell Barton [Tue, 15 Nov 2016 16:22:49 +0000 (03:22 +1100)]
BMesh: minor cleanup

Comment & don't use dummy pointer.

2 years agoCleanup: redundant index loop for monkey-create
Campbell Barton [Thu, 17 Nov 2016 19:08:51 +0000 (06:08 +1100)]
Cleanup: redundant index loop for monkey-create

Also rename face vars (the faces aren't temp),
and quiet old-style-definition warning.

2 years agoDepsgrpah: Fix missing animation update in movie clips
Sergey Sharybin [Thu, 17 Nov 2016 15:37:25 +0000 (16:37 +0100)]
Depsgrpah: Fix missing animation update in movie clips

2 years agoDepsgraph: Move scene builder function to own file
Sergey Sharybin [Thu, 17 Nov 2016 14:38:03 +0000 (15:38 +0100)]
Depsgraph: Move scene builder function to own file

This way it's much easier to grasp what the graph actually contains.

2 years agoFix T50060: New depsgraph does not update mask animation
Sergey Sharybin [Thu, 17 Nov 2016 14:29:22 +0000 (15:29 +0100)]
Fix T50060: New depsgraph does not update mask animation

2 years agoDepsgraph: Use utility macro to iterate over linked list
Sergey Sharybin [Thu, 17 Nov 2016 14:11:55 +0000 (15:11 +0100)]
Depsgraph: Use utility macro to iterate over linked list

This will be compiled into same exact code, just saves us from
doing annoying type casts all over the place.

2 years agoDepsgraph: Move rig builder functions to own files
Sergey Sharybin [Thu, 17 Nov 2016 13:34:46 +0000 (14:34 +0100)]
Depsgraph: Move rig builder functions to own files

Those routines are rather big and started to be annoying to have
one big file.

Should be no functional changes.

2 years ago[MSVC] Preliminary VS2017 support.
lazydodo [Thu, 17 Nov 2016 03:13:58 +0000 (20:13 -0700)]
[MSVC] Preliminary VS2017 support.

2 years agoFix T50001: auto tile size addon broken after Cycles GPU device changes.
Brecht Van Lommel [Thu, 17 Nov 2016 01:16:21 +0000 (02:16 +0100)]
Fix T50001: auto tile size addon broken after Cycles GPU device changes.

Adds a get_num_gpu_devices() utility function for the addon to use.

2 years agoGawain: small note for future Vulkan work
Mike Erwin [Wed, 16 Nov 2016 23:25:11 +0000 (18:25 -0500)]
Gawain: small note for future Vulkan work

2 years agoConvert console_draw.c to Gawain
Martijn Berger [Wed, 16 Nov 2016 21:56:39 +0000 (22:56 +0100)]
Convert console_draw.c to Gawain

Reviewers: merwin

Reviewed By: merwin

Tags: #bf_blender_2.8

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

2 years agoGawain: use PRIM_ and INDEX_ enums instead of GLenum
Mike Erwin [Wed, 16 Nov 2016 21:03:15 +0000 (16:03 -0500)]
Gawain: use PRIM_ and INDEX_ enums instead of GLenum

For a few reasons:
- separate enum sets for separate concepts
- debug with symbolic names instead of 0x4e72
- prepare for a Vulkan future

2 years agoFix T50051: Avoid crash when render grease pencil from VSE
Antonioya [Wed, 16 Nov 2016 20:33:47 +0000 (21:33 +0100)]
Fix T50051: Avoid crash when render grease pencil from VSE

The renderpasses for grease pencil are not necessary when render from
sequencer.

This fix solves the GPF but we need to rethink the complete render
process for grease pencil and integrate better in the render and
composition workflow.

Thanks to Dalai Felinto por helping in the debug and fixing of the
problem.

2 years agoGawain: use COMP_ instead of GL_ internally
Mike Erwin [Wed, 16 Nov 2016 20:18:06 +0000 (15:18 -0500)]
Gawain: use COMP_ instead of GL_ internally

Because GLenum could be ANYTHING. We use our own enum type for components.

2 years agoGawain: re-enable strict error checking in release builds
Mike Erwin [Wed, 16 Nov 2016 17:14:55 +0000 (12:14 -0500)]
Gawain: re-enable strict error checking in release builds

Makes it easier for new volunteers to catch errors early.

2 years agoBlender 2.8: Added immVertex2s() and immAttrib2s()
Mike Erwin [Wed, 16 Nov 2016 16:52:02 +0000 (11:52 -0500)]
Blender 2.8: Added immVertex2s() and immAttrib2s()

Just as mentioned in title. Need new functions for calls found in `transform.c`

T49043

Reviewers: merwin

Tags: #bf_blender_2.8

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

2 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Wed, 16 Nov 2016 16:01:19 +0000 (17:01 +0100)]
Merge remote-tracking branch 'origin/master' into blender2.8

2 years agoCycles: Fix different noise pattern from fix in T49838:
Sergey Sharybin [Wed, 16 Nov 2016 14:12:31 +0000 (15:12 +0100)]
Cycles: Fix different noise pattern from fix in T49838:

No need to hash subframe == 0.

2 years agoFix T50046: Segmentation fault due to out-of-range VertexGroup.weight() call.
Bastien Montagne [Wed, 16 Nov 2016 11:38:57 +0000 (12:38 +0100)]
Fix T50046: Segmentation fault due to out-of-range VertexGroup.weight() call.

`get_vert_def_nr()` was not checking vert index in bmesh case (aka Edit mode).

2 years agoRemove unused vector icons
Martijn Berger [Wed, 16 Nov 2016 09:03:11 +0000 (10:03 +0100)]
Remove unused vector icons

it seems to me the icons are unused:

  - VICO_VIEW3D_VEC
  - VICO_EDIT_VEC
  - VICO_EDITMODE_VEC_DEHLT
  - VICO_EDITMODE_VEC_HLT
  - VICO_DISCLOSURE_TRI_RIGHT_VEC
  - VICO_DISCLOSURE_TRI_DOWN_VEC
  - VICO_MOVE_UP_VEC
  - VICO_MOVE_DOWN_VEC
  - VICO_X_VEC

Since their code contains immediate mode GL calls and they seem to be unused i thought we could remove them.

Reviewers: mont29

Reviewed By: mont29

Subscribers: merwin

Tags: #bf_blender_2.8

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

2 years agoPart of T49043: Convert drawsimdebug.c to use the new Gawain API.
Lukas Tönne [Wed, 16 Nov 2016 11:18:12 +0000 (12:18 +0100)]
Part of T49043: Convert drawsimdebug.c to use the new Gawain API.

This conversion is pretty straightforward.

The code for debug drawing is not great, but it does the job.
Rewriting it is for another day, if it becomes more widely used.

2 years agoAdd stdlib.h include to fix missing 'abort' prototype.
Lukas Tönne [Wed, 16 Nov 2016 10:31:35 +0000 (11:31 +0100)]
Add stdlib.h include to fix missing 'abort' prototype.

2 years agoFix custom props not being handled correctly by manual/pyref UI menu entries.
Bastien Montagne [Wed, 16 Nov 2016 10:07:07 +0000 (11:07 +0100)]
Fix custom props not being handled correctly by manual/pyref UI menu entries.

2 years agoDisable possibility to flip bone names of linked armatures
Sergey Sharybin [Wed, 16 Nov 2016 09:39:41 +0000 (10:39 +0100)]
Disable possibility to flip bone names of linked armatures

Linked data should not be modified in such a way.

Reported by Nathan here in the studio, reviewed by Bastien, thanks!

2 years agoCleanup: Remove unused function
Sergey Sharybin [Wed, 16 Nov 2016 09:09:43 +0000 (10:09 +0100)]
Cleanup: Remove unused function

2 years agoBlender2.8 convert UI_view2d_constant_grid_draw to new immediate mode
Mike Erwin [Tue, 15 Nov 2016 23:56:52 +0000 (18:56 -0500)]
Blender2.8 convert UI_view2d_constant_grid_draw to new immediate mode

Convert UI_view2d_constant_grid_draw to new immediate mode.

Part of T49043.

Reviewers: merwin

Reviewed By: merwin

Tags: #bf_blender_2.8

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

2 years agoUse new immediate mode for ED_region_grid_draw
Mike Erwin [Tue, 15 Nov 2016 23:28:37 +0000 (18:28 -0500)]
Use new immediate mode for ED_region_grid_draw

Convert ED_region_grid_draw to new immediate mode.

Part of T49043

Reviewers: merwin

Reviewed By: merwin

Tags: #bf_blender_2.8

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

2 years agoFix T50026: "Only Insert Needed" doesn't work when using Trackball rotation
Joshua Leung [Tue, 15 Nov 2016 22:14:38 +0000 (11:14 +1300)]
Fix T50026: "Only Insert Needed" doesn't work when using Trackball rotation

The rotation case here only covered rotation by the "Rotate" tool, but skipped
the "Trackball" tool.

2 years agoFix T50023: Inverse Kinematics angle limits defaulting to 10313.2403124°
Joshua Leung [Tue, 15 Nov 2016 22:09:02 +0000 (11:09 +1300)]
Fix T50023: Inverse Kinematics angle limits defaulting to 10313.2403124°

Regression from 2.77a. The units for the min/max limits were changed in RNA
but the pose channels were still being initialised with in degrees.

2 years agoFIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data...
lazydodo [Tue, 15 Nov 2016 20:21:01 +0000 (13:21 -0700)]
FIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data types , to force aligned on 16 byte boundaries.

2 years agoblender 2.8: OpenGL immediate mode: anim_draw
Mike Erwin [Tue, 15 Nov 2016 17:16:47 +0000 (12:16 -0500)]
blender 2.8: OpenGL immediate mode: anim_draw

Reviewers: merwin

Reviewed By: merwin

Maniphest Tasks: T49043

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

2 years agostart using COMP_* instead of GL_* in viewport
Mike Erwin [Tue, 15 Nov 2016 16:49:00 +0000 (11:49 -0500)]
start using COMP_* instead of GL_* in viewport

Gawain can accept either enum, but its own COMP_ values are recommended.

2 years agoRNA Main API: set remove's do_unlink default value to true.
Bastien Montagne [Tue, 15 Nov 2016 16:12:18 +0000 (17:12 +0100)]
RNA Main API: set remove's do_unlink default value to true.

On second and third thoughts, this should have been done that way since
the begining, cases were you just delete a few data-blocks without any
serious knowledge of their usages are much, much more frequent than
cases where you are deleting thousands of data-blocks and are sure they
are not used anywhere anymore...

Own fault, but really frustrated that this topic was only raised the day
after 2.78a was released. :(

2 years agoGet rid of 'drivers unlinking' code in `BKE_libblock_free_data()`
Bastien Montagne [Tue, 15 Nov 2016 15:36:47 +0000 (16:36 +0100)]
Get rid of 'drivers unlinking' code in `BKE_libblock_free_data()`

This has nothing to do here (freeing is not unlinking/remapping!), and
was actually redoing something already taken care of by
`BKE_libblock_relink_ex()` call in `BKE_libblock_free_ex()`.

Also, gives some noticeable speedup when removing datablocks with
do_unlink=True, about 5 to 10% quicker e.g. when deleting all objects
from a py console, in a big production file...

2 years agoDepsgraph: Fix frash with iTaSC solver
Sergey Sharybin [Tue, 15 Nov 2016 15:18:59 +0000 (16:18 +0100)]
Depsgraph: Fix frash with iTaSC solver

This commit reverts part of a fix for T33275, but things are:

- I can not reproduce the original issue at all, so doesn't seem to
  cause any regressions.

- It is really bad idea to do delayed initialization in the threaded
  environment, it's a straight way to some nasty issues.

- We can't do things like this anyway because we go more granular,
  meaning such a delayed initialization will fail in the case of
  having several IK solvers (unless they properly accommodate to
  changed bone head).

- Verified the fix with various files from Mango project and all of
  them seems to work nice with new depednency graph now (old depsgraph
  has some flickering, but it's not related on DEG itself, but on
  an environment with lots of proxies and threaded evaluation and it
  is not a new behavior).

2 years agoRevert "Proxy: Construct pchan hash when syncing armature proxy"
Sergey Sharybin [Tue, 15 Nov 2016 15:13:24 +0000 (16:13 +0100)]
Revert "Proxy: Construct pchan hash when syncing armature proxy"

This reverts commit 9b5a32cbfb8a8565202bdccd232c53f98b62eeec.

Apparently it is possible to have other thread mocking around with the hash.

Needs deeper investigation, for the time being reverting to prevent crashes.

2 years agoFix menu inconsistencies
Aaron Carlisle [Tue, 15 Nov 2016 14:55:54 +0000 (15:55 +0100)]
Fix menu inconsistencies

This commit fixes two issues:

- UV/Image editor uvs menu did not match the 3D View's which was changed in rB2b240b043078
- Circle select tool was missing in particle edit mode

Reviewers: Severin
Differential Revision: https://developer.blender.org/D2329

2 years agoCleanup: More explicit parentheses
Sergey Sharybin [Tue, 15 Nov 2016 15:01:21 +0000 (16:01 +0100)]
Cleanup: More explicit parentheses

2 years agoAvoid interface ID remapping when freeing the whole database
Sergey Sharybin [Tue, 15 Nov 2016 14:46:52 +0000 (15:46 +0100)]
Avoid interface ID remapping when freeing the whole database

This makes heavy scenes to be freed almost instantly (so now
quadbot scene takes only 0.06sec to free),

2 years agoAvoid driver target remapping when freeing the whole database
Sergey Sharybin [Tue, 15 Nov 2016 14:38:03 +0000 (15:38 +0100)]
Avoid driver target remapping when freeing the whole database

Added BKE_libblock_free_data_ex() which takes special do_id_user
argument which basically indicates whether main database was already
taken care about not having "dead" pointers.

Gives about 40% speedup of main database free with quadbot scene
(3.4sec vs. 5.4 sec on quite powerful desktop).

2 years agoFix T50022: "Mirror" in Dopesheet Crashes Blender
Julian Eisel [Tue, 15 Nov 2016 14:27:22 +0000 (15:27 +0100)]
Fix T50022: "Mirror" in Dopesheet Crashes Blender

Just fixing crash itself. Actually operator shouldn't run in most editors (not in dopesheet either I guess), but don't want to spend time on that right now.

2 years agoImplement grouped undo option for operators
Dalai Felinto [Tue, 15 Nov 2016 10:50:11 +0000 (11:50 +0100)]
Implement grouped undo option for operators

This option makes an operator to not push a task to the undo stack if the previous stored elemen is the same operator or part of the same undo group.

The main usage is for animation, so you can change frames to inspect the
poses, and revert the previous pose without having to roll back tons of
"change frame" operator, or even see the undo stack full.

This complements rB13ee9b8e
Design with help by Sergey Sharybin.

Reviewers: sergey, mont29

Reviewed By: mont29, sergey

Subscribers: pyc0d3r, hjalti, Severin, lowercase, brecht, monio, aligorith, hadrien, jbakker

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

2 years agoDepsgraph: Fix typo in previous optimization commit
Sergey Sharybin [Tue, 15 Nov 2016 10:30:21 +0000 (11:30 +0100)]
Depsgraph: Fix typo in previous optimization commit

Was a residue from another experiment, caused infinite loop when
reporting dependency cycles.

2 years agoAtomics: Add some extra utility functions
Sergey Sharybin [Tue, 15 Nov 2016 12:41:08 +0000 (13:41 +0100)]
Atomics: Add some extra utility functions

Also fixed semantic of fetch-and-add in assembler implementation,
it seemed to not match the naming.

2 years agoAtomics: Make naming more obvious about which value is being returned
Sergey Sharybin [Tue, 15 Nov 2016 11:16:26 +0000 (12:16 +0100)]
Atomics: Make naming more obvious about which value is being returned

2 years agoblender 2.8: OpenGL immediate mode: action_draw
Mike Erwin [Tue, 15 Nov 2016 03:54:56 +0000 (22:54 -0500)]
blender 2.8: OpenGL immediate mode: action_draw

Updated action_draw to use imm mode.

Reviewers: merwin

Subscribers: LazyDodo

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

2 years agoBMesh: remove redundant link-list manipulation
Campbell Barton [Tue, 15 Nov 2016 01:39:33 +0000 (12:39 +1100)]
BMesh: remove redundant link-list manipulation

No need to track previous edge in vert-separate cleanup

2 years agoblender 2.8: Opengl: UI_draw_roundbox
Mike Erwin [Tue, 15 Nov 2016 01:04:59 +0000 (20:04 -0500)]
blender 2.8: Opengl: UI_draw_roundbox

all is in the title too..

Reviewers: merwin

Reviewed By: merwin

Subscribers: Blendify, Severin

Tags: #bf_blender_2.8, #opengl_gfx

Maniphest Tasks: T49043

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