Profile Picture

Project: Set Prop Diffuse Color Keys

Posted By jlittle Last Month
Rated 5 stars based on 2 votes.
Author
Message
jlittle
jlittle
Posted Last Month
View Quick Profile
Distinguished Member

Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)

Group: Forum Members
Last Active: 1 hour ago
Posts: 1.5K, Visits: 11.5K
Wanted to show some details of my first script I have been working on since I decided to dive into python for iClone which turned out to be a deep, deep dive.
I've worked out most of the issues but am waiting the next iClone python update to fix some functions that are not working so that I can complete this.


On the right is the color change list where you would create a list of color changes.
Each color change has a starting color and transition and a duration.

Clicking on the color box brings up a color dialog to select your color.

So you would end up with a list of color changes:

For the color changes you can REORDER them by dragging and dropping them within the list, REMOVE them, or ADD another color change.
You can also SAVE the list to a file and LOAD a previously save list from a file or CLEAR the current ist.
At the bottom of the list is the total duration time, for all color changes, in seconds and frames as well as the number of changes in the list.

On the left is the prop list.

This list will automatically update as props are added or deleted from the scene.
As you select props in the scene the they will also be selected in the prop list.
I plan on having selections in the prop list also select the prop in the scene but ... waiting on updated python API.

Once you've created a color change list, selected your prop(s), you would then select the start and end time (via spinbox or slider), select the number of times to repeat the changes and then click the ADD button to add the diffuse color keys.

The "Remove all keys prior" will delete any color diffuse keys (once that function is exposed) prior to adding the new keys.

This project is about 90% completed and already pushing 950 lines.
Doing this project covered many aspect of python and the RL API, which was the point of this project: Learn Python and the iClone API.
It even uses Qt ui files for the layouts (main dialog and color change).
There is still some cleanup to do and then the final coding, once the functions are fixed and exposed.
It was an interesting experience and there is still much to learn about this.

Jeff





See my CTA Tutorials on the YouTube channel CTAStepByStep
Check out EZColors for CTA. The easy way to change Render Styled (RS) colors.

luke (RL)
luke (RL)
Posted Last Month
View Quick Profile
Junior Member

Junior Member (181 reputation)Junior Member (181 reputation)Junior Member (181 reputation)Junior Member (181 reputation)Junior Member (181 reputation)Junior Member (181 reputation)Junior Member (181 reputation)Junior Member (181 reputation)Junior Member (181 reputation)

Group: Power Developer
Last Active: 2 days ago
Posts: 105, Visits: 3.2K
wow, very useful tool, any issue found when you do this kind of tool?
toystorylab
toystorylab
Posted Last Month
View Quick Profile
Distinguished Member

Distinguished Member (3.1K reputation)Distinguished Member (3.1K reputation)Distinguished Member (3.1K reputation)Distinguished Member (3.1K reputation)Distinguished Member (3.1K reputation)Distinguished Member (3.1K reputation)Distinguished Member (3.1K reputation)Distinguished Member (3.1K reputation)Distinguished Member (3.1K reputation)

Group: Forum Members
Last Active: 1 hour ago
Posts: 894, Visits: 8.0K
Nice, as far i understand what it is doing Wink
Would this be possible with diffuse JPEGs/PNGs?

jlittle
jlittle
Posted Last Month
View Quick Profile
Distinguished Member

Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)

Group: Forum Members
Last Active: 1 hour ago
Posts: 1.5K, Visits: 11.5K
toystorylab (1/18/2019)
Would this be possible with diffuse JPEGs/PNGs?

Well, the framework of my script would definitely handle that.
Could easily change the color to a tile and the transition to a channel selection.

I have not tried the AddUvDataKey function yet and am unsure of the format of the kUVTile parameter.
I'll look into it some.

Jeff




See my CTA Tutorials on the YouTube channel CTAStepByStep
Check out EZColors for CTA. The easy way to change Render Styled (RS) colors.

jlittle
jlittle
Posted Last Month
View Quick Profile
Distinguished Member

Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)Distinguished Member (3.3K reputation)

Group: Forum Members
Last Active: 1 hour ago
Posts: 1.5K, Visits: 11.5K
luke (RL) (1/18/2019)
... any issue found when you do this kind of tool?

There was a little learning curve, for me, on using python but being a looong time programmer it was just a matter of finding where everything was at.
Mostly the issues have been missing API functions that are needed or questions about constants:
  1) How do I get a list of all the material keys?
  2) How do I delete all, or just one, material key?
  3) How do I add a material transition key?
  4) Why are there 36 transition types (ETransitionType_<type>Wink listed in RLPy.py but iClone only shows 16 transition Curve Presets?
  5) What format is the kUVTile parameter?

I haven't gone thru all the functions yet since as my first project I pretty much just stuck to the one area of materials mostly.

Jeff




See my CTA Tutorials on the YouTube channel CTAStepByStep
Check out EZColors for CTA. The easy way to change Render Styled (RS) colors.

RobertoColombo
RobertoColombo
Posted 2 Weeks Ago
View Quick Profile
Distinguished Member

Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)

Group: Forum Members
Last Active: 4 hours ago
Posts: 1.6K, Visits: 3.0K
Hope RL will improve the doc in order to fill the gaps...

My PC:
OS: Windows 10 Pro English 64-bit / CPU: Intel i7-9700 3.6GHz / MB: ASUS ROG Strix Z390  RAM: 32GB DDR4 2.6GHz / HD: 2TB+3TB  /  
SSD: 2x512GB Samsung 860 EVO / 
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the VB with an HDMI splitter) / DirectX: 12

Edited
2 Weeks Ago by RobertoColombo



Reading This Topic