CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 08-16-2011, 07:31 PM   #1
JokerMartini
Expert
 
JokerMartini's Avatar
portfolio
John Martini
CG Supervisor, 3D, Maxscript, VFX
Ingenuity Engine
Los Angeles, USA
 
Join Date: Mar 2009
Posts: 1,299
Send a message via AIM to JokerMartini
Functions - Adjusting properties bug

I'm recently posed a script here.
I'm working on condensing the code and I'm trying to make a function that does just that.
This is bugging out and I'm not sure exactly how to solve it.
http://jokermartini.com/extras/217/Welder

The setup. A spline object has a displace modifier on it and then the displace mod has a cellular map in the map slot.

Then run this function with the object selection.

Code:
fn fnDisplaceModChange prop val = ( undo on ( for i = 1 to selection.count do ( Obj = selection[i] for m in Obj.modifiers where (classOf m == Displace) and (classof m.map == Cellular) do m.prop = val ) ) ) fnDisplaceModChange (map.size) 50
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com

Last edited by JokerMartini : 08-16-2011 at 07:40 PM.
 
Old 08-16-2011, 07:44 PM   #2
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,307
Send a message via ICQ to denisT
Quote:
Originally Posted by JokerMartini
Code:
fn fnDisplaceModChange prop val = ( undo on ( for i = 1 to selection.count do ( Obj = selection[i] for m in Obj.modifiers where (classOf m == Displace) and (classof m.map == Cellular) do setproperty m prop val ) ) ) fnDisplaceModChange #size 50


it was wrong using of property name, and setting a property
 
Old 08-16-2011, 07:47 PM   #3
JokerMartini
Expert
 
JokerMartini's Avatar
portfolio
John Martini
CG Supervisor, 3D, Maxscript, VFX
Ingenuity Engine
Los Angeles, USA
 
Join Date: Mar 2009
Posts: 1,299
Send a message via AIM to JokerMartini
Understandable

Thank you for clearing that up Denis.
I was wondering why it was not working vs when it would work when it was outside of the function.

Thanks
__________________
____________ ___ __ _
John A. Martini
JokerMartini@hotmail.com
www.JokerMartini.com
 
Old 08-16-2011, 07:47 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:51 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.