Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_lamp.c
| Show First 20 Lines • Show All 532 Lines • ▼ Show 20 Lines | RNA_def_property_ui_text(prop, "Shadow Buffer Size", | ||||
| "Resolution of the shadow buffer, higher values give crisper shadows " | "Resolution of the shadow buffer, higher values give crisper shadows " | ||||
| "but use more memory"); | "but use more memory"); | ||||
| RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL); | RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL); | ||||
| RNA_def_property_update(prop, 0, "rna_Lamp_update"); | RNA_def_property_update(prop, 0, "rna_Lamp_update"); | ||||
| prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "filtertype"); | RNA_def_property_enum_sdna(prop, NULL, "filtertype"); | ||||
| RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items); | 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_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)"); | ||||
sybren: I don't like properties that are only explained in terms of what they do //not// do. Better use… | |||||
Not Done Inline ActionsEhh, link a BGE python function in the description ?? panzergame: Ehh, link a BGE python function in the description ?? | |||||
| RNA_def_property_update(prop, 0, "rna_Lamp_update"); | RNA_def_property_update(prop, 0, "rna_Lamp_update"); | ||||
| prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "buffers"); | RNA_def_property_enum_sdna(prop, NULL, "buffers"); | ||||
| RNA_def_property_enum_items(prop, prop_numbuffer_items); | RNA_def_property_enum_items(prop, prop_numbuffer_items); | ||||
| RNA_def_property_ui_text(prop, "Shadow Sample Buffers", | RNA_def_property_ui_text(prop, "Shadow Sample Buffers", | ||||
| "Number of shadow buffers to render for better AA, this increases memory usage"); | "Number of shadow buffers to render for better AA, this increases memory usage"); | ||||
| RNA_def_property_update(prop, 0, "rna_Lamp_update"); | RNA_def_property_update(prop, 0, "rna_Lamp_update"); | ||||
| ▲ Show 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | static void rna_def_sun_lamp(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Frustum Size", "Size of the frustum used for creating the shadow map"); | RNA_def_property_ui_text(prop, "Frustum Size", "Size of the frustum used for creating the shadow map"); | ||||
| RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); | RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); | ||||
| prop = RNA_def_property(srna, "show_shadow_box", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_shadow_box", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHOW_SHADOW_BOX); | RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHOW_SHADOW_BOX); | ||||
| RNA_def_property_ui_text(prop, "Show Shadow Box", | RNA_def_property_ui_text(prop, "Show Shadow Box", | ||||
| "Draw a box in 3D view to visualize which objects are contained in it"); | "Draw a box in 3D view to visualize which objects are contained in it"); | ||||
| RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); | RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); | ||||
| prop = RNA_def_property(srna, "static_shadow", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_STATIC_SHADOW); | |||||
| RNA_def_property_ui_text(prop, "Static Shadow", | |||||
| "Don't re-update shadow during game"); | |||||
| } | } | ||||
| static void rna_def_hemi_lamp(BlenderRNA *brna) | static void rna_def_hemi_lamp(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| srna = RNA_def_struct(brna, "HemiLamp", "Lamp"); | srna = RNA_def_struct(brna, "HemiLamp", "Lamp"); | ||||
| RNA_def_struct_sdna(srna, "Lamp"); | RNA_def_struct_sdna(srna, "Lamp"); | ||||
| Show All 16 Lines | |||||
I don't like properties that are only explained in terms of what they do not do. Better use something like "Enable static shadows, which are only updated when updateShadow() is called".