My graph is crashing!
Posted: Mon Jul 08, 2013 2:10 pm
I'm quite new to scripting and graphs, but I'm trying to set up a graph that gets the transformation and rotation of a camera, creates a null and sets the position and rotation based on the camera.
I created a graph that does this, but with a cube instead of a camera, but as soon as I switch to trying to use a camera, RF will crash as soon as I evaluate.
Does anyone have an idea why? Or should I do it another way?
Here's the graph as is now:
https://www.dropbox.com/s/rpjjbpd7zgvh767/graph01.png
XML:
<?xml version="1.0" encoding="utf-8"?>
<scene>
<nodes>
<node>
<name>GetCamera_01</name>
<type>GetCamera</type>
<inputs>
<input>
<name>name</name>
<type>string</type>
<value>SceneCamera01</value>
</input>
</inputs>
</node>
<node>
<name>GetTransformation_01</name>
<type>GetTransformation</type>
<inputs/>
</node>
<node>
<name>SceneAddObject_01</name>
<type>SceneAddObject</type>
<inputs>
<input>
<name>type</name>
<type>list</type>
<value>null</value>
</input>
</inputs>
</node>
<node>
<name>SetTransformationFromComponents_01</name>
<type>SetTransformationFromComponents</type>
<inputs>
<input>
<name>scale</name>
<type>vector3</type>
<value>0.000000,0.000000,0.000000</value>
</input>
</inputs>
</node>
<node>
<name>Evaluator_01</name>
<type>Evaluator</type>
<inputs>
<input>
<name>evaluate</name>
</input>
</inputs>
<outputs/>
</node>
</nodes>
<connections>
<connection>
<source>root.GetCamera_01.node</source>
<target>root.GetTransformation_01.node</target>
</connection>
<connection>
<source>root.SceneAddObject_01.object</source>
<target>root.SetTransformationFromComponents_01.node</target>
</connection>
<connection>
<source>root.GetTransformation_01.position</source>
<target>root.SetTransformationFromComponents_01.translation</target>
</connection>
<connection>
<source>root.GetTransformation_01.rotation</source>
<target>root.SetTransformationFromComponents_01.rotation</target>
</connection>
<connection>
<source>root.SetTransformationFromComponents_01.evaluate</source>
<target>root.Evaluator_01.evaluate</target>
</connection>
</connections>
<layout>
<nodes>
<node>
<name>root.GetCamera_01</name>
<position>25.000000,71.000000</position>
<color>0.572000,0.654647,0.880000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
<node>
<name>root.GetTransformation_01</name>
<position>195.000000,125.000000</position>
<color>0.572000,0.654647,0.880000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
<node>
<name>root.SceneAddObject_01</name>
<position>198.001453,47.571778</position>
<color>0.838808,0.880000,0.572000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
<node>
<name>root.SetTransformationFromComponents_01</name>
<position>437.512582,140.143886</position>
<color>0.572000,0.654647,0.880000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
<node>
<name>root.Evaluator_01</name>
<position>712.115550,199.921071</position>
<color>0.572000,0.828667,0.880000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
</nodes>
<notes/>
</layout>
</scene>
Any help appreciated.
/Dave
I created a graph that does this, but with a cube instead of a camera, but as soon as I switch to trying to use a camera, RF will crash as soon as I evaluate.
Does anyone have an idea why? Or should I do it another way?
Here's the graph as is now:
https://www.dropbox.com/s/rpjjbpd7zgvh767/graph01.png
XML:
<?xml version="1.0" encoding="utf-8"?>
<scene>
<nodes>
<node>
<name>GetCamera_01</name>
<type>GetCamera</type>
<inputs>
<input>
<name>name</name>
<type>string</type>
<value>SceneCamera01</value>
</input>
</inputs>
</node>
<node>
<name>GetTransformation_01</name>
<type>GetTransformation</type>
<inputs/>
</node>
<node>
<name>SceneAddObject_01</name>
<type>SceneAddObject</type>
<inputs>
<input>
<name>type</name>
<type>list</type>
<value>null</value>
</input>
</inputs>
</node>
<node>
<name>SetTransformationFromComponents_01</name>
<type>SetTransformationFromComponents</type>
<inputs>
<input>
<name>scale</name>
<type>vector3</type>
<value>0.000000,0.000000,0.000000</value>
</input>
</inputs>
</node>
<node>
<name>Evaluator_01</name>
<type>Evaluator</type>
<inputs>
<input>
<name>evaluate</name>
</input>
</inputs>
<outputs/>
</node>
</nodes>
<connections>
<connection>
<source>root.GetCamera_01.node</source>
<target>root.GetTransformation_01.node</target>
</connection>
<connection>
<source>root.SceneAddObject_01.object</source>
<target>root.SetTransformationFromComponents_01.node</target>
</connection>
<connection>
<source>root.GetTransformation_01.position</source>
<target>root.SetTransformationFromComponents_01.translation</target>
</connection>
<connection>
<source>root.GetTransformation_01.rotation</source>
<target>root.SetTransformationFromComponents_01.rotation</target>
</connection>
<connection>
<source>root.SetTransformationFromComponents_01.evaluate</source>
<target>root.Evaluator_01.evaluate</target>
</connection>
</connections>
<layout>
<nodes>
<node>
<name>root.GetCamera_01</name>
<position>25.000000,71.000000</position>
<color>0.572000,0.654647,0.880000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
<node>
<name>root.GetTransformation_01</name>
<position>195.000000,125.000000</position>
<color>0.572000,0.654647,0.880000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
<node>
<name>root.SceneAddObject_01</name>
<position>198.001453,47.571778</position>
<color>0.838808,0.880000,0.572000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
<node>
<name>root.SetTransformationFromComponents_01</name>
<position>437.512582,140.143886</position>
<color>0.572000,0.654647,0.880000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
<node>
<name>root.Evaluator_01</name>
<position>712.115550,199.921071</position>
<color>0.572000,0.828667,0.880000</color>
<collapsed>false</collapsed>
<horizontal_inputs>true</horizontal_inputs>
<horizontal_outputs>true</horizontal_outputs>
</node>
</nodes>
<notes/>
</layout>
</scene>
Any help appreciated.
/Dave