Maniphest T85405

Mapping Node "Scale" Vector has Incorrect Default Value
Closed, DuplicateBUG

Assigned To
None
Authored By
Johannes Jakob (johjakob)
Feb 5 2021, 6:52 PM
Tags
  • BF Blender
  • Nodes
  • User Interface
Subscribers
Hans Goudey (HooglyBoogly)
Johannes Jakob (johjakob)

Description

System Information
Operating system: macOS 11.2 Big Sur

Blender Version
Broken: 2.81 – 2.93
Worked: 2.80

Short description of error
The “Scale” vector in the Shader Editor’s Mapping node has an incorrect default value of (0, 0, 0). In Blender 2.80, the default value is (1, 1, 1) which makes much more sense for the mapping’s scale.

Exact steps for others to reproduce the error

  1. Add a “Mapping” node in the Shader Editor. The “Scale” vector has an initial value of (1, 1, 1).
  2. Right-click on the “Scale” vector and choose “Reset All to Default Values”.
  3. The vector resets to (0, 0, 0).

Event Timeline

Johannes Jakob (johjakob) created this task.Feb 5 2021, 6:52 PM
Johannes Jakob (johjakob) added a project: Nodes.
Johannes Jakob (johjakob) updated the task description.
Johannes Jakob (johjakob) added a comment.Feb 5 2021, 7:00 PM

I would like to fix this and I have been looking through the files in the makesdna and makesrna folders (where I suspect the default values to be), but I couldn’t find it. Can someone point me in the right direction please? :)

Hans Goudey (HooglyBoogly) added a subscriber: Hans Goudey (HooglyBoogly).Feb 5 2021, 7:13 PM

Hi Johannes, the default for sockets is actually defined in the node file itself, so sh_node_mapping_in in this case. On the other hand, the defaults are 1.0f in this case, so I'm not sure what's going wrong.

To investigate, I would place a breakpoint in reset_default_button_exec (the operator that gets called when you press backspace when your mouse is hovered over a button) and hope that it's clear why it doesn't work.

Hans Goudey (HooglyBoogly) changed the task status from Needs Triage to Confirmed.Feb 5 2021, 7:13 PM
Hans Goudey (HooglyBoogly) triaged this task as Low priority.
Hans Goudey (HooglyBoogly) changed the subtype of this task from "Report" to "Bug".
Hans Goudey (HooglyBoogly) added a project: User Interface.
Johannes Jakob (johjakob) added a comment.Feb 6 2021, 3:15 PM

It looks like this issue is related to T76704 and that basically all node parameters have no defined default value and thus reset to 0.

Hans Goudey (HooglyBoogly) added a comment.Feb 8 2021, 8:23 PM

In T80164 there are examples of commits that change various areas to use the DNA defaults system. That increases the scope of this task a bit, but it you're still interested, the changes shouldn't be that difficult.

I'm going to close this report as a duplicate of the task you mentioned though.

Hans Goudey (HooglyBoogly) closed this task as a duplicate of T76704: 'Reset to Default Value' sets any property on a node to 0.Feb 8 2021, 8:23 PM