PDA

View Full Version : Simple Mod Animatable not working 2009?


bnvm
08-01-2008, 07:52 PM
I have a scripted modifier that has some animatable properties. It works fine in 2008 but in 2009 the modifier is no longer animatable. All of the properties have animatable:true set. Is this just me or has anyone else had this issue, also any suggestions on how to fix would be great. Thanks,

-bnvm

thorsten hartmann
08-02-2008, 11:48 PM
hi,

i have the same problem.


bo_default = attributes bo_default_definition
attribID:#(0x2d8552ed, 0x4f2b95b0)
version:1
(
parameters main
(
bo_film_iso type:#integer default:100 animatable:true
bo_camera_shutter type:#float default:1000 animatable:true
bo_f_number type:#float default:5.3 animatable:true
bo_vignetting type:#float default:0.0 animatable:true
bo_film_iso_slider type:#integer default:2
bo_camera_shutter_slider type:#integer default:10
bo_f_number_slider type:#integer default:5
)
)


can anybody help?:)

ZeBoxx2
08-03-2008, 01:03 AM
are you sure you have the same problem, Thorsten?


maxVersion()
#(11000, 25, 0)
$
$GeoSphere:GeoSphere01 @ [36.531364,-0.000001,12.915129]
custAttributes.add $ bo_default
true
with animate on at time 100 ( $.bo_film_iso = 200.0 )
200.0
at time 0 ( $.bo_film_iso )
100
at time 100 ( $.bo_film_iso )
200


Keyframes also show up in the timeslider and in trackview. Tested both 3ds max 2008 and 2009 - the above is 2009, sp3 ( not quite sure if the 'sp3' is reflected in the maxVersion() result )

ZeBoxx2
08-03-2008, 01:06 AM
I have a scripted modifier that [...] in 2009 [...] is no longer animatable. Is this just me or has anyone else had this issue

Can't say I've done much with scripted modifiers, but mine are okay. Here's the Help file example adjusted to have its one parameter be animatable:


plugin simpleMod saddle
name:"SaddleDeform"
classID:#(685325,452281)
version:1 (

parameters main rollout:params (
amount type:#integer ui:amtSpin default:20 animatable:true
)

rollout params "Saddle Parameters" (
spinner amtSpin "Amount: " type:#integer range:[0,1000,20]
)

on map i p do (
p.z += amount * sin((p.x * 22.5/extent.x) * (p.y * 22.5/extent.y))
p
)
)


See if that works? Worked fine in 2008 and 2009sp3 here.

thorsten hartmann
08-03-2008, 12:26 PM
ah thank you very much.;)

thorsten hartmann
08-03-2008, 02:24 PM
Hi

when i try it, comes a error.


macroScript Photostudio category:"mental ray" buttonText:"Photo Studio Pro (eng)" tooltip:"Photo Studio Pro (eng)" icon:#("Exposure",1)
(
parameters main rollout:rDOF (
ani_mount type:#integer ui:amount default:20 animatable:true
)


Error:

-- Error occurred in anonymous codeblock; filename: C:\Documents and Settings\thorsten\Local Settings\Application Data\Autodesk\3dsmax\2009 - 64bit\enu\UI\usermacros\mental ray-Photostudio.mcr; position: 154
-- Syntax error: at parameters, expected <factor>
-- In line: parameters m


rDOF is the Name of Rollout
amount is the Rollout-Button
ani_amount is the Variable

mfg
hot chip

ZeBoxx2
08-03-2008, 05:10 PM
hi thorsten,

Looks like you're confusing macroscripts with scripted plugins.

Macroscripts (definitions starting with 'macroscript') are only containers for script code, allowing you to use that script code in toolbar buttons, menu items, the right-click menu, etc.


Scripted plugin definitions (starting with 'plugin') are what allow you to create 'plugins' that show up in things like the create panel, modify panel, material editor, etc. depending on the plugin you're scripting.

In your case, as you're scripting a modifier plugin, you would be using something like:


plugin simpleMod photostudio
name:"Photo Studio Pro (eng)"
classID:#(0x5d8f8ad0, 0x3d2c7ed6)
version:1 (

rollout rDOF "rDOF" (
spinner amount "amount"
)

parameters main rollout:rDOF (
ani_mount type:#integer ui:amount default:20 animatable:true
)
)


However, I'm not sure if a scripted modifier plugin is actually what you're looking for - as scripted 'simple' modifiers are typically used to adjust geometry - whereas the nature of your code leads me to believe that you would be modifying existing parameters of a camera type.

If the latter is the case, you may wish to write a scripted camera plugin instead, which then 'extends' the existing camera plugin's class. That gives you direct access to the original camera's parameters, while being able to specify your own parameters, own user interface and even your own camera mesh (if desired).
Check the "Scripted Camera Plug-ins" topic for more information on this :)

thorsten hartmann
08-03-2008, 07:19 PM
ah,

know i am understand. Thank you...

mfg
hot chip

CGTalk Moderation
08-03-2008, 07:19 PM
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.