[Bf-blender-cvs] [c2e8386464c] cycles_procedural_api: rename default_curves_radius default_radius
Kévin Dietrich
noreply at git.blender.org
Sun Dec 6 06:26:31 CET 2020
Commit: c2e8386464c8ea5ac7eed7bbc8f705b418491741
Author: Kévin Dietrich
Date: Sun Dec 6 05:43:12 2020 +0100
Branches: cycles_procedural_api
https://developer.blender.org/rBc2e8386464c8ea5ac7eed7bbc8f705b418491741
rename default_curves_radius default_radius
===================================================================
M intern/cycles/blender/blender_object.cpp
M intern/cycles/render/alembic.cpp
M intern/cycles/render/alembic.h
M source/blender/blenkernel/intern/cachefile.c
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/io/io_alembic.c
M source/blender/io/alembic/ABC_alembic.h
M source/blender/io/alembic/intern/abc_reader_curves.cc
M source/blender/io/alembic/intern/abc_reader_object.h
M source/blender/io/alembic/intern/alembic_capi.cc
M source/blender/makesdna/DNA_cachefile_types.h
M source/blender/makesrna/intern/rna_cachefile.c
===================================================================
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 56a261a1abc..9db513366d9 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -515,7 +515,7 @@ void BlenderSync::sync_procedural(BL::Object &b_ob,
}
procedural->set_frame_rate(b_scene.render().fps() / b_scene.render().fps_base());
- procedural->set_default_curves_radius(cache_file.default_curves_radius());
+ procedural->set_default_radius(cache_file.default_radius());
procedural->set_frame_offset(cache_file.frame_offset());
string absolute_path = blender_absolute_path(b_data, b_ob, b_mesh_cache.cache_file().filepath());
diff --git a/intern/cycles/render/alembic.cpp b/intern/cycles/render/alembic.cpp
index d27d41dd40b..52dfa273749 100644
--- a/intern/cycles/render/alembic.cpp
+++ b/intern/cycles/render/alembic.cpp
@@ -1121,7 +1121,7 @@ NODE_DEFINE(AlembicProcedural)
SOCKET_FLOAT(frame, "Frame", 1.0f);
SOCKET_FLOAT(frame_rate, "Frame Rate", 24.0f);
SOCKET_FLOAT(frame_offset, "Frame Offset", 0.0f);
- SOCKET_FLOAT(default_curves_radius, "Default Curve Radius", 0.01f);
+ SOCKET_FLOAT(default_radius, "Default Radius", 0.01f);
SOCKET_NODE_ARRAY(objects, "Objects", &AlembicObject::node_type);
@@ -1132,7 +1132,7 @@ AlembicProcedural::AlembicProcedural() : Procedural(node_type)
{
frame = 1.0f;
frame_rate = 24.0f;
- default_curves_radius = 0.01f;
+ default_radius = 0.01f;
objects_loaded = false;
scene_ = nullptr;
@@ -1510,8 +1510,8 @@ void AlembicProcedural::read_curves(Scene *scene,
ICurvesSchema schema = curves.getSchema();
- if (!abc_object->has_data_loaded() || default_curves_radius_is_modified() || abc_object->radius_scale_is_modified()) {
- abc_object->load_all_data(schema, progress, default_curves_radius);
+ if (!abc_object->has_data_loaded() || default_radius_is_modified() || abc_object->radius_scale_is_modified()) {
+ abc_object->load_all_data(schema, progress, default_radius);
}
CachedData &cached_data = abc_object->get_cached_data();
diff --git a/intern/cycles/render/alembic.h b/intern/cycles/render/alembic.h
index 54436f0bdd7..b2f6c485285 100644
--- a/intern/cycles/render/alembic.h
+++ b/intern/cycles/render/alembic.h
@@ -429,7 +429,7 @@ class AlembicProcedural : public Procedural {
/* Set the default radius to use for curves when the Alembic Curves Schemas do not have radius
* information. */
- NODE_SOCKET_API(float, default_curves_radius)
+ NODE_SOCKET_API(float, default_radius)
AlembicProcedural();
~AlembicProcedural();
diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c
index e541efef535..e3a70114aba 100644
--- a/source/blender/blenkernel/intern/cachefile.c
+++ b/source/blender/blenkernel/intern/cachefile.c
@@ -63,7 +63,7 @@ static void cache_file_init_data(ID *id)
BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(cache_file, id));
- cache_file->default_curves_radius = 0.01f;
+ cache_file->default_radius = 0.01f;
cache_file->scale = 1.0f;
cache_file->velocity_unit = CACHEFILE_VELOCITY_UNIT_SECOND;
BLI_strncpy(cache_file->velocity_name, ".velocities", sizeof(cache_file->velocity_name));
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 86534aac9b0..eae995ed22b 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -7242,7 +7242,7 @@ void uiTemplateCacheFile(uiLayout *layout,
uiItemR(layout, &fileptr, "velocity_name", 0, NULL, ICON_NONE);
uiItemR(layout, &fileptr, "velocity_unit", 0, NULL, ICON_NONE);
- uiItemR(layout, &fileptr, "default_curves_radius", 0, NULL, ICON_NONE);
+ uiItemR(layout, &fileptr, "default_radius", 0, NULL, ICON_NONE);
/* TODO: unused for now, so no need to expose. */
#if 0
diff --git a/source/blender/editors/io/io_alembic.c b/source/blender/editors/io/io_alembic.c
index 20aa7f6ac5e..bfe8f9582c7 100644
--- a/source/blender/editors/io/io_alembic.c
+++ b/source/blender/editors/io/io_alembic.c
@@ -596,7 +596,7 @@ static void ui_alembic_import_settings(uiLayout *layout, PointerRNA *imfptr)
uiItemR(col, imfptr, "validate_meshes", 0, NULL, ICON_NONE);
uiItemR(col, imfptr, "force_modifier", 0, NULL, ICON_NONE);
- uiItemR(box, imfptr, "default_curves_radius", 0, NULL, ICON_NONE);
+ uiItemR(box, imfptr, "default_radius", 0, NULL, ICON_NONE);
}
static void wm_alembic_import_draw(bContext *UNUSED(C), wmOperator *op)
@@ -632,7 +632,7 @@ static int wm_alembic_import_exec(bContext *C, wmOperator *op)
const bool validate_meshes = RNA_boolean_get(op->ptr, "validate_meshes");
const bool force_modifier = RNA_boolean_get(op->ptr, "force_modifier");
const bool as_background_job = RNA_boolean_get(op->ptr, "as_background_job");
- const float default_curves_radius = RNA_float_get(op->ptr, "default_curves_radius");
+ const float default_radius = RNA_float_get(op->ptr, "default_radius");
int offset = 0;
int sequence_len = 1;
@@ -660,7 +660,7 @@ static int wm_alembic_import_exec(bContext *C, wmOperator *op)
offset,
validate_meshes,
force_modifier,
- default_curves_radius,
+ default_radius,
as_background_job);
return as_background_job || ok ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
@@ -725,12 +725,12 @@ void WM_OT_alembic_import(wmOperatorType *ot)
RNA_def_float(
ot->srna,
- "default_curves_radius",
+ "default_radius",
0.01f,
0.0001f,
1000.0f,
"Curves Radius",
- "Value to use for defining the curves width when the curves do not have a property for it",
+ "Value to use for defining the radius of curves of points when then do not have a property for it",
0.0001f,
1000.0f);
diff --git a/source/blender/io/alembic/ABC_alembic.h b/source/blender/io/alembic/ABC_alembic.h
index b72cc5064d4..83a82e181c2 100644
--- a/source/blender/io/alembic/ABC_alembic.h
+++ b/source/blender/io/alembic/ABC_alembic.h
@@ -96,7 +96,7 @@ bool ABC_import(struct bContext *C,
int offset,
bool validate_meshes,
bool force_modifier,
- float default_curves_radius,
+ float default_radius,
bool as_background_job);
AbcArchiveHandle *ABC_create_handle(struct Main *bmain,
diff --git a/source/blender/io/alembic/intern/abc_reader_curves.cc b/source/blender/io/alembic/intern/abc_reader_curves.cc
index 422ba25d8f3..84b7c5a9e17 100644
--- a/source/blender/io/alembic/intern/abc_reader_curves.cc
+++ b/source/blender/io/alembic/intern/abc_reader_curves.cc
@@ -223,7 +223,7 @@ void AbcCurveReader::read_curve_sample(Curve *cu,
const bool do_radius = (radiuses != nullptr) && (radiuses->size() > 1);
float radius = (radiuses && radiuses->size() == 1) ? (*radiuses)[0] :
- m_settings->default_curves_radius;
+ m_settings->default_radius;
nu->type = CU_NURBS;
diff --git a/source/blender/io/alembic/intern/abc_reader_object.h b/source/blender/io/alembic/intern/abc_reader_object.h
index be33b11d414..10d95459509 100644
--- a/source/blender/io/alembic/intern/abc_reader_object.h
+++ b/source/blender/io/alembic/intern/abc_reader_object.h
@@ -53,7 +53,7 @@ struct ImportSettings {
bool validate_meshes;
bool force_modifier;
- float default_curves_radius;
+ float default_radius;
CacheFile *cache_file;
@@ -69,7 +69,7 @@ struct ImportSettings {
read_flag(0),
validate_meshes(false),
force_modifier(false),
- default_curves_radius(0.01f),
+ default_radius(0.01f),
cache_file(NULL)
{
}
diff --git a/source/blender/io/alembic/intern/alembic_capi.cc b/source/blender/io/alembic/intern/alembic_capi.cc
index db7ce6fc8db..a0003b2d28e 100644
--- a/source/blender/io/alembic/intern/alembic_capi.cc
+++ b/source/blender/io/alembic/intern/alembic_capi.cc
@@ -666,7 +666,7 @@ bool ABC_import(bContext *C,
int offset,
bool validate_meshes,
bool force_modifier,
- float default_curves_radius,
+ float default_radius,
bool as_background_job)
{
/* Using new here since MEM_* functions do not call constructor to properly initialize data. */
@@ -686,7 +686,7 @@ bool ABC_import(bContext *C,
job->settings.sequence_offset = offset;
job->settings.validate_meshes = validate_meshes;
job->settings.force_modifier = force_modifier;
- job->settings.default_curves_radius = default_curves_radius;
+ job->settings.default_radius = default_radius;
job->error_code = ABC_NO_ERROR;
job->was_cancelled = false;
job->archive = nullptr;
diff --git a/source/blender/makesdna/DNA_cachefile_types.h b/source/blender/makesdna/DNA_cachefile_types.h
index 7027848edb0..2d77e491db7 100644
--- a/source/blender/makesdna/DNA_cachefile_types.h
+++ b/source/blender/makesdna/DNA_cachefile_types.h
@@ -80,8 +80,8 @@ typedef struct CacheFile {
/** The frame offset to subtract. */
float frame_offset;
- /** Default radius assigned to curves if no such property exists for them. */
- float default_curves_radius;
+ /** Default radius assigned to curves or points if no such property exists for them. */
+ float default_radius;
/** Animation flag. */
short flag;
diff --git a/source/blender/makesrna/intern/rna_cachefile.c b/source/blender/makesrna/intern/rna_cachefile.c
index 9b9bc5fb3f4..5d86226e9b7 100644
--- a/source/blender/makesrna/intern/rna_cachefile.c
+++ b/source/blender/makesrna/intern/rna_cachefile.c
@@ -208,12 +208,11 @@ static void rna_def_cachefile(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_CacheFile_update");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- prop = RNA_def_property(srna, "default_curves_radius", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "default_curves
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list