[Bf-blender-cvs] [bbfee34e9e2] uv_unwrapping_slim_algorithm: Merge remote-tracking branch 'origin/master' into uv_unwrapping_slim_algorithm

Lukas Stockner noreply at git.blender.org
Tue May 1 17:16:55 CEST 2018


Commit: bbfee34e9e2a3d8e8572dd41b3601e783d35a675
Author: Lukas Stockner
Date:   Tue May 1 17:03:20 2018 +0200
Branches: uv_unwrapping_slim_algorithm
https://developer.blender.org/rBbbfee34e9e2a3d8e8572dd41b3601e783d35a675

Merge remote-tracking branch 'origin/master' into uv_unwrapping_slim_algorithm

===================================================================



===================================================================

diff --cc release/datafiles/locale
index 507eacde960,469c949d1ca..d3349b42856
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 507eacde9608ce0190c6087fb338dd63f7a1649b
 -Subproject commit 469c949d1ca882be19daa128842f813b72a944d8
++Subproject commit d3349b42856d00c278f72f2a5909a6c96b9cdb5e
diff --cc release/scripts/addons
index ff8ef5cb121,c88411ff777..9e97716c99a
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit ff8ef5cb121e590ef1a5f3e5f57b9bf99c46559d
 -Subproject commit c88411ff7776a2db5d6ef6117a1b2faa42a95611
++Subproject commit 9e97716c99af066ba578c8ac5685a7e92a363b59
diff --cc release/scripts/addons_contrib
index e0e0fe92738,310578043de..cd57934bd04
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit e0e0fe92738e345746ef566b6ecfb79d28a28d6d
 -Subproject commit 310578043dec1aae382eb6a447ae1d103792d7e6
++Subproject commit cd57934bd04c174fc3402888d01a74e6e6653b2f
diff --cc source/blender/editors/include/ED_uvedit.h
index a0ff29790fe,d2d4732eedb..efbf3adde79
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@@ -102,11 -115,14 +117,14 @@@ void ED_uvedit_live_unwrap_re_solve(voi
  void ED_uvedit_live_unwrap_end(short cancel);
  
  void ED_uvedit_live_unwrap(struct Scene *scene, struct Object *obedit);
- void ED_uvedit_pack_islands(struct Scene *scene, struct Object *ob, struct BMesh *bm, bool selected, bool correct_aspect, bool do_rotate);
- void ED_uvedit_unwrap_cube_project(struct Object *ob, struct BMesh *bm, float cube_size, bool use_select);
+ void ED_uvedit_pack_islands(
+         struct Scene *scene, struct Object *ob, struct BMesh *bm,
+         bool selected, bool correct_aspect, bool do_rotate);
+ void ED_uvedit_unwrap_cube_project(
+         struct BMesh *bm, float cube_size, bool use_select, const float center[3]);
  
  /* single call up unwrap using scene settings, used for edge tag unwrapping */
 -void ED_unwrap_lscm(struct Scene *scene, struct Object *obedit, const short sel);
 +void ED_uvedit_unwrap(struct Scene *scene, struct Object *obedit, const short sel, struct wmOperator *op);
  
  
  /* uvedit_draw.c */
diff --cc source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 08f1b00a3d7,bc38a1cd3bb..f039d709ffe
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@@ -1290,53 -1271,11 +1328,53 @@@ static int unwrap_exec(bContext *C, wmO
  	return OPERATOR_FINISHED;
  }
  
 +static bool unwrap_draw_check_prop_slim(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 +{
 +	const char *prop_id = RNA_property_identifier(prop);
 +
 +	return !(STREQ(prop_id, "fill_holes"));
 +}
 +
 +static bool unwrap_draw_check_prop_abf(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 +{
 +	const char *prop_id = RNA_property_identifier(prop);
 +
 +	return !(STREQ(prop_id, "reflection_mode") ||
 +			 STREQ(prop_id, "iterations") ||
 +			 STREQ(prop_id, "relative_scale") ||
 +			 STREQ(prop_id, "vertex_group") ||
 +			 STREQ(prop_id, "vertex_group_factor")
 +			 );
 +}
 +
 +static void unwrap_draw(bContext *UNUSED(C), wmOperator *op)
 +{
 +	uiLayout *layout = op->layout;
 +	PointerRNA ptr;
 +
 +	/* main draw call */
 +	RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
 +
 +	if (RNA_enum_get(op->ptr, "method") == 2) {
 +		uiDefAutoButsRNA(layout, &ptr, unwrap_draw_check_prop_slim, '\0');
 +	}
 +	else {
 +		uiDefAutoButsRNA(layout, &ptr, unwrap_draw_check_prop_abf, '\0');
 +	}
 +}
 +
  void UV_OT_unwrap(wmOperatorType *ot)
  {
- 	static EnumPropertyItem method_items[] = {
+ 	static const EnumPropertyItem method_items[] = {
  		{0, "ANGLE_BASED", 0, "Angle Based", ""},
  		{1, "CONFORMAL", 0, "Conformal", ""},
 +		{2, "SLIM", 0, "SLIM", "" },
 +		{0, NULL, 0, NULL, NULL}
 +	};
 +
 +	static EnumPropertyItem reflection_items[] = {
 +		{0, "ALLOW", 0, "Allow Flips", ""},
 +		{1, "DISALLOW", 0, "Don't Allow Flips", ""},
  		{0, NULL, 0, NULL, NULL}
  	};
  
diff --cc source/blender/makesdna/DNA_scene_types.h
index 156e59dca2c,d2b71c727c5..90a08e62893
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@@ -2151,11 -2174,7 +2173,11 @@@ typedef enum eImagePaintMode 
  #define IMAGEPAINT_MISSING_TEX       (1 << 2)
  #define IMAGEPAINT_MISSING_STENCIL   (1 << 3)
  
- /* toolsettings->uvcalc_flag */
+ /* ToolSettings.uvcalc_flag */
 +#define UVCALC_DEPRECATED1			1
 +#define UVCALC_DEPRECATED2			2
 +#define UVCALC_TRANSFORM_CORRECT	4	/* adjust UV's while transforming to avoid distortion */
 +#define UVCALC_DEPRECATED3			8
  #define UVCALC_FILLHOLES			1
  #define UVCALC_NO_ASPECT_CORRECT	2	/* would call this UVCALC_ASPECT_CORRECT, except it should be default with old file */
  #define UVCALC_TRANSFORM_CORRECT	4	/* adjust UV's while transforming to avoid distortion */
diff --cc source/blender/windowmanager/intern/wm_event_system.c
index 9571dfd75d6,4f441c293c4..bc4dc5217cb
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@@ -1063,32 -1099,9 +1099,35 @@@ bool WM_operator_last_properties_store(
  
  #endif
  
 +void WM_operator_last_properties_alloc(struct wmOperator *op, const char *idname, struct PointerRNA *ptr)
 +{
 +	/* returns a copy of the current, last or default properties depending
 +	 * which ones are available. for operators that need to access another
 +	 * operator's last properties. */
 +	if (op) {
 +		BLI_assert(op->type == WM_operatortype_find(idname, false));
 +		*ptr = *(op->ptr);
 +		ptr->data = IDP_CopyProperty(ptr->data);
 +	}
 +	else {
 +		wmOperatorType *ot = WM_operatortype_find(idname, false);
 +		IDProperty *properties;
 +
 +		if (ot->last_properties) {
 +			properties = IDP_CopyProperty(ot->last_properties);
 +		}
 +		else {
 +			IDPropertyTemplate val = {0};
 +			properties = IDP_New(IDP_GROUP, &val, "wmOperatorProperties");
 +		}
 +
 +		RNA_pointer_create(NULL, ot->srna, properties, ptr);
 +	}
 +}
 +
+ /**
+  * Also used for exec when 'event' is NULL.
+  */
  static int wm_operator_invoke(
          bContext *C, wmOperatorType *ot, wmEvent *event,
          PointerRNA *properties, ReportList *reports, const bool poll_only)
diff --cc source/tools
index 917692e4622,7695e14cfc5..d4c0954f7bd
--- a/source/tools
+++ b/source/tools
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 917692e4622064f0803362d65dc958c226d642ba
 -Subproject commit 7695e14cfc5820ac66546e0e515914d85ab81af3
++Subproject commit d4c0954f7bdb81a2d9e208083d5b9b60e9bb57be



More information about the Bf-blender-cvs mailing list