diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_action.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_fluid.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 47 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 12 |
8 files changed, 77 insertions, 21 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index e0f3aff6364..b2d02600124 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -4654,8 +4654,8 @@ static const char *cpp_classes = " operator void*() { return ptr.data; }\n" " operator bool() { return ptr.data != NULL; }\n" "\n" - " bool operator==(const Pointer &other) { return ptr.data == other.ptr.data; }\n" - " bool operator!=(const Pointer &other) { return ptr.data != other.ptr.data; }\n" + " bool operator==(const Pointer &other) const { return ptr.data == other.ptr.data; }\n" + " bool operator!=(const Pointer &other) const { return ptr.data != other.ptr.data; }\n" "\n" " PointerRNA ptr;\n" "};\n" diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 8dd6e6982dd..33f9b2da280 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -5832,7 +5832,7 @@ ID *RNA_find_real_ID_and_path(Main *bmain, ID *id, const char **r_path) *r_path = ""; } - if ((id != NULL) && (id->flag & LIB_PRIVATE_DATA)) { + if ((id != NULL) && (id->flag & LIB_EMBEDDED_DATA)) { switch (GS(id->name)) { case ID_NT: if (r_path) { diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 436e847b044..c85a94d9fc2 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -583,15 +583,6 @@ static void rna_def_dopesheet(BlenderRNA *brna) prop, "Display Movie Clips", "Include visualization of movie clip related animation data"); RNA_def_property_ui_icon(prop, ICON_TRACKER, 0); RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); - - /* GPencil Mode Settings */ - prop = RNA_def_property(srna, "show_gpencil_3d_only", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_GP_3DONLY); - RNA_def_property_ui_text(prop, - "Active Scene Only", - "Only show Grease Pencil data-blocks used as part of the active scene"); - RNA_def_property_ui_icon(prop, ICON_SCENE_DATA, 0); - RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); } static void rna_def_action_group(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index 38ba7bcb047..7bd353cd441 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -720,7 +720,7 @@ static void rna_FluidModifier_color_grid_get(PointerRNA *ptr, float *values) manta_smoke_turbulence_get_rgba(mds->fluid, values, 0); } else { - manta_smoke_turbulence_get_rgba_from_density(mds->fluid, mds->active_color, values, 0); + manta_smoke_turbulence_get_rgba_fixed_color(mds->fluid, mds->active_color, values, 0); } } else { @@ -728,7 +728,7 @@ static void rna_FluidModifier_color_grid_get(PointerRNA *ptr, float *values) manta_smoke_get_rgba(mds->fluid, values, 0); } else { - manta_smoke_get_rgba_from_density(mds->fluid, mds->active_color, values, 0); + manta_smoke_get_rgba_fixed_color(mds->fluid, mds->active_color, values, 0); } } } diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 396c5a4e854..6440b140183 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -5178,6 +5178,30 @@ static void rna_def_modifier_ocean(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem spectrum_items[] = { + {MOD_OCEAN_SPECTRUM_PHILLIPS, + "PHILLIPS", + 0, + "Turbulent Ocean", + "Use for turbulent seas with foam"}, + {MOD_OCEAN_SPECTRUM_PIERSON_MOSKOWITZ, + "PIERSON_MOSKOWITZ", + 0, + "Established Ocean", + "Use for a large area, established ocean (Pierson-Moskowitz method)"}, + {MOD_OCEAN_SPECTRUM_JONSWAP, + "JONSWAP", + 0, + "Established Ocean (Sharp Peaks)", + "Use for sharp peaks ('JONSWAP', Pierson-Moskowitz method) with peak sharpening"}, + {MOD_OCEAN_SPECTRUM_TEXEL_MARSEN_ARSLOE, + "TEXEL_MARSEN_ARSLOE", + 0, + "Shallow Water", + "Use for shallow water ('JONSWAP', 'TMA' - Texel-Marsen-Arsloe method)"}, + {0, NULL, 0, NULL, NULL}, + }; + srna = RNA_def_struct(brna, "OceanModifier", "Modifier"); RNA_def_struct_ui_text(srna, "Ocean Modifier", "Simulate an ocean surface"); RNA_def_struct_sdna(srna, "OceanModifierData"); @@ -5324,6 +5348,29 @@ static void rna_def_modifier_ocean(BlenderRNA *brna) RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, -1); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "spectrum", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "spectrum"); + RNA_def_property_enum_items(prop, spectrum_items); + RNA_def_property_ui_text(prop, "Spectrum", "Spectrum to use"); + RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update"); + + prop = RNA_def_property(srna, "fetch_jonswap", PROP_FLOAT, PROP_UNSIGNED); + RNA_def_property_float_sdna(prop, NULL, "fetch_jonswap"); + RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_text( + prop, + "Fetch", + "This is the distance from a lee shore, " + "called the fetch, or the distance over which the wind blows with constant velocity. " + "Used by 'JONSWAP' and 'TMA' models"); + RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update"); + + prop = RNA_def_property(srna, "sharpen_peak_jonswap", PROP_FLOAT, PROP_UNSIGNED); + RNA_def_property_float_sdna(prop, NULL, "sharpen_peak_jonswap"); + RNA_def_property_range(prop, 0.0, 10.0); + RNA_def_property_ui_text(prop, "Sharpen peak", "Peak sharpening for 'JONSWAP' and 'TMA' models"); + RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update"); + prop = RNA_def_property(srna, "random_seed", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "seed"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 9aeaf4e83dd..3747dd53b97 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -188,9 +188,9 @@ static void rna_ParticleHairKey_location_object_info(PointerRNA *ptr, * not a very efficient way of getting hair key location data, * but it's the best we've got at the present * - * IDEAS: include additional information in pointerRNA beforehand, - * for example a pointer to the ParticleStstemModifierData to which the - * hairkey belongs. + * IDEAS: include additional information in PointerRNA beforehand, + * for example a pointer to the ParticleSystemModifierData to which the + * hair-key belongs. */ for (md = ob->modifiers.first; md; md = md->next) { @@ -199,9 +199,9 @@ static void rna_ParticleHairKey_location_object_info(PointerRNA *ptr, if (psmd && psmd->mesh_final && psmd->psys) { psys = psmd->psys; for (i = 0, pa = psys->particles; i < psys->totpart; i++, pa++) { - /* hairkeys are stored sequentially in memory, so we can + /* Hair-keys are stored sequentially in memory, so we can * find if it's the same particle by comparing pointers, - * without having to iterate over them all */ + * without having to iterate over them all. */ if ((hkey >= pa->hair) && (hkey < pa->hair + pa->totkey)) { *psmd_pt = psmd; *pa_pt = pa; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 27d742fd33c..f974d5c563f 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -4018,6 +4018,16 @@ void rna_def_view_layer_common(StructRNA *srna, const bool scene) RNA_def_property_clear_flag(prop, PROP_EDITABLE); } + prop = RNA_def_property(srna, "use_volumes", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_VOLUMES); + RNA_def_property_ui_text(prop, "Volumes", "Render volumes in this Layer"); + if (scene) { + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + } + else { + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + } + /* passes */ prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index ac0376c72af..a153c1dda1e 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5040,8 +5040,16 @@ static void rna_def_userdef_system(BlenderRNA *brna) {2048, "SAMPLES_2048", 0, "2048 Samples", "Set audio mixing buffer size to 2048 samples"}, {4096, "SAMPLES_4096", 0, "4096 Samples", "Set audio mixing buffer size to 4096 samples"}, {8192, "SAMPLES_8192", 0, "8192 Samples", "Set audio mixing buffer size to 8192 samples"}, - {16384, "SAMPLES_16384", 0, "16384 Samples", "Set audio mixing buffer size to 16384 samples"}, - {32768, "SAMPLES_32768", 0, "32768 Samples", "Set audio mixing buffer size to 32768 samples"}, + {16384, + "SAMPLES_16384", + 0, + "16384 Samples", + "Set audio mixing buffer size to 16384 samples"}, + {32768, + "SAMPLES_32768", + 0, + "32768 Samples", + "Set audio mixing buffer size to 32768 samples"}, {0, NULL, 0, NULL, NULL}, }; |