Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* neirao
- 18/04/2018
- */
- #command("object");
- file $output;
- attribute $attrMargin;
- object $obj;
- shape $shape, $Shapes[0], $temp[0];
- int $i, $shape_count;
- $obj=project.curObject;
- $shape_count = $obj.GetShapes($Shapes);
- /*project.curObject.GetShapes($Shapes); //original ok*/
- /*Begin our Console Output for debugging*/
- $output.open("$console", "w");
- for $i = 0 to $shape_count - 1 do{
- $shape = $Shapes[$i];
- }
- $i = 0;
- while ($i < $Shapes.size) {
- $output.print("\n\n $i: %8.4g", $i);
- $output.print("\n\n total shapes:", $shape_count);
- $shape = $Shapes[$i];
- if($shape.Selected){
- if ($shape.GetKind() == SHAPE_KIND_SUBDIVISION) {
- $output.print("\n\n FOUND SHAPE_KIND_SUBDIVISION!");
- /* Process attributes */
- /* $attrMargin = project.curObject.LookupAttribute("Selection Margin");*/
- /*$attrMargin = project.curObject.LookupAttribute("Selection Margin");*/
- /*$attrMargin = $obj.LookupAttribute("Working");
- $attrMargin = $obj.LookupAttribute("working");
- $attrMargin = $obj.LookupAttribute("Work");
- $attrMargin = $obj.LookupAttribute("work");*/
- /*$attrMargin =$shape.LookupAttribute("Working");*/
- /*$attrMargin =$shape.GetNumAttributes();*/
- /*$output.print("\n\n $Shapes[$i].GetNumAttributes(): ", project.curObject.GetNumAttributes());*/
- if($attrMargin != NULL){
- $output.print("\n\n I HAVE THE ATTRIBUTE!!!!!");
- }else{
- $output.print("\n\n I DONT HAVE THE ATTRIBUTE!");
- }
- $Shapes[$i].GetShapes($temp);
- while ($temp.size > 0) {
- }
- }else{
- /* Deselect if is NOT - SHAPE_KIND_SUBDIVISION OK*/
- $shape.Selected = 0;
- }
- }
- $i = $i + 1;
- }
- $output.print("\n\n");
- $output.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement