Beispiel #1
0
        /*
         * setup/teardown for Sculpt Curve tool, which is applied to area curves, trimline curve, etc
         */
        public static bool CanSculptCurve()
        {
            var M = OG.Model;

            if (M.Context.ToolManager.ActiveRightTool != null)
            {
                return(false);
            }

            // can always sculpt trimline
            if (SceneUtil.IsSelectionMatch(M.Scene, typeof(TrimLoopSO), 1))
            {
                return(true);
            }

            // if polycurve, check that it is attached to the right kind of modeling op
            if (SceneUtil.IsSelectionMatch(M.Scene, typeof(PolyCurveSO), 1) == false)
            {
                return(false);
            }
            PolyCurveSO      so = M.Scene.Selected[0] as PolyCurveSO;
            ModelingOperator op = M.leg.FindOpForSO(so);

            if (op is EnclosedRegionOffsetOp || op is EnclosedRegionSmoothOp)
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        virtual protected void PostOnCollectionItemModified(ModelingOperator item)
        {
            var safeevent = CollectionItemModified;

            if (safeevent != null)
            {
                safeevent(this, item);
            }
        }
        protected virtual void on_input_modified(ModelingOperator op)
        {
            base.invalidate();

            // have to discard SDF cache if mesh source is modified
            if (op == MeshSource)
            {
                pending_cache_discard = true;
                input_mesh_modified_counter++;
            }
        }
Beispiel #4
0
 protected virtual void on_input_modified(ModelingOperator op)
 {
     base.invalidate();
 }
 protected virtual void on_source_modified(ModelingOperator op)
 {
     on_modified();
 }
        /// <summary>
        /// find SO associated w/ modeling op
        /// </summary>
        public SceneObject FindSOForOp(ModelingOperator op)
        {
            SceneObject so = SO_Op.Find(op);

            return(so);
        }
        /// <summary>
        /// find modeling op associated w/ SO
        /// </summary>
        public ModelingOperator FindOpForSO(SceneObject so)
        {
            ModelingOperator op = SO_Op.Find(so);

            return(op);
        }
Beispiel #8
0
 protected virtual void on_source_modified(ModelingOperator op)
 {
     invalidate();
     PostOnOperatorModified();
 }
Beispiel #9
0
 public ModelingOpException(ModelingOperator op, Exception e)
 {
     this.op = op; this.e = e;
 }
Beispiel #10
0
 void on_collection_item_modified(ModelingOperator item)
 {
     PostOnCollectionItemModified(item);
 }
Beispiel #11
0
 public void SetActiveModelingOperator(ModelingOperator op)
 {
     activeModelingOp = op;
     OG.notifyActiveModelingOpChanged();
 }
Beispiel #12
0
 void on_child_modified(ModelingOpCollection collection, ModelingOperator op)
 {
     base.invalidate();
 }