Linked Questions

0 votes
0 answers
42 views

Property set/get example for operator needed [duplicate]

Still trying to wrap a property into my Addon where I can dynamically control the values of the resulting variable. Take the default operator_mesh_add example and alter the definition of the width ...
IRayTrace's user avatar
  • 349
7 votes
1 answer
739 views

How can I catch a workspace change event?

I want to write a function, which will be called after changing the workspace. I thought, that i can find workspace change event in bpy.app.handlers, but it looks ...
Crantisz's user avatar
  • 37.4k
3 votes
1 answer
3k views

How to declare global variables for use in an addon that aren't stored in the blend file

How can i cleanly declare and edit variables for use in an addon the don't need to be registered like a PropertyGroup but also aren't stored in the blend file? I'm working off of the basic addon ...
Thiedent's user avatar
  • 129
6 votes
2 answers
986 views

Addon: how to make Blender run check()/redraw when option changed?

Operators have a check() function that Blender calls when it wants to check if it should redraw. Exporters usually use this to attach a file extension to the file ...
scurest's user avatar
  • 10.6k
1 vote
2 answers
2k views

Get previous value of updated property

I have a UIList with a "name" string property, it has an update function, but I need access to the name before and after the update, but as you run name_update() the name has obviously already changed:...
Way2Close's user avatar
  • 480
4 votes
2 answers
2k views

How can I change IntProperty default value stored within PropertyGroup?

I am trying to dynamically modify IntProperty default value. Currently, it is stored in bpy.types.Scene.mysettings as PropertyGroup. So far I've succeeded in ...
karlisup's user avatar
4 votes
1 answer
588 views

How do I prevent an infinite loop on property update?

I'm displaying N-instances of a Collection Property (depending on the amount of selected objects) — the values are floats, default values are 100/N, and I want to ...
Sergey Kritskiy's user avatar
1 vote
1 answer
814 views

Is There a Way to Change a Prop with an Update Def without Calling the Update Def?

Is there a way to change a prop with an update def without calling the update def? ...
Syler's user avatar
  • 824
2 votes
1 answer
300 views

Force scientific notation in Blender GUI

I have an addon in development, and create various meshes in it. I have several physically based parameters, that are often extremely small, but make sense in the context they are. I have in my GUI ...
Stefan Karlsson's user avatar
0 votes
1 answer
645 views

How to assign FloatProperty, EnumProperty etc values through script

I have been googling this and can't find an answer. I defined a float property that creates a number spinner in my UI that allows me to move an object back and forth. I would like to clamp this value ...
user1803763's user avatar
0 votes
1 answer
223 views

How to loop values on Custom properties

I added a custom property to an object with an integer value and a max of 3. Is there any way to loop the value? I want it to return to the value of 0 after 3. Is it possible?
Geovanie Orcullo's user avatar
0 votes
0 answers
123 views

Custom property not evaluated on first frame of animation

I am adding a bunch of properties to cameras with my add-on. To support animation during renders, I add a frame_change_post handler like this: ...
chafouin's user avatar
  • 328
0 votes
1 answer
134 views

Python-defined property does not start with default value

I am defining an extra property for all objects like this: bpy.types.Object.alpha = bpy.props.FloatProperty( default=100.0, min=0.0, max=100.0 ) ...
CompileYourCake's user avatar
1 vote
1 answer
36 views

Need code review. Get and Set understanding

What I have: select two points then click “First” (get length between), then other two points - click “Second” (get length between), and then click “Scale” and get value “Second / First”. Am I right ...
APEC's user avatar
  • 649