Skip to content

Commit

Permalink
Working config for Linear Blend
Browse files Browse the repository at this point in the history
  • Loading branch information
rondreas committed Jun 15, 2022
1 parent a09e19c commit 754696f
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 1 deletion.
67 changes: 67 additions & 0 deletions configs/chanmod_linearblend.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<!-- Make nicer names for UI Display -->
<atom type="CommandHelp">
<hash type="Item" key="py.chanmod.linearblend@en_US">
<atom type="UserName">Linear Blend</atom>
<hash type="Channel" key="inputA">
<atom type="UserName">Input A</atom>
<atom type="Desc">First input to blend</atom>
</hash>
<hash type="Channel" key="inputB">
<atom type="UserName">Input B</atom>
<atom type="Desc">Second input to blend</atom>
</hash>
<hash type="Channel" key="blend">
<atom type="UserName">Blend Amount</atom>
<atom type="Desc">Zero blends fully to Input A while 100% goes fully to B</atom>
</hash>
<hash type="Channel" key="output">
<atom type="UserName">Output</atom>
<atom type="Desc">The resulting value of blending between A and B</atom>
</hash>
</hash>
</atom>

<atom type="Filters">
<hash type="Preset" key="py.chanmod.linearblend:filterPreset">
<atom type="Name">Linear Blend</atom>
<atom type="Description"></atom>
<atom type="Category">ProceduralItem:filterCat</atom>
<atom type="Enable">1</atom>
<list type="Node">1 .group 0 &quot;&quot;</list>
<list type="Node">1 itemtype 0 1 &quot;py.chanmod.linearblend&quot;</list>
<list type="Node">-1 .endgroup </list>
</hash>
</atom>

<atom type="Attributes">
<hash type="Sheet" key="py.chanmod.linearblend:sheet">
<atom type="Label">Linear Blend</atom>
<atom type="Filter">py.chanmod.linearblend:filterPreset</atom>

<hash type="InCategory" key="itemprops:general#head">
<atom type="Ordinal">128</atom>
</hash>

<!-- Makes a collapsible group -->
<list type="Control" val="div ">
<atom type="Label">Linear Blend</atom>
<atom type="Alignment">full</atom>
</list>

<!-- Add commands to UI to expose channels to users inside this sheet, -->
<list type="Control" val="cmd item.channel py.chanmod.linearblend$inputA ?"/>
<list type="Control" val="cmd item.channel py.chanmod.linearblend$inputB ?"/>
<list type="Control" val="cmd item.channel py.chanmod.linearblend$blend ?"/>
</hash>
</atom>

<!-- Put the Channel Modifier item into the category python -->
<atom type="Categories">
<hash type="Category" key="ChannelModifiers">
<hash type="C" key="py.chanmod.linearblend">python</hash>
</hash>
</atom>

</configuration>
14 changes: 13 additions & 1 deletion index.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- The kit name is an internal name (alphanumeric and underscore only, starting with a letter),
and must be globally unique. -->
<configuration kit="pysamples" version="0.1">
<import></import>
<import>lxserv</import>
<import>configs</import>

<!-- Absolute import of config -->
<import>lxserv/package/view3d_overlay/overlay_safe_area.cfg</import>
<!-- Well would just be swell if that actually worked... -->
<!-- <import>kit_pysamples:lxserv\package\channel_modifiers</import> -->
<!-- <import>lxserv/package/view3d_overlay/overlay_safe_area.cfg</import> -->

<!-- Define a nicer name for the python category -->
<atom type="Messages">
<hash type="Table" key="ChannelModifiers:category.en_US">
<hash type="T" key="python">Python</hash>
</hash>
</atom>

</configuration>
11 changes: 11 additions & 0 deletions lxserv/channel_modifiers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Channel Modifiers

## Linear Blend

A python channel modifier version from the SDK samples cmLinearBlend

### Config

To make plug-ins more user friendly Modo expects us to define plenty of things through config files.

See full config for linear blend [here](..\..\configs\chanmod_linearblend.cfg)

0 comments on commit 754696f

Please sign in to comment.