Asset Pipeline v2 #145
@ -83,3 +83,9 @@ EXTERNAL_SUFFIX = "EXTERNAL"
|
|||||||
|
|
||||||
|
|
||||||
MATERIAL_ATTRIBUTE_NAME = "material_index"
|
MATERIAL_ATTRIBUTE_NAME = "material_index"
|
||||||
|
|
||||||
|
|
||||||
|
## SHARED ID Icons
|
||||||
|
GEO_NODE = "GEOMETRY_NODES"
|
||||||
|
IMAGE = "IMAGE_DATA"
|
||||||
|
BLANK = "BLANK1"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from bpy_extras.id_map_utils import get_id_reference_map, get_all_referenced_ids
|
from bpy_extras.id_map_utils import get_id_reference_map, get_all_referenced_ids
|
||||||
|
from .util import get_fundamental_id_type
|
||||||
|
from .. import constants
|
||||||
|
|
||||||
|
|
||||||
def get_shared_ids(collection: bpy.types.Collection) -> list[bpy.types.ID]:
|
def get_shared_ids(collection: bpy.types.Collection) -> list[bpy.types.ID]:
|
||||||
@ -38,3 +40,11 @@ def init_shared_ids(scene: bpy.types.Scene) -> list[bpy.types.ID]:
|
|||||||
id.asset_id_owner = asset_pipe.task_layer_name
|
id.asset_id_owner = asset_pipe.task_layer_name
|
||||||
shared_ids.append(id)
|
shared_ids.append(id)
|
||||||
return shared_ids
|
return shared_ids
|
||||||
|
|
||||||
|
|
||||||
|
def get_shared_id_icon(id: bpy.types.ID) -> str:
|
||||||
|
if bpy.types.NodeTree == get_fundamental_id_type(id):
|
||||||
|
return constants.GEO_NODE
|
||||||
|
if bpy.types.Image == get_fundamental_id_type(id):
|
||||||
|
return constants.IMAGE
|
||||||
|
return constants.BLANK
|
||||||
|
@ -12,6 +12,7 @@ from .merge.core import (
|
|||||||
merge_task_layer,
|
merge_task_layer,
|
||||||
)
|
)
|
||||||
from .merge.transfer_data.transfer_ui import draw_transfer_data
|
from .merge.transfer_data.transfer_ui import draw_transfer_data
|
||||||
|
from .merge.shared_ids import get_shared_id_icon
|
||||||
from . import constants
|
from . import constants
|
||||||
|
|
||||||
|
|
||||||
@ -58,9 +59,9 @@ def sync_draw(self, context):
|
|||||||
|
|
||||||
if len(self._shared_ids) != 0:
|
if len(self._shared_ids) != 0:
|
||||||
box = layout.box()
|
box = layout.box()
|
||||||
box.label(text="New 'Other IDs' found")
|
box.label(text="New 'Shared IDs' found")
|
||||||
for id in self._shared_ids:
|
for id in self._shared_ids:
|
||||||
box.label(text=id.name)
|
box.label(text=id.name, icon=get_shared_id_icon(id))
|
||||||
|
|
||||||
if len(self._temp_transfer_data) == 0:
|
if len(self._temp_transfer_data) == 0:
|
||||||
layout.label(text="No new local Transfer Data found")
|
layout.label(text="No new local Transfer Data found")
|
||||||
|
Loading…
Reference in New Issue
Block a user