All Questions
183
questions
0
votes
0
answers
25
views
Delete vertices one by one, when using the 'Add Mesh: Extra Objects' addon to plot points
I am using the 'Add Mesh: Extra Objects' addon in Blender to plot points at specified coordinates. Each point is added to a mesh of points instead of being a separate object. My goal is to implement a ...
1
vote
1
answer
31
views
How to Set Object Viewport Colors Based on PBR Material Properties?
I'm trying to create a script in Blender that sets the viewport colors of objects based on the properties of their physically-based rendering (PBR) materials. However, I'm encountering difficulties in ...
0
votes
0
answers
37
views
Automated rotations
I am stuck on a problem in Blender. I am trying to create a function that automatically aligns an object based on its dimensions to the world axis. This mean for example the largest axis will be ...
0
votes
2
answers
94
views
Adding a camera in front of an object based on xyz rotation (Euler to Spherical conversion)
About the script:
I would like to add a camera in front of a selected object.
The front of the object is based on a calculation using a pre-defined polarangle, azimuthal angle and distance.
The ...
2
votes
1
answer
165
views
How to loop duplicate one object on top of all selected objects?
How to loop duplicate one object and translate the copy origin on top of the origin of all selected objects (origin position in the belonging objects unchanged) one by one with a python script?
Edit ...
3
votes
3
answers
341
views
Blender Python: How to test for "selectable" objects in viewport?
Is there a way to check if objects are selectable in Blender Python?
The code below checks if an object is visible, but is there also something to check if an object is also selectable in viewport?
...
1
vote
1
answer
40
views
Scaling multiple independent meshes in an object from their centers, and, scaling only meshes whose centers are engulfed within specific coordinates
In the MWE (Minimal Working Example) below I created 4 spheres and placed them at 4 different locations along the Y-axis. I would like to scale each sphere as per my wish (lets say 2 in the X,Y,Z).
<...
3
votes
3
answers
591
views
Generate non-overlapping spheres having different diameters in a cube
I would like to generate a 'N' number of spheres having different diameters within a cube. The condition is that the spheres shall not overlap. I use the following code to generate spheres (random ...
0
votes
0
answers
33
views
How to lock an updating object to the screen using scripts (Blender 3.5)
I wanted to create an object that automatically updates with scripts and displays on the screen in a fixed position in Blender viewport. Kind of like how 'Objectives' in the top right of the image ...
0
votes
1
answer
226
views
'Scene' object has no attribute my_tool after changing import method from classes to modules in __init__.py
Everything worked until I reworked my import methods to import modules instead of every single class. Now, however, my my_tool call does not work anymore because I can't simply use type=...
3
votes
1
answer
211
views
How to speed up hiding thousands of objects
I need a quick way to hide thousands of objects in the view layer via python. I have tried running the following code, but it takes 10 seconds to run with 10,000 objects:
...
1
vote
1
answer
150
views
How to remove unused material slots in all objects if the objects are not selected? [duplicate]
Please tell me.
How to remove unused materials in all objects if the objects are not selected?
I tried this code but didn't get what I wanted. This code does not remove unused materials in unselected ...
2
votes
2
answers
276
views
Set the distance of all selected objects to another object to be the same
I wonder if there is a way to solve this problem. There are several objects whose size and position are identical. And there is a single terrain mesh. I want to position these objects with always the ...
1
vote
1
answer
99
views
Assign different materials to different object copies
I'm trying to create two different copies of an object with different colors. The code below will create them but they always end up with the same color (1,1,0,1) (yellow).
How can I get ...
0
votes
1
answer
519
views
How to batch export multiple meshes into separate .ply files?
I have looked into batch exporting scripts and they seem to come in every format except ply. I'm having trouble understanding how to edit the template batch export script blender provides to export ...