def build_model(input_filepath, output_filepath): print(output_filepath) tool_path = file_system_utils.get_path_from_here(relative_tool_path) subprocess.call([ "java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_path, "--input", input_filepath, "--output", output_filepath, "--swapyandz" ])
def build_text(input_filepath, output_filepath, language): print(output_filepath) tool_path = file_system_utils.get_path_from_here(relative_tool_path) subprocess.call([ "java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_path, "--input", input_filepath, "--output", output_filepath, "--language", language, "--logginglevel", "error" ])
def build_texture_atlas(input_file_path, output_file_path, tags): print(output_file_path) max_size = 2048; if tags.lower().count("high"): max_size = 4096 tool_path = file_system_utils.get_path_from_here(relative_tool_path) subprocess.call(["java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_path, "--input", input_file_path, "--output", output_file_path, "--maxwidth", str(max_size), "--maxheight", str(max_size), "--padding", "2"]);
def build_model(input_file_path, output_file_path): ''' Converts a single DAE to a csmodel :param input_file_path: The input file path. :param output_file_path: The output file path. ''' print(output_file_path) tool_file_path = file_system_utils.get_path_from_here(RELATIVE_TOOL_FILE_PATH) tool_args = ["java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_file_path, "--input", input_file_path, "--output", output_file_path, "--swapyandz", "--animated", "--disablemeshbatch" ] subprocess.call(tool_args);
def build_animation(input_file_path, output_file_path): ''' Converts a single DAE to a csanim :param input_file_path: The input file path. :param output_file_path: The output file path. ''' print(output_file_path) tool_file_path = file_system_utils.get_path_from_here(RELATIVE_TOOL_FILE_PATH) tool_args = ["java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_file_path, "--input", input_file_path, "--output", output_file_path, "--swapyandz" ] subprocess.call(tool_args);
def build_texture(input_file_path, output_file_path): """ Converts a single PNG to a csimage :Authors: S Downie :param input_file_path: The input file path. :param output_file_path: The output file path. """ print(output_file_path) tool_file_path = file_system_utils.get_path_from_here(RELATIVE_TOOL_FILE_PATH) tool_args = ["java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_file_path, "--input", input_file_path, "--output", output_file_path]; subprocess.call(tool_args);
def build_sfx(input_file_path, output_file_path): """ Converts a single ckbx file to into a Cricket Audio Bank. :Authors: Ian Copland :param input_file_path: The input file path to pass to CkTool. :param output_file_path: The output file path which will be generated by CkTool. """ print(output_file_path) tool_file_path = file_system_utils.get_path_from_here(RELATIVE_TOOL_FILE_PATH) tool_args = ["java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_file_path, "--action", "buildbank", "--input", input_file_path, "--output", output_file_path] subprocess.call(tool_args);
def build_text(input_file_path, output_file_path, language): """ Converts a single language column in the xls sheet to a cstext file :Authors: S Downie :param input_file_path: The input file path. :param output_file_path: The output file path. """ print(output_file_path) tool_file_path = file_system_utils.get_path_from_here(RELATIVE_TOOL_FILE_PATH) tool_args = ["java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_file_path, "--input", input_file_path, "--output", output_file_path, "--language", language, "--logginglevel", "error"] subprocess.call(tool_args)
def build_texture_atlas(input_file_path, output_file_path, tags): print(output_file_path) max_size = 2048 if tags.lower().count("high"): max_size = 4096 tool_path = file_system_utils.get_path_from_here(relative_tool_path) subprocess.call([ "java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_path, "--input", input_file_path, "--output", output_file_path, "--maxwidth", str(max_size), "--maxheight", str(max_size), "--padding", "2" ])
def build_font(font_name, font_size, font_file_path): """ Builds a single font with the given font name and size to the given file path. :Authors: Ian Copland :param font_name: The name of the font which should be used. The font must exist as a system font. :param font_size: The size the output font should be rendered at. :param font_file_path: The path to the output font. """ print("Building font '" + font_name + "' of size '" + font_size + "' to '" + font_file_path + "'") tool_file_path = file_system_utils.get_path_from_here(RELATIVE_TOOL_FILE_PATH) tool_args = ["java", "-Djava.awt.headless=true", "-jar", tool_file_path, "--fontname", font_name, "--fontsize", font_size, "--output", font_file_path] subprocess.call(tool_args);
def build_model(input_filepath, output_filepath): print(output_filepath) tool_path = file_system_utils.get_path_from_here(relative_tool_path) subprocess.call( [ "java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_path, "--input", input_filepath, "--output", output_filepath, "--swapyandz", ] )
def build_text(input_file_path, output_file_path, language): """ Converts a single language column in the xls sheet to a cstext file :Authors: S Downie :param input_file_path: The input file path. :param output_file_path: The output file path. """ print(output_file_path) tool_file_path = file_system_utils.get_path_from_here( RELATIVE_TOOL_FILE_PATH) tool_args = [ "java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_file_path, "--input", input_file_path, "--output", output_file_path, "--language", language, "--logginglevel", "error" ] subprocess.call(tool_args)
def build_texture_atlas(input_directory_path, output_file_path, tags): """ Builds a single atlas from the pngs in the given directory. :Authors: S Downie :param input_directory_path: The input directory path. :param output_file_path: The output file path. :param tags: The tags. """ print(output_file_path) #Allow the 'high' texture atlas to be up to 4096x4096; all others must be a maximum of 2048x2048 max_size = 2048; if tags.lower().count("high"): max_size = 4096 tool_file_path = file_system_utils.get_path_from_here(RELATIVE_TOOL_FILE_PATH) tool_args = ["java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_file_path, "--input", input_directory_path, "--output", output_file_path, "--maxwidth", str(max_size), "--maxheight", str(max_size), "--padding", "2"] subprocess.call(tool_args);
def build_text(input_filepath, output_filepath, language): print(output_filepath) tool_path = file_system_utils.get_path_from_here(relative_tool_path) subprocess.call( [ "java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_path, "--input", input_filepath, "--output", output_filepath, "--language", language, "--logginglevel", "error", ] )
def build_font(font_name, font_size, font_file_path): """ Builds a single font with the given font name and size to the given file path. :Authors: Ian Copland :param font_name: The name of the font which should be used. The font must exist as a system font. :param font_size: The size the output font should be rendered at. :param font_file_path: The path to the output font. """ print("Building font '" + font_name + "' of size '" + font_size + "' to '" + font_file_path + "'") tool_file_path = file_system_utils.get_path_from_here( RELATIVE_TOOL_FILE_PATH) tool_args = [ "java", "-Djava.awt.headless=true", "-jar", tool_file_path, "--fontname", font_name, "--fontsize", font_size, "--output", font_file_path ] subprocess.call(tool_args)
def build_animation(input_file_path, output_file_path): """ Converts a single DAE to a csanim :param input_file_path: The input file path. :param output_file_path: The output file path. """ print(output_file_path) tool_file_path = file_system_utils.get_path_from_here(RELATIVE_TOOL_FILE_PATH) tool_args = [ "java", "-Djava.awt.headless=true", "-Xmx512m", "-jar", tool_file_path, "--input", input_file_path, "--output", output_file_path, "--swapyandz", ] subprocess.call(tool_args)