Example #1
0
    def draw(self, context):
        """UI draw function."""
        layout = self.layout
        scene = context.scene

        if scene:
            # GLASS OBJECTS
            col = layout.column(align=True)
            col.label(text='Glass Objects', icon_value=get_icon(_ICON_TYPES.mesh_glass))
            row = col.row(align=True)
            row.operator('object.glass_objects_in_wireframes', text='Wires')
            row.operator('object.glass_objects_textured', text='Textured')

            # SHADOW CASTERS
            col = layout.column(align=True)
            col.label(text='Shadow Casters', icon_value=get_icon(_ICON_TYPES.mesh_shadow_caster))
            row = col.row(align=True)
            row.operator('object.shadow_caster_objects_in_wireframes', text='Wires')
            row.operator('object.shadow_caster_objects_textured', text='Textured')

            # COLLISION LOCATORS
            col = layout.column(align=True)
            col.label(text='Collision Locators', icon_value=get_icon(_ICON_TYPES.loc_collider))
            row = col.row(align=True)
            row.operator('object.all_collision_locators_wires', text='All Wires')
            row.operator('object.no_collision_locators_wires', text='No Wires')
            row = col.row(align=True)
            row.operator('object.all_collision_locators_faces', text='All Faces')
            row.operator('object.no_collision_locators_faces', text='No Faces')
Example #2
0
 def locator_type_items(self, context):
     return [
         ('None', "None", "Object is not locator", 'X_VEC', 0),
         ('Prefab', "Prefab", "Prefab locator", get_icon(_ICON_TYPES.loc_prefab), 1),
         ('Model', "Model", "Model locator", get_icon(_ICON_TYPES.loc_model), 2),
         ('Collision', "Collision", "Collision locator", get_icon(_ICON_TYPES.loc_collider), 3),
     ]
Example #3
0
    def draw(self, context):
        """UI draw function."""
        layout = self.layout
        scene = context.scene

        if scene:
            # GLASS OBJECTS
            col = layout.column(align=True)
            col.label(text='Glass Objects', icon_value=get_icon(_ICON_TYPES.mesh_glass))
            row = col.row(align=True)
            row.operator('object.glass_objects_in_wireframes', text='Wires')
            row.operator('object.glass_objects_textured', text='Textured')

            # SHADOW CASTERS
            col = layout.column(align=True)
            col.label(text='Shadow Casters', icon_value=get_icon(_ICON_TYPES.mesh_shadow_caster))
            row = col.row(align=True)
            row.operator('object.shadow_caster_objects_in_wireframes', text='Wires')
            row.operator('object.shadow_caster_objects_textured', text='Textured')

            # COLLISION LOCATORS
            col = layout.column(align=True)
            col.label(text='Collision Locators', icon_value=get_icon(_ICON_TYPES.loc_collider))
            row = col.row(align=True)
            row.operator('object.all_collision_locators_wires', text='All Wires')
            row.operator('object.no_collision_locators_wires', text='No Wires')
            row = col.row(align=True)
            row.operator('object.all_collision_locators_faces', text='All Faces')
            row.operator('object.no_collision_locators_faces', text='No Faces')
Example #4
0
 def locator_collider_type_items(self, context):
     return [
         ('Box', "Box", "Box collider type", get_icon(_ICON_TYPES.loc_collider_box), 0),
         ('Sphere', "Sphere", "Sphere collider type", get_icon(_ICON_TYPES.loc_collider_sphere), 1),
         ('Capsule', "Capsule", "Capsule collider type", get_icon(_ICON_TYPES.loc_collider_capsule), 2),
         ('Cylinder', "Cylinder", "Cylinder collider type", get_icon(_ICON_TYPES.loc_collider_cylinder), 3),
         ('Convex', "Convex", "Convex collider type", get_icon(_ICON_TYPES.loc_collider_convex), 4),
     ]
Example #5
0
 def locator_type_items(self, context):
     return [
         ('None', "None", "Object is not locator", 'X_VEC', 0),
         ('Prefab', "Prefab", "Prefab locator",
          get_icon(_ICON_TYPES.loc_prefab), 1),
         ('Model', "Model", "Model locator",
          get_icon(_ICON_TYPES.loc_model), 2),
         ('Collision', "Collision", "Collision locator",
          get_icon(_ICON_TYPES.loc_collider), 3),
     ]
Example #6
0
 def empty_object_type_items(self, context):
     """Returns object type items in real time, because of accessing to custom icons.
     """
     return [
         ('None', "None", "Normal Blender Empty object", 'X_VEC', 0),
         ('SCS_Root', "Root Object",
          "Empty object will become a 'SCS Root Object'",
          get_icon(_ICON_TYPES.scs_root), 1),
         ('Locator', "Locator", "Empty object will become a 'Locator'",
          get_icon(_ICON_TYPES.loc), 2),
     ]
Example #7
0
 def locator_collider_type_items(self, context):
     return [
         ('Box', "Box", "Box collider type",
          get_icon(_ICON_TYPES.loc_collider_box), 0),
         ('Sphere', "Sphere", "Sphere collider type",
          get_icon(_ICON_TYPES.loc_collider_sphere), 1),
         ('Capsule', "Capsule", "Capsule collider type",
          get_icon(_ICON_TYPES.loc_collider_capsule), 2),
         ('Cylinder', "Cylinder", "Cylinder collider type",
          get_icon(_ICON_TYPES.loc_collider_cylinder), 3),
         ('Convex', "Convex", "Convex collider type",
          get_icon(_ICON_TYPES.loc_collider_convex), 4),
     ]
Example #8
0
    def draw(self, context):
        layout = self.layout
        scene = context.scene

        if scene:
            col = layout.column(align=True)
            col.operator('object.make_convex',
                         text='Make Convex',
                         icon_value=get_icon(_ICON_TYPES.loc_collider_convex))
            col.operator('object.convert_meshes_to_convex_locator',
                         text='Convert to Locator',
                         icon_value=get_icon(_ICON_TYPES.loc))
            col.operator('object.convert_convex_locator_to_mesh',
                         text='Convert to Mesh',
                         icon='OUTLINER_OB_MESH')
Example #9
0
    def draw(self, context):
        if not self.poll(context):
            self.layout.label(text="Not in 'Object Mode'!", icon="INFO")
            return

        layout = self.layout
        scene = context.scene

        if scene:
            col = layout.column(align=True)
            row = col.row(align=True)
            row.operator('object.scs_tools_create_scs_root',
                         text='Add Root',
                         icon_value=get_icon(_ICON_TYPES.scs_root))
            row.operator('object.scs_tools_create_scs_root',
                         text="",
                         icon='SYNTAX_OFF').use_dialog = True
            row = col.row(align=True)
            row.operator('object.scs_tools_relocate_scs_roots',
                         icon="CON_LOCLIKE")

            col.separator(factor=0.5)

            row = col.row(align=True)
            row.operator('object.scs_tools_search_degenerated_polys',
                         text="Check Geometry",
                         icon='ZOOM_SELECTED')
            row = col.row(align=True)
            row.operator('mesh.scs_tools_start_vcoloring',
                         text="VColoring",
                         icon='GROUP_VCOL')
            row.operator('mesh.scs_tools_rebake_vcoloring',
                         text="",
                         icon='FILE_REFRESH')
Example #10
0
    def draw(self, context):
        """UI draw function."""
        scene = context.scene

        if not scene:
            return

        if not self.poll(context):
            self.layout.label(text="Not in 'Object Mode'!", icon="INFO")
            return

        layout = self.layout

        # GLASS OBJECTS
        col = layout.column(align=True)
        col.label(text="Glass Objects",
                  icon_value=get_icon(_ICON_TYPES.mesh_glass))
        row = col.row(align=True)
        row.operator('object.scs_tools_show_glass_objects_as_wire',
                     text='Wires')
        row.operator('object.scs_tools_show_glass_objects_as_textured',
                     text='Textured')

        # SHADOW CASTERS
        col = layout.column(align=True)
        col.label(text="Shadow Casters",
                  icon_value=get_icon(_ICON_TYPES.mesh_shadow_caster))
        row = col.row(align=True)
        row.operator('object.scs_tools_show_shadow_casters_as_wire',
                     text='Wires')
        row.operator('object.scs_tools_show_shadow_casters_as_textured',
                     text='Textured')

        # COLLISION LOCATORS
        col = layout.column(align=True)
        col.label(text="Collision Locators",
                  icon_value=get_icon(_ICON_TYPES.loc_collider))
        row = col.row(align=True)
        row.operator('object.scs_tools_enable_collision_locators_wire',
                     text='All Wires')
        row.operator('object.scs_tools_disable_collision_locators_wire',
                     text='No Wires')
        row = col.row(align=True)
        row.operator('object.scs_tools_enable_collision_locators_faces',
                     text='All Faces')
        row.operator('object.scs_tools_disable_collision_locators_faces',
                     text='No Faces')
Example #11
0
 def empty_object_type_items(self, context):
     """Returns object type items in real time, because of accessing to custom icons.
     """
     return [
         ('None', "None", "Normal Blender Empty object", 'X_VEC', 0),
         ('SCS_Root', "Root Object", "Empty object will become a 'SCS Root Object'", get_icon(_ICON_TYPES.scs_root), 1),
         ('Locator', "Locator", "Empty object will become a 'Locator'", get_icon(_ICON_TYPES.loc), 2),
     ]
Example #12
0
    def draw(self, context):
        layout = self.layout
        scene = context.scene

        if scene:
            col = layout.column(align=True)
            col.operator('object.make_convex', text='Make Convex', icon_value=get_icon(_ICON_TYPES.loc_collider_convex))
            col.operator('object.convert_meshes_to_convex_locator', text='Convert to Locator', icon_value=get_icon(_ICON_TYPES.loc))
            col.operator('object.convert_convex_locator_to_mesh', text='Convert to Mesh', icon='OUTLINER_OB_MESH')
Example #13
0
    def draw(self, context):
        layout = self.layout
        col = layout.column(align=True)

        col.operator("object.scs_tools_create_scs_root", text="Root Locator", icon_value=get_icon(icon.scs_root))
        col.operator("object.scs_tools_create_scs_root", text="Root Locator +", icon_value=get_icon(icon.scs_root)).use_dialog = True
        col.separator()
        col.operator("object.scs_tools_add_object", text="Model Locator", icon_value=get_icon(icon.loc_model)).new_object_type = "Model Locator"
        col.operator("object.scs_tools_add_object", text="Prefab Locator", icon_value=get_icon(icon.loc_prefab)).new_object_type = "Prefab Locator"
        col.operator("object.scs_tools_add_object", text="Collision Locator", icon_value=get_icon(icon.loc_collider)).new_object_type = "Collision Locator"
Example #14
0
    def draw(self, context):
        layout = self.layout
        scene = context.scene

        if scene:
            col = layout.column(align=True)
            row = col.row(align=True)
            row.operator('object.create_scs_root_object',
                         text='Add Root',
                         icon_value=get_icon(_ICON_TYPES.scs_root))
            row.operator('object.create_scs_root_object_dialog',
                         text='',
                         icon='OUTLINER_DATA_FONT')
Example #15
0
    def draw(self, context):

        if not self.poll(context):
            self.layout.label(text="Not in 'Object Mode'!", icon="INFO")
            return

        layout = self.layout
        scene = context.scene

        if scene:
            col = layout.column(align=True)
            col.operator('object.scs_tools_make_convex_mesh',
                         text='Make Convex',
                         icon_value=get_icon(_ICON_TYPES.loc_collider_convex))
            row = col.row(align=True)
            row.operator('object.scs_tools_convert_meshes_to_convex_locator',
                         text='Convert to Locator',
                         icon_value=get_icon(_ICON_TYPES.loc))
            row.operator('object.scs_tools_convert_meshes_to_convex_locator',
                         text='',
                         icon='MODIFIER').show_face_count_only = True
            col.operator('object.scs_tools_convert_convex_locator_to_mesh',
                         text='Convert to Mesh',
                         icon='MESH_DATA')
Example #16
0
 def locator_prefab_type_items(self, context):
     return [
         ('Control Node', "Control Node", "Control node locator type", get_icon(_ICON_TYPES.loc_prefab_node), 0),
         ('Sign', "Sign", "Sign locator type", get_icon(_ICON_TYPES.loc_prefab_sign), 1),
         ('Spawn Point', "Spawn Point", "Spawn point locator type", get_icon(_ICON_TYPES.loc_prefab_spawn), 2),
         ('Traffic Semaphore', "Traffic Semaphore", "Traffic light locator type", get_icon(_ICON_TYPES.loc_prefab_semaphore), 3),
         ('Navigation Point', "Navigation Point", "Navigation point locator type", get_icon(_ICON_TYPES.loc_prefab_navigation), 5),
         ('Map Point', "Map Point", "Map point locator type", get_icon(_ICON_TYPES.loc_prefab_map), 7),
         ('Trigger Point', "Trigger Point", "Trigger point locator type", get_icon(_ICON_TYPES.loc_prefab_trigger), 8),
     ]
Example #17
0
 def locator_prefab_type_items(self, context):
     return [
         ('Control Node', "Control Node", "Control node locator type",
          get_icon(_ICON_TYPES.loc_prefab_node), 0),
         ('Sign', "Sign", "Sign locator type",
          get_icon(_ICON_TYPES.loc_prefab_sign), 1),
         ('Spawn Point', "Spawn Point", "Spawn point locator type",
          get_icon(_ICON_TYPES.loc_prefab_spawn), 2),
         ('Traffic Semaphore', "Traffic Semaphore",
          "Traffic light locator type",
          get_icon(_ICON_TYPES.loc_prefab_semaphore), 3),
         ('Navigation Point', "Navigation Point",
          "Navigation point locator type",
          get_icon(_ICON_TYPES.loc_prefab_navigation), 5),
         ('Map Point', "Map Point", "Map point locator type",
          get_icon(_ICON_TYPES.loc_prefab_map), 7),
         ('Trigger Point', "Trigger Point", "Trigger point locator type",
          get_icon(_ICON_TYPES.loc_prefab_trigger), 8),
     ]
Example #18
0
    def draw(self, context):
        layout = self.layout
        scene = context.scene

        if scene:
            col = layout.column(align=True)
            row = col.row(align=True)
            row.operator('object.create_scs_root_object',
                         text='Add Root',
                         icon_value=get_icon(_ICON_TYPES.scs_root))
            row.operator('object.create_scs_root_object_dialog',
                         text='',
                         icon='OUTLINER_DATA_FONT')
            row = col.row(align=True)
            row.operator('object.scs_geometry_check',
                         text="Check Geometry",
                         icon="ZOOM_SELECTED")
            row = col.row(align=True)
            row.operator('mesh.scs_vcoloring_edit',
                         text="VColoring",
                         icon="GROUP_VCOL")
            row.operator('mesh.scs_vcoloring_rebake',
                         text="",
                         icon="FILE_REFRESH")
Example #19
0
    def draw(self, context):
        """UI draw function."""
        layout = self.layout
        scene = context.scene

        if scene:
            scs_root_is_reachable = _object_utils.get_scs_root(context.active_object) is not None

            box = layout.box()

            row = box.row()
            row.prop(scene.scs_props, "visibility_tools_scope", expand=True)

            col = box.column(align=True)
            col.enabled = scs_root_is_reachable or scene.scs_props.visibility_tools_scope == "Global"
            row1 = col.row(align=True)
            row1.alignment = 'CENTER'
            props = row1.operator('object.switch_model_objects_visibility', text='', icon_value=get_icon(_ICON_TYPES.mesh))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row1.operator('object.switch_shadow_casters_visibility', text='', icon_value=get_icon(_ICON_TYPES.mesh_shadow_caster))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row1.operator('object.switch_glass_objects_visibility', text='', icon_value=get_icon(_ICON_TYPES.mesh_glass))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row1.operator('object.switch_substance_objects_visibility', text='', icon_value=get_icon(_ICON_TYPES.mesh_with_physics))
            props.view_type = _OP_consts.ViewType.viewonly
            row2 = col.row(align=True)
            row2.alignment = 'CENTER'
            props = row2.operator('object.switch_all_locators_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_model_locators_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_model))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_locators_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_collision_locators_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_collider))
            props.view_type = _OP_consts.ViewType.viewonly

            col = box.column(align=True)
            col.enabled = scs_root_is_reachable or scene.scs_props.visibility_tools_scope == "Global"
            row2 = col.row(align=True)
            row2.alignment = 'CENTER'
            props = row2.operator('object.switch_prefab_nodes_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_node))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_signs_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_sign))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_spawns_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_spawn))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_traffics_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_semaphore))
            props.view_type = _OP_consts.ViewType.viewonly
            row2 = col.row(align=True)
            row2.alignment = 'CENTER'
            props = row2.operator('object.switch_prefab_navigations_visibility', text='',
                                  icon_value=get_icon(_ICONS_consts.Types.loc_prefab_navigation))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_maps_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_map))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_triggers_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_trigger))
            props.view_type = _OP_consts.ViewType.viewonly
            row2.operator('object.blank_operator', text='', icon='BLANK1')

            col = layout.column(align=True)
            col.enabled = scs_root_is_reachable or scene.scs_props.visibility_tools_scope == "Global"
            col.label("Current SCS Root:", icon_value=get_icon(_ICONS_consts.Types.scs_root))
            col.operator('object.invert_visibility_within_root', text='Invert Visibility')
            col.operator('object.view_all_objects_within_root', text='View All')
            col.operator('object.isolate_objects_within_root', text='Isolate')
Example #20
0
    def draw(self, context):
        layout = self.layout
        scene = context.scene

        if scene:
            col = layout.column(align=True)
            row = col.row(align=True)
            row.operator('object.create_scs_root_object', text='Add Root', icon_value=get_icon(_ICON_TYPES.scs_root))
            row.operator('object.create_scs_root_object_dialog', text='', icon='OUTLINER_DATA_FONT')
Example #21
0
    def draw(self, context):
        """UI draw function."""
        layout = self.layout
        scene = context.scene

        if scene:
            scs_root_is_reachable = _object_utils.get_scs_root(context.active_object) is not None

            box = layout.box()

            row = box.row()
            row.prop(scene.scs_props, "visibility_tools_scope", expand=True)

            col = box.column(align=True)
            col.enabled = scs_root_is_reachable or scene.scs_props.visibility_tools_scope == "Global"
            row1 = col.row(align=True)
            row1.alignment = 'CENTER'
            props = row1.operator('object.switch_model_objects_visibility', text='', icon_value=get_icon(_ICON_TYPES.mesh))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row1.operator('object.switch_shadow_casters_visibility', text='', icon_value=get_icon(_ICON_TYPES.mesh_shadow_caster))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row1.operator('object.switch_glass_objects_visibility', text='', icon_value=get_icon(_ICON_TYPES.mesh_glass))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row1.operator('object.switch_substance_objects_visibility', text='', icon_value=get_icon(_ICON_TYPES.mesh_with_physics))
            props.view_type = _OP_consts.ViewType.viewonly
            row2 = col.row(align=True)
            row2.alignment = 'CENTER'
            props = row2.operator('object.switch_all_locators_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_model_locators_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_model))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_locators_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_collision_locators_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_collider))
            props.view_type = _OP_consts.ViewType.viewonly

            col = box.column(align=True)
            col.enabled = scs_root_is_reachable or scene.scs_props.visibility_tools_scope == "Global"
            row2 = col.row(align=True)
            row2.alignment = 'CENTER'
            props = row2.operator('object.switch_prefab_nodes_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_node))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_signs_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_sign))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_spawns_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_spawn))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_traffics_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_semaphore))
            props.view_type = _OP_consts.ViewType.viewonly
            row2 = col.row(align=True)
            row2.alignment = 'CENTER'
            props = row2.operator('object.switch_prefab_navigations_visibility', text='',
                                  icon_value=get_icon(_ICONS_consts.Types.loc_prefab_navigation))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_maps_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_map))
            props.view_type = _OP_consts.ViewType.viewonly
            props = row2.operator('object.switch_prefab_triggers_visibility', text='', icon_value=get_icon(_ICON_TYPES.loc_prefab_trigger))
            props.view_type = _OP_consts.ViewType.viewonly
            row2.operator('object.blank_operator', text='', icon='BLANK1')

            col = layout.column(align=True)
            col.enabled = scs_root_is_reachable or scene.scs_props.visibility_tools_scope == "Global"
            col.label("Current SCS Root:", icon_value=get_icon(_ICONS_consts.Types.scs_root))
            col.operator('object.invert_visibility_within_root', text='Invert Visibility')
            col.operator('object.view_all_objects_within_root', text='View All')
            col.operator('object.isolate_objects_within_root', text='Isolate')
Example #22
0
    def draw(self, context):
        """UI draw function."""
        workspace = context.workspace

        if not workspace:
            return

        if not self.poll(context):
            self.layout.label(text="Not in 'Object Mode'!", icon="INFO")
            return

        layout = self.layout

        scs_root_is_reachable = _object_utils.get_scs_root(
            context.active_object) is not None

        box = layout.box()

        row = box.row()
        row.prop(workspace.scs_props, "visibility_tools_scope", expand=True)

        col = box.column(align=True)
        col.enabled = scs_root_is_reachable or workspace.scs_props.visibility_tools_scope == "Global"
        row1 = col.row(align=True)
        row1.scale_x = 100  # fake extending to full width
        props = row1.operator('object.scs_tools_switch_model_objects',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.mesh))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row1.operator('object.scs_tools_switch_shadow_casters',
                              text="",
                              icon_value=get_icon(
                                  _ICON_TYPES.mesh_shadow_caster))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row1.operator('object.scs_tools_switch_glass_objects',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.mesh_glass))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row1.operator(
            'object.scs_tools_switch_static_collision_objects',
            text="",
            icon_value=get_icon(_ICON_TYPES.mesh_with_physics))
        props.view_type = _OP_consts.ViewType.viewonly
        row2 = col.row(align=True)
        row2.scale_x = 100  # fake extending to full width
        props = row2.operator('object.scs_tools_switch_all_locators',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.loc))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row2.operator('object.scs_tools_switch_model_locators',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.loc_model))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row2.operator('object.scs_tools_switch_prefab_locators',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.loc_prefab))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row2.operator('object.scs_tools_switch_collision_locators',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.loc_collider))
        props.view_type = _OP_consts.ViewType.viewonly

        col = box.column(align=True)
        col.enabled = scs_root_is_reachable or workspace.scs_props.visibility_tools_scope == "Global"
        row2 = col.row(align=True)
        row2.scale_x = 100  # fake extending to full width
        props = row2.operator('object.scs_tools_switch_prefab_node_locators',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.loc_prefab_node))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row2.operator('object.scs_tools_switch_prefab_sign_locators',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.loc_prefab_sign))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row2.operator('object.scs_tools_switch_prefab_spawn_locators',
                              text="",
                              icon_value=get_icon(
                                  _ICON_TYPES.loc_prefab_spawn))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row2.operator(
            'object.scs_tools_switch_prefab_traffic_locators',
            text="",
            icon_value=get_icon(_ICON_TYPES.loc_prefab_semaphore))
        props.view_type = _OP_consts.ViewType.viewonly
        row2 = col.row(align=True)
        row2.scale_x = 100  # fake extending to full width
        props = row2.operator('object.scs_tools_switch_prefab_nav_locators',
                              text="",
                              icon_value=get_icon(
                                  _ICONS_consts.Types.loc_prefab_navigation))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row2.operator('object.scs_tools_switch_prefab_map_locators',
                              text="",
                              icon_value=get_icon(_ICON_TYPES.loc_prefab_map))
        props.view_type = _OP_consts.ViewType.viewonly
        props = row2.operator(
            'object.scs_tools_switch_prefab_trigger_locators',
            text="",
            icon_value=get_icon(_ICON_TYPES.loc_prefab_trigger))
        props.view_type = _OP_consts.ViewType.viewonly
        row2.operator('object.scs_tools_blank_operator',
                      text="",
                      icon='BLANK1')

        col = layout.column(align=True)
        col.enabled = scs_root_is_reachable or workspace.scs_props.visibility_tools_scope == "Global"
        col.label(text="Current SCS Root:",
                  icon_value=get_icon(_ICONS_consts.Types.scs_root))
        col.operator('object.scs_tools_invert_visibility_within_scs_root',
                     text='Invert Visibility')
        col.operator('object.scs_tools_view_all_objects_within_scs_root',
                     text='View All')
        col.operator('object.scs_tools_isolate_objects_within_scs_root',
                     text='Isolate')
Example #23
0
 def draw_header(self, context):
     self.layout.label('', icon_value=get_icon(_ICON_TYPES.scs_logo))
Example #24
0
def menu_func_export(self, context):
    self.layout.operator(SCS_TOOLS_OT_Export.bl_idname, text="SCS Game Object(s) (.pim)",
                         icon_value=_icons.get_icon(_ICONS_consts.Types.scs_object_menu))
Example #25
0
def add_menu_func(self, context):
    self.layout.menu(SCS_TOOLS_MT_AddObject.__name__, text="SCS Object", icon_value=_icons.get_icon(_ICONS_consts.Types.scs_object_menu))
    self.layout.separator()
Example #26
0
    def draw(self, context):
        layout = self.layout
        pie = layout.menu_pie()

        # 4 - Left
        pie.popover("SCS_TOOLS_PT_Object", text=" Object                     ", icon="OBJECT_DATA")
        # 6 - Right
        pie.popover("SCS_TOOLS_PT_Material", text="Material                 ", icon="MATERIAL")
        # 2 - Down
        pie.operator('scene.scs_tools_export_by_scope', text="Export", icon="EXPORT")
        # 8 - Up
        pie.operator("scs_tools.import_pim", text="Import PIM", icon="IMPORT")
        # 7 - Left Up
        pie.operator("converter_pix_wrapper.import", text="Import PMD", icon="SORT_ASC")
        # 9 - Right Up
        pie.menu("PIE_MT_SCSAddObject", icon_value=get_icon(icon.loc))
        # 1 - Left Down
        pie.operator("scene.scs_tools_run_packing", text="Pack MOD", icon="PACKAGE")
        # 3 - Right Down
        pie.operator("object.scs_tools_relocate_scs_roots", text="Relocate SCS Roots", icon="CON_LOCLIKE")


        pie.separator()
        pie.separator()
        other = pie.column()
        other.scale_x = 1.05
        other.scale_y = 1.3
        gap = other.column()
        gap.separator()
        gap.scale_y = 3.8

        SnapIcon = "SNAP_ON" if scs_globals().use_alternative_bases else "SNAP_OFF"

        other_menu = other.box().column()
        other_menu.menu("PIE_MT_SCSExportScope", icon="SEQ_CHROMA_SCOPE")
        other_menu.popover("PIE_PT_SCSMisc", text="Misc", icon="LAYER_ACTIVE")
        row = other_menu.row(align=True)
        row.popover("SCS_TOOLS_PT_PathSettingsPresets", text="", icon="PRESET")
        row.operator("scene.scs_tools_select_project_path", text="Base Path", icon="FILEBROWSER")
        row.prop(scs_globals(), "use_alternative_bases", icon=SnapIcon, icon_only=True)
        other_menu.operator('scene.scs_tools_select_dir_inside_base', text="DefaultExportPath", icon="FILEBROWSER").type = "DefaultExportPath"
        other_menu.prop(scs_globals(), "base_paint_color", icon_only=True)


        pie.separator()
        pie.separator()
        pie.separator()
        pie.separator()
        other = pie.column()
        other.scale_x = 1.14
        other.scale_y = 1.3
        gap = other.column()
        gap.separator()
        gap.scale_y = 25.9

        other_menu = other.box().column()
        other_menu.popover("PIE_PT_SCSVertexPaint", text="Vertex Paint", icon="VPAINT_HLT")
        other_menu.popover("SCS_TOOLS_PT_LampSwitcher", text="Lamp Switcher", icon="LIGHT")
        other_menu.popover("SCS_TOOLS_PT_LampTool", text="Lamp Tool", icon="OUTLINER_OB_LIGHT")
        other_menu.popover("SCS_TOOLS_PT_ConvexBlDefs", text="Convex", icon_value=get_icon(icon.loc_collider_convex))
        other_menu.prop(scs_globals(), "use_scs_lighting", text="SCS Lighting")


        pie.separator()
        pie.separator()
        pie.separator()
        pie.separator()
        pie.separator()
        pie.separator()
        other = pie.column()
        other.scale_x = 1.06
        other.scale_y = 1.3
        gap = other.column()
        gap.separator()
        gap.scale_y = 25.9

        other_menu = other.box().column()
        other_menu.popover("SCS_TOOLS_PT_ExportPanel", text="Export", icon="EXPORT")
        other_menu.popover("SCS_TOOLS_PT_ConversionHelper", text="Converter", icon="PACKAGE")
        other_menu.popover("SCS_TOOLS_PT_Visibility", text="Visibility", icon="HIDE_OFF")
        other_menu.popover("SCS_TOOLS_PT_DisplayMethods", text="Display Methods", icon_value=get_icon(icon.loc))
        other_menu.prop(scs_globals(), "show_preview_models", text="Preview Models")
Example #27
0
 def draw_header(self, context):
     if not self.is_popover:
         self.layout.label(text="",
                           icon_value=get_icon(_ICON_TYPES.scs_logo))
Example #28
0
    def draw(self, context):
        if not self.poll(context):
            self.layout.label(text="Not in 'Vertex Paint' mode!", icon="INFO")
            return

        layout = self.layout

        # vehicle switcher
        body_col = layout.column(align=True)
        body_row = body_col.row(align=True)
        body_row.label(text="Vehicle", icon='AUTO')

        body_row = body_col.row(align=True)
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.VehicleLampTypes.Positional.name,
                                   text_override="Positional")
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.VehicleLampTypes.DRL.name,
                                   text_override="DRL")

        body_row = body_col.row(align=True)
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.VehicleLampTypes.LeftTurn.name,
                                   text_override="Left Blinker")
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.VehicleLampTypes.RightTurn.name,
                                   text_override="Right Blinker")

        body_row = body_col.row(align=True)
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.VehicleLampTypes.LowBeam.name,
                                   text_override="Low Beam")
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.VehicleLampTypes.HighBeam.name,
                                   text_override="High Beam")

        body_row = body_col.row(align=True)
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.VehicleLampTypes.Brake.name,
                                   text_override="Brake")
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.VehicleLampTypes.Reverse.name,
                                   text_override="Reverse")

        # auxiliary switcher
        body_col = layout.column(align=True)
        body_row = body_col.row(align=True)
        body_row.label(text="Auxiliary", icon='LIGHT_SPOT')

        body_row = body_col.row(align=True)
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.AuxiliaryLampTypes.Dim.name,
                                   text_override="Dim")
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.AuxiliaryLampTypes.Bright.name,
                                   text_override="Bright")

        # traffic light switcher
        body_col = layout.column(align=True)
        body_row = body_col.row(align=True)
        body_row.label(text="Traffic Lights",
                       icon_value=get_icon(
                           _ICONS_consts.Types.loc_prefab_semaphore))

        body_row = body_col.row(align=True)
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.TrafficLightTypes.Red.name,
                                   text_override="Red")
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.TrafficLightTypes.Yellow.name,
                                   text_override="Yellow")
        self.draw_lamp_type_switch(body_row,
                                   _LT_consts.TrafficLightTypes.Green.name,
                                   text_override="Green")
Example #29
0
def add_menu_func(self, context):
    self.layout.menu("INFO_MT_SCS_add_object",
                     text="SCS Object",
                     icon_value=_icons.get_icon(
                         _ICONS_consts.Types.scs_logo_orange))
    self.layout.separator()
Example #30
0
    def draw(self, context):
        if not self.poll(context):
            self.layout.label(text="Not in 'Edit Mode'!", icon="INFO")
            return

        layout = self.layout

        body_col = layout.column(align=True)
        body_row = body_col.row(align=True)
        body_row.label(text="Vehicle", icon='AUTO')

        body_row = body_col.row(align=True)
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="Front Left")
        props.vehicle_side = _LT_consts.VehicleSides.FrontLeft.name
        props.aux_color = props.traffic_light_color = ""
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="Front Right")
        props.vehicle_side = _LT_consts.VehicleSides.FrontRight.name
        props.aux_color = props.traffic_light_color = ""
        body_row = body_col.row(align=True)
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="Rear Left")
        props.vehicle_side = _LT_consts.VehicleSides.RearLeft.name
        props.aux_color = props.traffic_light_color = ""
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="Rear Right")
        props.vehicle_side = _LT_consts.VehicleSides.RearRight.name
        props.aux_color = props.traffic_light_color = ""
        body_row = body_col.row(align=True)
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="Middle")
        props.vehicle_side = _LT_consts.VehicleSides.Middle.name
        props.aux_color = props.traffic_light_color = ""

        body_col = layout.column(align=True)
        body_row = body_col.row(align=True)
        body_row.label(text="Auxiliary", icon='LIGHT_SPOT')

        body_row = body_col.row(align=True)
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="White")
        props.aux_color = _LT_consts.AuxiliaryLampColors.White.name
        props.vehicle_side = props.traffic_light_color = ""
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="Orange")
        props.aux_color = _LT_consts.AuxiliaryLampColors.Orange.name
        props.vehicle_side = props.traffic_light_color = ""

        body_col = layout.column(align=True)
        body_row = body_col.row(align=True)
        body_row.label(text="Traffic Lights",
                       icon_value=get_icon(
                           _ICONS_consts.Types.loc_prefab_semaphore))

        body_row = body_col.row(align=True)
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv", text="Red")
        props.traffic_light_color = _LT_consts.TrafficLightTypes.Red.name
        props.vehicle_side = props.aux_color = ""
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="Yellow")
        props.traffic_light_color = _LT_consts.TrafficLightTypes.Yellow.name
        props.vehicle_side = props.aux_color = ""
        props = body_row.operator("mesh.scs_tools_set_lampmask_uv",
                                  text="Green")
        props.traffic_light_color = _LT_consts.TrafficLightTypes.Green.name
        props.vehicle_side = props.aux_color = ""
Example #31
0
 def draw_header(self, context):
     self.layout.label('', icon_value=get_icon(_ICON_TYPES.scs_logo))
Example #32
0
    def draw(self, context):
        layout = self.layout
        col = layout.column(align=True)

        col.label(text="Materials", icon="MATERIAL")
        row = col.row(align=True)
        row.operator("material.scs_tools_reload_materials", text="Reload", icon="FILE_REFRESH")
        row.operator("material.scs_tools_merge_materials", text="Merge", icon="AUTOMERGE_ON")
        col.operator("mesh.scs_tools_start_vcoloring", text="VColoring", icon="GROUP_VCOL")
        col.label(text="Objects", icon="OBJECT_DATA")
        col.operator("object.scs_tools_fix_model_locator_hookups", text="Fix Hookups Names", icon_value=get_icon(icon.loc))
        col.operator("object.scs_tools_search_degenerated_polys", text="Check Geometry", icon="ZOOM_SELECTED")