Project mapping from maxscript file

This widget could not be displayed.

Project mapping from maxscript file

Anonymous
Not applicable

Hello,

 

I am unable to generate a Project Mapping in Projection modifier from a MaxScript file.

 

When I try it in MaxScript listener directly, it works. But when I run it from a MaxScript file it doesn't.

 

addModifier $myObj (Projection())
$myObj.modifiers[1].addObjectNode $target
$myObj.modifiers[1].addRegisteredProjectionType 1
$myObj.modifiers[1].projectAll()

The projection modifier is well created, and the target object is added as Reference Geometry too.

I also tried to make a completeRedraw(), but it doesn't seem to help.

 

Thank for your help.

 

0 Likes
Reply
Accepted solutions (1)
679 Views
2 Replies
Replies (2)

Anonymous
Not applicable
Accepted solution

I finally found a solution, since completeRedraw doesn't affect the CommandPanel, we need to be sure to set it in modify mode and select the object with Projection modifier to work.

 

select $myObj
if getCommandPanelTaskMode() != #modify do setCommandPanelTaskMode #modify
0 Likes

blakestone
Collaborator
Collaborator

you can also use:

 

max modify mode
--------------------------------------------------------------------------------------
Technical 3D Graphic Artist
Autodesk 3dsMax 2015 - Service Pack 4
--------------------------------------------------------------------------------------
0 Likes