Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_modifier.c
| Show First 20 Lines • Show All 2,093 Lines • ▼ Show 20 Lines | static EnumPropertyItem prop_direction_items[] = { | ||||
| {MOD_DISP_DIR_NOR, "NORMAL", 0, "Normal", | {MOD_DISP_DIR_NOR, "NORMAL", 0, "Normal", | ||||
| "Use the texture's intensity value to displace along the vertex normal"}, | "Use the texture's intensity value to displace along the vertex normal"}, | ||||
| {MOD_DISP_DIR_CLNOR, "CUSTOM_NORMAL", 0, "Custom Normal", | {MOD_DISP_DIR_CLNOR, "CUSTOM_NORMAL", 0, "Custom Normal", | ||||
| "Use the texture's intensity value to displace along the (averaged) custom normal (falls back to vertex)"}, | "Use the texture's intensity value to displace along the (averaged) custom normal (falls back to vertex)"}, | ||||
| {MOD_DISP_DIR_RGB_XYZ, "RGB_TO_XYZ", 0, "RGB to XYZ", | {MOD_DISP_DIR_RGB_XYZ, "RGB_TO_XYZ", 0, "RGB to XYZ", | ||||
| "Use the texture's RGB values to displace the mesh in the XYZ direction"}, | "Use the texture's RGB values to displace the mesh in the XYZ direction"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static EnumPropertyItem prop_space_items[] = { | |||||
| {MOD_DISP_SPACE_LOCAL, "LOCAL", 0, "Local", "Direction is defined in local coordinates"}, | |||||
| {MOD_DISP_SPACE_GLOBAL, "GLOBAL", 0, "Global", "Direction is defined in global coordinates"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| srna = RNA_def_struct(brna, "DisplaceModifier", "Modifier"); | srna = RNA_def_struct(brna, "DisplaceModifier", "Modifier"); | ||||
| RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier"); | RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier"); | ||||
| RNA_def_struct_sdna(srna, "DisplaceModifierData"); | RNA_def_struct_sdna(srna, "DisplaceModifierData"); | ||||
| RNA_def_struct_ui_icon(srna, ICON_MOD_DISPLACE); | RNA_def_struct_ui_icon(srna, ICON_MOD_DISPLACE); | ||||
| prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); | RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); | ||||
| RNA_def_property_ui_text(prop, "Vertex Group", | RNA_def_property_ui_text(prop, "Vertex Group", | ||||
| Show All 14 Lines | static void rna_def_modifier_displace(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Strength", "Amount to displace geometry"); | RNA_def_property_ui_text(prop, "Strength", "Amount to displace geometry"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, prop_direction_items); | RNA_def_property_enum_items(prop, prop_direction_items); | ||||
| RNA_def_property_ui_text(prop, "Direction", ""); | RNA_def_property_ui_text(prop, "Direction", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, prop_space_items); | |||||
| RNA_def_property_ui_text(prop, "Space", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); | |||||
brecht: I would make this a "space" enum, and have "Local" and "Global" items. No need for a cryptic… | |||||
| rna_def_modifier_generic_map_info(srna); | rna_def_modifier_generic_map_info(srna); | ||||
| } | } | ||||
| static void rna_def_modifier_uvproject(BlenderRNA *brna) | static void rna_def_modifier_uvproject(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 2,658 Lines • Show Last 20 Lines | |||||
I would make this a "space" enum, and have "Local" and "Global" items. No need for a cryptic "L" label.