diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-07-14 03:23:06 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-07-14 03:23:06 +0400 |
commit | 065605e0da8ecd7add39f159db624ae9063ec476 (patch) | |
tree | 46cb2051e28dcef4a04a998e2d9ef82a7b36ecfa /source/blender/makesrna | |
parent | b7b50298148ef502d14143b0a5fa01dfac2ecce4 (diff) | |
parent | 807ad1f0e0de49711d58ade2b660e74ec5452b2b (diff) |
Merged changes in the trunk up to revision 48893.
Conflicts resolved:
source/blender/blenkernel/CMakeLists.txt
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_filter.c
source/blender/makesrna/RNA_enum_types.h
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/RNA_enum_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 11 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 47 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 20 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 8 |
8 files changed, 81 insertions, 12 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index d237fb5abd1..ac1dd3e74b4 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -679,6 +679,7 @@ StructRNA *RNA_struct_find(const char *identifier); const char *RNA_struct_identifier(StructRNA *type); const char *RNA_struct_ui_name(StructRNA *type); const char *RNA_struct_ui_description(StructRNA *type); +const char *RNA_struct_translation_context(StructRNA *type); int RNA_struct_ui_icon(StructRNA *type); PropertyRNA *RNA_struct_name_property(StructRNA *type); @@ -744,6 +745,7 @@ int RNA_property_string_maxlength(PropertyRNA *prop); const char *RNA_property_ui_name(PropertyRNA *prop); const char *RNA_property_ui_description(PropertyRNA *prop); +const char *RNA_property_translation_context(PropertyRNA *prop); int RNA_property_ui_icon(PropertyRNA *prop); /* Dynamic Property Information */ diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index 6f024cde1d0..c722e6fa5ab 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -127,6 +127,8 @@ extern EnumPropertyItem ramp_blend_items[]; extern EnumPropertyItem prop_dynamicpaint_type_items[]; +extern EnumPropertyItem clip_editor_mode_items[]; + extern EnumPropertyItem linestyle_color_modifier_type_items[]; extern EnumPropertyItem linestyle_alpha_modifier_type_items[]; extern EnumPropertyItem linestyle_thickness_modifier_type_items[]; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index c8ca0be8ab7..8e9c0dbc4c4 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -527,6 +527,11 @@ const char *RNA_struct_ui_description(StructRNA *type) return TIP_(type->description); } +const char *RNA_struct_translation_context(StructRNA *type) +{ + return type->translation_context ? type->translation_context : BLF_I18NCONTEXT_DEFAULT; +} + PropertyRNA *RNA_struct_name_property(StructRNA *type) { return type->nameproperty; @@ -1363,6 +1368,12 @@ const char *RNA_property_ui_description(PropertyRNA *prop) return rna_ensure_property_description(prop); } +const char *RNA_property_translation_context(PropertyRNA *_prop) +{ + PropertyRNA *prop = rna_ensure_property(_prop); + return prop->translation_context ? prop->translation_context : BLF_I18NCONTEXT_DEFAULT; +} + int RNA_property_ui_icon(PropertyRNA *prop) { return rna_ensure_property(prop)->icon; diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index ec03d452b57..fe18e6254d0 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -36,6 +36,8 @@ #include "BLO_sys_types.h" +#include "BLI_utildefines.h" + #include "BKE_mesh.h" #include "ED_mesh.h" diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index a39c168c594..a72059063fd 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1191,6 +1191,11 @@ static void def_math(StructRNA *srna) RNA_def_property_enum_items(prop, node_math_items); RNA_def_property_ui_text(prop, "Operation", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "custom2", 1); + RNA_def_property_ui_text(prop, "Clamp", "Clamp result of the node to 0..1 range"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void def_vector_math(StructRNA *srna) @@ -1272,6 +1277,11 @@ static void def_mix_rgb(StructRNA *srna) RNA_def_property_boolean_sdna(prop, NULL, "custom2", 1); RNA_def_property_ui_text(prop, "Alpha", "Include alpha of second input in this operation"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "custom2", 2); + RNA_def_property_ui_text(prop, "Clamp", "Clamp result of the node to 0..1 range"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void def_texture(StructRNA *srna) @@ -3580,7 +3590,13 @@ static void def_cmp_keying(StructRNA *srna) prop = RNA_def_property(srna, "despill_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "despill_factor"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Despill", "Factor of despilling screen color from image"); + RNA_def_property_ui_text(prop, "Despill Factor", "Factor of despilling screen color from image"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "despill_balance", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "despill_balance"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Despill Balance", "Balance between non-key colors used to detect amount of key color to be removed"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "clip_black", PROP_FLOAT, PROP_FACTOR); @@ -3638,6 +3654,35 @@ static void def_cmp_keying(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +static void def_cmp_trackpos(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "id"); + RNA_def_property_struct_type(prop, "MovieClip"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Movie Clip", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1); + RNA_def_property_ui_text(prop, "Relative", "Return relative position to first track's marker"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + RNA_def_struct_sdna_from(srna, "NodeTrackPosData", "storage"); + + prop = RNA_def_property(srna, "tracking_object", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "tracking_object"); + RNA_def_property_ui_text(prop, "Tracking Object", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "track_name", PROP_STRING, PROP_NONE); + RNA_def_property_string_sdna(prop, NULL, "track_name"); + RNA_def_property_ui_text(prop, "Track", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); +} + /* -- Texture Nodes --------------------------------------------------------- */ static void def_tex_output(StructRNA *srna) diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h index 5ebaddda043..a4837a88b17 100644 --- a/source/blender/makesrna/intern/rna_nodetree_types.h +++ b/source/blender/makesrna/intern/rna_nodetree_types.h @@ -170,6 +170,7 @@ DefNode( CompositorNode, CMP_NODE_COLORCORRECTION,def_cmp_colorcorrection,"COLOR DefNode( CompositorNode, CMP_NODE_MASK, def_cmp_mask, "MASK", Mask, "Mask", "" ) DefNode( CompositorNode, CMP_NODE_KEYINGSCREEN, def_cmp_keyingscreen, "KEYINGSCREEN", KeyingScreen, "KeyingScreen", "" ) DefNode( CompositorNode, CMP_NODE_KEYING, def_cmp_keying, "KEYING", Keying, "Keying", "" ) +DefNode( CompositorNode, CMP_NODE_TRACKPOS, def_cmp_trackpos, "TRACKPOS", TrackPos, "Track Position", "" ) DefNode( TextureNode, TEX_NODE_OUTPUT, def_tex_output, "OUTPUT", Output, "Output", "" ) DefNode( TextureNode, TEX_NODE_CHECKER, 0, "CHECKER", Checker, "Checker", "" ) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index d5bac7a8c26..4473a9ef0f6 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -118,6 +118,15 @@ EnumPropertyItem viewport_shade_items[] = { {0, NULL, 0, NULL, NULL} }; +EnumPropertyItem clip_editor_mode_items[] = { + {SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"}, + {SC_MODE_RECONSTRUCTION, "RECONSTRUCTION", ICON_SNAP_FACE, "Reconstruction", + "Show tracking/reconstruction tools"}, + {SC_MODE_DISTORTION, "DISTORTION", ICON_GRID, "Distortion", "Show distortion tools"}, + {SC_MODE_MASKEDIT, "MASKEDIT", ICON_MOD_MASK, "Mask editing", "Show mask editing tools"}, + {0, NULL, 0, NULL, NULL} +}; + #ifdef RNA_RUNTIME #include "DNA_anim_types.h" @@ -3011,15 +3020,6 @@ static void rna_def_space_clip(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem mode_items[] = { - {SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"}, - {SC_MODE_RECONSTRUCTION, "RECONSTRUCTION", ICON_SNAP_FACE, "Reconstruction", - "Show tracking/reconstruction tools"}, - {SC_MODE_DISTORTION, "DISTORTION", ICON_GRID, "Distortion", "Show distortion tools"}, - {SC_MODE_MASKEDIT, "MASKEDIT", ICON_MOD_MASK, "Mask editing", "Show mask editing tools"}, - {0, NULL, 0, NULL, NULL} - }; - static EnumPropertyItem view_items[] = { {SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"}, {SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"}, @@ -3086,7 +3086,7 @@ static void rna_def_space_clip(BlenderRNA *brna) /* mode */ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); - RNA_def_property_enum_items(prop, mode_items); + RNA_def_property_enum_items(prop, clip_editor_mode_items); RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_clip_mode_update"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b4703c06eb7..0948438abc8 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2986,6 +2986,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) static EnumPropertyItem language_items[] = { { 0, "", 0, N_("Nearly done"), ""}, { 0, "DEFAULT", 0, "Default (Default)", ""}, + {21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"}, { 1, "ENGLISH", 0, "English (English)", "en_US"}, { 8, "FRENCH", 0, "French (Français)", "fr_FR"}, { 4, "ITALIAN", 0, "Italian (Italiano)", "it_IT"}, @@ -2997,7 +2998,6 @@ static void rna_def_userdef_system(BlenderRNA *brna) {18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"}, { 0, "", 0, N_("In progress"), ""}, /* using the utf8 flipped form of Arabic (العربية) */ - {21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"}, {22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"}, {10, "CATALAN", 0, "Catalan (Català)", "ca_AD"}, {16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"}, @@ -3520,6 +3520,12 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) "startup, addons & modules (requires restart)"); /* TODO, editing should reset sys.path! */ + prop = RNA_def_property(srna, "i18n_branches_directory", PROP_STRING, PROP_DIRPATH); + RNA_def_property_string_sdna(prop, NULL, "i18ndir"); + RNA_def_property_ui_text(prop, "Translation Branches Directory", + "The path to the '/branches' directory of your local svn-translation copy, " + "to allow translating from the UI"); + prop = RNA_def_property(srna, "sound_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "sounddir"); RNA_def_property_ui_text(prop, "Sounds Directory", "The default directory to search for sounds"); |