Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/modules/bl_previews_utils/bl_previews_render.py36
-rw-r--r--release/scripts/modules/bpy_types.py14
-rw-r--r--release/scripts/startup/bl_operators/file.py20
-rw-r--r--release/scripts/startup/bl_ui/__init__.py1
-rw-r--r--release/scripts/startup/bl_ui/properties_collection.py69
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py45
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py8
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py122
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py30
9 files changed, 144 insertions, 201 deletions
diff --git a/release/scripts/modules/bl_previews_utils/bl_previews_render.py b/release/scripts/modules/bl_previews_utils/bl_previews_render.py
index 32266e972bb..fb3a18c6bea 100644
--- a/release/scripts/modules/bl_previews_utils/bl_previews_render.py
+++ b/release/scripts/modules/bl_previews_utils/bl_previews_render.py
@@ -68,7 +68,7 @@ def rna_backup_restore(data, backup):
setattr(dt, path[-1], val)
-def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
+def do_previews(do_objects, do_collections, do_scenes, do_data_intern):
import collections
# Helpers.
@@ -251,9 +251,9 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
return 'BLENDER_RENDER'
def object_bbox_merge(bbox, ob, ob_space, offset_matrix):
- # Take group instances into account (including linked one in this case).
- if ob.type == 'EMPTY' and ob.dupli_type == 'GROUP':
- grp_objects = tuple((ob.name, ob.library.filepath if ob.library else None) for ob in ob.dupli_group.objects)
+ # Take collections instances into account (including linked one in this case).
+ if ob.type == 'EMPTY' and ob.dupli_type == 'COLLECTION':
+ grp_objects = tuple((ob.name, ob.library.filepath if ob.library else None) for ob in ob.dupli_group.all_objects)
if (len(grp_objects) == 0):
ob_bbox = ob.bound_box
else:
@@ -343,7 +343,7 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
render_contexts = {}
objects_ignored = set()
- groups_ignored = set()
+ collections_ignored = set()
prev_scenename = bpy.context.screen.scene.name
@@ -398,11 +398,11 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
if is_rendered is not ...:
ob.hide_render = is_rendered
- if do_groups:
- for grp in ids_nolib(bpy.data.groups):
- if grp.name in groups_ignored:
+ if do_collections:
+ for grp in ids_nolib(bpy.data.collections):
+ if grp.name in collections_ignored:
continue
- # Here too, we do want to keep linked objects members of local group...
+ # Here too, we do want to keep linked objects members of local collection...
objects = tuple((ob.name, ob.library.filepath if ob.library else None) for ob in grp.objects)
render_engine = objects_render_engine_guess(objects)
@@ -414,14 +414,14 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
scene = bpy.data.scenes[render_context.scene, None]
bpy.context.screen.scene = scene
- bpy.ops.object.group_instance_add(group=grp.name)
+ bpy.ops.object.collection_instance_add(collection=grp.name)
grp_ob = next((ob for ob in scene.objects if ob.dupli_group and ob.dupli_group.name == grp.name))
grp_obname = grp_ob.name
scene.update()
offset_matrix = Matrix.Translation(grp.dupli_offset).inverted()
- preview_render_do(render_context, 'groups', grp.name, objects, offset_matrix)
+ preview_render_do(render_context, 'collections', grp.name, objects, offset_matrix)
scene = bpy.data.scenes[render_context.scene, None]
scene.objects.unlink(bpy.data.objects[grp_obname, None])
@@ -462,7 +462,7 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern):
print("*NOT* Saving %s, because some error(s) happened while deleting temp render data..." % bpy.data.filepath)
-def do_clear_previews(do_objects, do_groups, do_scenes, do_data_intern):
+def do_clear_previews(do_objects, do_collections, do_scenes, do_data_intern):
if do_data_intern:
bpy.ops.wm.previews_clear(id_type=INTERN_PREVIEW_TYPES)
@@ -470,8 +470,8 @@ def do_clear_previews(do_objects, do_groups, do_scenes, do_data_intern):
for ob in ids_nolib(bpy.data.objects):
ob.preview.image_size = (0, 0)
- if do_groups:
- for grp in ids_nolib(bpy.data.groups):
+ if do_collections:
+ for grp in ids_nolib(bpy.data.collections):
grp.preview.image_size = (0, 0)
if do_scenes:
@@ -502,8 +502,8 @@ def main():
help="Do not generate a backup .blend1 file when saving processed ones.")
parser.add_argument('--no_scenes', default=True, action="store_false",
help="Do not generate/clear previews for scene IDs.")
- parser.add_argument('--no_groups', default=True, action="store_false",
- help="Do not generate/clear previews for group IDs.")
+ parser.add_argument('--no_collections', default=True, action="store_false",
+ help="Do not generate/clear previews for collection IDs.")
parser.add_argument('--no_objects', default=True, action="store_false",
help="Do not generate/clear previews for object IDs.")
parser.add_argument('--no_data_intern', default=True, action="store_false",
@@ -518,11 +518,11 @@ def main():
if args.clear:
print("clear!")
- do_clear_previews(do_objects=args.no_objects, do_groups=args.no_groups, do_scenes=args.no_scenes,
+ do_clear_previews(do_objects=args.no_objects, do_collections=args.no_collections, do_scenes=args.no_scenes,
do_data_intern=args.no_data_intern)
else:
print("render!")
- do_previews(do_objects=args.no_objects, do_groups=args.no_groups, do_scenes=args.no_scenes,
+ do_previews(do_objects=args.no_objects, do_collections=args.no_collections, do_scenes=args.no_scenes,
do_data_intern=args.no_data_intern)
# Not really necessary, but better be consistent.
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 324bb43d890..fd6f8e23727 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -60,7 +60,7 @@ class Library(bpy_types.ID):
# See: readblenentry.c, IDTYPE_FLAGS_ISLINKABLE,
# we could make this an attribute in rna.
attr_links = ("actions", "armatures", "brushes", "cameras",
- "curves", "grease_pencil", "groups", "images",
+ "curves", "grease_pencil", "collections", "images",
"lamps", "lattices", "materials", "metaballs",
"meshes", "node_groups", "objects", "scenes",
"sounds", "speakers", "textures", "texts",
@@ -96,12 +96,12 @@ class Texture(bpy_types.ID):
)
-class Group(bpy_types.ID):
+class Collection(bpy_types.ID):
__slots__ = ()
@property
def users_dupli_group(self):
- """The dupli group this group is used in"""
+ """The collection instance objects this collection is used in"""
import bpy
return tuple(obj for obj in bpy.data.objects
if self == obj.dupli_group)
@@ -118,11 +118,11 @@ class Object(bpy_types.ID):
if child.parent == self)
@property
- def users_group(self):
- """The groups this object is in"""
+ def users_collection(self):
+ """The collections this object is in"""
import bpy
- return tuple(group for group in bpy.data.groups
- if self in group.objects[:])
+ return tuple(collection for collection in bpy.data.collections
+ if self in collection.objects[:])
@property
def users_scene(self):
diff --git a/release/scripts/startup/bl_operators/file.py b/release/scripts/startup/bl_operators/file.py
index 4ab8d59f263..8d947d19a82 100644
--- a/release/scripts/startup/bl_operators/file.py
+++ b/release/scripts/startup/bl_operators/file.py
@@ -65,10 +65,10 @@ class WM_OT_previews_batch_generate(Operator):
name="Scenes",
description="Generate scenes' previews",
)
- use_groups = BoolProperty(
+ use_collections = BoolProperty(
default=True,
- name="Groups",
- description="Generate groups' previews",
+ name="Collections",
+ description="Generate collections' previews",
)
use_objects = BoolProperty(
default=True,
@@ -121,8 +121,8 @@ class WM_OT_previews_batch_generate(Operator):
])
if not self.use_scenes:
cmd.append('--no_scenes')
- if not self.use_groups:
- cmd.append('--no_groups')
+ if not self.use_collections:
+ cmd.append('--no_collections')
if not self.use_objects:
cmd.append('--no_objects')
if not self.use_intern_data:
@@ -175,9 +175,9 @@ class WM_OT_previews_batch_clear(Operator):
name="Scenes",
description="Clear scenes' previews",
)
- use_groups = BoolProperty(default=True,
- name="Groups",
- description="Clear groups' previews",
+ use_collections = BoolProperty(default=True,
+ name="Collections",
+ description="Clear collections' previews",
)
use_objects = BoolProperty(
default=True,
@@ -231,8 +231,8 @@ class WM_OT_previews_batch_clear(Operator):
])
if not self.use_scenes:
cmd.append('--no_scenes')
- if not self.use_groups:
- cmd.append('--no_groups')
+ if not self.use_collections:
+ cmd.append('--no_collections')
if not self.use_objects:
cmd.append('--no_objects')
if not self.use_intern_data:
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index 2c0b1ab12be..0de0e8ad72d 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -28,7 +28,6 @@ if "bpy" in locals():
_modules = [
"properties_animviz",
- "properties_collection",
"properties_constraint",
"properties_data_armature",
"properties_data_bone",
diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py
deleted file mode 100644
index 0721ad19f2d..00000000000
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-import bpy
-from bpy.types import Panel
-
-
-class CollectionButtonsPanel:
- bl_space_type = 'PROPERTIES'
- bl_region_type = 'WINDOW'
- bl_context = "collection"
-
-
-def get_collection_from_context(context):
- active_object = context.active_object
-
- if active_object and active_object.dupli_group and context.space_data.collection_context == 'GROUP':
- group = active_object.dupli_group
- return group.view_layer.collections.active
- else:
- return context.layer_collection
-
-
-class COLLECTION_PT_context_collection(CollectionButtonsPanel, Panel):
- bl_label = ""
- bl_options = {'HIDE_HEADER'}
-
- def draw(self, context):
- layout = self.layout
- space = context.space_data
- active_object = context.active_object
-
- if active_object and active_object.dupli_group:
- split = layout.split(percentage=0.2)
- split.row().prop(space, "collection_context", expand=True)
- layout = split
-
- collection = get_collection_from_context(context)
- name = collection.name
- if name == 'Master Collection':
- layout.label(text=name, icon='COLLAPSEMENU')
- else:
- layout.prop(collection, "name", text="", icon='COLLAPSEMENU')
-
-
-classes = (
- COLLECTION_PT_context_collection,
-)
-
-if __name__ == "__main__": # only for live edit.
- from bpy.utils import register_class
- for cls in classes:
- register_class(cls)
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 95193b68945..f0526fc0271 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -173,19 +173,20 @@ class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel):
row.prop(ob, "slow_parent_offset", text="Offset")
-class GROUP_MT_specials(Menu):
- bl_label = "Group Specials"
+class COLLECTION_MT_specials(Menu):
+ bl_label = "Collection Specials"
def draw(self, context):
layout = self.layout
- layout.operator("object.group_unlink", icon='X')
- layout.operator("object.grouped_select")
+ layout.operator("object.collection_unlink", icon='X')
+ layout.operator("object.collection_objects_select")
layout.operator("object.dupli_offset_from_cursor")
-class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
- bl_label = "Groups"
+class OBJECT_PT_collections(ObjectButtonsPanel, Panel):
+ bl_label = "Collections"
+ bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
@@ -193,30 +194,30 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
obj = context.object
row = layout.row(align=True)
- if bpy.data.groups:
- row.operator("object.group_link", text="Add to Group")
+ if bpy.data.collections:
+ row.operator("object.collection_link", text="Add to Collection")
else:
- row.operator("object.group_add", text="Add to Group")
- row.operator("object.group_add", text="", icon='ZOOMIN')
+ row.operator("object.collection_add", text="Add to Collection")
+ row.operator("object.collection_add", text="", icon='ZOOMIN')
obj_name = obj.name
- for group in bpy.data.groups:
+ for collection in bpy.data.collections:
# XXX this is slow and stupid!, we need 2 checks, one thats fast
# and another that we can be sure its not a name collision
# from linked library data
- group_objects = group.objects
- if obj_name in group.objects and obj in group_objects[:]:
+ collection_objects = collection.objects
+ if obj_name in collection.objects and obj in collection_objects[:]:
col = layout.column(align=True)
- col.context_pointer_set("group", group)
+ col.context_pointer_set("collection", collection)
row = col.box().row()
- row.prop(group, "name", text="")
- row.operator("object.group_remove", text="", icon='X', emboss=False)
- row.menu("GROUP_MT_specials", icon='DOWNARROW_HLT', text="")
+ row.prop(collection, "name", text="")
+ row.operator("object.collection_remove", text="", icon='X', emboss=False)
+ row.menu("COLLECTION_MT_specials", icon='DOWNARROW_HLT', text="")
row = col.box().row()
- row.prop(group, "dupli_offset", text="")
+ row.prop(collection, "dupli_offset", text="")
class OBJECT_PT_display(ObjectButtonsPanel, Panel):
@@ -317,8 +318,8 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
sub.active = ob.use_dupli_faces_scale
sub.prop(ob, "dupli_faces_scale", text="Inherit Scale")
- elif ob.dupli_type == 'GROUP':
- layout.prop(ob, "dupli_group", text="Group")
+ elif ob.dupli_type == 'COLLECTION':
+ layout.prop(ob, "dupli_group", text="Collection")
from .properties_animviz import (
@@ -372,8 +373,8 @@ classes = (
OBJECT_PT_transform_locks,
OBJECT_PT_relations,
OBJECT_PT_relations_extras,
- GROUP_MT_specials,
- OBJECT_PT_groups,
+ COLLECTION_MT_specials,
+ OBJECT_PT_collections,
OBJECT_PT_display,
OBJECT_PT_duplication,
OBJECT_PT_motion_paths,
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 1b8582ba8f2..c4b867ab647 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -41,11 +41,11 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
row.prop(dopesheet, "show_only_errors", text="")
if not genericFiltersOnly:
- if bpy.data.groups:
+ if bpy.data.collections:
row = layout.row(align=True)
- row.prop(dopesheet, "show_only_group_objects", text="")
- if dopesheet.show_only_group_objects:
- row.prop(dopesheet, "filter_group", text="")
+ row.prop(dopesheet, "show_only_collection_objects", text="")
+ if dopesheet.show_only_collection_objects:
+ row.prop(dopesheet, "filter_collection", text="")
if not is_nla:
row = layout.row(align=True)
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index e1a4a6ef16d..2a59c2c5f79 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -38,7 +38,7 @@ class OUTLINER_HT_header(Header):
layout.prop(space, "display_mode", text="")
row = layout.row(align=True)
- if display_mode == 'COLLECTIONS':
+ if display_mode in {'VIEW_LAYER'}:
row.popover(space_type='OUTLINER',
region_type='HEADER',
panel_type="OUTLINER_PT_filter",
@@ -97,9 +97,6 @@ class OUTLINER_MT_editor_menus(Menu):
elif space.display_mode == 'ORPHAN_DATA':
layout.menu("OUTLINER_MT_edit_orphan_data")
- elif space.display_mode == 'VIEW_LAYER':
- layout.menu("OUTLINER_MT_edit_view_layer")
-
class OUTLINER_MT_view(Menu):
bl_label = "View"
@@ -126,16 +123,6 @@ class OUTLINER_MT_view(Menu):
layout.operator("screen.screen_full_area", text="Toggle Fullscreen Area").use_hide_panels = True
-class OUTLINER_MT_edit_view_layer(Menu):
- bl_label = "Edit"
-
- def draw(self, context):
- layout = self.layout
-
- layout.operator("outliner.collection_link", icon='LINKED')
- layout.operator("outliner.collection_new", icon='NEW')
-
-
class OUTLINER_MT_edit_datablocks(Menu):
bl_label = "Edit"
@@ -159,63 +146,85 @@ class OUTLINER_MT_edit_orphan_data(Menu):
layout.operator("outliner.orphans_purge")
-class OUTLINER_MT_context_scene_collection(Menu):
- bl_label = "Collection"
+class OUTLINER_MT_collection_view_layer(Menu):
+ bl_label = "View Layer"
def draw(self, context):
layout = self.layout
- layout.operator("outliner.collection_nested_new", text="New Collection", icon='NEW')
- layout.operator("outliner.collection_duplicate", text="Duplicate Collection")
- layout.operator("outliner.collection_delete_selected", text="Delete Collections", icon='X')
- layout.separator()
- layout.operator("outliner.collection_objects_add", text="Add Selected", icon='ZOOMIN')
- layout.operator("outliner.collection_objects_remove", text="Remove Selected", icon='ZOOMOUT')
+ space = context.space_data
+
+ layout.operator("outliner.collection_exclude_set", text="Exclude")
+ layout.operator("outliner.collection_include_set", text="Include")
-class OUTLINER_MT_context_object_select(Menu):
- bl_label = "Object Operation Select"
+class OUTLINER_MT_collection(Menu):
+ bl_label = "Collection"
def draw(self, context):
layout = self.layout
- layout.operator("outliner.object_operation", text="Select").type='SELECT'
- layout.operator("outliner.object_operation", text="Deselect").type='DESELECT'
- layout.operator("outliner.object_operation", text="Select Hierarchy").type='SELECT_HIERARCHY'
+ space = context.space_data
+ layout.operator("outliner.collection_new", text="New").nested = True
+ layout.operator("outliner.collection_duplicate", text="Duplicate")
+ layout.operator("outliner.collection_delete", text="Delete").hierarchy = False
+ layout.operator("outliner.collection_delete", text="Delete Hierarchy").hierarchy = True
-class OUTLINER_MT_context_object_delete(Menu):
- bl_label = "Object Operation Delete"
+ layout.separator()
- def draw(self, context):
- layout = self.layout
+ layout.operator("outliner.collection_objects_select", text="Select Objects")
+ layout.operator("outliner.collection_objects_deselect", text="Deselect Objects")
- layout.operator("outliner.object_operation", text="Delete").type='DELETE'
- layout.operator("outliner.object_operation", text="Delete Hierarchy").type='DELETE_HIERARCHY'
+ layout.separator()
+
+ layout.operator("outliner.collection_instance", text="Instance to Scene")
+ if space.display_mode != 'VIEW_LAYER':
+ layout.operator("outliner.collection_link", text="Link to Scene")
+ layout.operator("outliner.id_operation", text="Unlink").type='UNLINK'
+
+ if space.display_mode == 'VIEW_LAYER':
+ layout.separator()
+ layout.menu("OUTLINER_MT_collection_view_layer")
+
+ layout.separator()
+ layout.operator_menu_enum("outliner.id_operation", 'type', text="ID Data")
-class OUTLINER_MT_context_object_collection(Menu):
- bl_label = "Object Operation Collection"
+class OUTLINER_MT_collection_new(Menu):
+ bl_label = "Collection"
def draw(self, context):
layout = self.layout
- layout.operator("outliner.object_add_to_new_collection", text="Add to New Collection", icon='ZOOMIN')
- layout.operator("outliner.object_remove_from_collection", text="Remove from Collection", icon='ZOOMOUT')
+ layout.operator("outliner.collection_new", text="New").nested = False
-class OUTLINER_MT_context_object(Menu):
+class OUTLINER_MT_object(Menu):
bl_label = "Object"
def draw(self, context):
layout = self.layout
- layout.menu("OUTLINER_MT_context_object_select", text="Select")
- layout.menu("OUTLINER_MT_context_object_delete", text="Delete")
- layout.menu("OUTLINER_MT_context_object_collection", text="Collection")
+ space = context.space_data
+
+ layout.operator("outliner.object_operation", text="Delete").type='DELETE'
+ if space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection:
+ layout.operator("outliner.object_operation", text="Delete Hierarchy").type='DELETE_HIERARCHY'
+
layout.separator()
- layout.operator("outliner.object_operation", text="Remap Users").type='REMAP'
- layout.operator("outliner.object_operation", text="Rename").type='RENAME'
+
+ layout.operator("outliner.object_operation", text="Select").type='SELECT'
+ layout.operator("outliner.object_operation", text="Select Hierarchy").type='SELECT_HIERARCHY'
+ layout.operator("outliner.object_operation", text="Deselect").type='DESELECT'
+
+ layout.separator()
+
+ if not (space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection):
+ layout.operator("outliner.id_operation", text="Unlink").type='UNLINK'
+ layout.separator()
+
+ layout.operator_menu_enum("outliner.id_operation", 'type', text="ID Data")
class OUTLINER_PT_filter(Panel):
@@ -227,18 +236,26 @@ class OUTLINER_PT_filter(Panel):
layout = self.layout
space = context.space_data
+ display_mode = space.display_mode
+
+ layout.prop(space, "use_filter_collection", text="Collections")
+
+ layout.separator()
col = layout.column()
- col.prop(space, "filter_state", text="")
+ col.prop(space, "use_filter_object", text="Objects")
+ active = space.use_filter_object
+
sub = col.column(align=True)
- sub.active = space.filter_state != 'NONE'
+ sub.active = active
+ sub.prop(space, "filter_state", text="")
sub.prop(space, "use_filter_object_content", text="Object Contents")
sub.prop(space, "use_filter_children", text="Object Children")
layout.separator()
col = layout.column_flow(align=True)
- col.active = space.filter_state != 'NONE'
+ col.active = active
if bpy.data.meshes:
col.prop(space, "use_filter_object_mesh", text="Meshes")
@@ -258,22 +275,17 @@ class OUTLINER_PT_filter(Panel):
bpy.data.fonts or bpy.data.speakers:
col.prop(space, "use_filter_object_others", text="Others")
- layout.separator()
- layout.prop(space, "use_filter_collection", text="Collections")
-
classes = (
OUTLINER_HT_header,
OUTLINER_MT_editor_menus,
OUTLINER_MT_view,
- OUTLINER_MT_edit_view_layer,
OUTLINER_MT_edit_datablocks,
OUTLINER_MT_edit_orphan_data,
- OUTLINER_MT_context_scene_collection,
- OUTLINER_MT_context_object,
- OUTLINER_MT_context_object_delete,
- OUTLINER_MT_context_object_select,
- OUTLINER_MT_context_object_collection,
+ OUTLINER_MT_collection,
+ OUTLINER_MT_collection_new,
+ OUTLINER_MT_collection_view_layer,
+ OUTLINER_MT_object,
OUTLINER_PT_filter,
)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 53dea7ad2e8..f20e9021e28 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1335,14 +1335,14 @@ class INFO_MT_add(Menu):
layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_FORCE_FIELD')
layout.separator()
- if len(bpy.data.groups) > 10:
+ if len(bpy.data.collections) > 10:
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_GROUP_INSTANCE')
+ layout.operator("object.collection_instance_add", text="Collection Instance...", icon='OUTLINER_OB_GROUP_INSTANCE')
else:
layout.operator_menu_enum(
- "object.group_instance_add",
- "group",
- text="Group Instance",
+ "object.collection_instance_add",
+ "collection",
+ text="Collection Instance",
icon='OUTLINER_OB_GROUP_INSTANCE',
)
@@ -1407,7 +1407,7 @@ class VIEW3D_MT_object(Menu):
layout.separator()
layout.menu("VIEW3D_MT_object_parent")
- layout.menu("VIEW3D_MT_object_group")
+ layout.menu("VIEW3D_MT_object_collection")
layout.menu("VIEW3D_MT_snap")
layout.separator()
@@ -1714,21 +1714,21 @@ class VIEW3D_MT_object_track(Menu):
layout.operator_enum("object.track_clear", "type")
-class VIEW3D_MT_object_group(Menu):
- bl_label = "Group"
+class VIEW3D_MT_object_collection(Menu):
+ bl_label = "Collection"
def draw(self, context):
layout = self.layout
- layout.operator("group.create")
- # layout.operator_menu_enum("group.objects_remove", "group") # BUGGY
- layout.operator("group.objects_remove")
- layout.operator("group.objects_remove_all")
+ layout.operator("collection.create")
+ # layout.operator_menu_enum("collection.objects_remove", "collection") # BUGGY
+ layout.operator("collection.objects_remove")
+ layout.operator("collection.objects_remove_all")
layout.separator()
- layout.operator("group.objects_add_active")
- layout.operator("group.objects_remove_active")
+ layout.operator("collection.objects_add_active")
+ layout.operator("collection.objects_remove_active")
class VIEW3D_MT_object_constraints(Menu):
@@ -3974,7 +3974,7 @@ classes = (
VIEW3D_MT_object_apply,
VIEW3D_MT_object_parent,
VIEW3D_MT_object_track,
- VIEW3D_MT_object_group,
+ VIEW3D_MT_object_collection,
VIEW3D_MT_object_constraints,
VIEW3D_MT_object_quick_effects,
VIEW3D_MT_make_single_user,