From b1543f07bf1e135dc6f99567175e728fda6c4726 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 24 Feb 2013 15:40:28 +0000 Subject: =?UTF-8?q?Another=20bunch=20of=20UI=20translation=20fixes,=20than?= =?UTF-8?q?ks=20to=20Leon=20Cheung,=20Gabriel=20Gazz=C3=A1n=20and=20S.=20L?= =?UTF-8?q?ockal=20for=20spotting=20them!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/blender/makesrna/intern/rna_particle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index d6f3f594395..4bf5de03b05 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -2892,7 +2892,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_float_funcs(prop, "rna_PartSetting_linelentail_get", "rna_PartSetting_linelentail_set", NULL); RNA_def_property_range(prop, 0.0f, 100000.0f); RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3); - RNA_def_property_ui_text(prop, "Back", "Length of the line's tail"); + RNA_def_property_ui_text(prop, "Tail", "Length of the line's tail"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); prop = RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE); -- cgit v1.2.3 From c13453add36c9e143ac3bc0df721c154a96ffbf9 Mon Sep 17 00:00:00 2001 From: Sergej Reich Date: Sun, 24 Feb 2013 15:53:30 +0000 Subject: rigidbody: Allow collision groups to be animated --- source/blender/makesrna/intern/rna_rigidbody.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index f5cf247b5a1..b6c9f987941 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -234,6 +234,20 @@ static void rna_RigidBodyOb_collision_margin_set(PointerRNA *ptr, float value) #endif } +static void rna_RigidBodyOb_collision_groups_set(PointerRNA *ptr, const int *values) +{ + RigidBodyOb *rbo = (RigidBodyOb *)ptr->data; + int i; + + for (i = 0; i < 20; i++) { + if (values[i]) + rbo->col_groups |= (1 << i); + else + rbo->col_groups &= ~(1 << i); + } + rbo->flag |= RBO_FLAG_NEEDS_VALIDATE; +} + static void rna_RigidBodyOb_kinematic_state_set(PointerRNA *ptr, int value) { RigidBodyOb *rbo = (RigidBodyOb *)ptr->data; @@ -812,6 +826,7 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) prop = RNA_def_property(srna, "collision_groups", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "col_groups", 1); RNA_def_property_array(prop, 20); + RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyOb_collision_groups_set"); RNA_def_property_ui_text(prop, "Collision Groups", "Collision Groups Rigid Body belongs to"); RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset"); RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); -- cgit v1.2.3 From b2dcaf1b40c975812094707d6e79ccd238e7b422 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 24 Feb 2013 18:04:10 +0000 Subject: Some UI messages fixes... --- source/blender/makesrna/intern/rna_rigidbody.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index b6c9f987941..171bc702bc5 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -964,13 +964,13 @@ static void rna_def_rigidbody_constraint(BlenderRNA *brna) prop = RNA_def_property(srna, "use_motor_lin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", RBC_FLAG_USE_MOTOR_LIN); RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyCon_use_motor_lin_set"); - RNA_def_property_ui_text(prop, "Linear Motor", "Enables linear motor"); + RNA_def_property_ui_text(prop, "Linear Motor", "Enable linear motor"); RNA_def_property_update(prop, NC_OBJECT, "rna_RigidBodyOb_reset"); prop = RNA_def_property(srna, "use_motor_ang", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", RBC_FLAG_USE_MOTOR_ANG); RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyCon_use_motor_ang_set"); - RNA_def_property_ui_text(prop, "Angular Motor", "Enables angular motor"); + RNA_def_property_ui_text(prop, "Angular Motor", "Enable angular motor"); RNA_def_property_update(prop, NC_OBJECT, "rna_RigidBodyOb_reset"); prop = RNA_def_property(srna, "limit_lin_x_lower", PROP_FLOAT, PROP_UNIT_LENGTH); -- cgit v1.2.3 From 5be99abb85d26f5b9ee36b09b8694486dc9e1345 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 25 Feb 2013 19:16:04 +0000 Subject: Some minor UI messages fixes. --- source/blender/makesrna/intern/rna_scene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index a9d1f6e0f34..bca52c877f3 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1530,8 +1530,8 @@ static void rna_def_tool_settings(BlenderRNA *brna) static EnumPropertyItem draw_groupuser_items[] = { {OB_DRAW_GROUPUSER_NONE, "NONE", 0, "None", ""}, - {OB_DRAW_GROUPUSER_ACTIVE, "ACTIVE", 0, "Active", "Show vertices with no weights in the actuve group"}, - {OB_DRAW_GROUPUSER_ALL, "ALL", 0, "All", "Show vertices with no weights in the any group"}, + {OB_DRAW_GROUPUSER_ACTIVE, "ACTIVE", 0, "Active", "Show vertices with no weights in the active group"}, + {OB_DRAW_GROUPUSER_ALL, "ALL", 0, "All", "Show vertices with no weights in any group"}, {0, NULL, 0, NULL, NULL} }; -- cgit v1.2.3 From 0ec75be1c6c166d97dfb713169e381977df1da21 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 26 Feb 2013 11:46:38 +0000 Subject: Camera tracking: support refining radial K1, K2 only This commits adds extra refirenment entry in the menu which is "K1, K2" and which will apparently refine only this distortion coefficients. This would be useful in cases when you know for sure focal length (which could be obtained from lens, EXIF and so) but not sure about how good you manual calibration is. Be careful tho, there're no internal constraints on this coefficients so distortion model could just screw up into insane values. --- source/blender/makesrna/intern/rna_tracking.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index cd646f4849c..798395b9fef 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -579,6 +579,9 @@ static void rna_def_trackingSettings(BlenderRNA *brna) {REFINE_FOCAL_LENGTH | REFINE_PRINCIPAL_POINT, "FOCAL_LENGTH_PRINCIPAL_POINT", 0, "Focal Length, Optical Center", "Refine focal length and optical center"}, + {REFINE_RADIAL_DISTORTION_K1 | + REFINE_RADIAL_DISTORTION_K2, "RADIAL_K1_K2", 0, "K1, K2", + "Refine radial distortion K1 and K2"}, {0, NULL, 0, NULL, NULL} }; -- cgit v1.2.3 From 4f3ca854e1e25d855c7c2b8f6458edd6aae385c5 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 26 Feb 2013 21:58:06 +0000 Subject: Fix various warnings with clang build, and adjust cmake clang warnings flags to include a few more that gcc is using too. --- source/blender/makesrna/intern/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 7b6fb30d692..7621ebb70b3 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -277,6 +277,9 @@ add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC}) target_link_libraries(makesrna bf_dna) target_link_libraries(makesrna bf_dna_blenlib) +# too many warnings with clang +remove_cc_flag("-Wmissing-prototypes") + # Output rna_*_gen.c # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes add_custom_command( -- cgit v1.2.3 From 3d7867d7f0955cb856c28425e52b18d1a1925d1e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 27 Feb 2013 10:26:58 +0000 Subject: Added RGBA|RGB channels toggle to sequencer preview Main purpose of this is to be more compatible with older versions of blender (before alpha cleanup) where sequencer used to display premultiplied image on an straight opengl viewport. Now sequencer preview would behave closer to image editor However adding Alpha and R|G|B displays is not so simple because sequencer is using 2D textures. Would be nice to implement this options as well, but this is not so much important IMO. This hall fix - #34453: VSE: Subtract function does not work properly TODO: Make RGBA display default for our startup.blend --- source/blender/makesrna/intern/rna_space.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0ab74fb617f..6db863a267b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2248,6 +2248,13 @@ static void rna_def_space_sequencer(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; + static EnumPropertyItem preview_channels_items[] = { + {SEQ_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", + "Draw image with RGB colors and alpha transparency"}, + {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"}, + {0, NULL, 0, NULL, NULL} + }; + srna = RNA_def_struct(brna, "SpaceSequenceEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceSeq"); RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data"); @@ -2265,7 +2272,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_enum_items(prop, display_mode_items); RNA_def_property_ui_text(prop, "Display Mode", "View mode to use for displaying sequencer output"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - + /* flags */ prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_NO_DRAW_CFRANUM); @@ -2310,7 +2317,13 @@ static void rna_def_space_sequencer(BlenderRNA *brna) "The channel number shown in the image preview. 0 is the result of all strips combined"); RNA_def_property_range(prop, -5, MAXSEQ); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - + + prop = RNA_def_property(srna, "preview_channels", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); + RNA_def_property_enum_items(prop, preview_channels_items); + RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the preview to draw"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); + prop = RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "zebra"); RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes"); -- cgit v1.2.3 From debc3ac91072b1fb8814629fa6545734cc5d90e3 Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Wed, 27 Feb 2013 13:53:43 +0000 Subject: Collada export: Add ngon support (initial) --- source/blender/makesrna/intern/rna_scene_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index b0df27b957b..b3619330e7a 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -111,6 +111,7 @@ static void rna_Scene_collada_export( int include_material_textures, int use_texture_copies, + int use_ngons, int use_object_instantiation, int sort_by_name, int second_life) @@ -118,7 +119,7 @@ static void rna_Scene_collada_export( collada_export(scene, filepath, apply_modifiers, export_mesh_type, selected, include_children, include_armatures, include_shapekeys, deform_bones_only, active_uv_only, include_uv_textures, include_material_textures, - use_texture_copies, use_object_instantiation, sort_by_name, second_life); + use_texture_copies, use_ngons, use_object_instantiation, sort_by_name, second_life); } #endif @@ -160,6 +161,7 @@ void RNA_api_scene(StructRNA *srna) parm = RNA_def_boolean(func, "include_material_textures", 0, "Include Material Textures", "Export textures assigned to the object Materials"); parm = RNA_def_boolean(func, "use_texture_copies", 0, "copy", "Copy textures to same folder where the .dae file is exported"); + parm = RNA_def_boolean(func, "use_ngons", 1, "Use NGons", "Keep NGons in Export"); parm = RNA_def_boolean(func, "use_object_instantiation", 1, "Use Object Instances", "Instantiate multiple Objects from same Data"); parm = RNA_def_boolean(func, "sort_by_name", 0, "Sort by Object name", "Sort exported data by Object name"); parm = RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life"); -- cgit v1.2.3 From 537c18a9ce7fa8614f02f3268794b45f697e3f62 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 28 Feb 2013 15:33:26 +0000 Subject: Fix #34414: python error with frame_change callback and Cycles motion blur. Now the RenderEngine.render callback allows writing blender data again, it should not be allowed but in practice the API and render threading code is too limited to make this work at the moment. --- source/blender/makesrna/intern/rna_render.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 5931440b422..e2e373d8beb 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -299,19 +299,19 @@ static void rna_def_render_engine(BlenderRNA *brna) /* final render callbacks */ func = RNA_def_function(srna, "update", NULL); RNA_def_function_ui_description(func, "Export scene data for render"); - RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); + RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL | FUNC_ALLOW_WRITE); RNA_def_pointer(func, "data", "BlendData", "", ""); RNA_def_pointer(func, "scene", "Scene", "", ""); func = RNA_def_function(srna, "render", NULL); RNA_def_function_ui_description(func, "Render scene into an image"); - RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); + RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL | FUNC_ALLOW_WRITE); RNA_def_pointer(func, "scene", "Scene", "", ""); /* viewport render callbacks */ func = RNA_def_function(srna, "view_update", NULL); RNA_def_function_ui_description(func, "Update on data changes for viewport render"); - RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); + RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL | FUNC_ALLOW_WRITE); RNA_def_pointer(func, "context", "Context", "", ""); func = RNA_def_function(srna, "view_draw", NULL); -- cgit v1.2.3 From 08f737c3b96d0f9233df768ec008585a9c7d2285 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 28 Feb 2013 15:33:29 +0000 Subject: Fix #34390: quicktime video codec menu showing blank. It's a small miracle that this code worked at all at some point. --- source/blender/makesrna/intern/rna_scene.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index bca52c877f3..e635280b07a 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -909,16 +909,13 @@ static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bCon EnumPropertyItem tmp = {0, "", 0, "", ""}; QuicktimeCodecTypeDesc *codecTypeDesc; int i = 1, totitem = 0; - char id[5]; - + for (i = 0; i < quicktime_get_num_videocodecs(); i++) { codecTypeDesc = quicktime_get_videocodecType_desc(i); if (!codecTypeDesc) break; - + tmp.value = codecTypeDesc->rnatmpvalue; - *((int *)id) = codecTypeDesc->codecType; - id[4] = 0; - tmp.identifier = id; + tmp.identifier = codecTypeDesc->codecName; tmp.name = codecTypeDesc->codecName; RNA_enum_item_add(&item, &totitem, &tmp); } -- cgit v1.2.3 From c0a3ebedb331f1a10b5ba56030327596a5435598 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 28 Feb 2013 16:37:15 +0000 Subject: Fix #34372: mesh.verts.foreach_set not working with normals, regression due to my bugfix for multidimensional arrays. --- source/blender/makesrna/intern/rna_access.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index adfb096b25f..d00a4832446 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -3196,18 +3196,16 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro return 0; } + /* check item array */ + itemlen = RNA_property_array_length(&itemptr, itemprop); + /* dynamic array? need to get length per item */ if (itemprop->getlength) { itemprop = NULL; } /* try to access as raw array */ else if (RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) { - int arraylen; - - /* check item array */ - itemlen = RNA_property_array_length(&itemptr, itemprop); - - arraylen = (itemlen == 0) ? 1 : itemlen; + int arraylen = (itemlen == 0) ? 1 : itemlen; if (in.len != arraylen * out.len) { BKE_reportf(reports, RPT_ERROR, "Array length mismatch (expected %d, got %d)", out.len * arraylen, in.len); -- cgit v1.2.3 From 2de9ce794015181c7c6ff9fdaddc166b067399db Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Mar 2013 06:17:59 +0000 Subject: keymap filter by keybindings in the userpreferences. - optional, select between name/keybinding. - when key input can't be parsed, alert red to give the user some feedback. - key shortcut parsing could be improved or swapped out for button which grabs shortcut. --- source/blender/makesrna/intern/rna_space.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 6db863a267b..1f2cf469c5e 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3054,13 +3054,24 @@ static void rna_def_space_info(BlenderRNA *brna) static void rna_def_space_userpref(BlenderRNA *brna) { + static EnumPropertyItem filter_type_items[] = { + {0, "NAME", 0, "Name", "Filter based on the operator name"}, + {1, "KEY", 0, "Key-Binding", "Filter based on key bindings"}, + {0, NULL, 0, NULL, NULL}}; + StructRNA *srna; PropertyRNA *prop; srna = RNA_def_struct(brna, "SpaceUserPreferences", "Space"); RNA_def_struct_sdna(srna, "SpaceUserPref"); RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data"); - + + prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "filter_type"); + RNA_def_property_enum_items(prop, filter_type_items); + RNA_def_property_ui_text(prop, "Filter Type", "Filter method"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); + prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "filter"); RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI"); -- cgit v1.2.3 From 0ac07404baf41aef65367395b86957ab1efa655f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Mar 2013 14:47:06 +0000 Subject: style cleanup: braces with multi-line statements, also add some comments. --- source/blender/makesrna/intern/rna_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index d00a4832446..6035326e0ae 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4864,7 +4864,7 @@ static char *rna_pointer_as_string__bldata(PointerRNA *ptr) } } -char *RNA_pointer_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop_ptr, PointerRNA *ptr_prop) +char *RNA_pointer_as_string(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *prop_ptr, PointerRNA *ptr_prop) { if (RNA_property_flag(prop_ptr) & PROP_IDPROPERTY) { return rna_pointer_as_string__idprop(C, ptr_prop); -- cgit v1.2.3 From f186f89a42575622a9939a6fbe3f240d2a1ba85a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 1 Mar 2013 15:37:15 +0000 Subject: Fix #34461: Inconsistent behavior of "Color Mix Node" and "Alpha Over Node" Added compatibility option "Straight Alpha Output" to image input node When this option is enabled, image input node will convert float buffer to straight alpha. This is not what you'll usually want with new alpha pipeline, nit this is needed to preserve compatibility with older files saved in 2.65. In that version byte image are resulting with straight alpha passing to the compositor and alpha-overing required extra premultiplication of inputs. So, that's why Straight Alpha Output is needed -- it's set in versioning code for byte node images so they'll still output straight alpha. This option is currently only available in N-panel. Additional change: added Alpha Mode for image input node to N-panel. --- source/blender/makesrna/intern/rna_nodetree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 1fff567f25c..73fe5f3a48d 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2412,7 +2412,12 @@ static void def_cmp_image(StructRNA *srna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Image", ""); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); - + + prop = RNA_def_property(srna, "use_straight_alpha_output", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_NODE_IMAGE_USE_STRAIGHT_OUTPUT); + RNA_def_property_ui_text(prop, "Straight Alpha Output", "Put Node output buffer to straight alpha instead of premultiplied"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + /* NB: image user properties used in the UI are redefined in def_node_image_user, * to trigger correct updates of the node editor. RNA design problem that prevents * updates from nested structs ... -- cgit v1.2.3