We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
0
votes
0answers
723 views

addons User Preference and custom properties

I'm using the addon preferences to store some props (bool, filepath ecc...). But this prop are saved only in the global preferences of blender. I want that some of these props could be saved in the ...
0
votes
0answers
177 views

Custom Properties converted to integers and driver links lost after restart

I have made API defined custom RNA Properties in my Scene automatically added to a selected Object (not the Mesh). But when I save the scene and restart Blender, they are already visible but the ...
2
votes
1answer
314 views

Adding custom property to VertexGroup class

I am experiencing a problem with adding Custom properties to bpy.types.VertexGroup I have added custom properties to various types before, Object, Material, etc. ...
4
votes
2answers
581 views

CollectionProperty avoid duplicate names

I have a CollectionProperty like this: ...
2
votes
1answer
216 views

Can a custom filter read property value and use it?

the built in filters has some settings, like motion blur has amount. but it' cant be assign with logic bricks. now a custom filter, can it read a value somehow (python code wont work? or would it... ...
3
votes
1answer
1k views

How can I present an array of booleans in a panel?

I'm trying to provide a tool for an artist on my gameDev project. They should be able to set a bunch of settings in a panel, and then press a button to start an automated export. I want to give let ...
2
votes
0answers
220 views

How do I run scripts from a custom button in panel? [duplicate]

I've created a python script that creates a specific folder structure for my projects, and also saves the first instance of my project. I want this script to be run by clicking on a custom button in ...
1
vote
0answers
311 views

Show a dialog displaying the properties of a modal operator

Is there an option to show a dialog which displays the properties of a modal operator ?
5
votes
1answer
986 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 : ...
1
vote
1answer
74 views

Game Engine - Change an image based on property?

For a HUD I'm making I would like the ammo to be displayed based on an image instead of text. How do I link what image is being displayed on a plane (a texture) based on a property?
2
votes
2answers
343 views

Can custom properties be allowed to go to infinity?

Is it possible to allow a custom property value to go as high or low as needed? In other words, is it possible to make a custom property without clamping it with a min and a max?
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 ...
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
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
0answers
40 views

A property that is different during rendering and during preview

I want some properties, like the Factor value in a Mix Shader node, be controlled by whether Blender is currently rendering or not - so that some things would look different in the Preview and in ...
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 ...
1
vote
2answers
1k views

Property Update function for properties inside a collection [closed]

I have a PropertyGroup Class called PPP, like the Collection Example on this page: http://www.blender.org/documentation/blender_python_api_2_63_release/bpy.props.html The problem is that one of the ...
3
votes
1answer
838 views

Bones and rotation property sliders

I am creating a UI for a rig and I want to have a property on a panel. The property is a bones rotation_eular.x value and it needs to be a slider. When setting a property as a slider "slider=True" it ...
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
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 <...
3
votes
2answers
1k 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 : ...
2
votes
1answer
476 views

How to enable ambient occlusion with python?

I am trying to access the world shading settings in python. I want to enable ambient occlusion and give it a value of 0.5. I have tried: ...
4
votes
1answer
637 views

Custom scene properties mysteriously resetting

I'm writing a script, where an operator is registered in the Add->Mesh menu. Clicking this menu displays a panel, where the user can enter certain parameters and then invoke another operator using a ...
3
votes
1answer
992 views

How can I attribute a parameter to multiple objects?

I would like to apply a custom parameter to a selection of objects with the following setup: ...
1
vote
1answer
708 views

Using RNA Property in Drivers?

I'm currently trying to modify some drivers so that they are disabled when they're not on a proxied armature. Right now, I'm using the following script to set a custom property, which is used by the ...
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 ...
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 ...
4
votes
2answers
2k views

How to modify Blender data from vector/arrays in Python?

I was writing a script and discover weird thing. I have code like this: import bpy obj = bpy.context.active_object for s in obj.scale: s *= 2.0 print(s) ...
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: ...
2
votes
2answers
1k views

Should an Operator remember its last-used settings when invoked?

I have an operator that draw its own panel (via invoke_props_dialog) when invoked to let user set properties which are then applied to the selected object, but the ...
3
votes
1answer
590 views

How to set options before script execution

Let's say I want to create UI for addon which allows to choose options (eg delete meshes only) before script execution. How can I achieve that? I know about F6 panel (and options in the T-panel) but ...
2
votes
1answer
3k views

How to change particle size?

I was trying to make fire on blender and i got a problem with the particles , I know that particles size can be changed from the physics panel throw the size value but it doesnt work , any idea why ? ...
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", ...
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 ...
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 ...
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?
5
votes
3answers
2k views

Scripting - How to create a game property?

I have a bunch of objects and need to create some common properties to all of them like this ...
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 ...
11
votes
2answers
2k views

Assign datablock to custom property

With bpy.props I can assign bool, int, float and string ...
4
votes
2answers
428 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 ...
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 ...
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 ...
8
votes
3answers
1k 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).
6
votes
1answer
3k views

How to iterate over custom properties?

I have a number of custom string properties that I added to my scene with: ...
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 ...
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
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 ...
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?