← All ideas
  • Published 3 Jun 2018

Reset to default value actually reset to default value

Here's an example: Let's say I'm mucking around with bevel and I want to set it back to the default. I right click. I select reset to default value and viola.. it resets it to 0.5 and I can tweak from the starting point again.

Except that doesn't happen.

It sets it to zero. Reset to default value ALWAYS resets the value to zero.

IOR? zero. width? zero material? Zero

what doesn't it reset to zero? Things that clamp to 1 at the minimum value.

I would like clicking reset to default value to actually reset the value to it's default.

2018-06-03 16_10_31-Blender_ [C__Users_Daedalus_Dropbox_2018_Blender_Feature Request - save selectio.jpg

100%

Development Status: Open

Upvote 28 Downvote 0
newbie2356
3 Jun 2018

8 Comments

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Yeah, this is a pretty big problem. Hope they fix this.

2
o.mangold

Maybe that is more of a bug report, than a feature suggestion? developer.blender.org/maniphest/

2
pablovazquez

A bit of history:

When properties were ported from 2.4 to 2.5, this feature didn't exist, so tools didn't get a default value. Then the "Reset to default value" system was added and a few cases were adressed to serve as an example for other developers to contribute. Almost nobody did it. Same happened with Drag & Drop, Ton implemented the foundation system and a few cases were covered as an example to be used by other developers, unfortunately it wasn't picked up as much.

Drag & Drop is a bit more complicated, but default settings is super, extremely simple to add yourself if you compile your own Blender. Anyone even without coding experience can do it. It just has to be done for every property.

Basically you go to the rna_***whatever***.c , for example rna_scene.c . Look for the definition of the property you want to add a default, then add it for the type of property it is (float, array, int, etc).

In the case of an * int *, it would be:

RNA_def_property_int_default(prop, 999);

Where 999 is the value of the default. Look around the code for other default types, they are in rna_define.c , like RNA_def_property_float_default .

0 is used when the property doesn't have a default specified in its RNA definition. The more cases we cover, the more this "Reset to default value" will be come more usable by everyone.

So, you don't need a doctorate to do it, anyone can, let's help the developers with this monkey work so they can focus on the important things.

1
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

@Pablo Vazquez: Perhaps this would be better implemented in version 2.8b or 2.81? It does get to be a bit of a minor annoyance when the "Reset to default value" option doesn't always work as it should. Maybe it would be more intuitive if it said "set to zero" instead?

pablovazquez

@simontmonroe: There is no "better implemented". It's is already implemented and as I said it's 1 line of code to add a default property. It's not rocket science it's just monkey work that the community can help with.

"Set to Zero" is misleading as well because there are actually properties that have a default value, there are just not too many of them yet.

newbie2356 Author

@Pablo Vazquez: Interesting thanks for the history. Perhaps adding the little asterisk whenever a value is different from default would be a good new feature to add to blender then. That way every property who's default is incorrectly 0, it'll have an asterisk, which will make it very easy to tell (just by looking) if the default value isn't properly encoded into the blender code.

I'll have to figure out how to get the blender source code so I can contribute. Seems daunting, probably isn't, but who knows maybe it's a pain... I've never done it.

newbie2356 Author

@Pablo Vazquez: To add extra questions though. Why do they have a default value then? Where is that encoded in the source code? And why isn't that the value used? Why would we need to add in a second default value for the reset to default to work?

When I add a glass shader, the default ior is glass (1.45). But when I press reset to default, it sets it to 0. Where did blender get that 1.45? Why can't it just use that value when determining if default has changed/resetting to default?

pablovazquez

@newbie2356: Unfortunately it's not as simple.

Decades ago when there was no default, the values came from the startup.blend so everyone could have their own default values.

When adding/creating a new setting a new 'default' value has to be assigned, or when opening old files in a new Blender version these settings needed a default value on creation or when opening Blender.

Then the switch to RNA happened in 2.5, and the Default Value was finally added. Now with that in mind developers could use that value, but as I said it is not assigned to every property yet (what I explained in the first comment) so we can't just make the switch, yet.