Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
31 votes
3 answers
95k 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
19k 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 ...
  • 7,816
22 votes
3 answers
8k 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 ...
  • 505
16 votes
3 answers
12k 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 ...
  • 9,520
16 votes
4 answers
11k 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 ...
  • 1,080
14 votes
2 answers
2k 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 ...
  • 1,731
14 votes
2 answers
4k 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 ...
  • 605
13 votes
2 answers
26k 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: ...
  • 890
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 ...
13 votes
2 answers
2k views

Assign datablock to custom property

With bpy.props I can assign bool, int, float and string ...
  • 365
13 votes
2 answers
12k 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", ...
  • 327
12 votes
1 answer
15k 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 ...
  • 175
12 votes
1 answer
15k 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 ...
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 <...
  • 143
11 votes
1 answer
8k 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 ...
  • 14.8k
11 votes
1 answer
5k 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 ...
  • 423
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 ...
  • 11.1k
10 votes
4 answers
6k 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 ...
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).
  • 133
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 ...
  • 91
9 votes
1 answer
164 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 ...
  • 2,209
9 votes
1 answer
6k 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 ...
  • 237
8 votes
2 answers
10k 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, ...
  • 424
8 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 ...
  • 117
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 ...
8 votes
2 answers
670 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 ...
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 ...
  • 524
7 votes
4 answers
13k 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?
  • 15k
7 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 ...
  • 95
7 votes
1 answer
3k 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, ...
  • 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 ...
  • 245
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) ...
  • 7,816
7 votes
1 answer
2k 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: ...
  • 572
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: ...
  • 28.3k
7 votes
1 answer
730 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/...
  • 157
7 votes
0 answers
460 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 ...
  • 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'...
  • 63
6 votes
2 answers
36k 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 ...
6 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 ...
  • 7,816
6 votes
1 answer
4k 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 ...
6 votes
2 answers
630 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 ...
  • 1,526
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 ...
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 ...
6 votes
2 answers
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 : ...
  • 178
6 votes
2 answers
3k 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 : ...
  • 3,213
6 votes
1 answer
2k views

Controlling drivers with data received via TCP/UDP

For a project I need to drive shape keys with data received via a network connection. In my setup I receive input form a TouchOSC app running on an iPad into PureData on a Mac. The input data then is ...
  • 1,166
6 votes
1 answer
492 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: ...
  • 205
6 votes
1 answer
960 views

PointerProperty to node of material node tree

I'm trying to register a PointerProperty to a node in a material's node tree. After hours of trying a number of things, I suspect this is impossible and I think it's related to nodes not having their ...
  • 767
6 votes
1 answer
2k views

Python script to print tooltip value when mouse is over a property

I want to get the tooltip value of a property when the mouse is over it (after pressing a shortcut), like the X location of an object or another value that can be animated in the scene. In specific, ...
6 votes
2 answers
2k views

Reducing Rendering Time: Video Editing

System Specs: Intel i7 930 @ 2.80Ghz 16 GB DDR3 Gaming RAM 64-bit Windows 7 Ultimate Nvidea GeForce GTX 780 1 TB Western Digital HDD (non-SSD) Blender Settings: Audio Dev: SDL Compute Device: CUDA ...
  • 161

1
2 3 4 5
13