Commit: d39fdda20b10028e183facaaebb76af438759762 Author: Brecht Van Lommel Date: Thu May 17 20:09:03 2018 +0200 Branches: temp-unified-collections https://developer.blender.org/rBd39fdda20b10028e183facaaebb76af438759762
Merge branch 'blender2.8' into temp-unified-collections =================================================================== =================================================================== diff --cc release/scripts/startup/bl_ui/properties_object.py index 251f32a37e4,95193b68945..f0526fc0271 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@@ -318,8 -317,8 +318,8 @@@ class OBJECT_PT_duplication(ObjectButto 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 ( diff --cc release/scripts/startup/bl_ui/space_outliner.py index 3c20d92106e,e1a4a6ef16d..2a59c2c5f79 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@@ -37,8 -37,8 +37,8 @@@ class OUTLINER_HT_header(Header) layout.prop(space, "display_mode", text="") - row = layout.row() - if display_mode in {'OBJECTS', 'COLLECTIONS'}: + 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", @@@ -141,71 -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") ++ 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 == 'COLLECTIONS' and space.filter_collection != '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' + - # TODO: needed for static override, but not all operators work ++ 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.collection_new", text="New") - 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 != 'COLLECTIONS': ++ 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 space.display_mode == 'COLLECTIONS': ++ if not (space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection): + layout.operator("outliner.id_operation", text="Unlink").type='UNLINK' + layout.separator() + - # TODO: needed for static override, but not all operators work + layout.operator_menu_enum("outliner.id_operation", 'type', text="ID Data") class OUTLINER_PT_filter(Panel): @@@ -217,26 -227,11 +236,19 @@@ layout = self.layout space = context.space_data + display_mode = space.display_mode + - if display_mode == 'COLLECTIONS': - col = layout.column(align=True) - col.label(text="Collections:") - col.row().prop(space, "filter_collection", expand=True) ++ layout.prop(space, "use_filter_collection", text="Collections") + - layout.separator() ++ layout.separator() col = layout.column() - if display_mode == 'COLLECTIONS': - col.prop(space, "use_filter_object", text="Objects") - active = space.use_filter_object - else: - col.label("Objects:") - active = True - 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") @@@ -268,11 -266,14 +280,12 @@@ 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 --cc source/blender/blenkernel/BKE_layer.h index 725ef65b511,00154f3e68e..dba3f6938c3 --- a/source/blender/blenkernel/BKE_layer.h +++ b/source/blender/blenkernel/BKE_layer.h @@@ -78,13 -77,22 +76,14 @@@ struct Base *BKE_view_layer_base_find(s void BKE_view_layer_base_deselect_all(struct ViewLayer *view_layer); void BKE_view_layer_base_select(struct ViewLayer *view_layer, struct Base *selbase); -void BKE_layer_collection_sync_flags( - struct ID *owner_id, - struct SceneCollection *scene_collection_dst, - struct SceneCollection *scene_collection_src); - void BKE_view_layer_copy_data( - struct ViewLayer *view_layer_dst, struct ViewLayer *view_layer_src, - struct SceneCollection *mc_dst, struct SceneCollection *mc_src, + struct Scene *scene_dst, const struct Scene *scene_src, + struct ViewLayer *view_layer_dst, const struct ViewLayer *view_layer_src, const int flag); -struct LayerCollection *BKE_layer_collection_duplicate(struct ID *owner_id, struct LayerCollection *layer_collection); - -void BKE_layer_collection_free(struct ViewLayer *view_layer, struct LayerCollection *lc); - struct LayerCollection *BKE_layer_collection_get_active(struct ViewLayer *view_layer); -struct LayerCollection *BKE_layer_collection_get @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs