Post #3008: ok this works but I can’t seem to find how to assign settings like the one below

📋 Metadata

🏷️ Tags

macro advanced unsolved

  • Macro Editor
  • Python Scripting

💬 Content

ok this works but I can’t seem to find how to assign settings like the one below to the Canvas object. Adding this command to your script has no effect, it still adds the canvas with surface type as “Paint”.

bpy.context.object.modifiers[“Dynamic Paint”].canvas_settings.canvas_surfaces[“Surface”].surface_type = ‘WEIGHT’

Also, to extend this function, I made another macro operator which
a)adds Dynamic Paint modifier as canvas to the selected object and
b)adds a cube, assigns it a Dynamic Paint modifier to use as Brush
but this assigns the Dynamic paint modifier as Brush to the selected object and adds the cube without any modifiers.
Any ideas?
Thank you in advance for your huge patience :blush:


🔗 View on Blender Artists