Asset Pipeline v2 #145
@ -1,6 +1,6 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from ... import constants
|
from ... import constants
|
||||||
from ..task_layer import draw_task_layer_selection
|
from ..task_layer import draw_task_layer_selection, get_local_task_layers
|
||||||
|
|
||||||
|
|
||||||
def draw_transfer_data_type(
|
def draw_transfer_data_type(
|
||||||
@ -27,20 +27,26 @@ def draw_transfer_data_type(
|
|||||||
for transfer_data_item in transfer_data:
|
for transfer_data_item in transfer_data:
|
||||||
row = box.row()
|
row = box.row()
|
||||||
row.label(text=f"{transfer_data_item.name}: ")
|
row.label(text=f"{transfer_data_item.name}: ")
|
||||||
row.prop(transfer_data_item, "surrender", text="Surrender")
|
|
||||||
draw_task_layer_selection(
|
|
||||||
row,
|
|
||||||
scene,
|
|
||||||
transfer_data_item,
|
|
||||||
transfer_data_item.owner,
|
|
||||||
"owner",
|
|
||||||
transfer_data_item.get("use_default_owner"),
|
|
||||||
)
|
|
||||||
if transfer_data_item.get("surrender"):
|
if transfer_data_item.get("surrender"):
|
||||||
|
enabled = (
|
||||||
|
False if transfer_data_item.owner in get_local_task_layers() else True
|
||||||
|
)
|
||||||
row.operator(
|
row.operator(
|
||||||
"assetpipe.update_surrendered_transfer_data"
|
"assetpipe.update_surrendered_transfer_data"
|
||||||
).transfer_data_item_name = transfer_data_item.name
|
).transfer_data_item_name = transfer_data_item.name
|
||||||
row.enabled = True
|
row.enabled = enabled
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
row.prop(transfer_data_item, "surrender", text="Surrender")
|
||||||
|
draw_task_layer_selection(
|
||||||
|
row,
|
||||||
|
scene,
|
||||||
|
transfer_data_item,
|
||||||
|
transfer_data_item.owner,
|
||||||
|
"owner",
|
||||||
|
transfer_data_item.get("use_default_owner"),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def draw_transfer_data(
|
def draw_transfer_data(
|
||||||
|
Loading…
Reference in New Issue
Block a user