Asset Pipeline v2 #145
@ -11,7 +11,7 @@ from . import constants
|
|||||||
class ASSETPIPE_PT_sync(bpy.types.Panel):
|
class ASSETPIPE_PT_sync(bpy.types.Panel):
|
||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'UI'
|
bl_region_type = 'UI'
|
||||||
bl_category = 'Asset Pipe 2'
|
bl_category = 'Asset Pipeline'
|
||||||
bl_label = "Asset Management"
|
bl_label = "Asset Management"
|
||||||
|
|
||||||
def draw(self, context: bpy.types.Context) -> None:
|
def draw(self, context: bpy.types.Context) -> None:
|
||||||
@ -74,7 +74,7 @@ class ASSETPIPE_PT_sync(bpy.types.Panel):
|
|||||||
class ASSETPIPE_PT_sync_advanced(bpy.types.Panel):
|
class ASSETPIPE_PT_sync_advanced(bpy.types.Panel):
|
||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'UI'
|
bl_region_type = 'UI'
|
||||||
bl_category = 'Asset Pipe 2'
|
bl_category = 'Asset Pipeline'
|
||||||
bl_label = "Advanced"
|
bl_label = "Advanced"
|
||||||
bl_parent_id = "ASSETPIPE_PT_sync"
|
bl_parent_id = "ASSETPIPE_PT_sync"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
@ -108,16 +108,17 @@ class ASSETPIPE_PT_sync_advanced(bpy.types.Panel):
|
|||||||
class ASSETPIPE_PT_ownership_inspector(bpy.types.Panel):
|
class ASSETPIPE_PT_ownership_inspector(bpy.types.Panel):
|
||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'UI'
|
bl_region_type = 'UI'
|
||||||
bl_category = 'Asset Pipe 2'
|
bl_category = 'Asset Pipeline'
|
||||||
bl_label = "Ownership Inspector"
|
bl_label = "Ownership Inspector"
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context: bpy.types.Context) -> bool:
|
||||||
|
return context.scene.asset_pipeline.is_asset_pipeline_file
|
||||||
|
|
||||||
def draw(self, context: bpy.types.Context) -> None:
|
def draw(self, context: bpy.types.Context) -> None:
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
asset_pipe = context.scene.asset_pipeline
|
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
if not asset_pipe.is_asset_pipeline_file:
|
asset_pipe = scene.asset_pipeline
|
||||||
layout.label(text="Open valid 'Asset Pipeline' file", icon="ERROR")
|
|
||||||
return
|
|
||||||
|
|
||||||
if context.collection in list(asset_pipe.asset_collection.children):
|
if context.collection in list(asset_pipe.asset_collection.children):
|
||||||
col = context.collection
|
col = context.collection
|
||||||
|
Loading…
Reference in New Issue
Block a user