Can't copy and paste Normal Node position value #67483

Closed
opened 2019-07-23 04:05:38 +02:00 by Joe Elliott · 6 comments

System Information
Operating system: Windows 10 (64 bit)
Graphics card: NVIDIA GeForce GTX 1050 Ti

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-18 14:52, hash: 38d4483c6a, type: Release
build date: Thu 07/18/2019, 09:28 AM platform: Windows

Worked: version: 2.79 (sub 0), branch: master, commit date: 2018-03-22 14:10, hash: f4dc9f9d68, type:
build date: Thu 03/22/2018, 09:59 AM platform: Windows

Short description of error
The value of the normal node cannot be copied and pasted to another normal node.

Exact steps for others to reproduce the error

  • Open a Shader Editor window;
  • Add a pair of new Normal nodes (Add->Vector->Normal, two times);
  • Click and drag the sphere depicting the normal value in the first Normal node;
  • Hover over the sphere, hit ctrl+ckey to copy the normal value;
  • Hover over the other sphere in the second normal node;
  • Press ctrl+vkey to paste the normal value.

Expected behavior
The second normal node should update to show a normal value matching that of the first node.

Additional notes:
This was working in Blender 2.79. In 2.80 rc2, the "Copy to Selected" option in the RMB context menu works fine, but it can't be used to copy the value of the normal node from one material to another, only within the same material. The mouse-over copy-paste functionality does appear to be working for everything else (colors, numbers, even the RGB Curves node!), so hopefully this is a simple problem to solve.

I'd be happy to provide images or a .blend file if you need them, but it's hard to capture the fact that the program isn't copying or pasting the value from the normal node in an image or a .blend file.

**System Information** Operating system: Windows 10 (64 bit) Graphics card: NVIDIA GeForce GTX 1050 Ti **Blender Version** Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-18 14:52, hash: 38d4483c6a51, type: Release build date: Thu 07/18/2019, 09:28 AM platform: Windows Worked: version: 2.79 (sub 0), branch: master, commit date: 2018-03-22 14:10, hash: f4dc9f9d68b, type: build date: Thu 03/22/2018, 09:59 AM platform: Windows **Short description of error** The value of the normal node cannot be copied and pasted to another normal node. **Exact steps for others to reproduce the error** - Open a Shader Editor window; - Add a pair of new Normal nodes (Add->Vector->Normal, two times); - Click and drag the sphere depicting the normal value in the first Normal node; - Hover over the sphere, hit ctrl+ckey to copy the normal value; - Hover over the other sphere in the second normal node; - Press ctrl+vkey to paste the normal value. **Expected behavior** The second normal node should update to show a normal value matching that of the first node. **Additional notes:** This was working in Blender 2.79. In 2.80 rc2, the "Copy to Selected" option in the RMB context menu works fine, but it can't be used to copy the value of the normal node from one material to another, only within the same material. The mouse-over copy-paste functionality does appear to be working for everything else (colors, numbers, even the RGB Curves node!), so hopefully this is a simple problem to solve. I'd be happy to provide images or a .blend file if you need them, but it's hard to capture the fact that the program isn't copying or pasting the value from the normal node in an image or a .blend file.
Author

Added subscriber: @EllJNidan

Added subscriber: @EllJNidan
Bastien Montagne was assigned by Sebastian Parborg 2019-07-30 15:46:45 +02:00
Bastien Montagne removed their assignment 2019-07-31 11:40:13 +02:00
Campbell Barton was assigned by Bastien Montagne 2019-07-31 11:40:13 +02:00

Added subscribers: @brecht, @mont29

Added subscribers: @brecht, @mont29

OK, so issue is that when leaving 'edit' mode of the pasted button, code applies one last time the value from edit struct to the button. This is not good in that case, since pasting directly edit orig data, not temp button editing one, which is hence in orig state.

That simple patch fixes reported issue, but would rather have someone more at ease with UI code to have a look at it, since I cannot understand why it seems to only affect the normal widget, and not e.g. the color swatch one?

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index d4e8b7548bc..01f148711bd 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2296,6 +2296,9 @@ static void ui_but_paste_normalized_vector(bContext *C, uiBut *but, char *buf_pa
       xyz[2] = 1.0;
     }
     ui_but_set_float_array(C, but, NULL, xyz, 3);
+
+    but->active->applied = true;
+    but->active->applied_interactive = true;
   }
   else {
     WM_report(RPT_ERROR, "Paste expected 3 numbers, formatted: '[n, n, n]'");
OK, so issue is that when leaving 'edit' mode of the pasted button, code applies one last time the value from edit struct to the button. This is not good in that case, since pasting directly edit orig data, not temp button editing one, which is hence in orig state. That simple patch fixes reported issue, but would rather have someone more at ease with UI code to have a look at it, since I cannot understand *why* it seems to only affect the normal widget, and not e.g. the color swatch one? ``` diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index d4e8b7548bc..01f148711bd 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2296,6 +2296,9 @@ static void ui_but_paste_normalized_vector(bContext *C, uiBut *but, char *buf_pa xyz[2] = 1.0; } ui_but_set_float_array(C, but, NULL, xyz, 3); + + but->active->applied = true; + but->active->applied_interactive = true; } else { WM_report(RPT_ERROR, "Paste expected 3 numbers, formatted: '[n, n, n]'"); ```
Campbell Barton was unassigned by Dalai Felinto 2019-12-23 16:33:36 +01:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This issue was referenced by 34853c7e06

This issue was referenced by 34853c7e06c98fb26c2a5969317f340b6551005a
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2020-01-29 11:15:22 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#67483
No description provided.