def CreateBracketCurveSet(self): self.bracketCurveSet = trinity.TriCurveSet() self.bracketCurveSet.Play() step = trinity.TriStepUpdate() step.object = self.bracketCurveSet step.name = 'Update brackets' self.renderJob.steps.append(step)
def CreateBracketCurveSet(self): self.bracketCurveSet = trinity.TriCurveSet() self.bracketCurveSet.Play() step = trinity.TriStepUpdate() step.object = self.bracketCurveSet step.name = 'Update brackets' self.renderJob.AddStep('UPDATE_BRACKETS', step)
def RunSimulation(self): trinity.settings.SetValue('frustumCullingDisabled', 1) trinity.settings.SetValue('eveSpaceSceneVisibilityThreshold', 0) trinity.settings.SetValue('eveSpaceSceneLowDetailThreshold', 0) trinity.settings.SetValue('eveSpaceSceneMediumDetailThreshold', 0) ut.StartTasklet(self._PumpBlue) import sceneutils scene = sceneutils.GetOrCreateScene() scene.objects.append(self.redNodeMutated) self._UpdateBoundingBox(True) rj = trinity.CreateRenderJob('CallbackJob') projection = trinity.TriProjection() projection.PerspectiveFov(1, 1, 1, 10000000) rj.steps.append(trinity.TriStepSetProjection(projection)) view = trinity.TriView() view.SetLookAtPosition((50000, 0, 0), (0, 0, 0), (0, 1, 0)) rj.steps.append(trinity.TriStepSetView(view)) rj.steps.append(trinity.TriStepUpdate(scene)) rj.steps.append(trinity.TriStepRenderScene(scene)) rj.steps.append(trinity.TriStepPythonCB(self.AccumulateBounds)) rj.ScheduleRecurring() for i in range(self._passes): self.activeIndex[0] = i for cs in self.curveSets: cs.Play() for sys in self.systems: sys.ClearParticles() self.started[0] = True ut.SleepSim(self._time) rj.UnscheduleRecurring() self._pumpBlue = False
def SetUI(self, ui): if ui is None: self.RemoveStep('UPDATE_UI') self.RemoveStep('RENDER_UI') else: self.AddStep('UPDATE_UI', trinity.TriStepUpdate(ui)) self.AddStep('RENDER_UI', trinity.TriStepRenderUI(ui))
def SetClientToolsScene(self, scene): if scene is None: self.clientToolsScene = None else: self.clientToolsScene = blue.BluePythonWeakRef(scene) self.AddStep('UPDATE_TOOLS', trinity.TriStepUpdate(scene)) self.AddStep('RENDER_TOOLS', trinity.TriStepRenderScene(scene))
def Set2DBackdropScene(self, backdrop): if backdrop is not None: self.AddStep('UPDATE_BACKDROP', trinity.TriStepUpdate(backdrop)) self.AddStep('RENDER_BACKDROP', trinity.TriStepRenderScene(backdrop)) else: self.RemoveStep('UPDATE_BACKDROP') self.RemoveStep('RENDER_BACKDROP')
def CreateBracketCurveSet(self): """ Create a curveset to update any uiprimitives.Bracket present """ self.bracketCurveSet = trinity.TriCurveSet() self.bracketCurveSet.Play() step = trinity.TriStepUpdate() step.object = self.bracketCurveSet step.name = 'Update brackets' self.renderJob.AddStep('UPDATE_BRACKETS', step)
def CreateBracketCurveSet(self): """ Create a curveset to update any Bracket present """ self.bracketCurveSet = trinity.TriCurveSet() self.bracketCurveSet.Play() step = trinity.TriStepUpdate() step.object = self.bracketCurveSet step.name = 'Update brackets' self.renderJob.steps.append(step)
def _CreateBasicRenderSteps(self): self.AddStep('UPDATE_SCENE', trinity.TriStepUpdate(self.GetScene())) self.AddStep('BEGIN_RENDER', trinity.TriStepRenderPass(self.GetScene(), trinity.TRIPASS_BEGIN_RENDER)) self.AddStep('END_RENDERING', trinity.TriStepRenderPass(self.GetScene(), trinity.TRIPASS_END_RENDER)) self.AddStep('RENDER_MAIN_PASS', trinity.TriStepRenderPass(self.GetScene(), trinity.TRIPASS_MAIN_RENDER)) self._CreateDepthPass() self._CreateBackgroundStep() self.AddStep('CLEAR', trinity.TriStepClear((0.0, 0.0, 0.0, 0.0), 1.0)) if self.clientToolsScene is not None: self.SetClientToolsScene(self.clientToolsScene.object)
def EnableSceneUpdate(self, isEnabled): if isEnabled: self.AddStep('UPDATE_SCENE', trinity.TriStepUpdate(self.GetScene())) else: self.RemoveStep('UPDATE_SCENE')
def _CreateBasicRenderSteps(self): self.AddStep('UPDATE_SCENE', trinity.TriStepUpdate(self.GetScene())) self.AddStep('RENDER_SCENE', trinity.TriStepRenderScene(self.GetScene()))
def _CreateBasicRenderSteps(self): self.AddStep('UPDATE_SCENE', trinity.TriStepUpdate(self.GetScene())) self.AddStep('CLEAR', trinity.TriStepClear((0.0, 0.0, 0.0, 0.0), 1.0)) self.AddStep('RENDER_SCENE', trinity.TriStepRenderScene(self.GetScene()))