Message 1 of 23
transfering uvw data via maxscript
Not applicable
02-11-2010
10:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i am completely new to maxscript, so maybe this is a dumb question:
i am trying to use maxscript to transfer uvw coordinates from one object to another.
my test file contains a poli called 01 and another one called 01a (the final file will have a series of such groups (02/02a, 03/03a,...)).
01 has an unwrapUVW modifier containing the correct cordinates which should be transferred to 01a.
i tried with recording a drag and drop action of the modifier, but this did not work.
i also tried to safe and load the uvs with the following script:
basically it works, but it asks me where to safe the uvw-file and then again asks which uvw file to load, which is not so convinient. can i specify a path in the script, which says where to save and load the uv date?
of course i would prefer transferring the data without saving in between.
any help would be appreciated
i am trying to use maxscript to transfer uvw coordinates from one object to another.
my test file contains a poli called 01 and another one called 01a (the final file will have a series of such groups (02/02a, 03/03a,...)).
01 has an unwrapUVW modifier containing the correct cordinates which should be transferred to 01a.
i tried with recording a drag and drop action of the modifier, but this did not work.
i also tried to safe and load the uvs with the following script:
macroScript Macro27
category:"DragAndDrop"
toolTip:""
(
actionMan.executeAction 0 "40021" -- Selection: Select All
macros.run "Modifier Stack" "Convert_to_Poly"
$.material = meditMaterials
clearSelection()
select $a1
subobjectLevel = 4
$.EditablePoly.attach $1 $
subobjectLevel = 0
modPanel.addModToSelection (Uvwmap ()) ui:on
$.modifiers.length = 40.71
$.modifiers.width = 210.34
modPanel.setCurrentObject $.baseObject
subobjectLevel = 4
$.EditablePoly.SetSelection #Face #{1}
actionMan.executeAction 0 "40020" -- Edit: Delete Objects
$.EditablePoly.delete #Face
subobjectLevel = 0
modPanel.setCurrentObject $.modifiers
modPanel.addModToSelection (Unwrap_UVW ()) ui:on
$.modifiers.unwrap.save ()
select $t1
modPanel.addModToSelection (Unwrap_UVW ()) ui:on
$.modifiers.unwrap.load ()
)
basically it works, but it asks me where to safe the uvw-file and then again asks which uvw file to load, which is not so convinient. can i specify a path in the script, which says where to save and load the uv date?
of course i would prefer transferring the data without saving in between.
any help would be appreciated