Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Project mapping from maxscript file

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
677 Views, 2 Replies

Project mapping from maxscript file

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.

 

Tags (2)
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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
Message 3 of 3
blakestone
in reply to: Anonymous

you can also use:

 

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report