PDA

View Full Version : sub-object-Gizmo


gopherCG
10-27-2003, 11:07 PM
Hi, I'm working on Lattice and vol. Select modifiers.
How do I access sub-objects? This doesn't work for using the default box select volume:
obj.volSelect.position = [0,0,1]
Nor this:
obj.volSelect.gizmo.position = [0,0,1]

magicm
10-27-2003, 11:30 PM
obj.volSelect.gizmo.position = [0,0,1]

this should work. Could you post a part of your script? maybe the problem lies elsewhere

Martijn

gopherCG
10-28-2003, 09:20 AM
Here's the section about VolumeSelect modifier:

addModifier bObjLattice (VolumeSelect())

bObjLattice.VolSelect.volume = 0 --box
--bObjLattice.VolSelect.node = bObjLattice.VolSelect.volume
bObjLattice.VolSelect.invert = true
--hello = bObjLattice.VolSelect.gizmo
bObjLattice.VolSelect.gizmo.position = [0,0,-0.01]
bObjLattice.VolSelect.gizmo.scale = [2,2,1]

Error popup:
--Unkown property: "gizmo" in Vol__Select:Vol. Select

LFShade
10-28-2003, 04:38 PM
That code works fine for me. What happens if you do it by first creating the modifier and setting its properties, then assigning it to the object and setting the gizmo, something like this:

vsMod = volumeSelect()
vsMod.volume = 0
vsMod.invert = true
addModifier bObjLattice vsMod
vsMod.gizmo.position = [0,0,-0.01]
vsMod.gizmo.scale = [2,2,1]


RH

gopherCG
10-29-2003, 02:26 PM
Hey, LFShade, I tried your code in a macro. Somehow trying your code sparked an epiphany: Maybe I can't add vol. Select onto a parametric object (box in my case) stably. So converting to mesh solved it. Anyways, great thanks!

I'm using max4, waiting for my max6, so hopefully the help file would improve and mention things like I can use mesh, but not param objs and such.

gopherCG
10-29-2003, 03:09 PM
Wait, the problem is not in the parametrix object. I noticed if the modify panel is not open, then it doesn't work. And there are no ways to tell it to "open" the mod panel. Is there?

LFShade
10-29-2003, 07:30 PM
You can use max modify mode to open the modify panel, then do the rest. Funny thing is, I tried running it (my version) with the create panel open because I thought that might be the problem, but it worked just fine. Then again, I'm using Max5 and I don't really remember if this would be a version issue.


RH

gopherCG
10-31-2003, 07:23 AM
Sorry for the late reply...working furiously at this city script.
The max modify mode does work here, thanks.

This thing is users might feels strange when the panel jumps from utility to modifier panel 50+ times when running it. I made an alternative: using a mesh node as volume. It take more memory herhaps, but avoids accessing the gizmos (and problems in Max4).

About the city script: The lattice is for the modern skyscraper glass panels, with the roof deselected to prevent the lattice there, which is one of several styles of buildings in the city.
And the city starts to need a hierarchy to organize all the city parts. I'm wondering, is it easy to migrate my script from Utility to Geometry superclass? making user manipulation easier, with stored values in the scene for later editing.

How do I start learning the geometry plug-in? The Wad-O-maxscript tuts are mostly utility, floating, or controller scripts.

CGTalk Moderation
01-16-2006, 12:00 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.