1
$\begingroup$

I noticed that we couldn't multi-select particle system, so I could not use copy_to_select button. Is there a way to select multi particle systems and modify their properties together(e.g. render_step)?

Any help will be appreciated.

$\endgroup$
3
  • $\begingroup$ so you have only 1 object that has multiple particle systems? $\endgroup$
    – Harry McKenzie
    Commented Aug 9, 2022 at 8:51
  • $\begingroup$ yeah, and I want to modify those particle system together.@HarryMcKenzie $\endgroup$
    – Tac
    Commented Aug 9, 2022 at 8:55
  • $\begingroup$ unfortunately it seems you cant select multiple particle systems in the list. if it was possible you could change a property value and hold down Alt while pressing enter to confirm the input. Do u have tp repeatedly change values and how many particle systems are there? python seems like the only way. just loop throught the particle systems list and set each value. $\endgroup$
    – Harry McKenzie
    Commented Aug 9, 2022 at 9:33

2 Answers 2

0
$\begingroup$

This is a use case for Custom Properties/Drivers.

You'll notice this little "Custom Properties" tab at the bottom of almost every panel in the Properties Menu.

enter image description here

Where you put these Custom Property is dependent on how high you want to the "scope" of the property to go. If you put it in the Particle Property panel, that value will be limited to that particle system (not what we want), if you put it at the bottom of the Object Properties panel it will be limited to the current object, if you put it in the Scene panel it will work with all objects in the scene etc.

enter image description here

It depends on the situation, but for this example and for longevity I'll use the Scene Panel.

So, add your Custom Property and edit the name of prop (has to be a Python friendly syntax, i.e. no spaces, snake case, all lower is typical), as well as the format and Min/Max values. The Time Step property in particle systems uses float so we'll stick with the default.

enter image description here

Then once thats done, right click the value and select Copy as New Driver.

enter image description here

Then go to whatever values you want it to control in both particle systems and right-click > Paste Driver.

enter image description here

If you want you can split the Properties pane into multiple versions, and have one with your properties open, which makes for easy editing.

Result:

enter image description here

$\endgroup$
2
  • $\begingroup$ Thank you for your help! It's a good idea. But I notice that the custom property can only be float/float array/integer/integer array/string/python type. How can I make 'material slot' or 'show emitter' a driver? $\endgroup$
    – Tac
    Commented Aug 9, 2022 at 10:04
  • $\begingroup$ I think you can use drivers to control Boolean values with a technique something like this, for the material slot you would probably need to dive into a Custom Particle properties panel written in python, which wouldn't be too terribly difficult. You can use the templates from the text editor under Templates > Python > UI Panel ... to get you pretty far, and then maybe a custom operator that just loops over the objects particle systems and sets the values to the properties in your panel. $\endgroup$
    – Jakemoyo
    Commented Aug 9, 2022 at 10:40
0
$\begingroup$

You can write a script in the Text Editor and make a list of all the materials and assign an ID to them. In this script ID=1 relates to Material.001. So if you want another material to be assigned to all the particle systems, just assign another value for ID and click Run Script in the Text Editor. show_emitter is the same for all particle systems assigned to the same object so you don't really need to drive it. You can do similar script for all the other properties in the particle system. Just right click a property and select Copy Full Data Path and paste it into Text Editor to see the property that needs to be manipulated. Let me know the full list of properties that you need to control and I will update the answer.

import bpy

ID = 1
show_emitter = True

obj = bpy.data.objects["Cube"]

material = ""

match ID:
    case 1: material = "Material.001"
    case 2: material = "Material.002"
    case 3: material = "Material.003"

for particle in bpy.data.particles:
    particle.material_slot = material
    
obj.show_instancer_for_render = show_emitter
$\endgroup$
1
  • $\begingroup$ Yeah, we have the same idea! I have made a button to to make all particle systems' properties consistent with the first particle system. But the operation is uniform, and I can't choose just two or three of them. So I want to make a multi-select list widget so that I can pass the selected items into the list and iterate over them. blender.stackexchange.com/questions/271847/… $\endgroup$
    – Tac
    Commented Aug 16, 2022 at 3:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .