Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
7
votes
1answer
5k 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 ...
20
votes
3answers
3k 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 ...
22
votes
1answer
11k 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 ...
12
votes
3answers
6k 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 ...
13
votes
3answers
4k 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 ...
11
votes
2answers
2k views

Assign datablock to custom property

With bpy.props I can assign bool, int, float and string ...
9
votes
1answer
5k 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 ...
2
votes
2answers
2k views

Set rotation values without applying them

Is it possible to set some rotation values to Blender GUI corresponding object fields (or any other like location or scale) without actually applying them to the object itself, like some sort of "...
4
votes
4answers
534 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'...
7
votes
2answers
3k 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 ...
7
votes
1answer
6k 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 ...
4
votes
1answer
1k views

Keyframing emission shader colour/strength using python

I'm trying to animate the colour and strength properties of an emission shader based on external data using script. I add a cube and give it an emission shader. I can alter the strength property using:...
2
votes
1answer
1k views

Return values of operators

When calling an operator like wm.link, is there a way to get the user input like selected directory, filepath or object name? Here is a simple code example: ...
0
votes
1answer
615 views

How to start second action after check that first one is done in bge?

Here I want help of you people. here I want to start second action animation but before this i want to check that first action is done. same this way i want to do third action before that i want to ...
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 ...
7
votes
1answer
9k 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 ...
5
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 ...
2
votes
2answers
1k 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: ...
3
votes
1answer
2k 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?
2
votes
1answer
379 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 ...
0
votes
1answer
681 views

Properties Tab only showing World Tab

My properties tab on the right is only showing the World tab and nothing else. I'm new and don't know how to solve this.
12
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 ...
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) ...
5
votes
1answer
1k 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, ...
9
votes
1answer
827 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 <...
5
votes
3answers
4k 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 ...
3
votes
1answer
714 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

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 ...
3
votes
1answer
692 views

Save objects in Object ID Properties (Blender 2.79)

I saw that Blender 2.79 has the ability to save objects in properties using their id's. However, due to the limited documentation i can't figure out what i am doing wrong. I have included the code and ...
2
votes
1answer
961 views

Timers and animation frame rate

The following image represents a timer with minutes and seconds that I created: What is the correct value of the "skip" option in the always sensor if I want it to activate every 1 second? Also, ...
4
votes
2answers
431 views

Control several different materials via one slider

I have to set up an exterior architecture scene… to make it more lively I put a lot of silhouettes into the scene. They are planes mapped to transparency with a mask in cycles. Now I have to ...
3
votes
1answer
780 views

How to make my prop search show the objects in my scene?

I have a simple object selector using a prop search. At the moment it runs but doesn't show any of the objects in my scene. This is what it looks like: How can I get that to show all of my objects? ...
1
vote
1answer
449 views

Python: Edit panel to edit custom bmesh face layers?

With the bmesh module, I added a custom data layer to a mesh, holding information for each face. ...
1
vote
1answer
358 views

Can I create a CollectionProperty of brushes?

I want to create a collection property with certain sculpt brushes. Can this be done? I tried: WindowManager.coll = CollectionProperty(type=bpy.types.Brush) But ...
0
votes
1answer
61 views

Bring up the operation panel

How do you bring up the operations panel for an object after accidentally clicking into the 3D View? For example when you bring in an cylinder you can set its properties i.e. the number of vertices ...
0
votes
0answers
140 views

Cannot find export vertex colors in the FBX/OBJ exporter dialog

I have been trying to export a model with vertex colors, from a blender model to FBX. (And then to Roblox) But, I cant seem to find the export with vertex colors in the FBX export dialog. This ...
0
votes
1answer
140 views

Creating a Custom Properties Tab in Blender 2.80

I have a suite of several addons that I grouped together in a custom tab in Blender 2.7x, assigning the bl_category to the name of my custom suit: ...
13
votes
2answers
3k 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 ...
5
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
2answers
5k 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, ...
9
votes
2answers
18k 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: ...
8
votes
2answers
7k 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", ...
6
votes
2answers
2k 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 ...
5
votes
1answer
692 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 ...
4
votes
1answer
438 views

How do I invert this timer in BGE to make it count-down?

This is from an answer I received here: timer I suggest to avoid this method to measure time. The BGE will try to keep the given frame rate as much as possible, but there is no guaranty. I ...
9
votes
1answer
139 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 ...
7
votes
4answers
12k 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?
5
votes
1answer
1k 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 ...
4
votes
2answers
583 views

CollectionProperty avoid duplicate names

I have a CollectionProperty like this: ...
4
votes
2answers
1k views

How to get a property value not in current frame?

I'm trying to make a driver which gets a property value not in current frame, but frame+2 for example. How I can do that?