News:

When posting a problem be sure to include which version you are using.  Give as much information as possible.  If the problem is with a specific file be sure to attache it to your post.

Main Menu

TurboCAD 2017 SDK enhancement

Started by Vlad Veselov, April 03, 2017, 09:50:49 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Vlad Veselov

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

Andy H

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'
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.   

Vlad Veselov

Quote from: Andy H on June 08, 2017, 05:10:02 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

Andy H

#3
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.

     

Vlad Veselov


Vlad Veselov

Andy,

Quote from: Andy H on June 21, 2017, 08:04:47 AM
I'm having many graphic problems with the latest 2017 patch
Please do let us know about these issues.

Quote from: Andy H on June 08, 2017, 05:10:02 PM
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.

Quote from: Andy H on June 21, 2017, 08:04:47 AM
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)

Quote from: Andy H on June 21, 2017, 08:04:47 AM
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.:

Sub StepCustomAction
set gr = ActiveDrawing.Graphics.GraphicFromID(Actors(0)(0)) 
gr.Properties("PenColor") = gr.Properties("PenColor") + 1
set gr = nothing
end sub



Vlad

Andy H

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