Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_subsurf.c
| Show All 21 Lines | |||||
| */ | */ | ||||
| #include <stddef.h> | #include <stddef.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_string.h" | |||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "DNA_defaults.h" | #include "DNA_defaults.h" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| ▲ Show 20 Lines • Show All 371 Lines • ▼ Show 20 Lines | #endif | ||||
| if (ob_use_adaptive_subdivision && show_adaptive_options) { | if (ob_use_adaptive_subdivision && show_adaptive_options) { | ||||
| uiItemR(layout, &ob_cycles_ptr, "dicing_rate", 0, NULL, ICON_NONE); | uiItemR(layout, &ob_cycles_ptr, "dicing_rate", 0, NULL, ICON_NONE); | ||||
| float render = MAX2(RNA_float_get(&cycles_ptr, "dicing_rate") * | float render = MAX2(RNA_float_get(&cycles_ptr, "dicing_rate") * | ||||
| RNA_float_get(&ob_cycles_ptr, "dicing_rate"), | RNA_float_get(&ob_cycles_ptr, "dicing_rate"), | ||||
| 0.1f); | 0.1f); | ||||
| float preview = MAX2(RNA_float_get(&cycles_ptr, "preview_dicing_rate") * | float preview = MAX2(RNA_float_get(&cycles_ptr, "preview_dicing_rate") * | ||||
| RNA_float_get(&ob_cycles_ptr, "dicing_rate"), | RNA_float_get(&ob_cycles_ptr, "dicing_rate"), | ||||
| 0.1f); | 0.1f); | ||||
| char output[64]; | char output[256]; | ||||
| snprintf(output, 64, "Final Scale: Render %.2f px, Viewport %.2f px", render, preview); | BLI_snprintf(output, | ||||
| sizeof(output), | |||||
| TIP_("Final Scale: Render %.2f px, Viewport %.2f px"), | |||||
| render, | |||||
| preview); | |||||
| uiItemL(layout, output, ICON_NONE); | uiItemL(layout, output, ICON_NONE); | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| uiItemR(layout, ptr, "levels", 0, IFACE_("Levels Viewport"), ICON_NONE); | uiItemR(layout, ptr, "levels", 0, IFACE_("Levels Viewport"), ICON_NONE); | ||||
| } | } | ||||
| else { | else { | ||||
| uiLayout *col = uiLayoutColumn(layout, true); | uiLayout *col = uiLayoutColumn(layout, true); | ||||
| ▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines | |||||