Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Scripting: finding values of Custom Parameters

Scripting: finding values of Custom Parameters

2005-02-04       - By Denis-Jose Francois

 Back
Reply:     1     2     3     4  

Hi Folks

Here is the situation:

I am having trouble determining if a custom parameter exists on a particular
object (in this case, a polymesh).

As I have a script which is intended to run over many and varied objects
looking for these particular parameters, I do not wish to hard code them
into the script.

The CustomPSet will be consistently named however, and I am able to find
this with no problem.

The following piece of code will add a custom parameter to any object or
selection of objects:

'begin
code-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
-- ---- ---- --->8

MySel = GetValue("SelectionList")
Set MyCol = CreateObject("XSI.Collection")
MyCol.setastext MySel

for each elem in MyCol
 element = elem.Parent & "." & elem.Name
 SelectObj element

 AddProp "Custom_parameter_list", , , "lightscape_surface_properties"
 SIAddCustomParameter element, "surface", siDouble, 1, 0.04, 10, , 4, 0.04,
10
 SIAddCustomParameter element, "Occluding", siBool, 1, 0, 1, , 4, 0, 1
next

DeselectAll

for each elem in MyCol
 element = elem.Parent & "." & elem.Name
 AddToSelection element
next

'end
code-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
-- ---- ---- --->8

Once the properties of the custom parameter have been modified, I need to
have another script read back the properties from all objects that have this
parameter set. This means it has to trawl through all of the items in the
scene *and first determine if the parameter has been applied*. Then read
back the current settings.

Any thoughts?

Mark Ludford
Fallen Angels

---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi