Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
2
votes
2answers
628 views

Changing the color of an object (UV sphere)

I've been enjoying my first hours with Blender so, my question is super simple. I am trying to make a neon loop with the sun on the horizon. How do I change the color of the sun only, without changing ...
4
votes
1answer
77 views

Trying to create property groups dynamically to store a list and access the strings

I'm trying to create property groups dynamically to store a list. When I loop through property groups all I get is the objects like the output code block below. When really what I want is the test ...
2
votes
1answer
61 views
+150

'List' of Properties in NLA Strip Pt.2

In relation to 'List' of Properties in NLA Strip. see that part for details... How can I get the list (and its custom properties) saved into a "specific" NLA Strip, so the item(s) ...
1
vote
2answers
207 views

How to change a *VectorProperty size?

Let's say I've created a scene property named a: ...
3
votes
1answer
53 views

Assigning custom properties automatically

I have been looking at some add-ons written by other users, and noticed that on startup, every object in the scene has custom properties defined automatically, even if the addon is never actually used....
0
votes
1answer
654 views

Action actuator: how to get the "frame property" go back to 1 when the animation ends

I have an action actuator that plays an animation (in "play" mode) and stores the "frame property" in a property called "frame". When the animation ends, I believe the "frame property" should go back ...
1
vote
1answer
56 views

'List' of Properties in NLA Strip Pt.1

I've got this UI element, outlined in red in the image, in the NLA Editor. I can make the UI elements, but I need help with the logic. How can the 'UI List' contain just the two custom properties ...
1
vote
1answer
28 views

With the _RNA_UI changes on Blender 3.0 how do you set up/edit Custom Properties?

For instance if I have this code from @batFINGER that adds a Custom Property for every Shape Key in a Mesh, but it ends up that both min and max values here are - and + infinity and aren't being set ...
0
votes
1answer
49 views

Add a delay before shooting bullet (UPBGE)

When I mouse click the bullet fires automatically. Is there a way for the bullet to fire a second (or any set time) after the mouse click? I feel like other questions have addressed how to add delays ...
0
votes
1answer
102 views

Where to find the Animation Properties?

Hey guys so I was watching a youtube tutorial on basic animation (I'm just starting out) and then apparently my blender version is newer than his. So one thing he had was an animation tab in the ...
2
votes
0answers
35 views

How to get a collection of a material node's unique properties with the python API?

I'm attempting to find a way to identify the unique properties from material nodes to put into a collection instead of accessing their values by their name. Nodes have collections for inputs, outputs, ...
0
votes
0answers
18 views

How can I update panel properties only once on event

I am writing an addon that deals with creating objects and assigning them properties based on panel parameters. I want the panel to update it's parameters to match the properties of my selected object ...
2
votes
1answer
61 views

Blender's property definition: is this standard Python type annotation?

According to Blender's doc, this is how to define properties: ...
0
votes
1answer
218 views

error passing a property to a function (name not defined)

I am fairly new to python scripting, so getting into blender is a uphill battle at the moment. I want to pass a property into the REDO panel that, when checked, tells the operator to take effect only ...
5
votes
1answer
132 views

Keyboard Shortcuts for Properties panel?

I find myself clicking through tabs and accordions in the Properties Editor so often that I wish there was a more ergonomic way to navigate through. The tabs I'm referring to are Render, Output, View ...
11
votes
1answer
14k views

How display and use operator properties in a Python Blender UI panel?

I have try to make an UI Panel with my operator, but i can not create a panel with the 2 choices (axis and widht). I can create a button who launch a menu in the tools pannel, and the operator works ...
0
votes
1answer
28 views

Dynamic Enum Property Translation Problem

I have a problem with a dynamic enum. Strangely enough special characters are not handled there as you would imagine. Here is a script to test. So that you don't have to create extra files, as it is ...
1
vote
2answers
44 views

Setting the Default Value of a Float Property Dynamically

I am updating the active object's location.x with a FloatProperty with the following code. How can I change the value of the FloatProperty slider to the active_object's current location.x when the ...
2
votes
0answers
19 views

Connecting an Operator with a Panel Float Slider

I have a very basic question about Operators and Properties. I can't wrap my mind around how I'd make a Float slider in a Panel that affects a selected object in the 3D view as I drag it in real time. ...
0
votes
1answer
23 views

nothing is affecting viewport

I opened my donut project that I had been working on, and all of my materials and properties had been gone and were not showing up on my donut in viewport, except they were all still in the properties ...
0
votes
0answers
34 views

Error when removing item from EnumProperty created from a Json file by using .pop()

I have a multi-module addon that has ModuleA as AddonPrefs and ModuleB as operators. I have the following EnumProperty inside my ModuleA AddonPreferences. It takes in a function that makes a list ...
1
vote
3answers
51 views

Why is globalString not being updated by localUpdate in this add-on?

From the print statements in localUpdate it appears that changing the value of localString in the ...
2
votes
1answer
34 views

FloatProperty not precise (bug?)

So I assigned a floatproperty inside my script. As I moved along I noticed differences that was unexplainable. SO I started to check the properties and how the system take care of them. Result is <...
0
votes
0answers
23 views

Initialize collection property during register

I'm writing an addon in which I can select multiple resolutions to render the image at, and each selected resolution has its own options, like quality (i.e. number of samples), etc. All selectable ...
0
votes
1answer
171 views

Symmetry and Alignment

I'm creating a snowman while watching a tutorial so I got these 2 eyeballs on him how do I make sure that they are on symetrical spots on the huge snowball of the head, and how do I make sure that all ...
0
votes
1answer
11 views

Why FloatVectorProperty of subtype 'QUATERNION' is of type EULER?

The FloatVectorProperty gets subtype argument to change the data type of float vector. After setting this argument to subtype <...
0
votes
0answers
15 views

How to Change Custom Properties from Object to Bone?

So I have a rig, and this rig has a bunch of custom properties used to control many of the rig's features, like the IK/FK switch. But the thing is that there were so many custom properties that it ...
6
votes
2answers
2k views

How to block custom properties from being edited by the user?

I'm creating a custom property for each object in my scene but don't want the user to be able to edit it. Is it possible to block the property in ui ? Here is my code : ...
0
votes
1answer
171 views

Edit custom properties cycles_visibility

After boolean operation with BoolTool addon new line appeared in cycles_visibility under custom properties. After that, object is no longer visible on render. How to remove this line?
0
votes
0answers
35 views

Save the path in custom property

I have added a string property as a path in the preferences. What can I do so that this path is automatically saved like all other preferences? The Property is set up like this: ...
0
votes
0answers
25 views

Access the original Props for exporting OBJ files

I recently wrote a script for batch exporting OBJ files. The problem is that for every export option I had to create a Custom property to "feed" the bpy.ops.export_scene.obj() in order to ...
0
votes
3answers
339 views

Can't access custom properties of a linked characters proxy rig

I have a rigified character. I added a custom property to the rig object to drive a shape key on the face. It works as expected in the original file: the custom property slider of the rig drives the ...
4
votes
2answers
205 views

How to stop blender from purging unused materials when closing

Where can I change the setting that makes blender purge unused materials when closing your project? I lost several materials just because they were not in use at the moment I saved and closed blender. ...
0
votes
0answers
26 views

How to get name(label) of the checkbox

As an example of a checkbox, I took Viewport Denoising (You can see it in the picture). I have a checkbox and I want to get its name(label) through a script. How to do it?
4
votes
1answer
543 views

Copy existing property from e.g. Properties window to a custom panel

So if I have this custom panel in the 3D view, is there a way I can take a property from for example the properties window and paste it onto my panel below the "text" prop, without creating a new ...
2
votes
1answer
119 views

Can't register property group

I'm having a bit of a weird situation. I have one Property Group which I am successfully registering, and another seemingly identical one that fails to register. I have no idea why. These are my two ...
1
vote
1answer
258 views

Passing variables in IntProperty constructors ignores changes in the variable when creating more instances using CollectionProperty.add()?

Sorry if the title is unclear. I'm working on an addon which involves a UI with a list of IntProperties. I need to be able to add and remove elements from that list on the fly, and I want the min/max ...
0
votes
0answers
41 views
4
votes
1answer
92 views

Change object color depending on camera rotation

Say that I have a cube. I'd like for it to change into one of 5 colors: black, red, green, blue, or white depending on which direction the camera is facing towards it. If the camera moves to face the ...
3
votes
1answer
631 views

Linked Objects, Drivers and Animation of custom Properties

I have created an Object with some Shape Keys. To simplify the planned Animation, I have created four custom Properties on that object and connected some drivers, so that the change of one Property ...
1
vote
1answer
201 views

Active Keyframe Panel is not showing in the graph editor

I have selected a keyframe in the graph editor and I want to view it's properties. I selected keyframes in the graph editor. Pressed N key and tried pulling out the side arrow. Instead of getting the ...
1
vote
1answer
19 views

How to procedurally generate new properties in PropertyGroup?

I need a LOT of properties in my plugin, and a lot of them are very redundant, they are using a naming system. I'd like to generate them more easily via a function, the only problem is that since 2.8 ...
0
votes
1answer
760 views

Selecting objects with the same property values (without Python)

I want to assign various properties to objects and then select all objects with a certain set of values for those properties. The objects are graphs from tests (created with CSV Mesh Importer, so ...
1
vote
1answer
84 views

Use 2 color pickers to drive one value?

I'm currently driving the hair and body base color from a single property on the character below. However, I'd like the hair to be driven by another property as well. So that both properties (when ...
0
votes
1answer
20 views

How to re-access properties panel after misclicked by accident? [duplicate]

I usually change the segments & rings at the properties panel after generated an object. The problem is when I misclick, it disappears and couldn't find re-opening option. I have to delete the ...
0
votes
1answer
68 views

enum_items is empty on a dynamic EnumProperty

I'm developing an addon on Blender 2.91 and I can't wrap my head around something: I have a dynamic (uses a callback for items) EnumProperty inside of a ...
1
vote
2answers
107 views

Creating a row of boolean properties (with icons) aligned in a UI panel

Is it possible to do this within a bpy API - a set of boolean properties where multiple can be selected, with their own icons, right next to each other like below (from the outliner filter): Whenever ...
12
votes
2answers
1k views

How to register global (i.e., unique per file) properties?

I need to store additional information in a .blend file, that occurs only once per file. So, attaching it to, for example, bpy.types.Scene doesn't help. Since <...
0
votes
1answer
1k views

How to add custom color picker in blender material panel?

I would like to add a custom colour picker for a custom material section. The colour picker should be below the red line in the image: I found a code but this make the colour picker on the "tool ...
0
votes
0answers
38 views

How Change StringProperty Subtype with a Button?

The Blender API Allows you to create a property to insert a "Hidden" text useful for example to use for Password. This is possible by entering a parameter ...

1
2 3 4 5
12