Skip to main content

All Questions

Tagged with
0 votes
0 answers
16 views

Continue baking after changing modifier and adding a new object

blenderers! I want to write a Python script to simulate two clothes being dropped on top of a cube. Here are the steps that I want to take: I want to drop the first cloth and simulate the physics for ...
Aslan Noorghasemi's user avatar
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 ...
crisplettuce's user avatar
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 ...
Larry's user avatar
  • 11
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 ...
Alessandro leone's user avatar
0 votes
1 answer
25 views

Changing the size of the box by the user

I want to create a box, export it using Blend4Web to html and post it on the site. And so that the site visitor chooses the width, height and depth of the box. I need these parameters to be changeable....
fornit32's user avatar
0 votes
1 answer
33 views

Align vertices behind each other

Have seven objects behind each other in a straight row and aligned with x,y axis. Zooming in, the vertex's from each object does not align to each other. Here and there they do, most are scattered. Is ...
Tekkies's user avatar
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 ...
Sneider's user avatar
0 votes
0 answers
37 views

Blender 3.6.2 > Move a selection of vertex's from selected vertex

Have a object (10 disks with 5 round holes in them). After selecting a cluster of vertex (total 4) the script need to: Move selected cluster down by 1mm Select next cluster (to the left) and move ...
Tekkies's user avatar
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 ...
Mijeka's user avatar
  • 23
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? ...
Christoph Werner's user avatar
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). <...
Saideep's user avatar
  • 105
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 ...
Saideep's user avatar
  • 105
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 ...
tranade's user avatar
0 votes
1 answer
146 views

RuntimeError: Error: Object ‘Base_01_Low.001’ can’t be selected because it is not in View Layer ‘ViewLayer’!

How can i add the object to a view layer? I mean not just with code, but even manually how can i do that? i trying to execute a script and first time it works fine, but second time it gives an error ...
Adam Szalai's user avatar
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=...
caddev20's user avatar
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: ...
Christopher Gearhart's user avatar
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 ...
Ruslan's user avatar
  • 11
1 vote
1 answer
26 views

Is there a way to automatically discard shapekey "offsets" for individual verts, based on their difference to basis?

I know this is the sorta thing you'd usually code up with a simple script, but I'm absolutely python illiterate. As far as I understand, shapekeys internally store their offset to basis when they're ...
Apois's user avatar
  • 33
2 votes
1 answer
95 views

Create 3D buildings model from real data with a right trade-off between realism and scene size

I'm creating a 3D model of a real large area encompassing 611 square kilometers (236 square miles). I want the model to include the relief map plus the buildings from the main towns in that area. I ...
Antonio Serrano's user avatar
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 ...
ahmet oru's user avatar
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 ...
Matt Majic's user avatar
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 ...
Jubel's user avatar
  • 1
2 votes
2 answers
204 views

Getting the direct objects contained in a collection

I'm using collection.objects to ask for the objects in a collection, and it gives me the whole object hierarchy. How do I get just the root of the hierarchy? So for ...
TomMelson's user avatar
3 votes
1 answer
567 views

How to calculate bounds of all selected objects BUT follow the Active Object's Rotation at the same time?

[ Working code at the bottom, just paste in Blender's text editor. ] There are similar Bounding Box questions out there but this is different, please don't close. I made a script which iterates ...
Armored Wolf's user avatar
1 vote
1 answer
319 views

How can I copy objects without linking data via python?(deepcopy)

How can I copy objects without linking data via python?(That is deep copy the object data.) I'm using this to copy objects, but the new object's data linked to origin. ...
Tac's user avatar
  • 85
0 votes
0 answers
48 views

Script measuring bounding box size of selected objects, and copying those values into the objects' viewport colors (XYZ = RGB)?

I'd like to find a simple scripted way how to: measure the bounding box(es) of a selected object(s) take the XYZ values, and convert them into 0 to 1 numbers with the correct ratio Feed these three ...
Matěj Šak's user avatar
0 votes
1 answer
133 views

Get the XYZ Dimensions of an Object and Rename to those values?

Very new to scripting but utilize it's magic in nearly every .blend I think most of us are familiar with Quixel's awful naming conventions but to give a sense of size in the Asset Browser, I figured ...
brent.blend's user avatar
0 votes
1 answer
218 views

How to copy Names from a selected multiple objects and paste it (combined) into another using a script?

in my work I must do a lot of copying from different multiple objects and combining those names, pasting into final objects name. I was wondering if that can be done with a script.
Remigiusz Papaj's user avatar
1 vote
1 answer
424 views

"context is incorrect" while using handler

This simple script rotates a monkey: ...
Petr's user avatar
  • 21
2 votes
1 answer
464 views

Get an object from unique identifier(memory location, id etc)

First of all, I'm new to blender scripting. I'm looking for a way to uniquely identify an object, something that will reference the same object regardless of renames or any other changes in the scene. ...
Michael777's user avatar

15 30 50 per page
1
2 3 4 5
9