Brushstroke Tools: Initial Version #328

Merged
Simon Thommes merged 229 commits from SimonThommes/blender-studio-tools:brushstroke_tools-initial-version into main 2024-11-06 15:03:47 +01:00
Showing only changes of commit c8f840e9e1 - Show all commits

View File

@ -50,6 +50,19 @@ def mark_socket_context_type(mod_info, socket_name, link_type):
socket_info.name = socket_name
socket_info.link_context_type = link_type
def deep_copy_mod_info(source_object, target_object):
for mod_info in source_object.modifier_info:
mod_info_tgt = target_object.modifier_info.add()
for attr in mod_info.keys():
if attr == 'socket_info':
continue
setattr(mod_info_tgt, attr, getattr(mod_info, attr))
for socket_info in mod_info.socket_info:
socket_info_tgt = mod_info_tgt.socket_info.add()
for attr in socket_info.keys():
setattr(socket_info_tgt, attr, getattr(socket_info, attr))
def get_addon_directory() -> str:
"""
Returns the path of the addon directory to be used to append resource data-blocks.