Announcement

Collapse
No announcement yet.

maya2016: compute called only once

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • maya2016: compute called only once

    hi again!

    i have a scene modifier node in VRay and the corresponding node in maya. During scene translation, the node is recognized by the exporter, the compute method is called correctly, but only the first time i render the scene. The compute method never gets called after that unless i change a parameter in the node, so it seems to be a graph reevaluation problem. I guess i could set a dummy attribute in the compute method to force the next evaluation but that's a dirty hack... Is there a better way to do this?

    thanks!
    Chervin SHAFAGHI
    CG Supervisor at CGEV, Paris.

  • #2
    Maya's DAG is evaluated lazily; unless one of the node's input attributes is marked as dirty, Maya will not recompute it. You also need to tell Maya that the "vrayGeomResult" attribute affects the "vrayGeomInfo" attribute, like in the Maya plane example were you can see the following code:
    Code:
    CHECK_MSTATUS(attributeAffects(m_vrayGeom, m_vrayGeomResult));
    When exporting the node, V-Ray updates the "vrayGeomResult" attribute and attempts to read the "vrayGeomInfo" attribute. At this point, Maya should call the compute() method.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      thanks for the quick reply!

      I have everything set up as you say (attributeAffects and so...) but the problem is (i forgot to mention), when the compute method doesn't get called, my nodes are not visible in the render as well...
      Chervin SHAFAGHI
      CG Supervisor at CGEV, Paris.

      Comment


      • #4
        If the compute() method gets called once, the object will be rendered. If it doesn't show up, something is wrong with the initial export. If you want to animate something, you must have an animated input attribute that affects the output. This is not a hack, this is how Maya works.
        V-Ray/PhoenixFD for Maya developer

        Comment

        Working...
        X