diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-06-24 14:29:26 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-06-24 14:29:26 +0400 |
commit | 1f7ae143a29b090ed97cdd7eb47a9c2dbd7f72a2 (patch) | |
tree | fff560080a8bbf37ee087653df1b8a30173537b1 /source/blender/makesrna | |
parent | d38ba6b5d25ca42f76b6d1b746217a565f26228f (diff) | |
parent | 74c9c24d273863319a55c18234e03b7d27a43a87 (diff) |
Merged changes in the trunk up to revision 48227.
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_file/filelist.c
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_enum_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 44 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mask.c | 46 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_movieclip.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 46 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree_types.h | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 40 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 20 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_smoke.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 3 |
13 files changed, 189 insertions, 55 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index d4138267041..7151c260942 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -41,6 +41,7 @@ extern EnumPropertyItem object_mode_items[]; extern EnumPropertyItem metaelem_type_items[]; extern EnumPropertyItem proportional_falloff_items[]; +extern EnumPropertyItem proportional_falloff_curve_only_items[]; extern EnumPropertyItem proportional_editing_items[]; extern EnumPropertyItem snap_target_items[]; extern EnumPropertyItem snap_element_items[]; diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 1596e4573ab..315eaaac20e 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -136,6 +136,8 @@ static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float * static char *rna_ColorRamp_path(PointerRNA *ptr) { + char *path = NULL; + /* handle the cases where a single datablock may have 2 ramp types */ if (ptr->id.data) { ID *id = ptr->id.data; @@ -146,11 +148,39 @@ static char *rna_ColorRamp_path(PointerRNA *ptr) Material *ma = (Material *)id; if (ptr->data == ma->ramp_col) - return BLI_strdup("diffuse_ramp"); + path = BLI_strdup("diffuse_ramp"); else if (ptr->data == ma->ramp_spec) - return BLI_strdup("specular_ramp"); + path = BLI_strdup("specular_ramp"); + break; } - break; + + case ID_NT: + { + bNodeTree *ntree = (bNodeTree *)id; + bNode *node; + PointerRNA node_ptr; + char *node_path; + + for (node = ntree->nodes.first; node; node = node->next) { + if (ELEM3(node->type, SH_NODE_VALTORGB, CMP_NODE_VALTORGB, TEX_NODE_VALTORGB)) { + if (node->storage == ptr->data) { + /* all node color ramp properties called 'color_ramp' + * prepend path from ID to the node + */ + RNA_pointer_create(id, &RNA_Node, node, &node_ptr); + node_path = RNA_path_from_ID_to_struct(&node_ptr); + path = BLI_sprintfN("%s.color_ramp", node_path); + MEM_freeN(node_path); + } + } + } + break; + } + + default: + /* everything else just uses 'color_ramp' */ + path = BLI_strdup("color_ramp"); + break; case ID_LS: { @@ -161,9 +191,12 @@ static char *rna_ColorRamp_path(PointerRNA *ptr) break; } } + else { + /* everything else just uses 'color_ramp' */ + path = BLI_strdup("color_ramp"); + } - /* everything else just uses 'color_ramp' */ - return BLI_strdup("color_ramp"); + return path; } static char *rna_ColorRampElement_path(PointerRNA *ptr) @@ -213,7 +246,6 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) } break; - /* TODO: node trees need special attention */ case ID_NT: { bNodeTree *ntree = (bNodeTree *)id; diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index dfcbbe0653b..51dfa020bea 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -50,9 +50,13 @@ #ifdef RNA_RUNTIME #include "DNA_mask_types.h" +#include "DNA_movieclip_types.h" #include "BKE_depsgraph.h" #include "BKE_mask.h" +#include "BKE_tracking.h" + +#include "BLI_math.h" #include "RNA_access.h" @@ -66,6 +70,40 @@ static void rna_Mask_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin DAG_id_tag_update( &mask->id, 0); } +static void rna_Mask_update_parent(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + MaskParent *parent = ptr->data; + + if (parent->id) { + if (GS(parent->id->name) == ID_MC) { + MovieClip *clip = (MovieClip *) parent->id; + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *object = BKE_tracking_object_get_named(tracking, parent->parent); + + if (object) { + MovieTrackingTrack *track = BKE_tracking_track_get_named(tracking, object, parent->sub_parent); + + if (track) { + int clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, scene->r.cfra); + MovieTrackingMarker *marker = BKE_tracking_marker_get(track, clip_framenr); + float marker_pos_ofs[2], parmask_pos[2]; + MovieClipUser user = {0}; + + BKE_movieclip_user_set_frame(&user, scene->r.cfra); + + add_v2_v2v2(marker_pos_ofs, marker->pos, track->offset); + + BKE_mask_coord_from_movieclip(clip, &user, parmask_pos, marker_pos_ofs); + + copy_v2_v2(parent->parent_orig, parmask_pos); + } + } + } + } + + rna_Mask_update_data(bmain, scene, ptr); +} + /* note: this function exists only to avoid id refcounting */ static void rna_MaskParent_id_set(PointerRNA *ptr, PointerRNA value) { @@ -357,7 +395,7 @@ static void rna_def_maskParent(BlenderRNA *brna) /* 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_data"); + 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"); @@ -366,19 +404,19 @@ static void rna_def_maskParent(BlenderRNA *brna) 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_data"); + 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_data"); + 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_data"); + RNA_def_property_update(prop, 0, "rna_Mask_update_parent"); } static void rna_def_maskSplinePointUW(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index 2a12fa8b116..573e27b52c2 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -289,13 +289,15 @@ static void rna_def_movieclip(BlenderRNA *brna) /* start_frame */ prop = RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "start_frame"); - RNA_def_property_ui_text(prop, "Start Frame", "Global scene frame number at which this movie starts playing. Affects all data associated with a clip"); + RNA_def_property_ui_text(prop, "Start Frame", "Global scene frame number at which this movie starts playing " + "(affects all data associated with a clip)"); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update"); /* frame_offset */ prop = RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "frame_offset"); - RNA_def_property_ui_text(prop, "Frame Offset", "Offset of footage first frame relative to it's file name. Affects only how footage is loaing, not changes data associated with a clip"); + RNA_def_property_ui_text(prop, "Frame Offset", "Offset of footage first frame relative to it's file name " + "(affects only how footage is loading, does not change data associated with a clip)"); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update"); } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 683a49a7690..baf3ccf35e1 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2049,10 +2049,11 @@ static void def_cmp_dilate_erode(StructRNA *srna) PropertyRNA *prop; static EnumPropertyItem type_items[] = { - {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""}, + {CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""}, {CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""}, {CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""}, - {0, NULL, 0, NULL, NULL} + {CMP_NODE_DILATEERODE_DISTANCE_FEATHER,"FEATHER", 0, "Feather", ""}, + {0, NULL, 0, NULL, NULL} }; prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); @@ -2067,11 +2068,21 @@ static void def_cmp_dilate_erode(StructRNA *srna) RNA_def_property_ui_text(prop, "Distance", "Distance to grow/shrink (number of iterations)"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + /* CMP_NODE_DILATEERODE_DISTANCE_THRESH only */ prop = RNA_def_property(srna, "edge", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "custom3"); RNA_def_property_range(prop, -100, 100); RNA_def_property_ui_text(prop, "Edge", "Edge to inset"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + RNA_def_struct_sdna_from(srna, "NodeDilateErode", "storage"); + + /* CMP_NODE_DILATEERODE_DISTANCE_FEATHER only */ + prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "falloff"); + RNA_def_property_enum_items(prop, proportional_falloff_curve_only_items); + RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void def_cmp_scale(StructRNA *srna) @@ -2455,9 +2466,9 @@ static void def_cmp_id_mask(StructRNA *srna) RNA_def_property_ui_text(prop, "Index", "Pass index number to convert to alpha"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); - prop = RNA_def_property(srna, "use_smooth_mask", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom2", 0); - RNA_def_property_ui_text(prop, "Smooth Mask", "Apply an anti-aliasing filter to the mask"); + RNA_def_property_ui_text(prop, "Anti-Aliasing", "Apply an anti-aliasing filter to the mask"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } @@ -2561,15 +2572,9 @@ static void def_cmp_defocus(StructRNA *srna) prop = RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "preview", 1); - RNA_def_property_ui_text(prop, "Preview", "Enable sampling mode, useful for preview when using low samplecounts"); + RNA_def_property_ui_text(prop, "Preview", "Enable low quality mode, useful for preview"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); - - prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "samples"); - RNA_def_property_range(prop, 16, 256); - RNA_def_property_ui_text(prop, "Samples", "Number of samples (16=grainy, higher=less noise)"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); - + prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "no_zbuf", 1); RNA_def_property_ui_text(prop, "Use Z-Buffer", @@ -3114,16 +3119,21 @@ static void def_cmp_mask(StructRNA *srna) { PropertyRNA *prop; - prop = RNA_def_property(srna, "smooth_mask", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "custom1", 0); - RNA_def_property_ui_text(prop, "Anti-Alias", "Apply an anti-aliasing filter to the mask"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); - prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "id"); RNA_def_property_struct_type(prop, "Mask"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Mask", ""); + + prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_NODEFLAG_MASK_AA); + RNA_def_property_ui_text(prop, "Anti-Alias", "Apply an anti-aliasing filter to the mask"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "use_feather", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "custom1", CMP_NODEFLAG_MASK_NO_FEATHER); + RNA_def_property_ui_text(prop, "Feather", "Use feather information from the mask"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void dev_cmd_transform(StructRNA *srna) @@ -3601,7 +3611,7 @@ static void def_cmp_keying(StructRNA *srna) prop = RNA_def_property(srna, "edge_kernel_radius", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "edge_kernel_radius"); - RNA_def_property_range(prop, -100, 100); + RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "Edge Kernel Radius", "Radius of kernel used to detect whether pixel belongs to edge"); RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h index 62c3051727d..20f58f4d16e 100644 --- a/source/blender/makesrna/intern/rna_nodetree_types.h +++ b/source/blender/makesrna/intern/rna_nodetree_types.h @@ -161,11 +161,11 @@ DefNode( CompositorNode, CMP_NODE_MOVIECLIP, def_cmp_movieclip, "MOVIE DefNode( CompositorNode, CMP_NODE_TRANSFORM, dev_cmd_transform, "TRANSFORM", Transform, "Transform", "" ) DefNode( CompositorNode, CMP_NODE_STABILIZE2D, def_cmp_stabilize2d, "STABILIZE2D", Stabilize, "Stabilize 2D", "" ) DefNode( CompositorNode, CMP_NODE_MOVIEDISTORTION,def_cmp_moviedistortion,"MOVIEDISTORTION",MovieDistortion, "Movie Distortion", "" ) -DefNode( CompositorNode, CMP_NODE_MASK_BOX, def_cmp_boxmask, "BOXMASK" ,BoxMask, "Box mask", "" ) -DefNode( CompositorNode, CMP_NODE_MASK_ELLIPSE, def_cmp_ellipsemask, "ELLIPSEMASK" ,EllipseMask, "Ellipse mask", "" ) -DefNode( CompositorNode, CMP_NODE_BOKEHIMAGE, def_cmp_bokehimage, "BOKEHIMAGE" ,BokehImage, "Bokeh image", "" ) -DefNode( CompositorNode, CMP_NODE_BOKEHBLUR, def_cmp_bokehblur, "BOKEHBLUR" ,BokehBlur, "Bokeh Blur", "" ) -DefNode( CompositorNode, CMP_NODE_SWITCH, def_cmp_switch, "SWITCH" ,Switch, "Switch", "" ) +DefNode( CompositorNode, CMP_NODE_MASK_BOX, def_cmp_boxmask, "BOXMASK", BoxMask, "Box mask", "" ) +DefNode( CompositorNode, CMP_NODE_MASK_ELLIPSE, def_cmp_ellipsemask, "ELLIPSEMASK", EllipseMask, "Ellipse mask", "" ) +DefNode( CompositorNode, CMP_NODE_BOKEHIMAGE, def_cmp_bokehimage, "BOKEHIMAGE", BokehImage, "Bokeh image", "" ) +DefNode( CompositorNode, CMP_NODE_BOKEHBLUR, def_cmp_bokehblur, "BOKEHBLUR", BokehBlur, "Bokeh Blur", "" ) +DefNode( CompositorNode, CMP_NODE_SWITCH, def_cmp_switch, "SWITCH", Switch, "Switch", "" ) DefNode( CompositorNode, CMP_NODE_COLORCORRECTION,def_cmp_colorcorrection,"COLORCORRECTION",ColorCorrection, "ColorCorrection", "" ) DefNode( CompositorNode, CMP_NODE_MASK, def_cmp_mask, "MASK", Mask, "Mask", "" ) DefNode( CompositorNode, CMP_NODE_KEYINGSCREEN, def_cmp_keyingscreen, "KEYINGSCREEN", KeyingScreen, "KeyingScreen", "" ) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 3769b8d6c42..f3454285682 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -102,6 +102,16 @@ EnumPropertyItem proportional_falloff_items[] = { {0, NULL, 0, NULL, NULL} }; +/* subset of the enum - only curves, missing random and const */ +EnumPropertyItem proportional_falloff_curve_only_items[] = { + {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"}, + {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"}, + {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"}, + {PROP_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", "Sharp falloff"}, + {PROP_LIN, "LINEAR", ICON_LINCURVE, "Linear", "Linear falloff"}, + {0, NULL, 0, NULL, NULL} +}; + EnumPropertyItem proportional_editing_items[] = { {PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", "Proportional Editing disabled"}, diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 76366efe0d1..13b60498900 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -39,6 +39,7 @@ #include "DNA_scene_types.h" #include "BKE_utildefines.h" + #ifdef RNA_RUNTIME #include "BKE_animsys.h" @@ -88,17 +89,27 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name static void rna_Scene_collada_export( Scene *scene, const char *filepath, - int selected, int apply_modifiers, - int include_armatures, + int export_mesh_type, + + int selected, int include_children, + int include_armatures, + int deform_bones_only, + + int active_uv_only, + int include_uv_textures, + int include_material_textures, + int use_texture_copies, + int use_object_instantiation, - int sort_by_name, + int sort_by_name, int second_life) { - collada_export(scene, filepath, selected, apply_modifiers, - include_armatures, include_children, - use_object_instantiation, sort_by_name, second_life); + collada_export(scene, filepath, apply_modifiers, export_mesh_type, selected, + include_children, include_armatures, deform_bones_only, + active_uv_only, include_uv_textures, include_material_textures, + use_texture_copies, use_object_instantiation, sort_by_name, second_life); } #endif @@ -126,11 +137,20 @@ void RNA_api_scene(StructRNA *srna) parm = RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file"); RNA_def_property_flag(parm, PROP_REQUIRED); RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */ + parm = RNA_def_boolean(func, "apply_modifiers", 0, "Apply Modifiers", "Apply modifiers"); + parm = RNA_def_int(func, "export_mesh_type", 0, INT_MIN, INT_MAX, + "Resolution", "Modifier resolution for export", INT_MIN, INT_MAX); parm = RNA_def_boolean(func, "selected", 0, "Selection Only", "Export only selected elements"); - parm = RNA_def_boolean(func, "apply_modifiers", 0, "Apply Modifiers", "Apply modifiers (in Preview resolution)"); - parm = RNA_def_boolean(func, "include_armatures", 0, "Include Armatures", "Include armature(s) used by the exported objects"); - parm = RNA_def_boolean(func, "include_children", 0, "Include Children", "Include all children even if not selected"); - parm = RNA_def_boolean(func, "use_object_instantiation", 1, "Use Object Instantiation", "Instantiate multiple Objects from same Data"); + parm = RNA_def_boolean(func, "include_children", 0, "Include Children", "Export all children of selected objects (even if not selected)"); + parm = RNA_def_boolean(func, "include_armatures", 0, "Include Armatures", "Export related armatures (even if not selected)"); + parm = RNA_def_boolean(func, "deform_bones_only", 0, "Deform Bones only", "Only export deforming bones with armatures"); + + parm = RNA_def_boolean(func, "active_uv_only", 0, "Active UV Layer only", "Export only the active UV Layer"); + parm = RNA_def_boolean(func, "include_uv_textures", 0, "Include UV Textures", "Export textures assigned to the object UV maps"); + 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_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"); RNA_def_function_ui_description(func, "Export to collada file"); diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 71133634a96..6e5aa78b8bd 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -193,6 +193,16 @@ static void rna_def_area(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, 0, "rna_Area_type_update"); + prop = RNA_def_property(srna, "x", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "totrct.xmin"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "X Position", "The window relative vertical location of the area"); + + prop = RNA_def_property(srna, "y", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "totrct.ymin"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Y Position", "The window relative horizontal location of the area"); + 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); @@ -230,6 +240,16 @@ static void rna_def_region(BlenderRNA *brna) 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); diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index c0efff2d179..4224b3936c6 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -117,18 +117,18 @@ static int rna_SmokeModifier_density_get_length(PointerRNA *ptr, int length[RNA_ { SmokeDomainSettings *settings = (SmokeDomainSettings *)ptr->data; - if (settings->fluid) - { + if (settings->fluid) { float *density = smoke_get_density(settings->fluid); unsigned int size = settings->res[0] * settings->res[1] * settings->res[2]; - if(density) + if (density) length[0] = size; else length[0] = 0; } - else - length[0] = 0; // No smoke domain created yet + else { + length[0] = 0; /* No smoke domain created yet */ + } return length[0]; } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 30b06017568..661c7ba878c 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1036,7 +1036,7 @@ static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr, PointerRNA value) SpaceClip *sc = (SpaceClip *)(ptr->data); bScreen *screen = (bScreen *)ptr->id.data; - ED_space_clip_set(NULL, screen, sc, (MovieClip *)value.data); + ED_space_clip_set_clip(NULL, screen, sc, (MovieClip *)value.data); } static void rna_SpaceClipEditor_mask_set(PointerRNA *ptr, PointerRNA value) diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 85dee2617d8..801bec30ecf 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -780,21 +780,21 @@ static void rna_def_trackingCamera(BlenderRNA *brna) prop = RNA_def_property(srna, "k1", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "k1"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_range(prop, -10, 10, .1, 3); + RNA_def_property_ui_range(prop, -10, 10, 0.1, 3); RNA_def_property_ui_text(prop, "K1", "First coefficient of third order polynomial radial distortion"); RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, "rna_tracking_flushUpdate"); prop = RNA_def_property(srna, "k2", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "k2"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_range(prop, -10, 10, .1, 3); + RNA_def_property_ui_range(prop, -10, 10, 0.1, 3); RNA_def_property_ui_text(prop, "K2", "Second coefficient of third order polynomial radial distortion"); RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, "rna_tracking_flushUpdate"); prop = RNA_def_property(srna, "k3", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "k3"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_range(prop, -10, 10, .1, 3); + RNA_def_property_ui_range(prop, -10, 10, 0.1, 3); RNA_def_property_ui_text(prop, "K3", "Third coefficient of third order polynomial radial distortion"); RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, "rna_tracking_flushUpdate"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 26e241a0311..99d5d5ca462 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -144,7 +144,8 @@ static void rna_userdef_anisotropic_update(Main *bmain, Scene *scene, PointerRNA rna_userdef_update(bmain, scene, ptr); } -static void rna_userdef_gl_gpu_mipmaps(Main *bmain, Scene *scene, PointerRNA *ptr) { +static void rna_userdef_gl_gpu_mipmaps(Main *bmain, Scene *scene, PointerRNA *ptr) +{ GPU_set_gpu_mipmapping(U.use_gpu_mipmap); rna_userdef_update(bmain, scene, ptr); } |