[Bf-blender-cvs] [e16e6d36716] soc-2019-bevel-profiles: Naming: ProfileCurve -> CurveProfile
Hans Goudey
noreply at git.blender.org
Thu Oct 24 21:26:58 CEST 2019
Commit: e16e6d367168b9eab42db4d36ee0dc1c4c0660c5
Author: Hans Goudey
Date: Thu Oct 17 11:55:34 2019 -0500
Branches: soc-2019-bevel-profiles
https://developer.blender.org/rBe16e6d367168b9eab42db4d36ee0dc1c4c0660c5
Naming: ProfileCurve -> CurveProfile
===================================================================
M release/scripts/startup/bl_ui/properties_data_modifier.py
M source/blender/CMakeLists.txt
R052 source/blender/blenkernel/BKE_profile_curve.h source/blender/blenkernel/BKE_curveprofile.h
M source/blender/blenkernel/CMakeLists.txt
R086 source/blender/blenkernel/intern/profile_curve.c source/blender/blenkernel/intern/curveprofile.c
M source/blender/blenkernel/intern/scene.c
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/versioning_280.c
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/blenloader/intern/writefile.c
M source/blender/bmesh/operators/bmo_bevel.c
M source/blender/bmesh/tools/bmesh_bevel.c
M source/blender/bmesh/tools/bmesh_bevel.h
M source/blender/editors/include/UI_interface.h
M source/blender/editors/interface/interface_draw.c
M source/blender/editors/interface/interface_handlers.c
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/mesh/editmesh_bevel.c
R086 source/blender/makesdna/DNA_profilecurve_types.h source/blender/makesdna/DNA_curveprofile_types.h
M source/blender/makesdna/DNA_modifier_types.h
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesdna/intern/makesdna.c
M source/blender/makesrna/RNA_access.h
M source/blender/makesrna/RNA_enum_types.h
M source/blender/makesrna/intern/CMakeLists.txt
M source/blender/makesrna/intern/makesrna.c
R076 source/blender/makesrna/intern/rna_profilecurve.c source/blender/makesrna/intern/rna_curveprofile.c
M source/blender/makesrna/intern/rna_modifier.c
M source/blender/makesrna/intern/rna_scene.c
M source/blender/makesrna/intern/rna_ui_api.c
M source/blender/modifiers/intern/MOD_bevel.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index cc47c4d631c..078c7718ff0 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -180,7 +180,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row = layout.row()
row.enabled = md.use_custom_profile
if md.use_custom_profile:
- layout.template_profilecurve(md, "custom_profile")
+ layout.template_curveprofile(md, "custom_profile")
# If the number of segments has changed, update the table to show the new sampled
# segment locations on the widget
if md.custom_profile.totsegments != md.segments:
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index c4f22351b76..62923d18b70 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -68,7 +68,7 @@ set(SRC_DNA_INC
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_outliner_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_packedFile_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_particle_types.h
- ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_profilecurve_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_curveprofile_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_rigidbody_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_scene_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_screen_types.h
diff --git a/source/blender/blenkernel/BKE_profile_curve.h b/source/blender/blenkernel/BKE_curveprofile.h
similarity index 52%
rename from source/blender/blenkernel/BKE_profile_curve.h
rename to source/blender/blenkernel/BKE_curveprofile.h
index af04c9016fc..3c676c66948 100644
--- a/source/blender/blenkernel/BKE_profile_curve.h
+++ b/source/blender/blenkernel/BKE_curveprofile.h
@@ -24,52 +24,52 @@
* \ingroup bke
*/
-struct ProfileCurve;
-struct ProfilePoint;
+struct CurveProfile;
+struct CurveProfilePoint;
-void BKE_profilecurve_set_defaults(struct ProfileCurve *prwdgt);
+void BKE_curveprofile_set_defaults(struct CurveProfile *prwdgt);
-struct ProfileCurve *BKE_profilecurve_add(int preset);
+struct CurveProfile *BKE_curveprofile_add(int preset);
-void BKE_profilecurve_free_data(struct ProfileCurve *prwdgt);
+void BKE_curveprofile_free_data(struct CurveProfile *prwdgt);
-void BKE_profilecurve_free(struct ProfileCurve *prwdgt);
+void BKE_curveprofile_free(struct CurveProfile *prwdgt);
-void BKE_profilecurve_copy_data(struct ProfileCurve *target, const struct ProfileCurve *prwdgt);
+void BKE_curveprofile_copy_data(struct CurveProfile *target, const struct CurveProfile *prwdgt);
-struct ProfileCurve *BKE_profilecurve_copy(const struct ProfileCurve *prwdgt);
+struct CurveProfile *BKE_curveprofile_copy(const struct CurveProfile *prwdgt);
-bool BKE_profilecurve_remove_point(struct ProfileCurve *prwdgt, struct ProfilePoint *point);
+bool BKE_curveprofile_remove_point(struct CurveProfile *prwdgt, struct CurveProfilePoint *point);
-void BKE_profilecurve_remove_by_flag(struct ProfileCurve *prwdgt, const short flag);
+void BKE_curveprofile_remove_by_flag(struct CurveProfile *prwdgt, const short flag);
-struct ProfilePoint *BKE_profilecurve_insert(struct ProfileCurve *prwdgt, float x, float y);
+struct CurveProfilePoint *BKE_curveprofile_insert(struct CurveProfile *prwdgt, float x, float y);
-void BKE_profilecurve_handle_set(struct ProfileCurve *prwdgt, int type_1, int type_2);
+void BKE_curveprofile_handle_set(struct CurveProfile *prwdgt, int type_1, int type_2);
-void BKE_profilecurve_reverse(struct ProfileCurve *prwdgt);
+void BKE_curveprofile_reverse(struct CurveProfile *prwdgt);
-void BKE_profilecurve_reset(struct ProfileCurve *prwdgt);
+void BKE_curveprofile_reset(struct CurveProfile *prwdgt);
-void BKE_profilecurve_create_samples(struct ProfileCurve *prwdgt,
+void BKE_curveprofile_create_samples(struct CurveProfile *prwdgt,
int n_segments,
bool sample_straight_edges,
- struct ProfilePoint *r_samples);
+ struct CurveProfilePoint *r_samples);
-void BKE_profilecurve_initialize(struct ProfileCurve *prwdgt, short nsegments);
+void BKE_curveprofile_initialize(struct CurveProfile *prwdgt, short nsegments);
/* Called for a complete update of the widget after modifications */
-void BKE_profilecurve_update(struct ProfileCurve *prwdgt, const bool rem_doubles);
+void BKE_curveprofile_update(struct CurveProfile *prwdgt, const bool rem_doubles);
/* Need to find the total length of the curve to sample a portion of it */
-float BKE_profilecurve_total_length(const struct ProfileCurve *prwdgt);
+float BKE_curveprofile_total_length(const struct CurveProfile *prwdgt);
-void BKE_profilecurve_create_samples_even_spacing(struct ProfileCurve *prwdgt,
+void BKE_curveprofile_create_samples_even_spacing(struct CurveProfile *prwdgt,
int n_segments,
- struct ProfilePoint *r_samples);
+ struct CurveProfilePoint *r_samples);
/* Length portion is the fraction of the total path length where we want the location */
-void BKE_profilecurve_evaluate_length_portion(const struct ProfileCurve *prwdgt,
+void BKE_curveprofile_evaluate_length_portion(const struct CurveProfile *prwdgt,
float length_portion,
float *x_out,
float *y_out);
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index a7a4c5be6e8..7a577eb5273 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -185,7 +185,7 @@ set(SRC
intern/pbvh_bmesh.c
intern/pbvh_parallel.cc
intern/pointcache.c
- intern/profile_curve.c
+ intern/curveprofile.c
intern/report.c
intern/rigidbody.c
intern/scene.c
@@ -331,7 +331,7 @@ set(SRC
BKE_particle.h
BKE_pbvh.h
BKE_pointcache.h
- BKE_profile_curve.h
+ BKE_curveprofile.h
BKE_report.h
BKE_rigidbody.h
BKE_scene.h
diff --git a/source/blender/blenkernel/intern/profile_curve.c b/source/blender/blenkernel/intern/curveprofile.c
similarity index 86%
rename from source/blender/blenkernel/intern/profile_curve.c
rename to source/blender/blenkernel/intern/curveprofile.c
index ca4a2addcc8..cbaf3f17c72 100644
--- a/source/blender/blenkernel/intern/profile_curve.c
+++ b/source/blender/blenkernel/intern/curveprofile.c
@@ -28,7 +28,7 @@
#include "MEM_guardedalloc.h"
-#include "DNA_profilecurve_types.h"
+#include "DNA_curveprofile_types.h"
#include "DNA_curve_types.h"
#include "BLI_blenlib.h"
@@ -37,26 +37,26 @@
#include "BLI_task.h"
#include "BLI_threads.h"
-#include "BKE_profile_curve.h"
+#include "BKE_curveprofile.h"
#include "BKE_curve.h"
#include "BKE_fcurve.h"
-void BKE_profilecurve_free_data(ProfileCurve *prwdgt)
+void BKE_curveprofile_free_data(CurveProfile *prwdgt)
{
MEM_SAFE_FREE(prwdgt->path);
MEM_SAFE_FREE(prwdgt->table);
MEM_SAFE_FREE(prwdgt->segments);
}
-void BKE_profilecurve_free(ProfileCurve *prwdgt)
+void BKE_curveprofile_free(CurveProfile *prwdgt)
{
if (prwdgt) {
- BKE_profilecurve_free_data(prwdgt);
+ BKE_curveprofile_free_data(prwdgt);
MEM_freeN(prwdgt);
}
}
-void BKE_profilecurve_copy_data(ProfileCurve *target, const ProfileCurve *prwdgt)
+void BKE_curveprofile_copy_data(CurveProfile *target, const CurveProfile *prwdgt)
{
*target = *prwdgt;
@@ -65,21 +65,21 @@ void BKE_profilecurve_copy_data(ProfileCurve *target, const ProfileCurve *prwdgt
target->segments = MEM_dupallocN(prwdgt->segments);
}
-ProfileCurve *BKE_profilecurve_copy(const ProfileCurve *prwdgt)
+CurveProfile *BKE_curveprofile_copy(const CurveProfile *prwdgt)
{
if (prwdgt) {
- ProfileCurve *new_prdgt = MEM_dupallocN(prwdgt);
- BKE_profilecurve_copy_data(new_prdgt, prwdgt);
+ CurveProfile *new_prdgt = MEM_dupallocN(prwdgt);
+ BKE_curveprofile_copy_data(new_prdgt, prwdgt);
return new_prdgt;
}
return NULL;
}
/** Removes a specific point from the path of control points.
- * \note: Requires profilecurve_update call after. */
-bool BKE_profilecurve_remove_point(ProfileCurve *prwdgt, ProfilePoint *point)
+ * \note: Requires curveprofile_update call after. */
+bool BKE_curveprofile_remove_point(CurveProfile *prwdgt, CurveProfilePoint *point)
{
- ProfilePoint *pts;
+ CurveProfilePoint *pts;
/* Must have 2 points minimum. */
if (prwdgt->totpoint <= 2) {
@@ -91,7 +91,7 @@ bool BKE_profilecurve_remove_point(ProfileCurve *prwdgt, ProfilePoint *point)
return false;
}
- pts = MEM_mallocN(sizeof(ProfilePoint) * prwdgt->totpoint, "path points");
+ pts = MEM_mallocN(sizeof(CurveProfilePoint) * prwdgt->totpoint, "path points");
uint i_delete = (uint)(point - prwdgt->path);
@@ -106,14 +106,14 @@ bool BKE_profilecurve_remove_point(ProfileCurve *prwdgt, ProfilePoint *point)
}
/** Removes every point in the widget with the supplied flag set, except for the first and last.
- * \param flag: ProfilePoint->flag.
- * \note: Requires profilecurve_update call after. */
-void BKE_profilecurve_remove_by_flag(ProfileCurve *prwdgt, const short flag)
+ * \param flag: CurveProfilePoint->flag.
+ * \note: Requires curveprofile_update call after. */
+void BKE_curveprofile_remove_by_flag(CurveProfile *prwdgt, const short flag)
{
int i_old, i_new, n_removed = 0;
/* Copy every point without the flag into the new path. */
- ProfilePoint *new_pts = MEM_mallocN(sizeof(ProfilePoint) * prwdgt->totpoint, "path points");
+ CurveProfilePoint *new_pts = MEM_mallocN(sizeof(CurveProfilePoint) * prwdgt->totpoint, "profile");
/* Build the new list without any of the points with the flag. Keep the first and last points. */
new_pts[0] = prwdgt->path[0];
@@ -136,10 +136,10 @@ void BKE_profilecurve_remove_by_flag(ProfileCurve *prwdgt, co
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list