visual3d:tutorials:pipeline:meta_command_creation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:tutorials:pipeline:meta_command_creation [2024/06/19 12:55] – sgranger | visual3d:tutorials:pipeline:meta_command_creation [2024/07/17 15:47] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== combining pipeline scripts into a meta-command | + | ====== Meta Command Creation ====== |
- | this is an example for creating | + | ==== Combining Pipeline Scripts into a Meta-Command ==== |
- | 1. suppose you have a pipeline script that generates a metric or some sort of result. | + | This is an example for creating |
- | 2. suppose also, that you have a second | + | 1. Suppose |
- | 3. finally | + | 2. Suppose also, that you have a second script that needs the result of the first script. |
+ | |||
+ | 3. Finally | ||
\\ | \\ | ||
- | here is an extremely simplistic example. | + | Here is an extremely simplistic example. |
- | (note: naturally, these scripts will not run separated like this – the input value would have to be stored somewhere. | + | (Note: Naturally, these scripts will not run separated like this – the input value would have to be stored somewhere. |
\\ | \\ | ||
Line 18: | Line 20: | ||
< | < | ||
- | script1.v3s: | + | Script1.v3s: |
- | prompt_for_pipeline_parameter_value | + | Prompt_For_Pipeline_Parameter_Value |
- | /pipeline_parameter_name=the_input_number | + | /PIPELINE_PARAMETER_NAME=the_input_number |
- | /prompt=pick a number! | + | /PROMPT=Pick a number! |
; | ; | ||
</ | </ | ||
Line 29: | Line 31: | ||
< | < | ||
- | script2.v3s: | + | Script2.v3s: |
- | set_pipeline_parameter | + | Set_Pipeline_Parameter |
- | /parameter_name=output_text | + | /PARAMETER_NAME=output_text |
- | /parameter_value_prefix=your number was... | + | /PARAMETER_VALUE_PREFIX=Your number was... |
- | /parameter_value=:: | + | /PARAMETER_VALUE=:: |
; | ; | ||
</ | </ | ||
- | here is a process to modify the scripts so that they work together:\\ | + | Here is a process to modify the scripts so that they work together:\\ |
- | - convert | + | - Convert |
- | - save the new meta-command in the proper | + | - Save the new meta-command in the proper |
- | - edit the first script to call the meta-command\\ | + | - Edit the first script to call the meta-command\\ |
\\ | \\ | ||
- | edit **script2.v3s** and change it to the following, and save it as **number_game.v3m**. //note that the meta-command syntax is simply a few lines as a header, and then changing any input parameter names to match. | + | Edit **Script2.v3s** and change it to the following, and save it as **number_game.v3m**. //Note that the meta-command syntax is simply a few lines as a header, and then changing any input parameter names to match. |
< | < | ||
- | ! begin_meta | + | ! BEGIN_META |
- | ! meta_cmd_name=number_game | + | ! META_CMD_NAME=number_game |
- | ! meta_param= the_num: string :: | + | ! META_PARAM= THE_NUM: string :: |
- | ! end_meta | + | ! END_META |
- | set_pipeline_parameter | + | Set_Pipeline_Parameter |
- | /parameter_name=output_text | + | /PARAMETER_NAME=output_text |
- | /parameter_value_prefix=your number was... | + | /PARAMETER_VALUE_PREFIX=Your number was... |
- | /parameter_value=::the_num | + | /PARAMETER_VALUE=::THE_NUM |
; | ; | ||
| | ||
</ | </ | ||
- | copy the file **number_game.v3m** to the meta-command directory: | + | Copy the file **number_game.v3m** to the meta-command directory: |
\\ | \\ | ||
- | edit **script1.v3s** and change it to the following: | + | Edit **Script1.v3s** and change it to the following: |
< | < | ||
- | prompt_for_pipeline_parameter_value | + | Prompt_For_Pipeline_Parameter_Value |
- | /pipeline_parameter_name=the_input_number | + | /PIPELINE_PARAMETER_NAME=the_input_number |
- | /prompt=pick a number! | + | /PROMPT=Pick a number! |
; | ; | ||
| | ||
number_game | number_game | ||
- | /the_num=:: | + | /THE_NUM=:: |
; | ; | ||
</ | </ | ||
- | that’s it. restart visual3d | + | That’s it. Restart Visual3D |
- | note also that if you copy script1.v3s to c:\program files (x86)\visual3d | + | Note also that if you copy script1.v3s to C:\Program Files (x86)\Visual3D |
visual3d/tutorials/pipeline/meta_command_creation.1718801703.txt.gz · Last modified: 2024/06/19 12:55 by sgranger