Brushstroke Tools: Initial Version #328
@ -164,9 +164,13 @@ def transfer_modifier(modifier_name, target_obj, source_obj):
|
|||||||
setattr(target_bake, prop, value)
|
setattr(target_bake, prop, value)
|
||||||
|
|
||||||
def is_brushstrokes_object(object):
|
def is_brushstrokes_object(object):
|
||||||
|
if not object:
|
||||||
|
return False
|
||||||
return 'BSBST_active' in object.keys()
|
return 'BSBST_active' in object.keys()
|
||||||
|
|
||||||
def is_surface_object(object):
|
def is_surface_object(object):
|
||||||
|
if not object:
|
||||||
|
return False
|
||||||
for ob in bpy.data.objects:
|
for ob in bpy.data.objects:
|
||||||
if 'BSBST_surface_object' not in ob.keys():
|
if 'BSBST_surface_object' not in ob.keys():
|
||||||
continue
|
continue
|
||||||
@ -175,6 +179,8 @@ def is_surface_object(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def is_flow_object(object):
|
def is_flow_object(object):
|
||||||
|
if not object:
|
||||||
|
return False
|
||||||
for ob in bpy.data.objects:
|
for ob in bpy.data.objects:
|
||||||
if 'BSBST_flow_object' not in ob.keys():
|
if 'BSBST_flow_object' not in ob.keys():
|
||||||
continue
|
continue
|
||||||
@ -183,11 +189,15 @@ def is_flow_object(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def get_surface_object(bs):
|
def get_surface_object(bs):
|
||||||
|
if not bs:
|
||||||
|
return None
|
||||||
if 'BSBST_surface_object' not in bs.keys():
|
if 'BSBST_surface_object' not in bs.keys():
|
||||||
return None
|
return None
|
||||||
return bs['BSBST_surface_object']
|
return bs['BSBST_surface_object']
|
||||||
|
|
||||||
def get_flow_object(bs):
|
def get_flow_object(bs):
|
||||||
|
if not bs:
|
||||||
|
return None
|
||||||
if 'BSBST_flow_object' not in bs.keys():
|
if 'BSBST_flow_object' not in bs.keys():
|
||||||
return None
|
return None
|
||||||
return bs['BSBST_flow_object']
|
return bs['BSBST_flow_object']
|
||||||
@ -213,6 +223,8 @@ def edit_active_brushstrokes(context):
|
|||||||
active_object = bs_ob
|
active_object = bs_ob
|
||||||
if flow_object:
|
if flow_object:
|
||||||
active_object = flow_object
|
active_object = flow_object
|
||||||
|
if not active_object:
|
||||||
|
return {"CANCELLED"}
|
||||||
|
|
||||||
context.view_layer.objects.active = active_object
|
context.view_layer.objects.active = active_object
|
||||||
for ob in bpy.data.objects:
|
for ob in bpy.data.objects:
|
||||||
|
Loading…
Reference in New Issue
Block a user