Thanks a bunch. tested it and it doesn't seem quite as obvious. I ran the command you gave me and there was no way to stop aside from closing the terminal and I couldn't tell where it saved it all.Moult wrote: ↑Wed Feb 20, 2019 8:44 pm@Regis, if you are inclined towards using Linux-like tools, ffmpeg can do what you are asking for:
ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0+0,0 test.mp4
ffmpeg -i test.mp4 -vf scale=480:270 my gif.gif
The first line records your full screen at that resolution (change as necessary) and the second line converts it to a gif at 480x270 resolution.
That's the strength and weakness of command line
Yeah not quite practical, I need to search for a different solution. I was back researching how to open an extract an appimage when we had a dedicated forum discussion on it the other day. So yeah...
Help wanted: i rewrote the "set editpoints trackers" based on a selection observer, so when an object is selected the editpoints trackers are displayed. Also if an object is unselected using Ctrl, the editpoints of that object are removed, etc... So at the moment you can launch every command while points are displayed. if at the end of the command the selection is kept, editpoints are diplayed again, if not, they are removed. Until that point everything works.yorik wrote: ↑Sat Feb 16, 2019 10:08 pmAnother idea, if not possible to depend on getObjectsInfo: We do our own routine:
- take the point returned by getObjectInfo, no matter which object was clicked
- take the view direction (ortho cameras) or a vector from the point to the camera position (perspective cameras)
- take another vector from the clicked point to all our edit points
- for each of these, get the angle between it and the view direction vector
- if they are aligned (angle is 0° or 180°), then this edit point is exactly in the line of our clicked point. Then we can consider it was clicked.
Code: Select all
class autoEditObserver: def __init__(self): self.trackers =  self.editpoints =  def addSelection(self, document, object, element, position): """Add single object to selection. Usually gets called when selecting in the 3d view""" '''FreeCAD.Console.PrintMessage(document+"\n") FreeCAD.Console.PrintMessage(object+"\n") FreeCAD.Console.PrintMessage(element+"\n") FreeCAD.Console.PrintMessage(str(position)+"\n")''' self.setEditPoints(FreeCAD.getDocument(document).getObject(object)) def removeSelection(self, document, object, element): """Remove single object from selection. Usually gets called when deselecting in the 3d view""" self.deleteTrackers(object) def setSelection(self, document): """Add one or more objects to selection. Usually gets called when selecting in the tree view""" self.deleteTrackers() self.setEditPoints(FreeCADGui.Selection.getSelection()) def clearSelection(self, document): """Remove all objects of the given document from the selection""" self.deleteTrackers() def setEditPoints(self,obj): #FreeCAD.Console.PrintMessage("\n setting editpoint") #FreeCAD.Console.PrintMessage(str(print(selection))) pl = None self.editpoints =  if "Proxy" in obj.PropertiesList and hasattr(obj.Proxy,"Type"): objType = Draft.getType(obj) FreeCAD.Console.PrintMessage(str(objType)+"\n start editing") pl = None if "Placement" in obj.PropertiesList: pl = obj.Placement invpl = pl.inverse() if objType in ["Wire","BSpline"]: #self.ui.editUi("Wire") for p in obj.Points: if pl: p = pl.multVec(p) self.editpoints.append(p) if objType == "Circle": self.editpoints.append(obj.Placement.Base) #if obj.FirstAngle == obj.LastAngle:#self.obj is a circle #self.ui.editUi("Circle") #self.editpoints.append(obj.Shape.Vertexes.Point) #else:#self.obj is an arc #self.ui.editUi("Arc") #self.editpoints.append(obj.Shape.Vertexes.Point)#First endpoint #self.editpoints.append(obj.Shape.Vertexes.Point)#Second endpoint #self.editpoints.append(getArcMid())#Midpoint FreeCAD.Console.PrintMessage(str(self.editpoints)+"\n ") self.setTrackers(obj) #self.proceed() return FreeCAD.Console.PrintMessage("\n This object type is not editable") return def setTrackers(self,obj): if self.editpoints: FreeCAD.Console.PrintMessage("\n SETTING EDITTRACKER") for ep in range(0,len(self.editpoints),1): self.trackers.append(editTracker(self.editpoints[ep],obj.Name,ep)) #self.call = self.view.addEventCallback("SoEvent",self.action) #self.running = True '''plane.save() if "Shape" in self.obj.PropertiesList: if plane.weak: plane.alignToFace(self.obj.Shape) if self.planetrack: self.planetrack.set(self.editpoints)''' else: return FreeCAD.Console.PrintMessage("trackers lenght = "+ str(len(self.trackers)) + "\n endpoints lenght = " + str(len(self.editpoints))) def deleteTrackers(self,object = None): if object != None: FreeCAD.Console.PrintMessage("trackers lenght = "+ str(len(self.trackers)) + "\n endpoints lenght = " + str(len(self.editpoints))) removeIdx =  for t in range(0,len(self.trackers),1): if object == self.trackers[t].name: #FreeCAD.Console.PrintMessage(str(t.idx) + " "+ str()"\n OBJECT DESELECTED") removeIdx.append(t) n = 0 for t in removeIdx: self.trackers[t-n].finalize() self.trackers.pop(t-n) n = n + 1 elif self.trackers: for t in self.trackers: t.finalize() self.trackers.clear() self.editpoints.clear() self.editpoints =  self.trackers =