static void rna_def_render_pass(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem render_pass_debug_type_items[] = { {RENDER_PASS_DEBUG_BVH_TRAVERSAL_STEPS, "BVH_TRAVERSAL_STEPS", 0, "BVH Traversal Steps", ""}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "RenderPass", NULL); RNA_def_struct_ui_text(srna, "Render Pass", ""); RNA_define_verify_sdna(0); prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_struct_name_property(srna, prop); prop = RNA_def_property(srna, "channel_id", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "chan_id"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "channels", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "channels"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "passtype"); RNA_def_property_enum_items(prop, render_pass_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE); RNA_def_property_flag(prop, PROP_DYNAMIC); RNA_def_property_multi_array(prop, 2, NULL); RNA_def_property_dynamic_array_funcs(prop, "rna_RenderPass_rect_get_length"); RNA_def_property_float_funcs(prop, "rna_RenderPass_rect_get", "rna_RenderPass_rect_set", NULL); prop = RNA_def_property(srna, "view_id", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "view_id"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "debug_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "debug_type"); RNA_def_property_enum_items(prop, render_pass_debug_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_define_verify_sdna(1); }
static void rna_def_keyboard_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; srna = RNA_def_struct(brna, "KeyboardSensor", "Sensor"); RNA_def_struct_ui_text(srna, "Keyboard Sensor", "Sensor to detect keyboard events"); RNA_def_struct_sdna_from(srna, "bKeyboardSensor", "data"); prop = RNA_def_property(srna, "key", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "key"); RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_key_set", NULL); RNA_def_property_ui_text(prop, "Key", ""); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_WINDOWMANAGER); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "modifier_key_1", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "qual"); RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_modifier_set", NULL); RNA_def_property_ui_text(prop, "Modifier Key", "Modifier key code"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "modifier_key_2", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "qual2"); RNA_def_property_enum_items(prop, rna_enum_event_type_items); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS); RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_modifier2_set", NULL); RNA_def_property_ui_text(prop, "Second Modifier Key", "Modifier key code"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "target", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "targetName"); RNA_def_property_ui_text(prop, "Target", "Property that receives the keystrokes in case a string is logged"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "log", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "toggleName"); RNA_def_property_ui_text(prop, "Log Toggle", "Property that indicates whether to log keystrokes as a string"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "use_all_keys", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "type", 1); RNA_def_property_ui_text(prop, "All Keys", "Trigger this sensor on any keystroke"); RNA_def_property_update(prop, NC_LOGIC, NULL); }
static void rna_def_mouse_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem mouse_event_items[] = { {BL_SENS_MOUSE_LEFT_BUTTON, "LEFTCLICK", 0, "Left Button", ""}, {BL_SENS_MOUSE_MIDDLE_BUTTON, "MIDDLECLICK", 0, "Middle Button", ""}, {BL_SENS_MOUSE_RIGHT_BUTTON, "RIGHTCLICK", 0, "Right Button", ""}, {BL_SENS_MOUSE_WHEEL_UP, "WHEELUP", 0, "Wheel Up", ""}, {BL_SENS_MOUSE_WHEEL_DOWN, "WHEELDOWN", 0, "Wheel Down", ""}, {BL_SENS_MOUSE_MOVEMENT, "MOVEMENT", 0, "Movement", ""}, {BL_SENS_MOUSE_MOUSEOVER, "MOUSEOVER", 0, "Mouse Over", ""}, {BL_SENS_MOUSE_MOUSEOVER_ANY, "MOUSEOVERANY", 0, "Mouse Over Any", ""}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "MouseSensor", "Sensor"); RNA_def_struct_ui_text(srna, "Mouse Sensor", "Sensor to detect mouse events"); RNA_def_struct_sdna_from(srna, "bMouseSensor", "data"); prop = RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, mouse_event_items); RNA_def_property_ui_text(prop, "Mouse Event", "Type of event this mouse sensor should trigger on"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "use_pulse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_MOUSE_FOCUS_PULSE); RNA_def_property_ui_text(prop, "Pulse", "Moving the mouse over a different object generates a pulse"); RNA_def_property_update(prop, NC_LOGIC, NULL); }
static void rna_def_area_lamp(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static const EnumPropertyItem prop_areashape_items[] = { {LA_AREA_SQUARE, "SQUARE", 0, "Square", ""}, {LA_AREA_RECT, "RECTANGLE", 0, "Rectangle", ""}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "AreaLamp", "Lamp"); RNA_def_struct_sdna(srna, "Lamp"); RNA_def_struct_ui_text(srna, "Area Lamp", "Directional area lamp"); RNA_def_struct_ui_icon(srna, ICON_LAMP_AREA); rna_def_lamp_shadow(srna, 0, 1); prop = RNA_def_property(srna, "use_umbra", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_UMBRA); RNA_def_property_ui_text(prop, "Umbra", "Emphasize parts that are fully shadowed (Constant Jittered sampling)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "use_dither", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_DITHER); RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling (Constant Jittered sampling)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "use_jitter", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_JITTER); RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling (Constant Jittered sampling)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "area_shape"); RNA_def_property_enum_items(prop, prop_areashape_items); RNA_def_property_ui_text(prop, "Shape", "Shape of the area lamp"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "area_size"); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_ui_range(prop, 0, 100, 0.1, 3); RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_float_sdna(prop, NULL, "area_sizey"); RNA_def_property_ui_range(prop, 0, 100, 0.1, 3); RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "k"); RNA_def_property_ui_range(prop, 0.001, 2.0, 0.1, 3); RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); }
static void rna_def_histogram(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem prop_mode_items[] = { {HISTO_MODE_LUMA, "LUMA", 0, "Luma", "Luma"}, {HISTO_MODE_RGB, "RGB", 0, "RGB", "Red Green Blue"}, {HISTO_MODE_R, "R", 0, "R", "Red"}, {HISTO_MODE_G, "G", 0, "G", "Green"}, {HISTO_MODE_B, "B", 0, "B", "Blue"}, {HISTO_MODE_ALPHA, "A", 0, "A", "Alpha"}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "Histogram", NULL); RNA_def_struct_ui_text(srna, "Histogram", "Statistical view of the levels of color in an image"); prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, prop_mode_items); RNA_def_property_ui_text(prop, "Mode", "Channels to display when drawing the histogram"); prop = RNA_def_property(srna, "show_line", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", HISTO_FLAG_LINE); RNA_def_property_ui_text(prop, "Show Line", "Display lines rather than filled shapes"); RNA_def_property_ui_icon(prop, ICON_IPO, 0); }
static void rna_def_moviecliUser(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem clip_render_size_items[] = { {MCLIP_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""}, {MCLIP_PROXY_RENDER_SIZE_50, "PROXY_50", 0, "Proxy size 50%", ""}, {MCLIP_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""}, {MCLIP_PROXY_RENDER_SIZE_100, "PROXY_100", 0, "Proxy size 100%", ""}, {MCLIP_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "MovieClipUser", NULL); RNA_def_struct_ui_text(srna, "Movie Clip User", "Parameters defining how a MovieClip datablock is used by another datablock"); prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_int_sdna(prop, NULL, "framenr"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); RNA_def_property_ui_text(prop, "Current Frame", "Current frame number in movie or image sequence"); /* render size */ prop= RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "render_size"); RNA_def_property_enum_items(prop, clip_render_size_items); RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using full resolution or different proxy resolutions"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); /* render undistorted */ prop= RNA_def_property(srna, "use_render_undistorted", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "render_flag", MCLIP_PROXY_RENDER_UNDISTORT); RNA_def_property_ui_text(prop, "Render Undistorted", "Render preview using undistorted proxy"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); }
static void rna_def_mouse_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static const EnumPropertyItem mouse_event_items[] = { {BL_SENS_MOUSE_LEFT_BUTTON, "LEFTCLICK", 0, "Left Button", ""}, {BL_SENS_MOUSE_MIDDLE_BUTTON, "MIDDLECLICK", 0, "Middle Button", ""}, {BL_SENS_MOUSE_RIGHT_BUTTON, "RIGHTCLICK", 0, "Right Button", ""}, {BL_SENS_MOUSE_WHEEL_UP, "WHEELUP", 0, "Wheel Up", ""}, {BL_SENS_MOUSE_WHEEL_DOWN, "WHEELDOWN", 0, "Wheel Down", ""}, {BL_SENS_MOUSE_MOVEMENT, "MOVEMENT", 0, "Movement", ""}, {BL_SENS_MOUSE_MOUSEOVER, "MOUSEOVER", 0, "Mouse Over", ""}, {BL_SENS_MOUSE_MOUSEOVER_ANY, "MOUSEOVERANY", 0, "Mouse Over Any", ""}, {0, NULL, 0, NULL, NULL} }; static const EnumPropertyItem prop_mouse_type_items[] = { {SENS_COLLISION_PROPERTY, "PROPERTY", ICON_LOGIC, "Property", "Use a property for ray intersections"}, {SENS_COLLISION_MATERIAL, "MATERIAL", ICON_MATERIAL_DATA, "Material", "Use a material for ray intersections"}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "MouseSensor", "Sensor"); RNA_def_struct_ui_text(srna, "Mouse Sensor", "Sensor to detect mouse events"); RNA_def_struct_sdna_from(srna, "bMouseSensor", "data"); prop = RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, mouse_event_items); RNA_def_property_ui_text(prop, "Mouse Event", "Type of event this mouse sensor should trigger on"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "use_pulse", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_MOUSE_FOCUS_PULSE); RNA_def_property_ui_text(prop, "Pulse", "Moving the mouse over a different object generates a pulse"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "use_material", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, prop_mouse_type_items); RNA_def_property_ui_text(prop, "M/P", "Toggle collision on material or property"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "propname"); RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property (blank = all objects)"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "material", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "matname"); RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "use_x_ray", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_RAY_XRAY); RNA_def_property_ui_text(prop, "X-Ray", "Toggle X-Ray option (see through objects that don't have the property)"); RNA_def_property_update(prop, NC_LOGIC, NULL); }
static void rna_def_cloth_solver_result(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem status_items[] = { {BPH_SOLVER_SUCCESS, "SUCCESS", 0, "Success", "Computation was successful"}, {BPH_SOLVER_NUMERICAL_ISSUE, "NUMERICAL_ISSUE", 0, "Numerical Issue", "The provided data did not satisfy the prerequisites"}, {BPH_SOLVER_NO_CONVERGENCE, "NO_CONVERGENCE", 0, "No Convergence", "Iterative procedure did not converge"}, {BPH_SOLVER_INVALID_INPUT, "INVALID_INPUT", 0, "Invalid Input", "The inputs are invalid, or the algorithm has been improperly called"}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "ClothSolverResult", NULL); RNA_def_struct_ui_text(srna, "Solver Result", "Result of cloth solver iteration"); RNA_define_verify_sdna(0); prop = RNA_def_property(srna, "status", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, status_items); RNA_def_property_enum_sdna(prop, NULL, "status"); RNA_def_property_flag(prop, PROP_ENUM_FLAG); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Status", "Status of the solver iteration"); prop = RNA_def_property(srna, "max_error", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "max_error"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Maximum Error", "Maximum error during substeps"); prop = RNA_def_property(srna, "min_error", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "min_error"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Minimum Error", "Minimum error during substeps"); prop = RNA_def_property(srna, "avg_error", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "avg_error"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Average Error", "Average error during substeps"); prop = RNA_def_property(srna, "max_iterations", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "max_iterations"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Maximum Iterations", "Maximum iterations during substeps"); prop = RNA_def_property(srna, "min_iterations", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "min_iterations"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Minimum Iterations", "Minimum iterations during substeps"); prop = RNA_def_property(srna, "avg_iterations", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "avg_iterations"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Average Iterations", "Average iterations during substeps"); RNA_define_verify_sdna(1); }
static void rna_def_render_pass(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem pass_type_items[]= { {SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""}, {SCE_PASS_Z, "Z", 0, "Z", ""}, {SCE_PASS_RGBA, "COLOR", 0, "Color", ""}, {SCE_PASS_DIFFUSE, "DIFFUSE", 0, "Diffuse", ""}, {SCE_PASS_SPEC, "SPECULAR", 0, "Specular", ""}, {SCE_PASS_SHADOW, "SHADOW", 0, "Shadow", ""}, {SCE_PASS_AO, "AO", 0, "AO", ""}, {SCE_PASS_REFLECT, "REFLECTION", 0, "Reflection", ""}, {SCE_PASS_NORMAL, "NORMAL", 0, "Normal", ""}, {SCE_PASS_VECTOR, "VECTOR", 0, "Vector", ""}, {SCE_PASS_REFRACT, "REFRACTION", 0, "Refraction", ""}, {SCE_PASS_INDEXOB, "OBJECT_INDEX", 0, "Object Index", ""}, {SCE_PASS_UV, "UV", 0, "UV", ""}, {SCE_PASS_MIST, "MIST", 0, "Mist", ""}, {SCE_PASS_EMIT, "EMIT", 0, "Emit", ""}, {SCE_PASS_ENVIRONMENT, "ENVIRONMENT", 0, "Environment", ""}, {SCE_PASS_INDEXMA, "MATERIAL_INDEX", 0, "Material Index", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "RenderPass", NULL); RNA_def_struct_ui_text(srna, "Render Pass", ""); RNA_define_verify_sdna(0); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "channel_id", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "chan_id"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop= RNA_def_property(srna, "channels", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "channels"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "passtype"); RNA_def_property_enum_items(prop, pass_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE); RNA_def_property_flag(prop, PROP_DYNAMIC); RNA_def_property_multi_array(prop, 2, NULL); RNA_def_property_dynamic_array_funcs(prop, "rna_RenderPass_rect_get_length"); RNA_def_property_float_funcs(prop, "rna_RenderPass_rect_get", "rna_RenderPass_rect_set", NULL); RNA_define_verify_sdna(1); }
/* TODO: use reg option! */ static void rna_def_common_keying_flags(StructRNA *srna, short UNUSED(reg)) { PropertyRNA *prop; prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "keyingflag"); RNA_def_property_enum_items(prop, keying_flag_items); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL | PROP_ENUM_FLAG); RNA_def_property_ui_text(prop, "Options", "Keying set options"); }
static void rna_def_maskParent(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem mask_id_type_items[] = { {ID_MC, "MOVIECLIP", ICON_SEQUENCE, "Movie Clip", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem parent_type_items[] = { {MASK_PARENT_POINT_TRACK, "POINT_TRACK", 0, "Point Track", ""}, {MASK_PARENT_PLANE_TRACK, "PLANE_TRACK", 0, "Plane Track", ""}, {0, NULL, 0, NULL, NULL}}; srna = RNA_def_struct(brna, "MaskParent", NULL); RNA_def_struct_ui_text(srna, "Mask Parent", "Parenting settings for masking element"); /* Target Properties - ID-block to Drive */ prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "ID"); RNA_def_property_flag(prop, PROP_EDITABLE); // RNA_def_property_editable_func(prop, "rna_maskSpline_id_editable"); /* note: custom set function is ONLY to avoid rna setting a user for this. */ RNA_def_property_pointer_funcs(prop, NULL, "rna_MaskParent_id_set", "rna_MaskParent_id_typef", NULL); RNA_def_property_ui_text(prop, "ID", "ID-block to which masking element would be parented to or to it's property"); RNA_def_property_update(prop, 0, "rna_Mask_update_parent"); prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "id_type"); RNA_def_property_enum_items(prop, mask_id_type_items); RNA_def_property_enum_default(prop, ID_MC); RNA_def_property_enum_funcs(prop, NULL, "rna_MaskParent_id_type_set", NULL); //RNA_def_property_editable_func(prop, "rna_MaskParent_id_type_editable"); RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used"); RNA_def_property_update(prop, 0, "rna_Mask_update_parent"); /* type */ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, parent_type_items); RNA_def_property_ui_text(prop, "Parent Type", "Parent Type"); RNA_def_property_update(prop, 0, "rna_Mask_update_parent"); /* parent */ prop = RNA_def_property(srna, "parent", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Parent", "Name of parent object in specified data block to which parenting happens"); RNA_def_property_string_maxlength(prop, MAX_ID_NAME - 2); RNA_def_property_update(prop, 0, "rna_Mask_update_parent"); /* sub_parent */ prop = RNA_def_property(srna, "sub_parent", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Sub Parent", "Name of parent sub-object in specified data block to which parenting happens"); RNA_def_property_string_maxlength(prop, MAX_ID_NAME - 2); RNA_def_property_update(prop, 0, "rna_Mask_update_parent"); }
static void rna_def_world_mist(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem falloff_items[] = { {0, "QUADRATIC", 0, "Quadratic", "Use quadratic progression"}, {1, "LINEAR", 0, "Linear", "Use linear progression"}, {2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "WorldMistSettings", NULL); RNA_def_struct_sdna(srna, "World"); RNA_def_struct_nested(brna, srna, "World"); RNA_def_struct_ui_text(srna, "World Mist", "Mist settings for a World data-block"); prop = RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST); RNA_def_property_ui_text(prop, "Use Mist", "Occlude objects with the environment color as they are further away"); RNA_def_property_update(prop, 0, "rna_World_draw_update"); prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "misi"); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Minimum", "Overall minimum intensity of the mist effect"); RNA_def_property_update(prop, 0, "rna_World_update"); prop = RNA_def_property(srna, "start", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "miststa"); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 10000, 10, 2); RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera"); RNA_def_property_update(prop, 0, "rna_World_draw_mist_update"); prop = RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "mistdist"); RNA_def_property_range(prop, 0, FLT_MAX); RNA_def_property_ui_range(prop, 0, 10000, 10, 2); RNA_def_property_ui_text(prop, "Depth", "Distance over which the mist effect fades in"); RNA_def_property_update(prop, 0, "rna_World_draw_mist_update"); prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "misthi"); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "Height", "Control how much mist density decreases with height"); RNA_def_property_update(prop, 0, "rna_World_update"); prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mistype"); RNA_def_property_enum_items(prop, falloff_items); RNA_def_property_ui_text(prop, "Falloff", "Type of transition used to fade mist"); RNA_def_property_update(prop, 0, "rna_World_update"); }
static void rna_def_color_ramp(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; FunctionRNA *func; static EnumPropertyItem prop_interpolation_items[] = { {1, "EASE", 0, "Ease", ""}, {3, "CARDINAL", 0, "Cardinal", ""}, {0, "LINEAR", 0, "Linear", ""}, {2, "B_SPLINE", 0, "B-Spline", ""}, {4, "CONSTANT", 0, "Constant", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "ColorRamp", NULL); RNA_def_struct_sdna(srna, "ColorBand"); RNA_def_struct_path_func(srna, "rna_ColorRamp_path"); RNA_def_struct_ui_text(srna, "Color Ramp", "Color ramp mapping a scalar value to a color"); prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_COLOR); RNA_def_property_collection_sdna(prop, NULL, "data", "tot"); RNA_def_property_struct_type(prop, "ColorRampElement"); RNA_def_property_ui_text(prop, "Elements", ""); RNA_def_property_update(prop, 0, "rna_ColorRamp_update"); rna_def_color_ramp_element_api(brna, prop); prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ipotype"); RNA_def_property_enum_items(prop, prop_interpolation_items); RNA_def_property_ui_text(prop, "Interpolation", ""); RNA_def_property_update(prop, 0, "rna_ColorRamp_update"); #if 0 // use len(elements) prop= RNA_def_property(srna, "total", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "tot"); /* needs a function to do the right thing when adding elements like colorband_add_cb() */ RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_range(prop, 0, 31); /* MAXCOLORBAND = 32 */ RNA_def_property_ui_text(prop, "Total", "Total number of elements"); RNA_def_property_update(prop, 0, "rna_ColorRamp_update"); #endif func = RNA_def_function(srna, "evaluate", "rna_ColorRamp_eval"); RNA_def_function_ui_description(func, "Evaluate ColorRamp"); prop= RNA_def_float(func, "position", 1.0f, 0.0f, 1.0f, "Position", "Evaluate ColorRamp at position", 0.0f, 1.0f); RNA_def_property_flag(prop, PROP_REQUIRED); /* return */ prop = RNA_def_float_color(func, "color", 4, NULL, -FLT_MAX, FLT_MAX, "Color", "Color at given position", -FLT_MAX, FLT_MAX); RNA_def_property_flag(prop, PROP_THICK_WRAP); RNA_def_function_output(func, prop); }
static void rna_def_scopes(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem prop_wavefrm_mode_items[] = { {SCOPES_WAVEFRM_LUMA, "LUMA", ICON_COLOR, "Luma", ""}, {SCOPES_WAVEFRM_RGB_PARADE, "PARADE", ICON_COLOR, "Parade", ""}, {SCOPES_WAVEFRM_YCC_601, "YCBCR601", ICON_COLOR, "YCbCr (ITU 601)", ""}, {SCOPES_WAVEFRM_YCC_709, "YCBCR709", ICON_COLOR, "YCbCr (ITU 709)", ""}, {SCOPES_WAVEFRM_YCC_JPEG, "YCBCRJPG", ICON_COLOR, "YCbCr (Jpeg)", ""}, {SCOPES_WAVEFRM_RGB, "RGB", ICON_COLOR, "Red Green Blue", ""}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "Scopes", NULL); RNA_def_struct_ui_text(srna, "Scopes", "Scopes for statistical view of an image"); prop = RNA_def_property(srna, "use_full_resolution", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, "Scopes", "sample_full", 1); RNA_def_property_ui_text(prop, "Full Sample", "Sample every pixel of the image"); RNA_def_property_update(prop, 0, "rna_Scopes_update"); prop = RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_PERCENTAGE); RNA_def_property_float_sdna(prop, "Scopes", "accuracy"); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_range(prop, 0.0, 100.0, 10, 1); RNA_def_property_ui_text(prop, "Accuracy", "Proportion of original image source pixel lines to sample"); RNA_def_property_update(prop, 0, "rna_Scopes_update"); prop = RNA_def_property(srna, "histogram", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, "Scopes", "hist"); RNA_def_property_struct_type(prop, "Histogram"); RNA_def_property_ui_text(prop, "Histogram", "Histogram for viewing image statistics"); prop = RNA_def_property(srna, "waveform_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, "Scopes", "wavefrm_mode"); RNA_def_property_enum_items(prop, prop_wavefrm_mode_items); RNA_def_property_ui_text(prop, "Waveform Mode", ""); RNA_def_property_update(prop, 0, "rna_Scopes_update"); prop = RNA_def_property(srna, "waveform_alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "Scopes", "wavefrm_alpha"); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Waveform Opacity", "Opacity of the points"); prop = RNA_def_property(srna, "vectorscope_alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "Scopes", "vecscope_alpha"); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Vectorscope Opacity", "Opacity of the points"); }
static void rna_def_action(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; srna = RNA_def_struct(brna, "Action", "ID"); RNA_def_struct_sdna(srna, "bAction"); RNA_def_struct_ui_text(srna, "Action", "A collection of F-Curves for animation"); RNA_def_struct_ui_icon(srna, ICON_ACTION); /* collections */ prop = RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "curves", NULL); RNA_def_property_struct_type(prop, "FCurve"); RNA_def_property_ui_text(prop, "F-Curves", "The individual F-Curves that make up the action"); rna_def_action_fcurves(brna, prop); prop = RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "groups", NULL); RNA_def_property_struct_type(prop, "ActionGroup"); RNA_def_property_ui_text(prop, "Groups", "Convenient groupings of F-Curves"); rna_def_action_groups(brna, prop); prop = RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "markers", NULL); RNA_def_property_struct_type(prop, "TimelineMarker"); /* Use lib exception so the list isn't grayed out; adding/removing is still banned though, see T45689 */ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this action, for labeling poses"); rna_def_action_pose_markers(brna, prop); /* properties */ prop = RNA_def_float_vector(srna, "frame_range", 2, NULL, 0, 0, "Frame Range", "The final frame range of all F-Curves within this action", 0, 0); RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get", NULL, NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* special "type" limiter - should not really be edited in general, * but is still available/editable in 'emergencies' */ prop = RNA_def_property(srna, "id_root", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idroot"); RNA_def_property_enum_items(prop, rna_enum_id_type_items); RNA_def_property_ui_text(prop, "ID Root Type", "Type of ID block that action can be used on - " "DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_ID); /* API calls */ RNA_api_action(srna); }
static void rna_def_lamp_mtex(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static const EnumPropertyItem prop_texture_coordinates_items[] = { {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"}, {TEXCO_VIEW, "VIEW", 0, "View", "Use view coordinates for the texture coordinates"}, {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "LampTextureSlot", "TextureSlot"); RNA_def_struct_sdna(srna, "MTex"); RNA_def_struct_ui_text(srna, "Lamp Texture Slot", "Texture slot for textures in a Lamp data-block"); prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "texco"); RNA_def_property_enum_items(prop, prop_texture_coordinates_items); RNA_def_property_ui_text(prop, "Texture Coordinates", ""); prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "object"); RNA_def_property_struct_type(prop, "Object"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates"); prop = RNA_def_property(srna, "use_map_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_COL); RNA_def_property_ui_text(prop, "Color", "Let the texture affect the basic color of the lamp"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "use_map_shadow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_SHAD); RNA_def_property_ui_text(prop, "Shadow", "Let the texture affect the shadow color of the lamp"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "colfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); RNA_def_property_ui_text(prop, "Color Factor", "Amount texture affects color values"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "shadowfac"); RNA_def_property_ui_range(prop, 0, 1, 10, 3); RNA_def_property_ui_text(prop, "Shadow Factor", "Amount texture affects shadow"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); }
static void rna_def_region(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; srna = RNA_def_struct(brna, "Region", NULL); RNA_def_struct_ui_text(srna, "Region", "Region in a subdivided screen area"); RNA_def_struct_sdna(srna, "ARegion"); prop = RNA_def_property(srna, "id", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "swinid"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Region ID", "Unique ID for this region"); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "regiontype"); RNA_def_property_enum_items(prop, rna_enum_region_type_items); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Region Type", "Type of this region"); prop = RNA_def_property(srna, "x", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "winrct.xmin"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "X Position", "The window relative vertical location of the region"); prop = RNA_def_property(srna, "y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "winrct.ymin"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Y Position", "The window relative horizontal location of the region"); prop = RNA_def_property(srna, "width", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "winx"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Width", "Region width"); prop = RNA_def_property(srna, "height", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "winy"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Height", "Region height"); prop = RNA_def_property(srna, "view2d", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "v2d"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_ui_text(prop, "View2D", "2D view of the region"); RNA_def_function(srna, "tag_redraw", "ED_region_tag_redraw"); }
static void rna_def_fmodifier_function_generator(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem prop_type_items[] = { {0, "SIN", 0, "Sine", ""}, {1, "COS", 0, "Cosine", ""}, {2, "TAN", 0, "Tangent", ""}, {3, "SQRT", 0, "Square Root", ""}, {4, "LN", 0, "Natural Logarithm", ""}, {5, "SINC", 0, "Normalised Sine", "sin(x) / x"}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "FModifierFunctionGenerator", "FModifier"); RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generates values using a Built-In Function."); RNA_def_struct_sdna_from(srna, "FMod_FunctionGenerator", "data"); /* coefficients */ prop= RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_text(prop, "Amplitude", "Scale factor determining the maximum/minimum values."); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); prop= RNA_def_property(srna, "phase_multiplier", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_text(prop, "Phase Multiplier", "Scale factor determining the 'speed' of the function."); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); prop= RNA_def_property(srna, "phase_offset", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_text(prop, "Phase Offset", "Constant factor to offset time by for function."); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); prop= RNA_def_property(srna, "value_offset", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_text(prop, "Value Offset", "Constant factor to offset values by."); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); /* flags */ prop= RNA_def_property(srna, "additive", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE); RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them."); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); prop= RNA_def_property(srna, "function_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_ui_text(prop, "Type", "Type of built-in function to use."); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); }
static void rna_def_header(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; PropertyRNA *parm; FunctionRNA *func; srna = RNA_def_struct(brna, "Header", NULL); RNA_def_struct_ui_text(srna, "Header", "Editor header containing UI elements"); RNA_def_struct_sdna(srna, "Header"); RNA_def_struct_refine_func(srna, "rna_Header_refine"); RNA_def_struct_register_funcs(srna, "rna_Header_register", "rna_Header_unregister", NULL); RNA_def_struct_flag(srna, STRUCT_PUBLIC_NAMESPACE_INHERIT); /* draw */ func = RNA_def_function(srna, "draw", NULL); RNA_def_function_ui_description(func, "Draw UI elements into the header UI layout"); RNA_def_function_flag(func, FUNC_REGISTER); parm = RNA_def_pointer(func, "context", "Context", "", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_define_verify_sdna(0); /* not in sdna */ prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "layout"); RNA_def_property_struct_type(prop, "UILayout"); RNA_def_property_ui_text(prop, "Layout", "Structure of the header in the UI"); /* registration */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", "If this is set, the header gets a custom ID, otherwise it takes the " "name of the class used to define the panel; for example, if the " "class name is \"OBJECT_HT_hello\", and bl_idname is not set by the " "script, then bl_idname = \"OBJECT_HT_hello\""); prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); RNA_def_property_enum_items(prop, rna_enum_space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "Space type", "The space where the header is going to be used in"); RNA_define_verify_sdna(1); }
static void rna_def_boidrule(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; /* data */ srna = RNA_def_struct(brna, "BoidRule", NULL); RNA_def_struct_ui_text(srna, "Boid Rule", ""); RNA_def_struct_refine_func(srna, "rna_BoidRule_refine"); RNA_def_struct_path_func(srna, "rna_BoidRule_path"); /* strings */ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Name", "Boid rule name"); RNA_def_struct_name_property(srna, prop); /* enums */ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, boidrule_type_items); RNA_def_property_ui_text(prop, "Type", ""); /* flags */ prop = RNA_def_property(srna, "use_in_air", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_IN_AIR); RNA_def_property_ui_text(prop, "In Air", "Use rule when boid is flying"); RNA_def_property_update(prop, 0, "rna_Boids_reset"); prop = RNA_def_property(srna, "use_on_land", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_ON_LAND); RNA_def_property_ui_text(prop, "On Land", "Use rule when boid is on land"); RNA_def_property_update(prop, 0, "rna_Boids_reset"); /*prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); */ /*RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded); */ /*RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface"); */ /* types */ rna_def_boidrule_goal(brna); rna_def_boidrule_avoid(brna); rna_def_boidrule_avoid_collision(brna); rna_def_boidrule_follow_leader(brna); rna_def_boidrule_average_speed(brna); rna_def_boidrule_fight(brna); }
static void rna_def_property_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static const EnumPropertyItem prop_type_items[] = { {SENS_PROP_EQUAL, "PROPEQUAL", 0, "Equal", ""}, {SENS_PROP_NEQUAL, "PROPNEQUAL", 0, "Not Equal", ""}, {SENS_PROP_INTERVAL, "PROPINTERVAL", 0, "Interval", ""}, {SENS_PROP_CHANGED, "PROPCHANGED", 0, "Changed", ""}, /* {SENS_PROP_EXPRESSION, "PROPEXPRESSION", 0, "Expression", ""}, NOT_USED_IN_UI */ {SENS_PROP_LESSTHAN, "PROPLESSTHAN", 0, "Less Than", ""}, {SENS_PROP_GREATERTHAN, "PROPGREATERTHAN", 0, "Greater Than", ""}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "PropertySensor", "Sensor"); RNA_def_struct_ui_text(srna, "Property Sensor", "Sensor to detect values and changes in values of properties"); RNA_def_struct_sdna_from(srna, "bPropertySensor", "data"); prop = RNA_def_property(srna, "evaluation_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_ui_text(prop, "Evaluation Type", "Type of property evaluation"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_ui_text(prop, "Property", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "value", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "value"); RNA_def_property_ui_text(prop, "Value", "Check for this value in types in Equal, Not Equal, Less Than and Greater Than types"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "value_min", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "value"); RNA_def_property_ui_text(prop, "Minimum Value", "Minimum value in Interval type"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "value_max", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "maxvalue"); RNA_def_property_ui_text(prop, "Maximum Value", "Maximum value in Interval type"); RNA_def_property_update(prop, NC_LOGIC, NULL); }
/* helper function for Keying Set -> keying settings */ static void rna_def_common_keying_flags(StructRNA *srna, short reg) { PropertyRNA *prop; static EnumPropertyItem keying_flag_items[] = { {INSERTKEY_NEEDED, "INSERTKEY_NEEDED", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves"}, {INSERTKEY_MATRIX, "INSERTKEY_VISUAL", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'"}, {INSERTKEY_XYZ2RGB, "INSERTKEY_XYZ_TO_RGB", 0, "F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) " "and also Color is based on the transform axis"}, {0, NULL, 0, NULL, NULL}}; prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "keyingflag"); RNA_def_property_enum_items(prop, keying_flag_items); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG); RNA_def_property_ui_text(prop, "Options", "Keying set options"); }
static void rna_def_drivertarget(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; srna= RNA_def_struct(brna, "DriverTarget", NULL); RNA_def_struct_ui_text(srna, "Driver Target", "Variable from some source/target for driver relationship."); /* Variable Name */ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_struct_name_property(srna, prop); RNA_def_property_ui_text(prop, "Name", "Name to use in scripted expressions/functions. (No spaces or dots are allowed. Also, must not start with a symbol or digit)"); //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates /* Target Properties - ID-block to Drive */ prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "ID"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_editable_func(prop, "rna_DriverTarget_id_editable"); RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_DriverTarget_id_typef"); RNA_def_property_ui_text(prop, "ID", "ID-block that the specific property used can be found from"); //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idtype"); RNA_def_property_enum_items(prop, id_type_items); RNA_def_property_enum_default(prop, ID_OB); RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used."); //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates /* Target Properties - Property to Drive */ prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_DriverTarget_RnaPath_get", "rna_DriverTarget_RnaPath_length", "rna_DriverTarget_RnaPath_set"); RNA_def_property_ui_text(prop, "RNA Path", "RNA Path (from Object) to property used"); //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE); RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property used (if applicable)"); //RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates }
static void rna_def_histogram(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem prop_mode_items[] = { {HISTO_MODE_LUMA, "LUMA", ICON_COLOR, "Luma", ""}, {HISTO_MODE_RGB, "RGB", ICON_COLOR, "Red Green Blue", ""}, {HISTO_MODE_R, "R", ICON_COLOR, "Red", ""}, {HISTO_MODE_G, "G", ICON_COLOR, "Green", ""}, {HISTO_MODE_B, "B", ICON_COLOR, "Blue", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "Histogram", NULL); RNA_def_struct_ui_text(srna, "Histogram", "Statistical view of the levels of color in an image"); prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, prop_mode_items); RNA_def_property_ui_text(prop, "Mode", "Channels to display when drawing the histogram"); }
static void rna_def_armature_sensor(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem prop_type_items[] = { {SENS_ARM_STATE_CHANGED, "STATECHG", 0, "State Changed", ""}, {SENS_ARM_LIN_ERROR_BELOW, "LINERRORBELOW", 0, "Lin error below", ""}, {SENS_ARM_LIN_ERROR_ABOVE, "LINERRORABOVE", 0, "Lin error above", ""}, {SENS_ARM_ROT_ERROR_BELOW, "ROTERRORBELOW", 0, "Rot error below", ""}, {SENS_ARM_ROT_ERROR_ABOVE, "ROTERRORABOVE", 0, "Rot error above", ""}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "ArmatureSensor", "Sensor"); RNA_def_struct_ui_text(srna, "Armature Sensor", "Sensor to detect values and changes in values of IK solver"); RNA_def_struct_sdna_from(srna, "bArmatureSensor", "data"); prop = RNA_def_property(srna, "test_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_ui_text(prop, "Test", "Type of value and test"); RNA_def_property_update(prop, NC_LOGIC, NULL); prop = RNA_def_property(srna, "bone", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "posechannel"); RNA_def_property_ui_text(prop, "Bone Name", "Identify the bone to check value from"); RNA_def_property_update(prop, NC_LOGIC, "rna_Sensor_Armature_update"); prop = RNA_def_property(srna, "constraint", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "constraint"); RNA_def_property_ui_text(prop, "Constraint Name", "Identify the bone constraint to check value from"); RNA_def_property_update(prop, NC_LOGIC, "rna_Sensor_Armature_update"); prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "value"); RNA_def_property_ui_text(prop, "Compare Value", "Value to be used in comparison"); RNA_def_property_update(prop, NC_LOGIC, NULL); }
static void rna_def_smoke_coll_settings(BlenderRNA *brna) { static EnumPropertyItem smoke_coll_type_items[] = { {SM_COLL_STATIC, "COLLSTATIC", 0, "Static", "Non moving obstacle"}, {SM_COLL_RIGID, "COLLRIGID", 0, "Rigid", "Rigid obstacle"}, {SM_COLL_ANIMATED, "COLLANIMATED", 0, "Animated", "Animated obstacle"}, {0, NULL, 0, NULL, NULL} }; StructRNA *srna; PropertyRNA *prop; srna = RNA_def_struct(brna, "SmokeCollSettings", NULL); RNA_def_struct_ui_text(srna, "Collision Settings", "Smoke collision settings"); RNA_def_struct_sdna(srna, "SmokeCollSettings"); RNA_def_struct_path_func(srna, "rna_SmokeCollSettings_path"); prop = RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, smoke_coll_type_items); RNA_def_property_ui_text(prop, "Collision type", "Collision type"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset"); }
static void rna_def_smoke_domain_settings(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem prop_noise_type_items[] = { {MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""}, #ifdef WITH_FFTW3 {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""}, #endif /* {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */ {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem smoke_cache_comp_items[] = { {SM_CACHE_LIGHT, "CACHELIGHT", 0, "Light", "Fast but not so effective compression"}, {SM_CACHE_HEAVY, "CACHEHEAVY", 0, "Heavy", "Effective but slow compression"}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem smoke_domain_colli_items[] = { {SM_BORDER_OPEN, "BORDEROPEN", 0, "Open", "Smoke doesn't collide with any border"}, {SM_BORDER_VERTICAL, "BORDERVERTICAL", 0, "Vertically Open", "Smoke doesn't collide with top and bottom sides"}, {SM_BORDER_CLOSED, "BORDERCLOSED", 0, "Collide All", "Smoke collides with every side"}, {0, NULL, 0, NULL, NULL}}; srna = RNA_def_struct(brna, "SmokeDomainSettings", NULL); RNA_def_struct_ui_text(srna, "Domain Settings", "Smoke domain settings"); RNA_def_struct_sdna(srna, "SmokeDomainSettings"); RNA_def_struct_path_func(srna, "rna_SmokeDomainSettings_path"); prop= RNA_def_property(srna, "resolution_max", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "maxres"); RNA_def_property_range(prop, 24, 512); RNA_def_property_ui_range(prop, 24, 512, 2, 0); RNA_def_property_ui_text(prop, "Max Res", "Maximal resolution used in the fluid domain"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "amplify", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "amplify"); RNA_def_property_range(prop, 1, 10); RNA_def_property_ui_range(prop, 1, 10, 1, 0); RNA_def_property_ui_text(prop, "Amplification", "Enhance the resolution of smoke by this factor using noise"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "use_high_resolution", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGHRES); RNA_def_property_ui_text(prop, "High res", "Enable high resolution (using amplification)"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "show_high_resolution", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_SHOWBIG); RNA_def_property_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification)"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noise"); RNA_def_property_enum_items(prop, prop_noise_type_items); RNA_def_property_ui_text(prop, "Noise Method", "Noise method which is used for creating the high resolution"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "alpha"); RNA_def_property_range(prop, -5.0, 5.0); RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5); RNA_def_property_ui_text(prop, "Density", "How much density effects smoke motion, higher value results in faster rising smoke"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "beta"); RNA_def_property_range(prop, -5.0, 5.0); RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5); RNA_def_property_ui_text(prop, "Heat", "How much heat effects smoke motion, higher value results in faster rising smoke"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "coll_group"); RNA_def_property_struct_type(prop, "Group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Collision Group", "Limit collisions to this group"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy"); prop= RNA_def_property(srna, "fluid_group", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "fluid_group"); RNA_def_property_struct_type(prop, "Group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Fluid Group", "Limit fluid objects to this group"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy"); prop= RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "eff_group"); RNA_def_property_struct_type(prop, "Group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this group"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy"); prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "strength"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_range(prop, 0.0, 10.0, 1, 2); RNA_def_property_ui_text(prop, "Strength", "Strength of noise"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "diss_speed"); RNA_def_property_range(prop, 1.0, 10000.0); RNA_def_property_ui_range(prop, 1.0, 10000.0, 1, 0); RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE); RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time"); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "use_dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE_LOG); RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x "); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "point_cache[0]"); RNA_def_property_ui_text(prop, "Point Cache", ""); prop= RNA_def_property(srna, "point_cache_compress_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "cache_comp"); RNA_def_property_enum_items(prop, smoke_cache_comp_items); RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used"); prop= RNA_def_property(srna, "collision_extents", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "border_collisions"); RNA_def_property_enum_items(prop, smoke_domain_colli_items); RNA_def_property_ui_text(prop, "Border Collisions", "Selects which domain border will be treated as collision object."); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "EffectorWeights"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Effector Weights", ""); prop= RNA_def_property(srna, "smooth_emitter", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGH_SMOOTH); RNA_def_property_ui_text(prop, "Smooth Emitter", "Smoothens emitted smoke to avoid blockiness."); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "time_scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "time_scale"); RNA_def_property_range(prop, 0.2, 1.5); RNA_def_property_ui_range(prop, 0.2, 1.5, 0.02, 5); RNA_def_property_ui_text(prop, "Time Scale", "Adjust simulation speed."); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vorticity"); RNA_def_property_range(prop, 0.01, 4.0); RNA_def_property_ui_range(prop, 0.01, 4.0, 0.02, 5); RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence/rotation in fluid."); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); }
static void rna_def_lattice(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static EnumPropertyItem prop_keyblock_type_items[] = { {KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""}, {KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""}, {KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "Lattice", "ID"); RNA_def_struct_ui_text(srna, "Lattice", "Lattice datablock defining a grid for deforming other objects"); RNA_def_struct_ui_icon(srna, ICON_LATTICE_DATA); prop= RNA_def_property(srna, "points_u", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pntsu"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_u_set", NULL); RNA_def_property_range(prop, 1, 64); RNA_def_property_ui_text(prop, "U", "Points in U direction (can't be changed when there are shape keys)"); RNA_def_property_update(prop, 0, "rna_Lattice_update_size"); RNA_def_property_editable_func(prop, "rna_Lattice_size_editable"); prop= RNA_def_property(srna, "points_v", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pntsv"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_v_set", NULL); RNA_def_property_range(prop, 1, 64); RNA_def_property_ui_text(prop, "V", "Points in V direction (can't be changed when there are shape keys)"); RNA_def_property_update(prop, 0, "rna_Lattice_update_size"); RNA_def_property_editable_func(prop, "rna_Lattice_size_editable"); prop= RNA_def_property(srna, "points_w", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pntsw"); RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_w_set", NULL); RNA_def_property_range(prop, 1, 64); RNA_def_property_ui_text(prop, "W", "Points in W direction (can't be changed when there are shape keys)"); RNA_def_property_update(prop, 0, "rna_Lattice_update_size"); RNA_def_property_editable_func(prop, "rna_Lattice_size_editable"); prop= RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typeu"); RNA_def_property_enum_items(prop, prop_keyblock_type_items); RNA_def_property_ui_text(prop, "Interpolation Type U", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data"); prop= RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typev"); RNA_def_property_enum_items(prop, prop_keyblock_type_items); RNA_def_property_ui_text(prop, "Interpolation Type V", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data"); prop= RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "typew"); RNA_def_property_enum_items(prop, prop_keyblock_type_items); RNA_def_property_ui_text(prop, "Interpolation Type W", ""); RNA_def_property_update(prop, 0, "rna_Lattice_update_data"); prop= RNA_def_property(srna, "use_outside", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LT_OUTSIDE); RNA_def_property_boolean_funcs(prop, NULL, "rna_Lattice_use_outside_set"); RNA_def_property_ui_text(prop, "Outside", "Only draw, and take into account, the outer vertices"); RNA_def_property_update(prop, 0, "rna_Lattice_update_data"); prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "vgroup"); RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group to apply the influence of the lattice"); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Lattice_vg_name_set"); RNA_def_property_update(prop, 0, "rna_Lattice_update_data"); prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "key"); RNA_def_property_ui_text(prop, "Shape Keys", ""); prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "LatticePoint"); RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL); RNA_def_property_ui_text(prop, "Points", "Points of the lattice"); /* pointers */ rna_def_animdata_common(srna); }
static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) { PropertyRNA *prop; static const EnumPropertyItem prop_shadow_items[] = { {0, "NOSHADOW", 0, "No Shadow", ""}, {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"}, {0, NULL, 0, NULL, NULL} }; static const EnumPropertyItem prop_spot_shadow_items[] = { {0, "NOSHADOW", 0, "No Shadow", ""}, {LA_SHAD_BUF, "BUFFER_SHADOW", 0, "Buffer Shadow", "Let spotlight produce shadows using shadow buffer"}, {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"}, {0, NULL, 0, NULL, NULL} }; static const EnumPropertyItem prop_ray_sampling_method_items[] = { {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""}, {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""}, {0, NULL, 0, NULL, NULL} }; static const EnumPropertyItem prop_spot_ray_sampling_method_items[] = { {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""}, {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""}, {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""}, {0, NULL, 0, NULL, NULL} }; static const EnumPropertyItem prop_shadbuftype_items[] = { {LA_SHADBUF_REGULAR, "REGULAR", 0, "Classical", "Classic shadow buffer"}, {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing " "bias artifacts"}, {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"}, {LA_SHADBUF_DEEP, "DEEP", 0, "Deep", "Deep shadow buffer supports transparency and better filtering, at the cost of " "more memory usage and processing time"}, {0, NULL, 0, NULL, NULL} }; static const EnumPropertyItem prop_shadbuffiltertype_items[] = { {LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"}, {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"}, {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"}, {0, NULL, 0, NULL, NULL} }; static const EnumPropertyItem prop_numbuffer_items[] = { {1, "BUFFERS_1", 0, "1", "Only one buffer rendered"}, {4, "BUFFERS_4", 0, "4", "Render 4 buffers for better AA, this quadruples memory usage"}, {9, "BUFFERS_9", 0, "9", "Render 9 buffers for better AA, this uses nine times more memory"}, {0, NULL, 0, NULL, NULL} }; /* GE only */ static const EnumPropertyItem prop_ge_shadowbuffer_type_items[] = { {LA_SHADMAP_SIMPLE, "SIMPLE", 0, "Simple", "Simple shadow maps"}, {LA_SHADMAP_VARIANCE, "VARIANCE", 0, "Variance", "Variance shadow maps"}, {0, NULL, 0, NULL, NULL} }; prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_use_shadow_get", "rna_use_shadow_set"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, (spot) ? prop_spot_shadow_items : prop_shadow_items); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "bufsize"); RNA_def_property_range(prop, 128, 10240); RNA_def_property_ui_text(prop, "Shadow Buffer Size", "Resolution of the shadow buffer, higher values give crisper shadows " "but use more memory"); RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "filtertype"); RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items); RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "buffers"); RNA_def_property_enum_items(prop, prop_numbuffer_items); RNA_def_property_ui_text(prop, "Shadow Sample Buffers", "Number of shadow buffers to render for better AA, this increases memory usage"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "clipsta"); RNA_def_property_range(prop, 0.0f, 9999.0f); RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start", "Shadow map clip start, below which objects will not generate shadows"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "clipend"); RNA_def_property_range(prop, 0.0f, 9999.0f); RNA_def_property_ui_text(prop, "Shadow Buffer Clip End", "Shadow map clip end, beyond which objects will not generate shadows"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "bias"); RNA_def_property_range(prop, 0.001f, 5.0f); RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_buffer_bleed_bias", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "bleedbias"); RNA_def_property_range(prop, 0.f, 1.f); RNA_def_property_ui_text(prop, "Shadow Buffer Bleed Bias", "Bias for reducing light-bleed on variance shadow maps"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "soft"); RNA_def_property_range(prop, 0.0f, 100.0f); RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "samp"); RNA_def_property_range(prop, 1, 16); RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "buftype"); RNA_def_property_enum_items(prop, prop_shadbuftype_items); RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "ge_shadow_buffer_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "shadowmap_type"); RNA_def_property_enum_items(prop, prop_ge_shadowbuffer_type_items); RNA_def_property_ui_text(prop, "Shadow Map Type", "The shadow mapping algorithm used"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "use_auto_clip_start", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START); RNA_def_property_ui_text(prop, "Autoclip Start", "Automatic calculation of clipping-start, based on visible vertices"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "use_auto_clip_end", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END); RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices"); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "compressthresh"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "shdwr"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the lamp"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW); RNA_def_property_ui_text(prop, "Only Shadow", "Cast shadows only, without illuminating objects"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_ray_sample_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ray_samp_method"); RNA_def_property_enum_items(prop, (area) ? prop_spot_ray_sampling_method_items : prop_ray_sampling_method_items); RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method", "Method for generating shadow samples: Adaptive QMC is fastest, " "Constant QMC is less noisy but slower"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, (area) ? "shadow_ray_samples_x" : "shadow_ray_samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ray_samp"); RNA_def_property_range(prop, 1, 64); RNA_def_property_ui_text(prop, (area) ? "Shadow Ray Samples" : "Shadow Ray Samples X", "Number of samples taken extra (samples x samples)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); if (area) { prop = RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ray_sampy"); RNA_def_property_range(prop, 1, 64); RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Number of samples taken extra (samples x samples)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); } prop = RNA_def_property(srna, "shadow_adaptive_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "adapt_thresh"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "area_size"); RNA_def_property_range(prop, 0.0f, FLT_MAX); RNA_def_property_ui_range(prop, 0, 100, 0.1, 3); RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows)"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); prop = RNA_def_property(srna, "use_shadow_layer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER_SHADOW); RNA_def_property_ui_text(prop, "Shadow Layer", "Objects on the same layers only cast shadows"); RNA_def_property_update(prop, 0, "rna_Lamp_update"); }
static void rna_def_lamp_sky_settings(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; static const EnumPropertyItem prop_skycolorspace_items[] = { {0, "SMPTE", 0, "SMPTE", ""}, {1, "REC709", 0, "REC709", ""}, {2, "CIE", 0, "CIE", ""}, {0, NULL, 0, NULL, NULL} }; srna = RNA_def_struct(brna, "LampSkySettings", NULL); RNA_def_struct_sdna(srna, "Lamp"); RNA_def_struct_nested(brna, srna, "SunLamp"); RNA_def_struct_ui_text(srna, "Lamp Sky Settings", "Sky related settings for a sun lamp"); prop = RNA_def_property(srna, "sky_color_space", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "sky_colorspace"); RNA_def_property_enum_items(prop, prop_skycolorspace_items); RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "skyblendtype"); RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items); RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); /* Number values */ prop = RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 20.0f); RNA_def_property_ui_text(prop, "Horizon Brightness", "Horizon brightness"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Horizon Spread", "Horizon Spread"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Sun Brightness", "Sun brightness"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Sun Size", "Sun size"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, -1.0f, 1.0f); RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered light"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_text(prop, "Sun Intensity", "Sun intensity"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "atm_turbidity"); RNA_def_property_range(prop, 1.0f, 30.0f); RNA_def_property_ui_range(prop, 2.0f, 10.0f, 1, 2); RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky turbidity"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "atmosphere_inscattering", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "atm_inscattering_factor"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Atmosphere Inscatter", "Scatter contribution factor"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "atmosphere_extinction", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "atm_extinction_factor"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Atmosphere Extinction", "Extinction scattering contribution factor"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "atmosphere_distance_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "atm_distance_factor"); RNA_def_property_range(prop, 0.0f, 500.0f); RNA_def_property_ui_text(prop, "Atmosphere Distance Factor", "Multiplier to convert blender units to physical distance"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "sky_blend", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "skyblendfac"); RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "Sky Blend", "Blend factor with sky"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0f, 20.0f); RNA_def_property_ui_text(prop, "Sky Exposure", "Strength of sky shading exponential exposure correction"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); /* boolean */ prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY); RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); prop = RNA_def_property(srna, "use_atmosphere", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP); RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on atmosphere"); RNA_def_property_update(prop, 0, "rna_Lamp_sky_update"); }