Wrong initial size in the operator panel if Cylinder object is added through left side tool panel gizmo. #110452

Open
opened 2023-07-25 09:54:51 +02:00 by John-81 · 8 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.79

Blender Version
Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: rBcc66d1020c3b
Worked: (newest version of Blender that worked as expected)

Short description of error
I was told to post a bug report in the comments of my question so without further consideration I have done so.

When creating a cylinder from the tool menu on the left-hand side of the screen, the dimensions present in the window do not match what was created and manually inputting new dimensions will not result in the correct size, instead seeming to multiply by the existing shape's dimensions.

https://blender.stackexchange.com/questions/297689/add-mesh-cylinder-radius-confusion

Exact steps for others to reproduce the error

  1. Click create cylinder on left-hand tool menu
  2. Click and drag to create cylinder of any size and depth
  3. The "Add Cylinder" panel will always show a radius of 1m and the depth of 2m, and adjusting the values will scale the geometry accordingly as if the gizmo-created cylinder size is the 1m/2m base size.
**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.79 **Blender Version** Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash: `rBcc66d1020c3b` Worked: (newest version of Blender that worked as expected) **Short description of error** I was told to post a bug report in the comments of my question so without further consideration I have done so. When creating a cylinder from the tool menu on the left-hand side of the screen, the dimensions present in the window do not match what was created and manually inputting new dimensions will not result in the correct size, instead seeming to multiply by the existing shape's dimensions. https://blender.stackexchange.com/questions/297689/add-mesh-cylinder-radius-confusion **Exact steps for others to reproduce the error** 1. Click create cylinder on left-hand tool menu 2. Click and drag to create cylinder of any size and depth 3. The "Add Cylinder" panel will always show a radius of 1m and the depth of 2m, and adjusting the values will scale the geometry accordingly as if the gizmo-created cylinder size is the 1m/2m base size.
1.3 MiB
John-81 added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-07-25 09:54:51 +02:00

Hi, 3.1.2 is too old. Can you check this issues it 3.6 or 4.0 blender?

Hi, 3.1.2 is too old. Can you check this issues it 3.6 or 4.0 blender?
Author

Just checked, it seems to still be an issue as of
3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: 8bda729ef4dc

Just checked, it seems to still be an issue as of 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: `8bda729ef4dc`
Member

Can confirm. The default value is always the same no matter how the gizmo is dragged, and it will only take the dragged size as the base for dimension adjustments.

Can confirm. The default value is always the same no matter how the gizmo is dragged, and it will only take the dragged size as the base for dimension adjustments.
YimingWu changed title from Add Shape Tool Menu Mismatch to Wrong initial size in the operator panel if Cylinder object is added through left side tool panel gizmo. 2023-07-25 16:18:59 +02:00
Member

I think the issue might instead be that the scale parameter is not included in the redo panel? The scale argument is what is changed depending on how the tool is dragged to create the cylinder, and its value can be seen from the Info Log:
image

I think the issue might instead be that the `scale` parameter is not included in the redo panel? The `scale` argument is what is changed depending on how the tool is dragged to create the cylinder, and its value can be seen from the Info Log: ![image](/attachments/2f6f3871-1d6c-41fc-b606-59c2c058218f)
Member

@Mysteryem Interesting. I believe that the operator properties panel can toggle between using Depth/Radius and Scale depending on which tool it used or whether scale is set.

@Mysteryem Interesting. I believe that the operator properties panel can toggle between using Depth/Radius and Scale depending on which tool it used or whether `scale` is set.

Just for an illustration purpose ... nothing that moves things forward. Thanks :)

Just for an illustration purpose ... nothing that moves things forward. Thanks :)
Member
static void cylinder_add_ui(bContext * /*C*/, wmOperator *op)
{
  uiLayout *layout = op->layout;

  uiLayoutSetPropSep(layout, true);

  uiItemR(layout, op->ptr, "vertices", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "radius", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "depth", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "end_fill_type", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "calc_uvs", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "align", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "location", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "rotation", 0, nullptr, ICON_NONE);

  PropertyRNA *p = RNA_struct_find_property(op->ptr, "scale");
  if (p && RNA_property_is_set(op->ptr, p)) {
    uiItemR(layout, op->ptr, "scale", 0, nullptr, ICON_NONE);
  }
}

This probably can work, but needs to be adapted to other primitive types as well.

``` static void cylinder_add_ui(bContext * /*C*/, wmOperator *op) { uiLayout *layout = op->layout; uiLayoutSetPropSep(layout, true); uiItemR(layout, op->ptr, "vertices", 0, nullptr, ICON_NONE); uiItemR(layout, op->ptr, "radius", 0, nullptr, ICON_NONE); uiItemR(layout, op->ptr, "depth", 0, nullptr, ICON_NONE); uiItemR(layout, op->ptr, "end_fill_type", 0, nullptr, ICON_NONE); uiItemR(layout, op->ptr, "calc_uvs", 0, nullptr, ICON_NONE); uiItemR(layout, op->ptr, "align", 0, nullptr, ICON_NONE); uiItemR(layout, op->ptr, "location", 0, nullptr, ICON_NONE); uiItemR(layout, op->ptr, "rotation", 0, nullptr, ICON_NONE); PropertyRNA *p = RNA_struct_find_property(op->ptr, "scale"); if (p && RNA_property_is_set(op->ptr, p)) { uiItemR(layout, op->ptr, "scale", 0, nullptr, ICON_NONE); } } ``` This _probably_ can work, but needs to be adapted to other primitive types as well.
Author
static void cylinder_add_ui(bContext * /*C*/, wmOperator *op)
{
  uiLayout *layout = op->layout;

  uiLayoutSetPropSep(layout, true);

  uiItemR(layout, op->ptr, "vertices", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "radius", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "depth", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "end_fill_type", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "calc_uvs", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "align", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "location", 0, nullptr, ICON_NONE);
  uiItemR(layout, op->ptr, "rotation", 0, nullptr, ICON_NONE);

  PropertyRNA *p = RNA_struct_find_property(op->ptr, "scale");
  if (p && RNA_property_is_set(op->ptr, p)) {
    uiItemR(layout, op->ptr, "scale", 0, nullptr, ICON_NONE);
  }
}

This probably can work, but needs to be adapted to other primitive types as well.

I was just about to say that this issue is also present with other primitives and I forgot to mention that in the initial post. But for full clarity I will reiterate it regardless.

> ``` > static void cylinder_add_ui(bContext * /*C*/, wmOperator *op) > { > uiLayout *layout = op->layout; > > uiLayoutSetPropSep(layout, true); > > uiItemR(layout, op->ptr, "vertices", 0, nullptr, ICON_NONE); > uiItemR(layout, op->ptr, "radius", 0, nullptr, ICON_NONE); > uiItemR(layout, op->ptr, "depth", 0, nullptr, ICON_NONE); > uiItemR(layout, op->ptr, "end_fill_type", 0, nullptr, ICON_NONE); > uiItemR(layout, op->ptr, "calc_uvs", 0, nullptr, ICON_NONE); > uiItemR(layout, op->ptr, "align", 0, nullptr, ICON_NONE); > uiItemR(layout, op->ptr, "location", 0, nullptr, ICON_NONE); > uiItemR(layout, op->ptr, "rotation", 0, nullptr, ICON_NONE); > > PropertyRNA *p = RNA_struct_find_property(op->ptr, "scale"); > if (p && RNA_property_is_set(op->ptr, p)) { > uiItemR(layout, op->ptr, "scale", 0, nullptr, ICON_NONE); > } > } > ``` > > This _probably_ can work, but needs to be adapted to other primitive types as well. I was just about to say that this issue is also present with other primitives and I forgot to mention that in the initial post. But for full clarity I will reiterate it regardless.
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#110452
No description provided.