Ask a Question related to Macromedia Director 3D, Design and Development.
-
Wriker #1
Hiding/unhiding parts of model
I am trying to hide & unhide part of a model, for example one side of a box, by
setting model[aModel].resource.front to FALSE to hide it, and back to TRUE to
unhide it. This works, except that it loses it shader when I set it to FALSE.
Is there another way to temporarily hide parts of a model, without losing
shader properties? Setting blend to 0 doesn't work, because then it hides ALL
sides of the box (I guess because all sides use the same shader).
Wriker Guest
-
New release of Config::Model with fstab model example
Hello I'm happy to announce the new release of the Config::Model perl module (v0.506) . This release features a Fstab example with its fstab... -
model showing in 3d editor but not in castmember model list
Hi all, Ok this is a little odd... I have 3d cast member from which I'm clonefromcastmember-ing a model. One of this model's children is... -
Hiding parts that go over the document edges?
Hi, I try to use Macromedia Freehand 10 with PC and I have following kind of problem: How do I remove/hide parts that go over the document... -
Model within model transform.position, intersection, overlapping models
Ok, I have a large sphere, and within that sphere a sun with rays. The sun object is the parent object while each individual ray is a child object. ... -
Forms - unhiding database view and toolbars
I wanted to be able to hide the database view when a database is opened. I managed to achieve this using Tools- lost the tools menu. -
openspark #2
Re: Hiding/unhiding parts of model
How hard is it to create an object which...
* uses a property to remember which shader was used on that mesh
* hides the mesh
Then
* restores the mesh
* restores the shader
....?
openspark Guest
-
Wriker #3
Re: Hiding/unhiding parts of model
Harder than you'd think. It restored not even half the shaders, for some reason.
--hide
pRememberShaders.addProp(aModel, gWorld.model[aModel].shaderList)
--unhide
gWorld.model[aModel].shaderList = pRememberShaders.getProp(aModel)
If I output pRememberShaders to the message window, it does appear complete.
Wriker Guest
-
a?ex #4
Re: Hiding/unhiding parts of model
<blockquote>quote:<br><hr><i>Originally posted by: <b><b>Wriker</b></b></i>
Harder than you'd think. It restored not even half the shaders, for some
reason.
--hide
pRememberShaders.addProp(aModel, gWorld.model[aModel].shaderList)
--unhide
gWorld.model[aModel].shaderList = pRememberShaders.getProp(aModel)
If I output pRememberShaders to the message window, it does appear
complete.<hr></blockquote>
You stored a reference to the list.
The variable points only to the list "shaderlist". If the list entries change
the changes will be reflected in the variable too.
You'll need the duplicate command to store the CURRENT state of the list:
pRememberShaders.addProp(aModel, duplicate(gWorld.model[aModel].shaderList))
this should work. nonetheless you must be careful. as the list contains
pointers to the different shaders. if you delete one of these shaders, the list
item will be void afterwards. So you can't rely on all being valid shader
objects throughout the movie.
If it was me, defensive programmer, I'd store the NAME of the shader I am
interested in as a string and when I try to reste it later, I first check if a
shader with the given NAME still exists in the 3-D member object.
That's a matter of code design. There are different approaches.
HTH
a?ex Guest



Reply With Quote

