ScriptSpot home

mapDroper

Downloads

Earlier releases (1)
3ds Max compatibility
See original listing claims
Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.

Listing details

Version
2.1
From original requirements
2010 or newer
Original version requirement
2010+
Author’s update date
Legacy votes
4
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

Posted by

barigazy

Branko Živković

More by this author

----------------------------------------------------------------------------------------------------------- [version 2]

This little tool allows you to put a texture with drag and drop method from any folder to
specified slot of the Material Editor.

Additional Info

Just drag & drop map file to script label box (Drop Here).
If file is valid script will throw "OK" else "NO".
Not supports multiple draged files.
Supported materials are: Standard, VRayMtl, Arch & Design
Supported map types are: *.hdr, *.exr, *.jpg, *.tga, *.tif, *.bmp, *.png, *.jpeg, *.psd.
See the image below to see how it works:

This script is requested by roamn

Comments (8)

Comment policy

jaber

Another usage of this beautiful script-- Easy drag and drop impo

Hi Branko

Thanks for sharing this beautiful script . I just reuse your script to easy drag and drop Image importer. Here it is

/*//////////   SCRIPT:   mapDroper v.1.0   //////////*/
/*//////////   WRITTEN BY:   Branko Zivkovic   //////////*/
/*//////////   EMAIL:   barigazy@hotmail.com   //////////*/
(
	try(destroydialog ::mapDrop) catch()
	rollout mapDrop "Easy Image Importer"
	(
		local mapExt = #(".hdr", ".exr", ".jpg", ".tga", ".tif", ".bmp", ".png", ".jpeg", ".psd"), dropState = off		
		local stdProps = #("diffuseMap")
		local classArr = #(Standardmaterial)
		dotnetcontrol drop "Label" pos:[5,5] width:150 height:40
		dotnetcontrol props "CheckedListBox" pos:[5,50] width:140 height:10
		radioButtons 'window_' "Window" pos:[10,60] width:78 height:30 labels:#("Top","Front") columns:2 align:#left
		
		mapped fn trimArr arr &new = (append new (substring arr 8 100))			
			
		fn checkIsImage arg arr =
		(
			arg.Data.ContainsFileDropList() and (arg.Data.GetFileDropList()).count == 1 and \
			(for ext in arr where matchpattern ext pattern:(getFilenameType (arg.Data.GetFileDropList()).item[0]) collect ext).count != 0
		)
		fn updateMat propctrl mtl map idx =
		(
			for ci in 0 to propctrl.CheckedItems.count-1 do
			(
				slotName = if idx == 2 then ("texmap_"+propctrl.CheckedItems.item[ci]) else propctrl.CheckedItems.item[ci]
				setProperty mtl slotName map
			)
		)

		
		on mapDrop open do
		(
			props.BackColor = drop.BackColor = (dotNetClass "System.Drawing.Color").FromArgb 40 40 40
			props.ForeColor = drop.ForeColor = (dotNetClass "System.Drawing.Color").FromArgb 200 200 200
			props.BorderStyle = drop.BorderStyle = (dotNetClass "BorderStyle").FixedSingle
			drop.Font = (dotNetObject "System.Drawing.Font" "Impact" 20)
			drop.TextAlign = drop.TextAlign.MiddleCenter
			props.HorizontalScrollbar = props.MultiColumn = false
			drop.Text = "Drop Image " ; drop.AllowDrop = props.CheckOnClick = true
			props.Items.AddRange stdProps
			--format "itm = %\n" mtltype.selection 
		)

		on drop DragOver s arg do
		( 
			arg.Effect = if checkIsImage arg mapExt then
			( 
				s.Text = "Done" ; dropState = on ; arg.Effect.Move
			) 
			else 
			(
				s.Text = "NO" ; dropState = off ; arg.Effect.None
			)
		)
		
		on drop DragDrop arg do
		(
		imgFile = (arg.Data.GetFileDropList()).item[0]
		tempMap = openBitMap imgFile
		imgPlane = plane name:(uniqueName("hhh" + (getfilenameFile imgFile))) length:(tempMap.height) width:(tempMap.width) lengthsegs:1 widthsegs:1 mapCoords:true isselected:true
			
------Import an image	START		
		case window_.state of
		(
			------Top
			1:(	imgPlane.transform = matrix3 1)
			-----Front 
			2:(imgPlane.transform = RotateXMatrix 90 )
		)	
		
		imgMaterial = standard()
		imgMaterial.name = imgPlane.name
		imgTexture = bitmaptexture()
		imgTexture.bitmap = tempMap
		imgMaterial.diffuseMap = imgTexture
		imgPlane.material = imgMaterial
		imgMaterial.twoSided = on
		showTextureMap imgMaterial imgMaterial.diffuseMap on
		close tempMap			
		)
	)
	
	
	createdialog mapDrop 160 100 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)
)

If you are not OK with this just tell me to delete this post.

Thank again for sharing all your beautiful script

Vidi

Hi Barigazy, very nice script!
Is possible to add the option of drop more than one map at the same time?
Would be great.
Thanks for your work

Toby

VRAY Error

I use 3D Max 2017, but not VRAY so this shows a VRAY MTL error when I go to install. Hopefully this can be fixed...

Willian Kim

Good Work... nice.

Al

how to use this script?

Reply to Al
Branko Živković

I update the script.See image, it very simple to use