Skip to main content

Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
36 votes
3 answers
127k views

Vertex count number display [duplicate]

Is there any way to show the number of selected vertices in Edit Mode?
user avatar
24 votes
2 answers
23k views

How do I copy a property from an active object to selected objects?

I have been using the Copy Attributes add-on to copy some properties from active object to selected objects. This add-on is not enabled by default and must be explicitly enabled. But its a very useful ...
satishgoda's user avatar
  • 8,094
22 votes
3 answers
9k views

What does "users" means in term of datablocks?

I found that there is a "fake user" button (with a F icon) on object data tab in properties editor. What is the exact meaning of ...
Herks's user avatar
  • 515
17 votes
3 answers
15k views

Is it possible to use bpy.props.PointerProperty to store a pointer to an object?

If the user renames an object, the reference via string key is lost. Is it possible to store a pointer to an object in a property assigned to a class of bpy.types ...
pink vertex's user avatar
  • 9,876
17 votes
4 answers
12k views

Can I refer to another object's properties from a Cycles node shader? Drivers? If so, how?

I am trying to develop several shaders that need to take into account the position or orientation of another object in my scene. Seems like a generally useful thing to be able to do. Here's an ...
Chuck's user avatar
  • 1,090
16 votes
2 answers
5k views

Parenting messes up transforms - where is the offset stored?

When I parent an object to another object with keep_transforms=True The object stays in place as expected, however I noticed that the location attribute of the child did not change. If I zero out the ...
PolyMesh's user avatar
  • 655
14 votes
2 answers
28k views

How to check if an object has a custom property with python?

The standard python hasattr() doesn't work for me, giving me False in every case: ...
gabrign's user avatar
  • 910
14 votes
2 answers
3k views

Can I just copy "Z location" to all the selected objects?

"Copy to selected" copies the complete location X, Y and Z to all the selected objects. I wish to copy only Z location. Please see the images bellow to get idea of what I intend to achieve. Before ...
ashwin's user avatar
  • 1,739
14 votes
1 answer
9k views

Dynamic EnumProperty by type of selection

Iam searching for a method to get a EnumProperty by the type of the object (Lamp, Geo, Camera) thats selected in the viewport. E.g. If the selected object is a lamp, it would be nice the enum ...
p2or's user avatar
  • 16k
14 votes
1 answer
18k 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 ...
Fabrice's user avatar
  • 195
14 votes
2 answers
3k views

Assign datablock to custom property

With bpy.props I can assign bool, int, float and string ...
Germar's user avatar
  • 375
13 votes
3 answers
4k views

How would I change a Cycles material's color using the scale of the object instance it's applied to?

Basically I have a field of spheres that are a bunch of different sizes that use the same material and I want them to be a different color based on their size. I'm using a volumetric shader, so each ...
stapleshotz's user avatar
13 votes
1 answer
7k views

In Python is it possible to change the background color of a property ui?

I want to be able to change the background color of a property ui. At the moment it does: Green = has an Fcurve Yellow = has a keyframe Purple = has a Driver I want to to be able to change the ...
MCHammond's user avatar
  • 451
13 votes
2 answers
15k views

How to access custom properties from python

How can I access a custom property of an object from python, the suggestion Blender gives me if I pass the mouse over the custom properties named "prop", ...
darius's user avatar
  • 327
12 votes
1 answer
20k views

Use custom properties (variable values) in the node editor

An object's Custom Properties panel looks like a great way to inject variable values in the Compositor: However, there does not seem to be an Input that defines a reference to the Object Data's ...
Dave Jarvis's user avatar
12 votes
2 answers
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 <...
Fab's user avatar
  • 143
11 votes
4 answers
8k views

Color as Custom Property?

With objects, there you can add Custom Properties to an object, though it only seems to let you specify numeric values. Is there any way that I can add a color value as a custom property, such as ...
Zauberin Stardreamer's user avatar
11 votes
1 answer
3k views

Add menu entry to generic right-click menu?

I can't find a way to append/prepend an operator to blenders generic "right-click" menu. When looking into the source of interface_handlers.c it seems the operators ...
brockmann's user avatar
  • 12.6k
9 votes
2 answers
11k views

Adding Other types of Custom Properties

I'm starting to use the amazing, yet simple to use Blender Drivers: I'm looking for a way to add other Types of Custom Properties than the default floats. For instance: Color, Vector, String, ...
melMass's user avatar
  • 444
9 votes
3 answers
2k views

How to toggle between Flat and Smooth shading during animation?

The Edge Split modifier doesn't give me desired results (even with angle set to 0 it looks different).
Sielan's user avatar
  • 133
9 votes
2 answers
5k views

Setting a Property's min and max values after creation

When using an Int- or FloatProperty, is there any way of changing their min and ...
Senshi's user avatar
  • 127
9 votes
1 answer
6k views

Creating a custom permanent property in Blender 2.70 python script to access in GUI Panel

I was going through the "Getting started" API documentation for 2.68 since I'm guessing 2.70 is similar. I was testing out how to create my first script in 2.70 which I would like to save values which ...
mdietz's user avatar
  • 91
9 votes
1 answer
3k views

How to display EnumProperty control like radio buttons, while keeping the selection exclusive?

I have an EnumProperty set up on the Scene in the register function: ...
luke1985's user avatar
  • 592
9 votes
1 answer
180 views

Storing preferences without having properties in every scene?

I did applink for 3dCoat app. I set Export directory manually. At present, i should set the directory in every blend scene. But i would like to set the directory path only one time and store it aways ...
mifth's user avatar
  • 2,351
9 votes
1 answer
7k views

Get "Object Color" property in Cycles

I need a way to get the Object Color in Cycles. I was thinking about using the attribute node, but I don't know what to write in the name entry. Is there another way to get the color? Please don't ...
Hikaru Ai's user avatar
  • 237
8 votes
1 answer
1k views

Make an object infinitely far away?

I have a moon object and I'd like it not to be affected by parallax for the camera. I want it to look as if it's infinitely far away, without just moving it really far away in my scene. Is this ...
max's user avatar
  • 105
8 votes
1 answer
2k views

My properties panel is horizontal, how do I turn it back to vertical?

I'm not entirely sure what happened, maybe a hit the wrong key. ut my properties bar is horizontal, it's playing hell with my ability to select anything that takes up a lot of vertical room (like ...
Douglas Gaskell's user avatar
8 votes
2 answers
964 views

Create a tree of properties?

My add-on acts upon a hierarchy of data (a tree). I am not sure how best to represent this hierarchy as properties to expose the data to the user. For simplicity, let us define an example: say that ...
slerfsterdn's user avatar
8 votes
1 answer
2k views

Creating Dynamic Blender Properties

How do you generate Blender Properties dynamically, and assign them on the fly? Generating properties dynamically is inherently useful when parsing semi-structured data from an external source such ...
jay's user avatar
  • 524
8 votes
1 answer
935 views

What are the parameters event and full_event of UILayout are for?

can someone help me to understand the function of the parameters event and full_event of UILayout, please? The only description i can find ist this from the documentation (https://www.blender.org/api/...
thz's user avatar
  • 167
7 votes
2 answers
2k views

What is the difference between bpy.types.IntProperty and bpy.props.IntProperty?

I am always confused between bpy.types.IntProperty and bpy.props.IntProperty. (similarly with other properties) Most of the ...
satishgoda's user avatar
  • 8,094
7 votes
4 answers
14k views

How to Set a Property Value in Blender Game Engine?

How would I set a property value with python in the Blender game engine?
CharlesL's user avatar
  • 15.3k
7 votes
1 answer
6k views

Python with Blender: Using EnumProperty the dynamic way

I want to use the EnumProperty the dynamic way. I've got two dialog boxes. In the first one I'm asking for database parameters and in the second one the user has to ...
AndyLicht's user avatar
7 votes
2 answers
42k views

How to open properties bar, I accidentally closed it? [duplicate]

As you can see I accidentally closed my properties bar on the right hand side and I can't figure out how to open it again. Please help! I mean the part I have boxed in red in this one I can't get ...
InvisableGleek's user avatar
7 votes
1 answer
2k views

Is it possible to add a custom property on bpy.types.Sequence?

I am in the process of writing a tool that makes uses of Sequences in the Sequence Editor. I was trying the following in my add-on (register() method) ...
satishgoda's user avatar
  • 8,094
7 votes
1 answer
4k views

What does it mean when a property is highlighted in green?

I'm trying to edit a template I downloaded for a personal project. I have specific axis values from a previous version of the template that I wish to add to the updated version. However when I do, ...
Steve's user avatar
  • 71
7 votes
2 answers
2k views

Dynamic creation of properties for export script

This time I have a question about Properties in Blender. I want the operator window of my add-on to have one BoolProperty per action defined in ...
Luis W's user avatar
  • 255
7 votes
1 answer
2k views

Per-object custom properties in shaders

I need a number of shading properties that are unique per object, so I can control the strength of a couple of effects in the shader. The color property in the Object info node is a perfect example of ...
DGruwier's user avatar
7 votes
2 answers
5k views

How do I register 'Scene' properties with Python in 2.8?

I'm currently udpating some 2.7x script for 2.8. Everything is going fine except for one thing: Currently the script uses a class to store some properties like so: ...
Yadoob's user avatar
  • 83
7 votes
1 answer
1k views

How to assign PointerProperty in Operator through UI?

I have multiple instances of class LayerSettings(bpy.types.PropertyGroup), which is simply a group of variables. These are stored at the scene level (they're a ...
S. Magnusson's user avatar
  • 1,503
7 votes
1 answer
4k views

How to iterate over custom properties?

I have a number of custom string properties that I added to my scene with: ...
Ray Mairlot's user avatar
  • 29.3k
7 votes
1 answer
2k views

How to iterate through a PropertyGroup?

I'm fairly new to using Blender's API, and Python for that matter, and just can't find the answer to my question elsewhere so here it goes: I have a PropertryGroup and I want to write the names and ...
BagpiperPhil's user avatar
7 votes
0 answers
470 views

Change size of StringProperty Text Input [duplicate]

Is there a way to increase the vertical height of a StringProperty? My goal is to have a multi line text entry field. I have applied a scale_y which works on operator buttons but doesn't seem to work ...
AkBKukU's user avatar
  • 197
6 votes
4 answers
2k views

Drive shape key based on relative camera orientation?

Let's say (for the sake of simplicity) that this cube with two blue sides is my character... and the shape key in question raises a few vertices on top. Whenever the camera views either Blue side, I'...
ItsWy's user avatar
  • 63
6 votes
2 answers
1k views

How to change Texture properties via python?

Changing texture data properties via python seem impossible because the properties are inherited from the texture Type for example texture.noise_scale don't exists ...
Fox's user avatar
  • 1,932
6 votes
1 answer
3k views

Hide custom properties in the UI panel with python

I tried to use options={'HIDDEN'} when I declare my property but it doesn't seems to work. Is there a way to hide a custom property in the UI panel?
Stan Paillereau's user avatar
6 votes
1 answer
2k views

Blender Python Propertygroup update

I try to define five variables (called weights) with Propertygroups and a function to be notified if the Floatporperty-sliders have been moved: ...
Mike75's user avatar
  • 205
6 votes
1 answer
3k views

Control custom properties

How can I add remove and create a callback/event for a custom property using bpy. I have a scene, called scene, and I want to add a custom property named ...
GiantCowFilms's user avatar
6 votes
2 answers
4k views

Add a filter for the extension of a file in the file browser

I'm writing a python script that allow us to open a file in it like that: It's a string properties wich is coded like that : ...
lucblender's user avatar
  • 3,343
6 votes
1 answer
4k views

Large Braids with Hair Particles

How could I take out the space in-between the hair strands on a large braid? I would like to remove those "holes" and make hair children better distributed. I tried reducing the amplitude, but it ...
tuliomarchetto's user avatar

1
2 3 4 5
15