Possible to control parameter settings?
Gordig
Posts: 10,171
I'm pretty new to content creation, so forgive me if there's an obvious way that I'm just missing, but I'm wondering if this is possible. I have a rotary switch that I've modeled, which is basically a knob that locks into different positions instead of spinning freely. I created a new parameter that selects between 7 positions, and that's working fine, but could I, for instance, create another parameter that controls the min/max limits? I haven't been able to find a way to do that within the ERC freeze options, and I just tried creating a properties preset with different limits, but that didn't work either. Can this be done? If so, how?
Comments
I can't immediately think of a way to do it, no. A script could adjust the llimits, but that's not the same as a button/sider.
Thank you. I'll eventually need to get into scripting anyway, so how can I get started on that?
Have a look at the samples - those dealing with properties are most likely to be directly relevant http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/start#properties
You want to control the Min/Max limits of the parameter that controls the 7 positions?
Or do you want to control the min/max of each of the 7 positions and also have the parameters that controls the 7 positions?
I’d like to know how to both, actually, if the latter is even possible.
You can control parameters with other parameters using the ERC. You are aware of the Property Hierarchy tab?
To control the Min/Max limits of the parameter that controls the 7 positions just create another parameter to control that one. Same goes for the latter one, it can get confusing layering a bunch of parameters on top of other parameters but the principle behind it is easy to understand.
to control the min/max of each of the 7 positions and also have the parameters that controls the 7 positions ->
- so you want to create a parameter for each position; let's say that position 1 is at 30 degrees, 2 at 60 degress, and so on
- rotate said dial at 30 degrees -> enter Edit Mode -> Create new Property -> name it "Position 1" -> right click -> ERC freeze -> choose the modified Rotate parameters you've set at 30 segrees (everything else should be unchecked) -> hit ok, then right click on the "Position 1" parameters -> Show in Property Hierarchy -> go to Sub-Components
note: "Sub-Components" shows what other parameters the parameters controls, "Controllers" show what other parameters control the current parameter
- in Sub-Components -> 1st Stage -> now you should see the parameters the "Position 1" parameter controls -> it should show you something like ERC [Delta Add]: X/Y/Z Rotate -> open it and go to Attributes -> change it to [Keyed] -> then go down to the "Keys" area -> add 2 keys (click on the Keys row and a plus sign should appear) -> write "Key 0: 0", "Key 1: 30" (what this means is at "Position 1" set to 1 rotate +30 degrees)
- what's important to understand here is that now "Position 1" will not set the dial at 30 degrees, it will ADD 30 degrees to whatever position the dial is rotated at
- repeat this for dials "Position 2", "Position 3", etc
- what you have now are 7 dials, each of which will ad +30 degrees of rotation
- now create another dial called "Positions" -> set all "Position 1-7" to 1 -> hit ERC freeze on the "Positions" dial -> select all 7 of the modified parameters -> repeat all the previous steps
- now you have 7 propreties to adjust
- go to "Position 1", set it to Keyed with the keys: Key 0: 0, Key 1: 1
- go to "Position 2", set it to Keyed with the keys: Key 0: 0, Key 1: 0, Key 2: 1
- go to "Position 3", set it to Keyed with the keys: Key 0: 0, Key 1: 0, Key 2: 0, Key 3: 1
- and so on for all 7
- the end result is that this new "Positions" parameter will move the dial with increments of +30 degrees
- now repeat the same process and create a new parameter called "Position Limits" and just ERC freeze it with the Rotate parameter
- when you key this one it should look something like Key -10: -10, Key 0: 0, Key 10: 10
- the end result is that you'll have a "Positions" dial which will move the dial in increments of 30 degrees, and another parameters "Position Limits" which will add a wiggle of +/- 10 degrees to any of the 7 positions
From a practical standpoint I think going this route is pointless, just rotate the dial at whatever position you want. But this should show you the process behind setting up dials on top of dials.
Thank you for the responses, it will take me some time to work through them.