def draw(self, context): layout = self.layout path = utils.get_library_dir("worlds") lib_path = os.path.join(path,context.scene.mv.world_library_name) categories = os.listdir(lib_path) for category in categories: cat_path = os.path.join(lib_path,category) if os.path.isdir(cat_path): if category == context.scene.mv.world_category_name: layout.operator('fd_general.change_category',text=category,icon='LAYER_ACTIVE').category_name = category else: layout.operator('fd_general.change_category',text=category,icon='LAYER_USED').category_name = category
def draw(self, context): layout = self.layout path = utils.get_library_dir("worlds") dirs = os.listdir(path) for lib in dirs: if not is_hidden_library(lib): lib_path = os.path.join(path,lib) if os.path.isdir(lib_path): if lib == context.scene.mv.world_library_name: layout.operator('fd_general.change_library',text=lib,icon='LAYER_ACTIVE').library_name = lib else: layout.operator('fd_general.change_library',text=lib,icon='LAYER_USED').library_name = lib
def draw(self, context): layout = self.layout path = utils.get_library_dir("worlds") dirs = os.listdir(path) for lib in dirs: if not is_hidden_library(lib): lib_path = os.path.join(path, lib) if os.path.isdir(lib_path): if lib == context.scene.mv.world_library_name: layout.operator('fd_general.change_library', text=lib, icon='LAYER_ACTIVE').library_name = lib else: layout.operator('fd_general.change_library', text=lib, icon='LAYER_USED').library_name = lib
def draw(self, context): layout = self.layout path = utils.get_library_dir("worlds") lib_path = os.path.join(path, context.scene.mv.world_library_name) categories = os.listdir(lib_path) for category in categories: cat_path = os.path.join(lib_path, category) if os.path.isdir(cat_path): if category == context.scene.mv.world_category_name: layout.operator( 'fd_general.change_category', text=category, icon='LAYER_ACTIVE').category_name = category else: layout.operator('fd_general.change_category', text=category, icon='LAYER_USED').category_name = category