[Bf-blender-cvs] [2c096f17a69] master: UI: Refactor Node Context Menu
Commit: 2c096f17a690be5228c08d7c4b58775a89b83932 Author: Pablo Vazquez Date: Thu Nov 17 23:20:22 2022 +0100 Branches: master https://developer.blender.org/rB2c096f17a690be5228c08d7c4b58775a89b83932 UI: Refactor Node Context Menu The Node Context Menu contains options that are not always available for the selected nodes, and misses important entries for accesibility. This patch covers the following: * Add operators to join and remove nodes from frames. * Sort and group entries more logically and follow Blender conventions. * Add `Insert into Group` * Show group actions only on nodes that support it. * Move all toggles to a sub-menu called `Show/Hide`. * When nothing is selected, show Add menu, links actions, and paste. Inspired by RightClickSelect proposals and community feedback. See D16216 for images. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D16216 === M release/scripts/startup/bl_ui/space_node.py === diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 593c6400529..9646987bbf0 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -433,36 +433,105 @@ class NODE_MT_node_color_context_menu(Menu): layout.operator("node.node_copy_color", icon='COPY_ID') +class NODE_MT_context_menu_show_hide_menu(Menu): +bl_label = "Show/Hide" + +def draw(self, context): +snode = context.space_data +is_compositor = snode.tree_type == 'CompositorNodeTree' + +layout = self.layout + +layout.operator("node.mute_toggle", text="Mute") + +# Node previews are only available in the Compositor. +if is_compositor: +layout.operator("node.preview_toggle", text="Node Preview") + +layout.operator("node.options_toggle", text="Node Options") + +layout.separator() + +layout.operator("node.hide_socket_toggle", text="Unconnected Sockets") +layout.operator("node.hide_toggle", text="Collapse") +layout.operator("node.collapse_hide_unused_toggle") + + +class NODE_MT_context_menu_select_menu(Menu): +bl_label = "Select" + +def draw(self, context): +layout = self.layout + +layout.operator("node.select_grouped", text="Select Grouped...").extend = False + +layout.separator() + +layout.operator("node.select_linked_from") +layout.operator("node.select_linked_to") + +layout.separator() + +layout.operator("node.select_same_type_step", text="Activate Same Type Previous").prev = True +layout.operator("node.select_same_type_step", text="Activate Same Type Next").prev = False + + class NODE_MT_context_menu(Menu): bl_label = "Node Context Menu" def draw(self, context): -layout = self.layout +snode = context.space_data +is_nested = (len(snode.path) > 1) +is_geometrynodes = snode.tree_type == 'GeometryNodeTree' selected_nodes_len = len(context.selected_nodes) +active_node = context.active_node -# If nothing is selected -# (disabled for now until it can be made more useful). -''' +layout = self.layout + +# If no nodes are selected. if selected_nodes_len == 0: layout.operator_context = 'INVOKE_DEFAULT' -layout.menu("NODE_MT_add") -layout.operator("node.clipboard_paste", text="Paste") +layout.menu("NODE_MT_add", icon="ADD") +layout.operator("node.clipboard_paste", text="Paste", icon="PASTEDOWN") + +layout.separator() + +layout.operator("node.find_node", text="Find...", icon="VIEWZOOM") + +layout.separator() + +if is_geometrynodes: +layout.operator_context = 'INVOKE_DEFAULT' +layout.operator("node.select", text="Clear Viewer", icon="HIDE_ON").clear_viewer = True + +layout.operator("node.links_cut") +layout.operator("node.links_mute") + +if is_nested: +layout.separator() + +layout.operator("node.tree_path_parent", text="Exit Group", icon='FILE_PARENT') + return -''' -# If something is selected +if is_geometrynodes: +layout.operator_context = 'INVOKE_DEFAULT' +layout.operator("n
[Bf-blender-cvs] [011c2a37ebd] blender-v3.4-release: Cycles: Sort properties in Path Guiding panel
Commit: 011c2a37ebd648a8716dad724920fe94a432a7ef Author: Pablo Vazquez Date: Thu Nov 17 16:18:18 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rB011c2a37ebd648a8716dad724920fe94a432a7ef Cycles: Sort properties in Path Guiding panel * Sort Training Samples first, since it affects both Surface and Volume guiding. * Remove "Guiding" from Surface and Volume entries (UI only, the property still has Guiding in the name) Change reviewed in the render-cycles module channel. === M intern/cycles/blender/addon/ui.py === diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 305accc8f1a..c61ae37c215 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -313,10 +313,11 @@ class CYCLES_RENDER_PT_sampling_path_guiding(CyclesButtonsPanel, Panel): layout.use_property_decorate = False layout.active = cscene.use_guiding +layout.prop(cscene, "guiding_training_samples") + col = layout.column(align=True) -col.prop(cscene, "use_surface_guiding") -col.prop(cscene, "use_volume_guiding") -col.prop(cscene, "guiding_training_samples") +col.prop(cscene, "use_surface_guiding", text="Surface") +col.prop(cscene, "use_volume_guiding", text="Volume") class CYCLES_RENDER_PT_sampling_path_guiding_debug(CyclesDebugButtonsPanel, Panel): ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e4871b28350] master: EEVEE/Viewport: Make info text when compiling shaders more clear
Commit: e4871b28350d0facfcfe86ca7e070ccb38d0e43b Author: Pablo Vazquez Date: Wed Nov 16 14:28:12 2022 +0100 Branches: master https://developer.blender.org/rBe4871b28350d0facfcfe86ca7e070ccb38d0e43b EEVEE/Viewport: Make info text when compiling shaders more clear The N in `Compiling Shaders N` in Text Info, is the number of how many shaders are left in the queue. It's a countdown, but this wasn't mentioned and led to confusion. Ideally this text would be like Cycles' "Samples 50/100", but in EEVEE it's not easy to guess how many shaders are left (this number could even go up mid-compilation). In the past there used to be a progress bar but it's also confusing because it could be 90/100 shaders done, but the remaining 10 are slow to compile. Change the text to "Compiling Shaders (N remaining)" so it's easier to understand what is going on. Similar to how some game engines do. === M source/blender/draw/engines/eevee/eevee_engine.c M source/blender/draw/engines/eevee_next/eevee_instance.cc === diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index 5ae4b730cfa..ff17c02b3ee 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -174,7 +174,7 @@ static void eevee_cache_finish(void *vedata) } if (g_data->queued_shaders_count > 0) { -SNPRINTF(ved->info, "Compiling Shaders %d", g_data->queued_shaders_count); +SNPRINTF(ved->info, "Compiling Shaders (%d remaining)", g_data->queued_shaders_count); } } diff --git a/source/blender/draw/engines/eevee_next/eevee_instance.cc b/source/blender/draw/engines/eevee_next/eevee_instance.cc index a0bdf70e254..744b1611f37 100644 --- a/source/blender/draw/engines/eevee_next/eevee_instance.cc +++ b/source/blender/draw/engines/eevee_next/eevee_instance.cc @@ -337,7 +337,7 @@ void Instance::draw_viewport(DefaultFramebufferList *dfbl) if (materials.queued_shaders_count > 0) { std::stringstream ss; -ss << "Compiling Shaders " << materials.queued_shaders_count; +ss << "Compiling Shaders (" << materials.queued_shaders_count << " remaining)"; info = ss.str(); } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [28e952dacd8] master: UI: Sort items in Weight Locks menu
Commit: 28e952dacd83bfeff1edb303d480ae5b32cf59c9 Author: Pablo Vazquez Date: Sun Nov 6 02:27:52 2022 +0100 Branches: master https://developer.blender.org/rB28e952dacd83bfeff1edb303d480ae5b32cf59c9 UI: Sort items in Weight Locks menu Reorder the items in the `Locks` menu: * Split into three groups: Lock, Unlock, Invert. * Use icon only in the first item of each group, following the HIG. Reviewed By: Severin Differential Revision: https://developer.blender.org/D16383 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 39684aaf161..83f190ee5d9 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3121,21 +3121,33 @@ class VIEW3D_MT_paint_weight_lock(Menu): op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All") op.action, op.mask = 'LOCK', 'ALL' -op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All") -op.action, op.mask = 'UNLOCK', 'ALL' -op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Selected") + +op = layout.operator("object.vertex_group_lock", text="Lock Selected") op.action, op.mask = 'LOCK', 'SELECTED' -op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Selected") -op.action, op.mask = 'UNLOCK', 'SELECTED' -op = layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Unselected") + +op = layout.operator("object.vertex_group_lock", text="Lock Unselected") op.action, op.mask = 'LOCK', 'UNSELECTED' -op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock Unselected") -op.action, op.mask = 'UNLOCK', 'UNSELECTED' + op = layout.operator("object.vertex_group_lock", text="Lock Only Selected") op.action, op.mask = 'LOCK', 'INVERT_UNSELECTED' + op = layout.operator("object.vertex_group_lock", text="Lock Only Unselected") op.action, op.mask = 'UNLOCK', 'INVERT_UNSELECTED' -op = layout.operator("object.vertex_group_lock", text="Invert Locks") + +layout.separator() + +op = layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="Unlock All") +op.action, op.mask = 'UNLOCK', 'ALL' + +op = layout.operator("object.vertex_group_lock", text="Unlock Selected") +op.action, op.mask = 'UNLOCK', 'SELECTED' + +op = layout.operator("object.vertex_group_lock", text="Unlock Unselected") +op.action, op.mask = 'UNLOCK', 'UNSELECTED' + +layout.separator() + +op = layout.operator("object.vertex_group_lock", icon='ARROW_LEFTRIGHT', text="Invert Locks") op.action, op.mask = 'INVERT', 'ALL' ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1111af5cb49] master: Sculpt: add versioning for Auto-masking cavity factor default
Commit: af5cb4964369963c587b5400ab784a4397c6 Author: Pablo Vazquez Date: Mon Oct 17 14:47:49 2022 +0200 Branches: master https://developer.blender.org/rBaf5cb4964369963c587b5400ab784a4397c6 Sculpt: add versioning for Auto-masking cavity factor default Also remove automasking_cavity_factor default from RNA for brushes. Data-blocks set their defaults via `DNA_brush_defaults.h` Continuation from previous commit and rBdb40b6 Thanks to Dalai for the help! === M source/blender/blenkernel/BKE_blender_version.h M source/blender/blenloader/intern/versioning_300.cc M source/blender/makesrna/intern/rna_brush.c === diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 3c8f7d758b6..96df8f7a443 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -25,7 +25,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 3 +#define BLENDER_FILE_SUBVERSION 4 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index 5328107e1f2..e2b98b2283f 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -3623,6 +3623,13 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } } + if (!MAIN_VERSION_ATLEAST(bmain, 304, 4)) { +/* Update brush sculpt settings. */ +LISTBASE_FOREACH (Brush *, brush, >brushes) { + brush->automasking_cavity_factor = 1.0f; +} + } + /** * Versioning code until next subversion bump goes here. * diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index b44b0620329..35e01be366b 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -3242,7 +3242,6 @@ static void rna_def_brush(BlenderRNA *brna) prop = RNA_def_property(srna, "automasking_cavity_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "automasking_cavity_factor"); - RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Cavity Factor", "The contrast of the cavity mask"); RNA_def_property_range(prop, 0.0f, 5.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [69e7274d4f5] master: Brush: Fix mismatch in DNA Brush defaults
Commit: 69e7274d4f58f76e750b7104c1bc0334243a9b91 Author: Pablo Vazquez Date: Mon Oct 17 14:11:11 2022 +0200 Branches: master https://developer.blender.org/rB69e7274d4f58f76e750b7104c1bc0334243a9b91 Brush: Fix mismatch in DNA Brush defaults Missed changing the DNA brush default in rBdb40b6 Thanks to SteffenD for reporting in blender.chat! === M source/blender/makesdna/DNA_brush_defaults.h === diff --git a/source/blender/makesdna/DNA_brush_defaults.h b/source/blender/makesdna/DNA_brush_defaults.h index 348e8f4e098..6e88275672a 100644 --- a/source/blender/makesdna/DNA_brush_defaults.h +++ b/source/blender/makesdna/DNA_brush_defaults.h @@ -92,7 +92,7 @@ .hardness = 0.0f, \ .automasking_boundary_edges_propagation_steps = 1, \ .automasking_cavity_blur_steps = 0,\ -.automasking_cavity_factor = 0.5f,\ +.automasking_cavity_factor = 1.0f,\ \ /* A kernel radius of 1 has almost no effect (T63233). */ \ .blur_kernel_radius = 2, \ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [db40b62252e] master: Sculpt: Auto-masking UI improvements
Commit: db40b62252e5a7716cd403a0574cc164163b2ce9 Author: Pablo Vazquez Date: Mon Oct 17 11:17:42 2022 +0200 Branches: master https://developer.blender.org/rBdb40b62252e5a7716cd403a0574cc164163b2ce9 Sculpt: Auto-masking UI improvements Add auto-masking as a popover in the header while in Sculpt mode, following the design in T101593. These properties were present in the Options panel (and popover), they have been removed from there. Moreover, this commit makes the auto-masking section in Brush settings match the new popover. In the future this popover can be used for other modes that support auto-masking such as Grease Pencil. See D16145 for details and screenshots. Reviewed By: JulienKaspar Differential Revision: https://developer.blender.org/D16145 === M release/scripts/startup/bl_ui/properties_paint_common.py M release/scripts/startup/bl_ui/space_view3d.py M release/scripts/startup/bl_ui/space_view3d_toolbar.py M source/blender/makesrna/intern/rna_brush.c M source/blender/makesrna/intern/rna_sculpt_paint.c === diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 72a87703bd5..0e49a506e73 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -928,60 +928,80 @@ def brush_settings_advanced(layout, context, brush, popover=False): use_frontface = False if mode == 'SCULPT': +sculpt = context.tool_settings.sculpt capabilities = brush.sculpt_capabilities use_accumulate = capabilities.has_accumulate use_frontface = True col = layout.column(heading="Auto-Masking", align=True) -# topology automasking +col = layout.column(align=True) col.prop(brush, "use_automasking_topology", text="Topology") - -# face masks automasking col.prop(brush, "use_automasking_face_sets", text="Face Sets") -# boundary edges/face sets automasking +layout.separator() + +col = layout.column(align=True) col.prop(brush, "use_automasking_boundary_edges", text="Mesh Boundary") col.prop(brush, "use_automasking_boundary_face_sets", text="Face Sets Boundary") -col.prop(brush, "use_automasking_cavity", text="Cavity") -col.prop(brush, "use_automasking_cavity_inverted", text="Cavity (Inverted)") -col.prop(brush, "use_automasking_start_normal", text="Area Normal") -col.prop(brush, "use_automasking_view_normal", text="View Normal") -col.separator() -col.prop(brush, "automasking_boundary_edges_propagation_steps") +if brush.use_automasking_boundary_edges or brush.use_automasking_boundary_face_sets: +col = layout.column() +col.use_property_split = False +split = col.split(factor=0.4) +col = split.column() +split.prop(brush, "automasking_boundary_edges_propagation_steps") -sculpt = context.tool_settings.sculpt +layout.separator() -if brush.use_automasking_start_normal: -col.separator() +col = layout.column(align=True) +row = col.row() +row.prop(brush, "use_automasking_cavity", text="Cavity") -col.prop(sculpt, "automasking_start_normal_limit") -col.prop(sculpt, "automasking_start_normal_falloff") +is_cavity_active = brush.use_automasking_cavity or brush.use_automasking_cavity_inverted -if brush.use_automasking_view_normal: -col.separator() +if is_cavity_active: +row.operator("sculpt.mask_from_cavity", text="Create Mask") -col.prop(brush, "use_automasking_view_occlusion", text="Occlusion") -col.prop(sculpt, "automasking_view_normal_limit") -col.prop(sculpt, "automasking_view_normal_falloff") +col.prop(brush, "use_automasking_cavity_inverted", text="Cavity (inverted)") -if brush.use_automasking_cavity or brush.use_automasking_cavity_inverted: -col.separator() +if is_cavity_active: +col = layout.column(align=True) +col.prop(brush, "automasking_cavity_factor", text="Factor") +col.prop(brush, "automasking_cavity_blur_steps", text="Blur") -col.prop(brush, "automasking_cavity_factor", text="Cavity Factor") -col.prop(brush, "
[Bf-blender-cvs] [f95071028ce] master: UI: Fix wrong error message when trying to apply modifier
Commit: f95071028ce11c77ffaac72fefee8d0884c39fc3 Author: Pablo Vazquez Date: Thu Oct 13 12:24:03 2022 +0200 Branches: master https://developer.blender.org/rBf95071028ce11c77ffaac72fefee8d0884c39fc3 UI: Fix wrong error message when trying to apply modifier The error message when trying to apply a constructive modifier on a curve object was wrong, "transform" makes no sense in this context. Thanks Philipp for pointing it out! === M source/blender/editors/object/object_modifier.cc === diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc index 9310aa3c58c..c7995809438 100644 --- a/source/blender/editors/object/object_modifier.cc +++ b/source/blender/editors/object/object_modifier.cc @@ -789,7 +789,9 @@ static bool modifier_apply_obdata( if (ELEM(mti->type, eModifierTypeType_Constructive, eModifierTypeType_Nonconstructive)) { BKE_report( - reports, RPT_ERROR, "Transform curve to mesh in order to apply constructive modifiers"); + reports, + RPT_ERROR, + "Cannot apply constructive modifiers on curve. Convert curve to mesh in order to apply"); return false; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f69aaf71f82] master: WM: Support opening backup .blend files via drag-drop
Commit: f69aaf71f82ad9c52a8590479dbb20e1c2916f1e Author: Pablo Vazquez Date: Tue Sep 27 19:19:29 2022 +0200 Branches: master https://developer.blender.org/rBf69aaf71f82ad9c52a8590479dbb20e1c2916f1e WM: Support opening backup .blend files via drag-drop Add support for opening Blender backup `.blend` files (`.blend1`, `.blend2`, etc) by dropping them into the window, just like regular .blend files. {F13393482, size=full} Reviewed By: Severin Differential Revision: https://developer.blender.org/D15700 === M source/blender/editors/screen/screen_ops.c === diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index c24850fdad5..e04cf5c6d68 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -5742,7 +5742,7 @@ static void keymap_modal_set(wmKeyConfig *keyconf) static bool blend_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) { if (drag->type == WM_DRAG_PATH) { -if (ELEM(drag->icon, ICON_FILE_BLEND, ICON_BLENDER)) { +if (ELEM(drag->icon, ICON_FILE_BLEND, ICON_FILE_BACKUP, ICON_BLENDER)) { return true; } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f60b47f2c82] master: UI: Fix inconsistency use of uppercase/capitalization
Commit: f60b47f2c8216a70bb6a9fbdb8e30fc2c26b8b9f Author: Pablo Vazquez Date: Wed Aug 17 22:23:48 2022 +0200 Branches: master https://developer.blender.org/rBf60b47f2c8216a70bb6a9fbdb8e30fc2c26b8b9f UI: Fix inconsistency use of uppercase/capitalization Since VBO stands for vertex buffer object it should always be uppercase. "Vertex" in "vertex buffer object" should only be capitalized at the beginning of a sentence. === M release/scripts/startup/bl_ui/space_userpref.py M source/blender/makesrna/intern/rna_userdef.c === diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 44aefc5a374..ba8608c4e28 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -636,7 +636,7 @@ class USERPREF_PT_system_memory(SystemPanel, CenterAlignMixIn, Panel): layout.separator() col = layout.column() -col.prop(system, "vbo_time_out", text="Vbo Time Out") +col.prop(system, "vbo_time_out", text="VBO Time Out") col.prop(system, "vbo_collection_rate", text="Garbage Collection Rate") diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 9581be0a9dd..61e6ba892bc 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5565,8 +5565,8 @@ static void rna_def_userdef_system(BlenderRNA *brna) RNA_def_property_ui_text( prop, "VBO Time Out", - "Time since last access of a GL Vertex buffer object in seconds after which it is freed " - "(set to 0 to keep vbo allocated)"); + "Time since last access of a GL vertex buffer object in seconds after which it is freed " + "(set to 0 to keep VBO allocated)"); prop = RNA_def_property(srna, "vbo_collection_rate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "vbocollectrate"); @@ -5574,7 +5574,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) RNA_def_property_ui_text( prop, "VBO Collection Rate", - "Number of seconds between each run of the GL Vertex buffer object garbage collector"); + "Number of seconds between each run of the GL vertex buffer object garbage collector"); /* Select */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [646ef6e1577] master: UI: Avoid the word "Use" in checkbox labels
Commit: 646ef6e157749a0b716ccf5601425ee9fa8da6ec Author: Pablo Vazquez Date: Wed Aug 17 22:14:28 2022 +0200 Branches: master https://developer.blender.org/rB646ef6e157749a0b716ccf5601425ee9fa8da6ec UI: Avoid the word "Use" in checkbox labels As per the writing styles guidelines. https://wiki.blender.org/wiki/Human_Interface_Guidelines/Writing_Style === M release/scripts/startup/bl_ui/space_userpref.py === diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index d4aea581a55..44aefc5a374 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -652,7 +652,7 @@ class USERPREF_PT_system_video_sequencer(SystemPanel, CenterAlignMixIn, Panel): layout.separator() -layout.prop(system, "use_sequencer_disk_cache") +layout.prop(system, "use_sequencer_disk_cache", text="Disk Cache") col = layout.column() col.active = system.use_sequencer_disk_cache col.prop(system, "sequencer_disk_cache_dir", text="Directory") ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [5fa64f65657] temp-pbvh-split: Mesh: Add Auto Smooth option to Shade Smooth operator
Commit: 5fa64f65657616b37d8b0c06c526ab7a315dbbd2 Author: Pablo Vazquez Date: Wed May 11 11:54:14 2022 +0200 Branches: temp-pbvh-split https://developer.blender.org/rB5fa64f65657616b37d8b0c06c526ab7a315dbbd2 Mesh: Add Auto Smooth option to Shade Smooth operator Add a property to the **Shade Smooth** operator to quickly enable the Mesh `use_auto_smooth` option. The `Angle` property is exposed in the **Adjust Last Operation** panel to make it easy to tweak on multiple objects without having to go to the Properties editor. The operator is exposed in the `Object` menu and `Object Context Menu`. === Demo === {F13066173, size=full} Regarding the implementation, there are multiple ways to go about this (like making a whole new operator altogether), but I think a property is the cleanest/simplest. I imagine there are simpler ways to achieve this without duplicating the `use_auto_smooth` property in the operator itself (getting it from the Mesh props?), but I couldn't find other operators doing something similar. Reviewed By: #modeling, mont29 Differential Revision: https://developer.blender.org/D14894 === M release/scripts/startup/bl_ui/space_view3d.py M source/blender/blenkernel/BKE_mesh.h M source/blender/blenkernel/intern/mesh.cc M source/blender/editors/object/object_edit.c === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 7bac7343bca..9ea120616f4 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2346,6 +2346,7 @@ class VIEW3D_MT_object(Menu): layout.separator() layout.operator("object.shade_smooth") +layout.operator("object.shade_smooth", text="Shade Auto Smooth").use_auto_smooth = True layout.operator("object.shade_flat") layout.separator() @@ -2588,7 +2589,8 @@ class VIEW3D_MT_object_context_menu(Menu): # Shared among some object types. if obj is not None: if obj.type in {'MESH', 'CURVE', 'SURFACE'}: -layout.operator("object.shade_smooth", text="Shade Smooth") +layout.operator("object.shade_smooth") +layout.operator("object.shade_smooth", text="Shade Auto Smooth").use_auto_smooth = True layout.operator("object.shade_flat", text="Shade Flat") layout.separator() diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 091f30825ae..3e06a9d9e9c 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -204,6 +204,7 @@ bool BKE_mesh_material_index_used(struct Mesh *me, short index); void BKE_mesh_material_index_clear(struct Mesh *me); void BKE_mesh_material_remap(struct Mesh *me, const unsigned int *remap, unsigned int remap_len); void BKE_mesh_smooth_flag_set(struct Mesh *me, bool use_smooth); +void BKE_mesh_auto_smooth_flag_set(struct Mesh *me, bool use_auto_smooth, float auto_smooth_angle); /** * Needed after converting a mesh with subsurf optimal display to mesh. diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index 628f59ae449..4e3544d0f60 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -1577,6 +1577,19 @@ void BKE_mesh_smooth_flag_set(Mesh *me, const bool use_smooth) } } +void BKE_mesh_auto_smooth_flag_set(Mesh *me, + const bool use_auto_smooth, + const float auto_smooth_angle) +{ + if (use_auto_smooth) { +me->flag |= ME_AUTOSMOOTH; +me->smoothresh = auto_smooth_angle; + } + else { +me->flag &= ~ME_AUTOSMOOTH; + } +} + int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart, uint vert) { for (int j = 0; j < poly->totloop; j++, loopstart++) { diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index cb0e76c11e4..c9626e674f2 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -17,6 +17,7 @@ #include "BLI_blenlib.h" #include "BLI_ghash.h" +#include "BLI_math_rotation.h" #include "BLI_utildefines.h" #include "BLT_translation.h" @@ -86,6 +87,7 @@ #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" +#include "RNA_types.h" #include "UI_interface_icons.h" @@ -1461,6 +1463,8 @@ void OBJECT_OT_paths_clear(wmOperatorType *ot) static int shade_smooth_exec(bContext
[Bf-blender-cvs] [eef98e66cf9] master: Mesh: Add Auto Smooth option to Shade Smooth operator
Commit: eef98e66cf9e726ae262a7bb7f734d01b9577812 Author: Pablo Vazquez Date: Wed May 11 11:54:14 2022 +0200 Branches: master https://developer.blender.org/rBeef98e66cf9e726ae262a7bb7f734d01b9577812 Mesh: Add Auto Smooth option to Shade Smooth operator Add a property to the **Shade Smooth** operator to quickly enable the Mesh `use_auto_smooth` option. The `Angle` property is exposed in the **Adjust Last Operation** panel to make it easy to tweak on multiple objects without having to go to the Properties editor. The operator is exposed in the `Object` menu and `Object Context Menu`. === Demo === {F13066173, size=full} Regarding the implementation, there are multiple ways to go about this (like making a whole new operator altogether), but I think a property is the cleanest/simplest. I imagine there are simpler ways to achieve this without duplicating the `use_auto_smooth` property in the operator itself (getting it from the Mesh props?), but I couldn't find other operators doing something similar. Reviewed By: #modeling, mont29 Differential Revision: https://developer.blender.org/D14894 === M release/scripts/startup/bl_ui/space_view3d.py M source/blender/blenkernel/BKE_mesh.h M source/blender/blenkernel/intern/mesh.cc M source/blender/editors/object/object_edit.c === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 7bac7343bca..9ea120616f4 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2346,6 +2346,7 @@ class VIEW3D_MT_object(Menu): layout.separator() layout.operator("object.shade_smooth") +layout.operator("object.shade_smooth", text="Shade Auto Smooth").use_auto_smooth = True layout.operator("object.shade_flat") layout.separator() @@ -2588,7 +2589,8 @@ class VIEW3D_MT_object_context_menu(Menu): # Shared among some object types. if obj is not None: if obj.type in {'MESH', 'CURVE', 'SURFACE'}: -layout.operator("object.shade_smooth", text="Shade Smooth") +layout.operator("object.shade_smooth") +layout.operator("object.shade_smooth", text="Shade Auto Smooth").use_auto_smooth = True layout.operator("object.shade_flat", text="Shade Flat") layout.separator() diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 091f30825ae..3e06a9d9e9c 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -204,6 +204,7 @@ bool BKE_mesh_material_index_used(struct Mesh *me, short index); void BKE_mesh_material_index_clear(struct Mesh *me); void BKE_mesh_material_remap(struct Mesh *me, const unsigned int *remap, unsigned int remap_len); void BKE_mesh_smooth_flag_set(struct Mesh *me, bool use_smooth); +void BKE_mesh_auto_smooth_flag_set(struct Mesh *me, bool use_auto_smooth, float auto_smooth_angle); /** * Needed after converting a mesh with subsurf optimal display to mesh. diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index 628f59ae449..4e3544d0f60 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -1577,6 +1577,19 @@ void BKE_mesh_smooth_flag_set(Mesh *me, const bool use_smooth) } } +void BKE_mesh_auto_smooth_flag_set(Mesh *me, + const bool use_auto_smooth, + const float auto_smooth_angle) +{ + if (use_auto_smooth) { +me->flag |= ME_AUTOSMOOTH; +me->smoothresh = auto_smooth_angle; + } + else { +me->flag &= ~ME_AUTOSMOOTH; + } +} + int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart, uint vert) { for (int j = 0; j < poly->totloop; j++, loopstart++) { diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index cb0e76c11e4..c9626e674f2 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -17,6 +17,7 @@ #include "BLI_blenlib.h" #include "BLI_ghash.h" +#include "BLI_math_rotation.h" #include "BLI_utildefines.h" #include "BLT_translation.h" @@ -86,6 +87,7 @@ #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" +#include "RNA_types.h" #include "UI_interface_icons.h" @@ -1461,6 +1463,8 @@ void OBJECT_OT_paths_clear(wmOperatorType *ot) static int shade_smooth_exec(bContext *C, wmOperator *op)
[Bf-blender-cvs] [36e330bd9cc] master: UI: Layout tweaks to Curve Guide force field min/max distance
Commit: 36e330bd9cc1d5864d3420031aa7c0ba5ef5d27f Author: Pablo Vazquez Date: Mon May 9 16:08:34 2022 +0200 Branches: master https://developer.blender.org/rB36e330bd9cc1d5864d3420031aa7c0ba5ef5d27f UI: Layout tweaks to Curve Guide force field min/max distance For consistency with other force fields and other areas in Blender. * Align "Use Max" and "Maximum Distance" in one line. * Rename "Maximum Distance" to "Max Distance" * Rename "Minimum Distance" to "Min Distance" * Move "Minimum Distance" below maximum. === M release/scripts/startup/bl_ui/properties_physics_field.py === diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py index c1b213766df..2e7e68f02ef 100644 --- a/release/scripts/startup/bl_ui/properties_physics_field.py +++ b/release/scripts/startup/bl_ui/properties_physics_field.py @@ -77,7 +77,6 @@ class PHYSICS_PT_field_settings(PhysicButtonsPanel, Panel): elif field.type == 'GUIDE': col = flow.column() -col.prop(field, "guide_minimum") col.prop(field, "guide_free") col.prop(field, "falloff_power") col.prop(field, "use_guide_path_add") @@ -88,11 +87,20 @@ class PHYSICS_PT_field_settings(PhysicButtonsPanel, Panel): col = flow.column() col.prop(field, "guide_clump_amount", text="Clumping Amount") col.prop(field, "guide_clump_shape") -col.prop(field, "use_max_distance") -sub = col.column() +col.separator() + +col.prop(field, "guide_minimum", text="Min Distance") + +col = layout.column(align=False, heading="Max Distance") +col.use_property_decorate = False +row = col.row(align=True) +sub = row.row(align=True) +sub.prop(field, "use_max_distance", text="") +sub = sub.row(align=True) sub.active = field.use_max_distance -sub.prop(field, "distance_max") +sub.prop(field, "distance_max", text="") +row.prop_decorator(field, "distance_max") elif field.type == 'TEXTURE': col = flow.column() ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4fa71be89a4] master: UI: Sort Force Field enums alphabetically
Commit: 4fa71be89a4f852c3587b2e55f0c78ee897fd63c Author: Pablo Vazquez Date: Thu May 5 18:00:07 2022 +0200 Branches: master https://developer.blender.org/rB4fa71be89a4f852c3587b2e55f0c78ee897fd63c UI: Sort Force Field enums alphabetically For consistency with the rest of Blender. * Use a blank icon for "None" type, so the label aligns with the rest. * Use "None" instead of "Nothing" for Kink type dropdown entry. === M source/blender/makesrna/intern/rna_object_force.c === diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index f92ea8df459..addc8ac0c6c 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -1395,97 +1395,97 @@ static void rna_def_field(BlenderRNA *brna) PropertyRNA *prop; static const EnumPropertyItem field_type_items[] = { - {0, "NONE", 0, "None", ""}, + {0, "NONE", ICON_BLANK1, "None", ""}, + {PFIELD_BOID, + "BOID", + ICON_FORCE_BOID, + "Boid", + "Create a force that acts as a boid's predators or target"}, + {PFIELD_CHARGE, + "CHARGE", + ICON_FORCE_CHARGE, + "Charge", + "Spherical forcefield based on the charge of particles, " + "only influences other charge force fields"}, + {PFIELD_GUIDE, + "GUIDE", + ICON_FORCE_CURVE, + "Curve Guide", + "Create a force along a curve object"}, + {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", "Create a force that dampens motion"}, + {PFIELD_FLUIDFLOW, + "FLUID_FLOW", + ICON_FORCE_FLUIDFLOW, + "Fluid Flow", + "Create a force based on fluid simulation velocities"}, {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", "Radial field toward the center of object"}, - {PFIELD_WIND, - "WIND", - ICON_FORCE_WIND, - "Wind", - "Constant force along the force object's local Z axis"}, - {PFIELD_VORTEX, - "VORTEX", - ICON_FORCE_VORTEX, - "Vortex", - "Spiraling force that twists the force object's local Z axis"}, - {PFIELD_MAGNET, - "MAGNET", - ICON_FORCE_MAGNETIC, - "Magnetic", - "Forcefield depends on the speed of the particles"}, {PFIELD_HARMONIC, "HARMONIC", ICON_FORCE_HARMONIC, "Harmonic", "The source of this force field is the zero point of a harmonic oscillator"}, - {PFIELD_CHARGE, - "CHARGE", - ICON_FORCE_CHARGE, - "Charge", - "Spherical forcefield based on the charge of particles, " - "only influences other charge force fields"}, {PFIELD_LENNARDJ, "LENNARDJ", ICON_FORCE_LENNARDJONES, "Lennard-Jones", "Forcefield based on the Lennard-Jones potential"}, + {PFIELD_MAGNET, + "MAGNET", + ICON_FORCE_MAGNETIC, + "Magnetic", + "Forcefield depends on the speed of the particles"}, {PFIELD_TEXTURE, "TEXTURE", ICON_FORCE_TEXTURE, "Texture", "Force field based on a texture"}, - {PFIELD_GUIDE, - "GUIDE", - ICON_FORCE_CURVE, - "Curve Guide", - "Create a force along a curve object"}, - {PFIELD_BOID, - "BOID", - ICON_FORCE_BOID, - "Boid", - "Create a force that acts as a boid's predators or target"}, {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, "Turbulence", "Create turbulence with a noise field"}, - {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", "Create a force that dampens motion"}, - {PFIELD_FLUIDFLOW, - "FLUID_FLOW", - ICON_FORCE_FLUIDFLOW, - "Fluid Flow", - "Create a force based on fluid simulation velocities"}, + {PFIELD_VORTEX, + "VORTEX", + ICON_FORCE_VORTEX, + "Vortex", + "Spiraling force that twists the force object's local Z axis"}, + {PFIELD_WIND, + "WIND", + ICON_FORCE_WIND, + "Wind", + "Constant force along the force object's local Z axis"},
[Bf-blender-cvs] [b0e47ffdcf1] master: UI: Sort VSE modifiers alphabetically
Commit: b0e47ffdcf13cd00c42e6cab4c3556679ad9fea4 Author: Pablo Vazquez Date: Thu Apr 28 14:40:31 2022 +0200 Branches: master https://developer.blender.org/rBb0e47ffdcf13cd00c42e6cab4c3556679ad9fea4 UI: Sort VSE modifiers alphabetically === M source/blender/makesrna/intern/rna_sequencer.c === diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 3fd87a16d28..51f62b62c8e 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -60,13 +60,13 @@ typedef struct EffectInfo { } EffectInfo; const EnumPropertyItem rna_enum_sequence_modifier_type_items[] = { +{seqModifierType_BrightContrast, "BRIGHT_CONTRAST", ICON_NONE, "Bright/Contrast", ""}, {seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""}, {seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""}, {seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""}, -{seqModifierType_BrightContrast, "BRIGHT_CONTRAST", ICON_NONE, "Bright/Contrast", ""}, {seqModifierType_Mask, "MASK", ICON_NONE, "Mask", ""}, -{seqModifierType_WhiteBalance, "WHITE_BALANCE", ICON_NONE, "White Balance", ""}, {seqModifierType_Tonemap, "TONEMAP", ICON_NONE, "Tone Map", ""}, +{seqModifierType_WhiteBalance, "WHITE_BALANCE", ICON_NONE, "White Balance", ""}, {0, NULL, 0, NULL, NULL}, }; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [fabd088067a] master: Update splash for Blender 3.x development series
Commit: fabd088067a49bf854594e7a7d7d363df8624790 Author: Pablo Vazquez Date: Fri Nov 19 18:39:07 2021 +0100 Branches: master https://developer.blender.org/rBfabd088067a49bf854594e7a7d7d363df8624790 Update splash for Blender 3.x development series CC-BY Blender Studio https://studio.blender.org Update the splash artwork for the daily builds (`master`) to celebrate the beginning of a new major series in Blender. The badges of the Development Fund membership levels have been removed for a simpler design, and the font matches the one used elsewhere in blender.org === M release/datafiles/splash.png === diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png index babb3e30c6d..7189380bbd9 100644 Binary files a/release/datafiles/splash.png and b/release/datafiles/splash.png differ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e1bd4bbb666] master: UI: Introduce View pie in more editors
Commit: e1bd4bbb6668b7fa4ac1badfe72d8904a559eb99 Author: Pablo Vazquez Date: Wed Nov 10 02:17:24 2021 +0100 Branches: master https://developer.blender.org/rBe1bd4bbb6668b7fa4ac1badfe72d8904a559eb99 UI: Introduce View pie in more editors Motivation The View pie menu is a convenient way to access operators such as `Frame Selected` and `Frame All` which are usually mapped to `PERIOD` or `HOME` keys on the right side of most keyboard, making it hard hard to reach with the left hand. The motivation for this patch comes from working with a 75% keyboard (no numpad). Most laptops face a similar problem. Implementation The View pie menu has been added to the following editors and sub-modes where applicable: * Node Editor * Video Sequencer * Dopesheet * Graph * NLA * Image * Clip * Outliner More options could definitely be added to this menu for convenience, as long as it maintains the common options in the same place (Frame Selected on the left, Frame All on the right). For positioning I went with the following layout: {F11791186, size=full} I've added `Zoom 1:1`to the Image Editor and the VSE Preview since there is no way to reset the zoom on keyboards without numpad (unless Emulate Numpad is turned on). The Outliner uses `Show Active` and `Show Hierarchy` which are the closest ones to the equivalent in other editors. Should `Show Active` be renamed to `Frame Selected`? The shortcut assigned is the same as the 3D Viewport (`ACCENT_GRAVE`). Screenshots Node Editor {F11778387, size=full} Dopesheet {F11778400, size=full} Graph {F11778403, size=full} Image Editor (Paint and View) {F11791113, size=full} Image Editor (Mask) {F11791114, size=full} UV Editor {F11791119, size=full} Clip Editor (Tracking) {F11791137, size=full} Clip Editor (Mask) {F11791140, size=full} Clip Editor (Graph) {F11791151, size=full} View operators are not yet implemented in Clip Editor Dopesheet mode (left a note about this in the menu poll). Reviewed By: #user_interface, campbellbarton Differential Revision: https://developer.blender.org/D13169 === M release/scripts/presets/keyconfig/keymap_data/blender_default.py M release/scripts/startup/bl_ui/space_clip.py M release/scripts/startup/bl_ui/space_dopesheet.py M release/scripts/startup/bl_ui/space_graph.py M release/scripts/startup/bl_ui/space_image.py M release/scripts/startup/bl_ui/space_nla.py M release/scripts/startup/bl_ui/space_node.py M release/scripts/startup/bl_ui/space_outliner.py M release/scripts/startup/bl_ui/space_sequencer.py === diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index d6032a3ecce..dbc93cb6caa 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1097,6 +1097,7 @@ def km_outliner(params): # Fall through to generic context menu if the item(s) selected have no type specific actions. ("outliner.operation", {"type": 'RIGHTMOUSE', "value": 'PRESS'}, None), op_menu("OUTLINER_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), +op_menu_pie("OUTLINER_MT_view_pie", {"type": 'ACCENT_GRAVE', "value": 'PRESS'}), ("outliner.item_drag_drop", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, None), ("outliner.item_drag_drop", {"type": 'EVT_TWEAK_L', "value": 'ANY', "shift": True}, None), ("outliner.show_hierarchy", {"type": 'HOME', "value": 'PRESS'}, None), @@ -1748,6 +1749,7 @@ def km_graph_editor(params): ("graph.view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None), ("graph.view_selected", {"type": 'NUMPAD_PERIOD', "value": 'PRESS'}, None), ("graph.view_frame", {"type": 'NUMPAD_0', "value": 'PRESS'}, None), +op_menu_pie("GRAPH_MT_view_pie", {"type": 'ACCENT_GRAVE', "value": 'PRESS'}), ("graph.fmodifier_add", {"type": 'M', "value": 'PRESS', "shift": True, "ctrl": True}, {"properties": [("only_active", False)]}), ("anim.channels_editable_toggle", {"type": 'TAB', "value": 'PRESS'}, None), @@ -1815,6 +1817,7 @@ def km_image_generic(params): ("image.cycle_render_slot", {"type": 'J', "value": 'PRESS', "repeat": True}, None), ("image
[Bf-blender-cvs] [fb0ae66ee59] master: Merge branch 'blender-v3.0-release'
Commit: fb0ae66ee59dca499fd64947f395b8ad6b74a2be Author: Pablo Vazquez Date: Tue Nov 9 16:10:19 2021 +0100 Branches: master https://developer.blender.org/rBfb0ae66ee59dca499fd64947f395b8ad6b74a2be Merge branch 'blender-v3.0-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [368d7944073] blender-v3.0-release: Cleanup: Remove `SMALL_TRI_RIGHT_VEC` icon
Commit: 368d7944073ed022047ec4ff48eab7c272d5e750 Author: Pablo Vazquez Date: Tue Nov 9 16:09:53 2021 +0100 Branches: blender-v3.0-release https://developer.blender.org/rB368d7944073ed022047ec4ff48eab7c272d5e750 Cleanup: Remove `SMALL_TRI_RIGHT_VEC` icon Since the recent change to context paths to use the arrow icon instead of the triangle (D13106), the `SMALL_TRI_RIGHT_VEC`is no longer used. This patch removes the icon and all references. - Replace `SMALL_TRI_RIGHT_VEC` with `RIGHTARROW` in Freestyle UI - Remove references to `SMALL_TRI_RIGHT_VEC` and `ICON_SMALL_TRI_RIGHT_VEC`. Fix for built-in add-ons has been done in rBAcc2f71bfe9b0/rBAa84028f8a89a. This will be added to the list of breaking changes [[ https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Python_API#Breaking_Changes | in the Wiki ]]. Reviewed By: Severin Differential Revision: https://developer.blender.org/D13130 === M release/scripts/startup/bl_ui/properties_freestyle.py M source/blender/editors/include/UI_icons.h M source/blender/editors/include/UI_resources.h === diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index 4519390f953..802812020b7 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -526,7 +526,7 @@ class VIEWLAYER_PT_freestyle_linestyle_strokes(ViewLayerFreestyleLineStyle, Pane row = layout.row(align=True) row.alignment = 'LEFT' row.label(text=lineset.name, icon='LINE_DATA') -row.label(text="", icon='SMALL_TRI_RIGHT_VEC') +row.label(text="", icon='RIGHTARROW') row.label(text=linestyle.name) col = layout.column(align=True) @@ -830,7 +830,7 @@ class VIEWLAYER_PT_freestyle_linestyle_color(ViewLayerFreestyleLineStyle, Panel) row = layout.row(align=True) row.alignment = 'LEFT' row.label(text=lineset.name, icon='LINE_DATA') -row.label(text="", icon='SMALL_TRI_RIGHT_VEC') +row.label(text="", icon='RIGHTARROW') row.label(text=linestyle.name) col = layout.column() @@ -922,7 +922,7 @@ class VIEWLAYER_PT_freestyle_linestyle_alpha(ViewLayerFreestyleLineStyle, Panel) row = layout.row(align=True) row.alignment = 'LEFT' row.label(text=lineset.name, icon='LINE_DATA') -row.label(text="", icon='SMALL_TRI_RIGHT_VEC') +row.label(text="", icon='RIGHTARROW') row.label(text=linestyle.name) col = layout.column() @@ -1036,7 +1036,7 @@ class VIEWLAYER_PT_freestyle_linestyle_thickness(ViewLayerFreestyleLineStyle, Pa row = layout.row(align=True) row.alignment = 'LEFT' row.label(text=lineset.name, icon='LINE_DATA') -row.label(text="", icon='SMALL_TRI_RIGHT_VEC') +row.label(text="", icon='RIGHTARROW') row.label(text=linestyle.name) col = layout.column() @@ -1182,7 +1182,7 @@ class VIEWLAYER_PT_freestyle_linestyle_geometry(ViewLayerFreestyleLineStyle, Pan row = layout.row(align=True) row.alignment = 'LEFT' row.label(text=lineset.name, icon='LINE_DATA') -row.label(text="", icon='SMALL_TRI_RIGHT_VEC') +row.label(text="", icon='RIGHTARROW') row.label(text=linestyle.name) col = layout.column() @@ -1215,7 +1215,7 @@ class VIEWLAYER_PT_freestyle_linestyle_texture(ViewLayerFreestyleLineStyle, Pane row = layout.row(align=True) row.alignment = 'LEFT' row.label(text=lineset.name, icon='LINE_DATA') -row.label(text="", icon='SMALL_TRI_RIGHT_VEC') +row.label(text="", icon='RIGHTARROW') row.label(text=linestyle.name) layout.prop(linestyle, "use_nodes") diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 8a7df5b54ff..c3c296f89ca 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -944,9 +944,7 @@ DEF_ICON_COLOR(GPBRUSH_ERASE_SOFT) DEF_ICON_COLOR(GPBRUSH_ERASE_HARD) DEF_ICON_COLOR(GPBRUSH_ERASE_STROKE) -/* Vector Icons */ -DEF_ICON_VECTOR(SMALL_TRI_RIGHT_VEC) - +/* Vector icons. */ DEF_ICON_VECTOR(KEYTYPE_KEYFRAME_VEC) DEF_ICON_VECTOR(KEYTYPE_BREAKDOWN_VEC) DEF_ICON_VECTOR(KEYTYPE_EXTREME_VEC) diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index c3a00bedaf8..61da496d344 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -39,10 +39,6 @@ typedef enum { #define BIFICONID_FIRST (ICON_NONE) -/* Removed icon no lon
[Bf-blender-cvs] [81bee0e75a9] master: UI: Fix minor theme mismatch
Commit: 81bee0e75a9911cf80eed00acaee8003cde55c28 Author: Pablo Vazquez Date: Fri Nov 5 19:10:03 2021 +0100 Branches: master https://developer.blender.org/rB81bee0e75a9911cf80eed00acaee8003cde55c28 UI: Fix minor theme mismatch Pie menu got wrong item highlight and options settings were outdated. === M release/datafiles/userdef/userdef_default_theme.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index ed98bb5fdf4..da01f65131c 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -26,7 +26,7 @@ const bTheme U_theme_default = { .inner = RGBA(0x545454ff), .inner_sel = RGBA(0x4772b3ff), .item = RGBA(0x1d1d1d80), - .text = RGBA(0xd9d9d9ff), + .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), .roundness = 0.2f, }, @@ -69,8 +69,8 @@ const bTheme U_theme_default = { .wcol_option = { .outline = RGBA(0x3d3d3dff), .inner = RGBA(0x545454ff), - .inner_sel = RGBA(0x6699e6ff), - .item = RGBA(0x11ff), + .inner_sel = RGBA(0x4772b3ff), + .item = RGBA(0x), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), .roundness = 0.2f, @@ -196,7 +196,7 @@ const bTheme U_theme_default = { .outline = RGBA(0x242424ff), .inner = RGBA(0x181818ff), .inner_sel = RGBA(0x4772b3ff), - .item = RGBA(0xd9d9d9ff), + .item = RGBA(0x545454ff), .text = RGBA(0xd9d9d9ff), .text_sel = RGBA(0x), .roundness = 0.2f, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ae899e4bb8b] blender-v3.0-release: UI: Fix minor theme mismatch
Commit: ae899e4bb8b916c555a6fa490f201d5fa51f578f Author: Pablo Vazquez Date: Fri Nov 5 19:10:03 2021 +0100 Branches: blender-v3.0-release https://developer.blender.org/rBae899e4bb8b916c555a6fa490f201d5fa51f578f UI: Fix minor theme mismatch Pie menu got wrong item highlight and options settings were outdated. === M release/datafiles/userdef/userdef_default_theme.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index ed98bb5fdf4..da01f65131c 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -26,7 +26,7 @@ const bTheme U_theme_default = { .inner = RGBA(0x545454ff), .inner_sel = RGBA(0x4772b3ff), .item = RGBA(0x1d1d1d80), - .text = RGBA(0xd9d9d9ff), + .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), .roundness = 0.2f, }, @@ -69,8 +69,8 @@ const bTheme U_theme_default = { .wcol_option = { .outline = RGBA(0x3d3d3dff), .inner = RGBA(0x545454ff), - .inner_sel = RGBA(0x6699e6ff), - .item = RGBA(0x11ff), + .inner_sel = RGBA(0x4772b3ff), + .item = RGBA(0x), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), .roundness = 0.2f, @@ -196,7 +196,7 @@ const bTheme U_theme_default = { .outline = RGBA(0x242424ff), .inner = RGBA(0x181818ff), .inner_sel = RGBA(0x4772b3ff), - .item = RGBA(0xd9d9d9ff), + .item = RGBA(0x545454ff), .text = RGBA(0xd9d9d9ff), .text_sel = RGBA(0x), .roundness = 0.2f, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [bbd8d33453f] master: Merge branch 'blender-v3.0-release'
Commit: bbd8d33453fca1be05bced39dcbff5ee02fa8da3 Author: Pablo Vazquez Date: Fri Nov 5 16:23:56 2021 +0100 Branches: master https://developer.blender.org/rBbbd8d33453fca1be05bced39dcbff5ee02fa8da3 Merge branch 'blender-v3.0-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7c755293330] blender-v3.0-release: UI: Use arrow icon on context paths
Commit: 7c755293330e8ebe8717b0a34e6031b4e3186f0d Author: Pablo Vazquez Date: Fri Nov 5 16:22:48 2021 +0100 Branches: blender-v3.0-release https://developer.blender.org/rB7c755293330e8ebe8717b0a34e6031b4e3186f0d UI: Use arrow icon on context paths The current `ICON_SMALL_TRI_RIGHT_VEC` uses dark hard-coded colors ([`0.2`, `0.2`, `0.2`]) which makes it impossible to theme and hard to see in dark contexts. Use `ICON_RIGHTARROW` to match the Outliner's breadcrumbs. This icon uses `TH_TEXT` so it's visible as long as the rest of the text is. # Master (Properties editor background made red on purpose to be able to see the triangle icon) {F11713038, size=full} This patch {F11713039, size=full} Reviewed By: #user_interface, Severin, HooglyBoogly Maniphest Tasks: T92771 Differential Revision: https://developer.blender.org/D13106 === M source/blender/editors/include/UI_resources.h M source/blender/editors/interface/interface_icons.c M source/blender/editors/space_buttons/buttons_context.c M source/blender/editors/space_graph/graph_buttons.c M source/blender/editors/space_nla/nla_buttons.c === diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 61da496d344..c3a00bedaf8 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -39,6 +39,10 @@ typedef enum { #define BIFICONID_FIRST (ICON_NONE) +/* Removed icon no longer used, defined so that add-ons don't have to be \ + * updated. */ +#define ICON_SMALL_TRI_RIGHT_VEC (ICON_RIGHTARROW) + /* use to denote intentionally unset theme color */ #define TH_UNDEFINED -1 diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index c20129b4184..5784af90834 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -259,31 +259,6 @@ static void viconutil_set_point(int pt[2], int x, int y) pt[1] = y; } -static void vicon_small_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha) -{ - int pts[3][2]; - const int cx = x + w / 2 - 4; - const int cy = y + w / 2; - const int d = w / 5, d2 = w / 7; - - viconutil_set_point(pts[0], cx - d2, cy + d); - viconutil_set_point(pts[1], cx - d2, cy - d); - viconutil_set_point(pts[2], cx + d2, cy); - - uint pos = GPU_vertformat_attr_add( - immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - immUniformColor4f(0.2f, 0.2f, 0.2f, alpha); - - immBegin(GPU_PRIM_TRIS, 3); - immVertex2iv(pos, pts[0]); - immVertex2iv(pos, pts[1]); - immVertex2iv(pos, pts[2]); - immEnd(); - - immUnbindProgram(); -} - static void vicon_keytype_draw_wrapper( int x, int y, int w, int h, float alpha, short key_type, short handle_type) { @@ -982,8 +957,6 @@ static void init_internal_icons(void) } } - def_internal_vicon(ICON_SMALL_TRI_RIGHT_VEC, vicon_small_tri_right_draw); - def_internal_vicon(ICON_KEYTYPE_KEYFRAME_VEC, vicon_keytype_keyframe_draw); def_internal_vicon(ICON_KEYTYPE_BREAKDOWN_VEC, vicon_keytype_breakdown_draw); def_internal_vicon(ICON_KEYTYPE_EXTREME_VEC, vicon_keytype_extreme_draw); diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 600b04f8563..f5107cb13fd 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -1225,7 +1225,7 @@ static void buttons_panel_context_draw(const bContext *C, Panel *panel) /* Add > triangle. */ if (!first) { - uiItemL(row, "", ICON_SMALL_TRI_RIGHT_VEC); + uiItemL(row, "", ICON_RIGHTARROW); } if (ptr->data == NULL) { diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 275616f3bcb..26a056ce1fb 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -924,7 +924,7 @@ static void graph_draw_driven_property_panel(uiLayout *layout, ID *id, FCurve *f uiItemL(row, id->name + 2, icon); /* -> user friendly 'name' for F-Curve/driver target */ - uiItemL(row, "", ICON_SMALL_TRI_RIGHT_VEC); + uiItemL(row, "", ICON_RIGHTARROW); uiItemL(row, name, ICON_RNA); } diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 215e865d194..81932589663 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -312,7 +312,7 @@ static void nla_panel_animdata(const bContext *C, Pane
[Bf-blender-cvs] [885c79915f5] master: Merge branch 'blender-v3.0-release'
Commit: 885c79915f58c39741abb47bc4e1ad0f45e5c6c2 Author: Pablo Vazquez Date: Fri Nov 5 15:08:09 2021 +0100 Branches: master https://developer.blender.org/rB885c79915f58c39741abb47bc4e1ad0f45e5c6c2 Merge branch 'blender-v3.0-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e65230f0c03] blender-v3.0-release: UI: Various theme fixes related to contrast
Commit: e65230f0c03c60f4e7b6561dcec8928992861a59 Author: Pablo Vazquez Date: Fri Nov 5 15:06:27 2021 +0100 Branches: blender-v3.0-release https://developer.blender.org/rBe65230f0c03c60f4e7b6561dcec8928992861a59 UI: Various theme fixes related to contrast * Animation channels (Fixes T92612) * Curve widget (Fixes T92595) * Pie menu (Fixes T92590) * Radio and toggle buttons background * Checkbox background * Fix highlighted marker name on Dopesheet (text highlight on Dopesheet) Master {F11697667, size=full} This Patch {F11697669, size=full} {F11697849, size=full} {F11697833, size=full} {F11697852, size=full} Reviewed By: #user_interface, campbellbarton, Severin Maniphest Tasks: T92595, T92612, T92590 Differential Revision: https://developer.blender.org/D13087 # Conflicts: # source/blender/blenkernel/BKE_blender_version.h === M release/datafiles/userdef/userdef_default_theme.c M source/blender/blenkernel/BKE_blender_version.h M source/blender/blenloader/intern/versioning_userdef.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 69d542da23a..ed98bb5fdf4 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -25,7 +25,7 @@ const bTheme U_theme_default = { .outline = RGBA(0x3d3d3dff), .inner = RGBA(0x545454ff), .inner_sel = RGBA(0x4772b3ff), - .item = RGBA(0xff80), + .item = RGBA(0x1d1d1d80), .text = RGBA(0xd9d9d9ff), .text_sel = RGBA(0x), .roundness = 0.2f, @@ -43,7 +43,7 @@ const bTheme U_theme_default = { .outline = RGBA(0x3d3d3dff), .inner = RGBA(0x282828ff), .inner_sel = RGBA(0x4772b3ff), - .item = RGBA(0xff80), + .item = RGBA(0xffb3), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), .roundness = 0.2f, @@ -59,7 +59,7 @@ const bTheme U_theme_default = { }, .wcol_radio = { .outline = RGBA(0x3d3d3dff), - .inner = RGBA(0x282828ff), + .inner = RGBA(0x545454ff), .inner_sel = RGBA(0x4772b3ff), .item = RGBA(0x252525ff), .text = RGBA(0xe6e6e6ff), @@ -68,8 +68,8 @@ const bTheme U_theme_default = { }, .wcol_option = { .outline = RGBA(0x3d3d3dff), - .inner = RGBA(0x282828ff), - .inner_sel = RGBA(0x71aa), + .inner = RGBA(0x545454ff), + .inner_sel = RGBA(0x6699e6ff), .item = RGBA(0x11ff), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), @@ -77,7 +77,7 @@ const bTheme U_theme_default = { }, .wcol_toggle = { .outline = RGBA(0x3d3d3dff), - .inner = RGBA(0x282828ff), + .inner = RGBA(0x545454ff), .inner_sel = RGBA(0x4772b3ff), .item = RGBA(0x252525ff), .text = RGBA(0xe6e6e6ff), @@ -148,11 +148,11 @@ const bTheme U_theme_default = { .roundness = 0.2f, }, .wcol_tooltip = { - .outline = RGBA(0x19191aff), - .inner = RGBA(0x181818ff), - .inner_sel = RGBA(0x181818ff), - .item = RGBA(0x181818ff), - .text = RGBA(0xccff), + .outline = RGBA(0x242424ff), + .inner = RGBA(0x1d1d1dff), + .inner_sel = RGBA(0x4772b3ff), + .item = RGBA(0xd9d9d9ff), + .text = RGBA(0xd9d9d9ff), .text_sel = RGBA(0x), .roundness = 0.2f, }, @@ -193,10 +193,10 @@ const bTheme U_theme_default = { .roundness = 0.2f, }, .wcol_pie_menu = { - .outline = RGBA(0x3d3d3dff), + .outline = RGBA(0x242424ff), .inner = RGBA(0x181818ff), - .inner_sel = RGBA(0x5680c2ff), - .item = RGBA(0x4772b3ff), + .inner_sel = RGBA(0x4772b3ff), + .item = RGBA(0xd9d9d9ff), .text = RGBA(0xd9d9d9ff), .text_sel = RGBA(0x), .roundness = 0.2f, @@ -414,7 +414,7 @@ const bTheme U_theme_default = { .list = RGBA(0x1d1d1dff), .list_title = RGBA(0x), .list_text = RGBA(0xb8b8b8ff), -.list_text_hi = RGBA(0x), +.list_text_hi = RGBA(0xffaf23ff), .navigation_bar = RGBA(0x1d1d1dff), .execution_buts = RGBA(0x303030ff), .panelcolors = { @@ -497,7 +497,7 @@ const bTheme U_theme_default = { .back = RGBA(0x30303000), .title = RGBA(0xeeff), .text = RGBA(0xa6a6a6ff), -.text_hi = RGBA(0x143e66ff), +.text_hi = RGBA(0x), .header = RGBA(0x303030b3), .header_text = RGBA(0xeeff), .header_text_hi = RGBA(0x), @@ -512,7 +512,7 @@ const bTheme U_theme_default = { .list = RGBA(0x1d1d1dff), .list_title = RGBA(0x), .list_text = RGBA(0xb8b8b8ff), -.list_text_hi = RGBA(0x), +.list_text_hi = RGBA(0xffaf23ff), .navigation_bar = RGBA(0x1d1d1dff), .execution_buts = RGBA(0x303030ff
[Bf-blender-cvs] [b4af70563ff] blender-v3.0-release: VSE: Remove separator lines between rows
Commit: b4af70563ff181bd7567a4f18af4a050f430dbe9 Author: Pablo Vazquez Date: Fri Nov 5 14:53:27 2021 +0100 Branches: blender-v3.0-release https://developer.blender.org/rBb4af70563ff181bd7567a4f18af4a050f430dbe9 VSE: Remove separator lines between rows The VSE grid theme setting is currently used for two things: * Indicate time intervals (vertical lines) * As separator between channels (horizontal lines) This adds visual noise because for the time interval to be visible, the grid color needs to be bright, resulting in a rectangle-grid backdrop. Recently, the VSE got a theme setting to customize alternate-row background color. This should be sufficient to tell the channels apart without the need for a line in between. Additionally, this patch makes the VSE background use the theme setting as-is, without hard-coded darkening, to ease the tweaking of themes. This aligns the style of the VSE backdrop with the rest of Blender (Outliner rows, File Browser, Spreadsheet, Info and animation editors). Related reports: T92581 Related task: T92792 Before {F11680317, size=full} After {F11694981, size=full} Reviewed By: #user_interface, Severin Maniphest Tasks: T92581 Differential Revision: https://developer.blender.org/D13072 === M release/datafiles/userdef/userdef_default_theme.c M source/blender/editors/space_sequencer/sequencer_draw.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index fc489abace8..69d542da23a 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -612,7 +612,7 @@ const bTheme U_theme_default = { .nla_sound_sel = RGBA(0x1f7a7aff), }, .space_sequencer = { -.back = RGBA(0x30303000), +.back = RGBA(0x18181800), .title = RGBA(0xeeff), .text = RGBA(0xa6a6a6ff), .text_hi = RGBA(0x), @@ -635,7 +635,7 @@ const bTheme U_theme_default = { .sub_back = RGBA(0x001f), }, .shade1 = RGBA(0xa0a0a000), -.grid = RGBA(0x181818ff), +.grid = RGBA(0x303030ff), .vertex_select = RGBA(0xff8500ff), .bone_pose = RGBA(0x50c8ff50), .cframe = RGBA(0x4772b3ff), diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 379788ecf49..3374ff11726 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -2274,11 +2274,11 @@ static void draw_seq_backdrop(View2D *v2d) immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); /* View backdrop. */ - immUniformThemeColorShade(TH_BACK, -25); + immUniformThemeColor(TH_BACK); immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); /* Darker overlay over the view backdrop. */ - immUniformThemeColorShade(TH_BACK, -20); + immUniformThemeColorShade(TH_BACK, -10); immRectf(pos, v2d->cur.xmin, -1.0, v2d->cur.xmax, 1.0); /* Alternating horizontal stripes. */ @@ -2295,19 +2295,6 @@ static void draw_seq_backdrop(View2D *v2d) } GPU_blend(GPU_BLEND_NONE); - - /* Lines separating the horizontal bands. */ - i = max_ii(1, ((int)v2d->cur.ymin) - 1); - int line_len = (int)v2d->cur.ymax - i + 1; - immUniformThemeColorShade(TH_GRID, 10); - immBegin(GPU_PRIM_LINES, line_len * 2); - while (line_len--) { -immVertex2f(pos, v2d->cur.xmax, i); -immVertex2f(pos, v2d->cur.xmin, i); -i++; - } - immEnd(); - immUnbindProgram(); } @@ -2413,7 +2400,7 @@ static void seq_draw_sfra_efra(const Scene *scene, View2D *v2d) immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); /* Draw overlay outside of frame range. */ - immUniformThemeColorShadeAlpha(TH_BACK, -25, -100); + immUniformThemeColorShadeAlpha(TH_BACK, -10, -100); if (frame_sta < frame_end) { immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)frame_sta, v2d->cur.ymax); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [db43d19c163] master: Merge branch 'blender-v3.0-release'
Commit: db43d19c163f999cbbe2e524ace7e29d345a1227 Author: Pablo Vazquez Date: Thu Nov 4 15:32:50 2021 +0100 Branches: master https://developer.blender.org/rBdb43d19c163f999cbbe2e524ace7e29d345a1227 Merge branch 'blender-v3.0-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9e71a075473] blender-v3.0-release: UI: Fix UIList item using "regular" widget colors while edited
Commit: 9e71a07547380db131a817f2af9177e95a6c622a Author: Pablo Vazquez Date: Thu Nov 4 15:31:48 2021 +0100 Branches: blender-v3.0-release https://developer.blender.org/rB9e71a07547380db131a817f2af9177e95a6c622a UI: Fix UIList item using "regular" widget colors while edited Simply removing the check for `UI_STATE_TEXT_INPUT` makes it inherit the "List Item" User Interface theme settings. This patch changes the default theme to match the colors of text input fields. Master {F11680556, size=full} This patch {F11680557, size=full} All the included commmunity themes seem to work well (only Deep Grey might need more contrast but that's a different patch). Related reports: T92720 Reviewed By: #user_interface, Severin Maniphest Tasks: T92720 Differential Revision: https://developer.blender.org/D13073 === M release/datafiles/userdef/userdef_default_theme.c M source/blender/editors/interface/interface_widgets.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index f33ecea0eed..fc489abace8 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -187,7 +187,7 @@ const bTheme U_theme_default = { .outline = RGBA(0x2d2d2dff), .inner = RGBA(0x2d2d2d00), .inner_sel = RGBA(0x484a4fff), - .item = RGBA(0xb3b3b3ff), + .item = RGBA(0x4772b3ff), .text = RGBA(0xccff), .text_sel = RGBA(0x), .roundness = 0.2f, diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 3e9042d29a0..4b11ed61657 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2526,7 +2526,7 @@ static void widget_state(uiWidgetType *wt, int state, int drawflag, eUIEmbossTyp { uiWidgetStateColors *wcol_state = wt->wcol_state; - if ((state & UI_BUT_LIST_ITEM) && !(state & UI_STATE_TEXT_INPUT)) { + if (state & UI_BUT_LIST_ITEM) { /* Override default widget's colors. */ bTheme *btheme = UI_GetTheme(); wt->wcol_theme = >tui.wcol_list_item; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [bfec984cf82] master: UI: Theme refresh for Blender v3.0
Commit: bfec984cf82a64a74ee86a902348a46e3c231b8f Author: Pablo Vazquez Date: Wed Oct 27 18:20:40 2021 +0200 Branches: master https://developer.blender.org/rBbfec984cf82a64a74ee86a902348a46e3c231b8f UI: Theme refresh for Blender v3.0 {F11548100, size=full} To celebrate the beginning of a new series, it feels like the right time to give the theme a fresh look while improving on what already works. The aim of this refresh is to keep a familiar look but with polishing touches here and there. Like new paint on the walls of your well known house. The theme for Blender 2.8 was well received but presented a few flaws. * Transparency on menus and tooltips reduce readability * Mismatch on certain colors, especially outlines of connected widgets * Active/open menus highlight was not prominent enough * Header background mismatch in some editors At the same time we can make use of new features in 3.0: * Make panels look like panels again (like in v2.3!) * Make use of roundness in more widgets * Since nodes are no longer hard-coded to be transparent, tweak opacity and saturation * Tweak colors for the new dot grid This update does not include: * Meshes in edit mode to match greenish object-data color. This needs tweaks in the code to improve contrast. * A copy of the Blender 2.8x legacy theme. This could be added to the community themes (shouldn't cost much maintenance, I hope) There will be certainly small tweaks to do here and there, I've been working using this theme for months but there can be areas that are missing update. The overall style is presented here. This commit bumps the file subversion. Reviewed By: #user_interface, Severin Differential Revision: https://developer.blender.org/D13008 === M release/datafiles/userdef/userdef_default_theme.c M source/blender/blenkernel/BKE_blender_version.h M source/blender/blenloader/intern/versioning_300.c M source/blender/blenloader/intern/versioning_userdef.c M source/blender/editors/include/UI_interface.h M source/blender/editors/interface/resources.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index d0171867e50..f33ecea0eed 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -22,181 +22,163 @@ const bTheme U_theme_default = { .name = "Default", .tui = { .wcol_regular = { - .outline = RGBA(0x373737ff), - .inner = RGBA(0x585858ff), - .inner_sel = RGBA(0x5680c2e6), - .item = RGBA(0x3e3e3eff), + .outline = RGBA(0x3d3d3dff), + .inner = RGBA(0x545454ff), + .inner_sel = RGBA(0x4772b3ff), + .item = RGBA(0xff80), .text = RGBA(0xd9d9d9ff), .text_sel = RGBA(0x), - .shadedown = -5, .roundness = 0.2f, }, .wcol_tool = { - .outline = RGBA(0x373737ff), - .inner = RGBA(0x585858ff), - .inner_sel = RGBA(0x5680c2ff), + .outline = RGBA(0x3d3d3dff), + .inner = RGBA(0x545454ff), + .inner_sel = RGBA(0x4772b3ff), .item = RGBA(0x), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), - .shadedown = -5, .roundness = 0.2f, }, .wcol_toolbar_item = { - .outline = RGBA(0x373737ff), - .inner = RGBA(0x313131ff), - .inner_sel = RGBA(0x5680c2ff), - .item = RGBA(0xe6e6e6cc), + .outline = RGBA(0x3d3d3dff), + .inner = RGBA(0x282828ff), + .inner_sel = RGBA(0x4772b3ff), + .item = RGBA(0xff80), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), .roundness = 0.2f, }, .wcol_text = { - .outline = RGBA(0x44ff), - .inner = RGBA(0x1f1f1fff), - .inner_sel = RGBA(0x505050ff), - .item = RGBA(0x191919ff), + .outline = RGBA(0x3d3d3dff), + .inner = RGBA(0x1d1d1dff), + .inner_sel = RGBA(0x181818ff), + .item = RGBA(0x4772b3ff), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), - .shaded = 1, - .shadetop = -3, .roundness = 0.2f, }, .wcol_radio = { - .outline = RGBA(0x373737ff), - .inner = RGBA(0x595959ff), - .inner_sel = RGBA(0x5680c2e6), - .item = RGBA(0x), + .outline = RGBA(0x3d3d3dff), + .inner = RGBA(0x282828ff), + .inner_sel = RGBA(0x4772b3ff), + .item = RGBA(0x252525ff), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), - .shadetop = 5, - .shadedown = -5, .roundness = 0.2f, }, .wcol_option = { - .outline = RGBA(0x373737ff), - .inner = RGBA(0x66ff), - .inner_sel = RGBA(0x5680c2e6), - .item = RGBA(0x), + .outline = RGBA(0x3d3d3dff), + .inner = RGBA(0x282828ff), + .inner_sel = RGBA(
[Bf-blender-cvs] [44ac5830c56] master: Nodes: Cleanup code for header underline alpha
Commit: 44ac5830c561a690646108fd528ec9f3941f66ee Author: Pablo Vazquez Date: Wed Oct 27 04:33:12 2021 +0200 Branches: master https://developer.blender.org/rB44ac5830c561a690646108fd528ec9f3941f66ee Nodes: Cleanup code for header underline alpha Use `UI_GetThemeColorBlend4f` instead of manually setting alpha opaque. === M source/blender/editors/space_node/node_draw.cc === diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 79c2bc8185b..a6496294f96 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -1812,8 +1812,7 @@ static void node_draw_basis(const bContext *C, UI_GetThemeColor4fv(TH_WIRE, color_underline); } else { - UI_GetThemeColorBlendShade4fv(TH_BACK, color_id, 0.4f, -30, color_underline); - color_underline[3] = 1.0f; + UI_GetThemeColorBlend4f(TH_BACK, color_id, 0.2f, color_underline); } const rctf rect = { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8d8ce644353] master: Nodes: Cleanup setting node header alpha
Commit: 8d8ce6443530ac3e39276c7b7219e2a8ca61040f Author: Pablo Vazquez Date: Wed Oct 27 01:24:19 2021 +0200 Branches: master https://developer.blender.org/rB8d8ce6443530ac3e39276c7b7219e2a8ca61040f Nodes: Cleanup setting node header alpha Always draw header opaque, set transparency only once after getting the color. Helps to unify the color and alpha values. === M source/blender/editors/space_node/node_draw.cc === diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 429c53d6740..79c2bc8185b 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -1625,10 +1625,10 @@ static void node_draw_basis(const bContext *C, /* Muted nodes get a mix of the background with the node color. */ if (node->flag & NODE_MUTED) { - UI_GetThemeColorBlendShade4fv(TH_BACK, color_id, 0.1f, 0, color_header); + UI_GetThemeColorBlend4f(TH_BACK, color_id, 0.1f, color_header); } else { - UI_GetThemeColorBlendShade4fv(TH_NODE, color_id, 0.6f, -40, color_header); + UI_GetThemeColorBlend4f(TH_NODE, color_id, 0.4f, color_header); } UI_draw_roundbox_corner_set(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT); @@ -1770,11 +1770,11 @@ static void node_draw_basis(const bContext *C, { /* Use warning color to indicate undefined types. */ if (nodeTypeUndefined(node)) { - UI_GetThemeColorBlendShade4fv(TH_REDALERT, color_id, 0.05f, -80, color); + UI_GetThemeColorBlend4f(TH_REDALERT, TH_NODE, 0.4f, color); } /* Muted nodes get a mix of the background with the node color. */ else if (node->flag & NODE_MUTED) { - UI_GetThemeColorBlendShade4fv(TH_BACK, TH_NODE, 0.33f, 0, color); + UI_GetThemeColorBlend4f(TH_BACK, TH_NODE, 0.2f, color); } else if (node->flag & NODE_CUSTOM_COLOR) { rgba_float_args_set(color, node->color[0], node->color[1], node->color[2], 1.0f); @@ -1900,7 +1900,7 @@ static void node_draw_hidden(const bContext *C, { if (nodeTypeUndefined(node)) { /* Use warning color to indicate undefined types. */ - UI_GetThemeColorBlendShade4fv(TH_REDALERT, color_id, 0.05f, -80, color); + UI_GetThemeColorBlend4f(TH_REDALERT, TH_NODE, 0.4f, color); } else if (node->flag & NODE_MUTED) { /* Muted nodes get a mix of the background with the node color. */ @@ -1910,7 +1910,7 @@ static void node_draw_hidden(const bContext *C, rgba_float_args_set(color, node->color[0], node->color[1], node->color[2], 1.0f); } else { - UI_GetThemeColorBlendShade4fv(TH_NODE, color_id, 0.6f, -40, color); + UI_GetThemeColorBlend4f(TH_NODE, color_id, 0.4f, color); } /* Draw selected nodes fully opaque. */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4db4a973556] master: Node Editor: Style update to nodes
Commit: 4db4a97355672ee27542e45ac9959523567e0053 Author: Pablo Vazquez Date: Tue Oct 26 20:07:26 2021 +0200 Branches: master https://developer.blender.org/rB4db4a97355672ee27542e45ac9959523567e0053 Node Editor: Style update to nodes This patch changes how nodes look visually, in an attempt to fix a number of issues: * The header background is currently drawn using a theme color fully opaque, this limits the colors we can use because the node name/label is drawn on top. * Hard-coded transparency makes nodes hard to read. The node backdrop already has alpha so if the user wants it they can set it. This patch uses alpha from the theme. * Better muted status indicator, instead of simply making everything transparent and the wires inside red, draw a red outline around the node, darken the header and backdrop. * On muted nodes, display wires behind the backdrop to not interfere with text/widgets inside the node. Nodes: * Darken header to improve readability of node label. * Draw a line under the header * Thicker outline. * Do not hard-code transparency on nodes, use the theme's node backdrop alpha component. * Use angle icon instead of triangle (to be consistent with the [[ https://developer.blender.org/D12814 | changes ]] to panels) Style adjustment to sockets drawing: * Do not hard-code the socket outline color to black, use `TH_WIRE` instead * Do not use `TH_TEXT_HI` for selected sockets, use `TH_ACTIVE` (active node outline) * Do not draw sockets background transparent on muted nodes. * Thicker outline to help contrast and readability {F11496707, size=full} Reviewed By: #user_interface, HooglyBoogly Differential Revision: https://developer.blender.org/D12884 === M release/datafiles/userdef/userdef_default_theme.c M source/blender/editors/space_node/node_draw.cc M source/blender/editors/space_node/node_intern.h === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 867a4c8f56b..d0171867e50 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -792,7 +792,7 @@ const bTheme U_theme_default = { .row_alternate = RGBA(0xff07), }, .space_node = { -.back = RGBA(0x23232300), +.back = RGBA(0x1a1a1a00), .title = RGBA(0xeeff), .text = RGBA(0xe6e6e6ff), .text_hi = RGBA(0x), @@ -829,7 +829,7 @@ const bTheme U_theme_default = { .noodle_curving = 4, .grid_levels = 7, .dash_alpha = 0.5f, -.syntaxl = RGBA(0x565656ff), +.syntaxl = RGBA(0x3e3e3eff), .syntaxs = RGBA(0x975b5bff), .syntaxb = RGBA(0xccb83dff), .syntaxn = RGBA(0xe64555ff), diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index b7f1209905e..429c53d6740 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -730,7 +730,7 @@ static void node_draw_mute_line(const View2D *v2d, const SpaceNode *snode, const GPU_blend(GPU_BLEND_ALPHA); LISTBASE_FOREACH (const bNodeLink *, link, >internal_links) { -node_draw_link_bezier(v2d, snode, link, TH_REDALERT, TH_REDALERT, -1); +node_draw_link_bezier(v2d, snode, link, TH_WIRE_INNER, TH_WIRE_INNER, TH_WIRE); } GPU_blend(GPU_BLEND_NONE); @@ -809,12 +809,10 @@ static void node_socket_outline_color_get(const bool selected, float r_outline_color[4]) { if (selected) { -UI_GetThemeColor4fv(TH_TEXT_HI, r_outline_color); -r_outline_color[3] = 0.9f; +UI_GetThemeColor4fv(TH_ACTIVE, r_outline_color); } else { -copy_v4_fl(r_outline_color, 0.0f); -r_outline_color[3] = 0.6f; +UI_GetThemeColor4fv(TH_WIRE, r_outline_color); } /* Until there is a better place for per socket color, @@ -834,11 +832,6 @@ void node_socket_color_get( RNA_pointer_create((ID *)ntree, _NodeSocket, sock, ); sock->typeinfo->draw_color(C, , node_ptr, r_color); - - bNode *node = (bNode *)node_ptr->data; - if (node->flag & NODE_MUTED) { -r_color[3] *= 0.25f; - } } struct SocketTooltipData { @@ -1174,7 +1167,7 @@ void ED_node_socket_draw(bNodeSocket *sock, const rcti *rect, const float color[ GPU_program_point_size(true); immBindBuiltinProgram(GPU_SHADER_KEYFRAME_SHAPE); - immUniform1f("outline_scale", 0.7f); + immUniform1f("outline_scale", 1.0f); immUniform2f("ViewportSize", -1.0f, -1.0f); /* Single point. */ @@ -1319,7 +1312,7 @@ void node_draw_sockets(const View2D *v2d, GPU_blend(GPU_BLEND_ALPHA); GPU_program_point_size(true); immBindBuiltinProgram(GPU_SHADER_KEYFRAME_SHAPE); - immUniform1f("outline_scale", 0.7f); + immUniform1f("outline_scale&quo
[Bf-blender-cvs] [af26720b213] master: UI: Use text highlight theme color for active tab
Commit: af26720b2131e5a0db96965b231f4dfa2d5c5a2d Author: Pablo Vazquez Date: Tue Oct 26 14:59:50 2021 +0200 Branches: master https://developer.blender.org/rBaf26720b2131e5a0db96965b231f4dfa2d5c5a2d UI: Use text highlight theme color for active tab Currently, both inactive and active tabs are using the `Region Text` theme property. This patch makes it so active tabs use `Region Text Highlight`. Since this check is done in other places already but was simply missing in this case, I believe this was just an oversight and not a design decision. Top is master, bottom is this patch: {F11520838, size=full} This allows this kind of tab highlight, not possible before since all tabs would have white text. {F11520873, size=full} Reviewed By: #user_interface, Severin Differential Revision: https://developer.blender.org/D13003 === M release/scripts/presets/interface_theme/Blender_Light.xml M source/blender/editors/interface/interface_panel.c === diff --git a/release/scripts/presets/interface_theme/Blender_Light.xml b/release/scripts/presets/interface_theme/Blender_Light.xml index f4188e83e34..e3ac77b008d 100644 --- a/release/scripts/presets/interface_theme/Blender_Light.xml +++ b/release/scripts/presets/interface_theme/Blender_Light.xml @@ -434,7 +434,7 @@ button="#9900" button_title="#1a1a1a" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#" execution_buts="#" tab_active="#b3b3b3" @@ -509,7 +509,7 @@ button="#99e6" button_title="#1a1a1a" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#" execution_buts="#" tab_active="#6697e6" @@ -555,7 +555,7 @@ button="#99e6" button_title="#1a1a1a" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#" execution_buts="#99e6" tab_active="#6697e6" @@ -613,7 +613,7 @@ button="#7272727f" button_title="#00" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#" execution_buts="#" tab_active="#6697e6" @@ -688,7 +688,7 @@ button="#7272727f" button_title="#00" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#" execution_buts="#" tab_active="#6697e6" @@ -773,7 +773,7 @@ button="#9900" button_title="#1a1a1a" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#" execution_buts="#" tab_active="#b3b3b3" @@ -833,7 +833,7 @@ button="#9900" button_title="#1a1a1a" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#" execution_buts="#" tab_active="#b3b3b3" @@ -870,7 +870,7 @@ button="#7272727f" button_title="#00" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#656565ff" execution_buts="#" tab_active="#6697e6" @@ -917,7 +917,7 @@ button="#7272727f" button_title="#00" button_text="#00" -button_text_hi="#ff" +button_text_hi="#00" navigation_bar="#" execution_buts="#" tab_active="#6697e6" @@ -981,7 +981,7 @@
[Bf-blender-cvs] [2a7b9f2d45c] master: Cleanup: silence warning in recent commit
Commit: 2a7b9f2d45c345ee910a430e7035fd3d406de8f7 Author: Pablo Vazquez Date: Mon Oct 25 16:52:17 2021 +0200 Branches: master https://developer.blender.org/rB2a7b9f2d45c345ee910a430e7035fd3d406de8f7 Cleanup: silence warning in recent commit Thanks to Dr. Sybren for pointing it out! === M source/blender/editors/space_nla/nla_draw.c === diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 0c81f461369..bf2d20cf4c9 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -550,7 +550,7 @@ static void nla_draw_strip(SpaceNla *snla, /* draw strip outline * - color used here is to indicate active vs non-active */ - if (strip->flag & NLASTRIP_FLAG_ACTIVE | strip->flag & NLASTRIP_FLAG_SELECT) { + if (strip->flag & (NLASTRIP_FLAG_ACTIVE | NLASTRIP_FLAG_SELECT)) { /* strip should appear 'sunken', so draw a light border around it */ color[0] = color[1] = color[2] = 1.0f; /* FIXME: hardcoded temp-hack colors */ } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4758a7d3575] master: UI: Use flat colors for NLA strip drawing
Commit: 4758a7d35750ae0a2ed24014817e5b169a71e364 Author: Pablo Vazquez Date: Mon Oct 25 16:28:56 2021 +0200 Branches: master https://developer.blender.org/rB4758a7d35750ae0a2ed24014817e5b169a71e364 UI: Use flat colors for NLA strip drawing The NLA editor is in need of a design overhaul, hopefully for 3.1 or 3.2. This should be a project on itself, however, the worst offender currently is the use of gradients on strips. Something that can be fixed easily. {F11390293, size=full, loop, autoplay} A simple replace of `UI_draw_roundbox_shade_x` for `UI_draw_roundbox_4fv` brings strips in line with how other areas are drawn. This patch also: * Remove embossed lines around active action channel. * Highlight the strip while being moved. This patch does not include any theme changes. This will be tackled separately. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D12968 === M release/datafiles/locale M release/scripts/addons M release/scripts/addons_contrib M source/blender/editors/space_nla/nla_draw.c M source/tools === diff --git a/release/datafiles/locale b/release/datafiles/locale index 80d9e7ee122..8ee2942570f 16 --- a/release/datafiles/locale +++ b/release/datafiles/locale @@ -1 +1 @@ -Subproject commit 80d9e7ee122c626cbbcd1da554683bce79f8d3df +Subproject commit 8ee2942570f08d10484bb2328d0d1b00367c diff --git a/release/scripts/addons b/release/scripts/addons index e68c0118c13..c49c16c38d4 16 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit e68c0118c13c3575e6096ad2dc7fb4434eadf38e +Subproject commit c49c16c38d4bce29a1e0518d5fad5d90f42ab5e7 diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib index 42da56aa737..16467648282 16 --- a/release/scripts/addons_contrib +++ b/release/scripts/addons_contrib @@ -1 +1 @@ -Subproject commit 42da56aa73726710107031787af5eea186797984 +Subproject commit 16467648282500cc229c271f62201ef897f2c2c3 diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 4694d8652f6..0c81f461369 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -323,12 +323,19 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc, uin { const float yheight = ymaxc - yminc; - immUniformColor3f(0.7f, 0.7f, 0.7f); - /* draw with AA'd line */ GPU_line_smooth(true); GPU_blend(GPU_BLEND_ALPHA); + /* Fully opaque line on selected strips. */ + if (strip->flag & NLASTRIP_FLAG_SELECT) { +/* TODO: Use theme setting. */ +immUniformColor3f(1.0f, 1.0f, 1.0f); + } + else { +immUniformColor4f(1.0f, 1.0f, 1.0f, 0.5f); + } + /* influence -- */ if (strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) { FCurve *fcu = BKE_fcurve_find(>fcurves, "influence", 0); @@ -501,7 +508,7 @@ static void nla_draw_strip(SpaceNla *snla, /* strip is in normal track */ UI_draw_roundbox_corner_set(UI_CNR_ALL); /* all corners rounded */ -UI_draw_roundbox_shade_x( +UI_draw_roundbox_4fv( &(const rctf){ .xmin = strip->start, .xmax = strip->end, @@ -509,9 +516,7 @@ static void nla_draw_strip(SpaceNla *snla, .ymax = ymaxc, }, true, -0.0, -0.5, -0.1, +0.0f, color); /* restore current vertex format & program (roundbox trashes it) */ @@ -545,11 +550,9 @@ static void nla_draw_strip(SpaceNla *snla, /* draw strip outline * - color used here is to indicate active vs non-active */ - if (strip->flag & NLASTRIP_FLAG_ACTIVE) { + if (strip->flag & NLASTRIP_FLAG_ACTIVE | strip->flag & NLASTRIP_FLAG_SELECT) { /* strip should appear 'sunken', so draw a light border around it */ -color[0] = 0.9f; /* FIXME: hardcoded temp-hack colors */ -color[1] = 1.0f; -color[2] = 0.9f; +color[0] = color[1] = color[2] = 1.0f; /* FIXME: hardcoded temp-hack colors */ } else { /* strip should appear to stand out, so draw a dark border around it */ @@ -566,7 +569,7 @@ static void nla_draw_strip(SpaceNla *snla, } else { /* non-muted - draw solid, rounded outline */ -UI_draw_roundbox_shade_x( +UI_draw_roundbox_4fv( &(const rctf){ .xmin = strip->start, .xmax = strip->end, @@ -574,9 +577,7 @@ static void nla_draw_strip(SpaceNla *snla, .ymax = ymaxc, }, false, -0.0, -0.0, -0.1, +0.0f, color); /* restore current vertex format & program (roundbox trashes it) */ @@ -661,7 +662,7 @@ static void nla_draw_strip_text(AnimData *adt, } /* s
[Bf-blender-cvs] [9aab1a46263] master: Cleanup: unused code
Commit: 9aab1a46263a87980efa18ba35d87814eb2f4cda Author: Pablo Vazquez Date: Thu Oct 21 22:02:45 2021 +0200 Branches: master https://developer.blender.org/rB9aab1a46263a87980efa18ba35d87814eb2f4cda Cleanup: unused code Also fixes incompatible types. === M source/blender/editors/include/UI_resources.h M source/blender/editors/interface/resources.c === diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 7235d57d667..61da496d344 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -240,7 +240,6 @@ typedef enum ThemeColorID { TH_NODE_CURVING, TH_NODE_GRID_LEVELS, - TH_NODE_DASH_ALPHA, TH_MARKER_OUTLINE, TH_MARKER, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 91832e1437c..ad7c6332ee9 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -657,9 +657,6 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_NODE_GRID_LEVELS: cp = >grid_levels; break; -case TH_NODE_DASH_ALPHA: - cp = >dash_alpha; - break; case TH_SEQ_MOVIE: cp = ts->movie; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0a63297a881] master: Nodes: Fix missing variable
Commit: 0a63297a8818e0dba89ce169bd39a2f800534721 Author: Pablo Vazquez Date: Thu Oct 21 21:22:43 2021 +0200 Branches: master https://developer.blender.org/rB0a63297a8818e0dba89ce169bd39a2f800534721 Nodes: Fix missing variable === M source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl === diff --git a/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl index acc7030415f..8325568988c 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl @@ -48,6 +48,7 @@ uniform bool doMuted; uniform float dim_factor; uniform float thickness; uniform float dash_factor; +uniform float dash_alpha; # define colShadow colors[0] # define colStart colors[1] ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9b1b4b9e32c] master: Node Editor: Introduce color overlay and dashed wires theme setting
Commit: 9b1b4b9e32c8ac86e460204bb93e0ddc42ad9e49 Author: Pablo Vazquez Date: Thu Oct 21 21:00:17 2021 +0200 Branches: master https://developer.blender.org/rB9b1b4b9e32c8ac86e460204bb93e0ddc42ad9e49 Node Editor: Introduce color overlay and dashed wires theme setting This patch includes code from D9891 and D12754, so credit goes to Juanfran and Dalai. I updated the patches to work with `master` and with the new overlay toggle. The reason to include both changes as part of one patch is that the dimmed dashed lines work much better together with colored wires. Theme setting for dash opacity: {F11370574, size=full} {F11286177, size=full, autoplay, loop} {F11149912, size=full} For adding the overlay I used `SpaceImageOverlay` as reference, although I'm not familiar with this code so there might be mistakes. Reviewed By: #user_interface, HooglyBoogly Differential Revision: https://developer.blender.org/D12886 === M release/datafiles/userdef/userdef_default_theme.c M release/scripts/presets/interface_theme/Blender_Light.xml M release/scripts/presets/keyconfig/keymap_data/blender_default.py M release/scripts/startup/bl_ui/space_node.py M source/blender/blenloader/intern/versioning_300.c M source/blender/blenloader/intern/versioning_userdef.c M source/blender/editors/include/UI_resources.h M source/blender/editors/interface/resources.c M source/blender/editors/space_node/drawnode.cc M source/blender/editors/space_node/node_draw.cc M source/blender/gpu/shaders/gpu_shader_2D_nodelink_frag.glsl M source/blender/gpu/shaders/gpu_shader_2D_nodelink_vert.glsl M source/blender/makesdna/DNA_space_types.h M source/blender/makesdna/DNA_userdef_types.h M source/blender/makesrna/intern/rna_space.c M source/blender/makesrna/intern/rna_userdef.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index eebdcf84fd2..ad93f87e962 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -828,6 +828,7 @@ const bTheme U_theme_default = { .facedot_size = 4, .noodle_curving = 4, .grid_levels = 2, +.dash_alpha = 0.5f, .syntaxl = RGBA(0x565656ff), .syntaxs = RGBA(0x975b5bff), .syntaxb = RGBA(0xccb83dff), diff --git a/release/scripts/presets/interface_theme/Blender_Light.xml b/release/scripts/presets/interface_theme/Blender_Light.xml index 8b7995cef4c..8074371c450 100644 --- a/release/scripts/presets/interface_theme/Blender_Light.xml +++ b/release/scripts/presets/interface_theme/Blender_Light.xml @@ -956,6 +956,7 @@ distor_node="#749797" noodle_curving="4" grid_levels="2" +dash_alpha="0.5" input_node="#cb3d4a" output_node="#cb3d4a" filter_node="#6c696f" diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 3ba848e6caf..e70fe63677a 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2064,6 +2064,8 @@ def km_node_editor(params): {"properties": [("data_path", 'tool_settings.use_snap')]}), ("wm.context_menu_enum", {"type": 'TAB', "value": 'PRESS', "shift": True, "ctrl": True}, {"properties": [("data_path", 'tool_settings.snap_node_element')]}), +("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True}, +{"properties": [("data_path", "space_data.overlay.show_overlays")]}), *_template_items_context_menu("NODE_MT_context_menu", params.context_menu_event), ]) diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 8e2533edac6..da3db48d962 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -49,6 +49,7 @@ class NODE_HT_header(Header): scene = context.scene snode = context.space_data +overlay = snode.overlay snode_id = snode.id id_from = snode.id_from tool_settings = context.tool_settings @@ -205,6 +206,13 @@ class NODE_HT_header(Header): if tool_settings.snap_node_element != 'GRID': row.prop(tool_settings, "snap_target", text="") +# Overlay toggle & popover +row = layout.row(align=True) +row.prop(overlay, "s
[Bf-blender-cvs] [ef7e21fd4a1] master: UI: Reduce vertical margin between panels
Commit: ef7e21fd4a1cea9db1191bd8e00fcc6df105ab33 Author: Pablo Vazquez Date: Mon Oct 18 16:16:34 2021 +0200 Branches: master https://developer.blender.org/rBef7e21fd4a1cea9db1191bd8e00fcc6df105ab33 UI: Reduce vertical margin between panels In an attempt to reduce scrolling. This can be re-visited if a kind of switch between "compact" and "comfortable" UI size is implemented in the future. === M source/blender/editors/include/UI_interface.h === diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index c808a42a44a..047340ac304 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -253,7 +253,7 @@ enum { #define UI_PANEL_CATEGORY_MARGIN_WIDTH (U.widget_unit * 1.0f) #define UI_PANEL_MARGIN_X (U.widget_unit * 0.4f) -#define UI_PANEL_MARGIN_Y (U.widget_unit * 0.2f) +#define UI_PANEL_MARGIN_Y (U.widget_unit * 0.1f) /* but->drawflag - these flags should only affect how the button is drawn. */ /* NOTE: currently, these flags *are not passed* to the widget's state() or draw() functions ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [452c78757f4] master: UI: Improve contrast on playhead
Commit: 452c78757f44fe456dd10ee16bc509ab5455526b Author: Pablo Vazquez Date: Sun Oct 17 19:06:45 2021 +0200 Branches: master https://developer.blender.org/rB452c78757f44fe456dd10ee16bc509ab5455526b UI: Improve contrast on playhead Add an outine around the playhead, matching the color of the background (slightly darkened) to improve the readability of the current frame line when placed against curves or strips with a similar color. {F10944336, size=full} Differential Revision: https://developer.blender.org/D12810 === M source/blender/editors/animation/time_scrub_ui.c === diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index b0eb014c5d9..94366a5e852 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -101,6 +101,7 @@ static void draw_current_frame(const Scene *scene, float text_width = UI_fontstyle_string_width(fstyle, frame_str); float box_width = MAX2(text_width + 8 * UI_DPI_FAC, 24 * UI_DPI_FAC); float box_padding = 3 * UI_DPI_FAC; + const int line_outline = max_ii(1, round_fl_to_int(1 * UI_DPI_FAC)); float bg_color[4]; UI_GetThemeColorShade4fv(TH_CFRAME, -5, bg_color); @@ -109,7 +110,19 @@ static void draw_current_frame(const Scene *scene, const float subframe_x = UI_view2d_view_to_region_x(v2d, BKE_scene_ctime_get(scene)); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); + + GPU_blend(GPU_BLEND_ALPHA); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + + /* Outline. */ + immUniformThemeColorShadeAlpha(TH_BACK, -25, -100); + immRectf(pos, + subframe_x - (line_outline + U.pixelsize), + scrub_region_rect->ymax - box_padding, + subframe_x + (line_outline + U.pixelsize), + 0.0f); + + /* Line. */ immUniformThemeColor(TH_CFRAME); immRectf(pos, subframe_x - U.pixelsize, @@ -117,6 +130,7 @@ static void draw_current_frame(const Scene *scene, subframe_x + U.pixelsize, 0.0f); immUnbindProgram(); + GPU_blend(GPU_BLEND_NONE); UI_draw_roundbox_corner_set(UI_CNR_ALL); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [962b17b3ca1] master: UI: Adjust header color when active instead of inactive
Commit: 962b17b3ca140aca3ccce94e0e39c6631f830f8d Author: Pablo Vazquez Date: Sun Oct 17 18:43:25 2021 +0200 Branches: master https://developer.blender.org/rB962b17b3ca140aca3ccce94e0e39c6631f830f8d UI: Adjust header color when active instead of inactive Currently, the background color of headers gets darkened when the editor is not active, this makes it hard to theme, and adds contrast/noise when it's not needed. This patch makes headers use the regular theme color when the editor is not active, so it can be made to flush with the background more easily. And lightens the header (by +10, same value as before) when the editor is active, providing the wanted highlight. The motivations behind this change are: * Simplify picking a theme color for headers. * Widgets already become lighter on mouse hover, this change creates a connection with that concept. Left: current master, inactive header is darkened. Right: this patch, inactive header gets the theme color, active editor gets header in a slightly lighter color (like most widgets) {F11052503, size=full, loop, autoplay} Reviewed By: #user_interface, HooglyBoogly Differential Revision: https://developer.blender.org/D12856 === M source/blender/editors/include/UI_resources.h M source/blender/editors/interface/resources.c M source/blender/editors/screen/area.c === diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index dde8a637e05..61da496d344 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -64,7 +64,7 @@ typedef enum ThemeColorID { TH_TAB_OUTLINE, TH_HEADER, - TH_HEADERDESEL, + TH_HEADER_ACTIVE, TH_HEADER_TEXT, TH_HEADER_TEXT_HI, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index e13b69a9763..ad7c6332ee9 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -85,7 +85,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) ThemeSpace *ts = NULL; static uchar error[4] = {240, 0, 240, 255}; static uchar alert[4] = {240, 60, 60, 255}; - static uchar headerdesel[4] = {0, 0, 0, 255}; + static uchar header_active[4] = {0, 0, 0, 255}; static uchar back[4] = {0, 0, 0, 255}; static uchar setting = 0; const uchar *cp = error; @@ -249,15 +249,17 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_HEADER: cp = ts->header; break; -case TH_HEADERDESEL: - /* We calculate a dynamic builtin header deselect color, also for pull-downs. */ + +case TH_HEADER_ACTIVE: cp = ts->header; - headerdesel[0] = cp[0] > 10 ? cp[0] - 10 : 0; - headerdesel[1] = cp[1] > 10 ? cp[1] - 10 : 0; - headerdesel[2] = cp[2] > 10 ? cp[2] - 10 : 0; - headerdesel[3] = cp[3]; - cp = headerdesel; + /* Lighten the header color when editor is active. */ + header_active[0] = cp[0] > 245 ? cp[0] - 10 : cp[0] + 10; + header_active[1] = cp[1] > 245 ? cp[1] - 10 : cp[1] + 10; + header_active[2] = cp[2] > 245 ? cp[2] - 10 : cp[2] + 10; + header_active[3] = cp[3]; + cp = header_active; break; + case TH_HEADER_TEXT: cp = ts->header_text; break; diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 406f5c0904f..6b0b4d911cc 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2658,10 +2658,10 @@ static ThemeColorID region_background_color_id(const bContext *C, const ARegion case RGN_TYPE_HEADER: case RGN_TYPE_TOOL_HEADER: if (ED_screen_area_active(C) || ED_area_is_global(area)) { -return TH_HEADER; +return TH_HEADER_ACTIVE; } else { -return TH_HEADERDESEL; +return TH_HEADER; } case RGN_TYPE_PREVIEW: return TH_PREVIEW_BACK; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [93544b641bd] master: UI: Visual style update to panels
Commit: 93544b641bd6687c9b0af3e203a4069977116a78 Author: Pablo Vazquez Date: Sun Oct 17 18:22:53 2021 +0200 Branches: master https://developer.blender.org/rB93544b641bd6687c9b0af3e203a4069977116a78 UI: Visual style update to panels Back in Blender 2.30, the GUI project brought panels into Blender among other important visual updates. For the first time it was possible to move the wall of buttons around. Providing a clear separation between sections (it even allowed the grouping of panels in tabs!) During the 2.5 redesign, the separation between panels became a line on top of each panel, and panels received theme settings for background and header colors. The default theme used the same color for both. In 2.8 the background color of panels was different from headers in the default theme, so the separator line was removed. While the separator line wasn't elegant (only on top, non-themeable, hard-coded emboss effect), it provided a sort of separation between panels. This patch solves the panels-separation by simply adding a margin space around them (not visible in default theme yet). Even though the margin reduces the width of the working area slightly, it makes room for the upcoming always-visible scrollbars. Other adjustments: * Use arrow icon instead of triangle to collapse/expand * Use rounded corners to match the rest of the UI (editor corners, nodes, etc). {F10953929, size=full} Margin on panels makes use of the `style->panelouter` property that hasn't been used in a while. Also slight tweaks to `boxspace` and `templatespace` style properties so they are multiples of 2 and operations on them round better. There is technically no need to update the themes for them to work, so no theme changes are included in this patch. {F10953931, size=full} {F10953933, size=full} {F10953934, size=full} {F10954003, size=full} A new theme setting under Style controls the roundness of all panels (added it to Style instead of ThemeSpace because I think controlling the panel roundness per editor is a bit overkill): {F11091561, size=full, autoplay, loop} Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D12814 === M release/datafiles/userdef/userdef_default_theme.c M release/scripts/presets/interface_theme/Blender_Light.xml M release/scripts/startup/bl_ui/properties_constraint.py M release/scripts/startup/bl_ui/space_userpref.py M source/blender/blenkernel/BKE_blender_version.h M source/blender/blenkernel/BKE_screen.h M source/blender/blenloader/intern/versioning_userdef.c M source/blender/editors/animation/fmodifier_ui.c M source/blender/editors/include/UI_interface.h M source/blender/editors/interface/interface_intern.h M source/blender/editors/interface/interface_panel.c M source/blender/editors/screen/area.c M source/blender/editors/space_spreadsheet/spreadsheet_row_filter_ui.cc M source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c M source/blender/makesdna/DNA_userdef_types.h M source/blender/makesrna/intern/rna_ui.c M source/blender/makesrna/intern/rna_userdef.c M source/blender/modifiers/intern/MOD_ui_common.c M source/blender/shader_fx/intern/FX_ui_common.c === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 1f9316cacfd..eebdcf84fd2 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -260,6 +260,7 @@ const bTheme U_theme_default = { .icon_modifier = RGBA(0x84b8), .icon_shading = RGBA(0xea7581ff), .icon_folder = RGBA(0xe3c16eff), +.panel_roundness = 0.4f, }, .space_properties = { .back = RGBA(0x42424200), diff --git a/release/scripts/presets/interface_theme/Blender_Light.xml b/release/scripts/presets/interface_theme/Blender_Light.xml index 834139458d5..8b7995cef4c 100644 --- a/release/scripts/presets/interface_theme/Blender_Light.xml +++ b/release/scripts/presets/interface_theme/Blender_Light.xml @@ -9,6 +9,7 @@ widget_emboss="#0026" editor_outline="#1f1f1f" widget_text_cursor="#3399e6" +panel_roundness="0.4" transparent_checker_primary="#33" transparent_checker_secondary="#262626" transparent_checker_size="8" diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index 2a0cf56534c..85381f5ee3c 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -70,7 +70,7 @@ class ConstraintButtonsPanel: bl_space_type = 'PROPERTIES' b
[Bf-blender-cvs] [e46055ae9db] master: UI: Fix offset of vertical scale indicators
Commit: e46055ae9dbd77271878b35cdd061cb7cc7e1afc Author: Pablo Vazquez Date: Fri Oct 15 11:54:07 2021 +0200 Branches: master https://developer.blender.org/rBe46055ae9dbd77271878b35cdd061cb7cc7e1afc UI: Fix offset of vertical scale indicators `BLF_height_max()` uses the tallest character in the font, and many characters in our font are taller than numbers. Use `BLF_height` with `0` as reference instead. Fix by @harley, thanks! === M source/blender/editors/interface/view2d_draw.c === diff --git a/source/blender/editors/interface/view2d_draw.c b/source/blender/editors/interface/view2d_draw.c index a4b37e571d7..b1869fbf2f9 100644 --- a/source/blender/editors/interface/view2d_draw.c +++ b/source/blender/editors/interface/view2d_draw.c @@ -405,7 +405,7 @@ static void draw_vertical_scale_indicators(const ARegion *region, const float xpos = (rect->xmin + x_offset) * UI_DPI_FAC; const float ymin = rect->ymin; const float ymax = rect->ymax; - const float y_offset = (BLF_height_max(font_id) / 2.0f) - U.pixelsize; + const float y_offset = (BLF_height(font_id, "0", 1) / 2.0f) - U.pixelsize; for (uint i = 0; i < steps; i++) { const float ypos_view = start + i * distance; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [3ccdee75328] master: UI: View2D: Align vertical indicators to view
Commit: 3ccdee75328bf8c5f0846f27d66407fcef0ee3e9 Author: Pablo Vazquez Date: Fri Oct 15 02:51:17 2021 +0200 Branches: master https://developer.blender.org/rB3ccdee75328bf8c5f0846f27d66407fcef0ee3e9 UI: View2D: Align vertical indicators to view In editors with vertical scale indicators, such as Graph Editor, Drivers, or VSE, display the values aligned to the view. Also add a shadow (similar to the 3D View info) to improve readability when the text is on top of curves, strips, or other content. {F10987240, size=full} Reviewed By: Severin Differential Revision: https://developer.blender.org/D12809 === M release/datafiles/locale M release/scripts/addons M release/scripts/addons_contrib M source/blender/editors/interface/view2d_draw.c M source/tools === diff --git a/release/datafiles/locale b/release/datafiles/locale index 4833954c0ac..75e46177f36 16 --- a/release/datafiles/locale +++ b/release/datafiles/locale @@ -1 +1 @@ -Subproject commit 4833954c0ac85cc407e1d5a153aa11b1d1823ec0 +Subproject commit 75e46177f36a49ad36b917e641ee1586ddef7092 diff --git a/release/scripts/addons b/release/scripts/addons index 67f1fbca148..f10ca8c1561 16 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit 67f1fbca1482d9d9362a4001332e785c3fd5d230 +Subproject commit f10ca8c156169b24e70027a43f718f99571d280f diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib index 5a82baad9f9..42da56aa737 16 --- a/release/scripts/addons_contrib +++ b/release/scripts/addons_contrib @@ -1 +1 @@ -Subproject commit 5a82baad9f986722104280e8354a4427d8e9eab1 +Subproject commit 42da56aa73726710107031787af5eea186797984 diff --git a/source/blender/editors/interface/view2d_draw.c b/source/blender/editors/interface/view2d_draw.c index fd4dba30c1c..a4b37e571d7 100644 --- a/source/blender/editors/interface/view2d_draw.c +++ b/source/blender/editors/interface/view2d_draw.c @@ -394,29 +394,33 @@ static void draw_vertical_scale_indicators(const ARegion *region, const int font_id = BLF_default(); UI_FontThemeColor(font_id, colorid); - BLF_enable(font_id, BLF_ROTATION); - BLF_rotation(font_id, M_PI_2); - BLF_batch_draw_begin(); - const float xpos = rect->xmax - 2.0f * UI_DPI_FAC; + BLF_enable(font_id, BLF_SHADOW); + const float shadow_color[4] = {0.0f, 0.0f, 0.0f, 1.0f}; + BLF_shadow(font_id, 5, shadow_color); + BLF_shadow_offset(font_id, 1, -1); + + const float x_offset = 8.0f; + const float xpos = (rect->xmin + x_offset) * UI_DPI_FAC; const float ymin = rect->ymin; const float ymax = rect->ymax; + const float y_offset = (BLF_height_max(font_id) / 2.0f) - U.pixelsize; for (uint i = 0; i < steps; i++) { const float ypos_view = start + i * distance; const float ypos_region = UI_view2d_view_to_region_y(v2d, ypos_view + display_offset); char text[32]; to_string(to_string_data, ypos_view, distance, sizeof(text), text); -const float text_width = BLF_width(font_id, text, strlen(text)); -if (ypos_region - text_width / 2.0f >= ymin && ypos_region + text_width / 2.0f <= ymax) { - BLF_draw_default(xpos, ypos_region - text_width / 2.0f, 0.0f, text, sizeof(text)); +if (ypos_region - y_offset >= ymin && ypos_region + y_offset <= ymax) { + BLF_draw_default(xpos, ypos_region - y_offset, 0.0f, text, sizeof(text)); } } + BLF_disable(font_id, BLF_SHADOW); + BLF_batch_draw_end(); - BLF_disable(font_id, BLF_ROTATION); GPU_matrix_pop_projection(); } diff --git a/source/tools b/source/tools index 01f51a0e551..5061594ee62 16 --- a/source/tools +++ b/source/tools @@ -1 +1 @@ -Subproject commit 01f51a0e551ab730f0934dc6488613690ac4bf8f +Subproject commit 5061594ee62b8eabf705443a5483c7a1dfaa8789 ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [51836539515] master: UI: Make menu item use theme roundness
Commit: 518365395152e516af235366f4be908a40343b87 Author: Pablo Vazquez Date: Wed Oct 13 14:28:55 2021 +0200 Branches: master https://developer.blender.org/rB518365395152e516af235366f4be908a40343b87 UI: Make menu item use theme roundness Menu items ignore the roundness setting since they spread left to right. This patch makes it so menu items use the theme preference instead of hardcoded square corners. Providing more flexibility to themes. All built-in and included themes already have this set so no need to update them. For the default themes (Dark/Light) roundness is 0.4. {F10950727, size=full} The motivations behind this change are: * To be more consistent with other widgets. * Improve themes flexibility. * Match padding with other elements that have like the Search field: {F10950746, size=full} Reviewed By: #user_interface, Severin Differential Revision: https://developer.blender.org/D12813 === M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index a1534ab4b7f..6727d812e1e 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -4052,9 +4052,15 @@ static void widget_menu_itembut(uiWidgetColors *wcol, uiWidgetBase wtb; widget_init(); - /* not rounded, no outline */ + /* Padding on the sides. */ + const float padding = 0.125f * BLI_rcti_size_y(rect); + rect->xmin += padding; + rect->xmax -= padding; + + /* No outline. */ wtb.draw_outline = false; - round_box_edges(, 0, rect, 0.0f); + const float rad = wcol->roundness * BLI_rcti_size_y(rect); + round_box_edges(, UI_CNR_ALL, rect, rad); widgetbase_draw(, wcol); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f0731bd5ac7] temp-ui-tweaks: Merge branch 'master' into temp-ui-tweaks
Commit: f0731bd5ac78856e69f1ee09e4762e7d42dc17c9 Author: Pablo Vazquez Date: Mon Oct 4 16:21:26 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBf0731bd5ac78856e69f1ee09e4762e7d42dc17c9 Merge branch 'master' into temp-ui-tweaks === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [87a36cba1a5] master: UI: Fix alignment of buttons in Grease Pencil tool settings
Commit: 87a36cba1a5ad9e8e8279e89d104184c8bb84593 Author: Pablo Vazquez Date: Thu Oct 7 11:44:04 2021 +0200 Branches: master https://developer.blender.org/rB87a36cba1a5ad9e8e8279e89d104184c8bb84593 UI: Fix alignment of buttons in Grease Pencil tool settings Small fix reviewed on blender.chat by the Grease Pencil team. === M release/scripts/startup/bl_ui/properties_paint_common.py === diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index c038f5f906a..14aacf3a47a 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1151,7 +1151,8 @@ def brush_basic__draw_color_selector(context, layout, brush, gp_settings, props) if len(txt_ma) > maxw: txt_ma = txt_ma[:maxw - 5] + '..' + txt_ma[-3:] -sub = row.row() +sub = row.row(align=True) +sub.enabled = not gp_settings.use_material_pin sub.ui_units_x = 8 sub.popover( panel="TOPBAR_PT_gpencil_materials", ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [2c5661682b6] temp-ui-tweaks: Merge branch 'master' into temp-ui-tweaks
Commit: 2c5661682b61ac4a8a8f45f77a4eff7b85f6f141 Author: Pablo Vazquez Date: Mon Oct 4 12:59:53 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB2c5661682b61ac4a8a8f45f77a4eff7b85f6f141 Merge branch 'master' into temp-ui-tweaks # Conflicts: # source/blender/editors/animation/time_scrub_ui.c === M source/blender/editors/animation/time_scrub_ui.c === diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index 9b84209eb43..71502d2c9fa 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -106,35 +106,6 @@ static void draw_current_frame(const Scene *scene, float bg_color[4]; UI_GetThemeColorShade4fv(TH_CFRAME, -5, bg_color); -<<<<<<< HEAD - if (draw_line) { -/* Draw vertical line to from the bottom of the current frame box to the bottom of the screen. - */ -const float subframe_x = UI_view2d_view_to_region_x(v2d, BKE_scene_ctime_get(scene)); -GPUVertFormat *format = immVertexFormat(); -uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); - -immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); -GPU_blend(GPU_BLEND_ALPHA); - -immUniformThemeColorShadeAlpha(TH_BACK, -25, -100); -immRectf(pos, - subframe_x - U.pixelsize - outline, - scrub_region_rect->ymax - box_padding, - subframe_x + U.pixelsize + outline, - 0.0f); - -immUniformThemeColor(TH_CFRAME); -immRectf(pos, - subframe_x - U.pixelsize, - scrub_region_rect->ymax - box_padding, - subframe_x + U.pixelsize, - 0.0f); - -GPU_blend(GPU_BLEND_NONE); -immUnbindProgram(); - } -=== /* Draw vertical line from the bottom of the current frame box to the bottom of the screen. */ const float subframe_x = UI_view2d_view_to_region_x(v2d, BKE_scene_ctime_get(scene)); GPUVertFormat *format = immVertexFormat(); @@ -147,7 +118,6 @@ static void draw_current_frame(const Scene *scene, subframe_x + U.pixelsize, 0.0f); immUnbindProgram(); ->>>>>>> master UI_draw_roundbox_corner_set(UI_CNR_ALL); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4e50c5f4fb7] temp-ui-tweaks: Merge branch 'master' into temp-ui-tweaks
Commit: 4e50c5f4fb7d0439fd26f5b1064433e4bef5f70c Author: Pablo Vazquez Date: Mon Oct 4 12:58:42 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB4e50c5f4fb7d0439fd26f5b1064433e4bef5f70c Merge branch 'master' into temp-ui-tweaks # Conflicts: # source/blender/editors/animation/time_scrub_ui.c === === diff --cc source/blender/editors/animation/time_scrub_ui.c index 4dec54f0835,b0eb014c5d9..9b84209eb43 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@@ -107,33 -105,18 +106,48 @@@ static void draw_current_frame(const Sc float bg_color[4]; UI_GetThemeColorShade4fv(TH_CFRAME, -5, bg_color); ++<<<<<<< HEAD + if (draw_line) { +/* Draw vertical line to from the bottom of the current frame box to the bottom of the screen. + */ +const float subframe_x = UI_view2d_view_to_region_x(v2d, BKE_scene_ctime_get(scene)); +GPUVertFormat *format = immVertexFormat(); +uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); + +immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); +GPU_blend(GPU_BLEND_ALPHA); + +immUniformThemeColorShadeAlpha(TH_BACK, -25, -100); +immRectf(pos, + subframe_x - U.pixelsize - outline, + scrub_region_rect->ymax - box_padding, + subframe_x + U.pixelsize + outline, + 0.0f); + +immUniformThemeColor(TH_CFRAME); +immRectf(pos, + subframe_x - U.pixelsize, + scrub_region_rect->ymax - box_padding, + subframe_x + U.pixelsize, + 0.0f); + +GPU_blend(GPU_BLEND_NONE); +immUnbindProgram(); + } ++=== + /* Draw vertical line from the bottom of the current frame box to the bottom of the screen. */ + const float subframe_x = UI_view2d_view_to_region_x(v2d, BKE_scene_ctime_get(scene)); + GPUVertFormat *format = immVertexFormat(); + uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); + immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); + immUniformThemeColor(TH_CFRAME); + immRectf(pos, +subframe_x - U.pixelsize, +scrub_region_rect->ymax - box_padding, +subframe_x + U.pixelsize, +0.0f); + immUnbindProgram(); ++>>>>>>> master UI_draw_roundbox_corner_set(UI_CNR_ALL); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [901fa96b7f5] master: Keymap: New preference to open folders on single click in file browser
Commit: 901fa96b7f595fb1d77075aaa68b2e14f57a8e31 Author: Pablo Vazquez Date: Tue Sep 28 15:13:23 2021 +0200 Branches: master https://developer.blender.org/rB901fa96b7f595fb1d77075aaa68b2e14f57a8e31 Keymap: New preference to open folders on single click in file browser Introduce a new keymap preference to navigate into folders by clicking on them once instead of twice. Makes browsing folders faster albeit non-standard, so keeping this off by default for now. Does not affect Industry Compatible or other keymaps. It is still the possible to right-click to open context menu, hold Ctrl or Shift to select multiple items: {F10651030, size=full} Keymap preference: {F10652759, size=full} Part of T91537 Reviewed By: fsiddi, campbellbarton Differential Revision: https://developer.blender.org/D12667 === M release/scripts/presets/keyconfig/Blender.py M release/scripts/presets/keyconfig/keymap_data/blender_default.py === diff --git a/release/scripts/presets/keyconfig/Blender.py b/release/scripts/presets/keyconfig/Blender.py index b165eaddcf5..1852e150589 100644 --- a/release/scripts/presets/keyconfig/Blender.py +++ b/release/scripts/presets/keyconfig/Blender.py @@ -217,6 +217,15 @@ class Prefs(bpy.types.KeyConfigPreferences): update=update_fn, ) +use_file_single_click: BoolProperty( +name="Open Folders on Single Click", +description=( +"Navigate into folders by clicking on them once instead of twice" +), +default=False, +update=update_fn, +) + def draw(self, layout): from bpy import context @@ -273,6 +282,10 @@ class Prefs(bpy.types.KeyConfigPreferences): sub.prop(self, "use_pie_click_drag") sub.prop(self, "use_v3d_shade_ex_pie") +# File Browser settings. +col = layout.column() +col.label(text="File Browser") +col.row().prop(self, "use_file_single_click") blender_default = bpy.utils.execfile(os.path.join(DIRNAME, "keymap_data", "blender_default.py")) @@ -312,6 +325,7 @@ def load(): ), use_alt_click_leader=kc_prefs.use_alt_click_leader, use_pie_click_drag=kc_prefs.use_pie_click_drag, +use_file_single_click=kc_prefs.use_file_single_click, ), ) diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 41b5d6f7998..35eb6490265 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -66,6 +66,7 @@ class Params: # Alt-MMB axis switching 'RELATIVE' or 'ABSOLUTE' axis switching. "v3d_alt_mmb_drag_action", +"use_file_single_click", # Convenience variables: # (derived from other settings). # @@ -106,6 +107,7 @@ class Params: use_alt_tool_or_cursor=False, use_alt_click_leader=False, use_pie_click_drag=False, +use_file_single_click=False, v3d_tilde_action='VIEW', v3d_alt_mmb_drag_action='RELATIVE', ): @@ -190,6 +192,8 @@ class Params: self.use_alt_click_leader = use_alt_click_leader self.use_pie_click_drag = use_pie_click_drag +self.use_file_single_click = use_file_single_click + # Convenience variables: self.use_fallback_tool_rmb = self.use_fallback_tool if self.select_mouse == 'RIGHT' else False self.select_mouse_value_fallback = 'CLICK' if self.use_fallback_tool_rmb else self.select_mouse_value @@ -2151,16 +2155,20 @@ def km_file_browser_main(params): {"items": items}, ) +if not params.use_file_single_click: +items.extend([ +("file.select", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, +{"properties": [("open", True), ("deselect_all", not params.legacy)]}), +]) + items.extend([ ("file.mouse_execute", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, None), # Both .execute and .select are needed here. The former only works if # there's a file operator (i.e. not in regular editor mode) but is # needed to load files. The latter makes selection work if there's no # operator (i.e. in regular editor mode). -("file.select", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, - {"properties": [("open", True), ("deselect_all", not params.legacy)]}), ("file.select", {"type&quo
[Bf-blender-cvs] [20c27a51513] temp-ui-tweaks: Merge branch 'master' into temp-ui-tweaks
Commit: 20c27a5151387a10dbc39de301bfa7c46d68c24b Author: Pablo Vazquez Date: Mon Sep 27 16:11:27 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB20c27a5151387a10dbc39de301bfa7c46d68c24b Merge branch 'master' into temp-ui-tweaks === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [150b8799699] temp-ui-tweaks: Merge branch 'master' into temp-ui-tweaks
Commit: 150b8799699a2a727f091a6403fdbf939deffee6 Author: Pablo Vazquez Date: Wed Sep 22 16:40:14 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB150b8799699a2a727f091a6403fdbf939deffee6 Merge branch 'master' into temp-ui-tweaks === === diff --cc source/blender/makesdna/DNA_gpencil_modifier_defaults.h index 450527c7443,2a3c6f4e3db..532c5339957 --- a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h @@@ -314,28 -325,32 +325,50 @@@ { \ .start_fac = 0.1f,\ .end_fac = 0.1f,\ - .overshoot_fac = 0.01f,\ + .overshoot_fac = 0.1f,\ .pass_index = 0,\ .material = NULL,\ + .flag = GP_LENGTH_USE_CURVATURE,\ + .point_density = 30.0f,\ + .segment_influence = 0.0f,\ + .max_angle = DEG2RAD(170.0f),\ + } + + #define _DNA_DEFAULT_DashGpencilModifierData \ + { \ + .dash_offset = 0, \ + .segments = NULL, \ + .segments_len = 1, \ + .segment_active_index = 0, \ + } + + #define _DNA_DEFAULT_DashGpencilModifierSegment \ + { \ + .name = "", \ + .dash = 2, \ + .gap = 1, \ + .radius = 1.0f, \ + .opacity = 1.0f, \ + .mat_nr = -1, \ } +#define _DNA_DEFAULT_DashGpencilModifierData \ + { \ +.dash_offset = 0, \ +.segments = NULL, \ +.segments_len = 1, \ +.segment_active_index = 0, \ + } + +#define _DNA_DEFAULT_DashGpencilModifierSegment \ + { \ +.name = "", \ +.dash = 2, \ +.gap = 1, \ +.radius = 1.0f, \ +.opacity = 1.0f, \ +.mat_nr = -1, \ + } + /* clang-format off */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [499dbb626ac] master: UI: Style drag-drop indicators as tooltips
Commit: 499dbb626acb816de1dcbca10fdb2d8ca27dbcc9 Author: Pablo Vazquez Date: Tue Sep 21 18:33:14 2021 +0200 Branches: master https://developer.blender.org/rB499dbb626acb816de1dcbca10fdb2d8ca27dbcc9 UI: Style drag-drop indicators as tooltips Currently, the drop indicator colors are hardcoded to white text on semi-transparent black background. This patch makes the drop indicator use the tooltip theme settings, as they serve a similar purpose. {F10530482, size=full} All built-in themes seem to work well and got improved readability. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D12588 === M source/blender/editors/interface/interface_eyedropper.c M source/blender/editors/interface/interface_style.c M source/blender/windowmanager/intern/wm_dragdrop.c === diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c index 2e7b0ce532c..58a9f362488 100644 --- a/source/blender/editors/interface/interface_eyedropper.c +++ b/source/blender/editors/interface/interface_eyedropper.c @@ -24,6 +24,8 @@ #include "DNA_screen_types.h" #include "DNA_space_types.h" +#include "BLI_math_color.h" + #include "BKE_context.h" #include "BKE_screen.h" @@ -107,8 +109,13 @@ static void eyedropper_draw_cursor_text_ex(const int x, const int y, const char { const uiFontStyle *fstyle = UI_FSTYLE_WIDGET; - const float col_fg[4] = {1.0f, 1.0f, 1.0f, 1.0f}; - const float col_bg[4] = {0.0f, 0.0f, 0.0f, 0.2f}; + /* Use the theme settings from tooltips. */ + const bTheme *btheme = UI_GetTheme(); + const uiWidgetColors *wcol = >tui.wcol_tooltip; + + float col_fg[4], col_bg[4]; + rgba_uchar_to_float(col_fg, wcol->text); + rgba_uchar_to_float(col_bg, wcol->inner); UI_fontstyle_draw_simple_backdrop(fstyle, x, y + U.widget_unit, name, col_fg, col_bg); } diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 804156ba48c..6b1ff92a855 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -312,11 +312,8 @@ void UI_fontstyle_draw_simple_backdrop(const uiFontStyle *fs, const float decent = BLF_descender(fs->uifont_id); const float margin = height / 4.0f; -/* backdrop */ -const float color[4] = {col_bg[0], col_bg[1], col_bg[2], 0.5f}; - UI_draw_roundbox_corner_set(UI_CNR_ALL); -UI_draw_roundbox_aa( +UI_draw_roundbox_4fv( &(const rctf){ .xmin = x - margin, .xmax = x + width + margin, @@ -325,7 +322,7 @@ void UI_fontstyle_draw_simple_backdrop(const uiFontStyle *fs, }, true, margin, -color); +col_bg); } BLF_position(fs->uifont_id, x, y, 0.0f); diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index 76bb93b681c..b6a04251ffb 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -34,6 +34,7 @@ #include "BLT_translation.h" #include "BLI_blenlib.h" +#include "BLI_math_color.h" #include "BIF_glutil.h" @@ -50,6 +51,7 @@ #include "UI_interface.h" #include "UI_interface_icons.h" +#include "UI_resources.h" #include "RNA_access.h" @@ -463,8 +465,14 @@ void WM_drag_free_imported_drag_ID(struct Main *bmain, wmDrag *drag, wmDropBox * static void wm_drop_operator_draw(const char *name, int x, int y) { const uiFontStyle *fstyle = UI_FSTYLE_WIDGET; - const float col_fg[4] = {1.0f, 1.0f, 1.0f, 1.0f}; - const float col_bg[4] = {0.0f, 0.0f, 0.0f, 0.2f}; + + /* Use the theme settings from tooltips. */ + const bTheme *btheme = UI_GetTheme(); + const uiWidgetColors *wcol = >tui.wcol_tooltip; + + float col_fg[4], col_bg[4]; + rgba_uchar_to_float(col_fg, wcol->text); + rgba_uchar_to_float(col_bg, wcol->inner); UI_fontstyle_draw_simple_backdrop(fstyle, x, y, name, col_fg, col_bg); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ae42e4be1df] temp-ui-tweaks: UI: Match subpanels look with regular panels
Commit: ae42e4be1df05e9b174b8afece7b89f2a62f766b Author: Pablo Vazquez Date: Wed Sep 15 01:45:54 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBae42e4be1df05e9b174b8afece7b89f2a62f766b UI: Match subpanels look with regular panels By having coloured headers and offset the background. TODO: Add margin to the bottom on the last subpanel. === M source/blender/editors/interface/interface.c M source/blender/editors/interface/interface_panel.c M source/blender/editors/screen/area.c === diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index d896f1cd3ed..ca9c5bde37e 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1995,8 +1995,7 @@ static void ui_but_to_pixelrect(rcti *rect, const ARegion *region, uiBlock *bloc /* uses local copy of style, to scale things down, and allow widgets to change stuff */ void UI_block_draw(const bContext *C, uiBlock *block) { - uiStyle style = *UI_style_get_dpi(); /* XXX pass on as arg */ - const uiStyle *stylo = UI_style_get_dpi(); + const uiStyle *style = UI_style_get_dpi(); /* XXX pass on as arg */ /* get menu region or area region */ ARegion *region = CTX_wm_menu(C); @@ -2012,10 +2011,10 @@ void UI_block_draw(const bContext *C, uiBlock *block) GPU_blend(GPU_BLEND_ALPHA); /* scale fonts */ - ui_fontscale(, block->aspect); - ui_fontscale(, block->aspect); - ui_fontscale(, block->aspect); - ui_fontscale(, block->aspect); + ui_fontscale(>paneltitle.points, block->aspect); + ui_fontscale(>grouplabel.points, block->aspect); + ui_fontscale(>widgetlabel.points, block->aspect); + ui_fontscale(>widget.points, block->aspect); /* scale block min/max to rect */ rcti rect; @@ -2033,10 +2032,10 @@ void UI_block_draw(const bContext *C, uiBlock *block) ui_draw_pie_center(block); } else if (block->flag & UI_BLOCK_POPOVER) { -ui_draw_popover_back(region, , block, ); +ui_draw_popover_back(region, style, block, ); } else if (block->flag & UI_BLOCK_LOOP) { -ui_draw_menu_back(, block, ); +ui_draw_menu_back(style, block, ); } else if (block->panel) { bool show_background = region->alignment != RGN_ALIGN_FLOAT; @@ -2052,9 +2051,13 @@ void UI_block_draw(const bContext *C, uiBlock *block) } } - rect.xmin += stylo->panelouter; + if (block->panel->type->parent != NULL) { +rect.xmin += style->panelouter; + } + + rect.xmin += style->panelouter; } -ui_draw_aligned_panel(, +ui_draw_aligned_panel(style, block, , UI_panel_category_is_visible(region), @@ -2074,7 +2077,7 @@ void UI_block_draw(const bContext *C, uiBlock *block) /* XXX: figure out why invalid coordinates happen when closing render window */ /* and material preview is redrawn in main window (temp fix for bug T23848) */ if (rect.xmin < rect.xmax && rect.ymin < rect.ymax) { -ui_draw_but(C, region, , but, ); +ui_draw_but(C, region, style, but, ); } } } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 0e6dc675cf5..a7f2afebe3b 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1082,7 +1082,7 @@ void UI_panel_label_offset(const uiBlock *block, int *r_x, int *r_y) *r_y = UI_UNIT_Y * 1.5f; if (is_subpanel) { -*r_x += (0.7f * UI_UNIT_X); +*r_x += style->panelouter; } } @@ -1161,7 +1161,7 @@ static void panel_draw_aligned_widgets(const uiStyle *style, /* Offset triangle and text to the right for subpanels. */ const rcti widget_rect = { - .xmin = header_rect->xmin + (is_subpanel ? scaled_unit * 0.7f : 0), + .xmin = header_rect->xmin, .xmax = header_rect->xmax, .ymin = header_rect->ymin, .ymax = header_rect->ymax, @@ -1255,11 +1255,6 @@ static void panel_draw_aligned_backdrop(const Panel *panel, const bool draw_box_style = panel->type->flag & PANEL_TYPE_DRAW_BOX; const bool is_subpanel = panel->type->parent != NULL; const bool is_open = !UI_panel_is_closed(panel); - - if (is_subpanel && !is_open) { -return; - } - const uint pos = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); @@ -1267,6 +1262,7 @@ static void panel_draw_aligned_backdrop(const Panel *panel, if (draw_box_style) { /* Use the theme for box widgets. */ const uiWidgetColors *box_wcol = _GetTheme()->tui
[Bf-blender-cvs] [0647f4f5113] temp-ui-tweaks: Cleanup: Remove unused variable
Commit: 0647f4f5113a573da71040e9e5da410029c15a24 Author: Pablo Vazquez Date: Wed Sep 15 01:50:42 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB0647f4f5113a573da71040e9e5da410029c15a24 Cleanup: Remove unused variable === M source/blender/editors/interface/interface_panel.c === diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index a7f2afebe3b..66e9e54ef84 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1262,7 +1262,6 @@ static void panel_draw_aligned_backdrop(const Panel *panel, if (draw_box_style) { /* Use the theme for box widgets. */ const uiWidgetColors *box_wcol = _GetTheme()->tui.wcol_box; -const uiStyle *style = UI_style_get_dpi(); if (is_subpanel) { /* Use rounded bottom corners for the last subpanel. */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a4b39da6c73] temp-ui-tweaks: UI: Use right-arrow icon for sub menus
Commit: a4b39da6c7365d34638dd3e1bc9764b00969bcb0 Author: Pablo Vazquez Date: Wed Sep 15 01:47:47 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBa4b39da6c7365d34638dd3e1bc9764b00969bcb0 UI: Use right-arrow icon for sub menus === M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index c905bdd542c..b795522ef9a 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1477,23 +1477,23 @@ static void widget_draw_submenu_tria(const uiBut *but, const uiWidgetColors *wcol) { const float aspect = but->block->aspect * U.inv_dpi_fac; - const int tria_height = (int)(ICON_DEFAULT_HEIGHT / aspect); - const int tria_width = (int)(ICON_DEFAULT_WIDTH / aspect) - 2 * U.pixelsize; - const int xs = rect->xmax - tria_width; - const int ys = (rect->ymin + rect->ymax - tria_height) / 2.0f; + const int icon_height = (int)(ICON_DEFAULT_HEIGHT / aspect); + const int icon_width = (int)(ICON_DEFAULT_WIDTH / aspect) * U.pixelsize; + const int xs = rect->xmax - icon_width; + const int ys = (rect->ymin + rect->ymax - icon_height) / 2.0f; float col[4]; rgba_uchar_to_float(col, wcol->text); col[3] *= 0.8f; - rctf tria_rect; - BLI_rctf_init(_rect, xs, xs + tria_width, ys, ys + tria_height); - BLI_rctf_scale(_rect, 0.4f); + rctf icon_rect; + BLI_rctf_init(_rect, xs, xs + icon_width, ys, ys + icon_height); + BLI_rctf_scale(_rect, 0.4f); GPU_blend(GPU_BLEND_ALPHA); UI_widgetbase_draw_cache_flush(); + UI_icon_draw_ex(xs, ys, ICON_RIGHTARROW, aspect * U.inv_dpi_fac, 0.5f, 0.0f, wcol->text, false); GPU_blend(GPU_BLEND_NONE); - ui_draw_anti_tria_rect(_rect, 'h', col); } static void ui_text_clip_give_prev_off(uiBut *but, const char *str) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8085f1e3202] temp-ui-tweaks: Merge branch 'master' into temp-ui-tweaks
Commit: 8085f1e320289ade3a757a12b23f2e9b78d82725 Author: Pablo Vazquez Date: Mon Sep 13 16:54:18 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB8085f1e320289ade3a757a12b23f2e9b78d82725 Merge branch 'master' into temp-ui-tweaks === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [cb23adf94b8] temp-ui-tweaks: Merge branch 'master' into temp-ui-tweaks
Commit: cb23adf94b8a85640cdeb0aba7465e0fe50d9120 Author: Pablo Vazquez Date: Mon Sep 6 14:06:25 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBcb23adf94b8a85640cdeb0aba7465e0fe50d9120 Merge branch 'master' into temp-ui-tweaks === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ba7f03c1bb9] temp-ui-tweaks: UI: Align panel titles
Commit: ba7f03c1bb96323332255a18e1a86ddf7908480c Author: Pablo Vazquez Date: Fri Sep 3 20:06:43 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBba7f03c1bb96323332255a18e1a86ddf7908480c UI: Align panel titles WIP: Experiment with shifting the panel titles slightly to the right matching panels with checkboxes/icons in the header. === M source/blender/editors/include/UI_interface.h M source/blender/editors/interface/interface_panel.c M source/blender/editors/interface/interface_widgets.c M source/blender/editors/screen/area.c === diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 6ac455c6a50..dcdfefb716c 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -248,6 +248,7 @@ enum { #define UI_PANEL_CATEGORY_MARGIN_WIDTH (U.widget_unit * 1.0f) #define UI_PANEL_BOX_STYLE_MARGIN (U.widget_unit * 0.2f) +#define UI_PANEL_LABEL_OFFSET (U.widget_unit * 2.0f) /* but->drawflag - these flags should only affect how the button is drawn. */ /* NOTE: currently, these flags *are not passed* to the widget's state() or draw() functions diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 14fed6c02b8..0e6dc675cf5 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1198,7 +1198,7 @@ static void panel_draw_aligned_widgets(const uiStyle *style, /* Draw text label. */ if (panel->drawname[0] != '\0') { const rcti title_rect = { -.xmin = widget_rect.xmin + (panel->labelofs / aspect) + scaled_unit * 1.2f, +.xmin = widget_rect.xmin + (panel->labelofs / aspect), .xmax = widget_rect.xmax, .ymin = widget_rect.ymin - 2.0f / aspect, .ymax = widget_rect.ymax, diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 5f58c387c27..c905bdd542c 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -3810,6 +3810,9 @@ static void widget_numslider( factor_discard = factor; } +rect->xmin += 0.2f * U.widget_unit; +rect->xmax -= 0.2f * U.widget_unit; + round_box_edges(, roundboxalign_slider, , ofs); wtb1.draw_outline = false; widgetbase_set_uniform_discard_factor(, factor_discard); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index aba43ddc1a3..6215e7b976e 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2709,12 +2709,10 @@ static void ed_panel_draw(const bContext *C, UI_block_apply_search_filter(block, search_filter); UI_block_layout_resolve(block, , ); -panel->labelofs = xco - labelx; panel->layout = NULL; } - else { -panel->labelofs = 0; - } + + panel->labelofs = UI_PANEL_LABEL_OFFSET; UI_panel_header_buttons_end(panel); if (open || search_filter_active) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e262b009189] temp-ui-tweaks: UI: Make panel titles text size same as labels
Commit: e262b00918971e33b2ff3336865e8a4261026207 Author: Pablo Vazquez Date: Fri Sep 3 20:04:00 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBe262b00918971e33b2ff3336865e8a4261026207 UI: Make panel titles text size same as labels With panels now being more defined boxes, having a different size for the panel title adds considerable noise. === M source/blender/editors/include/UI_interface.h === diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 7211cf9f893..6ac455c6a50 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -237,7 +237,7 @@ enum { #define UI_DEFAULT_TEXT_POINTS 11 /* Larger size used for title text. */ -#define UI_DEFAULT_TITLE_POINTS 12 +#define UI_DEFAULT_TITLE_POINTS 11 #define UI_PANEL_WIDTH 340 #define UI_COMPACT_PANEL_WIDTH 160 ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [48c2c7b1b4c] temp-ui-tweaks: UI: Dim collapse/expand icon on panels
Commit: 48c2c7b1b4cbbafc715af263a8593dd2e011ce7e Author: Pablo Vazquez Date: Fri Sep 3 20:03:29 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB48c2c7b1b4cbbafc715af263a8593dd2e011ce7e UI: Dim collapse/expand icon on panels === M source/blender/editors/interface/interface_panel.c === diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 33f9581156c..14fed6c02b8 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1168,8 +1168,10 @@ static void panel_draw_aligned_widgets(const uiStyle *style, }; uchar title_color[4]; + uchar collapse_icon_color[4]; panel_title_color_get(panel, show_background, region_search_filter_active, title_color); - title_color[3] = 255; + copy_v4_uchar(collapse_icon_color, *title_color); + collapse_icon_color[3] = 100; /* Draw collapse icon. */ { @@ -1188,7 +1190,7 @@ static void panel_draw_aligned_widgets(const uiStyle *style, aspect * U.inv_dpi_fac, 0.5f, 0.0f, -title_color, +collapse_icon_color, false); GPU_blend(GPU_BLEND_NONE); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [83b342fd914] temp-ui-tweaks: UI: Less prominent drag widget on panels
Commit: 83b342fd9142be875f82bfdd85d249fa84e51dff Author: Pablo Vazquez Date: Fri Sep 3 20:02:50 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB83b342fd9142be875f82bfdd85d249fa84e51dff UI: Less prominent drag widget on panels * Use 2 rows of 3 boxes per row, instead of 4. * Slightly smaller * Dimmer === M source/blender/editors/interface/interface_panel.c M source/blender/gpu/intern/gpu_batch_presets.c === diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index ac97cb4cc74..33f9581156c 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1233,10 +1233,10 @@ static void panel_draw_aligned_widgets(const uiStyle *style, GPU_matrix_translate_2f(widget_rect.xmax - scaled_unit * 1.15, widget_rect.ymin + (header_height - drag_widget_size) * 0.33f); -const int col_tint = 84; +const int col_tint = 40; float color_high[4], color_dark[4]; UI_GetThemeColorShade4fv(TH_PANEL_HEADER, col_tint, color_high); -UI_GetThemeColorShade4fv(TH_PANEL_BACK, -col_tint, color_dark); +UI_GetThemeColorShade4fv(TH_PANEL_HEADER, (-col_tint / 2), color_dark); GPUBatch *batch = GPU_batch_preset_panel_drag_widget( U.pixelsize, color_high, color_dark, drag_widget_size); diff --git a/source/blender/gpu/intern/gpu_batch_presets.c b/source/blender/gpu/intern/gpu_batch_presets.c index 6a1645a71d8..d810734b193 100644 --- a/source/blender/gpu/intern/gpu_batch_presets.c +++ b/source/blender/gpu/intern/gpu_batch_presets.c @@ -266,7 +266,7 @@ static GPUBatch *gpu_batch_preset_panel_drag_widget(float pixelsize, const float width) { GPUVertBuf *vbo = GPU_vertbuf_create_with_format(preset_2d_format()); - const uint vbo_len = 4 * 2 * (6 * 2); + const uint vbo_len = 3 * 2 * (6 * 2); GPU_vertbuf_data_alloc(vbo, vbo_len); GPUVertBufRaw pos_step, col_step; @@ -274,16 +274,16 @@ static GPUBatch *gpu_batch_preset_panel_drag_widget(float pixelsize, GPU_vertbuf_attr_get_raw_data(vbo, g_presets_2d.attr_id.col, _step); const int px = (int)pixelsize; - const int px_zoom = max_ii(round_fl_to_int(width / 22.0f), 1); + const int px_zoom = max_ii(round_fl_to_int(width / 24.0f), 1); const int box_margin = max_ii(round_fl_to_int((float)(px_zoom * 2.0f)), px); - const int box_size = max_ii(round_fl_to_int((width / 8.0f) - px), px); + const int box_size = max_ii(round_fl_to_int((width / 6.0f) - px), px); - const int y_ofs = max_ii(round_fl_to_int(width / 2.5f), px); + const int y_ofs = max_ii(round_fl_to_int(width / 3.0f), px); const int x_ofs = y_ofs; int i_x, i_y; - for (i_x = 0; i_x < 4; i_x++) { + for (i_x = 0; i_x < 3; i_x++) { for (i_y = 0; i_y < 2; i_y++) { const int x_co = (x_ofs) + (i_x * (box_size + box_margin)); const int y_co = (y_ofs) + (i_y * (box_size + box_margin)); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [18a3b9b238c] temp-ui-tweaks: Merge branch 'master' into temp-ui-tweaks
Commit: 18a3b9b238c40d84d350c54e73e7e89e2f30bc3b Author: Pablo Vazquez Date: Fri Sep 3 16:39:01 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB18a3b9b238c40d84d350c54e73e7e89e2f30bc3b Merge branch 'master' into temp-ui-tweaks === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [870404455bb] temp-ui-tweaks: UI: Add margin to panels
Commit: 870404455bb74ef0c1eb9bdd504be919d95f54c7 Author: Pablo Vazquez Date: Sat Aug 28 02:21:07 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB870404455bb74ef0c1eb9bdd504be919d95f54c7 UI: Add margin to panels Add some breathing space between the panel boundaries and properties/regions. Make use of the style->panelouter property that hasn't been used in a while. Also slight tweaks to boxspace and templatespace style properties so they are multiples of 2 and operations on them round better. === M source/blender/editors/interface/interface.c M source/blender/editors/interface/interface_panel.c M source/blender/editors/interface/interface_style.c M source/blender/editors/screen/area.c === diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index fd75be5b847..d896f1cd3ed 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1996,6 +1996,7 @@ static void ui_but_to_pixelrect(rcti *rect, const ARegion *region, uiBlock *bloc void UI_block_draw(const bContext *C, uiBlock *block) { uiStyle style = *UI_style_get_dpi(); /* XXX pass on as arg */ + const uiStyle *stylo = UI_style_get_dpi(); /* get menu region or area region */ ARegion *region = CTX_wm_menu(C); @@ -2050,6 +2051,8 @@ void UI_block_draw(const bContext *C, uiBlock *block) show_background = region->overlap != 0; } } + + rect.xmin += stylo->panelouter; } ui_draw_aligned_panel(, block, diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index ff9d2f4d770..a173642df98 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1075,9 +1075,10 @@ void UI_panels_draw(const bContext *C, ARegion *region) void UI_panel_label_offset(const uiBlock *block, int *r_x, int *r_y) { Panel *panel = block->panel; + const uiStyle *style = UI_style_get(); const bool is_subpanel = (panel->type && panel->type->parent); - *r_x = UI_UNIT_X * 1.0f; + *r_x = UI_UNIT_X * 1.0f + style->panelouter + U.pixelsize; *r_y = UI_UNIT_Y * 1.5f; if (is_subpanel) { diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 88ab6a377d0..5931e97168e 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -117,12 +117,12 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name, short uifont_id style->widget.shadowcolor = 0.0f; style->columnspace = 8; - style->templatespace = 5; - style->boxspace = 5; + style->templatespace = 4; + style->boxspace = 4; style->buttonspacex = 8; style->buttonspacey = 2; style->panelspace = 8; - style->panelouter = 4; + style->panelouter = 8; return style; } diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index e08a4e946f6..aba43ddc1a3 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2720,6 +2720,10 @@ static void ed_panel_draw(const bContext *C, if (open || search_filter_active) { short panelContext; +/* Extra offset and panel width adjustment to accomodate sides margin (style->panelouter). */ +const int xofs = (pt->flag & PANEL_TYPE_NO_HEADER) ? 0 : style->panelouter; +const int wofs = (pt->flag & PANEL_TYPE_NO_HEADER) ? style->panelouter : 0; + /* panel context can either be toolbar region or normal panels region */ if (pt->flag & PANEL_TYPE_LAYOUT_VERT_BAR) { panelContext = UI_LAYOUT_VERT_BAR; @@ -2735,9 +2739,9 @@ static void ed_panel_draw(const bContext *C, block, UI_LAYOUT_VERTICAL, panelContext, -(pt->flag & PANEL_TYPE_LAYOUT_VERT_BAR) ? 0 : style->panelspace, +(pt->flag & PANEL_TYPE_LAYOUT_VERT_BAR) ? 0 : style->panelspace + xofs, 0, -(pt->flag & PANEL_TYPE_LAYOUT_VERT_BAR) ? 0 : w - 2 * style->panelspace, +(pt->flag & PANEL_TYPE_LAYOUT_VERT_BAR) ? 0 : (w - 2 * style->panelspace + wofs - xofs), em, 0, style); @@ -2877,12 +2881,13 @@ void ED_region_panels_layout_ex(const bContext *C, ScrArea *area = CTX_wm_area(C); View2D *v2d = >v2d; + const uiStyle *style = UI_style_get_dpi(); bool use_category_tabs = (category_override == NULL) && region_uses_category_tabs(area, region); /* offset panels for small vertical tab area */ const char *category = NULL; const int category_tabs_
[Bf-blender-cvs] [323997ace39] temp-ui-tweaks: UI: Disable emboss on box widgets
Commit: 323997ace3911d1a8d6888d303345075d2d29948 Author: Pablo Vazquez Date: Sat Aug 28 01:48:55 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB323997ace3911d1a8d6888d303345075d2d29948 UI: Disable emboss on box widgets These are meant to be contour for an area flush with the background, having emboss hardcoded on the widget prevents this. === M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 113cb806f02..d6c0b4f4f5f 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -4247,6 +4247,7 @@ static void widget_box( const float rad = wcol->roundness * U.widget_unit; round_box_edges(, roundboxalign, rect, rad); + wtb.draw_emboss = false; widgetbase_draw(, wcol); copy_v3_v3_uchar(wcol->inner, old_col); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [82323cafb96] temp-ui-tweaks: UI: Fix dark and light themes
Commit: 82323cafb96e66516e39d008690e2d542c8affea Author: Pablo Vazquez Date: Fri Aug 27 20:57:26 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB82323cafb96e66516e39d008690e2d542c8affea UI: Fix dark and light themes Mainly so it doesn't look broken to people testing out the branch, namely the background of radio buttons was pure white, and separator in menus pure black. Also minor tweaks to the default theme. === M release/datafiles/userdef/userdef_default_theme.c M release/scripts/presets/interface_theme/Blender_Light.xml === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 85532d01d5c..53be80a19fa 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -62,11 +62,11 @@ const bTheme U_theme_default = { .roundness = 0.2f, }, .wcol_radio = { - .outline = RGBA(0x373737ff), - .inner = RGBA(0x595959ff), - .inner_sel = RGBA(0x5680c2e6), - .item = RGBA(0x), - .text = RGBA(0xe6e6e6ff), + .outline = RGBA(0x2c2c2cff), + .inner = RGBA(0x2c2c2cff), + .inner_sel = RGBA(0x476da3ff), + .item = RGBA(0x2c2c2cff), + .text = RGBA(0xccff), .text_sel = RGBA(0x), .shadetop = 5, .shadedown = -5, @@ -74,9 +74,9 @@ const bTheme U_theme_default = { }, .wcol_option = { .outline = RGBA(0x373737ff), - .inner = RGBA(0x66ff), - .inner_sel = RGBA(0x5680c2e6), - .item = RGBA(0x), + .inner = RGBA(0x1f1f1fff), + .inner_sel = RGBA(0x71a8ffe6), + .item = RGBA(0x1f1f1fff), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), .shadedown = -15, @@ -84,8 +84,8 @@ const bTheme U_theme_default = { }, .wcol_toggle = { .outline = RGBA(0x373737ff), - .inner = RGBA(0x595959ff), - .inner_sel = RGBA(0x5680c2e6), + .inner = RGBA(0x2c2c2cff), + .inner_sel = RGBA(0x476da3ff), .item = RGBA(0x191919ff), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), @@ -93,8 +93,8 @@ const bTheme U_theme_default = { }, .wcol_num = { .outline = RGBA(0x44ff), - .inner = RGBA(0x595959ff), - .inner_sel = RGBA(0x505050ff), + .inner = RGBA(0x4f4f4fff), + .inner_sel = RGBA(0x1f1f1fff), .item = RGBA(0x191919ff), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), @@ -102,9 +102,9 @@ const bTheme U_theme_default = { }, .wcol_numslider = { .outline = RGBA(0x44ff), - .inner = RGBA(0x595959ff), + .inner = RGBA(0x2c2c2cff), .inner_sel = RGBA(0x505050ff), - .item = RGBA(0x5680c2e6), + .item = RGBA(0x5680c2ff), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), .shaded = 1, @@ -112,9 +112,9 @@ const bTheme U_theme_default = { .roundness = 0.2f, }, .wcol_tab = { - .outline = RGBA(0x202020ff), - .inner = RGBA(0x2b2b2bff), - .inner_sel = RGBA(0x424242ff), + .outline = RGBA(0x1a1a1aff), + .inner = RGBA(0x1a1a1aff), + .inner_sel = RGBA(0x2e2e2eff), .item = RGBA(0x2d2d2dff), .text = RGBA(0x989898ff), .text_sel = RGBA(0x), @@ -123,7 +123,7 @@ const bTheme U_theme_default = { .wcol_menu = { .outline = RGBA(0x44ff), .inner = RGBA(0x2c2c2cff), - .inner_sel = RGBA(0x696e76ff), + .inner_sel = RGBA(0x476da3ff), .item = RGBA(0xd9d9d9ff), .text = RGBA(0xd9d9d9ff), .text_sel = RGBA(0x), @@ -133,8 +133,8 @@ const bTheme U_theme_default = { }, .wcol_pulldown = { .outline = RGBA(0x4d4d4dff), - .inner = RGBA(0x2e2e2ecc), - .inner_sel = RGBA(0x5680c2e6), + .inner = RGBA(0x0033), + .inner_sel = RGBA(0x476da3ff), .item = RGBA(0x727272ff), .text = RGBA(0xd9d9d9ff), .text_sel = RGBA(0x), @@ -144,7 +144,7 @@ const bTheme U_theme_default = { }, .wcol_menu_back = { .outline = RGBA(0x19191aff), - .inner = RGBA(0x1f1f1fef), + .inner = RGBA(0x1a1a1aff), .inner_sel = RGBA(0x585858ff), .item = RGBA(0x727272ff), .text = RGBA(0xa5a5a5ff), @@ -154,7 +154,8 @@ const bTheme U_theme_default = { .roundness = 0.2f, }, .wcol_menu_item = { - .inner_sel = RGBA(0x5680c2e6), + .outline = RGBA(0x37373700), + .inner_sel = RGBA(0x476da3ff), .item = RGBA(0xff8f), .text = RGBA(0xe6e6e6ff), .text_sel = RGBA(0x), @@ -173,7 +174,7 @@ const bTheme U_theme_default = { .roundness = 0.2f, }, .wcol_box = { - .outline = RGBA(0x44ff), + .outline = RGBA(0x262626ff), .inner = RGBA(0x0033
[Bf-blender-cvs] [071007e0eff] master: UI: Fix summary overlay wrong range and overlap in Dopesheet
Commit: 071007e0eff9dd474f4a3d1f479649242be22717 Author: Pablo Vazquez Date: Fri Aug 27 19:48:55 2021 +0200 Branches: master https://developer.blender.org/rB071007e0eff9dd474f4a3d1f479649242be22717 UI: Fix summary overlay wrong range and overlap in Dopesheet The overlay was drawn twice on top of each other making it hard to see, hard to theme, and making it more prominent in the wrong areas (before frame 0, not even start frame). The comment in the code was also wrong since it said "frame one" but it was 0. Checked with the Animation module team that it's better to use start/end frame range instead of frame 0. There is a TODO note to de-duplicate this section eventually so I left it there. This fix is currently done for Grease Pencil and Mask modes, but it should also be fixed for the regular Dopesheet mode (in line 244 if anyone wants to do it). === M source/blender/editors/space_action/action_draw.c === diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index a3bdcd2adf5..6f1a90e56a5 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -259,17 +259,18 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *region else { color = sel ? col1 : col2; } - /* frames less than one get less saturated background */ + + /* Color overlay on frames between the start/end frames. */ immUniformColor4ubv(color); - immRectf(pos, 0.0f, ymin, v2d->cur.xmin, ymax); + immRectf(pos, ac->scene->r.sfra, ymin, ac->scene->r.efra, ymax); - /* frames one and higher get a saturated background */ - immUniformColor3ubvAlpha(color, MIN2(255, color[3] * 2)); - immRectf(pos, v2d->cur.xmin, ymin, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymax); + /* Color overlay outside the start/end frame range get a more transparent overlay. */ + immUniformColor3ubvAlpha(color, MIN2(255, color[3] / 2)); + immRectf(pos, v2d->cur.xmin, ymin, ac->scene->r.sfra, ymax); + immRectf(pos, ac->scene->r.efra, ymin, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymax); } else if (ac->datatype == ANIMCONT_MASK) { /* TODO: this is a copy of gpencil. */ - /* frames less than one get less saturated background */ uchar *color; if (ale->type == ANIMTYPE_SUMMARY) { color = col_summary; @@ -277,12 +278,15 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *region else { color = sel ? col1 : col2; } + + /* Color overlay on frames between the start/end frames. */ immUniformColor4ubv(color); - immRectf(pos, 0.0f, ymin, v2d->cur.xmin, ymax); + immRectf(pos, ac->scene->r.sfra, ymin, ac->scene->r.efra, ymax); - /* frames one and higher get a saturated background */ - immUniformColor3ubvAlpha(color, MIN2(255, color[3] * 2)); - immRectf(pos, v2d->cur.xmin, ymin, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymax); + /* Color overlay outside the start/end frame range get a more transparent overlay. */ + immUniformColor3ubvAlpha(color, MIN2(255, color[3] / 2)); + immRectf(pos, v2d->cur.xmin, ymin, ac->scene->r.sfra, ymax); + immRectf(pos, ac->scene->r.efra, ymin, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymax); } } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7e4af18960b] temp-ui-tweaks: UI: Use rounded corners for panels and subpanels
Commit: 7e4af18960b31a29e12d76fc465de0b743ff2092 Author: Pablo Vazquez Date: Tue Aug 24 19:27:25 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB7e4af18960b31a29e12d76fc465de0b743ff2092 UI: Use rounded corners for panels and subpanels === M source/blender/editors/interface/interface_intern.h M source/blender/editors/interface/interface_panel.c === diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 6b0b8e8df8f..bb37696e44d 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -116,7 +116,8 @@ extern const char ui_radial_dir_to_numpad[8]; extern const short ui_radial_dir_to_angle[8]; /* internal panel drawing defines */ -#define PNL_HEADER (UI_UNIT_Y * 1.2) /* 24 default */ +#define PNL_HEADER (UI_UNIT_Y * 1.25) /* 24 default */ +#define PNL_CNR_RAD (UI_UNIT_Y * 0.25f) /* bit button defines */ /* Bit operations */ diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 330b6ea7744..ff9d2f4d770 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1119,15 +1119,15 @@ static void panel_draw_highlight_border(const Panel *panel, } float radius; + UI_draw_roundbox_corner_set(UI_CNR_ALL); + if (draw_box_style) { /* Use the theme for box widgets. */ const uiWidgetColors *box_wcol = _GetTheme()->tui.wcol_box; -UI_draw_roundbox_corner_set(UI_CNR_ALL); radius = box_wcol->roundness * U.widget_unit; } else { -UI_draw_roundbox_corner_set(UI_CNR_NONE); -radius = 0.0f; +radius = PNL_CNR_RAD; } float color[4]; @@ -1323,19 +1323,47 @@ static void panel_draw_aligned_backdrop(const Panel *panel, } } else { +/* Regular (non box style) panels. */ +const float margin_y = 2.5f; +float panel_backcolor[4]; +float panel_headercolor[4]; + immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); GPU_blend(GPU_BLEND_ALPHA); /* Panel backdrop. */ if (is_open || panel->type->flag & PANEL_TYPE_NO_HEADER) { - immUniformThemeColor(is_subpanel ? TH_PANEL_SUB_BACK : TH_PANEL_BACK); - immRectf(pos, rect->xmin, rect->ymin, rect->xmax, rect->ymax); + UI_draw_roundbox_corner_set(is_open ? UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT : UI_CNR_ALL); + UI_GetThemeColor4fv((is_subpanel ? TH_PANEL_SUB_BACK : TH_PANEL_BACK), panel_backcolor); + + /* Change the width a little bit to line up with the sides. */ + UI_draw_roundbox_4fv( + &(const rctf){ + .xmin = rect->xmin, + .xmax = rect->xmax, + .ymin = rect->ymin, + .ymax = rect->ymax, + }, + true, + PNL_CNR_RAD, + panel_backcolor); } /* Panel header backdrops for non sub-panels. */ if (!is_subpanel) { - immUniformThemeColor(UI_panel_matches_search_filter(panel) ? TH_MATCH : TH_PANEL_HEADER); - immRectf(pos, rect->xmin, header_rect->ymin, rect->xmax, header_rect->ymax); + UI_GetThemeColor4fv(UI_panel_matches_search_filter(panel) ? TH_MATCH : TH_PANEL_HEADER, + panel_headercolor); + UI_draw_roundbox_corner_set(is_open ? UI_CNR_TOP_RIGHT | UI_CNR_TOP_LEFT : UI_CNR_ALL); + UI_draw_roundbox_4fv( + &(const rctf){ + .xmin = rect->xmin, + .xmax = rect->xmax, + .ymin = header_rect->ymin, + .ymax = header_rect->ymax - margin_y, + }, + true, + PNL_CNR_RAD, + panel_headercolor); } GPU_blend(GPU_BLEND_NONE); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f3b2cbcb815] temp-ui-tweaks: UI: Separate each choice inside radio buttons
Commit: f3b2cbcb8158e126c2053133c83fda81bbd844d6 Author: Pablo Vazquez Date: Tue Aug 24 18:46:21 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBf3b2cbcb8158e126c2053133c83fda81bbd844d6 UI: Separate each choice inside radio buttons Add some room between the choices. This way we can give the background and non-active options the same color and make it look more like only one choice can be active at a time. This is in an effort to make the radio buttons and toggle buttons look different. Currently in Blender they looked the same even though radio buttons only allow one active option at a time, while toggles can be have multiple. === M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 585348555a1..01bdf4ce7e2 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -4198,10 +4198,32 @@ static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), { uiWidgetBase wtb; widget_init(); - const float rad = wcol->roundness * U.widget_unit; - round_box_edges(, roundboxalign, rect, rad); + const float padding = 0.05f; + float color[3]; + rgba_uchar_to_float(color, wcol->item); + + /* Draw the background for the entire widget first. */ + UI_draw_roundbox_corner_set(roundboxalign); + UI_draw_roundbox_4fv( + &(const rctf){ + .xmin = rect->xmin, + .xmax = rect->xmax, + .ymin = rect->ymin, + .ymax = rect->ymax, + }, + true, + rad, + color); + + /* Draw the pill inside, with a small margin to separate each radio choice. */ + rect->xmin += padding * U.widget_unit; + rect->xmax -= padding * U.widget_unit; + rect->ymin += padding * U.widget_unit; + rect->ymax -= padding * U.widget_unit; + round_box_edges(, UI_CNR_ALL, rect, rad); + wtb.draw_emboss = false; widgetbase_draw(, wcol); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [811dc12e34b] temp-ui-tweaks: UI: Make use of menu item theme roundness
Commit: 811dc12e34b3c9f76c7975d0e94d661306dbf1f3 Author: Pablo Vazquez Date: Tue Aug 24 02:48:43 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB811dc12e34b3c9f76c7975d0e94d661306dbf1f3 UI: Make use of menu item theme roundness Use theme preference instead of hardcoded square corners. === M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 3194764415b..585348555a1 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -4070,9 +4070,14 @@ static void widget_menu_itembut(uiWidgetColors *wcol, uiWidgetBase wtb; widget_init(); - /* not rounded, no outline */ + /* Padding on the sides. */ + rect->xmin += 0.2f * U.widget_unit; + rect->xmax -= 0.2f * U.widget_unit; + + /* No outline. */ wtb.draw_outline = false; - round_box_edges(, 0, rect, 0.0f); + const float rad = wcol->roundness * BLI_rcti_size_y(rect); + round_box_edges(, UI_CNR_ALL, rect, rad); widgetbase_draw(, wcol); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1cba89572f7] temp-ui-tweaks: UI: Use Outline color of menu item for separator
Commit: 1cba89572f789d6e61cb779c226c69661b9484d8 Author: Pablo Vazquez Date: Tue Aug 24 02:46:43 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB1cba89572f789d6e61cb779c226c69661b9484d8 UI: Use Outline color of menu item for separator Instead of forcing a transparent shadeof the text color. === M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 2d223b4d032..3194764415b 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -3358,19 +3358,12 @@ static void ui_draw_but_HSV_v(uiBut *but, const rcti *rect) static void ui_draw_separator(const rcti *rect, const uiWidgetColors *wcol) { const int y = rect->ymin + BLI_rcti_size_y(rect) / 2 - 1; - const uchar col[4] = { - wcol->text[0], - wcol->text[1], - wcol->text[2], - 30, - }; - + const uchar col[3] = {wcol->outline[0], wcol->outline[1], wcol->outline[2]}; const uint pos = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - GPU_blend(GPU_BLEND_ALPHA); - immUniformColor4ubv(col); + immUniformColor3ubv(col); GPU_line_width(1.0f); immBegin(GPU_PRIM_LINES, 2); @@ -3378,8 +3371,6 @@ static void ui_draw_separator(const rcti *rect, const uiWidgetColors *wcol) immVertex2f(pos, rect->xmax, y); immEnd(); - GPU_blend(GPU_BLEND_NONE); - immUnbindProgram(); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ad12ff53764] temp-ui-tweaks: UI: Adjust outline color of active default buttons
Commit: ad12ff537640cac650f8927976c22b8b5c113259 Author: Pablo Vazquez Date: Tue Aug 24 02:31:27 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBad12ff537640cac650f8927976c22b8b5c113259 UI: Adjust outline color of active default buttons Simply darken slightly the already used outline color. On light themes it prevents too bright outlines on hover. === M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index b317e0d2aa3..2d223b4d032 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2630,6 +2630,7 @@ static void widget_state(uiWidgetType *wt, int state, int drawflag, eUIEmbossTyp if (state & UI_BUT_ACTIVE_DEFAULT) { copy_v4_v4_uchar(wt->wcol.inner, wt->wcol.inner_sel); copy_v4_v4_uchar(wt->wcol.text, wt->wcol.text_sel); + color_mul_hsl_v3(wt->wcol.outline, 1.0f, 1.0f, 0.9f); } if (color_blend != NULL) { color_blend_v3_v3(wt->wcol.inner, color_blend, wcol_state->blend); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [49777cb7298] temp-ui-tweaks: UI: Support alpha in Value Slider widget
Commit: 49777cb72981ece922e234f308ecfe9698347e36 Author: Pablo Vazquez Date: Tue Aug 24 02:13:32 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rB49777cb72981ece922e234f308ecfe9698347e36 UI: Support alpha in Value Slider widget The alpha value was being ignored even though the item property could be set. === M source/blender/editors/interface/interface_widgets.c === diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index d3481c449ac..b317e0d2aa3 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -3801,7 +3801,7 @@ static void widget_numslider( uchar outline[3]; copy_v3_v3_uchar(outline, wcol->outline); copy_v3_v3_uchar(wcol->outline, wcol->item); -copy_v3_v3_uchar(wcol->inner, wcol->item); +copy_v4_v4_uchar(wcol->inner, wcol->item); if (!(state & UI_SELECT)) { SWAP(short, wcol->shadetop, wcol->shadedown); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a64d2815288] temp-ui-tweaks: UI: Do not rotate vertical scale indicators
Commit: a64d2815288082cfe65196dd3b58de282a03b011 Author: Pablo Vazquez Date: Tue Aug 24 02:03:07 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBa64d2815288082cfe65196dd3b58de282a03b011 UI: Do not rotate vertical scale indicators In animation editors with vertical scale indicators, such as Graph Editor or Drivers, display the values aligned to the view. === M source/blender/editors/interface/view2d_draw.c === diff --git a/source/blender/editors/interface/view2d_draw.c b/source/blender/editors/interface/view2d_draw.c index 95427e49495..cfd207dd58e 100644 --- a/source/blender/editors/interface/view2d_draw.c +++ b/source/blender/editors/interface/view2d_draw.c @@ -394,9 +394,6 @@ static void draw_vertical_scale_indicators(const ARegion *region, const int font_id = BLF_default(); UI_FontThemeColor(font_id, colorid); - BLF_enable(font_id, BLF_ROTATION); - BLF_rotation(font_id, M_PI_2); - BLF_batch_draw_begin(); const float xpos = rect->xmax - 2.0f * UI_DPI_FAC; @@ -416,7 +413,6 @@ static void draw_vertical_scale_indicators(const ARegion *region, } BLF_batch_draw_end(); - BLF_disable(font_id, BLF_ROTATION); GPU_matrix_pop_projection(); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [b9fa39c8e9d] temp-ui-tweaks: UI: Improve contrast on playhead
Commit: b9fa39c8e9d6ca7dceb7dc052f4334d95bab91e6 Author: Pablo Vazquez Date: Fri Aug 20 03:13:24 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBb9fa39c8e9d6ca7dceb7dc052f4334d95bab91e6 UI: Improve contrast on playhead Add a dark (background coloured) outline around it. === M source/blender/editors/animation/time_scrub_ui.c === diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index 8aeb6a57124..4dec54f0835 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -102,6 +102,7 @@ static void draw_current_frame(const Scene *scene, float text_width = UI_fontstyle_string_width(fstyle, frame_str); float box_width = MAX2(text_width + 8 * UI_DPI_FAC, 24 * UI_DPI_FAC); float box_padding = 3 * UI_DPI_FAC; + float outline = 1 * UI_DPI_FAC; float bg_color[4]; UI_GetThemeColorShade4fv(TH_CFRAME, -5, bg_color); @@ -112,13 +113,25 @@ static void draw_current_frame(const Scene *scene, const float subframe_x = UI_view2d_view_to_region_x(v2d, BKE_scene_ctime_get(scene)); GPUVertFormat *format = immVertexFormat(); uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); + immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); +GPU_blend(GPU_BLEND_ALPHA); + +immUniformThemeColorShadeAlpha(TH_BACK, -25, -100); +immRectf(pos, + subframe_x - U.pixelsize - outline, + scrub_region_rect->ymax - box_padding, + subframe_x + U.pixelsize + outline, + 0.0f); + immUniformThemeColor(TH_CFRAME); immRectf(pos, subframe_x - U.pixelsize, scrub_region_rect->ymax - box_padding, subframe_x + U.pixelsize, 0.0f); + +GPU_blend(GPU_BLEND_NONE); immUnbindProgram(); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a62ca11d7f9] temp-ui-tweaks: UI: Use arrow icon to collapse/expand panels
Commit: a62ca11d7f991113defd36f2676926d0e7599fb2 Author: Pablo Vazquez Date: Fri Aug 20 00:48:26 2021 +0200 Branches: temp-ui-tweaks https://developer.blender.org/rBa62ca11d7f991113defd36f2676926d0e7599fb2 UI: Use arrow icon to collapse/expand panels === M source/blender/editors/interface/interface_panel.c === diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 97d01ac3763..330b6ea7744 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1180,16 +1180,22 @@ static void panel_draw_aligned_widgets(const uiStyle *style, }; BLI_rctf_scale(_rect, 0.25f); -float triangle_color[4]; -rgba_uchar_to_float(triangle_color, title_color); - -ui_draw_anti_tria_rect(_rect, UI_panel_is_closed(panel) ? 'h' : 'v', triangle_color); +GPU_blend(GPU_BLEND_ALPHA); +UI_icon_draw_ex(collapse_rect.xmin - 5.0f, +collapse_rect.ymin - 6.0f / aspect, +UI_panel_is_closed(panel) ? ICON_RIGHTARROW : ICON_DOWNARROW_HLT, +aspect * U.inv_dpi_fac, +0.5f, +0.0f, +title_color, +false); +GPU_blend(GPU_BLEND_NONE); } /* Draw text label. */ if (panel->drawname[0] != '\0') { const rcti title_rect = { -.xmin = widget_rect.xmin + (panel->labelofs / aspect) + scaled_unit * 1.1f, +.xmin = widget_rect.xmin + (panel->labelofs / aspect) + scaled_unit * 1.2f, .xmax = widget_rect.xmax, .ymin = widget_rect.ymin - 2.0f / aspect, .ymax = widget_rect.ymax, @@ -1224,7 +1230,7 @@ static void panel_draw_aligned_widgets(const uiStyle *style, /* The magic numbers here center the widget vertically and offset it to the left. * Currently this depends on the height of the header, although it could be independent. */ GPU_matrix_translate_2f(widget_rect.xmax - scaled_unit * 1.15, -widget_rect.ymin + (header_height - drag_widget_size) * 0.5f); +widget_rect.ymin + (header_height - drag_widget_size) * 0.33f); const int col_tint = 84; float color_high[4], color_dark[4]; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [72f73c0b71c] master: UI: Use theme's alpha for Summary instead of a hardcoded value
Commit: 72f73c0b71c5378c0d33f0eb83222dc68d93a5ad Author: Pablo Vazquez Date: Thu Aug 19 20:24:38 2021 +0200 Branches: master https://developer.blender.org/rB72f73c0b71c5378c0d33f0eb83222dc68d93a5ad UI: Use theme's alpha for Summary instead of a hardcoded value === M source/blender/editors/space_action/action_draw.c === diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index a15f3507d7e..a3bdcd2adf5 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -248,7 +248,6 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *region uchar gpl_col[4]; if (ale->type == ANIMTYPE_SUMMARY) { color = col_summary; -color[3] = col1[3]; } else if ((show_group_colors) && (ale->type == ANIMTYPE_GPLAYER)) { bGPDlayer *gpl = (bGPDlayer *)ale->data; @@ -274,7 +273,6 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *region uchar *color; if (ale->type == ANIMTYPE_SUMMARY) { color = col_summary; -color[3] = col1[3]; } else { color = sel ? col1 : col2; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e9dc6a0e098] master: UI: Show a notification when saving preferences
Commit: e9dc6a0e09828453bb41a1990738d3a4deb1b130 Author: Pablo Vazquez Date: Sat Jul 31 03:15:10 2021 +0200 Branches: master https://developer.blender.org/rBe9dc6a0e09828453bb41a1990738d3a4deb1b130 UI: Show a notification when saving preferences So far the only way to know if they were saved properly was to check the terminal. Also notify when preferences fail to save. === M source/blender/blenkernel/intern/blendfile.c === diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 19721b4313d..61827be08e5 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -736,10 +736,12 @@ bool BKE_blendfile_userdef_write_all(ReportList *reports) if (ok_write) { printf("ok\n"); + BKE_report(reports, RPT_INFO, "Preferences saved"); } else { printf("fail\n"); ok = false; + BKE_report(reports, RPT_ERROR, "Saving preferences failed"); } } else { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f5cc3486107] master: VSE: Draw strips transparent during transform overlap
Commit: f5cc34861076ec832b2bac6628a5f43be5b042a2 Author: Pablo Vazquez Date: Tue Jul 27 20:14:22 2021 +0200 Branches: master https://developer.blender.org/rBf5cc34861076ec832b2bac6628a5f43be5b042a2 VSE: Draw strips transparent during transform overlap While transforming a strip, draw the background semi-transparent if it overlaps with another strip. It's convenient to see what's underneath, especially with the upcoming Overwrite feature. Thanks to @iss for the help and review. === M source/blender/editors/space_sequencer/sequencer_draw.c === diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index cdbe5bc63ce..9b63d5c4b8b 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -100,6 +100,7 @@ #define SEQ_HANDLE_SIZE 8.0f #define SEQ_SCROLLER_TEXT_OFFSET 8 #define MUTE_ALPHA 120 +#define OVERLAP_ALPHA 180 /* NOTE: Don't use SEQ_ALL_BEGIN/SEQ_ALL_END while drawing! * it messes up transform. */ @@ -802,11 +803,17 @@ static void draw_color_strip_band(Sequence *seq, uint pos, float text_margin_y, uchar col[4]; SolidColorVars *colvars = (SolidColorVars *)seq->effectdata; + GPU_blend(GPU_BLEND_ALPHA); rgb_float_to_uchar(col, colvars->col); + + /* Draw muted strips semi-transparent. */ if (seq->flag & SEQ_MUTE) { -GPU_blend(GPU_BLEND_ALPHA); col[3] = MUTE_ALPHA; } + /* Draw background semi-transparent when overlapping strips. */ + else if (seq->flag & SEQ_OVERLAP) { +col[3] = OVERLAP_ALPHA; + } else { col[3] = 255; } @@ -824,9 +831,7 @@ static void draw_color_strip_band(Sequence *seq, uint pos, float text_margin_y, immVertex2f(pos, seq->enddisp, text_margin_y); immEnd(); - if (seq->flag & SEQ_MUTE) { -GPU_blend(GPU_BLEND_NONE); - } + GPU_blend(GPU_BLEND_NONE); } static void draw_seq_background(Scene *scene, @@ -839,6 +844,7 @@ static void draw_seq_background(Scene *scene, bool is_single_image) { uchar col[4]; + GPU_blend(GPU_BLEND_ALPHA); /* Get the correct color per strip type, transitions use their inputs ones. */ if (ELEM(seq->type, SEQ_TYPE_CROSS, SEQ_TYPE_GAMCROSS, SEQ_TYPE_WIPE)) { @@ -855,14 +861,18 @@ static void draw_seq_background(Scene *scene, color3ubv_from_seq(scene, seq, col); } + /* Draw muted strips semi-transparent. */ if (seq->flag & SEQ_MUTE) { -GPU_blend(GPU_BLEND_ALPHA); - col[3] = MUTE_ALPHA; } + /* Draw background semi-transparent when overlapping strips. */ + else if (seq->flag & SEQ_OVERLAP) { +col[3] = OVERLAP_ALPHA; + } else { col[3] = 255; } + immUniformColor4ubv(col); /* Draw the main strip body. */ @@ -922,9 +932,7 @@ static void draw_seq_background(Scene *scene, immEnd(); } - if (seq->flag & SEQ_MUTE) { -GPU_blend(GPU_BLEND_NONE); - } + GPU_blend(GPU_BLEND_NONE); } static void draw_seq_locked(float x1, float y1, float x2, float y2) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a77d2039321] master: UI: Line Art: Rename "Baking" panel to "Bake"
Commit: a77d2039321726987f8f38edbb692fa51504e1db Author: Pablo Vazquez Date: Mon Jul 26 00:03:17 2021 +0200 Branches: master https://developer.blender.org/rBa77d2039321726987f8f38edbb692fa51504e1db UI: Line Art: Rename "Baking" panel to "Bake" Avoid using verbs for panel names, and be consistent with the "Bake" panel in Cycles, Ocean Modifier, etc. === M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c === diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c index 33e766a7315..0824df30e1f 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c @@ -621,7 +621,7 @@ static void vgroup_panel_draw(const bContext *UNUSED(C), Panel *panel) } } -static void baking_panel_draw(const bContext *UNUSED(C), Panel *panel) +static void bake_panel_draw(const bContext *UNUSED(C), Panel *panel) { uiLayout *layout = panel->layout; PointerRNA ob_ptr; @@ -677,7 +677,7 @@ static void panelRegister(ARegionType *region_type) gpencil_modifier_subpanel_register( region_type, "vgroup", "Vertex Weight Transfer", NULL, vgroup_panel_draw, panel_type); gpencil_modifier_subpanel_register( - region_type, "baking", "Baking", NULL, baking_panel_draw, panel_type); + region_type, "bake", "Bake", NULL, bake_panel_draw, panel_type); } GpencilModifierTypeInfo modifierType_Gpencil_Lineart = { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0cb25a51de5] master: UI: Line Art: Always use Material icon on picker
Commit: 0cb25a51de5feb46be387073771e021f28f33c28 Author: Pablo Vazquez Date: Sun Jul 25 23:59:53 2021 +0200 Branches: master https://developer.blender.org/rB0cb25a51de5feb46be387073771e021f28f33c28 UI: Line Art: Always use Material icon on picker The Material picker shouldn't change icon based on it's state, it should always display the Material icon. === M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c === diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c index bc6a9e53f11..33e766a7315 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c @@ -320,13 +320,8 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel) } uiLayout *row = uiLayoutRow(layout, true); uiLayoutSetRedAlert(row, !material_valid); - uiItemPointerR(row, - ptr, - "target_material", - _data_ptr, - "materials", - NULL, - material_valid ? ICON_SHADING_TEXTURE : ICON_ERROR); + uiItemPointerR( + row, ptr, "target_material", _data_ptr, "materials", NULL, ICON_SHADING_TEXTURE); gpencil_modifier_panel_end(layout, ptr); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6a673b60005] master: UI: Fix button alignment on Grease Pencil modifiers
Commit: 6a673b60005ce1bffbed4edfc4e8f32efe50c581 Author: Pablo Vazquez Date: Sun Jul 25 23:57:32 2021 +0200 Branches: master https://developer.blender.org/rB6a673b60005ce1bffbed4edfc4e8f32efe50c581 UI: Fix button alignment on Grease Pencil modifiers === M source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c === diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c index a79e212b9db..e750c22f0e8 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c @@ -346,7 +346,7 @@ static void gpencil_modifier_panel_header(const bContext *UNUSED(C), Panel *pane uiItemMenuF(row, "", ICON_DOWNARROW_HLT, gpencil_modifier_ops_extra_draw, md); /* Remove button. */ - sub = uiLayoutRow(row, true); + sub = uiLayoutRow(row, false); uiLayoutSetEmboss(sub, UI_EMBOSS_NONE); uiItemO(sub, "", ICON_X, "OBJECT_OT_gpencil_modifier_remove"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8fda1f363aa] master: UI: Line Art Modifier: Tweaks to labels and tooltips
Commit: 8fda1f363aac12daa5b848235df9ab4b323e5ae3 Author: Pablo Vazquez Date: Sun Jul 25 23:55:23 2021 +0200 Branches: master https://developer.blender.org/rB8fda1f363aac12daa5b848235df9ab4b323e5ae3 UI: Line Art Modifier: Tweaks to labels and tooltips - Clearer tooltips for Source Object/Collection. - Remove redundant Source/Target on labels. - Always write Grease Pencil with title case. === M source/blender/makesrna/intern/rna_gpencil_modifier.c === diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index b5dea7b019f..a6d4d05b438 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -3033,15 +3033,14 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna) prop = RNA_def_property(srna, "source_object", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); RNA_def_property_struct_type(prop, "Object"); - RNA_def_property_ui_text( - prop, "Source Object", "Source object that this modifier uses data from"); + RNA_def_property_ui_text(prop, "Object", "Generate strokes from this object"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update"); prop = RNA_def_property(srna, "source_collection", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_ui_text( - prop, "Source Collection", "Source collection that this modifier uses data from"); + prop, "Collection", "Generate strokes from the objects in this collection"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update"); /* types */ @@ -3105,12 +3104,11 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna) NULL, "rna_GpencilModifier_material_poll"); RNA_def_property_ui_text( - prop, "Target Material", "Grease Pencil material assigned to the generated strokes"); + prop, "Material", "Grease Pencil material assigned to the generated strokes"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); prop = RNA_def_property(srna, "target_layer", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text( - prop, "Target Layer", "Grease Pencil layer assigned to the generated strokes"); + RNA_def_property_ui_text(prop, "Layer", "Grease Pencil layer assigned to the generated strokes"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); prop = RNA_def_property(srna, "source_vertex_group", PROP_STRING, PROP_NONE); @@ -3275,7 +3273,7 @@ void RNA_def_greasepencil_modifier(BlenderRNA *brna) /* data */ srna = RNA_def_struct(brna, "GpencilModifier", NULL); - RNA_def_struct_ui_text(srna, "GpencilModifier", "Modifier affecting the grease pencil object"); + RNA_def_struct_ui_text(srna, "GpencilModifier", "Modifier affecting the Grease Pencil object"); RNA_def_struct_refine_func(srna, "rna_GpencilModifier_refine"); RNA_def_struct_path_func(srna, "rna_GpencilModifier_path"); RNA_def_struct_sdna(srna, "GpencilModifierData"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [3ef01692c8f] master: UI: Colors for Texture/Material node sockets and small tweaks
Commit: 3ef01692c8f068ccc083dd3d6a49ed055fe7224b Author: Pablo Vazquez Date: Wed May 12 17:55:07 2021 +0200 Branches: master https://developer.blender.org/rB3ef01692c8f068ccc083dd3d6a49ed055fe7224b UI: Colors for Texture/Material node sockets and small tweaks * Set colors for the new texture and material sockets * Material uses the same color used for shading icons * Texture uses a plum color desaturated enough to not be confused with Vector's violet * Image socket adjusted to be closer to Texture sockets but darker * Integer socket toned down in saturation to not stand out so much (and be closer to float sockets which are gray) Making this change now during bcon1 to gather feedback from the community, and because Geometry Nodes needs to use the new texture/material sockets. === M source/blender/editors/space_node/drawnode.c === diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 8f1bfe61ab9..6b4366b2966 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3334,14 +3334,14 @@ static const float std_node_socket_colors[][4] = { {0.39, 0.78, 0.39, 1.0}, /* SOCK_SHADER */ {0.80, 0.65, 0.84, 1.0}, /* SOCK_BOOLEAN */ {0.0, 0.0, 0.0, 1.0},/*__SOCK_MESH (deprecated) */ -{0.25, 0.75, 0.26, 1.0}, /* SOCK_INT */ +{0.35, 0.55, 0.36, 1.0}, /* SOCK_INT */ {0.44, 0.70, 1.00, 1.0}, /* SOCK_STRING */ {0.93, 0.62, 0.36, 1.0}, /* SOCK_OBJECT */ -{0.89, 0.76, 0.43, 1.0}, /* SOCK_IMAGE */ +{0.39, 0.22, 0.39, 1.0}, /* SOCK_IMAGE */ {0.00, 0.84, 0.64, 1.0}, /* SOCK_GEOMETRY */ {0.96, 0.96, 0.96, 1.0}, /* SOCK_COLLECTION */ -{0.50, 0.00, 0.00, 1.0}, /* SOCK_TEXTURE, TODO: Choose color. */ -{0.00, 0.50, 0.00, 1.0}, /* SOCK_MATERIAL, TODO: Choose color. */ +{0.62, 0.31, 0.64, 1.0}, /* SOCK_TEXTURE */ +{0.92, 0.46, 0.51, 1.0}, /* SOCK_MATERIAL */ }; /* common color callbacks for standard types */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [b7afb8ea700] master: Merge branch 'blender-v2.93-release'
Commit: b7afb8ea7001e2717f8d3ab38ec2b13f9fdf4587 Author: Pablo Vazquez Date: Sun May 9 01:52:33 2021 +0200 Branches: master https://developer.blender.org/rBb7afb8ea7001e2717f8d3ab38ec2b13f9fdf4587 Merge branch 'blender-v2.93-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [3c7b80ae2ca] blender-v2.93-release: GPencil: Sort Line Art modifier alphabetically
Commit: 3c7b80ae2ca6d85d957aa44be94933c71afb6d5e Author: Pablo Vazquez Date: Sun May 9 01:52:00 2021 +0200 Branches: blender-v2.93-release https://developer.blender.org/rB3c7b80ae2ca6d85d957aa44be94933c71afb6d5e GPencil: Sort Line Art modifier alphabetically === M source/blender/makesrna/intern/rna_gpencil_modifier.c === diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index b118adea14f..03a55c5a7da 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -68,6 +68,11 @@ const EnumPropertyItem rna_enum_object_greasepencil_modifier_type_items[] = { ICON_MOD_BUILD, "Build", "Create duplication of strokes"}, +{eGpencilModifierType_Lineart, + "GP_LINEART", + ICON_MOD_EDGESPLIT, /* TODO: Use a proper icon. */ + "Line Art", + "Generate line art strokes from selected source"}, {eGpencilModifierType_Mirror, "GP_MIRROR", ICON_MOD_MIRROR, @@ -88,11 +93,6 @@ const EnumPropertyItem rna_enum_object_greasepencil_modifier_type_items[] = { ICON_MOD_SUBSURF, "Subdivide", "Subdivide stroke adding more control points"}, -{eGpencilModifierType_Lineart, - "GP_LINEART", - ICON_MOD_EDGESPLIT, /* TODO: Use a proper icon. */ - "Line Art", - "Generate line art strokes from selected source"}, {0, "", 0, N_("Deform"), ""}, {eGpencilModifierType_Armature, "GP_ARMATURE", ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1325e95ad56] blender-v2.93-release: GPencil: Name Scene Line Art objects "Line Art"
Commit: 1325e95ad566d20d3432de3c9665a5448953ed14 Author: Pablo Vazquez Date: Sun May 9 01:51:12 2021 +0200 Branches: blender-v2.93-release https://developer.blender.org/rB1325e95ad566d20d3432de3c9665a5448953ed14 GPencil: Name Scene Line Art objects "Line Art" Matching Object and Collection line art type objects. === M source/blender/editors/object/object_add.c === diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index fafd19a91fe..fbb68542645 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1335,6 +1335,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op) break; } case GP_LRT_OBJECT: + case GP_LRT_SCENE: case GP_LRT_COLLECTION: { ob_name = "Line Art"; break; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9c509a72194] master: UI: Display indicator in the 3D Viewport when Clipping Region is on
Commit: 9c509a721949b7baae1a66b5775f44d52a5ef4c0 Author: Pablo Vazquez Date: Fri May 7 16:12:23 2021 +0200 Branches: master https://developer.blender.org/rB9c509a721949b7baae1a66b5775f44d52a5ef4c0 UI: Display indicator in the 3D Viewport when Clipping Region is on Small addition inspired by [this tweet](https://twitter.com/Vorundor/status/1390645286624763909) of a user in a situation I also saw myself in the past. Showing "(Clipped)" next to the view name in the `Text Info` overlay fits well since it's a per-viewport setting. {F10059921, size=full} While on Local view: {F10059925, size=full} Multiple viewports: {F10059946, size=full} Reviewed By: Severin Differential Revision: https://developer.blender.org/D11193 === M source/blender/editors/space_view3d/view3d_draw.c === diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index f3a279ee12b..1ef37ba4f9b 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1288,6 +1288,11 @@ static void draw_viewport_name(ARegion *region, View3D *v3d, int xoffset, int *y name_array[name_array_len++] = IFACE_(" (Local)"); } + /* Indicate that clipping region is enabled. */ + if (rv3d->rflag & RV3D_CLIPPING) { +name_array[name_array_len++] = IFACE_(" (Clipped)"); + } + if (name_array_len > 1) { BLI_string_join_array(tmpstr, sizeof(tmpstr), name_array, name_array_len); name = tmpstr; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8f04ddbbc62] master: Node Editor: Show frame label only when a label is set
Commit: 8f04ddbbc62631db4802ded6c26366c400361335 Author: Pablo Vazquez Date: Fri May 7 17:12:30 2021 +0200 Branches: master https://developer.blender.org/rB8f04ddbbc62631db4802ded6c26366c400361335 Node Editor: Show frame label only when a label is set Avoids having frames with the word "Frame" on top, resulting in less visual noise. (users were working this around by adding a space as label name). Differential Revision: D11193 === M source/blender/editors/space_node/drawnode.c === diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 5110c14ef4d..fa89d797076 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -456,7 +456,9 @@ static void node_draw_frame(const bContext *C, } /* label */ - node_draw_frame_label(ntree, node, snode->runtime->aspect); + if (node->label[0] != '\0') { +node_draw_frame_label(ntree, node, snode->runtime->aspect); + } UI_block_end(C, node->block); UI_block_draw(C, node->block); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [68c31c41e52] master: UI: Title case for Proxy Setup and fix typo
Commit: 68c31c41e52caa1ac5b527f835b16f8e298dfd86 Author: Pablo Vazquez Date: Sun Mar 21 18:40:38 2021 +0100 Branches: master https://developer.blender.org/rB68c31c41e52caa1ac5b527f835b16f8e298dfd86 UI: Title case for Proxy Setup and fix typo === M source/blender/makesrna/intern/rna_userdef.c === diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index edde5a1ed37..4c86405a44d 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5460,7 +5460,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) prop = RNA_def_property(srna, "sequencer_proxy_setup", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, seq_proxy_setup_options); RNA_def_property_enum_sdna(prop, NULL, "sequencer_proxy_setup"); - RNA_def_property_ui_text(prop, "Proxy setup", "When and how proxies are created"); + RNA_def_property_ui_text(prop, "Proxy Setup", "When and how proxies are created"); prop = RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "scrollback"); @@ -5502,7 +5502,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "light_param", ""); RNA_def_property_struct_type(prop, "UserSolidLight"); RNA_def_property_ui_text( - prop, "Solid Lights", "Lights user to display objects in solid shading mode"); + prop, "Solid Lights", "Lights used to display objects in solid shading mode"); prop = RNA_def_property(srna, "light_ambient", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "light_ambient"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [01f028a677e] master: Theme: Use curved noodles in the nodes editor.
Commit: 01f028a677e27cb68ea499c7899f7c7ba1bd9426 Author: Pablo Vazquez Date: Sat Mar 20 01:12:28 2021 +0100 Branches: master https://developer.blender.org/rB01f028a677e27cb68ea499c7899f7c7ba1bd9426 Theme: Use curved noodles in the nodes editor. Curved noodles increase readability especially in nodes with multiple input sockets. === M release/datafiles/userdef/userdef_default_theme.c M release/scripts/presets/interface_theme/Blender_Light.xml === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index 5b34515d080..48e675492f9 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -825,6 +825,7 @@ const bTheme U_theme_default = { .vertex_size = 3, .outline_width = 1, .facedot_size = 4, +.noodle_curving = 4, .grid_levels = 2, .syntaxl = RGBA(0x565656ff), .syntaxs = RGBA(0x975b5bff), diff --git a/release/scripts/presets/interface_theme/Blender_Light.xml b/release/scripts/presets/interface_theme/Blender_Light.xml index 9da075ad949..e75d4334582 100644 --- a/release/scripts/presets/interface_theme/Blender_Light.xml +++ b/release/scripts/presets/interface_theme/Blender_Light.xml @@ -953,7 +953,7 @@ frame_node="#9b9b9ba0" matte_node="#977474" distor_node="#749797" -noodle_curving="0" +noodle_curving="4" grid_levels="2" input_node="#cb3d4a" output_node="#cb3d4a" ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [bae4d00e2a3] master: UI: Use gray color for float sockets in nodes
Commit: bae4d00e2a33e255b33b59dbd273d56f3d796f0f Author: Pablo Vazquez Date: Wed Jan 13 17:17:39 2021 +0100 Branches: master https://developer.blender.org/rBbae4d00e2a33e255b33b59dbd273d56f3d796f0f UI: Use gray color for float sockets in nodes The shade is too close to RGBA sockets. Related to T82689 === M source/blender/editors/space_node/drawnode.c === diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index e30f10915f6..72f3a085ae1 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3505,7 +3505,7 @@ void ED_init_custom_node_socket_type(bNodeSocketType *stype) /* maps standard socket integer type to a color */ static const float std_node_socket_colors[][4] = { -{0.75, 0.75, 0.59, 1.0}, /* SOCK_FLOAT */ +{0.63, 0.63, 0.63, 1.0}, /* SOCK_FLOAT */ {0.39, 0.39, 0.78, 1.0}, /* SOCK_VECTOR */ {0.78, 0.78, 0.16, 1.0}, /* SOCK_RGBA */ {0.88, 0.43, 0.46, 1.0}, /* SOCK_SHADER */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ac7694aee05] master: UI: Update theme to match Shader nodes category color with socket color
Commit: ac7694aee05047750f955ee2fb0d62942392f6c0 Author: Pablo Vazquez Date: Wed Dec 9 21:09:23 2020 +0100 Branches: master https://developer.blender.org/rBac7694aee05047750f955ee2fb0d62942392f6c0 UI: Update theme to match Shader nodes category color with socket color The change to match socket color and category was already done, but it was missing versioning code to update the theme on load. Fixes T83500 (already closed as invalid, but this would solve the non-matching colors) Reviewed by Hans Goudey (HooglyBoogly) === M source/blender/blenkernel/BKE_blender_version.h M source/blender/blenloader/intern/versioning_userdef.c === diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 2ec9e0048a6..afb6112b954 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -39,7 +39,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 5 +#define BLENDER_FILE_SUBVERSION 6 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 1d85109774c..7bc11317bb4 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -255,6 +255,10 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) FROM_DEFAULT_V4_UCHAR(space_node.nodeclass_attribute); } + if (!USER_VERSION_ATLEAST(292, 6)) { +FROM_DEFAULT_V4_UCHAR(space_node.nodeclass_shader); + } + /** * Versioning code until next subversion bump goes here. * ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [82e401031fd] master: UI: Fix Node Groups color in Geometry Nodes
Commit: 82e401031fd12962cdf61e5334197aa013f65ec9 Author: Pablo Vazquez Date: Thu Dec 3 20:21:09 2020 +0100 Branches: master https://developer.blender.org/rB82e401031fd12962cdf61e5334197aa013f65ec9 UI: Fix Node Groups color in Geometry Nodes Node Groups didn't have a category assigned so they looked like inputs (red) instead of the Node Group theme color (green by default). === M source/blender/nodes/geometry/nodes/node_geo_common.cc === diff --git a/source/blender/nodes/geometry/nodes/node_geo_common.cc b/source/blender/nodes/geometry/nodes/node_geo_common.cc index 8adc3962698..441ad6bdc13 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_common.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_common.cc @@ -26,7 +26,7 @@ void register_node_type_geo_group(void) { static bNodeType ntype; - node_type_base_custom(, "GeometryNodeGroup", "Group", 0, 0); + node_type_base_custom(, "GeometryNodeGroup", "Group", NODE_CLASS_GROUP, 0); ntype.type = NODE_GROUP; ntype.poll = geo_node_poll_default; ntype.poll_instance = node_group_poll_instance; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8268b9827a4] master: Theme: update shader node color to match socket color
Commit: 8268b9827a4f344e1a9414a7fb33e02ccaed95c1 Author: Pablo Vazquez Date: Fri Nov 27 19:25:44 2020 +0100 Branches: master https://developer.blender.org/rB8268b9827a4f344e1a9414a7fb33e02ccaed95c1 Theme: update shader node color to match socket color Reviewed by Brecht Ref T82689. === M release/datafiles/userdef/userdef_default_theme.c M release/scripts/presets/interface_theme/blender_light.xml === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index bd0c1fccb98..4bfb5151ad8 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -836,7 +836,7 @@ const bTheme U_theme_default = { .nodeclass_filter = RGBA(0x584d80ff), .nodeclass_vector = RGBA(0x9b80), .nodeclass_texture = RGBA(0xe68745ff), -.nodeclass_shader = RGBA(0x39c884ff), +.nodeclass_shader = RGBA(0xea7581ff), .nodeclass_script = RGBA(0x084d4dff), .nodeclass_pattern = RGBA(0x6c696fff), .nodeclass_layout = RGBA(0x6c696fff), diff --git a/release/scripts/presets/interface_theme/blender_light.xml b/release/scripts/presets/interface_theme/blender_light.xml index fd80c6b27a5..25e92386c3e 100644 --- a/release/scripts/presets/interface_theme/blender_light.xml +++ b/release/scripts/presets/interface_theme/blender_light.xml @@ -954,12 +954,12 @@ distor_node="#749797" noodle_curving="0" grid_levels="2" -input_node="#ff6675" -output_node="#ff6675" +input_node="#cb3d4a" +output_node="#cb3d4a" filter_node="#6c696f" vector_node="#ff" texture_node="#ffc399" -shader_node="#a7ff99" +shader_node="#ea7581" script_node="#6c696f" pattern_node="#6c696f" layout_node="#6c696f" ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [96e131f246f] master: UI: update node socket colors
Commit: 96e131f246fe2760b559db827278e9e95de2de9e Author: Pablo Vazquez Date: Wed Dec 2 13:06:11 2020 +0100 Branches: master https://developer.blender.org/rB96e131f246fe2760b559db827278e9e95de2de9e UI: update node socket colors Note: This also changes the Shader socket color, to match "Shading" in the Outliner. Theme update for shader nodes will be committed separately. Ref T82689. === M source/blender/editors/space_node/drawnode.c === diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 0cd08404d19..a0e03490fa3 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3323,17 +3323,17 @@ void ED_init_custom_node_socket_type(bNodeSocketType *stype) /* maps standard socket integer type to a color */ static const float std_node_socket_colors[][4] = { -{0.63, 0.63, 0.63, 1.0}, /* SOCK_FLOAT */ +{0.75, 0.75, 0.59, 1.0}, /* SOCK_FLOAT */ {0.39, 0.39, 0.78, 1.0}, /* SOCK_VECTOR */ {0.78, 0.78, 0.16, 1.0}, /* SOCK_RGBA */ -{0.39, 0.78, 0.39, 1.0}, /* SOCK_SHADER */ -{0.70, 0.65, 0.19, 1.0}, /* SOCK_BOOLEAN */ +{0.88, 0.43, 0.46, 1.0}, /* SOCK_SHADER */ +{0.80, 0.65, 0.84, 1.0}, /* SOCK_BOOLEAN */ {0.0, 0.0, 0.0, 1.0},/*__SOCK_MESH (deprecated) */ -{0.06, 0.52, 0.15, 1.0}, /* SOCK_INT */ -{0.39, 0.39, 0.39, 1.0}, /* SOCK_STRING */ -{0.40, 0.10, 0.10, 1.0}, /* SOCK_OBJECT */ -{0.10, 0.40, 0.10, 1.0}, /* SOCK_IMAGE */ -{0.00, 0.00, 0.00, 1.0}, /* SOCK_GEOMETRY, TODO: Choose color. */ +{0.25, 0.75, 0.26, 1.0}, /* SOCK_INT */ +{0.44, 0.70, 1.00, 1.0}, /* SOCK_STRING */ +{0.93, 0.62, 0.36, 1.0}, /* SOCK_OBJECT */ +{0.89, 0.76, 0.43, 1.0}, /* SOCK_IMAGE */ +{0.00, 0.84, 0.64, 1.0}, /* SOCK_GEOMETRY */ }; /* common color callbacks for standard types */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [683041fd488] geometry-nodes: Theme: Update shader node color to match socket color
Commit: 683041fd488d06721e2169e2134c7dacd6bb80f6 Author: Pablo Vazquez Date: Fri Nov 27 19:25:44 2020 +0100 Branches: geometry-nodes https://developer.blender.org/rB683041fd488d06721e2169e2134c7dacd6bb80f6 Theme: Update shader node color to match socket color Related to T82689 Reviewed by Brecht === M release/datafiles/userdef/userdef_default_theme.c M release/scripts/presets/interface_theme/blender_light.xml === diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c index bdbd8386856..5f6e8ed8c61 100644 --- a/release/datafiles/userdef/userdef_default_theme.c +++ b/release/datafiles/userdef/userdef_default_theme.c @@ -835,7 +835,7 @@ const bTheme U_theme_default = { .nodeclass_filter = RGBA(0x584d80ff), .nodeclass_vector = RGBA(0x9b80), .nodeclass_texture = RGBA(0xe68745ff), -.nodeclass_shader = RGBA(0x39c884ff), +.nodeclass_shader = RGBA(0xea7581ff), .nodeclass_script = RGBA(0x084d4dff), .nodeclass_pattern = RGBA(0x6c696fff), .nodeclass_layout = RGBA(0x6c696fff), diff --git a/release/scripts/presets/interface_theme/blender_light.xml b/release/scripts/presets/interface_theme/blender_light.xml index 7c9b769e806..97dcdf04fc1 100644 --- a/release/scripts/presets/interface_theme/blender_light.xml +++ b/release/scripts/presets/interface_theme/blender_light.xml @@ -953,12 +953,12 @@ distor_node="#749797" noodle_curving="0" grid_levels="2" -input_node="#ff6675" -output_node="#ff6675" +input_node="#cb3d4a" +output_node="#cb3d4a" filter_node="#6c696f" vector_node="#ff" texture_node="#ffc399" -shader_node="#a7ff99" +shader_node="#ea7581" script_node="#6c696f" pattern_node="#6c696f" layout_node="#6c696f" ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [39ee0a5484a] geometry-nodes: UI: Update node socket colors
Commit: 39ee0a5484af686e8c1aa8ff605339b083dd299c Author: Pablo Vazquez Date: Fri Nov 27 19:07:26 2020 +0100 Branches: geometry-nodes https://developer.blender.org/rB39ee0a5484af686e8c1aa8ff605339b083dd299c UI: Update node socket colors Note: This also changes the Shader socket color, to match "Shading" in the Outliner. Theme update for shader nodes will be committed separately. Related to T82689 === M source/blender/editors/space_node/drawnode.c === diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index fdcd8f340dc..84e7a74fab3 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3378,17 +3378,17 @@ void ED_init_custom_node_socket_type(bNodeSocketType *stype) /* maps standard socket integer type to a color */ static const float std_node_socket_colors[][4] = { -{0.63, 0.63, 0.63, 1.0}, /* SOCK_FLOAT */ +{0.75, 0.75, 0.59, 1.0}, /* SOCK_FLOAT */ {0.39, 0.39, 0.78, 1.0}, /* SOCK_VECTOR */ {0.78, 0.78, 0.16, 1.0}, /* SOCK_RGBA */ -{0.39, 0.78, 0.39, 1.0}, /* SOCK_SHADER */ -{0.70, 0.65, 0.19, 1.0}, /* SOCK_BOOLEAN */ +{0.88, 0.43, 0.46, 1.0}, /* SOCK_SHADER */ +{0.80, 0.65, 0.84, 1.0}, /* SOCK_BOOLEAN */ {0.0, 0.0, 0.0, 1.0},/*__SOCK_MESH (deprecated) */ -{0.06, 0.52, 0.15, 1.0}, /* SOCK_INT */ -{0.39, 0.39, 0.39, 1.0}, /* SOCK_STRING */ -{0.85, 0.34, 0.11, 1.0}, /* SOCK_OBJECT */ -{0.10, 0.40, 0.10, 1.0}, /* SOCK_IMAGE */ -{0.00, 0.83, 0.64, 1.0}, /* SOCK_GEOMETRY */ +{0.25, 0.75, 0.26, 1.0}, /* SOCK_INT */ +{0.44, 0.70, 1.00, 1.0}, /* SOCK_STRING */ +{0.93, 0.62, 0.36, 1.0}, /* SOCK_OBJECT */ +{0.89, 0.76, 0.43, 1.0}, /* SOCK_IMAGE */ +{0.00, 0.84, 0.64, 1.0}, /* SOCK_GEOMETRY */ }; /* common color callbacks for standard types */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [43ceb0f0475] master: UI: avoid using "loc/rot", use full words instead.
Commit: 43ceb0f0475e7d9a4095ae0675dd976d03a83cfe Author: Pablo Vazquez Date: Wed Nov 4 14:25:00 2020 +0100 Branches: master https://developer.blender.org/rB43ceb0f0475e7d9a4095ae0675dd976d03a83cfe UI: avoid using "loc/rot", use full words instead. === M release/scripts/startup/bl_operators/object_randomize_transform.py === diff --git a/release/scripts/startup/bl_operators/object_randomize_transform.py b/release/scripts/startup/bl_operators/object_randomize_transform.py index a9a6819cb13..97c477d3704 100644 --- a/release/scripts/startup/bl_operators/object_randomize_transform.py +++ b/release/scripts/startup/bl_operators/object_randomize_transform.py @@ -97,7 +97,7 @@ from bpy.props import ( class RandomizeLocRotSize(Operator): -"""Randomize objects loc/rot/scale""" +"""Randomize objects location, rotation, and scale""" bl_idname = "object.randomize_transform" bl_label = "Randomize Transform" bl_options = {'REGISTER', 'UNDO'} ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs