System Information
Operating system: Linux-4.15.0-66-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 965M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.50
Blender Version
Broken: version: 2.82 (sub 1), branch: master, commit date: 2019-11-20 21:25, hash: rBba1e9ae4733a
Worked: (optional)
Short description of error
I'm trying to automate remeshing of multiple objects by writing a script that would run quadriflow operator on every selected object. I'm doing it by looping trough selection in a python script, selecting object one by one and applying quadriflow remesh operator to an selected object. It works fine if I got from 1 to 2 objects. But! If this list of selected objects containing more than 2 objects(3 or more) remeshing works only for the first and the last objects in the list. And not the first and last selected but first and last objects by date.
I've tried to insert a pause(sleep) between next selection or iterating through a list of all objects in the scene but to no avail. Only the first and the last objects by date are remeshed with everything in between being ignored.
inb4 I'm no python expert by any means just an artists who happens to know how to loosely cobble some lines of code together.
Exact steps for others to reproduce the error
With default file:
- create 3+ suzannas.
- Subdibide them a couple of times and apply.
- Make a simple script iterating through selected objects:
(smth like that)
list_of_object=list()
for obj in bpy.context.selected_objects:
list_of_object.append(obj)
bpy.ops.object.select_all(action='DESELECT')
for items in list_of_object:
bpy.ops.object.select_all(action='DESELECT')
items.select_set(state=True)
bpy.context.view_layer.objects.active =items
result = bpy.ops.object.quadriflow_remesh('EXEC_DEFAULT', mode="FACES", use_paint_symmetry=True, use_preserve_boundary=True, use_mesh_curvature=True, target_faces=500)- Select all suzannas and run the script.
- Get only two of them remeshed.
Or run the script in an attached blend file.
1.Open the blend file
- Run the script
- Only two of four suzannas will be remeshed.
I don't really sure it's the problem with a remesh operator since I've been making such scripts before only for baking and in case of baking there was an option to run an operator in batches by EXEC_DEFAULT(it will freeze the interface while working but will produce expected results) but that's not the case with a quadriflow remesher obviously.