2.5 Buttons:
* Some Updates for n-key Areas in View3D and Image Editor and some tweaks in bone panels. Patch by William Reynish. Thanks!
This commit is contained in:
		@@ -23,6 +23,23 @@ class BONE_PT_context_bone(BoneButtonsPanel):
 | 
			
		||||
		split.itemL(text="", icon="ICON_BONE_DATA")
 | 
			
		||||
		split.itemR(bone, "name", text="")
 | 
			
		||||
 | 
			
		||||
class BONE_PT_transform_bone(BoneButtonsPanel):
 | 
			
		||||
	__idname__ = "BONE_PT_transform_bone"
 | 
			
		||||
	__label__ = "Transform"
 | 
			
		||||
 | 
			
		||||
	def draw(self, context):
 | 
			
		||||
		layout = self.layout
 | 
			
		||||
		bone = context.bone
 | 
			
		||||
		if not bone:
 | 
			
		||||
			bone = context.edit_bone
 | 
			
		||||
 | 
			
		||||
#Seems to be missing from RNA?
 | 
			
		||||
		row = layout.row()
 | 
			
		||||
		row.column().itemR(bone, "location")
 | 
			
		||||
		row.column().itemR(bone, "rotation")
 | 
			
		||||
		row.column().itemR(bone, "scale")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class BONE_PT_bone(BoneButtonsPanel):
 | 
			
		||||
	__idname__ = "BONE_PT_bone"
 | 
			
		||||
	__label__ = "Bone"
 | 
			
		||||
@@ -93,5 +110,6 @@ class BONE_PT_deform(BoneButtonsPanel):
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bpy.types.register(BONE_PT_context_bone)
 | 
			
		||||
bpy.types.register(BONE_PT_transform_bone)
 | 
			
		||||
bpy.types.register(BONE_PT_bone)
 | 
			
		||||
bpy.types.register(BONE_PT_deform)
 | 
			
		||||
 
 | 
			
		||||
@@ -90,17 +90,92 @@ class VIEW3D_HT_header(bpy.types.Header):
 | 
			
		||||
 | 
			
		||||
		layout.template_header_3D()
 | 
			
		||||
 | 
			
		||||
class VIEW3D_PT_random_panel(bpy.types.Panel):
 | 
			
		||||
class VIEW3D_PT_3dview_properties(bpy.types.Panel):
 | 
			
		||||
	__space_type__ = "VIEW_3D"
 | 
			
		||||
	__region_type__ = "UI"
 | 
			
		||||
	__label__ = "Random Panel"
 | 
			
		||||
	__label__ = "View"
 | 
			
		||||
 | 
			
		||||
	def poll(self, context):
 | 
			
		||||
		view = context.space_data
 | 
			
		||||
		return (view)
 | 
			
		||||
 | 
			
		||||
	def draw(self, context):
 | 
			
		||||
		view = context.space_data
 | 
			
		||||
		layout = self.layout
 | 
			
		||||
		layout.itemL(text="panel contents")
 | 
			
		||||
		
 | 
			
		||||
		split = layout.split()
 | 
			
		||||
		col = split.column()
 | 
			
		||||
		col.itemR(view, "camera")
 | 
			
		||||
		col.itemR(view, "lens")
 | 
			
		||||
		col.itemL(text="Clip:")
 | 
			
		||||
		col.itemR(view, "clip_start", text="Start")
 | 
			
		||||
		col.itemR(view, "clip_end", text="End")
 | 
			
		||||
		col.itemL(text="Grid:")
 | 
			
		||||
		col.itemR(view, "grid_spacing", text="Spacing")
 | 
			
		||||
		col.itemR(view, "grid_subdivisions", text="Subdivisions")
 | 
			
		||||
		
 | 
			
		||||
class VIEW3D_PT_3dview_display(bpy.types.Panel):
 | 
			
		||||
	__space_type__ = "VIEW_3D"
 | 
			
		||||
	__region_type__ = "UI"
 | 
			
		||||
	__label__ = "Display"
 | 
			
		||||
 | 
			
		||||
	def poll(self, context):
 | 
			
		||||
		view = context.space_data
 | 
			
		||||
		return (view)
 | 
			
		||||
 | 
			
		||||
	def draw(self, context):
 | 
			
		||||
		view = context.space_data
 | 
			
		||||
		layout = self.layout
 | 
			
		||||
		
 | 
			
		||||
		split = layout.split()
 | 
			
		||||
		col = split.column()
 | 
			
		||||
		col.itemR(view, "display_floor", text="Grid Floor")
 | 
			
		||||
		col.itemR(view, "display_x_axis", text="X Axis")
 | 
			
		||||
		col.itemR(view, "display_y_axis", text="Y Axis")
 | 
			
		||||
		col.itemR(view, "display_z_axis", text="Z Axis")
 | 
			
		||||
		col.itemR(view, "outline_selected")
 | 
			
		||||
		col.itemR(view, "all_object_centers")
 | 
			
		||||
		col.itemR(view, "relationship_lines")
 | 
			
		||||
		col.itemR(view, "textured_solid")
 | 
			
		||||
			
 | 
			
		||||
class VIEW3D_PT_background_image(bpy.types.Panel):
 | 
			
		||||
	__space_type__ = "VIEW_3D"
 | 
			
		||||
	__region_type__ = "UI"
 | 
			
		||||
	__label__ = "Background Image"
 | 
			
		||||
 | 
			
		||||
	def poll(self, context):
 | 
			
		||||
		view = context.space_data
 | 
			
		||||
		bg = context.space_data.background_image
 | 
			
		||||
		return (view)
 | 
			
		||||
 | 
			
		||||
	def draw_header(self, context):
 | 
			
		||||
		layout = self.layout
 | 
			
		||||
		view = context.space_data
 | 
			
		||||
 | 
			
		||||
		layout.itemR(view, "display_background_image", text="")
 | 
			
		||||
 | 
			
		||||
	def draw(self, context):
 | 
			
		||||
		view = context.space_data
 | 
			
		||||
		bg = context.space_data.background_image
 | 
			
		||||
		layout = self.layout
 | 
			
		||||
		
 | 
			
		||||
		layout.active = view.display_background_image
 | 
			
		||||
		split = layout.split()
 | 
			
		||||
		col = split.column()
 | 
			
		||||
		col.itemR(bg, "image")
 | 
			
		||||
#		col.itemR(bg, "image_user")
 | 
			
		||||
		col.itemR(bg, "size")
 | 
			
		||||
		col.itemR(bg, "transparency", slider=True)
 | 
			
		||||
		col.itemL(text="Offset:")
 | 
			
		||||
		col.itemR(bg, "x_offset", text="X")
 | 
			
		||||
		col.itemR(bg, "y_offset", text="Y")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bpy.types.register(VIEW3D_MT_view_navigation)
 | 
			
		||||
bpy.types.register(VIEW3D_MT_view)
 | 
			
		||||
bpy.types.register(VIEW3D_HT_header)
 | 
			
		||||
bpy.types.register(VIEW3D_PT_random_panel)
 | 
			
		||||
bpy.types.register(VIEW3D_PT_3dview_properties)
 | 
			
		||||
bpy.types.register(VIEW3D_PT_3dview_display)
 | 
			
		||||
bpy.types.register(VIEW3D_PT_background_image)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1243,20 +1243,20 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I
 | 
			
		||||
// XXX		uiSetButLock(ima->id.lib!=NULL, ERROR_LIBDATA_MESSAGE);
 | 
			
		||||
		uiBlockBeginAlign(block);
 | 
			
		||||
		uiBlockSetFunc(block, image_src_change_cb, ima, iuser);
 | 
			
		||||
		uiDefButS(block, ROW, imagechanged, "Still",		10, 180, 60, 20, &ima->source, 0.0, IMA_SRC_FILE, 0, 0, "Single Image file");
 | 
			
		||||
		uiDefButS(block, ROW, imagechanged, "Movie",		70, 180, 60, 20, &ima->source, 0.0, IMA_SRC_MOVIE, 0, 0, "Movie file");
 | 
			
		||||
		uiDefButS(block, ROW, imagechanged, "Sequence",	130, 180, 90, 20, &ima->source, 0.0, IMA_SRC_SEQUENCE, 0, 0, "Multiple Image files, as a sequence");
 | 
			
		||||
		uiDefButS(block, ROW, imagechanged, "Generated",	220, 180, 90, 20, &ima->source, 0.0, IMA_SRC_GENERATED, 0, 0, "Generated Image");
 | 
			
		||||
		uiDefButS(block, ROW, imagechanged, "Still",		0, 180, 105, 20, &ima->source, 0.0, IMA_SRC_FILE, 0, 0, "Single Image file");
 | 
			
		||||
		uiDefButS(block, ROW, imagechanged, "Movie",		105, 180, 105, 20, &ima->source, 0.0, IMA_SRC_MOVIE, 0, 0, "Movie file");
 | 
			
		||||
		uiDefButS(block, ROW, imagechanged, "Sequence",		210, 180, 105, 20, &ima->source, 0.0, IMA_SRC_SEQUENCE, 0, 0, "Multiple Image files, as a sequence");
 | 
			
		||||
		uiDefButS(block, ROW, imagechanged, "Generated",	315, 180, 105, 20, &ima->source, 0.0, IMA_SRC_GENERATED, 0, 0, "Generated Image");
 | 
			
		||||
		uiBlockSetFunc(block, NULL, NULL, NULL);
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
		uiDefBut(block, LABEL, 0, " ",					10, 180, 300, 20, 0, 0, 0, 0, 0, "");	/* for align in panel */
 | 
			
		||||
		uiDefBut(block, LABEL, 0, " ",					0, 180, 440, 20, 0, 0, 0, 0, 0, "");	/* for align in panel */
 | 
			
		||||
				 
 | 
			
		||||
	 /* Browse */
 | 
			
		||||
	 IMAnames_to_pupstring(&strp, NULL, NULL, &(CTX_data_main(C)->image), NULL, &iuser->menunr);
 | 
			
		||||
	 
 | 
			
		||||
	 uiBlockBeginAlign(block);
 | 
			
		||||
	 but= uiDefButS(block, MENU, imagechanged, strp,		10,155,23,20, &iuser->menunr, 0, 0, 0, 0, "Selects an existing Image or Movie");
 | 
			
		||||
	 but= uiDefButS(block, MENU, imagechanged, strp,		0,155,40,20, &iuser->menunr, 0, 0, 0, 0, "Selects an existing Image or Movie");
 | 
			
		||||
	 uiButSetFunc(but, image_browse_cb, ima_pp, iuser);
 | 
			
		||||
	 
 | 
			
		||||
	 MEM_freeN(strp);
 | 
			
		||||
@@ -1265,31 +1265,34 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I
 | 
			
		||||
	 if(ima) {
 | 
			
		||||
		 int drawpack= (ima->source!=IMA_SRC_SEQUENCE && ima->source!=IMA_SRC_MOVIE && ima->ok);
 | 
			
		||||
 | 
			
		||||
		 but= uiDefBut(block, TEX, B_IDNAME, "IM:",		33, 155, 177, 20, ima->id.name+2, 0.0, 21.0, 0, 0, "Current Image Datablock name.");
 | 
			
		||||
		 but= uiDefBut(block, TEX, B_IDNAME, "IM:",				40, 155, 220, 20, ima->id.name+2, 0.0, 21.0, 0, 0, "Current Image Datablock name.");
 | 
			
		||||
		 uiButSetFunc(but, test_idbutton_cb, ima->id.name, NULL);
 | 
			
		||||
		 but= uiDefBut(block, BUT, imagechanged, "Reload",		210, 155, 60, 20, NULL, 0, 0, 0, 0, "Reloads Image or Movie");
 | 
			
		||||
		 but= uiDefBut(block, BUT, imagechanged, "Reload",		260, 155, 70, 20, NULL, 0, 0, 0, 0, "Reloads Image or Movie");
 | 
			
		||||
		 uiButSetFunc(but, image_reload_cb, ima, iuser);
 | 
			
		||||
		 
 | 
			
		||||
		 but= uiDefIconBut(block, BUT, imagechanged, ICON_X,	270,155,20,20, 0, 0, 0, 0, 0, "Unlink Image block");
 | 
			
		||||
		 but= uiDefIconBut(block, BUT, imagechanged, ICON_X,	330, 155, 40, 20, 0, 0, 0, 0, 0, "Unlink Image block");
 | 
			
		||||
		 uiButSetFunc(but, image_unlink_cb, ima_pp, NULL);
 | 
			
		||||
		 sprintf(str, "%d", ima->id.us);
 | 
			
		||||
		 uiDefBut(block, BUT, B_NOP, str,					290,155,20,20, 0, 0, 0, 0, 0, "Only displays number of users of Image block");
 | 
			
		||||
		 uiDefBut(block, BUT, B_NOP, str,					370, 155, 40, 20, 0, 0, 0, 0, 0, "Only displays number of users of Image block");
 | 
			
		||||
		 uiBlockEndAlign(block);
 | 
			
		||||
		 
 | 
			
		||||
		 but= uiDefIconBut(block, BUT, imagechanged, ICON_FILESEL,	10, 135, 23, 20, 0, 0, 0, 0, 0, "Open Fileselect to load new Image");
 | 
			
		||||
		 uiBlockBeginAlign(block);
 | 
			
		||||
		 but= uiDefIconBut(block, BUT, imagechanged, ICON_FILESEL,	0, 130, 40, 20, 0, 0, 0, 0, 0, "Open Fileselect to load new Image");
 | 
			
		||||
		 uiButSetFunc(but, image_load_fs_cb, ima_pp, iuser);
 | 
			
		||||
		 but= uiDefBut(block, TEX, imagechanged, "",				33,135,257+(drawpack?0:20),20, ima->name, 0.0, 239.0, 0, 0, "Image/Movie file name, change to load new");
 | 
			
		||||
		 but= uiDefBut(block, TEX, imagechanged, "",				40,130, 340+(drawpack?0:20),20, ima->name, 0.0, 239.0, 0, 0, "Image/Movie file name, change to load new");
 | 
			
		||||
		 uiButSetFunc(but, image_load_cb, ima_pp, iuser);
 | 
			
		||||
		 uiBlockEndAlign(block);
 | 
			
		||||
		 
 | 
			
		||||
		 if(drawpack) {
 | 
			
		||||
			 if (ima->packedfile) packdummy = 1;
 | 
			
		||||
			 else packdummy = 0;
 | 
			
		||||
			 but= uiDefIconButBitI(block, TOG, 1, redraw, ICON_PACKAGE, 290,135,20,20, &packdummy, 0, 0, 0, 0, "Toggles Packed status of this Image");
 | 
			
		||||
			 but= uiDefIconButBitI(block, TOG, 1, redraw, ICON_PACKAGE, 380, 130, 40, 20, &packdummy, 0, 0, 0, 0, "Toggles Packed status of this Image");
 | 
			
		||||
			 uiButSetFunc(but, image_pack_cb, ima, iuser);
 | 
			
		||||
		 }
 | 
			
		||||
		 
 | 
			
		||||
	 }
 | 
			
		||||
	 else {
 | 
			
		||||
		 but= uiDefBut(block, BUT, imagechanged, "Load",		33, 155, 100,20, NULL, 0, 0, 0, 0, "Load new Image of Movie");
 | 
			
		||||
		 but= uiDefBut(block, BUT, imagechanged, "Load",		33, 155, 200,20, NULL, 0, 0, 0, 0, "Load new Image of Movie");
 | 
			
		||||
		 uiButSetFunc(but, image_load_fs_cb, ima_pp, iuser);
 | 
			
		||||
	 }
 | 
			
		||||
	 uiBlockEndAlign(block);
 | 
			
		||||
@@ -1320,46 +1323,54 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I
 | 
			
		||||
		 /* left side default per-image options, right half the additional options */
 | 
			
		||||
		 
 | 
			
		||||
		 /* fields */
 | 
			
		||||
		 uiBlockBeginAlign(block);
 | 
			
		||||
		 but= uiDefButBitS(block, TOGBUT, IMA_FIELDS, imagechanged, "Fields",	10, 70, 65, 20, &ima->flag, 0, 0, 0, 0, "Click to enable use of fields in Image");
 | 
			
		||||
		 
 | 
			
		||||
		 but= uiDefButBitS(block, TOGBUT, IMA_FIELDS, imagechanged, "Fields",	0, 80, 200, 20, &ima->flag, 0, 0, 0, 0, "Click to enable use of fields in Image");
 | 
			
		||||
		 uiButSetFunc(but, image_field_test, ima, iuser);
 | 
			
		||||
		 uiDefButBitS(block, TOGBUT, IMA_STD_FIELD, B_NOP, "Odd",			75, 70, 45, 20, &ima->flag, 0, 0, 0, 0, "Standard Field Toggle");
 | 
			
		||||
		 uiDefButBitS(block, TOGBUT, IMA_STD_FIELD, B_NOP, "Odd",				0, 55, 200, 20, &ima->flag, 0, 0, 0, 0, "Standard Field Toggle");
 | 
			
		||||
		
 | 
			
		||||
		 
 | 
			
		||||
		 uiBlockSetFunc(block, image_reload_cb, ima, iuser);
 | 
			
		||||
		 uiDefButBitS(block, TOGBUT, IMA_ANTIALI, B_NOP, "Anti",			10, 50, 45, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors");
 | 
			
		||||
		 uiDefButBitS(block, TOGBUT, IMA_DO_PREMUL, imagechanged, "Premul",		55, 50, 65, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha");
 | 
			
		||||
		 uiBlockEndAlign(block);
 | 
			
		||||
		 uiDefButBitS(block, TOGBUT, IMA_ANTIALI, B_NOP, "Anti",				0, 5, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors");
 | 
			
		||||
		 uiDefButBitS(block, TOGBUT, IMA_DO_PREMUL, imagechanged, "Premul",		0, -20, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha");
 | 
			
		||||
		 
 | 
			
		||||
		 
 | 
			
		||||
		 if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
 | 
			
		||||
			 sprintf(str, "(%d) Frames:", iuser->framenr);
 | 
			
		||||
			 
 | 
			
		||||
			 uiBlockBeginAlign(block);
 | 
			
		||||
			 //uiBlockBeginAlign(block);
 | 
			
		||||
			 uiBlockSetFunc(block, image_user_change, iuser, NULL);
 | 
			
		||||
			 uiDefButBitS(block, TOG, IMA_ANIM_ALWAYS, B_NOP, "Auto Refresh",	120, 70, 190, 20, &iuser->flag, 0, 0, 0, 0, "Always refresh Image on frame changes");
 | 
			
		||||
			 
 | 
			
		||||
			 			 
 | 
			
		||||
			 if(ima->anim) {
 | 
			
		||||
				 uiDefButI(block, NUM, imagechanged, str,		120, 50,170, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use");
 | 
			
		||||
				 but= uiDefBut(block, BUT, redraw, "<",		290, 50, 20, 20, 0, 0, 0, 0, 0, "Copies number of frames in movie file to Frames: button");
 | 
			
		||||
			 	 uiBlockBeginAlign(block);
 | 
			
		||||
				 uiDefButI(block, NUM, imagechanged, str,						220, 80, 160, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use");
 | 
			
		||||
				 but= uiDefBut(block, BUT, redraw, "<",							380, 80, 40, 20, 0, 0, 0, 0, 0, "Copies number of frames in movie file to Frames: button");
 | 
			
		||||
				 uiButSetFunc(but, set_frames_cb, ima, iuser);
 | 
			
		||||
				 uiBlockEndAlign(block);
 | 
			
		||||
			 }
 | 
			
		||||
			 else 
 | 
			
		||||
				 uiDefButI(block, NUM, imagechanged, str,		120, 50,190, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use");
 | 
			
		||||
				 uiDefButI(block, NUM, imagechanged, str,						220, 80, 200, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Sets the number of images of a movie to use");
 | 
			
		||||
			 
 | 
			
		||||
			 uiDefButI(block, NUM, imagechanged, "Offs:",	120,30,100,20, &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation");
 | 
			
		||||
			 uiDefButS(block, NUM, imagechanged, "Fie/Ima:",	220,30,90,20, &iuser->fie_ima, 1.0, 200.0, 0, 0, "The number of fields per rendered frame (2 fields is 1 image)");
 | 
			
		||||
			 uiDefButI(block, NUM, imagechanged, "Start Frame:",				220, 55, 200, 20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Sets the global starting frame of the movie");
 | 
			
		||||
			 uiDefButI(block, NUM, imagechanged, "Offset:",						220, 30, 200, 20, &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation");
 | 
			
		||||
			 uiDefButS(block, NUM, imagechanged, "Fields:",						0, 30, 200, 20, &iuser->fie_ima, 1.0, 200.0, 0, 0, "The number of fields per rendered frame (2 fields is 1 image)");
 | 
			
		||||
			 
 | 
			
		||||
			 uiDefButI(block, NUM, imagechanged, "StartFr:",	120,10,100,20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Sets the global starting frame of the movie");
 | 
			
		||||
			 uiDefButS(block, TOG, imagechanged, "Cyclic",	220,10,90,20, &iuser->cycl, 0.0, 1.0, 0, 0, "Cycle the images in the movie");
 | 
			
		||||
			uiDefButBitS(block, TOG, IMA_ANIM_ALWAYS, B_NOP, "Auto Refresh",	220, 5, 200, 20, &iuser->flag, 0, 0, 0, 0, "Always refresh Image on frame changes");
 | 
			
		||||
 | 
			
		||||
			 uiDefButS(block, TOG, imagechanged, "Cyclic",						220, -20, 200, 20, &iuser->cycl, 0.0, 1.0, 0, 0, "Cycle the images in the movie");
 | 
			
		||||
			 
 | 
			
		||||
			 uiBlockSetFunc(block, NULL, iuser, NULL);
 | 
			
		||||
		 }
 | 
			
		||||
		 else if(ima->source==IMA_SRC_GENERATED) {
 | 
			
		||||
			 
 | 
			
		||||
			 uiDefBut(block, LABEL, 0, "Size:",					220, 80, 200, 20, 0, 0, 0, 0, 0, "");	
 | 
			
		||||
 | 
			
		||||
			 uiBlockBeginAlign(block);
 | 
			
		||||
			 uiBlockSetFunc(block, image_generated_change_cb, ima, iuser);
 | 
			
		||||
			 uiDefButS(block, NUM, imagechanged, "SizeX:",	120,70,100,20, &ima->gen_x, 1.0, 5000.0, 0, 0, "Image size x");
 | 
			
		||||
			 uiDefButS(block, NUM, imagechanged, "SizeY:",	220,70,90,20, &ima->gen_y, 1.0, 5000.0, 0, 0, "Image size y");
 | 
			
		||||
			 uiDefButS(block, TOGBUT, imagechanged, "UV Test grid",120,50,190,20, &ima->gen_type, 0.0, 1.0, 0, 0, "");
 | 
			
		||||
			 uiDefButS(block, NUM, imagechanged, "X:",	220, 55,200,20, &ima->gen_x, 1.0, 5000.0, 0, 0, "Image size x");
 | 
			
		||||
			 uiDefButS(block, NUM, imagechanged, "Y:",	220, 35,200,20, &ima->gen_y, 1.0, 5000.0, 0, 0, "Image size y");
 | 
			
		||||
			 uiBlockEndAlign(block);
 | 
			
		||||
			 
 | 
			
		||||
			 uiDefButS(block, TOGBUT, imagechanged, "UV Test grid", 220,10,200,20, &ima->gen_type, 0.0, 1.0, 0, 0, "");
 | 
			
		||||
			 uiBlockSetFunc(block, NULL, NULL, NULL);
 | 
			
		||||
		 }
 | 
			
		||||
	 }
 | 
			
		||||
 
 | 
			
		||||
@@ -301,42 +301,44 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
 | 
			
		||||
		else											but_y = 150;
 | 
			
		||||
		
 | 
			
		||||
		uiBlockBeginAlign(block);
 | 
			
		||||
		uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global",		160, but_y, 70, 19, &v3d->flag, 0, 0, 0, 0, "Displays global values");
 | 
			
		||||
		uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local",		230, but_y, 70, 19, &v3d->flag, 0, 0, 0, 0, "Displays local values");
 | 
			
		||||
		uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global",		0, 20, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values");
 | 
			
		||||
		uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local",		100, 20, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values");
 | 
			
		||||
		uiBlockEndAlign(block);
 | 
			
		||||
		
 | 
			
		||||
		memcpy(tfp->ve_median, median, sizeof(tfp->ve_median));
 | 
			
		||||
		
 | 
			
		||||
		uiBlockBeginAlign(block);
 | 
			
		||||
		if(tot==1) {
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex X:",	10, 110, 290, 19, &(tfp->ve_median[0]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex Y:",	10, 90, 290, 19, &(tfp->ve_median[1]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex Z:",	10, 70, 290, 19, &(tfp->ve_median[2]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefBut(block, LABEL, 0, "Vertex:",					0, 130, 200, 20, 0, 0, 0, 0, 0, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:",		0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:",		0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:",		0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, "");
 | 
			
		||||
			if(totw==1)
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex W:",	10, 50, 290, 19, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, "");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex W:",	0, 50, 200, 19, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, "");
 | 
			
		||||
			uiBlockEndAlign(block);
 | 
			
		||||
	
 | 
			
		||||
			if(defstr[0]) {
 | 
			
		||||
				uiDefBut(block, LABEL, 1, "Vertex Deform Groups",		10, 40, 290, 20, NULL, 0.0, 0.0, 0, 0, "");
 | 
			
		||||
				uiDefBut(block, LABEL, 1, "Vertex Deform Groups",		0, 40, 200, 20, NULL, 0.0, 0.0, 0, 0, "");
 | 
			
		||||
 | 
			
		||||
				uiBlockBeginAlign(block);
 | 
			
		||||
				uiDefButF(block, NUM, B_NOP, "Weight:",			10, 20, 150, 19, tfp->defweightp, 0.0f, 1.0f, 10, 3, "Weight value");
 | 
			
		||||
				uiDefButI(block, MENU, B_REDR, defstr,	160, 20, 140, 19, &tfp->curdef, 0.0, 0.0, 0, 0, "Current Vertex Group");
 | 
			
		||||
				uiDefButF(block, NUM, B_NOP, "Weight:",					10, 20, 150, 20, tfp->defweightp, 0.0f, 1.0f, 10, 3, "Weight value");
 | 
			
		||||
				uiDefButI(block, MENU, B_REDR, defstr,					160, 20, 140, 20, &tfp->curdef, 0.0, 0.0, 0, 0, "Current Vertex Group");
 | 
			
		||||
				uiBlockEndAlign(block);
 | 
			
		||||
			}
 | 
			
		||||
			else if(totweight)
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:",	10, 20, 290, 19, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:",	0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "");
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
		else {
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median X:",	10, 110, 290, 19, &(tfp->ve_median[0]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median Y:",	10, 90, 290, 19, &(tfp->ve_median[1]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median Z:",	10, 70, 290, 19, &(tfp->ve_median[2]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefBut(block, LABEL, 0, "Median:",						0, 130, 200, 20, 0, 0, 0, 0, 0, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:",		0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:",		0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:",		0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, "");
 | 
			
		||||
			if(totw==tot)
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median W:",	10, 50, 290, 19, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, "");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "W:",	0, 50, 200, 20, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, "");
 | 
			
		||||
			uiBlockEndAlign(block);
 | 
			
		||||
			if(totweight)
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:",	10, 20, 290, 19, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "Weight is used for SoftBody Goal");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:",	0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "Weight is used for SoftBody Goal");
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		if(ob->type==OB_CURVE && (totw==0)) { /* bez curves have no w */
 | 
			
		||||
@@ -349,9 +351,9 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		if(totedge==1)
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Crease W:",	10, 30, 290, 19, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Crease W:",	0, 45, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, "");
 | 
			
		||||
		else if(totedge>1)
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median Crease W:",	10, 30, 290, 19, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median Crease W:",	0, 45, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, "");
 | 
			
		||||
		
 | 
			
		||||
	}
 | 
			
		||||
	else {	// apply
 | 
			
		||||
@@ -1234,15 +1236,15 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
 | 
			
		||||
	if(G.f & (G_VERTEXPAINT|G_TEXTUREPAINT|G_WEIGHTPAINT)) {
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
		bt= uiDefBut(block, TEX, B_IDNAME, "OB: ",	10,180,140,20, ob->id.name+2, 0.0, 21.0, 0, 0, "");
 | 
			
		||||
		uiButSetFunc(bt, test_idbutton_cb, ob->id.name, NULL);
 | 
			
		||||
		//bt= uiDefBut(block, TEX, B_IDNAME, "OB: ",	10,180,140,20, ob->id.name+2, 0.0, 21.0, 0, 0, "");
 | 
			
		||||
		//uiButSetFunc(bt, test_idbutton_cb, ob->id.name, NULL);
 | 
			
		||||
 | 
			
		||||
		if((G.f & G_PARTICLEEDIT)==0) {
 | 
			
		||||
			uiBlockBeginAlign(block);
 | 
			
		||||
			uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_OBJECTPANELPARENT, "Par:", 160, 180, 140, 20, &ob->parent, "Parent Object"); 
 | 
			
		||||
		//	uiBlockBeginAlign(block);
 | 
			
		||||
		//	uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_OBJECTPANELPARENT, "Par:", 160, 180, 140, 20, &ob->parent, "Parent Object"); 
 | 
			
		||||
			if((ob->parent) && (ob->partype == PARBONE)) {
 | 
			
		||||
				bt= uiDefBut(block, TEX, B_OBJECTPANELPARENT, "ParBone:", 160, 160, 140, 20, ob->parsubstr, 0, 30, 0, 0, "");
 | 
			
		||||
				uiButSetCompleteFunc(bt, autocomplete_bone, (void *)ob->parent);
 | 
			
		||||
		//		bt= uiDefBut(block, TEX, B_OBJECTPANELPARENT, "ParBone:", 160, 160, 140, 20, ob->parsubstr, 0, 30, 0, 0, "");
 | 
			
		||||
		//		uiButSetCompleteFunc(bt, autocomplete_bone, (void *)ob->parent);
 | 
			
		||||
			}
 | 
			
		||||
			else {
 | 
			
		||||
				strcpy(ob->parsubstr, "");
 | 
			
		||||
@@ -1284,14 +1286,15 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
 | 
			
		||||
	} 
 | 
			
		||||
	else {
 | 
			
		||||
		BoundBox *bb = NULL;
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
		uiDefBut(block, LABEL, 0, "Location:",					10, 170, 100, 20, 0, 0, 0, 0, 0, "");
 | 
			
		||||
		uiBlockBeginAlign(block);
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED,	10,150,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANEL, "LocX:",		30, 150, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, "");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANEL, "X:",		30, 150, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, "");
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED,	10,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANEL, "LocY:",		30, 130, 120, 19, &(ob->loc[1]), -lim, lim, 100, 3, "");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANEL, "Y:",		30, 130, 120, 19, &(ob->loc[1]), -lim, lim, 100, 3, "");
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED,	10,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANEL, "LocZ:",		30, 110, 120, 19, &(ob->loc[2]), -lim, lim, 100, 3, "");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANEL, "Z:",		30, 110, 120, 19, &(ob->loc[2]), -lim, lim, 100, 3, "");
 | 
			
		||||
		
 | 
			
		||||
		tfp->ob_eul[0]= 180.0*ob->rot[0]/M_PI;
 | 
			
		||||
		tfp->ob_eul[1]= 180.0*ob->rot[1]/M_PI;
 | 
			
		||||
@@ -1299,37 +1302,40 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
 | 
			
		||||
		
 | 
			
		||||
		uiBlockBeginAlign(block);
 | 
			
		||||
		if ((ob->parent) && (ob->partype == PARBONE)) {
 | 
			
		||||
			uiDefBut(block, LABEL, 0, "Rotation:",					160, 170, 100, 20, 0, 0, 0, 0, 0, "");
 | 
			
		||||
			uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED,	160,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "RotX:",	180, 130, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "X:",	180, 130, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED,	160,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "RotY:",	180, 110, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:",	180, 110, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED,	160,90,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "RotZ:",	180, 90, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:",	180, 90, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, "");
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
		else {
 | 
			
		||||
			uiDefBut(block, LABEL, 0, "Rotation:",					160, 170, 100, 20, 0, 0, 0, 0, 0, "");
 | 
			
		||||
			uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED,	160,150,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "RotX:",	180, 150, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "X:",	180, 150, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED,	160,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "RotY:",	180, 130, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:",	180, 130, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED,	160,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "RotZ:",	180, 110, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, "");
 | 
			
		||||
			uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:",	180, 110, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, "");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		tfp->ob_scale[0]= ob->size[0];
 | 
			
		||||
		tfp->ob_scale[1]= ob->size[1];
 | 
			
		||||
		tfp->ob_scale[2]= ob->size[2];
 | 
			
		||||
 | 
			
		||||
		uiDefBut(block, LABEL, 0, "Scale:",					10, 90, 100, 20, 0, 0, 0, 0, 0, "");
 | 
			
		||||
		uiBlockBeginAlign(block);
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED,	10,80,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANELSCALE, "ScaleX:",		30, 80, 120, 19, &(tfp->ob_scale[0]), -lim, lim, 10, 3, "");
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED,	10,60,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANELSCALE, "ScaleY:",		30, 60, 120, 19, &(tfp->ob_scale[1]), -lim, lim, 10, 3, "");
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED,	10,40,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANELSCALE, "ScaleZ:",		30, 40, 120, 19, &(tfp->ob_scale[2]), -lim, lim, 10, 3, "");
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED,	10, 70, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANELSCALE, "X:",							30, 70, 120, 19, &(tfp->ob_scale[0]), -lim, lim, 10, 3, "");
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED,	10, 50, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Y:",							30, 50, 120, 19, &(tfp->ob_scale[1]), -lim, lim, 10, 3, "");
 | 
			
		||||
		uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED,	10, 30, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
 | 
			
		||||
		uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Z:",							30, 30, 120, 19, &(tfp->ob_scale[2]), -lim, lim, 10, 3, "");
 | 
			
		||||
		uiBlockEndAlign(block);
 | 
			
		||||
		
 | 
			
		||||
		uiDefButS(block, TOG, B_REDR, "Link Scale",		10, 10, 140, 19, &(tfp->link_scale), 0, 1, 0, 0, "Scale values vary proportionally in all directions");
 | 
			
		||||
		uiDefButS(block, TOG, B_REDR, "Link Scale",		10, 0, 140, 19, &(tfp->link_scale), 0, 1, 0, 0, "Scale values vary proportionally in all directions");
 | 
			
		||||
 | 
			
		||||
		bb= object_get_boundbox(ob);
 | 
			
		||||
		if (bb) {
 | 
			
		||||
@@ -1341,17 +1347,21 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
 | 
			
		||||
			tfp->ob_dims[1] = fabs(scale[1]) * (bb->vec[2][1] - bb->vec[0][1]);
 | 
			
		||||
			tfp->ob_dims[2] = fabs(scale[2]) * (bb->vec[1][2] - bb->vec[0][2]);
 | 
			
		||||
 | 
			
		||||
			uiBlockBeginAlign(block);
 | 
			
		||||
			
 | 
			
		||||
			if ((ob->parent) && (ob->partype == PARBONE)) {
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimX:",		160, 60, 140, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimY:",		160, 40, 140, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimZ:",		160, 20, 140, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefBut(block, LABEL, 0, "Dimensions:",			160, 90, 100, 20, 0, 0, 0, 0, 0, "");
 | 
			
		||||
				uiBlockBeginAlign(block);
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:",		160, 70, 140, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:",		160, 50, 140, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:",		160, 30, 140, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
 | 
			
		||||
			}
 | 
			
		||||
			else {
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimX:",		160, 80, 140, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimY:",		160, 60, 140, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "DimZ:",		160, 40, 140, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefBut(block, LABEL, 0, "Dimensions:",			160, 90, 100, 20, 0, 0, 0, 0, 0, "");
 | 
			
		||||
				uiBlockBeginAlign(block);
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:",		160, 70, 140, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:",		160, 50, 140, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
				uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:",		160, 30, 140, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size");
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			uiBlockEndAlign(block);
 | 
			
		||||
@@ -1724,29 +1734,30 @@ void view3d_buttons_register(ARegionType *art)
 | 
			
		||||
 | 
			
		||||
	pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel object");
 | 
			
		||||
	strcpy(pt->idname, "VIEW3D_PT_object");
 | 
			
		||||
	strcpy(pt->label, "Transform Properties");
 | 
			
		||||
	strcpy(pt->label, "Transform");
 | 
			
		||||
	pt->draw= view3d_panel_object;
 | 
			
		||||
	BLI_addtail(&art->paneltypes, pt);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
	pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel properties");
 | 
			
		||||
	strcpy(pt->idname, "VIEW3D_PT_properties");
 | 
			
		||||
	strcpy(pt->label, "View Properties");
 | 
			
		||||
	pt->draw= view3d_panel_properties;
 | 
			
		||||
	BLI_addtail(&art->paneltypes, pt);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel background");
 | 
			
		||||
	strcpy(pt->idname, "VIEW3D_PT_background");
 | 
			
		||||
	strcpy(pt->label, "Background Image");
 | 
			
		||||
	pt->draw= view3d_panel_background;
 | 
			
		||||
	BLI_addtail(&art->paneltypes, pt);
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
	pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel brush");
 | 
			
		||||
	strcpy(pt->idname, "VIEW3D_PT_brush");
 | 
			
		||||
	strcpy(pt->label, "Brush");
 | 
			
		||||
	pt->draw= view3d_panel_brush;
 | 
			
		||||
	pt->poll= view3d_panel_brush_poll;
 | 
			
		||||
	BLI_addtail(&art->paneltypes, pt);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
	pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel transform spaces");
 | 
			
		||||
	strcpy(pt->idname, "VIEW3D_PT_transform spaces");
 | 
			
		||||
	strcpy(pt->label, "Transform Orientations");
 | 
			
		||||
@@ -1758,7 +1769,7 @@ void view3d_buttons_register(ARegionType *art)
 | 
			
		||||
	strcpy(pt->label, "Greas Pencil");
 | 
			
		||||
	pt->draw= view3d_panel_gpencil;
 | 
			
		||||
	BLI_addtail(&art->paneltypes, pt);*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
	pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel bonesketch spaces");
 | 
			
		||||
	strcpy(pt->idname, "VIEW3D_PT_bonesketch_spaces");
 | 
			
		||||
	strcpy(pt->label, "Bone Sketching");
 | 
			
		||||
@@ -1771,7 +1782,7 @@ void view3d_buttons_register(ARegionType *art)
 | 
			
		||||
	strcpy(pt->label, "Last Operator");
 | 
			
		||||
	pt->draw= view3d_panel_operator_redo;
 | 
			
		||||
	BLI_addtail(&art->paneltypes, pt);
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
	// XXX view3d_panel_preview(C, ar, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user