TurboCAD Forums

Plug-In Palace => Animation Lab => Topic started by: Vlad Veselov on April 03, 2017, 09:50:49 AM

Title: TurboCAD 2017 SDK enhancement
Post by: Vlad Veselov on April 03, 2017, 09:50:49 AM
Please pay attention, these features were developed specifically for AnimationLab.

Write access to “Drawing Setup\Sun properties” through the VBScript (i.e. from MacroRecorder, Animation Lab etc.) was added.
   http://forums.turbocad.com/index.php/topic,20784.0.html

The ability to read/write child shaders parameters in materials, environments, luminance and render styles has been added.
   http://forums.turbocad.com/index.php/topic,20785.0.html

Vlad
Title: Re: TurboCAD 2017 SDK enhancement
Post by: Andy H on June 08, 2017, 05:10:02 PM
HI Vlad.

I installed the latest patch last night (UK time) so I've only now been able to check out the changes that have been made to materials etc,  I have only tried to 1000 trick up to now, but need to ask a question, do you know of a simple way to force an object update.

I set it up for two tests, one to change the IOR, second changes the transparency,  however although the value & Transparency colour change in the properties, the changes were not reflected in the render / animation, in fact even when the animation was finished, switching to wireframe and back to quality still didn't show the changes, switching to paper space and back to model space did show the changes correctly.

To get round it I added a command '0 0 penColorIncr 1 1 1' to force the object to redraw itself after each frame, but I wondered if there was a simpler solution.

I altered the provider like you did with Luminance as shown below. the commands were just 'ChangeMaterial' and the 'PenColorIncr'
Code: [Select]
Dim mat

Const imsiSSetsProviderUnknown = 0
Const imsiSSetsProviderLW = 1
Const imsiSSetsProviderRW = 2

Sub PreScenarioAction
end sub

Sub PostScenarioAction
end sub

Sub StepCustomAction

Set mat = ActiveDrawing.Application.Materials(0)
mat.PrimaryProvider = imsiSSetsProviderRW
// TODO your code
end sub

Thanks
Andy.   
Title: Re: TurboCAD 2017 SDK enhancement
Post by: Vlad Veselov on June 20, 2017, 03:14:04 PM
I set it up for two tests, one to change the IOR, second changes the transparency,  however although the value & Transparency colour change in the properties, the changes were not reflected in the render / animation, in fact even when the animation was finished, switching to wireframe and back to quality still didn't show the changes, switching to paper space and back to model space did show the changes correctly.

Hi Andy

Can you please send me TCW file with scenario?

Vlad
Title: Re: TurboCAD 2017 SDK enhancement
Post by: Andy H on June 21, 2017, 08:04:47 AM
Vlad,  sorry for delay, I'm having many graphic problems with the latest 2017 patch, I think I'd better do a re-install.

Anyway, I've attached a simple .tcw file, it has two objects with materials that only differ in the material name.   As shown in the attached gif animation, the one on the right animates correctly because I added a second command, (PenColorInc in this case),  with the one on the left,  after animation and in the object properties it shows the transparency script has completed correctly but its not displayed on screen correctly.

A second problem since installing the latest patch (build 38.2) is that objects with a default material name (example plain blue) do not show the animation at all, neither on screen nor in properties, as can be seen if the material of one of the spheres is change to just plain blue, and the animation is re-run, hence why I had to rename the materials to plain blue copy and plain blue copy2.

All that said, the fact I have now got other problems with 2017, it may be something on my system which is interfering with TC.

     
Title: Re: TurboCAD 2017 SDK enhancement
Post by: Vlad Veselov on June 22, 2017, 01:03:38 PM
Vlad,  sorry for delay,
:)

Thanks Andy.
I'll  see it.

Vlad
Title: Re: TurboCAD 2017 SDK enhancement
Post by: Vlad Veselov on June 25, 2017, 05:39:25 PM
Andy,

I'm having many graphic problems with the latest 2017 patch
Please do let us know about these issues.

do you know of a simple way to force an object update.
Of course,  But this avoid is also "not good". :). If option "Show normals" is enabled, the materials will be updated.
This feature (update materials) is not implemented in TC SDK properly yet.

A second problem since installing the latest patch (build 38.2) is that objects with a default material name (example plain blue) do not show the animation at all
CNR now. Just in case, please pay attention to errors in the custom script (custom script exceptions.png)

after animation and in the object properties it shows the transparency script has completed correctly but its not displayed on screen correctly.
For ex. script to update a object.:
Code: [Select]
Sub StepCustomAction
set gr = ActiveDrawing.Graphics.GraphicFromID(Actors(0)(0)) 
gr.Properties("PenColor") = gr.Properties("PenColor") + 1
set gr = nothing
end sub


Vlad
Title: Re: TurboCAD 2017 SDK enhancement
Post by: Andy H on June 25, 2017, 10:17:11 PM
Thanks for the reply Vlad, I'll have a play with it.

With regards one of the other problems I have (not connected to AL), I narrowed it down and I've posted in the problems section to see if others are affected  http://forums.turbocad.com/index.php/topic,21192.0.html (http://forums.turbocad.com/index.php/topic,21192.0.html)