Page MenuHome

minkovksy_exponent python value stays the same
Closed, ArchivedPublic

Description

System Information
ALL

Blender Version
Broken: (tested on 2.69 hash: eba07b7)
Worked: (Never?)

Short description of error
In Blender Voronoi's texture, Minkowski is the name given to the distance metric exponent. and Minkowsky 4; Minkowski 1/2; etc. all act merely as presets modifying only that very value, yet when we switch from one to the other the Python console shows no change.

Exact steps for others to reproduce the error

*Add a Voronoi texture to material of default cube
*use minkovsky 4 as its metric
*type in Python console bpy.data.textures[0].minkovksy_exponent
*switch to Minkovsky 1/2 with the interface
*type the same command

> Exponent is always the same

Even if you change it within its specific slider.
Note that Minkovsky with a V is the api writing whereas interface button shows Minkowsky with a W

Event Timeline

bpy.data.textures[0].minkovksy_exponent reports the correct value here for me, which is equal to what is seen in the "Exponent" slider.
Changing the Distance Metric value does not modify the Exponent value, therefore the python value is of course also not modified.
Therefore I'd say that this works correct.

The typo v/w mismatch is correct though, Minkowski with "w" is correct.
@Brecht Van Lommel (brecht): Should we fix this in RNA code? Would break PyApi compatibility though...

Thomas Dinges (dingto) lowered the priority of this task from 90 to Normal.Jan 1 2014, 9:13 PM
Brecht Van Lommel (brecht) changed the task status from Unknown Status to Archived.Jan 2 2014, 1:09 AM
Brecht Van Lommel (brecht) claimed this task.

This does indeed work correct, the exponent property is only used to specify a custom exponent. This happens in many places in the python API, properties like this do not become hidden/uneditable or change value when they are no longer relevant, that's quite standard in APIs I think.

The w/v name mismatch is a bit silly, but I rather not break compatibility for this, it doesn't really harm.

Maybe this is a feature request then: implementing Minkovsky 4 ; 1/2, etc. as presets would be more consistant and allow an exporter to rebuild the voronoi from a single coefficient instead of testing for four different enum items that indeed only change one parameter.

It's not because the value is also indicated by a slider that it's correct:
Minkovsky 1/2 is under the hood a voronoi with different distance metric (namely 0.5) than the one used for Minkovsky (2.5 by default). If the exponent property is not relevent to Minkovsky n, then why should it display that irrelevent attribute, would it be better to remove the distance metric attribute from these variations alltogether?