The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
3
votes
3answers
440 views

Temporarily disable add-on UI property update callback

I want to synchronize two properties (e.g. sizeX and SizeY) when a “lock size” property is enabled. I have the properties SizeX and SizeY update callbacks linked to separate methods: update_sizex and ...
2
votes
1answer
276 views

FloatProperty seen as a tuple when adding hard_min or hard_max

Below is a snippet of some addon code: ...
0
votes
1answer
1k views

Function Update on Boolean Property

Is there a way to use the update function when group properties are used? Am I not registering it correctly? I need to keep unique properties attached to each newly added object however. It seems that ...
1
vote
2answers
510 views

How do you limit property value without constraints?

Let's say I have an "empty" that I want to only be able to move in the X axis, and only between 0 and 1. I can turn on the transform locks for Y and Z, but how do I limit X to only values between 0 ...
0
votes
2answers
252 views

Is there a generic custom data layer?

Is there such a thing as a generic custom data layer in Blender that holds Strings, Booleans, and Enums? I'm trying to create a text box in edit mode that holds a user input note on a given mesh. ...
5
votes
1answer
680 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 ...
2
votes
2answers
709 views

How can I update a popup while shown?

I'd like to display a popup, that shows some custom properties. Which properties are drawn or enabled depends on the settings of some other properties of this popup. The popup is invoked by ...
1
vote
1answer
397 views

Operators: Updating a CollectionProperty using the exec() method

I have defined an Operator class which has a CollectionProperty like this: ...
1
vote
0answers
57 views

Top structure that accept custom property

You can create custom property associated to a data type like this: bpy.types.Objects.MyProperty = bpy.props.IntProperty () So now all objects have this interger ...
0
votes
1answer
624 views

I dont know how to open the side bar

I cant find the properties bar, or reopen the bar on the side, all i get is the Transformation bar. That didn't work, it just opened a double.
2
votes
1answer
436 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 ...
3
votes
1answer
9k views

Vertex count number display

Is there any way to show the number of selected vertices in Edit Mode?
1
vote
0answers
289 views

How can I inspect the classtree of Blender internal classes?

...
0
votes
1answer
321 views

BGE: Change physics attributes of an object in real time. (AKA while playing)

I'm trying to make a boost power up for my video game but I'm terrible at Python and couldn't do it even if my life depended on it. :| Anyway, here's my setup: I need it so that: The default ...
1
vote
1answer
500 views

How to discover default values of properties via python script?

I am still gnawing stubbornly on the concept "dump active object to python script," and gathering snippets that I think can be glued together into the tool I want. But one piece of the puzzle still ...
7
votes
1answer
354 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/...
1
vote
1answer
849 views

Making a Speedometer

I have been trying to make a speedometer for a racing game I'm making, but all the methods of making a speedometer I know of don't work on the vehicle wrapper for some reason. It may be that there are ...
1
vote
1answer
138 views

How do I set this property?

So I'm working on a simple game and I want to control an object to go upwards with a certain amount of force. I then want to be able to press shift and set the standard value used for the amount of ...
2
votes
0answers
109 views

Separator within an EnumProperty

I'm trying to insert an separator to an EnumProperty like used in the Operator object.select_by_type. This is the Property used by this Operator (blender-2.77a.tar/blender-2.77a/source/blender/...
1
vote
0answers
182 views

Custom Properties a la Rigify (Global Properties?)

So the Rigify Rigs have custom properties that can be tweaked no matter what bone you have selected in pose mode. However I've been unable to make my own. Adding custom properties under the Armature ...
4
votes
1answer
654 views

How to only show preview for template_ID_preview?

Note I have tried to be deliberately detailed in this question: please scroll down to the bottom to see the summary of my question. Thank you. Background The UILayout template ...
0
votes
1answer
62 views

How do I look for objects with a particular property with a particular value using Python in the BGE?

I have a number of objects with the boolean property, and I need to write a script which specifies any object which has this property and whose value is set to True. I don't know how to phrase a ...
0
votes
1answer
81 views

Why I cannot shorten a GameObject property into a variable?

This script intends to show the differences in changing a GameObject property directly... obj["prop"] = value And indirectly, it is, with a shortening / variable ...
3
votes
2answers
454 views

Custom properties on an action, any place for UI visibility?

I'm writing an importer/exporter for a game, and animations are identified by an ID number associated with a set of position/rotation keyframes. In the original 3DS Max exporter, they are controlled ...
0
votes
1answer
660 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.
1
vote
1answer
237 views

Controlling a text object through python. Hooking it to an internal variable

Okay so I'm using a text object eventually odd like to make it into a health counter. My code is sloppy though and needs refining. Here is what I got. ...
9
votes
1answer
995 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 ...
1
vote
2answers
388 views

“cursor_location property cannot be animated” error in Blender

I'm trying to make an animation but every time I press I to get the frame, now it says "cursor_location property cannot be animated". Does anyone know how to fix this problem?
3
votes
1answer
547 views

Adding random noise to a mesh — programmatically (bpy.ops.mesh.noise)

Trying to draw a scene by a script that is started by a single click, ran into problem creating bumpy terrain. It is easy to create a slightly bumpy ground using mouse and keyboard -- create plane, ...
2
votes
0answers
203 views

Reference an object or data from a Python-defined property

Many built-in properties, such as Object.parent, reference scene data. In the UI, they are represented with pretty menu widgets and in certain cases also with a picker tool: Is it possible to create ...
0
votes
1answer
323 views

how do you accesses the properties of an object in another scene?

Here is what my code looks like.: ...
3
votes
1answer
205 views

Is it possible to have a property sensor detect another property?

Is it possible to have a property sensor detect another property? Like this:
1
vote
2answers
155 views

Blender game engine modification of material value node during game

I need to modify the value of a value node with a script. How can I do that? Or is there another strategy to modify texturing in a game? I want something like the Attribute node in Cycles.
2
votes
0answers
292 views

Float Property: Shows Incorrect Decimal Value

I have a script that is setting some custom properties on an object. The properties are being assigned just fine and can be accessed with the proper floating point value. But the Custom Properties UI ...
2
votes
2answers
931 views

How can I add drivers for custom properties?

Suppose that obj is a object. If I want to add a driver for its scale X, I can do d = obj.driver_add("scale", 0).driver but ...
1
vote
2answers
310 views

How Do I Bring Up The Same Properties Menu As In This Video?

I am trying to bring up the same menu that is brought up by F6 in this video. But when I press F6 nothing comes up, what do I do? My Blender version is 2.77.
0
votes
0answers
104 views

Where did my properties interface/panel go?

(Not the one you get when you key N), the one that has all the texture/world/material properties. I was in edit mode trying to press Shift + Ctrl + Alt + C but messed up and now the panel is just ...
1
vote
0answers
30 views

How to correct the size of Properties panel in Default window? [duplicate]

The Properties panel on RHS of default 3D window which is activated with (N) became very small and hard to read. All other active Blender files are fine....but cannot restore/resize to normal settings ...
1
vote
1answer
723 views

Hide Object Properties with Python

I have been trying to make an Addon that uses Object Properties and have come up with the following code. ...
0
votes
1answer
64 views

Why do my properties show up as '[string contents] not found' during debug?

Im pretty new to the BGE and Im just getting to grip with Logic bricks I recently attempted to create a property named Next (...
2
votes
1answer
636 views

How to create a Boolean Vector property that is “single selection”?

☐ x ☐ y ☑ z class MyAddon(bpy.types.Operator): ... axis = bpy.props.BoolVectorProperty( subtype="XYZ" ) ... This operator is added to menu, now the ...
0
votes
2answers
644 views

why do I have no option for luxcore API

I downloaded luxrender, but every time I try to render anything an error comes up that viewpoint rendering is only available when luxcore API is selected. I wanted to change the luxrender API from ...
1
vote
0answers
196 views

Python: How to draw a single element of a CollectionProperty?

I've attached a custom PropertyGroup as mystuff to bpy.types.Object, and this group contains a ...
0
votes
1answer
166 views

My Scene bpy.types.Panel appears on all tabs

I created a simple bpy.types.Panel to allow modification of custom scene properties, wanting it to appear only on the Scene property tab, and thus created it like ...
1
vote
1answer
437 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. ...
2
votes
1answer
4k views

Joining 6 .stl files together to make 1 file to go to a comercial printer

Firstly let me say I have never used Blender before so I'm a total innocent. I have 6 .stl files for 2 Pi camera housings made up of 2 and 4 files each. I have been told if I can incorporate the ...
1
vote
1answer
207 views

How to reopen folder select dialog (probbably by clearing string property)

I want to create a function that: checks if a file test.txt is in a location from filepath variable if it is not the displays the dialog again I've got this: ...
1
vote
1answer
158 views

how to change the value of various custom properties at the same time?

I have a bone with various custom properties and I want to change the value of all of them, from 0 to 1 at the same time (pressing a button).
2
votes
1answer
2k views

How to create a simple list in the UI with Python API that would display data from Python?

I've been writing scripts for Maya and 3Ds Max, now I'm trying to learn Python API of Blender. So I'm not a beginner in scripting for such applications, but I'm a total beginner in scripting for ...
0
votes
1answer
508 views

How to update a custom property value modified by script?

I have a custom property that controls two shape keys. When I type bpy.context.object.pose.bones["Bone"]["prueba"] = 1.0 in the console, the value changes but does ...