Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
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 ...
0
votes
1answer
502 views

Action actuator: how to get the “frame property” go back to 1 when the animation ends

I have an action actuator that plays an animation (in "play" mode) and stores the "frame property" in a property called "frame". When the animation ends, I believe the "frame property" should go back ...
5
votes
1answer
348 views

This looks like camera clipping, but that's adjusted, so is it something else?

The clipping field under Camera > Lens is high enough to not clip just about anything, but this image still looks exactly like it's been clipped. The N-panel > View Clip field is up just as high. What ...
1
vote
0answers
89 views

“X Location” f-curve name and buttons disappeared [closed]

I'm working on a blender file. Some time in the last days something changed. Under the active bone's tree in the F-Curve window there are the names and some buttons associated to the f-curves of the ...
0
votes
1answer
612 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 ...
1
vote
1answer
499 views

How to create an alias for an object's properties?

I'm curious if anyone knows how to rename an object's properties? For example, can I rename head.rx to be head.nod? In maya, there is an aliasAttr command that does this. Would love to do it in ...
2
votes
1answer
1k views

Can't change positioning of item after keyframe [duplicate]

So I'm video editting and I keyframe a translation of an image. The property value turns yellow, showing that that frame is the keyframe for that certain value. However, when I go to any other frame ...
1
vote
2answers
2k views

Object data panel menu, not available [duplicate]

The panel that appears as shown in the image below, cannot be re-opened. It only appears, on the left-hand-side of the screen when I create a new object. How do I get it back as shown in the image? ...
4
votes
1answer
893 views

How to use set/get property callbacks correctly?

Hi I am trying to use the set method for a property. Thats how I try to use it: ...
2
votes
1answer
3k views

How to get Camera view like Top-view?

I have been trying to make my own logo. The problem I have been facing is finding out how to make the camera face the top ortho view like shown here: I want it to be facing right on Top Ortho view ...
0
votes
1answer
280 views

Can I reach the World's horizon_color in bge?

I was wondering if possible to retrieve and change World properties in-game, especially the horizon_color.
1
vote
1answer
101 views

lamp properties in game

I am trying to animate a lamp properties in the bge yet since it is not a proper Action or ShapeKey I cannot use the standard logic bricks and I was wondering if there is a way around scripting. I ...
0
votes
1answer
35 views

Why is this little program of logicbricks not working?

Little explaining here: When the message "lap" is sent, this object should copy a property from another object "TIME" to the property "current" that's on itself. Than, as soon as "lap" is being sent ...
1
vote
0answers
245 views

Possibility to search ID Properties in search property

Is it possible to search ID Properties in a search_prop String Property and if, how ? The code below seems not to work obviously because the items() and keys() function don't gives data. ...
0
votes
1answer
171 views

what have I done wrong with this piece of code?

player = logic.getCurrentScene().property["Player"] property ever was objects but I wanted the commands after this line to be applied to more objects so I thought let's do it with a property. It ...
1
vote
1answer
436 views

Camera Solve Focal Length Automatically Set To 24

Im wondering why when I go to solve the camera in a tracked scene it defaults to being set to having a focal length of 24. If I have the focal length above or below 24 before doing the solve it sets ...
1
vote
1answer
287 views

How can I create a dynamic HUD bar in the GE?

I 've been taking a break and got rusty so I need your help. I have an integer property with a random first value.I want to somehow connect it to the length of a plane, so that when the integer ...
5
votes
2answers
22k 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 ...
1
vote
1answer
87 views

Adjust number of digits displayed for timer property?

I want to make a nice timer in Blender Game. I used a timer property, but it doesn't look right because it has way too much digits. I only want it to show the number of seconds and 2 decimal digits. ...
1
vote
0answers
391 views

Change the material displayed in the Node Editor from Python

Would like to be able to change the material node displayed in the Node Editor from Python after running an operator to create a new material node in Python. In ...
3
votes
1answer
771 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? ...
2
votes
1answer
372 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 ...
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, ...
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 ...
2
votes
1answer
611 views

How can I put a custom property into my pie menu?

I'm playing around with pie menus in blender. I used the default pie menu template and customized it to suit. But now I have four custom properties on a model and I want to edit them with the pie menu....
5
votes
1answer
1k 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: ...
2
votes
1answer
599 views

Why do I get a type error when trying to name a newly created object?

From a script, I create a bunch of circles with bpy.ops.mesh.primitive_circle_add() and I need to name the newly created object. But I get a Type error message at ...
1
vote
1answer
276 views

Making a property change when an animation ends?

I've been trying to make a blender game in first person, so i want to change the property "step" to one after a camera animation plays, then back to 0 after the second animation plays. So I was ...
1
vote
1answer
729 views

Blender render appears completely Gray

When I hit "render" nothing appears except one object I forgot to add a material to. I'm unfamiliar with most of Blender's rendering settings. I've done some internet research but turned up largely ...
2
votes
1answer
610 views

transfer value (a.k.a score) in bge from scene to another in BGE

So I have a quiz set to where they can press a letter, if they press the right letter they get 10pts. so the logic bricks look like Keyboard (a) ->and ->property (mode: assign, property: -score, ...
3
votes
1answer
411 views

Linked Objects, Drivers and Animation of custom Properties

I have created an Object with some Shape Keys. To simplify the planned Animation, I have created four custom Properties on that object and connected some drivers, so that the change of one Property ...
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 ...
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 ...
2
votes
1answer
636 views

Text game properties and dynamic text

I want to use the property value(it's a string) of one object to change the text-game property value of another object(text-object). For the time being I made the dynamic text to work by just ...
2
votes
1answer
145 views

Can I drive multiple drivers with a Vector from one procedure call?

Suppose I have a Python function get_loc() that returns a Vector, which I want to use to drive the location of an object ...
1
vote
0answers
77 views

How can I keep items of two CollectionProperties synchronised?

I try to explain the issu as clear as possible, but it will take a little while. Background: Basically, what I try to do is to create two CollectionProperties in my scene and store custom ...
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, ...
1
vote
2answers
491 views

Setting enum properties across multiple interdependent enum properties in a script

The Data Transfer modifier offers multiple enum properties which in the interface can be changed with clicking (exclusively sets one value and disables the others) or shift-clicking/dragging (allows ...
1
vote
1answer
92 views

Where to store properties on console

I'm creating a script which adds some features to blender's builtin console. The script requires there to be some properties on the console (unique to each console). I'm wondering what the best place ...
2
votes
0answers
149 views

Prevent property from being saved with blend file

I would like to save a temporary Boolean value on bpy.types.Scene that exists only as long as blender is open. When you close blender and open it back up the ...
1
vote
1answer
157 views

If property does not exist, use default value in python

I have a problem with my script, i want to let the user creating or not the property, but when the property is not used, blender give me an error (its normal). i have tried things like: ...
1
vote
1answer
625 views

generate an event or function callback when a stringproperty is changed via user interface

I have defined a StringProperty as: StrParents = StringProperty(default='-1 ',update= GetParent), and used prop to display the ...
4
votes
1answer
152 views

Iterate over Properties of an Operator

I'd like to iterate over the properties (names and values) of a dialog operator in its execute method. My current way of doing this involves a metaclass and multiple inheritance... Is there any ...
1
vote
0answers
56 views

How to use PropertyGroupItem

I was browsing the docs when I ran into something interesting: bpy.types.propertyGroupItem This is what the doc says about it: Property that stores arbitrary, ...
4
votes
1answer
436 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 ...
2
votes
1answer
952 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, ...
1
vote
0answers
37 views

How to find out object's location coordinates? [duplicate]

For example I have a cube and I moved it to a certain location. I want to know if there is a way to find object's global location, so later I would be able to insert this location coordinates to ...
2
votes
1answer
752 views

How to create properties for new object types

I try to create some properties for custom primitives in property group classes and I want to access them from an operator in another .py file to create primitives, ...
0
votes
1answer
143 views

Keep Scale While Animating

I am quite sure I've seen someone to disable scale change when animating, for an instance if I enable FK / IK and drag my hand to change position it will stretch like so: I would like to know how ...