[projection mapping] projectionTypes.sameAsSource = off

Hello,

im new to learn max script.

I try to create a batch script from projection modi, that should copy uv1 from source to uv2 to target object.

The max listener give me:

$.modifiers[#Projection].projectionTypes.sameAsSource = off

but i become an #error
-- Unknown property: "PROJECTION_MAPPING" in Projection:Projection
-- Unknown property: "sameAsSource" in #(ReferenceTarget:ProjectionModTypeUVW)

the doc says: <Project_Mapping>.sameAsSource (Same_as_Source) : boolean

I think i need the projection mapping index ID to declare the property? But how i do this? I found no "Project_Mapping" syntax samples.

When i press the "project" button and select the target object and type this:
$.modifiers[#Projection_Holder_1].projector.sameAsSource = off
then work it.

Can anyone me say how the command or syntax i need?

My current code is attach.

regrads,
ulrich

AttachmentSize
projectionmapping.ms1.63 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
N00BYZOR's picture

Found a workaround !

Hi,

I'm trying to make a similar script.
I managed to find a workaround for the UV1 to UV2 projection.

Since the only way to change it via maxscript seems to be projecting and selecting the target object, well that's exactly what I did in the scripts ^^
To use my script just select the source object, then select the target object by holding CTRL (to add it to the selection) and press the "Map Decal" button.

This is the first projection:

TheBaseMesh.modifiers[#Projection].addObjectNode TheDecal TheBaseMesh.modifiers[#Projection].addRegisteredProjectionType 1
TheBaseMesh.modifiers[#Projection].projectProjectionType 1

Then I use the newly created modifier on the target object:

TheDecal.modifiers[#Projection_Holder_1].projector.sameAsSource = false
TheDecal.modifiers[#Projection_Holder_1].projector.targetMapChannel = 2

And then I do the projection again to get the UV1 of the source projected to the UV2 of the target:

TheBaseMesh.modifiers[#Projection].projectProjectionType 1

Hope it will help :)

But now I would like to do the same for vertex color and vertex alpha, but it seem it's impossible to do it via maxscript, there is nothing in the documentation: http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/index.html?url=fil...

I really don't understand...

AttachmentSize
decal_tool.ms 2.15 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.