Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
24
votes
2answers
17k 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 ...
23
votes
3answers
63k views

Vertex count number display [duplicate]

Is there any way to show the number of selected vertices in Edit Mode?
21
votes
3answers
6k 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 ...
15
votes
4answers
9k 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 ...
14
votes
4answers
10k 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 ...
14
votes
2answers
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 ...
13
votes
3answers
3k 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
2answers
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 ...
12
votes
2answers
24k 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: ...
12
votes
2answers
2k views

Assign datablock to custom property

With bpy.props I can assign bool, int, float and string ...
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 <...
11
votes
1answer
2k 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
votes
1answer
12k 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 ...
10
votes
1answer
13k 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 ...
10
votes
3answers
5k 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 ...
10
votes
1answer
4k 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 ...
10
votes
2answers
10k 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", ...
9
votes
3answers
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).
9
votes
1answer
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 ...
9
votes
1answer
151 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 ...
9
votes
1answer
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 ...
8
votes
1answer
7k 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 ...
8
votes
2answers
4k 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 ...
8
votes
1answer
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 ...
7
votes
2answers
8k 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, ...
7
votes
4answers
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?
7
votes
1answer
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 ...
7
votes
2answers
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 ...
7
votes
1answer
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
votes
1answer
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: ...
7
votes
1answer
4k views

How to iterate over custom properties?

I have a number of custom string properties that I added to my scene with: ...
7
votes
1answer
626 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/...
6
votes
2answers
33k 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
2answers
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 ...
6
votes
2answers
236 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 ...
6
votes
1answer
2k 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, ...
6
votes
1answer
2k 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
1answer
3k 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
1answer
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 : ...
6
votes
2answers
449 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 ...
6
votes
1answer
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 ...
6
votes
1answer
754 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 ...
6
votes
1answer
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 ...
6
votes
1answer
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
2answers
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 ...
5
votes
4answers
1k 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'...
5
votes
1answer
3k 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 ...
5
votes
1answer
1k views

Change color of an object depending on camera view (cycles render)

For example I have an object in my sphere. I want the part of the sphere which is behind the object (in the sphere) to be blue and the part which is in front of it to be red. Is this possible? Is it ...
5
votes
2answers
4k views

(Blender 2.8) Smoke not showing in Physics Properties

The smoke physics is missing and I don't know how can I fix that. Thanks for helping me ! Here's the screen of the physics properties.
5
votes
2answers
918 views

"Copy To selected" How do i copy only the material diffuse colour?

How do I copy from one object to other selected object only the "diffuse colour"? Or any other material property to other multiple selected objects materials? Why "Copy To selected" is greyed out ...

1
2 3 4 5
11