diff options
author | Julian Eisel <julian@blender.org> | 2020-06-13 23:54:26 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-06-13 23:54:26 +0300 |
commit | d73920831de0a87faa0c91261dc2ff8d07913318 (patch) | |
tree | bcb91622191aed07d196fbb368661a73e14ecfeb /source/blender/makesrna | |
parent | 9dffdfc84b8139b8148b18c25245c3b697995d2b (diff) | |
parent | 5e50380ddc99dd8c8c8067482b2dce186e7c3fb4 (diff) |
Merge branch 'asset-uuid' into asset-engine
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_cloth.c | 32 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 36 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 16 |
4 files changed, 76 insertions, 17 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 9da21aed9da..7c84ceb4f7f 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -1464,7 +1464,6 @@ static void rna_def_ID_override_library_property(BlenderRNA *brna) static void rna_def_ID_override_library(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna = RNA_def_struct(brna, "IDOverrideLibrary", NULL); RNA_def_struct_ui_text( @@ -1473,14 +1472,6 @@ static void rna_def_ID_override_library(BlenderRNA *brna) RNA_def_pointer( srna, "reference", "ID", "Reference ID", "Linked ID used as reference by this override"); - prop = RNA_def_boolean( - srna, - "auto_generate", - true, - "Auto Generate Override", - "Automatically generate overriding operations by detecting changes in properties"); - RNA_def_property_boolean_sdna(prop, NULL, "flag", OVERRIDE_LIBRARY_AUTO); - RNA_def_collection(srna, "properties", "IDOverrideLibraryProperty", diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index 70f219259ef..594b77ea1ad 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -975,8 +975,10 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "use_pressure_volume", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_PRESSURE_VOL); - RNA_def_property_ui_text( - prop, "Use Custom Volume", "Use the Volume parameter as the initial volume"); + RNA_def_property_ui_text(prop, + "Use Custom Volume", + "Use the Target Volume parameter as the initial volume, instead " + "of calculating it from the mesh itself"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, 0, "rna_cloth_update"); @@ -984,10 +986,10 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "uniform_pressure_force"); RNA_def_property_range(prop, -10000.0f, 10000.0f); RNA_def_property_float_default(prop, 0.0f); - RNA_def_property_ui_text( - prop, - "Pressure", - "The uniform pressure that is constantly applied to the mesh. Can be negative"); + RNA_def_property_ui_text(prop, + "Pressure", + "The uniform pressure that is constantly applied to the mesh, in units " + "of Pressure Scale. Can be negative"); RNA_def_property_update(prop, 0, "rna_cloth_update"); prop = RNA_def_property(srna, "target_volume", PROP_FLOAT, PROP_NONE); @@ -997,14 +999,28 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Target Volume", "The mesh volume where the inner/outer pressure will be the same. If " - "set to zero the volume will not contribute to the total pressure"); + "set to zero the change in volume will not affect pressure"); RNA_def_property_update(prop, 0, "rna_cloth_update"); prop = RNA_def_property(srna, "pressure_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "pressure_factor"); RNA_def_property_range(prop, 0.0f, 10000.0f); RNA_def_property_float_default(prop, 1.0f); - RNA_def_property_ui_text(prop, "Pressure Scale", "Air pressure scaling factor"); + RNA_def_property_ui_text(prop, + "Pressure Scale", + "Ambient pressure (kPa) that balances out between the inside and " + "outside of the object when it has the target volume"); + RNA_def_property_update(prop, 0, "rna_cloth_update"); + + prop = RNA_def_property(srna, "fluid_density", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "fluid_density"); + RNA_def_property_ui_range(prop, -2.0f, 2.0f, 0.05f, 4); + RNA_def_property_ui_text( + prop, + "Fluid Density", + "Density (kg/l) of the fluid contained inside the object, used to create " + "a hydrostatic pressure gradient simulating the weight of the internal fluid, " + "or buoyancy from the surrounding fluid if negative"); RNA_def_property_update(prop, 0, "rna_cloth_update"); prop = RNA_def_property(srna, "vertex_group_pressure", PROP_STRING, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index a52811a9a9a..c707ad9b84e 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -76,6 +76,35 @@ static EnumPropertyItem rna_enum_gpencil_onion_modes_items[] = { {0, NULL, 0, NULL, NULL}, }; +static const EnumPropertyItem rna_enum_keyframe_type_items[] = { + {BEZT_KEYTYPE_KEYFRAME, + "KEYFRAME", + ICON_KEYTYPE_KEYFRAME_VEC, + "Keyframe", + "Normal keyframe - e.g. for key poses"}, + {BEZT_KEYTYPE_BREAKDOWN, + "BREAKDOWN", + ICON_KEYTYPE_BREAKDOWN_VEC, + "Breakdown", + "A breakdown pose - e.g. for transitions between key poses"}, + {BEZT_KEYTYPE_MOVEHOLD, + "MOVING_HOLD", + ICON_KEYTYPE_MOVING_HOLD_VEC, + "Moving Hold", + "A keyframe that is part of a moving hold"}, + {BEZT_KEYTYPE_EXTREME, + "EXTREME", + ICON_KEYTYPE_EXTREME_VEC, + "Extreme", + "An 'extreme' pose, or some other purpose as needed"}, + {BEZT_KEYTYPE_JITTER, + "JITTER", + ICON_KEYTYPE_JITTER_VEC, + "Jitter", + "A filler or baked keyframe for keying on ones, or some other purpose as needed"}, + {0, NULL, 0, NULL, NULL}, +}; + static const EnumPropertyItem rna_enum_onion_keyframe_type_items[] = { {-1, "ALL", ICON_ACTION, "All Types", "Include all Keyframe types"}, {BEZT_KEYTYPE_KEYFRAME, @@ -1324,6 +1353,13 @@ static void rna_def_gpencil_frame(BlenderRNA *brna) RNA_def_property_range(prop, -MAXFRAME, MAXFRAME); RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears"); + prop = RNA_def_property(srna, "keyframe_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "key_type"); + RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); + RNA_def_property_enum_items(prop, rna_enum_keyframe_type_items); + RNA_def_property_ui_text(prop, "Keyframe Type", "Type of keyframe"); + RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); + /* Flags */ prop = RNA_def_property(srna, "is_edited", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna( diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index c5781175d65..093fd8b3bd5 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -1174,6 +1174,22 @@ void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "tag", "rna_Main_libraries_tag"); parm = RNA_def_boolean(func, "value", 0, "Value", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + + func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + RNA_def_function_ui_description(func, "Remove a camera from the current blendfile"); + parm = RNA_def_pointer(func, "library", "Library", "", "Library to remove"); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); + RNA_def_boolean( + func, "do_unlink", true, "", "Unlink all usages of this library before deleting it"); + RNA_def_boolean(func, + "do_id_user", + true, + "", + "Decrement user counter of all datablocks used by this object"); + RNA_def_boolean( + func, "do_ui_user", true, "", "Make sure interface does not reference this object"); } void RNA_def_main_screens(BlenderRNA *brna, PropertyRNA *cprop) |