Page MenuHome

Negative number input gives syntax error for velocities and accelerations
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows 10 Professional 20H2
Graphics card: NVIDIA RTX 2070 Super

Blender Version
Broken: example: 2.90.1, 3e85bb34d0d7, master, 2020-09-23 06:43 (Steam version)
Caused by rB45dbc38a8b15: Fix T74552: Distribute negatives in number input

Short description of error
In hair velocity settings when I like to change a negative number or a number to negative without deleting the unit I get an error like this:

('invalid syntax', ('<string>', 1, 10, '(-(0.025 m)/s)*1'))

The error only occours when I like to change just the value.

Traceback

Traceback (most recent call last):
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\2.90\scripts\modules\bpy\utils\__init__.py", line 194, in register_module_call
    register()
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\2.90\scripts\startup\MSPlugin\__init__.py", line 649, in register
    bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
AttributeError: 'RNA_Types' object has no attribute 'TOPBAR_MT_file_import'
  File "<string>", line 1
    (-(0.025 m)/s)*1
             ^
SyntaxError: invalid syntax

Exact steps for others to reproduce the error

  • Use metric system.
  • Create a base mesh
  • Add a new hair particle system to the mesh with "Advanced" option is checked.
  • Go to the "Velocity" settings and change eg. the "Object Aligned X" default value from "0 m/s" to a negative number like "-0.1 m/s". (Using the "-" button or deleting the whole field and fill it is working).

Sample file