Geometry Nodes: expose simulation bake path in UI #108220

Merged
Jacques Lucke merged 6 commits from JacquesLucke/blender:expose-bake-path into blender-v3.6-release 2023-05-25 18:56:06 +02:00
6 changed files with 33 additions and 28 deletions
Showing only changes of commit 1e043a8870 - Show all commits

View File

@ -445,6 +445,9 @@ endif()
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
option(WITH_INSTALL_COPYRIGHT "Copy the official Blender Foundation's copyright.txt into the Blender install folder" OFF)
mark_as_advanced(WITH_INSTALL_COPYRIGHT)
if((WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE) OR WITH_MOD_FLUID)
option(WITH_PYTHON_NUMPY "Include NumPy in Blender (used by Audaspace and Mantaflow)" ON)
endif()

View File

@ -26,10 +26,11 @@ class Version:
def get_download_file_names(version: Version):
yield f"blender-{version}-linux-x64.tar.xz"
yield f"blender-{version}-macos-x64.dmg"
yield f"blender-{version}-windows-x64.msi"
yield f"blender-{version}-windows-x64.zip"
yield (f"blender-{version}-linux-x64.tar.xz", "Linux")
yield (f"blender-{version}-macos-x64.dmg", "macOS - Intel")
yield (f"blender-{version}-macos-arm64.dmg", "macOS - Apple Silicon")
yield (f"blender-{version}-windows-x64.msi", "Windows - Installer")
yield (f"blender-{version}-windows-x64.zip", "Windows - Portable (.zip)")
def get_download_url(version: Version, file_name: str) -> str:
@ -49,9 +50,9 @@ def generate_html(version: Version) -> str:
lines.append(f"Released on {today.strftime(DATE_FORMAT)}.")
lines.append("")
lines.append("<ul>")
for file_name in get_download_file_names(version):
for file_name, display_name in get_download_file_names(version):
download_url = get_download_url(version, file_name)
lines.append(f" <li><a href=\"{download_url}\">{file_name}</a></li>")
lines.append(f" <li><a href=\"{download_url}\">{display_name}</a></li>")
lines.append("</ul>")
return "\n".join(lines)

View File

@ -257,7 +257,7 @@ class TIME_PT_playback(TimelinePanelButtons, Panel):
col.prop(screen, "use_play_clip_editors", text="Movie Clip Editor")
col.prop(screen, "use_play_node_editors", text="Node Editors")
col.prop(screen, "use_play_sequence_editors", text="Video Sequencer")
col.prop(screen, "use_play_spreadsheet_editors")
col.prop(screen, "use_play_spreadsheet_editors", text="Spreadsheet")
col = layout.column(heading="Show")
col.prop(scene, "show_subframe", text="Subframes")

View File

@ -1412,7 +1412,9 @@ struct UVPackIslandsData {
static void pack_islands_startjob(void *pidv, bool *stop, bool *do_update, float *progress)
{
*progress = 0.02f;
if (progress != nullptr) {
*progress = 0.02f;
}
UVPackIslandsData *pid = static_cast<UVPackIslandsData *>(pidv);
@ -1429,8 +1431,12 @@ static void pack_islands_startjob(void *pidv, bool *stop, bool *do_update, float
!pid->use_job,
&pid->pack_island_params);
*progress = 0.99f;
*do_update = true;
if (progress != nullptr) {
*progress = 0.99f;
}
if (do_update != nullptr) {
*do_update = true;
}
}
static void pack_islands_endjob(void *pidv)
@ -1545,6 +1551,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
pack_islands_startjob(pid, nullptr, nullptr, nullptr);
pack_islands_endjob(pid);
pack_islands_freejob(pid);
MEM_freeN(pid);
return OPERATOR_FINISHED;

View File

@ -215,28 +215,18 @@ static bool thumbhash_from_path(const char * /*path*/, ThumbSource source, char
static bool uri_from_filename(const char *path, char *uri)
{
char orig_uri[URI_MAX];
const char *dirstart = path;
#ifdef WIN32
{
char vol[3];
BLI_strncpy(orig_uri, "file:///", FILE_MAX);
if (strlen(path) < 2 && path[1] != ':') {
/* not a correct absolute path */
return 0;
}
/* on windows, using always uppercase drive/volume letter in uri */
vol[0] = uchar(toupper(path[0]));
vol[1] = ':';
vol[2] = '\0';
strcat(orig_uri, vol);
dirstart += 2;
if (strlen(path) < 2 && path[1] != ':') {
/* Not a correct absolute path. */
return 0;
}
strcat(orig_uri, dirstart);
SNPRINTF(orig_uri, "file:///%s", path);
/* Always use an uppercase drive/volume letter in the URI. */
orig_uri[8] = char(toupper(orig_uri[8]));
BLI_str_replace_char(orig_uri, '\\', '/');
#else
SNPRINTF(orig_uri, "file://%s", dirstart);
SNPRINTF(orig_uri, "file://%s", path);
#endif
escape_uri_string(orig_uri, uri, URI_MAX, UNSAFE_PATH);

View File

@ -334,11 +334,15 @@ endif()
set(BLENDER_TEXT_FILES
${CMAKE_SOURCE_DIR}/release/text/copyright.txt
# Generate this file:
# `${CMAKE_SOURCE_DIR}/release/text/readme.html`
)
if(WITH_INSTALL_COPYRIGHT)
list(APPEND BLENDER_TEXT_FILES
${CMAKE_SOURCE_DIR}/release/text/copyright.txt
)
endif()
# -----------------------------------------------------------------------------
# Platform specific target destinations