be57cf9b2a
Cleanup: remove moar G.main from BKE area.
2018-06-12 12:53:27 +02:00
160cb9a284
Merge branch 'master' into blender2.8
...
Conflicts:
intern/cycles/blender/blender_object.cpp
source/blender/alembic/intern/abc_exporter.cc
source/blender/alembic/intern/abc_mball.cc
source/blender/alembic/intern/abc_mball.h
source/blender/blenkernel/BKE_anim.h
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/BKE_group.h
source/blender/blenkernel/BKE_mball.h
source/blender/blenkernel/BKE_mball_tessellate.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mball_tessellate.c
source/blender/blenkernel/intern/mesh_convert.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_dupli.c
source/blender/blenkernel/intern/object_update.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/smoke.c
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/editors/include/ED_object.h
source/blender/editors/object/object_add.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_snap_object.c
source/blender/editors/util/ed_util.c
source/blender/gpu/intern/gpu_material.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-11 14:39:38 +02:00
8055ed2741
Cleanup: remove some G.main usages...
2018-06-11 12:15:14 +02:00
94aa4d1657
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/intern/sequencer.c
source/blender/editors/curve/editcurve_paint.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/gpencil/gpencil_utils.c
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/interface/interface_eyedropper_depth.c
source/blender/editors/render/render_opengl.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_utils.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_snap.c
source/blender/python/intern/gpu_offscreen.c
source/blender/windowmanager/intern/wm_files.c
2018-06-08 14:38:57 +02:00
7b6af843c2
Cleanup: getting rid of G.main.
...
Sometimes one needs a *lot* of changes for a single G.main... :/
2018-06-08 12:17:22 +02:00
54f9cd5283
Cleanup: Nuke moar G.main usages...
2018-06-07 11:11:46 +02:00
bb7202495a
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/ArmatureExporter.h
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentExporter.h
source/blender/collada/SceneExporter.cpp
source/blender/collada/SceneExporter.h
source/blender/collada/collada.cpp
source/blender/collada/collada.h
source/blender/editors/armature/armature_edit.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_screen.h
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_transform.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-06 16:25:28 +02:00
48e871ab1d
Cleanup: Nuke moar G.main usages...
2018-06-06 15:50:24 +02:00
bfe1d0e0dc
Merge branch 'master' into blender2.8
2018-06-01 18:26:42 +02:00
75fc1c3507
Cleanup: trailing whitespace (comment blocks)
...
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-06-01 18:19:39 +02:00
e44743736f
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_edit.c
source/blender/editors/render/render_internal.c
source/blender/makesrna/intern/rna_object_api.c
source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-01 17:26:36 +02:00
051e186d5c
Cleanup: some more G.main removal from editor code.
2018-06-01 17:08:38 +02:00
9b4e56c091
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/blenkernel/BKE_camera.h
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/smoke.c
source/blender/editors/object/object_transform.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blenderplayer/bad_level_call_stubs/stubs.c
2018-05-31 12:57:24 +02:00
28369f725c
Cleanup: remove G.main from BKE object
...
Had to add some G.main to modifiers, but in 2.8 we do not need that
anymore, so it's not that bad! ;)
2018-05-31 12:27:47 +02:00
38957c1838
Object Modes: stay in object mode when setting active
...
When activating an object from the 3D view or outliner,
keep the newly selected object in object mode.
2018-05-30 15:33:05 +02:00
5954a5c465
Object Modes: pose support for generic mode exit
2018-05-30 15:33:05 +02:00
cb22caa8c7
Merge branch 'master' into blender2.8
2018-05-30 08:49:34 +02:00
18c12803bd
Edit Mode: add success return value
...
Also remove fix for T6614, since BKE_object_obdata_is_libdata
no longer checks proxy.
2018-05-30 08:41:06 +02:00
f1bc899146
Merge branch 'master' into blender2.8
2018-05-15 10:25:49 +02:00
9636cab009
Undo System: remove nested edit-mode undo calls
...
Regression in recent undo system changes,
This caused T55048.
When each mode had its own undo stack it was important
to initialize it when entering edit-mode.
2018-05-15 10:10:48 +02:00
a3e74acd9e
Merge branch 'master' into blender2.8
2018-05-06 18:35:39 +02:00
046904e3fc
Cleanup: split rotation_from_view
...
Add a function that takes only a quat, instead of the 3D view.
Allows for using non-view orientations.
2018-05-06 18:32:18 +02:00
34ab90f546
Depsgraph: remove EvaluationContext, pass Depsgraph instead.
...
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
2018-04-16 19:55:33 +02:00
bfc9d426bb
Multi-Object Editing
...
This adds initial multi-object editing support.
- Selected objects are used when entering edit & pose modes.
- Selection & tools work on all objects however many tools need porting
See: T54641 for remaining tasks.
Indentation will be done separately.
See patch: D3101
2018-04-16 17:56:50 +02:00
1b78f05b1c
Merge branch 'master' into blender2.8
2018-04-10 20:17:56 +02:00
f55adabb3e
Cleanup: remove unused flag
2018-04-10 20:13:31 +02:00
1c24c04e60
Remove workspace object mode, reverts changes w/ 2.8
...
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
2018-04-05 18:21:14 +02:00
b65ea517eb
Merge branch 'master' into blender2.8
...
- Undo that changes modes currently asserts,
since undo is now screen data.
Most likely we will change how object mode and workspaces work
since it's not practical/maintainable at the moment.
- Removed view_layer from particle settings
(wasn't needed and complicated undo).
2018-04-01 11:03:25 +02:00
651b8fb14e
Undo: unified undo system w/ linear history
...
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
undo data is restored.
- Some undo types accumulate changes (image & text editing)
others store the state multiple times (with de-duplication).
This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
manage restoring correct ID's.
Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
Previously this wasn't done, making history fail in some cases.
This can be optimized to skip some combinations of undo steps.
grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.
See D3113
2018-03-31 20:40:37 +02:00
5e81d993af
Merge branch 'master' into blender2.8
2018-03-19 18:14:05 +01:00
c78ebf9f26
Cleanup: split lattice into own library
...
Was mixed with object functionality.
2018-03-19 15:45:50 +01:00
85b68aaf7f
Merge branch 'master' into blender2.8
2018-03-06 20:04:02 +11:00
4d86a432da
Utility to enter sculpt mode
2018-03-06 19:11:19 +11:00
8d575899a1
WorkSpace: use existing mode data w/ scene-switch
...
Check if mode data exists before attempting to change the modes.
2018-03-03 16:39:57 +11:00
f9f559a05f
WorkSpace: Simplify exiting mode after changes
...
It was too tricky to know ahead of time if an object would still
be visible in the new window/workspace/scene/layer combination,
especially since other windows may share some of these data-blocks.
So store the context, make the change, then check if the object is
still visible, freeing mode data of it's not.
2018-03-03 00:23:02 +11:00
35bd1bb957
WorkSpace: move edit mode w/ sync into own func
2018-03-02 23:04:19 +11:00
eee3a4d3ab
Cleanup: move ED_object_mode_generic_* to object_modes.c
2018-03-02 14:55:53 +11:00
da2d0fe43a
Merge branch 'master' into blender2.8
2018-03-02 14:46:21 +11:00
ff74357da0
Object Mode: move logic to 'object_modes.c'
...
Was mixed with edit-mode, centralize mode switching in a single file.
No functional changes.
2018-03-02 14:00:47 +11:00
bcafdc82d8
WorkSpace: fix mode exiting w/ multi-window
...
Activating an object exited modes for all other objects in the layer.
Now check these objects aren't active in other windows first.
2018-03-01 21:33:06 +11:00
4ab002bca3
WorkSpace: object-mode switching support
...
When changing workspaces, existing object-mode data is freed
the new workspaces mode is entered (if possible).
2018-02-22 18:18:44 +11:00
7f65ab86e5
Cleanup: sync vertex-paint and sculpt from 2.8
...
Sync API changes from 2.8 to master.
2018-02-19 15:54:06 +11:00
18bb0bc569
Object Mode: exit sculpt on selection
2018-02-17 00:01:25 +11:00
c28dea5e24
Vertex Paint: expose exist paint-mode to API
2018-02-17 00:01:25 +11:00
b330804ff3
Merge branch 'master' into blender2.8
2018-02-14 01:06:41 +11:00
9fb1f9c5cd
Add ED_object_editmode_exit_ex
...
Allow exiting editmode from non-active scene.
2018-02-14 00:39:39 +11:00
345c6298e9
Object Mode: move to workspace struct
...
- Read-only access can often use EvaluationContext.object_mode
- Write access to go to WorkSpace.object_mode.
- Some TODO's remain (marked as "TODO/OBMODE")
- Add-ons will need updating
(context.active_object.mode -> context.workspace.object_mode)
- There will be small/medium issues that still need resolving
this does work on a basic level though.
See D3037
2018-02-08 21:14:26 +11:00
5376c739f5
Merge branch 'master' into blender2.8
2018-02-06 23:06:23 +11:00
486e2547ee
DNA: move eObjectMode into own header
...
Add a enum headers to DNA, to be included in other headers
so function signatures can use enums for better type safety.
Add DNA_*_enums.h matching DNA_*.types.h as needed.
2018-02-06 22:58:13 +11:00
74f7fb084c
Object Mode: use eval_ctx for get_active_constraints
2018-02-06 18:03:29 +11:00