Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_scene_defaults.h
- This file was added.
| /* | |||||
| * This program is free software; you can redistribute it and/or | |||||
| * modify it under the terms of the GNU General Public License | |||||
| * as published by the Free Software Foundation; either version 2 | |||||
| * of the License, or (at your option) any later version. | |||||
| * | |||||
| * This program is distributed in the hope that it will be useful, | |||||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
| * GNU General Public License for more details. | |||||
| * | |||||
| * You should have received a copy of the GNU General Public License | |||||
| * along with this program; if not, write to the Free Software Foundation, | |||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||||
| */ | |||||
| /** \file | |||||
| * \ingroup DNA | |||||
| */ | |||||
| #ifndef __DNA_SCENE_DEFAULTS_H__ | |||||
| #define __DNA_SCENE_DEFAULTS_H__ | |||||
| #include "DNA_view3d_defaults.h" | |||||
| /* -------------------------------------------------------------------- */ | |||||
| /** \name Scene Struct | |||||
| * \{ */ | |||||
| #define _DNA_DEFAULT_ImageFormatData \ | |||||
| { \ | |||||
| .planes = R_IMF_PLANES_RGBA, \ | |||||
| .imtype = R_IMF_IMTYPE_PNG, \ | |||||
| .depth = R_IMF_CHAN_DEPTH_8, \ | |||||
| .quality = 90, \ | |||||
| .compress = 15, \ | |||||
| } | |||||
| #define _DNA_DEFAULT_BakeData \ | |||||
| { \ | |||||
| .flag = R_BAKE_CLEAR, \ | |||||
| .pass_filter = R_BAKE_PASS_FILTER_ALL, \ | |||||
| .width = 512, \ | |||||
| .height = 512, \ | |||||
| .margin = 16, \ | |||||
| .normal_space = R_BAKE_SPACE_TANGENT, \ | |||||
| .normal_swizzle = {R_BAKE_POSX, R_BAKE_POSY, R_BAKE_POSZ}, \ | |||||
| \ | |||||
| .im_format = _DNA_DEFAULT_ImageFormatData, \ | |||||
| } | |||||
| #define _DNA_DEFAULT_FFMpegCodecData \ | |||||
| { \ | |||||
| .audio_mixrate = 48000, \ | |||||
| .audio_volume = 1.0f, \ | |||||
| .audio_bitrate = 192, \ | |||||
| .audio_channels = 2, \ | |||||
| } | |||||
| #define _DNA_DEFAULT_RenderData \ | |||||
| { \ | |||||
| .mode = R_OSA, \ | |||||
| .cfra = 1, \ | |||||
| .sfra = 1, \ | |||||
| .efra = 250, \ | |||||
| .frame_step = 1, \ | |||||
| .xsch = 1920, \ | |||||
| .ysch = 1080, \ | |||||
| .xasp = 1, \ | |||||
| .yasp = 1, \ | |||||
| .tilex = 256, \ | |||||
| .tiley = 256, \ | |||||
| .size = 100, \ | |||||
| \ | |||||
| .im_format = _DNA_DEFAULT_ImageFormatData, \ | |||||
| \ | |||||
| .displaymode = R_OUTPUT_WINDOW, \ | |||||
| .framapto = 100, \ | |||||
| .images = 100, \ | |||||
| .framelen = 1.0, \ | |||||
| .blurfac = 0.5, \ | |||||
| .frs_sec = 24, \ | |||||
| .frs_sec_base = 1, \ | |||||
| \ | |||||
| /* OCIO_TODO: for forwards compatibility only, so if no tonecurve are used, \ | |||||
| * images would look in the same way as in current blender \ | |||||
| * \ | |||||
| * perhaps at some point should be completely deprecated? \ | |||||
| */ \ | |||||
| .color_mgt_flag = R_COLOR_MANAGEMENT, \ | |||||
| \ | |||||
| .gauss = 1.5, \ | |||||
| .dither_intensity = 1.0f, \ | |||||
| \ | |||||
| .bake_mode = 0, \ | |||||
| .bake_filter = 16, \ | |||||
| .bake_flag = R_BAKE_CLEAR, \ | |||||
| .bake_samples = 256, \ | |||||
| .bake_biasdist = 0.001, \ | |||||
| \ | |||||
| /* BakeData */ \ | |||||
| .bake = _DNA_DEFAULT_BakeData, \ | |||||
| \ | |||||
| .scemode = R_DOCOMP | R_DOSEQ | R_EXTENSION, \ | |||||
| .stamp = R_STAMP_TIME | R_STAMP_FRAME | R_STAMP_DATE | R_STAMP_CAMERA | R_STAMP_SCENE | R_STAMP_FILENAME | R_STAMP_RENDERTIME | R_STAMP_MEMORY, \ | |||||
| .stamp_font_id = 12, \ | |||||
| .fg_stamp = {0.8f, 0.8f, 0.8f, 1.0f}, \ | |||||
| .bg_stamp = {0.0f, 0.0f, 0.0f, 0.25f}, \ | |||||
| \ | |||||
| .seq_prev_type = OB_SOLID, \ | |||||
| .seq_rend_type = OB_SOLID, \ | |||||
| .seq_flag = 0, \ | |||||
| \ | |||||
| .threads = 1, \ | |||||
| \ | |||||
| .simplify_subsurf = 6, \ | |||||
| .simplify_particles = 1.0f, \ | |||||
| \ | |||||
| .border.xmin = 0.0f, \ | |||||
| .border.ymin = 0.0f, \ | |||||
| .border.xmax = 1.0f, \ | |||||
| .border.ymax = 1.0f, \ | |||||
| \ | |||||
| .preview_start_resolution = 64, \ | |||||
| \ | |||||
| .line_thickness_mode = R_LINE_THICKNESS_ABSOLUTE, \ | |||||
| .unit_line_thickness = 1.0f, \ | |||||
| \ | |||||
| .ffcodecdata = _DNA_DEFAULT_FFMpegCodecData, \ | |||||
| \ | |||||
| .osa = 8, \ | |||||
| } | |||||
| #define _DNA_DEFAULT_AudioData \ | |||||
| { \ | |||||
| .distance_model = 2.0f, \ | |||||
| .doppler_factor = 1.0f, \ | |||||
| .speed_of_sound = 343.3f, \ | |||||
| .volume = 1.0f, \ | |||||
| .flag = AUDIO_SYNC, \ | |||||
| } | |||||
| #define _DNA_DEFAULT_SceneDisplay \ | |||||
| { \ | |||||
| .light_direction = {M_SQRT1_3, M_SQRT1_3, M_SQRT1_3}, \ | |||||
| .shadow_shift = 0.1f, \ | |||||
| .shadow_focus = 0.0f, \ | |||||
| \ | |||||
| .matcap_ssao_distance = 0.2f, \ | |||||
| .matcap_ssao_attenuation = 1.0f, \ | |||||
| .matcap_ssao_samples = 16, \ | |||||
| \ | |||||
| .shading = _DNA_DEFAULT_View3DShading, \ | |||||
| } | |||||
| #define _DNA_DEFAULT_PhysicsSettings \ | |||||
| { \ | |||||
| .gravity = {0.0f, 0.0f -9.81f}, \ | |||||
| .flag = PHYS_GLOBAL_GRAVITY, \ | |||||
| } | |||||
| #define _DNA_DEFAULT_Scene \ | |||||
| { \ | |||||
| .cursor = _DNA_DEFAULT_View3DCursor, \ | |||||
| .r = _DNA_DEFAULT_RenderData, \ | |||||
| .audio = _DNA_DEFAULT_AudioData, \ | |||||
| \ | |||||
| .display = _DNA_DEFAULT_SceneDisplay, \ | |||||
| \ | |||||
| .physics_settings = _DNA_DEFAULT_PhysicsSettings, \ | |||||
| } | |||||
| /** \} */ | |||||
| /* -------------------------------------------------------------------- */ | |||||
| /** \name ToolSettings Struct | |||||
| * \{ */ | |||||
| #define _DNA_DEFAULTS_CurvePaintSettings \ | |||||
| { \ | |||||
| .curve_type = CU_BEZIER, \ | |||||
| .flag = CURVE_PAINT_FLAG_CORNERS_DETECT, \ | |||||
| .error_threshold = 8, \ | |||||
| .radius_max = 1.0f, \ | |||||
| .corner_angle = DEG2RADF(70.0f), \ | |||||
| } | |||||
| #define _DNA_DEFAULTS_ImagePaintSettings \ | |||||
| { \ | |||||
| .paint.flags = PAINT_SHOW_BRUSH, \ | |||||
| .normal_angle = 80, \ | |||||
| .seam_bleed = 2, \ | |||||
| } | |||||
| #define _DNA_DEFAULTS_GP_Sculpt_Guide \ | |||||
| { \ | |||||
| .spacing = 20.0f, \ | |||||
| } | |||||
| #define _DNA_DEFAULTS_GP_Sculpt_Settings \ | |||||
| { \ | |||||
| .guide = _DNA_DEFAULTS_GP_Sculpt_Guide, \ | |||||
| } | |||||
| #define _DNA_DEFAULTS_MeshStatVis \ | |||||
| { \ | |||||
| .overhang_axis = OB_NEGZ, \ | |||||
| .overhang_min = 0, \ | |||||
| .overhang_max = DEG2RADF(45.0f), \ | |||||
| .thickness_max = 0.1f, \ | |||||
| .thickness_samples = 1, \ | |||||
| .distort_min = DEG2RADF(5.0f), \ | |||||
| .distort_max = DEG2RADF(45.0f), \ | |||||
| \ | |||||
| .sharp_min = DEG2RADF(90.0f), \ | |||||
| .sharp_max = DEG2RADF(180.0f), \ | |||||
| } | |||||
| #define _DNA_DEFAULT_ToolSettings \ | |||||
| { \ | |||||
| .object_flag = SCE_OBJECT_MODE_LOCK, \ | |||||
| .doublimit = 0.001, \ | |||||
| .vgroup_weight = 1.0f, \ | |||||
| .uvcalc_margin = 0.001f, \ | |||||
| .uvcalc_flag = UVCALC_TRANSFORM_CORRECT, \ | |||||
| .unwrapper = 1, \ | |||||
| .select_thresh = 0.01f, \ | |||||
| .gizmo_flag = SCE_GIZMO_SHOW_TRANSLATE | SCE_GIZMO_SHOW_ROTATE | SCE_GIZMO_SHOW_SCALE, \ | |||||
| \ | |||||
| .selectmode = SCE_SELECT_VERTEX, \ | |||||
| .uv_selectmode = UV_SELECT_VERTEX, \ | |||||
| .autokey_mode = AUTOKEY_MODE_NORMAL, \ | |||||
| \ | |||||
| .transform_pivot_point = V3D_AROUND_CENTER_MEDIAN, \ | |||||
| .snap_mode = SCE_SNAP_MODE_INCREMENT, \ | |||||
| .snap_node_mode = SCE_SNAP_MODE_GRID, \ | |||||
| .snap_uv_mode = SCE_SNAP_MODE_INCREMENT, \ | |||||
| .snap_transform_mode_flag = SCE_SNAP_TRANSFORM_MODE_TRANSLATE, \ | |||||
| \ | |||||
| .curve_paint_settings = _DNA_DEFAULTS_CurvePaintSettings, \ | |||||
| \ | |||||
| .statvis = _DNA_DEFAULTS_MeshStatVis, \ | |||||
| \ | |||||
| .proportional_size = 1.0f, \ | |||||
| \ | |||||
| .imapaint = _DNA_DEFAULTS_ImagePaintSettings, \ | |||||
| \ | |||||
| .gp_sculpt = _DNA_DEFAULTS_GP_Sculpt_Settings, \ | |||||
| } | |||||
| #endif /* __DNA_SCENE_DEFAULTS_H__ */ | |||||