Questions tagged [properties]

Questions about accessing object properties or attributes while scripting

Filter by
Sorted by
Tagged with
5
votes
1answer
1k 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, ...
2
votes
0answers
86 views

Materials and properties, color changes react differently

in my game I have a ray sensor in my player-object searching for the property "block". If the "block" property is found in a target-object, it changes the color of the target-object from [ 0.0, 1.0, ...
2
votes
1answer
536 views

How to convert this logic to python code?

How to convert this logic to python code?
1
vote
1answer
257 views

delete properties in messed up file

I am trying to delete properties which some plugin messed up. I wanted to delete a property PN781673099840471551 with ...
1
vote
0answers
102 views

3D tool add-on window locks/freezes when importing an image with Python

Code: ...
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 ...
3
votes
1answer
114 views

Multiple KeyErrors leading to segfaults with custom properties

I know that Segmentation Fault is some sort of memory error having to do with C and C++ - ...
1
vote
0answers
152 views

Custom properties for node-tree/network-style structure

Kind of a generic title, I know, but I haven't decided on any specific implementation at the moment because Blender offers many different potential ways to accomplish what I want. Basically, I'm ...
3
votes
2answers
1k views

how add properties to operator modal draw?

UPDATE Here another example in order to clarify this question, I did a video in order to resume the problem https://www.youtube.com/watch?v=yShhJOzkJBk: here the addon working without the BGL CODE.....
1
vote
1answer
185 views

Lock properties from applying object transformations

Is there a way to Lock properties from applying object transformations ? I am using lattice and accidently applying object transformations is causing unwanted results. Please see the Animated GIF of "...
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 ...
1
vote
1answer
512 views

Duplicating object and default value of property

When I create some property in object: bpy.types.Object.my_prop = bpy.props.IntProperty(name="MyProp", default=-1, description="My Property" ) and I set ...
4
votes
3answers
3k views

Using game property to control actuator values (BGE Logic Bricks)

For example, Is it possible to control a value on a motion actuator by linking it to the value of a set property? For example movement speed that can be changed on the fly by changing the property ...
12
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 ...
3
votes
1answer
956 views

How can I set a default value on a Dynamic EnumProperty?

I am trying to fix a bug in the Animation Nodes addon. The loop nodes has a dynamic EnumProperty and I need to select a default value. But only when the EnumProperty contains Items. For that I need ...
12
votes
2answers
1k 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 ...
5
votes
2answers
696 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 ...
3
votes
1answer
208 views

“Copy to selected” dose not work with curves ? or Nurbs?

I want to set "preview U resolution" of all the selected curves to 48. I select all the curves and shift select one curve change its "preview U resolution" to 48. Set "preview U resolution" to 48. ...
1
vote
0answers
26 views

Edit same property of all selected objects at once? [duplicate]

How can I edit the same property on all selected objects at once? For example, if I select 5 mesh objects and I want to lock rotation x or I have selected 20 curves and want to edit 'Preview U ...
2
votes
1answer
402 views

How do I get invoke_props_popup to work?

I'm trying to get invoke_props_popup to work. But my code produces this error: ...
5
votes
1answer
1k 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 ...
3
votes
1answer
1k views

Populating an EnumProperty using a Function

I need to populate an EnumProperty with the names of every group in the scene, so that I can include them in a dropdown (prop_menu_enum) in the interface. How would one accomplish this? I'm creating ...
2
votes
1answer
117 views

clear ID Properties completely

I want to add some custom properties to a bone by an if statement ...
5
votes
1answer
930 views

How to make a game autosave and autoload

I need my game to always save all settings and scores, also always load them when running game. And... I want to also save theese objects, which has disappeared from scenes(collected points, boost ups,...
1
vote
1answer
878 views

Replace Game Property with Variable

When using Game Properties, you can change the value during the game. Example: "prop" = 50 press r then "prop" -= 5 After pressing "r", the property would subtract 5 from the original ...
0
votes
1answer
274 views

How to trigger something when a game property equals a (certain value)

How do I trigger something when a game property equals a certain value? So Here is what I have done. ...
2
votes
1answer
744 views

Option flags for custom properties (bpy.props)

I just read about properties in the documentation. Every type of property can be created with some options. Most of options are self explanatory, but I really don't know how to explain the option ...
0
votes
1answer
1k views

Creating a custom property with named values

I have created and rigged a simple cartoon-style model. His facial expressions are really just an image sequence texture. This allows me to quickly change his facial expression by changing the "offset"...
2
votes
1answer
721 views

How to set minimum and maximum fields of a custom ID property using Python

I have created a custom property and want to set a minimum and a maximum for it through python; I tried to make it using bpy.ops.wm.properties_edit but it didn't ...
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 ...
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: ...
2
votes
1answer
9k views

how to delete property from object

If I have a property like bpy.types.Object.thing = BoolProperty() how would I go about removing it? I have tried ...
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 ...
1
vote
1answer
217 views

Best/ preferred way of storing Image references?

I'm currently working on a project-specific addon where I'm dynamically loading and removing images on the fly. So far I've gotten away with a simple ...
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?
1
vote
1answer
827 views

How display and execute in the right context UI elements of operator in a panel? [closed]

In reference to my other question, i try to display my properties operator directly in the UI Panel, but when i "click" on the created buttons and field, nothing happens. For my tow parameters ...
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 ...
1
vote
2answers
1k views

How to set the value of a string property when a button is pressed? (Not in bge)

How can I set the value of a string property when a button is pressed? Just to clarify I don't mean in the blender game engine I mean in "regular" scripting.
2
votes
1answer
748 views

bpy.props types, update, set, and get fields format

Part of my project involves integrating functionality similar to a graphing calculator into the image editor of Blender. Once complete this will just be a nifty little time saver that helps avoid ...
0
votes
0answers
720 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
310 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
574 views

CollectionProperty avoid duplicate names

I have a CollectionProperty like this: ...
2
votes
1answer
214 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
213 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
307 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
960 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
340 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?